Vehicle service power management method, processor, vehicle and storage medium

By receiving and managing power state change events in the service processor, the power management problem of processes, threads, and services in the device system is solved, ensuring the integrity of tasks and the stability of the system, and realizing precise power control and orderly hibernation and power-on/off processes.

CN116252728BActive Publication Date: 2025-10-21CHONGQING CHANGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310092075.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-06
Publication Date
2025-10-21
Estimated Expiration
2043-02-06

AI Technical Summary

Technical Problem

Existing technologies cannot effectively manage the power of processes, threads, and services in a device system, resulting in incomplete tasks and incomplete timing of multiple devices and multiple tasks. Furthermore, the problem of process termination caused by system signals is difficult to solve.

Method used

By receiving power state change events in the service processor, detecting the correct execution flow of the current and target power states, and broadcasting the target power state, it ensures that each device task correctly receives power events, prevents critical tasks from hibernating, judges abnormal conditions, and achieves precise power management and control.

Benefits of technology

It achieves orderly and functional integrity of power states for multiple devices, improves the accuracy and robustness of power management, and ensures the logical controllability of tasks and the stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116252728B_ABST
    Figure CN116252728B_ABST
Patent Text Reader

Abstract

The application relates to a service power management method of a vehicle, a processor, a vehicle and a storage medium, wherein the method comprises the following steps: receiving a power state change event of any power management sub-device or task, receiving a target power state sent by any power management sub-device or task based on a power event notification, detecting a correct execution process between a current power state and the target power state of any power management sub-device or task, and starting a corresponding correct execution process of the power management sub-device or task; broadcasting a power state change event of the power management sub-device or task to any power management sub-device or task, sending a target power state to all power management sub-devices or tasks, and switching to the target power state after ending the correct execution process, so that each device task can correctly receive the power event, and the order of device sleep and power-on and the complete execution of each function are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power management technology, and in particular to a service-oriented power management method, processor, vehicle, and storage medium for a vehicle. Background Art

[0002] Embedded devices are widely used today, and some spend significant time idle during normal operation. Hibernation or powering off devices during this idle time can significantly conserve power. However, in complex environments with multiple devices and multiple functions, if hibernation or powering off devices requires orderly and complete processing, power management requires complex logical sequencing of all devices.

[0003] At present, the relevant technology can provide power to the corresponding electrical devices through each connection interface based on the system power supply. The power management circuit obtains the real-time load sum of multiple power supply units, determines the target load of each power supply unit, and determines whether each connection interface is connected to one of the multiple electrical devices. The power management circuit turns off the power supply of the connection interface that is not connected to the electrical device, and turns on or off each power supply unit according to the number of open power supply units. In addition, the relevant technology can also provide power according to the control instructions received from the controller of the movable device. In the current energy consumption mode, the power manager determines whether the temperature parameters of the voltage control element end on the power manager are abnormal based on the status of the movable device, and performs abnormal processing operations corresponding to the status of the movable device in the event of an abnormality.

[0004] However, related technologies can only control the overall power supply of the device, and cannot synchronize the status of the internal processes of the device, nor perform corresponding power management of processes, threads, services, etc. in the device system. It is difficult to ensure that related processes are completed in an ideal logical order, and there is a lack of power management methods for multiple devices and multiple tasks. Summary of the Invention

[0005] The present application provides a vehicle service-oriented power management method, processor, vehicle and storage medium to solve the problems that related technologies are unable to perform corresponding power management of processes, threads, services, etc. in the device system, and the control unit forces power off, resulting in task incompleteness, or incomplete timing of multiple devices and multiple tasks, and termination of processes, etc. caused by system signals.

[0006] The first aspect of the present application provides a service-oriented power management method for a vehicle, which is executed in a service-type processor. The method includes the following steps: receiving a power state change event of any power management sub-device or task, and receiving a target power state sent by any power management sub-device or task based on a power event notification; based on the target power state, detecting the correct execution process between the current power state of any power management sub-device or task and the target power state, and starting the corresponding correct execution process of this power management sub-device or task; and broadcasting the power state change event of this power management sub-device or task to any power management sub-device or task, sending the target power state to all power management sub-devices or tasks, and switching to the target power state after ending the correct execution process.

