A mobile terminal automatic start-stop control method and system based on a whole vehicle power supply state
By identifying the power source and generating virtual ignition/shutdown events, the problem of unstable start-stop operation of vehicle PADs is solved, and automatic start-stop control without a dedicated ignition signal line is realized, ensuring business continuity and battery protection.
Patent Information
- Application Number
- CN202611526325.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies lack an automatic start-stop control scheme in in-vehicle tablet computers (PADs) that does not require the addition of a dedicated ignition signal line, resulting in unstable start-stop operation and affecting business continuity and battery protection.
By collecting the external power supply status of the mobile terminal, identifying the power source and generating virtual vehicle ignition/shutdown events, the system triggers the power-on control chain or delayed shutdown state. Combined with multi-source information fusion and weighted voting, automatic start-stop control is achieved.
It achieves reliable automatic start-stop without a dedicated ignition signal line, taking into account both business completion and battery protection, reducing the probability of accidental power-on/off and improving control continuity after abnormal restart.
Smart Images

Figure CN123169730A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mobile terminal control technology, and in particular relates to a method and system for automatic start-stop control of mobile terminals based on the power supply status of the vehicle. Background Technology
[0002] In logistics vehicles, construction machinery, special vehicles, public transportation vehicles, and commercial vehicles, tablet computers or other mobile terminals are often used as in-vehicle PADs for navigation, dispatching, data collection, equipment control, or business processing. These PADs are usually powered by the vehicle's power supply through a step-down module, charging dock, USB interface, or contact interface.
[0003] Existing solutions mostly rely on manual power on / off, independent ignition signal lines, vehicle bus messages, or simple charging plug-in / plug-out judgments, which are prone to omissions during manual operation; adding ignition signal lines will increase wiring harness, interface, and installation costs; vehicle bus solutions depend on vehicle model compatibility; directly mapping charging status to power on / off actions is susceptible to transient voltage drops during ignition, contact jitter, short-term engine shutdown, charging protocol renegotiation, or non-vehicle charger access, resulting in repeated power on / off, accidental power off, service interruption, or file system corruption.
[0004] In addition, even after the vehicle is turned off, data uploading, task settlement, trajectory saving, or log writing may still need to run for a short time. Immediately shutting down the system when the power is cut off will affect the integrity of the business. Continuing to run for a long time will consume the PAD battery, which may lead to the battery being depleted after long-term parking. Therefore, an automatic start-stop solution is needed that does not require the addition of a dedicated ignition signal line, adapts to fluctuations in vehicle power supply, and takes into account both business completion and battery protection. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides a method and system for automatic start-stop control of mobile terminals based on the power supply status of the vehicle, which solves the problems of reliability, service continuity and battery protection of automatic start-stop of vehicle PADs under the condition of no dedicated ignition signal line.
[0006] The technical solution of this invention: A method for automatic start-stop control of a mobile terminal based on the vehicle's power supply status, wherein the mobile terminal is installed inside the vehicle and is powered or charged by the vehicle's power supply output, comprising: The system collects the external power supply status or charging status of the mobile terminal; the external power supply status of the mobile terminal includes the input voltage at the power supply input terminal of the mobile terminal; the mobile terminal has a preset power-on threshold. and power outage threshold The power-on threshold Greater than the power outage threshold To the power-on threshold With the power outage threshold The interval between them constitutes a voltage hysteresis region; Based on the information collected from the mobile terminal, the power source is identified to determine whether the current power supply is vehicle-mounted power. When the mobile terminal is in a powered-off state or a low-power state, and the current power supply is identified as vehicle power supply and the first confirmation condition is met, a virtual vehicle ignition event is generated, and the power-on control chain is triggered based on the virtual vehicle ignition event, so that the mobile terminal can start in normal startup mode or wake up from a low-power state. The first confirmation condition includes the input voltage at the external power supply input terminal being greater than or equal to the power-on threshold. The above and the first confirmation duration continues; During the operation of the mobile terminal, when the second confirmation condition is met, a virtual vehicle shutdown event is generated, the power outage time t0 is recorded, the shutdown period is determined, and a revocable delayed shutdown state is entered; the second confirmation condition includes that the input voltage of the external power supply input terminal is less than or equal to the power outage threshold. And continue for the second confirmation period; During the delayed shutdown state, the power supply status is continuously monitored. If the power supply is restored before the shutdown period expires and the first confirmation condition is met again, the shutdown task is cancelled, the persistent shutdown state is cleared, and the system returns to the running state. If the shutdown period expires and power is not restored, then pre-shutdown processing is performed and the mobile terminal is safely shut down. The shutdown period is dynamically determined based on the base delay and at least one of the following: remaining battery power, temperature, unfinished business tasks, data synchronization status, network transmission status, vehicle bus status, and user configuration, and is subject to the maximum delay duration. Write at least one of the following to the non-volatile storage area: control status, power failure time, shutdown period, shutdown reason, and event number. After an abnormal restart, restore the delayed shutdown state or correct the remaining period.
[0007] Using the above technical solution, when the mobile terminal is powered off or in a low-power state, the existing charging path is reused to identify the vehicle power supply and generate a virtual vehicle ignition event, triggering the normal start-up of the power-on control chain. In the running state, a virtual vehicle shutdown event is generated through the second confirmation condition and the system enters a revocable delayed shutdown state. If the power supply is restored within the time limit, the shutdown can be revoked. If the power supply is not restored by the time limit, the system will be safely shut down. This achieves reliable automatic start-stop control without adding a dedicated ignition signal line, taking into account both business completion and battery protection.
[0008] A further feature of the present invention is that the external power supply status or charging status of the mobile terminal includes at least one of the following: the plugging / unplugging status of the charging interface, the docking status, the status of the charging chip, the status or interrupt signal of the power management chip, the input voltage, the input current, the charging protocol identification result, and the GPIO level.
[0009] By adopting the above further settings, the specific sources of external power supply status and charging status are clarified, enabling the power supply status acquisition module to obtain information from multiple hardware channels such as charging interface, charging chip, power management chip, charging protocol and general input / output, providing a data foundation for subsequent power supply source identification and virtual ignition / extinguishing event determination.
[0010] A further feature of the present invention is that the vehicle is a 12V vehicle system or a 24V vehicle system; The first confirmation condition and the second confirmation condition further include: When the vehicle has a 12V vehicle system, the power-on threshold Take 11V, the power-off threshold Take 9V, and the hysteresis width of the voltage hysteresis interval is 2V; When the vehicle has a 24V vehicle system, the power-on threshold Take 22V, the power-off threshold Take 18V, and the hysteresis width of the voltage hysteresis interval is 4V; The first confirmation duration is greater than or equal to 1 second, and the second confirmation duration is greater than or equal to 2 seconds.
[0011] By adopting the above further settings, specific threshold values and hysteresis widths are given for two typical vehicle systems, 12V and 24V, enabling those skilled in the art to implement them directly; the power-on confirmation time of 1 second is much shorter than the typical duration of the ignition transient voltage drop, avoiding misjudging the ignition voltage drop as effective power supply; the power-off confirmation time of 2 seconds is longer than the typical short power-off time when the vehicle is temporarily turned off, thus enabling the system to continue operating during short-term engine shutdown and avoiding frequent shutdown and restart.
[0012] A further provision of the present invention: the step of identifying the power source based on the information collected from the mobile terminal includes: Obtain information from at least two of the following sources: charging port or dock connection status, hardware ID pin level, charger type identification during USB communication handshake, dynamic characteristics of input voltage and current, vehicle bus status, and historical connection records. For each type of information source, determine whether the current power supply is vehicle-mounted power supply and obtain the corresponding judgment conclusion; Weights are preset for each source of information. When the judgment conclusions of the sources of information are inconsistent, a weighted voting method is adopted to add up the weights of the sources of information that are judged as vehicle power supply to obtain a comprehensive weight. If the overall weight is greater than or equal to the preset threshold, then the current power supply is determined to be vehicle power supply; If the overall weight is less than the preset threshold, or if it cannot be clearly identified based on the information from each source, then it is determined that the current power supply is non-vehicle power supply, and only entering the charging mode is allowed without triggering the virtual vehicle ignition event. Historical identification results are cached in a non-volatile storage area. If the same power source has been identified as vehicle power supply three or more times in the past, the weight of the corresponding source information will be increased in the current identification.
[0013] By adopting the above-mentioned further settings, a multi-source information fusion arbitration mechanism is used to convert different hardware sources into standardized power supply events, and the validity is confirmed by a weighted voting method, thereby suppressing ignition jitter and false triggering of non-vehicle charging; the caching and weighting of historical identification results further improve the identification accuracy when the same power supply source is repeatedly accessed.
[0014] A further provision of the present invention: the power-on control chain includes at least two levels of a constant power supply controller, a power management chip, a bootloader, and an operating system; The signal transmission path of the power-on control chain includes: the vehicle battery continuously supplies standby power to the wake-up detection pin of the power management chip via an LDO or DC-DC converter; after the power management chip confirms the wake-up signal is valid, it enables the core power rail according to the preset power-on sequence and outputs a reset release signal to the main control SoC; the main control SoC executes the startup code from the Boot ROM and loads the bootloader; when the bootloader detects that the reason for this startup is external power supply wake-up, it skips the charging interface display or charging wait mode and jumps directly to the kernel startup entry point; the operating system kernel starts the user space system service, reads the power supply status acquisition and arbitration results, and enters the running state after confirming the validity of the virtual vehicle ignition event.
[0015] By adopting the above further settings, the power-on control chain is limited to a four-level signal transmission path from the physical layer, hardware layer, firmware layer to software layer, so that the virtual vehicle ignition event can connect the power-off state and the running state, and realize normal startup or low-power wake-up without manual intervention.
[0016] A further feature of the present invention: the shutdown period Determined according to the following formula: ; in, Base delay; This is the sum of additional delays corresponding to uncompleted business tasks; Additional latency corresponding to network transmission status; Configure the corresponding additional latency for the user; This is the temperature adjustment factor; This is the adjustment amount corresponding to the remaining battery power. This is the maximum delay duration; Authorized business processes can apply for additional extensions through the system interface, with each application adding no more than 30 seconds, and the total extension not exceeding the maximum extension duration. The system recalculates the remaining time every 10 seconds and forces the system to enter the shutdown pre-processing procedure when the remaining time is less than 5 seconds.
[0017] By adopting the above-mentioned further settings, the shutdown period can be flexibly determined based on battery power, temperature, task status, network status and user configuration by combining basic delay with multi-factor dynamic adjustment. At the same time, the maximum delay time and forced entry into the shutdown pre-processing process serve as a backup, taking into account both the integrity of business end-of-life and battery protection.
[0018] A further provision of the present invention: the pre-shutdown processing includes at least one of the following: broadcasting a shutdown warning, saving a snapshot of the running status, submitting to the database or cache, synchronizing the file system, ending peripheral access, closing the communication connection, and writing the shutdown reason; when low battery, abnormal temperature, abnormal battery, or service failure occurs, the shutdown period is shortened, the system is immediately and safely shut down, or a backup shutdown is performed through a watchdog timer.
[0019] By adopting the above-mentioned further settings, data consistency is ensured through operations such as shutdown warning, status snapshot, cache commit, file system synchronization and peripheral release, and the reliability of safe shutdown under abnormal conditions is improved through low power, abnormal temperature and watchdog fallback mechanisms.
[0020] A further provision of the present invention: the step of writing at least one of the control state, power failure time, shutdown period, shutdown reason and event sequence number into the non-volatile storage area includes: caching the power source identification result during the current power supply session, and retaining the identification records of the most recent 3 to 5 power supply sessions when crossing sessions; Write the current control status, power outage time, shutdown duration, shutdown reason and event number to the non-volatile storage area; In the event of an abnormal restart or system service recovery, read records from the non-volatile storage area to restore the delayed shutdown state or correct the remaining shutdown period.
[0021] By adopting the above further settings, the continuity of control is improved after abnormal power failure or service failure by persisting key control data and reading and restoring it after an abnormal restart, thus avoiding interruption or misjudgment of shutdown logic due to loss of state.
[0022] A further provision of the present invention: during the process of continuously monitoring the power supply status in the delayed shutdown state, if power supply recovery is detected but the first confirmation condition is not met, the delayed shutdown state is maintained and the shutdown period is continued to be calculated; If the first confirmation condition is met before the shutdown deadline, the shutdown task is cancelled, the persistent shutdown pending state is cleared, and the running state is returned. If the first confirmation condition is not met when the shutdown deadline arrives, then pre-shutdown processing is performed and the mobile terminal is safely shut down.
[0023] By adopting the above further settings, the processing logic for when power is restored during the delayed shutdown period but the first confirmation condition is not met is clarified, which prevents voltage fluctuations from causing accidental shutdown cancellation and ensures that the system only returns to the running state after the power supply is stably restored.
[0024] Another object of the present invention is to provide an automatic start / stop control system for a mobile terminal for implementing the above method, characterized in that it includes: The power supply status acquisition module is used to acquire the input voltage or charging status of the external power supply input terminal of the mobile terminal. The event determination module is used to identify the power source based on the collected input voltage and / or charging status, determine whether the current power supply is vehicle power supply, and generate a virtual vehicle ignition event or a virtual vehicle shutdown event. The power-on control module is used to trigger the power-on control chain in response to the virtual vehicle ignition event when the mobile terminal is in a power-off state or a low-power state and the first confirmation condition is met. The start-stop state machine is used to respond to the virtual vehicle shutdown event during the operation of the mobile terminal, record the power outage time t0, determine the shutdown period, and enter a revocable delayed shutdown state. The delayed shutdown module is used to monitor the power supply during the delayed shutdown state. If a valid power supply is restored before the shutdown period expires, the shutdown is canceled; if the power supply is not restored by the expiration date, a safe shutdown is triggered. A safe shutdown module is used to perform pre-shutdown processing and control the safe shutdown of the mobile terminal. The parameter strategy module is used to dynamically determine the shutdown period based on the base delay and at least one of the following: remaining battery power, temperature, unfinished business tasks, data synchronization status, network transmission status, vehicle bus status, and user configuration. The state persistence module is used to write at least one of the following into a non-volatile storage area: control state, power failure time, shutdown period, shutdown reason, and event sequence number, and to restore or correct it after an abnormal restart.
[0025] By adopting the above technical solution, the power supply status acquisition module, event judgment module, power-on control module, start / stop state machine, delayed shutdown module, safe shutdown module, parameter strategy module, and state persistence module form a closed-loop chain from power supply acquisition, event judgment, power-on control, delayed shutdown to safe shutdown. The modules work together to achieve automatic start / stop control without the need for additional dedicated ignition signal lines, reduce the probability of accidental power-on / off, balance business completion and battery protection, and improve control continuity after abnormal restarts. Attached Figure Description
[0026] Figure 1 This is a system architecture diagram of a specific embodiment of the present invention; Figure 2 The flowchart illustrates the automatic start / stop state machine and delayed shutdown process in a specific embodiment of the present invention. Detailed Implementation
[0027] The technical solutions in this embodiment will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] It should be noted that in the description of this invention, all directional indications (such as up, down, forward, backward, etc.) are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0029] Furthermore, in this invention, the use of terms such as "first," "second," etc., is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. In the description of this invention, "a number" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0030] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0031] like Figure 1 and Figure 2 As shown, this embodiment provides a method and system for automatic start-stop control of a mobile terminal based on the power supply status of the entire vehicle.
[0032] The system of this invention functionally includes: a power supply status acquisition module, corresponding to... Figure 1The data collection process is part of the power supply status acquisition and validity verification. This embodiment provides an automatic start-stop control system for a mobile terminal based on the power supply status of the entire vehicle, including a power supply status acquisition module, an event determination module, a power-on control module, a start-stop state machine, a delayed shutdown module, a safe shutdown module, a parameter strategy module, and a state persistence module. The system runs on the processor and memory of the mobile terminal, and the processor executes the computer program stored in the memory to realize the functions of the above modules.
[0033] Specifically, the event determination module corresponds to... Figure 1 The part of power supply status acquisition and validity verification that performs power supply source identification and validity verification, as well as the virtual ignition / extinguishing event judgment box; Power-on control module, corresponding Figure 1 The part of the startup control chain that executes the startup control chain in the running services; Start and stop state machines, corresponding to Figure 1 The part of the power-on control chain and running services that performs running status management and status switching; Delayed shutdown module, corresponding Figure 1 The part that performs delayed shutdown in the context of delayed shutdown and safe shutdown; Safety shutdown module, corresponding Figure 1 The part that performs safe shutdown in the medium-delay shutdown and safe shutdown process; Parameter strategy module, corresponding Figure 1 Battery status and safety constraints; The state persistence module corresponds to Figure 1 The power restoration indicated by the dotted line at the bottom center: cancels the shutdown and returns to the running state and the system non-volatile storage area, used to persist the control state and restore it after an abnormal restart.
[0034] It should be noted that, Figure 1 The vehicle power output and charging base are external power supply environments and are not part of the mobile terminal's internal modules, but they provide external power input for the power status acquisition module.
[0035] The power supply status acquisition module is used to collect the external power supply status and / or charging status of the mobile terminal. Specifically, it can collect at least one of the following: charging interface insertion status, charging chip status, power management chip status or interruption, input voltage, input current, charging protocol identification result, GPIO level, and dock connection status.
[0036] The event determination module is used to identify the power source based on the collected information, determine whether the current power supply is vehicle power, and generate a virtual vehicle ignition event or a virtual vehicle shutdown event. The power source identification and validity confirmation functions correspond to... Figure 1The latter half of the "Power Supply Status Acquisition and Validity Confirmation" box corresponds to the generation of virtual vehicle ignition events or virtual vehicle shutdown events. Figure 1 In the "Virtual Ignition / Shutdown Event Judgment" box, the power source identification adopts a multi-source information fusion arbitration mechanism. The input information includes at least two or more of the following types: the connection status of the charging interface and / or dock and the hardware ID pin level; the charger type identification during the USB communication handshake process, such as the negotiation result of DCP, CDP, SDP, PD protocols; the dynamic characteristics of the input voltage and current; the vehicle bus status, such as the body power supply status message on the LIN / CAN bus; and historical connection records. When the judgment conclusions of each source are inconsistent, a weighted voting method is used: when the comprehensive weight is ≥ the threshold (e.g., 0.6), it is determined to be on-board power supply; when it cannot be clearly identified, it is treated as non-on-board power supply by default, and only entering the charging mode is allowed without triggering virtual ignition.
[0037] The power-on control module is used to trigger the power-on control chain in response to the virtual vehicle ignition event when the mobile terminal is in a power-off or low-power state and the first confirmation condition is met. The power-on control module corresponds to... Figure 1 The "Power-on control chain and running services" box executes the power-on control chain portion; The power-on control chain includes at least two levels: a constant power supply controller, a power management chip, a bootloader, and an operating system. The signal transmission path is as follows: the vehicle battery VBAT constantly supplies standby power to the LDO / DC-DC converter, which in turn supplies the wake-up detection pin of the power management chip (PMIC). When the external power input meets the first confirmation condition, the pin level changes from low to high, waking up the PMIC's internal power-on timing logic. After confirming the wake-up signal is valid, the PMIC enables the core power rails sequentially according to the preset power-on sequence, and after a delay of a certain stabilization time, outputs a release signal to the reset pin of the main control SoC, triggering a hardware reset of the SoC and starting execution of the boot code from the BootROM. The BootROM inside the SoC loads the primary bootloader SPL. After SPL initializes the base clock and DDR controller, it loads the secondary bootloader, such as U-Boot. U-Boot detects that the reason for this boot is external power supply wake-up. By reading the status register of the PMIC or a specific GPIO level, it automatically skips the usual charging interface display or charging wait mode, directly sets the boot parameters, and jumps to the kernel boot entry point. After the Linux / Android kernel completes driver initialization, it starts the system service in user space. This service reads the arbitration result of the power supply status acquisition module, confirms the validity of the virtual ignition event, completes the application layer initialization, and finally enters the running state.
[0038] The start-stop state machine is used to respond to virtual vehicle shutdown events during mobile terminal operation, record the power outage time t0, determine the shutdown period, and enter a revocable delayed shutdown state. The start-stop state machine corresponds to... Figure 1 The "Power-on Control Chain and Operation Services" box in the middle executes the operation status management and state switching, and the bottom dotted line "Power Restoration: Cancel Shutdown and Return to Running State" indicates the power-off cancellation function; when the mobile terminal detects a continuous power failure during operation and meets the second confirmation condition, a virtual vehicle shutdown event is generated, the power failure time t0 is recorded, and a delayed shutdown state is entered. During the delay, the system continuously checks whether the power supply is restored; when the power supply is restored and the power-on confirmation condition is met again, the shutdown task is canceled, the persistent pending shutdown state is cleared, and the system returns to the running state; if the shutdown period expires and the power supply is not restored, a shutdown notice is broadcast to the business process, and the system safely shuts down after completing the operation status snapshot saving, database / cache commit, file system synchronization, peripheral release, communication shutdown, and shutdown reason recording.
[0039] The delayed shutdown module monitors power supply during the delayed shutdown state. If a valid power supply is restored before the shutdown period expires, the shutdown is canceled; otherwise, a safety shutdown is triggered. The delayed shutdown module corresponds to... Figure 1 The "Delayed Shutdown and Safe Shutdown" box specifies the time limit for delayed shutdown. It can be determined according to the following formula: ; in, Base delay; This is the sum of additional delays corresponding to uncompleted business tasks; Additional latency corresponding to network transmission status; Configure the corresponding additional latency for the user; This is the temperature adjustment factor; This is the adjustment amount corresponding to the remaining battery power. The maximum delay time is preferably 600 seconds; The values of the above variables are determined as follows: When the remaining battery charge (SOC) is ≥ 50%, the adjustment amount corresponding to the remaining battery charge. Take +120 seconds; when 20% ≤ SOC < 50%, Take +60 seconds; when 5% ≤ SOC < 20%, Set the time to +0 seconds; if SOC < 5%, force an immediate shutdown. When the battery temperature or ambient temperature T is within the normal range of 0℃≤T≤45℃, the temperature adjustment coefficient... Take 1.0; when T < 0℃ or T > 45℃ in the abnormal range, Take 0.5; When there are critical upload tasks, there is an additional delay for each task. Take +30 seconds. Maximum cumulative +90 seconds; when there are no critical tasks, Take +0 seconds; Additional latency corresponding to the network transmission state when there is a data stream being transmitted on the network. Take +20 seconds; when the network is idle, Take +0 seconds; When a user configures an additional latency preference, the user configures the corresponding additional latency. Take the user-defined value, and ≤120 seconds, subject to maximum delay duration constraint; Authorized business processes can request additional extensions through the system interface, with each request adding no more than 30 seconds, and the total extension not exceeding the maximum extension duration. The system recalculates the remaining time limit every 10 seconds and forces the system to enter the shutdown preprocessing procedure when the remaining time limit is less than 5 seconds.
[0040] The secure shutdown module is used to perform pre-shutdown processing and control the secure shutdown of the mobile terminal. The secure shutdown module corresponds to... Figure 1 The section on safe shutdown under "Delayed Shutdown and Safe Shutdown" includes pre-shutdown processing that includes at least one of the following: broadcasting a shutdown warning, saving a snapshot of the operating state, submitting to the database or cache, synchronizing the file system, ending peripheral access, closing communication connections, and writing a shutdown reason. In cases of low battery, abnormal temperature, battery malfunction, or service failure, the delay is shortened, a safe shutdown is initiated immediately, or a watchdog timer is used as a fallback. The watchdog timer is a hardware watchdog timer.
[0041] The parameter strategy module is used to dynamically determine the shutdown period based on the base latency and at least one of the following: remaining battery power, temperature, unfinished business tasks, data synchronization status, network transmission status, vehicle bus status, and user configuration. The parameter strategy module corresponds to... Figure 1 "Battery Status and Safety Constraints" in the bottom left corner.
[0042] The state persistence module is used to write at least one of the following into a non-volatile storage area: control state, power failure time, shutdown duration, shutdown reason, and event sequence number, and to restore or correct it after an abnormal restart. The state persistence module corresponds to... Figure 1 The bottom center dashed line reads "Power restoration: Cancel shutdown and return to running state" and the system non-volatile memory area; Figure 1 Although a separate state persistence module is not explicitly labeled, the system utilizes a non-volatile storage area to undo shutdowns after power restoration and recover from abnormal restarts. Control state, power outage time, shutdown duration, shutdown reason, and event sequence number can be written to this non-volatile storage area. After an abnormal restart, the system reads the records from the non-volatile storage area to restore the delayed shutdown state or correct the remaining duration. During the current power supply session, the power source identification result is cached, and across sessions, the identification records of the most recent 3 to 5 power supply sessions are retained.
[0043] like Figure 2 As shown, the automatic start / stop state machine and delayed shutdown process include: the state machine includes at least the shutdown / low power state, power supply confirmation state, power supply running state, revocable delayed shutdown state, and safe shutdown state.
[0044] In the power-off / low-power state, the power supply status acquisition module continuously acquires the input voltage at the external power supply input terminal. When the input voltage rises to the power-on threshold... If the first confirmation duration is ≥1 second, the event determination module confirms that the first confirmation condition is met and generates a virtual vehicle ignition event; for 12V vehicle systems, Take 11V; for a 24V vehicle system, The voltage is 22V. The first confirmation time of 1 second is much shorter than the typical duration of the ignition transient voltage drop, so it will not be mistaken for an effective power supply. Then, it enters the power supply confirmation state. After confirming that the power source is the vehicle power supply, it triggers the power-on control chain, so that the mobile terminal starts up in normal startup mode or wakes up from low power state and enters the power supply operation state.
[0045] In power supply operation mode, when the input voltage drops to the power-off threshold If the second confirmation duration is maintained for at least 2 seconds, the event determination module confirms that the second confirmation condition is met and generates a virtual vehicle shutdown event; for 12V vehicle systems, Take 9V; for a 24V vehicle system, It takes 18V; the second confirmation time of 2 seconds is longer than the typical short power outage time when the vehicle is temporarily turned off, so it can keep the system running when the engine is turned off for a short time and avoid frequent shutdown and restart.
[0046] Power-on threshold Greater than the power outage threshold This constitutes a voltage hysteresis range. In a 12V system, the hysteresis width ΔV = 11V - 9V = 2V; in a 24V system, the hysteresis width ΔV = 22V - 18V = 4V. This hysteresis range is used to filter out voltage drops at the moment of ignition and critical fluctuations caused by connecting or disconnecting off-board chargers, thus avoiding frequent power-on and power-off cycles caused by the voltage repeatedly crossing the threshold.
[0047] After generating a virtual vehicle shutdown event, the power outage time t0 is recorded, the shutdown period is determined, and the system enters a revocable delayed shutdown state. During the delay, the system continuously monitors whether power supply has been restored. If power supply is detected to have been restored but the first confirmation condition is not met, the delayed shutdown state is maintained and the shutdown period continues to be calculated. If the first confirmation condition is met before the shutdown period expires, the shutdown task is canceled, the persistent pending shutdown state is cleared, and the system returns to the power supply running state. If power supply has not been restored by the shutdown period expires, the system enters a safe shutdown state, broadcasts a shutdown notice to the business processes, and completes the saving of the running state snapshot, database / cache commit, file system synchronization, peripheral device release, communication shutdown, and recording of the shutdown reason before safely shutting down.
[0048] Recovery process after abnormal restart: The current control state, power outage time, shutdown period, shutdown reason and event number are written to the non-volatile storage area. The power source identification result is cached during the current power supply session. When crossing sessions, the identification records of the most recent 3 to 5 power supply sessions are retained. When abnormal restart or system service recovery occurs, the records in the non-volatile storage area are read to restore the delayed shutdown state or correct the remaining shutdown period. If the power supply is detected to have been restored after the abnormal restart and the first confirmation condition is met, the persistent pending shutdown state is cleared and the running state is returned. If the power supply is detected to have not been restored after the abnormal restart, the delayed shutdown process continues according to the corrected remaining period.
[0049] The process of determining the dynamic shutdown period: base delay The preset time is 60 seconds, so when the battery's remaining SOC is ≥ 50%, Take +120 seconds; when 20% ≤ SOC < 50%, Take +60 seconds; when 5% ≤ SOC < 20%, Set to +0 seconds; force immediate shutdown when SOC < 5%.
[0050] When the battery temperature or ambient temperature T is within the normal range of 0℃≤T≤45℃, the temperature adjustment coefficient... =1.0; when T<0℃ or T>45℃ =0.5; each task when there is a critical upload task Take +30 seconds, maximum cumulative +90 seconds; additional delay corresponding to the network transmission status when there is an ongoing data stream on the network. Take +20 seconds; when the network is idle, Take +0 seconds; When a user configures an additional latency preference, the user configures the corresponding additional latency. Take the user-defined value, and ≤120 seconds, subject to maximum delay duration Constraints; Maximum Delay Duration =600 seconds.
[0051] The following is an example of segmented mapping: when SOC ≥ 50%, temperature is normal, and there are no tasks. =min(60+120,600)=180 seconds; SOC≥50%, normal temperature, and one task available. =min(60+120+30,600)=210 seconds; SOC is 20%~50%, temperature is normal, and there is no task. =min(60+60,600)=120 seconds; SOC is 5%~20%, temperature is normal, and there is no task. =min(60+0,600)=60 seconds; SOC is 5%~20%, abnormal temperature, no task. =min(60×0.5,600)=30 seconds; shut down immediately and safely when SOC<5%.
[0052] Authorized business processes can request additional extensions through the system interface. Each request can add no more than 30 seconds, and the total extension cannot exceed [a certain limit]. To limit this, the system recalculates the remaining time limit every 10 seconds and forces the system to enter the shutdown preprocessing procedure when the remaining time limit is less than 5 seconds, ensuring that the terminal will not be suspended indefinitely.
Claims
1. A method for automatic start / stop control of a mobile terminal based on the vehicle's power supply status, wherein the mobile terminal is installed inside the vehicle and is powered or charged by the vehicle's power supply, characterized in that... include: Collect the external power supply status or charging status of the mobile terminal; the external power supply status of the mobile terminal includes the input voltage of the power supply input terminal of the mobile terminal; The mobile terminal has a preset power-on threshold. and power outage threshold The power-on threshold Greater than the power outage threshold To the power-on threshold With the power outage threshold The interval between them constitutes a voltage hysteresis region; Based on the information collected from the mobile terminal, the power source is identified to determine whether the current power supply is vehicle-mounted power. When the mobile terminal is in a powered-off state or a low-power state, and the current power supply is identified as vehicle power supply and the first confirmation condition is met, a virtual vehicle ignition event is generated, and the power-on control chain is triggered based on the virtual vehicle ignition event, so that the mobile terminal can start in normal startup mode or wake up from a low-power state. The first confirmation condition includes the input voltage at the external power supply input terminal being greater than or equal to the power-on threshold. The above and the first confirmation duration continues; During the operation of the mobile terminal, when the second confirmation condition is met, a virtual vehicle shutdown event is generated, the power outage time t0 is recorded, the shutdown period is determined, and a revocable delayed shutdown state is entered; the second confirmation condition includes that the input voltage of the external power supply input terminal is less than or equal to the power outage threshold. And continue for the second confirmation period; During the delayed shutdown state, the power supply status is continuously monitored. If the power supply is restored before the shutdown period expires and the first confirmation condition is met again, the shutdown task is cancelled, the persistent shutdown state is cleared, and the system returns to the running state. If the shutdown period expires and power is not restored, then pre-shutdown processing is performed and the mobile terminal is safely shut down. The shutdown period is dynamically determined based on the base delay and at least one of the following: remaining battery power, temperature, unfinished business tasks, data synchronization status, network transmission status, vehicle bus status, and user configuration, and is subject to the maximum delay duration. Write at least one of the following to the non-volatile storage area: control status, power failure time, shutdown period, shutdown reason, and event number. After an abnormal restart, restore the delayed shutdown state or correct the remaining period.
2. The method according to claim 1, characterized in that, The external power supply status or charging status of the mobile terminal includes at least one of the following: plugging / unplugging status of the charging interface, docking status, charging chip status, power management chip status or interrupt signal, input voltage, input current, charging protocol identification result, and GPIO level.
3. The method according to claim 1, characterized in that, The vehicle has a 12V or 24V vehicle system; The first confirmation condition and the second confirmation condition further include: When the vehicle has a 12V vehicle system, the power-on threshold Take 11V, the power-off threshold Take 9V, and the hysteresis width of the voltage hysteresis interval is 2V; When the vehicle has a 24V vehicle system, the power-on threshold Take 22V, the power-off threshold Take 18V, and the hysteresis width of the voltage hysteresis interval is 4V; The first confirmation duration is greater than or equal to 1 second, and the second confirmation duration is greater than or equal to 2 seconds.
4. The method according to claim 1, characterized in that, The step of identifying the power source based on the information collected from the mobile terminal includes: Obtain information from at least two of the following sources: charging port or dock connection status, hardware ID pin level, charger type identification during USB communication handshake, dynamic characteristics of input voltage and current, vehicle bus status, and historical connection records. For each type of information source, determine whether the current power supply is vehicle-mounted power supply and obtain the corresponding judgment conclusion; Weights are preset for each source of information. When the judgment conclusions of the sources of information are inconsistent, a weighted voting method is adopted to add up the weights of the sources of information that are judged as vehicle power supply to obtain a comprehensive weight. If the overall weight is greater than or equal to the preset threshold, then the current power supply is determined to be vehicle power supply; If the overall weight is less than the preset threshold, or if it cannot be clearly identified based on the information from each source, then it is determined that the current power supply is non-vehicle power supply, and only entering the charging mode is allowed without triggering the virtual vehicle ignition event. Historical identification results are cached in a non-volatile storage area. If the same power source has been identified as vehicle power supply three or more times in the past, the weight of the corresponding source information will be increased in the current identification.
5. The method according to claim 1, characterized in that, The power-on control chain includes at least two levels from a constant power supply controller, a power management chip, a bootloader, and an operating system. The signal transmission path of the power-on control chain includes: the vehicle battery continuously supplies standby power to the wake-up detection pin of the power management chip via an LDO or DC-DC converter; after the power management chip confirms the wake-up signal is valid, it enables the core power rail according to the preset power-on sequence and outputs a reset release signal to the main control SoC; the main control SoC executes the startup code from the Boot ROM and loads the bootloader; when the bootloader detects that the reason for this startup is external power supply wake-up, it skips the charging interface display or charging wait mode and jumps directly to the kernel startup entry point; the operating system kernel starts the user space system service, reads the power supply status acquisition and arbitration results, and enters the running state after confirming the validity of the virtual vehicle ignition event.
6. The method according to claim 1, characterized in that, The shutdown period Determined according to the following formula: ; in, Base delay; This is the sum of additional delays corresponding to uncompleted business tasks; Additional latency corresponding to network transmission status; Configure the corresponding additional latency for the user; This is the temperature adjustment factor; This is the adjustment amount corresponding to the remaining battery power. This is the maximum delay duration; Authorized business processes can apply for additional extensions through the system interface, with each application adding no more than 30 seconds, and the total extension not exceeding the maximum extension duration. The system recalculates the remaining time every 10 seconds and forces the system to enter the shutdown pre-processing procedure when the remaining time is less than 5 seconds.
7. The method according to claim 1, characterized in that, The pre-shutdown processing includes at least one of the following: broadcasting a shutdown warning, saving a snapshot of the running status, submitting to the database or cache, synchronizing the file system, ending peripheral access, closing the communication connection, and writing the shutdown reason; when low battery, abnormal temperature, abnormal battery, or service failure occurs, the shutdown period is shortened, the system is immediately and safely shut down, or a backup shutdown is performed through a watchdog timer.
8. The method according to claim 1, characterized in that, The step of writing at least one of the control status, power outage time, shutdown period, shutdown reason and event sequence number into the non-volatile storage area includes: caching the power source identification result during the current power supply session, and retaining the identification records of the most recent 3 to 5 power supply sessions when crossing sessions; Write the current control status, power outage time, shutdown duration, shutdown reason and event number to the non-volatile storage area; In the event of an abnormal restart or system service recovery, read records from the non-volatile storage area to restore the delayed shutdown state or correct the remaining shutdown period.
9. The method according to claim 1, characterized in that, During the process of continuously monitoring the power supply status in the delayed shutdown state, if power supply is detected to be restored but the first confirmation condition is not met, the delayed shutdown state is maintained and the shutdown period is calculated again. If the first confirmation condition is met before the shutdown deadline, the shutdown task is cancelled, the persistent shutdown pending state is cleared, and the running state is returned. If the first confirmation condition is not met when the shutdown deadline arrives, then pre-shutdown processing is performed and the mobile terminal is safely shut down.
10. A mobile terminal automatic start / stop control system for implementing the method of any one of claims 1-9, characterized in that, include: The power supply status acquisition module is used to acquire the input voltage or charging status of the external power supply input terminal of the mobile terminal. The event determination module is used to identify the power source based on the collected input voltage and / or charging status, determine whether the current power supply is vehicle power supply, and generate a virtual vehicle ignition event or a virtual vehicle shutdown event. The power-on control module is used to trigger the power-on control chain in response to the virtual vehicle ignition event when the mobile terminal is in a power-off state or a low-power state and the first confirmation condition is met. The start-stop state machine is used to respond to the virtual vehicle shutdown event during the operation of the mobile terminal, record the power outage time t0, determine the shutdown period, and enter a revocable delayed shutdown state. The delayed shutdown module is used to monitor the power supply during the delayed shutdown state. If a valid power supply is restored before the shutdown period expires, the shutdown is canceled; if the power supply is not restored by the expiration date, a safe shutdown is triggered. A safe shutdown module is used to perform pre-shutdown processing and control the safe shutdown of the mobile terminal. The parameter strategy module is used to dynamically determine the shutdown period based on the base delay and at least one of the following: remaining battery power, temperature, unfinished business tasks, data synchronization status, network transmission status, vehicle bus status, and user configuration. The state persistence module is used to write at least one of the following into a non-volatile storage area: control state, power failure time, shutdown period, shutdown reason, and event sequence number, and to restore or correct it after an abnormal restart.
