Vehicle power supply state determination method and device, electronic equipment and storage medium
By setting up a power service module and a preset state machine in the vehicle operating system, the problem of simple vehicle power state determination logic in the prior art is solved, and efficient and clear power state management and conversion logic are realized.
Patent Information
- Application Number
- CN202510124874.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2045-01-27
AI Technical Summary
In the prior art, the vehicle power state determination logic is simple and cannot be applied to complex scenarios, which makes it difficult to efficiently represent and manage multiple power states and their conversion relationships.
A power service module is set up in the first vehicle operating system of the vehicle, and the vehicle is received by the on-board microcontroller, and the information is input to the preset state machine, and the state of the state machine is converted according to the state transition conditions, thereby determining the vehicle power state.
The vehicle power state is determined through a state machine, which clarifies the logical transition between each state, improves the efficiency and clarity of power state determination, making it easy to use.
Smart Images

Figure CN119568042A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart vehicle technology, and in particular to a method, device, electronic device and storage medium for determining a vehicle power status. Background Art
[0002] As the degree of automobile electrification increases, people's requirements for automobile intelligence are getting higher and higher, and the concept of automobile intelligent cockpit has emerged. Generally speaking, the intelligent cockpit includes the central control system, full LCD instrument, in-vehicle infotainment system, HUD (Head Up Display), rear seat entertainment system, car networking system, etc. Each system interacts through the in-vehicle network system and is powered by the car's power system.
[0003] For different power supply states of the car, the vehicle system needs to control its own functions according to these states to control the current consumption and prevent the car battery from running out of power. Among the related technologies, only the Android system provides a native power management module, which determines and distributes the power state through flags. When the number of power states increases and the logic of mutual conversion is more complicated, the flag method cannot efficiently represent multiple power states and their conversion relationships. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a vehicle power status determination method, device, electronic device and storage medium to solve the problem that the vehicle power status determination logic in the prior art is simple and cannot be applied to complex scenarios.
[0005] In a first aspect of an embodiment of the present application, a method for determining a vehicle power state is provided. The method is performed by a power service module, which is a custom module in a first vehicle operating system. The method includes: receiving vehicle event information from an on-vehicle microcontroller and inputting the vehicle event information into a preset state machine; Get the current state of the preset state machine; In response to determining that the vehicle event information satisfies a state transition condition of the current state, converting the state of the preset state machine to a target state; The target state is determined to be a vehicle power state.
[0006] According to a second aspect of an embodiment of the present application, a vehicle power state determination device is provided, comprising: a communication module configured to receive vehicle event information from the vehicle-mounted microcontroller and input the vehicle event information into a preset state machine, the preset state machine being a state machine originally set in the power service module, the power service module being a custom module in the first vehicle operating system; a processing module configured to obtain a current state of a preset state machine, and in response to determining that the vehicle event information satisfies a state transition condition of the current state, convert the state of the preset state machine to a target state; The determination module is configured to determine that the target state is a vehicle power state.
[0007] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0008] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0009] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application set a power service module in the first vehicle operating system of the vehicle, use the power service module to receive vehicle event information from the on-board microcontroller, and input the received vehicle event information into a preset state machine. When the vehicle event information meets the state transition condition of the current state of the preset state machine, the state of the preset state machine is converted to a target state, and then the target state is determined to be the vehicle power state, thereby realizing the use of the state machine to determine and identify the vehicle power state, with clear logical transitions between states and clear state identification, thereby improving the efficiency of determining the vehicle power state, and the determined vehicle power state is clear and intuitive, and easy to use. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0011] Figure 1 It is a schematic diagram of the Android native power management architecture.
[0012] Figure 2 It is a flow chart of a method for determining a vehicle power status provided in an embodiment of the present application.
[0013] Figure 3 It is a flowchart of a method provided in an embodiment of the present application for converting the state of a preset state machine to a target state in response to determining that vehicle event information satisfies a state transition condition of a current state.
[0014] Figure 4It is a flow chart of another method for determining the vehicle power status provided in an embodiment of the present application.
[0015] Figure 5 It is a system structure diagram for implementing the vehicle power status determination method provided in the embodiment of the present application.
[0016] Figure 6 It is another system structure diagram for implementing the vehicle power status determination method provided in the embodiment of the present application.
[0017] Figure 7 It is a schematic diagram of a vehicle power status determination device provided in an embodiment of the present application.
[0018] Figure 8 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0020] A method and device for determining a vehicle power status according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0021] As mentioned above, the various systems in the smart cockpit interact with each other through the vehicle network system and are powered by the car's power system. Normally, the car key has four gears, corresponding to the four power supply states of the car, namely OFF, ACC (Accessory), ON and START. The OFF gear disconnects the car's power supply (at this time, some electronic devices are still powered for controlling the car, such as locking the door), the ACC gear does not start the car but can power some electrical appliances in the car, including the full LCD instrument and the in-vehicle infotainment system, etc. The ON gear powers all electrical appliances in the car, and the START gear is a self-resetting switch, which automatically returns to the ON gear after starting the car.
[0022] For different power supply states of the car, the vehicle system needs to control its own functions according to these states to control the current consumption and prevent the car battery from running out of power. Usually, the car will convert these power supply states into software-defined working modes, including sleep, standby, ACC OFF / ON, IGN (Ignition) OFF / ON, etc., and notify the vehicle system through a professional MCU (Microcontroller Unit) so that the vehicle system can control its own behavior in different working modes.
[0023] On the other hand, as a software system, it usually includes shutdown, sleep, startup and normal operation states, which can be called the power state of the vehicle system to distinguish the working modes mentioned above. In addition to the above working modes and power states, the vehicle system also needs to process other information, such as input voltage, operating temperature, power saving mode, etc., so that the system can operate in the expected way.
[0024] In order to process the above-mentioned various types of power-related information in a unified way, the information involved in power management can be divided into the following three categories, each of which has its own separate processing method: 1) System power status: The system power on and off status is used as the system power status. The power status can be used to control the power on and off process of the system application layer; 2) System working mode: The system operation mode customized according to the status of the vehicle signal can be called the working mode, such as the standby mode, remote control mode and normal working mode. Different power states can correspond to different working modes; 3) Vehicle signal: Vehicle and system related information other than system on / off and working mode can be collectively referred to as vehicle signals. For example, the input voltage status of the vehicle computer and various power saving status in the system power saving strategy can be processed as vehicle signals to distinguish the working mode. In addition, ACC ON / OFF, IGN ON / OFF and hardware temperature information can also be processed as vehicle signals as needed. Different power states can correspond to different vehicle signals.
[0025] Among the related technologies, only the Android system provides a native power management architecture. Figure 1 This is a schematic diagram of the Android native power management architecture. Figure 1As shown in the figure, the Android native power management architecture includes user space, framework space, system space and kernel space. The user space includes the vehicle power management module, the framework space includes the vehicle service module (CarService), and the vehicle service module may include the vehicle power management service module (CarPowerManagerService). The user's operation in the vehicle power management module can be transmitted to the vehicle power management service module.
[0026] The system space may include a vehicle power policy monitoring interface (CarPowerPlicyDaemon). The vehicle power policy monitoring interface interacts with the hardware abstraction layer (VHAL). The hardware abstraction layer may also be connected to the vehicle power management service module and the vehicle processor.
[0027] The kernel space may include a suspend interface and a resume interface, which may be called by the vehicle power management service and connected to the vehicle power policy monitoring interface. The resume interface may also be connected to the vehicle processor.
[0028] In the Android native power management architecture, the vehicle's power state is usually identified by a flag bit, for example, multiple flag bits are set, and different values of each flag bit correspond to a different power state. However, with the development of vehicle technology, there may be more and more working modes of the vehicle, and different working modes may need to correspond to different power states, resulting in an increasing number of power states and increasingly complex logical conversions between different power states. At this time, if flag bits are still used to identify the vehicle power, on the one hand, a large number of flag bits need to be set, which increases the development cost, and on the other hand, the logical conversion relationship between the flag bits needs to be set, which will also increase the difficulty of development and maintenance.
[0029] In view of this, an embodiment of the present application provides a method for determining a vehicle power status, by setting a power service module in a first vehicle operating system of the vehicle, using the power service module to receive vehicle event information from an on-board microcontroller, and inputting the received vehicle event information into a preset state machine, when the vehicle event information meets the state transition condition of the current state of the preset state machine, the state of the preset state machine is converted to a target state, and then the target state is determined to be the vehicle power status, thereby realizing the use of a state machine to determine and identify the vehicle power status, with clear logical transitions between states and clear status identification, thereby improving the efficiency of determining the vehicle power status, and the determined vehicle power status is clear and intuitive, and easy to use.
[0030] Figure 2FIG. 1 is a flow chart of a method for determining a vehicle power status provided by an embodiment of the present application. Figure 2 As shown, the method comprises the following steps: In step S201 , vehicle event information is received from the vehicle-mounted microcontroller, and the vehicle event information is input into a preset state machine.
[0031] In step S202, the current state of the preset state machine is obtained.
[0032] In step S203 , in response to determining that the vehicle event information satisfies the state transition condition of the current state, the state of the preset state machine is transitioned to the target state.
[0033] In step S204, it is determined that the target state is the vehicle power state.
[0034] In some embodiments of the present application, the method may be executed by a power service module, which is a custom module in the first vehicle operating system. In one example, the first vehicle operating system may be, for example, a vehicle cabin entertainment operating system.
[0035] In some embodiments of the present application, the power service module may receive vehicle event information from the vehicle-mounted microcontroller and input the vehicle event information into a preset state machine. The preset state machine may be a state machine pre-set in the power service module, and its state and state transition conditions are pre-configured according to the actual application scenario.
[0036] In some embodiments of the present application, the power service module may also obtain the current state of the preset state machine, and determine whether the vehicle event information it receives satisfies the state transition condition of the current state, and if so, executes the state transition to convert the state of the state machine to the target state. The target state may be the state to which the preset state machine needs to transition from the current state when the state transition condition corresponding to the vehicle event information is met.
[0037] In one example, the determined target state can be used as the current vehicle power state. Before receiving vehicle event information next time and updating the vehicle power state based on the vehicle event information, the power service module can save or distribute the vehicle power state. After receiving vehicle event information and updating the vehicle power state based on the vehicle event information, the power service module can save or distribute the updated vehicle power state.
[0038] According to the technical solution provided in the embodiment of the present application, a power service module is set in the first vehicle operating system of the vehicle, and the power service module is used to receive vehicle event information from the on-board microcontroller, and the received vehicle event information is input into a preset state machine. When the vehicle event information meets the state transition condition of the current state of the preset state machine, the state of the preset state machine is converted to a target state, and then the target state is determined to be the vehicle power state. The state machine is used to determine and identify the vehicle power state, the logical transitions between the states are clear, the state identification is clear, the efficiency of determining the vehicle power state is improved, and the determined vehicle power state is clear and intuitive, which is easy to use.
[0039] In some implementations, the preset state machine can be represented by a directed graph to intuitively display the vehicle power state and the context of the vehicle power state, that is, the transition path of the vehicle power state, so as to achieve efficient power state management while ensuring the real-time and reliability of vehicle system operation.
[0040] In some embodiments of the present application, the states in the preset state machine include at least one of the following: sleep state; vehicle power-on state; manned driving state; unmanned mode state; remote upgrade mode state; local upgrade mode state; ready to shut down state; system initial startup state.
[0041] Figure 3 1 is a flow chart of a method for converting a state of a preset state machine to a target state in response to determining that vehicle event information satisfies a state conversion condition of a current state provided by an embodiment of the present application. Figure 3 As shown, the method comprises the following steps: In step S301, in response to determining that the current state of the preset state machine is the vehicle power-on state or the system initial startup state, and the vehicle event information is the sleep event information, the preset state machine is switched to the sleep state.
[0042] In step S302, in response to determining that the current state of the preset state machine is any one of the sleep state, manned driving state, unmanned mode state, remote upgrade mode state, local upgrade mode state, ready to shut down state and system initial startup state, and the vehicle event information is vehicle power-on event information, the preset state machine is switched to the vehicle power-on state.
[0043] In step S303, in response to determining that the current state of the preset state machine is any one of the vehicle power-on state, unmanned mode state, remote upgrade mode state, local upgrade mode state and system initial startup state, and the vehicle event information is manned driving event information, the preset state machine is switched to the manned driving state.
[0044] In step S304, in response to determining that the current state of the preset state machine is any one of the vehicle power-on state, manned driving state, remote upgrade mode state and system initial startup state, and the vehicle event information is unmanned mode event information, the preset state machine is switched to the unmanned mode state.
[0045] In step S305 , in response to determining that the current state of the preset state machine is the unmanned mode state or the system initial startup state, and the vehicle event information is the remote upgrade mode event information, the preset state machine is switched to the remote upgrade mode state.
[0046] In step S306, in response to determining that the current state of the preset state machine is a manned driving state or a system initial startup state, and the vehicle event information is local upgrade mode event information, the preset state machine is switched to the local upgrade mode state.
[0047] In step S307 , in response to determining that the current state of the preset state machine is a dormant state or a system initial startup state, and the vehicle event information is a ready-to-shutdown event information, the preset state machine is switched to a ready-to-shutdown state.
[0048] In step S308, in response to determining that the current state of the preset state machine is any one of the sleep state, vehicle power-on state, manned driving state, unmanned mode state, remote upgrade mode state, local upgrade mode state and ready-to-shutdown state, and the vehicle event information is system initial startup event information, the preset state machine is switched to the system initial startup state.
[0049] In some embodiments of the present application, the states of the preset state machine may have the following logical conversion relationship: If the current state of the preset state machine is the vehicle power-on state or the system initial startup state, and the vehicle event information is the sleep event information, the preset state machine can be switched to the sleep state.
[0050] If the current state of the preset state machine is any of the following states: sleep state, manned driving state, unmanned mode state, remote upgrade mode state, local upgrade mode state, ready to shut down state and system initial startup state, and the vehicle event information is vehicle power-on event information, the preset state machine can be switched to the vehicle power-on state.
[0051] If the current state of the preset state machine is any of the vehicle power-on state, unmanned mode state, remote upgrade mode state, local upgrade mode state and system initial startup state, and the vehicle event information is manned driving event information, the preset state machine can be switched to the manned driving state.
[0052] If the current state of the preset state machine is any of the vehicle power-on state, manned driving state, remote upgrade mode state and system initial startup state, and the vehicle event information is unmanned mode event information, the preset state machine can be switched to the unmanned mode state.
[0053] If the current state of the preset state machine is the unmanned mode state or the system initial startup state, and the vehicle event information is the remote upgrade mode event information, the preset state machine can be switched to the remote upgrade mode state.
[0054] If the current state of the preset state machine is a driven state or a system initial startup state, and the vehicle event information is local upgrade mode event information, the preset state machine can be switched to the local upgrade mode state.
[0055] If the current state of the preset state machine is a dormant state or a system initial startup state, and the vehicle event information is a prepare-to-shutdown event information, the preset state machine may be switched to a prepare-to-shutdown state.
[0056] If the current state of the preset state machine is any of the following states: sleep state, vehicle power-on state, manned driving state, unmanned mode state, remote upgrade mode state, local upgrade mode state, and ready-to-shutdown state, and the vehicle event information is system initial startup event information, the preset state machine can be switched to the system initial startup state.
[0057] In this way, a clear and efficient vehicle power state transition logic can be provided, thereby improving the efficiency of vehicle power state determination and management.
[0058] In some embodiments of the present application, receiving vehicle event information from an on-board microcontroller may be that a distributed bus in a first vehicle operating system receives the vehicle event information from a custom vehicle service module of a second vehicle operating system, and the custom vehicle service module of the second vehicle operating system obtains the vehicle event information from the on-board microcontroller.
[0059] The first vehicle operating system and the second vehicle operating system are two different operating systems obtained by dividing the same system on chip SOC using virtualization technology. For example, the first vehicle operating system and the second vehicle operating system can be two different systems obtained by dividing the same SoC (System on Chip) chip using Hypervisor. The first vehicle operating system can be a cockpit entertainment operating system, which can be an Android operating system; the second vehicle operating system can be an instrument system operating system, which can be a QNX (Fast UNIX) or Linux operating system.
[0060] In some embodiments of the present application, the power service module may also perform different operations according to different states of a preset state machine to assist in power management, thereby improving the efficiency of determining the vehicle power state when the vehicle power state is updated.
[0061] In one example, when the current state of the preset state machine is any state, the power service module can perform the following operations: in response to receiving a vehicle ignition event, receive vehicle ignition status information; and in response to receiving a system on chip SOC heartbeat event, send a heartbeat message to a second vehicle operating system.
[0062] In other embodiments, the power service module may also execute multiple operations of sending notification messages to the second vehicle operating system when the preset state machine is in different states.
[0063] For example, if the current state of the preset state machine is a sleep state, and the power service module receives an event notifying the system on chip SOC to enter a sleep state, the power service module may notify the second vehicle operating system to enter a sleep process.
[0064] Alternatively, if the current state of the preset state machine is any of the following states: sleep state, power-on state, manned driving state, unmanned mode state, remote upgrade mode state, local upgrade mode state, ready to shut down state, and system initial startup state, and the power service module receives a notification of a system-on-chip SOC shutdown event, the power service module can notify the second vehicle operating system to enter the shutdown process.
[0065] Alternatively, if the current state of the preset state machine is any of the power-on state, manned driving state, unmanned mode state and system initial startup state, and the power service module receives a notification event that the system on chip SOC is currently being upgraded, the power service module can notify the second vehicle operating system that it is currently being upgraded.
[0066] For example, the current state of the preset state machine is any one of the power-on state, manned driving state, unmanned mode state, remote upgrade mode state, local upgrade mode state and system initial startup state, and the power service module receives a notification that the system on chip SOC has currently exited the upgrade event, the power service module can notify the second vehicle operating system that it has currently exited the upgrade.
[0067] For another example, if the current state of the preset state machine is the system initial startup state, and the power service module receives a startup completion message of the second vehicle operating system, the power service module can send a startup completion message to the second vehicle operating system.
[0068] Alternatively, if the current state of the preset state machine is the system initial startup state, and the power service module receives a heartbeat message from the system on chip (SOC), the power service module may send a heartbeat message to the second vehicle operating system.
[0069] That is to say, if the dormant state of the preset state machine is recorded as StrState, the vehicle power-on state is recorded as PowerOnState, the manned driving state is recorded as DrivingState, the unmanned mode state is recorded as RemoteState, the remote upgrade mode state is recorded as RemoteOtaState, the local upgrade mode state is recorded as LocalOtaState, the ready shutdown state is recorded as PowerOffState, and the system initial startup state is recorded as AndroidStartupState, then in the StrState state, the first vehicle operating system is in a dormant state, and the preset state machine switches to the StrState state when executing the processing device control ProcessDeviceControl action and the device enable of the StrState mode. In this state, the first vehicle operating system mainly handles the following events:
[0070] Among them, IGN stands for Ignition and QNX is the second vehicle operating system.
[0071] In the PowerOnState state, the first vehicle operating system is in a powered-on state, and the preset state machine switches to the PowerOnState state when executing the ProcessDeviceControl action and the device enabling of the PowerOnState mode. In this state, the first vehicle operating system mainly handles the following events:
[0072] In the DrivingState state, the first vehicle operating system is in a manned driving state, and the preset state machine switches to the DrivingState state when executing the ProcessDeviceControl action and the device enabling of the DrivingState mode. In this state, the first vehicle operating system mainly handles the following events:
[0073] In the RemoteState state, the first vehicle operating system is in the unmanned mode state. The preset state machine switches to the RemoteState state when executing the ProcessDeviceControl action and the device enabling of the RemoteState mode. In this state, the first vehicle operating system mainly handles the following events:
[0074] In the RemoteOtaState state, the first vehicle operating system is in the remote upgrade mode state. The preset state machine switches to the RemoteOtaState state when executing the ProcessDeviceControl action and the device enabling of the RemoteOtaState mode. In this state, the first vehicle operating system mainly handles the following events:
[0075] In the LocalOtaState state, the first vehicle operating system is in the local upgrade mode state. The preset state machine switches to the LocalOtaState state when executing the ProcessDeviceControl action of the processing device control and the device enabling of the LocalOtaState mode. In this state, the first vehicle operating system mainly handles the following events:
[0076] In the PowerOffState state, the first vehicle operating system is in a state of preparing to shut down. The preset state machine switches to the PowerOffState state when executing the ProcessDeviceControl action of the processing device control and the device enabling of the PowerOffState mode. In this state, the first vehicle operating system mainly handles the following events:
[0077] In the AndroidStartupState state, the first vehicle operating system is in the system initial startup state. The preset state machine switches to the AndroidStartupState state when executing the ProcessDeviceControl action and the device enabling of the AndroidStartupState mode. In this state, the first vehicle operating system mainly handles the following events:
[0078] In this way, the state machine can be used to provide a visualized vehicle power status, and the current state source of the vehicle power status is clear. The state machine can also be used to deduce the correctness of the vehicle power model, making subsequent maintenance convenient and efficient.
[0079] Figure 4 is a flow chart of another method for determining the vehicle power status provided by an embodiment of the present application. Figure 4 Steps S401 to S404 in the embodiment shown are Figure 2 Steps S201 to S204 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 4 As shown, the method also includes the following steps: In step S405, the vehicle power status is sent to the functional module or application module of the first vehicle operating system, so that each functional module and application module determines the working mode or interface display mode of the vehicle based on the vehicle power status.
[0080] In some embodiments of the present application, the power service module can also distribute the determined vehicle power status to the functional module or application module of the first vehicle operating system, so that each functional module and application module determines the vehicle's operating mode or interface display mode based on the vehicle power status.
[0081] Figure 5 is a system structure diagram for implementing the vehicle power state determination method provided in the embodiment of the present application. Figure 5 As shown, the system includes an application module, a power service module, a distributed bus, other operating systems and an MCU. The application module is an upper layer application in the first operating system, such as a cockpit entertainment application in a cockpit entertainment operating system. Other operating systems are, for example, the QNX system of the second vehicle operating system.
[0082] The power service module is a custom module, which is the core management module of power management. This module can be responsible for class initialization, configuration loading, signal reception and forwarding, etc.
[0083] FDbus (distributed bus) is an inter-domain communication service, used to receive all CAN (Controller Area Network) signals (including power management status signals) transmitted from the QNX side. The signal source is the MCU, but it must be transmitted to the Android side through the vehicle service module, because the same signal and status are also needed by the QNX side system and Android, so a signal transmission chain MCU—>QNX (vehicle service module)—>Android (FDbus) is designed here. The design of this link makes the signal link unidirectional and closed-loop, and the link is also short. The QNX system starts faster than Android, and the vehicle service module design on the QNX side can also well meet the signal needs when the QNX system starts.
[0084] MCU can be the microcontroller of the cockpit domain controller of the vehicle electronic system, which is responsible for the tasks of uplink and downlink data transparent transmission processing of vehicle signals, power management tasks, cockpit domain controller peripherals and vehicle SoC (System on Chip) main chip power supply tasks. In other words, the vehicle MCU can realize the control and management of various functions such as the engine, transmission system, body electronic system, safety system and infotainment system.
[0085] Figure 6 FIG. 1 is another system structure diagram for implementing the vehicle power state determination method provided in the embodiment of the present application. Figure 6 As shown, the system includes other operating systems, distributed buses, power service modules, AIDL (Android interface definition language module), SDK (Software Development Kit) and application modules.
[0086] Among them, the power service module may include a preset state machine, and the preset state machine may include a StrState state, a PowerOnState state, a DrivingState state, a RemoteState state, a RemoteOtaState state, a LocalOtaState state, a PowerOffState state and an AndroidStartupState state.
[0087] The power state determined in the preset state machine can be sent by the power service module to the application module through AIDL, SDK and other modules, so that the application module uses the power state to determine the working mode or display the power state.
[0088] For example, if the user turns on the ignition key or clicks the one-button start button, the Gateway (vehicle gateway) will pass the signal to the MCU via the CAN bus, and the vehicle power state is PowerOnState. The MCU can pass the PowerOnState signal to QNX, and then report the signal state to the QNX-side application and service to know that the vehicle is in PowerOnState at this time, and can respond to some business scenarios under PowerOnState, such as playing a welcome audio, etc.
[0089] On the other hand, this signal can also be passed to the Fdbus service on the Android side, and the Fdbus service will then pass the power status signal to the power service module. The power service module will perform the overall power status management work on the Android side and report the corresponding power status to the Android side applications and services to meet the Android side's needs for power management status monitoring.
[0090] By adopting the technical solution provided in the embodiment of the present application and using a power state machine to manage the vehicle power state, efficient power management can be achieved while ensuring the real-time performance and reliability of the system.
[0091] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0092] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0093] Figure 7 Schematic diagram of a vehicle power status determination device provided by an embodiment of the present application. Figure 7 As shown, the device comprises: The communication module 701 is configured to receive vehicle event information from the vehicle-mounted microcontroller and input the vehicle event information into a preset state machine, which is a state machine originally set in the power service module, and the power service module is a custom module in the first vehicle operating system.
[0094] The processing module 702 is configured to obtain the current state of the preset state machine, and in response to determining that the vehicle event information satisfies the state transition condition of the current state, convert the state of the preset state machine into a target state.
[0095] The determination module 703 is configured to determine that the target state is a vehicle power state.
[0096] According to the technical solution provided in the embodiment of the present application, a power service module is set in the first vehicle operating system of the vehicle, and the power service module is used to receive vehicle event information from the on-board microcontroller, and the received vehicle event information is input into a preset state machine. When the vehicle event information meets the state transition condition of the current state of the preset state machine, the state of the preset state machine is converted to a target state, and then the target state is determined to be the vehicle power state. The state machine is used to determine and identify the vehicle power state, the logical transitions between the states are clear, the state identification is clear, the efficiency of determining the vehicle power state is improved, and the determined vehicle power state is clear and intuitive, which is easy to use.
[0097] In some embodiments, the states in the preset state machine include at least one of the following: sleep state; vehicle power-on state; manned driving state; unmanned mode state; remote upgrade mode state; local upgrade mode state; ready to shut down state; system initial startup state.
[0098] In some embodiments, in response to determining that vehicle event information satisfies a state transition condition of a current state, converting the state of a preset state machine to a target state includes: in response to determining that the current state of the preset state machine is a vehicle power-on state or a system initial startup state, and the vehicle event information is sleep event information, switching the preset state machine to a sleep state; in response to determining that the current state of the preset state machine is any of a sleep state, a manned driving state, an unmanned mode state, a remote upgrade mode state, a local upgrade mode state, a ready-to-shutdown state, and a system initial startup state, and the vehicle event information is vehicle power-on event information, switching the preset state machine to a vehicle power-on state; in response to determining that the current state of the preset state machine is any of a vehicle power-on state, an unmanned mode state, a remote upgrade mode state, a local upgrade mode state, and a system initial startup state, and the vehicle event information is vehicle power-on event information, switching the preset state machine to a manned driving state; in response to determining that the current state of the preset state machine is any of a vehicle power-on state, an unmanned mode state, a remote upgrade mode state, a local upgrade mode state, and a system initial startup state, and the vehicle event information is manned driving event information. In any state of the initial startup state, and the vehicle event information is unmanned mode event information, the preset state machine is switched to the unmanned mode state; in response to determining that the current state of the preset state machine is the unmanned mode state or the system initial startup state, and the vehicle event information is the remote upgrade mode event information, the preset state machine is switched to the remote upgrade mode state; in response to determining that the current state of the preset state machine is the manned driving state or the system initial startup state, and the vehicle event information is the local upgrade mode event information, the preset state machine is switched to the local upgrade mode state; in response to determining that the current state of the preset state machine is the sleep state or the system initial startup state, and the vehicle event information is the prepare to shut down event information, the preset state machine is switched to the prepare to shut down state; in response to determining that the current state of the preset state machine is any state among the sleep state, vehicle power-on state, manned driving state, unmanned mode state, remote upgrade mode state, local upgrade mode state and prepare to shut down state, and the vehicle event information is the system initial startup event information, the preset state machine is switched to the system initial startup state.
[0099] In some embodiments, the step of receiving vehicle event information from an on-board microcontroller is as follows: a distributed bus in a first vehicle operating system receives vehicle event information from a custom vehicle service module of a second vehicle operating system, and the custom vehicle service module of the second vehicle operating system obtains vehicle event information from the on-board microcontroller; wherein the first vehicle operating system and the second vehicle operating system are two different operating systems divided in the same system-on-chip SOC using virtualization technology.
[0100] In some embodiments, in response to determining that the current state of the preset state machine is any state, the power service module also performs the following operations: in response to receiving a vehicle ignition event, receiving vehicle ignition status information; in response to receiving a system on chip SOC heartbeat event, sending a heartbeat message to a second vehicle operating system.
[0101] In some embodiments, the power service module further performs the following operations: in response to determining that the current state of the preset state machine is a sleep state, and the power service module receives a notification event of the system on chip SOC entering a sleep state, notifying the second vehicle operating system to enter a sleep process; in response to determining that the current state of the preset state machine is any one of the sleep state, the power-on state, the manned driving state, the unmanned mode state, the remote upgrade mode state, the local upgrade mode state, the ready-to-shutdown state, and the system initial startup state, and the power service module receives a notification event of the system on chip SOC shutdown, notifying the second vehicle operating system to enter a shutdown process; in response to determining that the current state of the preset state machine is any one of the power-on state, the manned driving state, the unmanned mode state, and the system initial startup state, and the power service module receives a notification event of the system on chip SOC shutdown. C is currently upgrading event, notifying the second vehicle operating system that the upgrade is currently in progress; in response to determining that the current state of the preset state machine is any one of the power-on state, manned driving state, unmanned mode state, remote upgrade mode state, local upgrade mode state and system initial startup state, and the power service module receives the notification event that the system on chip SOC has currently exited the upgrade, notifying the second vehicle operating system that the upgrade has currently exited; in response to determining that the current state of the preset state machine is the system initial startup state, and the power service module receives the second vehicle operating system startup completion message, sending the startup completion message to the second vehicle operating system; in response to determining that the current state of the preset state machine is the system initial startup state, and the power service module receives the system on chip SOC heartbeat message, sending a heartbeat message to the second vehicle operating system.
[0102] In some embodiments, after determining the vehicle power status, it also includes: sending the vehicle power status to a functional module or application module of a first vehicle operating system, so that each functional module and application module determines the vehicle's operating mode or interface display mode based on the vehicle power status.
[0103] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0104] Figure 8 Schematic diagram of an electronic device provided in an embodiment of the present application. Figure 8As shown, the electronic device 8 of this embodiment includes: a processor 801, a memory 802, and a computer program 803 stored in the memory 802 and executable on the processor 801. When the processor 801 executes the computer program 803, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 801 executes the computer program 803, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0105] The electronic device 8 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 8 may include, but is not limited to, a processor 801 and a memory 802. Those skilled in the art will appreciate that Figure 8 The electronic device 8 is merely an example and does not limit the electronic device 8 . The electronic device 8 may include more or fewer components than those shown in the figure, or different components.
[0106] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0107] The memory 802 may be an internal storage unit of the electronic device 8, for example, a hard disk or memory of the electronic device 8. The memory 802 may also be an external storage device of the electronic device 8, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 8. The memory 802 may also include both an internal storage unit of the electronic device 8 and an external storage device. The memory 802 is used to store computer programs and other programs and data required by the electronic device.
[0108] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0109] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0110] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for determining a vehicle power state, characterized in that: The method is performed by a power service module, which is a custom module in the first vehicle operating system; The method comprises: receiving vehicle event information from an on-vehicle microcontroller and inputting the vehicle event information into a preset state machine; Obtaining the current state of the preset state machine; In response to determining that the vehicle event information satisfies a state transition condition of the current state, converting the state of the preset state machine to a target state; The target state is determined to be a vehicle power state.
2. The method according to claim 1, characterized in that: The state in the preset state machine includes at least one of the following: Dormant state; Vehicle power-on status; Manned driving status; Unmanned mode status; Remote upgrade mode status; Local upgrade mode status; Prepare to shut down; The system is in initial startup state.
3. The method according to claim 2, characterized in that In response to determining that the vehicle event information satisfies the state transition condition of the current state, converting the state of the preset state machine to a target state includes: In response to determining that the current state of the preset state machine is a vehicle power-on state or a system initial startup state, and the vehicle event information is a sleep event information, switching the preset state machine to a sleep state; In response to determining that the current state of the preset state machine is any one of a sleep state, a manned driving state, an unmanned mode state, a remote upgrade mode state, a local upgrade mode state, a ready-to-shutdown state, and a system initial startup state, and the vehicle event information is vehicle power-on event information, switching the preset state machine to a vehicle power-on state; In response to determining that the current state of the preset state machine is any one of a vehicle power-on state, an unmanned mode state, a remote upgrade mode state, a local upgrade mode state, and a system initial startup state, and the vehicle event information is a manned driving event information, switching the preset state machine to a manned driving state; In response to determining that the current state of the preset state machine is any one of a vehicle power-on state, a manned driving state, a remote upgrade mode state, and a system initial startup state, and the vehicle event information is unmanned mode event information, switching the preset state machine to an unmanned mode state; In response to determining that the current state of the preset state machine is an unmanned mode state or a system initial startup state, and the vehicle event information is remote upgrade mode event information, switching the preset state machine to a remote upgrade mode state; In response to determining that the current state of the preset state machine is a manned driving state or a system initial startup state, and the vehicle event information is local upgrade mode event information, switching the preset state machine to a local upgrade mode state; In response to determining that the current state of the preset state machine is a dormant state or a system initial startup state, and the vehicle event information is a ready-to-shutdown event information, switching the preset state machine to a ready-to-shutdown state; In response to determining that the current state of the preset state machine is any one of a sleep state, a vehicle power-on state, a manned driving state, an unmanned mode state, a remote upgrade mode state, a local upgrade mode state, and a ready-to-shutdown state, and the vehicle event information is system initial startup event information, the preset state machine is switched to the system initial startup state.
4. The method according to claim 2, characterized in that: The steps to receive vehicle event information from the vehicle microcontroller are: The distributed bus in the first vehicle operating system receives the vehicle event information from a custom vehicle service module in the second vehicle operating system, and the custom vehicle service module in the second vehicle operating system obtains the vehicle event information from an onboard microcontroller; The first vehicle operating system and the second vehicle operating system are two different operating systems divided by using virtualization technology in the same system on chip SOC.
5. The method according to claim 4, characterized in that In response to determining that the current state of the preset state machine is any state, the power service module further performs the following operations: In response to receiving a vehicle ignition event, receiving vehicle ignition status information; In response to receiving a system-on-chip (SOC) heartbeat event, a heartbeat message is sent to a second vehicle operating system.
6. The method according to claim 5, characterized in that The power service module also performs the following operations: In response to determining that the current state of the preset state machine is a sleep state, and the power service module receives an event notifying the system on chip (SOC) to enter a sleep state, notifying the second vehicle operating system to enter a sleep process; In response to determining that the current state of the preset state machine is any one of a sleep state, a power-on state, a manned driving state, an unmanned mode state, a remote upgrade mode state, a local upgrade mode state, a ready-to-shutdown state, and a system initial startup state, and the power service module receives a notification of a system-on-chip SOC shutdown event, notifying the second vehicle operating system to enter a shutdown process; In response to determining that the current state of the preset state machine is any one of a power-on state, a manned driving state, an unmanned mode state, and a system initial startup state, and the power service module receives an event notifying that the system on chip (SOC) is currently being upgraded, notifying the second vehicle operating system that an upgrade is currently being performed; In response to determining that the current state of the preset state machine is any one of a power-on state, a manned driving state, an unmanned mode state, a remote upgrade mode state, a local upgrade mode state, and a system initial startup state, and the power service module receives an event notifying that the system on chip (SOC) has currently exited the upgrade, notifying the second vehicle operating system that the upgrade has currently exited; In response to determining that the current state of the preset state machine is the system initial startup state, and the power service module receives a second vehicle operating system startup completion message, sending a startup completion message to the second vehicle operating system; In response to determining that the current state of the preset state machine is the system initial startup state, and the power service module receives a system on chip (SOC) heartbeat message, the heartbeat message is sent to the second vehicle operating system.
7. The method according to claim 1, characterized in that After determining the vehicle power state, the method further includes: The vehicle power status is sent to a functional module or an application module of the first vehicle operating system, so that each functional module and application module determines an operating mode or an interface display mode of the vehicle based on the vehicle power status.
8. A vehicle power status determination device, characterized in that: include: a communication module configured to receive vehicle event information from the vehicle-mounted microcontroller and input the vehicle event information into a preset state machine, wherein the preset state machine is a state machine originally set in the power service module, and the power service module is a custom module in the first vehicle operating system; a processing module configured to obtain a current state of the preset state machine, and in response to determining that the vehicle event information satisfies a state transition condition of the current state, convert the state of the preset state machine into a target state; The determination module is configured to determine that the target state is a vehicle power state.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Control method and system of electric automobile and electric automobile
CN106114224A
Gateway type set top box standby system and method
CN106131683A
Multimedia entertainment system of vehicle, control method and vehicle
CN110385991A
Vehicle power supply control method and system and vehicle
CN111038329A
Control method and device for vehicle-arranged multimedia system
CN111332224A