[0007] According to the above-mentioned technical means, the embodiment of the present application directly connects with each device and each process, and manages and communicates with each task in a service manner, thereby ensuring that the tasks of each device can correctly receive power events, so that the power status of multiple devices is the same, effectively ensuring the orderliness of device sleep, power on and off, and the complete execution of various functions; in addition, the present application is a service-type program executed in the CPU (Central Processing Unit), which can accurately manage and control the power of all power management sub-devices, processes, threads, and services, greatly improving the accuracy of power management.

[0008] Optionally, in one embodiment of the present application, after starting the correct execution process corresponding to the power management sub-device or task, it also includes: detecting whether there is a critical power task in any of the power management sub-devices or tasks; when the critical power task is detected and the target power state is a sleep state, during the processing time period of the critical power task, preventing the state switching of one or all of the power sleep levels, and prohibiting power off during the processing time period.

[0009] According to the above-mentioned technical means, the embodiment of the present application prevents the execution of some tasks during the processing time period of the critical power task when a critical power task is detected and the target power state is a sleep state, so that non-sleep critical tasks can be detected when the power is turned off in sleep mode to ensure that the non-sleep tasks can be executed and completed, solving the problem of task incompleteness caused by the control unit forcing the power off, greatly improving the functional controllability and sequential controllability of various levels of sleep, power on and off processes, and ensuring the management accuracy of sub-tasks of each sub-device.

[0010] Optionally, in one embodiment of the present application, before detecting whether there is a critical power task in any of the power management sub-devices or tasks, it also includes: receiving a registered critical task; receiving at least one critical task, and adding the at least one critical task to the critical task list to query the critical task list and determine the critical power task.

[0011] According to the above technical means, the embodiment of the present application receives registered key tasks and adds them to the key task list to query the key task list, thereby providing a basis for the processing of key tasks, making power management more efficient and reasonable, and providing a reliable basis for achieving logical controllability of each task.

[0012] Optionally, in one embodiment of the present application, after broadcasting the power state change event of the power management sub-device or task to any of the power management sub-devices or tasks, it also includes: determining whether a correct reception signal returned by the power state change event from all the power management sub-devices or tasks is received; if the correct reception signal is received, allowing switching to the target power state.

[0013] According to the above technical means, the embodiment of the present application notifies the client side of subsequent power state changes, waits for all connected client side tasks to complete successfully, and makes full preparations for the next power state switch, thereby effectively ensuring that the subtasks of each sub-device can correctly receive power events and the correct timing termination of multiple devices and multiple tasks; in addition, the embodiment of the present application also enables each subtask to be processed in the correct order of the established process, further ensuring the integrity of the correct processing of each subtask module.

[0014] Optionally, in one embodiment of the present application, before switching to the target power state, it also includes: detecting whether the correct execution process meets the preset power state execution exception condition; when it is detected that the preset power state execution exception condition is met, reporting the abnormal state, otherwise synchronizing all power states to the target power state.

[0015] According to the above technical means, the embodiment of the present application judges whether the execution process meets the power state execution exception conditions to report the abnormal state or synchronize all the power states required from the power state, thereby effectively solving the problem of termination of processes caused by system signals, etc., and improving the robustness and stability of the power management service.

[0016] The second aspect of the present application provides a service-type processor for a vehicle, comprising: a first receiving module for receiving a power state change event of any power management sub-device or task, and receiving a target power state sent by any power management sub-device or task based on a power event notification; a starting module for detecting the correct execution process between the current power state of any power management sub-device or task and the target power state based on the target power state, and starting the corresponding correct execution process of the power management sub-device or task; and a broadcasting module for broadcasting the power state change event of the power management sub-device or task to any power management sub-device or task, and sending the target power state to all power management sub-devices or tasks, so as to switch to the target power state after completing the correct execution process.

[0017] Optionally, in one embodiment of the present application, it also includes: a first detection module, used to detect whether there is a critical power task in any of the power management sub-devices or tasks after starting the correct execution process corresponding to the power management sub-device or task; a blocking module, used to prevent the state switching of one or all of the power sleep levels during the processing time period of the critical power task when the critical power task is detected and the target power state is the sleep state, and prohibit power off in the processing time period.

[0018] Optionally, in one embodiment of the present application, it also includes: a second detection module, used to receive a registered critical task before detecting whether there is a critical power task in any of the power management sub-devices or tasks; a query module, used to receive at least one critical task and add the at least one critical task to the critical task list to query the critical task list and determine the critical power task.

[0019] Optionally, in one embodiment of the present application, it also includes: a judgment module, used to judge whether the correct reception signal returned by the power state change event of all power management sub-devices or tasks is received after broadcasting the power state change event of the power management sub-device or task to any power management sub-device or task; a switching module, used to allow switching to the target power state if the correct reception signal is received.

[0020] Optionally, in one embodiment of the present application, it also includes: a second detection module, used to detect whether the correct execution process meets the preset power state execution exception condition before switching to the target power state; a synchronization module, used to report the abnormal state when it is detected that the preset power state execution exception condition is met, otherwise synchronize all power states to the target power state.

[0021] The third aspect of the present application provides a vehicle, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the service-oriented power management system of the vehicle as described in the above embodiment.

[0022] The fourth aspect of the present application provides a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, it implements the above-mentioned service-oriented power management method for the vehicle.

[0023] Therefore, the embodiments of the present application have the following beneficial effects:

[0024] (1) The embodiments of the present application directly connect with each device and each process, and manage and communicate with each task in a service manner, thereby ensuring that the tasks of each device can correctly receive power events, making the power states of multiple devices the same, effectively ensuring the orderliness of device sleep, power on and off, and the complete execution of various functions; in addition, the present application, as a service-type program executed in the CPU (Central Processing Unit), can accurately manage and control the power of all power management sub-devices, processes, threads, and services, greatly improving the accuracy of power management.

[0025] (2) The embodiment of the present application prevents the execution of some tasks during the processing time period of the critical power task when a critical power task is detected and the target power state is the sleep state, so that non-sleep critical tasks can be detected when the power is turned off in the sleep state to ensure that the non-sleep tasks can be executed and completed, thereby solving the problem of task incompleteness caused by the control unit forcing the power off, greatly improving the functional controllability and sequential controllability of the sleep, power on and off processes at all levels, and ensuring the management accuracy of each sub-device subtask.

[0026] (3) The embodiment of the present application receives registered key tasks and adds them to the key task list to query the key task list, thereby providing a basis for processing key tasks, making power management more efficient and reasonable, and providing a reliable basis for achieving logical control of each task.

[0027] (4) The embodiment of the present application notifies the client of the subsequent power state change, waits for all connected client tasks to complete successfully, and makes full preparations for the next power state switch, thereby effectively ensuring that the subtasks of each sub-device can correctly receive the power event and the correct timing termination of multiple devices and multiple tasks; in addition, the embodiment of the present application also enables each subtask to be processed in the correct order of the established process, further ensuring the integrity of the correct processing of each subtask module.

[0028] (5) The embodiment of the present application determines whether the execution process meets the power state execution exception condition to report the abnormal state or synchronize all the power states required from the power state, thereby effectively solving the problem of process termination caused by system signals and improving the robustness and stability of the power management service.

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

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

[0031] Figure 1 This is a flow chart of a service-oriented power management method for a vehicle according to an embodiment of the present application;

[0032] Figure 2 A schematic diagram of a power management structure framework provided for one embodiment of the present application;

[0033] Figure 3 A schematic diagram of execution logic of a service-oriented power management method for a vehicle provided in one embodiment of the present application;

[0034] Figure 4 is an exemplary diagram of a service processor of a vehicle according to an embodiment of the present application;

[0035] Figure 5 A schematic diagram of the structure of a vehicle provided in an embodiment of the present application.

[0036] Among them, 10 is a service processor of the vehicle, 100 is a first receiving module, 200 is a starting module, 300 is a broadcast module, 501 is a memory, 502 is a processor, and 503 is a communication interface. DETAILED DESCRIPTION

[0037] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0038] The following describes a service-oriented power management method, processor, vehicle and storage medium of an embodiment of the present application with reference to the accompanying drawings. In view of the problems that the existing power management scheme mentioned in the above background technology mainly manages the power of the device through MCU (Micro Control Unit), system signal, or sleep lock, etc., and the management accuracy of each sub-device and sub-task is insufficient, and the functional controllability and sequence controllability of the sleep, power on and off processes at all levels are poor, the present application provides a service-oriented power management method for a vehicle, in which, by receiving a power state change event of any power management sub-device or task, a target power state sent by any power management sub-device or task based on a power event notification is received; based on the target power state, a correct execution process between the current power state and the target power state of any power management sub-device or task is detected, and the corresponding correct execution process of the power management sub-device or task is started; and the power state change event of the power management sub-device or task is broadcast to any power management sub-device or task, the target power state is sent to all power management sub-devices or tasks, and after the correct execution process is completed, the target power state is switched to. This application directly connects to each device and each process, and manages and communicates with each task in a service manner, thereby ensuring that each device's task can correctly receive power events, making the power status of multiple devices the same, effectively ensuring the orderliness of device sleep, power on and off, and the complete execution of various functions, and accurately managing the power of each corresponding sub-device and task, greatly improving the accuracy of power management. This solves the problems of related technologies being unable to perform corresponding power management on processes, threads, services, etc. in the device system, and the incompleteness of tasks caused by the control unit forcing power off, or the incompleteness of the timing of multiple devices and multiple tasks, as well as the termination of processes caused by system signals.

[0039] Specifically, Figure 1 This is a flowchart of a service-oriented power management method for a vehicle provided in an embodiment of the present application.

[0040] like Figure 1 As shown, the vehicle service-oriented power management method includes the following steps:

[0041] In step S101 , while receiving a power state change event of any power management sub-device or task, a target power state sent by any power management sub-device or task based on a power event notification is received.

[0042] In the embodiment of the present application, the power service can be started first, that is, the process of the power management service is initialized. The specific content of the initialization is as follows:

[0043] 1. Initialize the variables, space application, space initialization, and initial state data used in the power service process;

[0044] 2. Check and initialize the current power state, call the corresponding processing function of the new power state to initialize the state, compare the difference with the power state data, and process the new power state;

[0045] 3. Establish a service interface and wait for the client to connect.

[0046] Furthermore, the embodiment of the present application can register the power device service, wherein the external interface service is mainly responsible for the connection and disconnection management of the client side to ensure that the connection status with each device can be correctly saved locally after connection and disconnection, so as to facilitate the judgment of whether each device can execute normally.

[0047] The Clinet end needs to connect to the power management service through the external interface service to establish a detectable data transmission channel; at the same time, the power management service can also realize functions such as broadcasting to the device and receiving power events through the connection established by the external interface service.

[0048] It should be noted that the client end of the power management described above can be used as a sub-device or task. In the embodiment of the present application, the specific process of sub-device connection is as follows:

[0049] 1. The task or device connects to the power management service through the interface and registers the power management service sub-device, and the power management service records the device;

[0050] 2. Notify the power management service of the new power state change;

[0051] 3. The client actively requests the power status of the current power management service through messages;

[0052] 4. The power management service returns the power status message to the client.

[0053] When a client needs a power status change, a power event is triggered. The client connects to the server's external interface and sends a power event request to the power service. The power service receives the request and saves the event. Figure 2 shown.

[0054] Therefore, the embodiments of the present application receive and save the power status of any power management sub-device or task that needs to be executed next while receiving the power status change event of any power management sub-device or task, thereby providing a reliable basis and guidance for subsequent power management, and effectively ensuring the integrity of event processing of all relevant devices and task processes.

[0055] In step S102, based on the target power state, the correct execution process between the current power state and the target power state of any power management sub-device or task is detected, and the corresponding correct execution process of the power management sub-device or task is started.

[0056] After receiving the power state change event and target power state of the power management sub-device or task, the embodiments of the present application can further check the current power state of any power management sub-device or task and the correct process to be executed to receive the new power state based on the target power state, and start the correct execution process of the power state, thereby effectively ensuring the reliability and accuracy of subsequent power management.

[0057] Optionally, in one embodiment of the present application, before detecting whether there is a critical power task in any power management sub-device or task, it also includes: receiving a registered critical task; receiving at least one critical task, and adding at least one critical task to the critical task list to query the critical task list and determine the critical power task.

[0058] It should be noted that the main tasks of power management in the embodiments of the present application include sleep, wake-up, non-sleep critical tasks, forced power-off, scheduled wake-up, power status change information broadcast, failure retransmission, etc. From the perspective of importance, the above tasks can be divided into the following two types:

[0059] 1. Common tasks, such as sleep, hibernation by level, wake-up, low power consumption and other device power states;

[0060] 2. Critical tasks: Critical tasks mainly refer to tasks that have an impact on ordinary power tasks.

[0061] Therefore, the embodiment of the present application requires preliminary operations such as registering key tasks and adding lists for key task processing. The specific process is as follows:

[0062] 1. Key task registration: When the client has a key task to execute, it needs to register the key task with the power management;

[0063] 2. Power management receives critical tasks;

[0064] 3. Power management saves critical tasks to the queue list.

[0065] Therefore, the embodiment of the present application receives registered key tasks and adds them to the key task list to query the key task list, thereby providing a basis for the processing of key tasks, making power management more efficient and reasonable, and providing a reliable basis for achieving logical controllability of each task.

[0066] Optionally, in one embodiment of the present application, after starting the corresponding correct execution process of the power management sub-device or task, it also includes: detecting whether there is a critical power task in any power management sub-device or task; when a critical power task is detected and the target power state is a sleep state, during the processing time period of the critical power task, preventing the state switching of one or all sleep levels in the power sleep level, and prohibiting power off during the processing time period.

[0067] It should be noted that when a power status event is received and a state change is required, the embodiment of the present application should detect whether there is a critical power task in the power management sub-device or task and perform corresponding processing. The specific process of performing critical task detection and processing in the embodiment of the present application is as follows:

[0068] 1) Check the critical task list. If there is a critical task, maintain the existing power status while processing tasks not related to the critical task.

[0069] 2) The power state is waiting for key business processing to complete;

[0070] 3) Check the critical task list again and process all critical tasks in sequence.

[0071] Those skilled in the art should understand that, in the process of processing power-critical tasks, the embodiments of the present application will prevent the switching of one or all of the power sleep levels and the device from sleeping during the critical task processing time period. At the same time, it will also prohibit the device power from being powered off during the above-mentioned critical task processing time period. After the critical task processing is completed, the critical task can be released and the new critical task can be re-detected and processed.

[0072] Therefore, the embodiment of the present application prevents the execution of some tasks during the processing time period of the critical power task when a critical power task is detected and the target power state is the sleep state, so that non-sleep critical tasks can be detected when the power is turned off in sleep mode to ensure that the non-sleep tasks can be executed and completed, solving the problem of task incompleteness caused by the control unit forcing the power off, greatly improving the functional controllability and sequential controllability of various levels of sleep, power on and off processes, and ensuring the management accuracy of each sub-device subtask.

[0073] In step S103, the power state change event of the power management sub-device or task is broadcast to any power management sub-device or task, the target power state is sent to all power management sub-devices or tasks, and after the correct execution process is completed, the target power state is switched to.

[0074] After starting the correct execution process and completing all key tasks, the embodiment of the present application can further broadcast the power state change event and send the next power state to all power management sub-devices or tasks, that is, the client side, while waiting for the power state of the power management sub-device or task to receive the return message. After the power management sub-device or task receives the power state return information, it can execute the state switching operation to switch to the next power state.

[0075] Those skilled in the art should understand that traditional power management mainly uses MCU (Micro Controller Unit, single-chip microcomputer) to completely control the power of the device, and is unable to perform corresponding power management of processes, threads, services, etc. in the device system. The embodiment of the present application, as a service-type program executed in the CPU, can accurately manage and control the power of all power management sub-devices or tasks.

[0076] Therefore, the embodiment of the present application can notify each task or device to switch the relevant power state through the broadcast message, effectively solving the incompleteness of the timing of multiple devices and multiple tasks, and ensuring that the related processes are completed in an ideal logical order.

[0077] Optionally, in one embodiment of the present application, after broadcasting the power state change event of the power management sub-device or task to any power management sub-device or task, it also includes: determining whether the correct reception signal returned by the power state change event is received by all power management sub-devices or tasks; if the correct reception signal is received, allowing switching to the target power state.

[0078] It should be noted that after the critical task is completed, the power state switching event is broadcast, and the next power state is sent to all client ends, the embodiment of the present application can send a task success completion identifier to the circuit control, wait for the reception signal returned by the power state change event, and ensure that all power management sub-devices or tasks can correctly receive the power event to switch to the next power state. At the same time, the embodiment of the present application can also start processing the power state of the service itself until all power state switching parameters are processed.

[0079] Therefore, the embodiment of the present application notifies the client side of subsequent power state changes, waits for all connected client side tasks to complete successfully, and makes full preparations for the next power state switch, thereby effectively ensuring that the subtasks of each sub-device can correctly receive power events and the correct timing termination of multiple devices and multiple tasks; in addition, the embodiment of the present application also enables each subtask to be processed in the correct order of the established process, further ensuring the integrity of the correct processing of each subtask module.

[0080] Optionally, in one embodiment of the present application, before switching to the target power state, it also includes: detecting whether the correct execution process meets the preset power state execution exception conditions; when it is detected that the preset power state execution exception conditions are met, reporting the abnormal state, otherwise synchronizing all power states to the target power state.

[0081] Furthermore, after switching to the target power state, the embodiment of the present application can also detect whether there is a power state execution exception in the above-mentioned correct execution process based on the power state execution exception condition. If there is an exception, the abnormal state needs to be reported; if there is no exception, the embodiment of the present application can synchronize all power states to the new power state, execute power events, and switch to the required power state.

[0082] It should be noted that the above-mentioned abnormal conditions may be caused by the failure of judgment and processing flow somewhere in the program during execution. In the specific implementation process, technical personnel in this field may also set other power supply status execution abnormal judgment conditions according to actual conditions, and no specific restrictions are made here.

[0083] Therefore, the embodiments of the present application can determine whether the execution process meets the power state execution exception conditions to report the abnormal state or synchronize all power states required from the power state, thereby effectively solving the problem of termination of processes caused by system signals and improving the robustness and stability of the power management service.

[0084] The following will introduce the service-oriented power management method for a vehicle proposed in an embodiment of the present application with reference to the accompanying drawings.

[0085] Figure 3 FIG. 1 is a schematic diagram of the execution logic of the service-oriented power management method for a vehicle according to an embodiment of the present application. Figure 3 As shown, the execution steps of the vehicle service-oriented power management method are as follows:

[0086] S301: Power supply service starts to execute, go to S304;

[0087] S302: Power state event. When a client needs to change the power state, it connects to the server's external interface and sends a power event request to the power service. The power service receives the request and saves the event.

[0088] S303: Power management external interface;

[0089] S304: Power state reception, through the power management service to determine that after S302 received the power event, call the power new state processing function to process the new power state;

[0090] S305: Power management event processing;

[0091] S306: Power status processing;

[0092] S307: Key task registration and addition: first register the key task, then receive the key task processing, and then add the key task registration;

[0093] S308: Check and process key tasks: First, check the key tasks, then determine whether they exist. If not, go to S309. Otherwise, process the key tasks, release the key tasks, and recheck for new key tasks.

[0094] S309: Broadcast power events. When all key tasks are completed, broadcast the power events that need to be changed and ensure that all clients receive the power events correctly by receiving the correct reception signal returned.

[0095] S3010: Power state changes, processing the power state of the service itself until all power state switching parameters are processed;

[0096] S3011: Check the synchronous power supply status and detect whether the power supply status is abnormal. If abnormal, report the abnormal status.

[0097] S3012: Set the overall power state, synchronize all power states to the new power state, and execute power events;

[0098] S3013: Status transition completed.

[0099] According to the service-oriented power management method for a vehicle proposed in the embodiment of the present application, while receiving the power state change event of any power management sub-device or task, it receives the target power state sent by any power management sub-device or task based on the power event notification; based on the target power state, it detects the correct execution process between the current power state and the target power state of any power management sub-device or task, and starts the corresponding correct execution process of this power management sub-device or task; and broadcasts the power state change event of this power management sub-device or task to any power management sub-device or task, sends the target power state to all power management sub-devices or tasks, and switches to the target power state after the correct execution process ends. This application directly connects to each device and each process, manages and communicates with each task in a service manner, thereby ensuring that the tasks of each device can correctly receive power events, making the power states of multiple devices the same, effectively ensuring the orderliness of device sleep and power on and off, and the complete execution of various functions, and accurately managing the power of the corresponding sub-devices and tasks.

[0100] Next, a service-type processor for a vehicle according to an embodiment of the present application will be described with reference to the accompanying drawings.

[0101] Figure 4 It is a block diagram of a service processor of a vehicle according to an embodiment of the present application.

[0102] like Figure 4 As shown, the service processor 10 of the vehicle includes: a first receiving module 100 , a starting module 200 and a broadcasting module 300 .

[0103] The first receiving module 100 is configured to receive a power state change event of any power management sub-device or task, and receive a target power state sent by any power management sub-device or task based on a power event notification.

[0104] The starting module 200 is used to detect the correct execution process between the current power state and the target power state of any power management sub-device or task based on the target power state, and start the corresponding correct execution process of the power management sub-device or task.

[0105] The broadcast module 300 is used to broadcast the power state change event of the power management sub-device or task to any power management sub-device or task, send the target power state to all power management sub-devices or tasks, and switch to the target power state after the correct execution process is completed.

[0106] Optionally, in one embodiment of the present application, the service processor 10 of the vehicle in the embodiment of the present application further includes: a first detection module and a blocking module.

[0107] The first detection module is used to detect whether there is a critical power task in any power management sub-device or task after starting the corresponding correct execution process of the power management sub-device or task.

[0108] The blocking module is used to block the state switching of one or all power sleep levels during the processing time period of the critical power task when a critical power task is detected and the target power state is the sleep state, and prohibit power off during the processing time period.

[0109] Optionally, in one embodiment of the present application, the service processor 10 of the vehicle in the embodiment of the present application further includes: a second detection module and a query module.

[0110] The second detection module is configured to receive a registered critical task before detecting whether there is a critical power task in any power management sub-device or task.

[0111] The query module is configured to receive at least one critical task and add at least one critical task to a critical task list, so as to query the critical task list and determine a critical power task.

[0112] Optionally, in one embodiment of the present application, the service processor 10 of the vehicle in the embodiment of the present application further includes: a judgment module and a switching module.

[0113] The judgment module is used to judge whether the correct reception signal returned by the power state change event of all power management sub-devices or tasks is received after broadcasting the power state change event of the power management sub-device or task to any power management sub-device or task.

[0114] The switching module is configured to allow switching to a target power state if a correct reception signal is received.

[0115] Optionally, in one embodiment of the present application, the service processor 10 of the vehicle in the embodiment of the present application further includes: a second detection module and a synchronization module.

[0116] The second detection module is used to detect whether the correct execution process meets the preset power state execution abnormality condition before switching to the target power state.

[0117] The synchronization module is used to report the abnormal state when it is detected that the preset power state execution abnormal condition is met, otherwise synchronize all power states to the target power state.

[0118] It should be noted that the above explanation of the embodiment of the service-oriented power management method for a vehicle is also applicable to the service-oriented processor of the vehicle in this embodiment and will not be repeated here.

[0119] According to the service-type processor of the vehicle proposed in the embodiment of the present application, while receiving the power state change event of any power management sub-device or task, it receives the target power state sent by any power management sub-device or task based on the power event notification; based on the target power state, it detects the correct execution process between the current power state and the target power state of any power management sub-device or task, and starts the corresponding correct execution process of this power management sub-device or task; and broadcasts the power state change event of this power management sub-device or task to any power management sub-device or task, sends the target power state to all power management sub-devices or tasks, and switches to the target power state after the correct execution process ends. In this application, when one of the power state change sources initiates a device power state change event, the service-side related power state change preparation work is executed, and then the key tasks are processed according to the power service-related execution process. Subsequently, the power management service notifies each task or device through a broadcast message to switch the related power state, thereby ensuring that each device's task can correctly receive the power event, so that each task processes the state in the correct order of the established process, and accurately manages the power of the corresponding sub-devices and tasks.

[0120] Figure 5A schematic diagram of the structure of a vehicle provided in an embodiment of the present application. The vehicle may include:

[0121] Memory 501 , processor 502 , and computer programs stored in the memory 501 and executable on the processor 502 .

[0122] When the processor 502 executes the program, the service-oriented power management method for the vehicle provided in the above embodiment is implemented.

[0123] Furthermore, the vehicle further comprises:

[0124] The communication interface 503 is used for communication between the memory 501 and the processor 502 .

[0125] The memory 501 is used to store computer programs that can be run on the processor 502 .

[0126] The memory 501 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0127] If the memory 501, processor 502, and communication interface 503 are implemented independently, the communication interface 503, memory 501, and processor 502 can be connected to each other via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0128] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.

[0129] The processor 502 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0130] This embodiment also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned service-oriented power management method for a vehicle.

[0131] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0132] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Thus, a feature specified as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of this application, "N" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0133] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing a custom logical function or process step, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed in a different order than shown or discussed, including performing functions in a substantially simultaneous manner or in a reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application pertain.

[0134] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or N wires (electronic devices), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program can be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing it in other suitable ways as necessary, and then storing it in a computer memory.

[0135] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiment, the N steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0136] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0137] In addition, the functional units in the various embodiments of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into a module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0138] The storage medium mentioned above may be a read-only memory, a magnetic disk, or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application. Persons skilled in the art may make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. A service-oriented power management method for a vehicle, characterized in that: Executed in a service-type processor, the method comprises the following steps: While receiving a power state change event of any power management sub-device or task, receive a target power state sent by any power management sub-device or task based on a power event notification; Based on the target power state, detecting a correct execution flow between the current power state of any power management sub-device or task and the target power state, and starting the corresponding correct execution flow of the power management sub-device or task; and Broadcasting the power state change event of the power management sub-device or task to any power management sub-device or task, sending the target power state to all power management sub-devices or tasks, and switching to the target power state after completing the correct execution process; After starting the correct execution process corresponding to the power management sub-device or task, the method further includes: Detecting whether any of the power management sub-devices or tasks has a critical power task; When the critical power task is detected and the target power state is the sleep state, during the processing time period of the critical power task, the state switching of one or all sleep levels of the power supply is prevented, and power off is prohibited during the processing time period.

2. The method according to claim 1, characterized in that Before detecting whether any of the power management sub-devices or tasks has a critical power task, the method further includes: Receive registration key tasks; At least one critical task is received and added to a critical task list, so as to query the critical task list and determine the critical power task.

3. The method according to claim 1, characterized in that After broadcasting the power state change event of the power management sub-device or task to any power management sub-device or task, the method further includes: Determining whether a correct reception signal returned by the power state change event for all the power management sub-devices or tasks is received; If the correct reception signal is received, switching to the target power state is permitted.

4. The method according to claim 1, wherein Before switching to the target power state, the method further includes: Detecting whether the correct execution process meets a preset power state execution abnormality condition; When it is detected that the preset power state execution abnormal condition is met, the abnormal state is reported; otherwise, all power states are synchronized to the target power state.

5. A service-type processor for a vehicle, characterized in that: include: A first receiving module is configured to receive a power state change event of any power management sub-device or task and a target power state sent by the power management sub-device or task based on a power event notification; a startup module, configured to detect a correct execution flow between the current power state of any power management sub-device or task and the target power state based on the target power state, and to start the corresponding correct execution flow of the power management sub-device or task; as well as a broadcast module, configured to broadcast the power state change event of the power management sub-device or task to any power management sub-device or task, and send the target power state to all power management sub-devices or tasks, so that after completing the correct execution process, they will switch to the target power state; The vehicle's service processor further includes: A first detection module is configured to detect whether there is a critical power task in any power management sub-device or task after starting the correct execution process corresponding to the power management sub-device or task; The blocking module is used to block the state switching of one or all power sleep levels during the processing time period of the critical power task when the critical power task is detected and the target power state is the sleep state, and prohibit power off during the processing time period.

6. The service-type processor of a vehicle according to claim 5, characterized in that: Also includes: A second detection module is configured to receive a registered critical task before detecting whether there is a critical power task in any power management sub-device or task; The query module is configured to receive at least one critical task and add the at least one critical task to a critical task list, so as to query the critical task list and determine the critical power task.

7. The service processor of a vehicle according to claim 5, characterized in that Also includes: a determination module, configured to determine whether a correct reception signal returned by the power state change event from all power management sub-devices or tasks is received after broadcasting the power state change event of the power management sub-device or task to any power management sub-device or task; The switching module is configured to allow switching to the target power state if the correct reception signal is received.

8. The service processor of a vehicle according to claim 5, characterized in that Also includes: A second detection module is used to detect whether the correct execution process meets a preset power state execution abnormality condition before switching to the target power state; The synchronization module is configured to report an abnormal state when it is detected that the preset power state execution abnormal condition is met, and otherwise synchronize all power states to the target power state.

9. A vehicle, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the service-oriented power management method for a vehicle as claimed in any one of claims 1 to 4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the service-oriented power management method for a vehicle as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method of managing power request during cluster operations

    CN112912848A

  • Power management method and device and computer readable storage medium

    CN115476795A