Cockpit application operation control method and system for two-wheeled vehicle

By constructing an application runtime state machine and a unified arbitration mechanism for multiple resources triggered by risk events, the problems of resource competition and state transition in the two-wheeled vehicle cockpit were solved, achieving real-time performance and application continuity for critical tasks and improving system resource utilization efficiency.

CN123157447APending Publication Date: 2026-11-24CHONGQING ZHIJIE INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611436036.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

The existing two-wheeled vehicle cockpit software architecture suffers from resource contention and scheduling disorder, lack of stateless migration and recovery capabilities, and neglect of the special working conditions constraints of two-wheeled vehicles in terms of application operation control. This results in delays in critical tasks and the absence of rules for application state migration and recovery without memory.

Method used

Construct an application runtime state machine, including foreground, background, and frozen states. Combine this with a unified arbitration mechanism for multiple resources triggered by risk events and a context saving and recovery strategy. Through risk level classification and unified resource allocation, ensure the real-time nature of critical tasks and application continuity.

Benefits of technology

It achieves a balance between the real-time nature of critical tasks, the continuity of application interaction, and the efficiency of system resource utilization under the conditions of limited resources and complex working conditions of two-wheeled vehicles, avoiding the delay and state memory problems caused by resource competition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157447A_ABST
    Figure CN123157447A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for controlling the operation of cockpit applications in two-wheeled vehicles. The method includes the following steps: constructing an application state machine to determine if a risk event exists; when a risk event is detected, triggering a unified arbitration mechanism for multiple resources; when allocating resources to risk-alerted tasks, forcibly switching non-critical applications to a background or frozen state, and saving the context of interrupted applications; after the risk event ends, executing hot recovery, cold recovery, or delayed recovery strategies; when no risk event is detected, switching background applications that do not meet the operating conditions to a frozen state. This technical solution constructs a three-state state machine (foreground, background, and frozen states), combined with a unified arbitration mechanism for multiple resources, and context saving and hierarchical recovery strategies after risk resolution, achieving a balance between the real-time performance of critical tasks, the continuity of application interaction, and the efficiency of system resource utilization in resource-constrained and complex operating scenarios of two-wheeled vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent cockpit technology for two-wheeled vehicles, and relates to a cockpit application operation control method and system for two-wheeled vehicles. Background Technology

[0002] With the penetration of electrification and intelligent technologies, the dashboards of two-wheeled vehicles (including electric motorcycles, scooters, and hybrid two-wheelers) have evolved from traditional mechanical or segmented displays to intelligent cockpit systems that integrate navigation, audio-visual entertainment, Bluetooth calling, mobile phone screen mirroring, vehicle log recording, fault diagnosis, and collision warning, among other multi-functional applications. This increased functionality has directly led to a significant increase in the number of applications and concurrent tasks that the cockpit's System-on-Chip (SoC) needs to support.

[0003] However, current mainstream two-wheeled vehicle cockpit software architectures have significant shortcomings in application operation control. Most solutions directly rely on the general process scheduling strategies built into the operating system (such as Android or Linux), or simply employ a rudimentary binary approach of "currently visible applications are foreground, and all others are background" for rudimentary management. These approaches suffer from the following technical pain points:

[0004] Resource contention and scheduling disorder: When applications such as navigation, media, and communication run in parallel, they fiercely compete for shared resources such as processor (CPU) computing power, memory bandwidth, display layers, and audio digital signal processing (DSP) channels. For example, media applications may occupy audio focus for extended periods, navigation applications need to refresh the positioning and map interface frequently, and sudden collision warnings or battery thermal runaway alarms reported by the vehicle controller area network (CAN bus) require risk warning applications to obtain display and audio output rights with the highest priority. In the absence of a unified resource arbitration mechanism, events can easily occur where ordinary applications block the execution of critical safety tasks.

[0005] Lack of stateless migration and recovery capabilities: When an application is terminated or frozen by the system due to resource preemption, the existing system can usually only perform a crude process destruction without systematically saving the application's current navigation route, playback progress, input cache, or call session state. When the risk event is resolved or system resources are restored, users need to manually restart the application and start operating from scratch, which not only disrupts the user experience but may also distract cyclists due to the long recovery time.

[0006] Ignoring the unique constraints of two-wheeled vehicles: Compared to four-wheeled vehicles, the computing power, memory capacity, and display resolution of the main control chip in the cockpit of a two-wheeled vehicle are typically severely limited. Furthermore, they face complex scenarios such as high-frequency vibration, temperature rise without active cooling, frequent power interruptions due to ignition and shutdown, and weak network environments. Simply transplanting general scheduling strategies from the mobile phone or automotive sectors cannot simultaneously address critical task assurance, battery life, and operational smoothness under limited resources.

[0007] In summary, there is an urgent need in this field for an application operation control scheme specifically designed for resource-constrained and highly dynamic scenarios of two-wheeled vehicles. This scheme can simultaneously resolve the contradiction between the real-time nature of critical tasks, system resource utilization, and application usage continuity by introducing fine-grained application state division, a multi-dimensional unified resource preemption mechanism based on risk levels, and intelligent context saving and recovery strategies. Summary of the Invention

[0008] The purpose of this invention is to address the aforementioned problems in existing technologies by proposing a cockpit application operation control method and system for two-wheeled vehicles.

[0009] To achieve the above objectives, the basic solution of the present invention is: a cockpit application operation control method for two-wheeled vehicles, comprising the following steps:

[0010] Construct an application runtime state machine, including a foreground state, a background state, and a frozen state, wherein the frozen state is the state in which the application suspends execution scheduling and retains only the minimum session information required for recovery;

[0011] Collect system resource parameters and / or system events, and determine whether there are risk events based on system events;

[0012] When a risk event is detected, a unified arbitration mechanism for multiple resources is triggered. Based on the risk level of the risk event, display focus, audio focus, and processor quota are uniformly allocated, and the risk alert task is elevated to the highest priority.

[0013] When allocating resources for risk alert tasks, non-critical applications are forced to switch to background or frozen state, and the context of interrupted applications is saved.

[0014] After a risk event ends, based on the current system resource parameters and the integrity and validity of the saved context, a hot recovery, cold recovery, or delayed recovery strategy is executed.

[0015] If no risk event is detected, background applications that do not meet the operating conditions will be switched to a frozen state based on system resource parameters.

[0016] The working principle and beneficial effects of this basic solution are as follows: This technical solution constructs a three-state machine consisting of a foreground state, a background state, and a frozen state. Combined with a unified arbitration mechanism for multiple resources triggered by risk events, and a context saving and hierarchical recovery strategy after the risk is resolved, it solves the technical problems of critical task delays, application state memoryless migration, and lack of recovery rules caused by resource competition in existing two-wheeled vehicle cockpit applications. It achieves a balance between the real-time performance of critical tasks, the continuity of application interaction, and the efficiency of system resource utilization in two-wheeled vehicle resource-constrained and complex operating scenarios.

[0017] Furthermore, the steps for determining whether a risk event exists based on system events are as follows:

[0018] Receive collision warning signals, abnormal posture signals, overspeed warning signals or critical fault signals reported by the vehicle controller or body sensors as system events;

[0019] Determine whether a risk event exists based on system events:

[0020] If a collision warning signal or a critical fault signal is received, it is directly determined that a risk event exists;

[0021] If an abnormal attitude signal is received, the attitude angle data carried in the abnormal attitude signal is obtained, and the attitude angle data is compared with a preset attitude angle threshold. When the attitude angle data exceeds the preset attitude angle threshold, a risk event is determined to exist.

[0022] If an overspeed alarm signal is received, the vehicle speed data carried in the overspeed alarm signal is obtained, and the vehicle speed data is compared with a preset vehicle speed threshold. If the vehicle speed data exceeds the preset vehicle speed threshold, a risk event is determined to exist.

[0023] If a risk event exists, the risk event shall be classified into risk levels.

[0024] The system defines four types of system event signals: collision warning, abnormal posture, overspeed alarm, and critical fault, along with their judgment rules. It clarifies the triggering sources and judgment criteria for risk events, enabling the system to accurately and quickly identify risk scenarios that require response and avoid false triggering or missed triggering.

[0025] Furthermore, if a risk event exists, the risk event will be classified into risk levels, specifically as follows:

[0026] Upon receiving a collision warning signal, regardless of its parameter value, it is directly classified as a high-risk level.

[0027] If a critical fault signal is received, it will be directly classified as a high-risk level, regardless of the magnitude of its parameter value.

[0028] If an abnormal attitude signal is received, the attitude angle data carried in it is obtained, and the attitude angle data is compared with a preset first attitude angle threshold and a preset second attitude angle threshold. The first attitude angle threshold is less than the second attitude angle threshold.

[0029] When the attitude angle data exceeds the first attitude angle threshold but does not exceed the second attitude angle threshold, it is judged as a low-risk level;

[0030] When the attitude angle data exceeds the second attitude angle threshold, it is judged as a high-risk level;

[0031] If an overspeed warning signal is received, the vehicle speed data carried in it is obtained, and the vehicle speed data is compared with a preset first vehicle speed threshold and a second vehicle speed threshold. If the first vehicle speed threshold is less than the second vehicle speed threshold:

[0032] When the vehicle speed data exceeds the first speed threshold but does not exceed the second speed threshold, it is judged as a low-risk level.

[0033] When the vehicle speed data exceeds the second vehicle speed threshold, it is determined to be at a high risk level.

[0034] By setting up a two-layer comparison structure with a first threshold and a second threshold, abnormal posture and overspeed events are further subdivided into low-risk and high-risk levels. This enables the system to adopt differentiated resource allocation strategies based on different risk levels, preventing low-risk events from excessively consuming resources and affecting the user experience of normal applications.

[0035] Furthermore, when a risk event is detected, a unified arbitration mechanism for multiple resources is triggered. Based on the risk level of the risk event, display focus, audio focus, and processor quotas are uniformly allocated, and the risk alert task is elevated to the highest priority. The specific steps are as follows:

[0036] When the risk event arbitrator determines that a risk event exists and the risk level of the risk event is not lower than a preset threshold, it sends an arbitration trigger signal to the scheduler.

[0037] After receiving the arbitration trigger signal, the scheduler sends a pause or downgrade command to the application currently in the foreground state, pausing the display refresh and audio output of the current foreground application, and switching the current foreground application to the background state or frozen state.

[0038] The scheduler sends a focus switching command to the display / audio channel manager. Based on the focus switching command, the display / audio channel manager switches the display focus to the risk warning interface and the audio focus to the risk broadcast task.

[0039] The scheduler adjusts processor quotas, elevates the process or thread corresponding to the risk warning task to the highest priority, and allocates processor time slices of no less than a preset threshold.

[0040] The resource preemption process after a risk event is limited, and the atomic and unified allocation of three resources—display focus, audio focus, and processor quota—is achieved, ensuring that the risk warning task can obtain all the necessary resources and present them to the cyclist in the shortest possible time.

[0041] Furthermore, when allocating resources for risk alert tasks, the steps to forcibly switch non-critical applications to background or frozen state and save the context of interrupted applications are as follows:

[0042] The scheduler obtains the current status and priority information of each cockpit application, and identifies non-critical applications currently in the foreground and background states based on the priority information and / or risk preemption exception rules.

[0043] The scheduler sends pause or downgrade commands to non-critical applications that are currently in the foreground, switching the current foreground application to the background or frozen state;

[0044] The scheduler switches background applications that have been idle for more than a preset idle threshold, have available memory less than a preset memory threshold, or have processor load higher than a preset load threshold to a frozen state.

[0045] Before or simultaneously with the switching of non-critical applications, the context save and restore manager saves the context information of the interrupted application. The context information includes one or more of the following: current page identifier, playback progress, navigation path status, input cache, call session status, and window hierarchy information.

[0046] By limiting the identification of non-critical applications (priority information + risk preemption exception rules) and switching rules, it ensures that applications with risk preemption exemption permissions can continue to run to record critical data during risk events, while releasing the resources occupied by non-critical applications for use by risk alert tasks; and by saving context, it provides a data foundation for subsequent recovery.

[0047] Furthermore, after a risk event concludes, based on the current system resource parameters and the integrity and validity of the saved context, the method for implementing hot recovery, cold recovery, or delayed recovery strategies is as follows:

[0048] The system uses a resource monitor to periodically collect data on processor utilization, memory usage, and display / audio channel usage as system resource parameters.

[0049] After a risk event is resolved, the scheduler receives a risk resolution signal from the risk event arbitrator.

[0050] In response to the risk clearance signal, the scheduler checks whether there is any saved context information of the interrupted application;

[0051] If the context information is not available, or the context information is incomplete or invalid, then the cold recovery path is executed: the interrupted application is restarted according to the recovery strategy stored in the preset application description repository;

[0052] If context information exists and is complete and valid, then determine whether the current system resource parameters meet the preset recovery conditions, including one or more of the following conditions:

[0053] The current available memory value is greater than or equal to the preset memory recovery threshold;

[0054] The current processor utilization is less than or equal to the preset load recovery threshold;

[0055] The current display channel is not occupied by a high-priority task;

[0056] The audio channel is not currently monopolized by other applications;

[0057] If the current system resource parameters meet the preset recovery conditions, then execute the hot recovery path: restore the interrupted application from the background or frozen state to the foreground state, and replay the interface state and task progress according to the context information. The interface state includes the window hierarchy structure and page navigation stack, and the task progress includes the navigation path, media playback progress or call interface state.

[0058] If the current system resource parameters do not meet the preset recovery conditions, the delayed recovery path will be executed: the interrupted application will be restored to the background state, and the low-priority application will continue to be frozen until the system resource parameters meet the preset recovery conditions, at which point the interrupted application will be restored from the background state to the foreground state and a hot recovery will be performed.

[0059] The system sets up three recovery paths: hot recovery (context valid + sufficient resources), cold recovery (context invalid), and delayed recovery (context valid + insufficient resources). These paths have trigger conditions and execution actions to achieve a tiered recovery mechanism: seamless recovery when resources are sufficient ensures the continuity of the experience; delayed recovery when resources are insufficient avoids secondary congestion; and cold start when context is lost ensures the application can run, thus achieving a balance between user experience and system stability.

[0060] Furthermore, the recovery strategies stored in the preset application description repository include at least one or more of the following parameters:

[0061] Recovery priority is used to determine the recovery order when multiple applications are waiting to be restored;

[0062] Recovery trigger conditions are used to specify the system resource conditions that must be met to perform recovery;

[0063] A list of dependent services, indicating the dependent services that need to be started before the application can be restored;

[0064] Timeout handling rules are used to specify how to handle timeouts when resource conditions are not met for an extended period of time.

[0065] The parameters of the recovery strategy in the application description repository enable different applications to start up in an orderly and stable manner according to the pre-configured strategy during cold recovery, avoiding recovery failures caused by missing dependencies or resource contention.

[0066] Furthermore, when no risk event is detected, background applications that do not meet the operating conditions are switched to a frozen state based on system resource parameters, as follows:

[0067] The resource monitor periodically collects system resource parameters, and the scheduler obtains the application priority, current status, recent interaction intensity, resource cost, and risk association identifier of each cockpit application.

[0068] A scheduling score is calculated for each candidate application. This scheduling score is determined by weighting multiple factors, including application priority, current state, recent interaction intensity, resource cost, and risk association identifier.

[0069] Scheduling Score = W1 × Priority Score + W2 × Current State Score + W3 × Recent Interaction Intensity Score - W4 × Resource Cost + W5 × Risk Association Bonus

[0070] Among them, W1 to W5 are preset weight coefficients; the priority score is determined by the preset priority level in the application description file; the current state score is mapped to different values ​​according to whether the application is currently in the foreground, background, or frozen state; the recent interaction intensity score is calculated based on the frequency of user operations within a preset time window; the resource cost is calculated based on the processor utilization and memory usage currently occupied by the application, and serves as a deduction item; the risk association bonus is a preset positive number when the application has a risk association identifier, otherwise it is zero;

[0071] Based on the scheduling score, a scheduling result is generated, and the target running state of each candidate application is determined. The target running state includes foreground state, background state, and frozen state.

[0072] When the available memory in the system resource parameters is lower than the preset memory threshold or the processor utilization is higher than the preset load threshold, one or more background applications with the lowest scheduling score will be switched to the frozen state based on the scheduling score.

[0073] Before being switched to frozen state, save the context information of the background application.

[0074] By introducing a scheduling score mechanism, resource management is transformed from "passive response" to "proactive prevention" in the absence of risk events: the importance of each application is quantitatively assessed based on factors such as application priority, interaction intensity, and resource cost. When resources are scarce, low-scoring applications are frozen first, thereby proactively reserving resource reserves before risk events occur and improving the overall stability of the system.

[0075] Furthermore, the specific steps for generating scheduling results based on scheduling scores and determining the target running state of each candidate application are as follows:

[0076] Sort the candidate applications from highest to lowest according to their scheduling scores;

[0077] The application with the highest scheduling score will be designated as the foreground application, holding both display focus and audio focus.

[0078] Applications with middle scheduling scores are identified as background applications and allowed to continue running at a lower frequency.

[0079] One or more applications with the lowest scheduling scores are identified as frozen applications, their scheduling is suspended, and the resources they occupy are released.

[0080] The scheduling results include the target running status of each application, the display focus allocation result, the audio focus allocation result, and the processor quota allocation result.

[0081] The sorting rules for scheduling scores and the allocation rules for foreground / background / frozen settings make the scheduling results predictable and consistent. By explicitly showing that focus, audio focus, and processor quotas are all uniformly allocated in the scheduling results, collaborative scheduling of multiple resources in risk-free event scenarios is achieved, avoiding conflicts caused by independent decisions of each resource.

[0082] Furthermore, the application will be switched to foreground mode when the user interacts directly or when specified by the scheduling policy;

[0083] Switch the application to background mode when it loses focus but is still allowed to continue running;

[0084] When the background idle time exceeds the preset idle threshold, the available memory is lower than the preset memory threshold, or the processor load is higher than the preset load threshold, the background application will be switched to the frozen state.

[0085] Upon detecting user wake-up, policy restoration, or risk resolution, the frozen application will be restored to either background or foreground state according to the restoration policy.

[0086] By defining complete four-way transition rules and their triggering conditions, the transition logic of the state machine is made complete, clear and executable, ensuring that each application can transition in an orderly manner under different system states and avoiding state chaos.

[0087] The present invention also provides a cockpit application operation control system for two-wheeled vehicles based on the method described herein, comprising:

[0088] The application description repository is used to store application description files for each cockpit application. The application description files include application name, application version, process entry point, foreground qualification identifier, background periodic quota, freeze permission identifier, recovery priority, resource upper limit threshold, display focus occupancy rules, audio focus occupancy rules, dependent service list, and risk preemption exception rules.

[0089] A state manager is used to build an application runtime state machine, which includes a foreground state, a background state, and a frozen state. Based on resource thresholds and event triggering conditions, the state manager executes the state transitions of each cockpit application between the foreground state, background state, and frozen state.

[0090] The resource monitor is used to periodically collect system resource parameters: processor utilization, memory usage, graphics processor load, remaining storage capacity, display refresh load, and network link status.

[0091] The risk event arbitrator is used to receive system events, determine whether a risk event exists based on the system events, and classify the risk level of the risk event if a risk event exists.

[0092] The scheduler is used to determine the target operating status of each cockpit application and allocate system resources. When the risk event arbitrator determines that there is a risk event and the risk level of the risk event is not lower than a preset threshold, the scheduler triggers a unified arbitration mechanism for multiple resources, uniformly allocates display focus, audio focus and processor quota, raises the risk warning task to the highest priority, and forces non-critical applications to switch to background or frozen state.

[0093] The Context Saving and Recovery Manager is used to save the context information of interrupted applications when non-critical applications are preempted or frozen, and to execute hot recovery, cold recovery or delayed recovery strategies after the risk event ends, based on the current system resource parameters and the integrity and validity of the saved context.

[0094] The Display / Audio Channel Manager is used to allocate display focus and audio focus according to the priority order of risk tasks, interactive foreground applications, and background services, based on the scheduler's instructions.

[0095] This system utilizes the cooperation of various modules to save page state, task progress, navigation path, input cache, session information, and window hierarchy information when the application is preempted or frozen. After the risk is resolved, it determines whether to perform hot recovery, cold recovery, or delayed recovery based on the validity of the context and resource conditions. This allows the system to balance the real-time performance of critical tasks, application continuity, and resource utilization efficiency in scenarios where two-wheeled vehicle resources are limited and operating conditions are complex. Attached Figure Description

[0096] Figure 1 This is a flowchart illustrating the cockpit operation control method for two-wheeled vehicles according to the present invention. Detailed Implementation

[0097] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0098] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0099] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0100] This invention discloses a cockpit application operation control method for two-wheeled vehicles, applicable to intelligent cockpit platforms for two-wheeled vehicles integrating applications such as navigation, media, communication, screen projection, logs, diagnostics, and risk alerts. Figure 1 As shown, the cockpit application operation control method for two-wheeled vehicles includes the following steps:

[0101] Construct an application runtime state machine, including a foreground state, a background state, and a frozen state, wherein the frozen state is the state in which the application suspends execution scheduling and retains only the minimum session information required for recovery;

[0102] Collect system resource parameters and / or system events, and determine whether there are risk events based on system events;

[0103] When a risk event is detected, a unified arbitration mechanism for multiple resources is triggered. Based on the risk level of the risk event, display focus, audio focus, and processor quota are uniformly allocated, and the risk alert task is elevated to the highest priority.

[0104] When allocating resources for risk alert tasks, non-critical applications are forced to switch to background or frozen state, and the context of interrupted applications is saved.

[0105] After a risk event concludes, the system determines whether a hot recovery, cold recovery, or delayed recovery strategy is implemented based on current system resource parameters and the integrity and validity of the saved context. After the risk event is resolved, the system first checks for the existence of saved foreground stacks, background queues, and context data. If no valid context exists, a cold start recovery path is executed, directly restarting the target application according to the recovery strategy in the application description repository. If a valid context exists, the system further determines whether resources meet the original foreground recovery requirements: if resources meet the requirements, the original foreground application is restored and necessary interface states are replayed, such as navigation paths, media playback progress, or call interfaces; if resources do not meet the requirements, the original foreground application can be restored to a background state, and low-priority applications can remain frozen until resource conditions are met, at which point they can be gradually unfrozen and restored. This approach avoids the risk of resource congestion caused by immediately restoring a large number of applications after the risk has been resolved.

[0106] Hot recovery refers to the process of directly restoring an interrupted application from a background or frozen state to the foreground state after a risk event has ended, provided that the application's context information is complete and valid and system resources are sufficient. Based on the saved context information, the application's interface state and task progress are restored, allowing the user interface to seamlessly transition to its state before the interruption. Hot recovery does not require restarting the application process, has minimal recovery latency, and provides the best user experience continuity.

[0107] Cold recovery refers to restarting an interrupted application's process according to a pre-defined recovery strategy in the application description repository after a risk event has occurred, when the application's context information is missing, incomplete, or invalid. This restores the application to an interactive state. Cold recovery requires reloading the application, resulting in relatively high recovery latency, but it ensures that the application can still be used normally even if its context is lost.

[0108] Delayed recovery refers to a situation where, after a risk event has ended, the context information of an interrupted application is complete and valid, but current system resources do not yet meet the conditions for recovery to the foreground. In this case, the application is first restored to a background state, while lower-priority applications remain frozen. Once system resource conditions are met, the application is then restored from the background state to the foreground state and a hot recovery is performed. Delayed recovery prioritizes the operation of critical tasks when resources are insufficient, and automatically follows up with hot recovery once resources are sufficient.

[0109] If no risk event is detected, background applications that do not meet the operating conditions will be switched to a frozen state based on system resource parameters.

[0110] This invention divides ordinary cockpit applications into foreground, background, and frozen states, and constructs a strongly constrained state machine based on resource thresholds and event conditions. When a risk event occurs, a risk event arbitrator performs unified arbitration of multiple resources for display focus, audio focus, and processor quota, elevating the risk alert task to the highest priority and switching non-critical applications to background or frozen states.

[0111] In a preferred embodiment of the present invention, the step of determining whether a risk event exists based on system events is as follows:

[0112] Receive collision warning signals, abnormal posture signals, overspeed warning signals or critical fault signals reported by the vehicle controller or body sensors as system events;

[0113] Determine whether a risk event exists based on system events:

[0114] If a collision warning signal or a critical fault signal is received, it is directly determined that a risk event exists;

[0115] If an abnormal attitude signal is received, the attitude angle data carried in the abnormal attitude signal is obtained, and the attitude angle data is compared with a preset attitude angle threshold. When the attitude angle data exceeds the preset attitude angle threshold, a risk event is determined to exist.

[0116] If an overspeed alarm signal is received, the vehicle speed data carried in the overspeed alarm signal is obtained, and the vehicle speed data is compared with a preset vehicle speed threshold. If the vehicle speed data exceeds the preset vehicle speed threshold, a risk event is determined to exist.

[0117] If a risk event exists, the risk event shall be classified into risk levels.

[0118] In a preferred embodiment of the present invention, if a risk event exists, the risk event is classified into risk levels, specifically as follows:

[0119] Upon receiving a collision warning signal, regardless of its parameter value, it is directly classified as a high-risk level.

[0120] If a critical fault signal is received, it will be directly classified as a high-risk level, regardless of the magnitude of its parameter value.

[0121] If an abnormal attitude signal is received, the attitude angle data carried in it is obtained, and the attitude angle data is compared with a preset first attitude angle threshold and a preset second attitude angle threshold. The first attitude angle threshold is less than the second attitude angle threshold.

[0122] When the attitude angle data exceeds the first attitude angle threshold but does not exceed the second attitude angle threshold, it is judged as a low-risk level;

[0123] When the attitude angle data exceeds the second attitude angle threshold, it is judged as a high-risk level;

[0124] If an overspeed warning signal is received, the vehicle speed data carried in it is obtained, and the vehicle speed data is compared with a preset first vehicle speed threshold and a second vehicle speed threshold. If the first vehicle speed threshold is less than the second vehicle speed threshold:

[0125] When the vehicle speed data exceeds the first speed threshold but does not exceed the second speed threshold, it is judged as a low-risk level.

[0126] When the vehicle speed data exceeds the second vehicle speed threshold, it is determined to be at a high risk level.

[0127] In a preferred embodiment of the present invention, when a risk event is detected, a multi-resource unified arbitration mechanism is triggered. Based on the risk level of the risk event, display focus, audio focus, and processor quota are uniformly allocated, and the risk alert task is elevated to the highest priority. The specific steps are as follows:

[0128] When the risk event arbitrator determines that a risk event exists and the risk level of the risk event is not lower than a preset threshold, it sends an arbitration trigger signal to the scheduler.

[0129] After receiving the arbitration trigger signal, the scheduler sends a pause or downgrade command to the application currently in the foreground state, pausing the display refresh and audio output of the current foreground application, and switching the current foreground application to the background state or frozen state.

[0130] The scheduler sends a focus switching command to the display / audio channel manager. Based on the focus switching command, the display / audio channel manager switches the display focus to the risk warning interface and the audio focus to the risk broadcast task.

[0131] The scheduler adjusts processor quotas, elevates the process or thread corresponding to the risk warning task to the highest priority, and allocates processor time slices of no less than a preset threshold.

[0132] When a user is using a navigation or media application as the current foreground application, if the vehicle controller or sensors report a collision warning, abnormal posture, speeding warning, or critical fault, the scheduler first receives the risk event report, and the risk event arbitrator determines the risk level. When the risk level reaches a preset threshold, the scheduler sends a pause or downgrade command to the current foreground application, and simultaneously switches the risk alert application to the foreground. The scheduling display / audio channel manager allocates key display areas and audio playback channels to the risk task. For background applications, the scheduler executes at least one of three strategies: freeze, frequency limiting, or minimum service maintenance. Log applications and diagnostic applications are retained to maintain event logging and fault analysis capabilities.

[0133] In a preferred embodiment of the present invention, when allocating resources for risk warning tasks, the steps of forcibly switching non-critical applications to a background or frozen state and saving the context of interrupted applications are as follows:

[0134] The scheduler obtains the current status and priority information of each cockpit application, and identifies non-critical applications currently in the foreground and background states based on the priority information and / or risk preemption exception rules.

[0135] The scheduler sends pause or downgrade commands to non-critical applications that are currently in the foreground, switching the current foreground application to the background or frozen state;

[0136] The scheduler switches background applications that have been idle for more than a preset idle threshold, have available memory less than a preset memory threshold, or have processor load higher than a preset load threshold to a frozen state.

[0137] Before or simultaneously with the switching of non-critical applications, the context save and restore manager saves the context information of the interrupted application. The context information includes one or more of the following: current page identifier, playback progress, navigation path status, input cache, call session status, and window hierarchy information.

[0138] In a preferred embodiment of the present invention, after a risk event has ended, the method for executing a hot recovery, cold recovery, or delayed recovery strategy based on the current system resource parameters and the integrity and validity determination of the saved context is as follows:

[0139] The system uses a resource monitor to periodically collect data on processor utilization, memory usage, and display / audio channel usage as system resource parameters.

[0140] After a risk event is resolved, the scheduler receives a risk resolution signal from the risk event arbitrator.

[0141] In response to the risk clearance signal, the scheduler checks whether there is any saved context information of the interrupted application;

[0142] If the context information is not available, or the context information is incomplete or invalid, then the cold recovery path is executed: the interrupted application is restarted according to the recovery strategy stored in the preset application description repository;

[0143] If context information exists and is complete and valid, then determine whether the current system resource parameters meet the preset recovery conditions, including one or more of the following conditions:

[0144] The current available memory value is greater than or equal to the preset memory recovery threshold;

[0145] The current processor utilization is less than or equal to the preset load recovery threshold;

[0146] The current display channel is not occupied by a high-priority task;

[0147] The audio channel is not currently monopolized by other applications;

[0148] If the current system resource parameters meet the preset recovery conditions, then execute the hot recovery path: restore the interrupted application from the background or frozen state to the foreground state, and replay the interface state and task progress according to the context information. The interface state includes the window hierarchy structure and page navigation stack, and the task progress includes the navigation path, media playback progress or call interface state.

[0149] If the current system resource parameters do not meet the preset recovery conditions, the delayed recovery path will be executed: the interrupted application will be restored to the background state, and the low-priority application will continue to be frozen until the system resource parameters meet the preset recovery conditions, at which point the interrupted application will be restored from the background state to the foreground state and a hot recovery will be performed.

[0150] In a preferred embodiment of the present invention, the recovery strategy stored in the preset application description repository includes at least one or more of the following parameters:

[0151] Recovery priority is used to determine the recovery order when multiple applications are waiting to be restored;

[0152] Recovery trigger conditions are used to specify the system resource conditions that must be met to perform recovery;

[0153] A list of dependent services, indicating the dependent services that need to be started before the application can be restored;

[0154] Timeout handling rules are used to specify how to handle timeouts when resource conditions are not met for an extended period of time.

[0155] In a preferred embodiment of the present invention, when no risk event is detected, background applications that do not meet the operating conditions are switched to a frozen state based on system resource parameters, as follows:

[0156] The resource monitor periodically collects system resource parameters, and the scheduler obtains the application priority, current status, recent interaction intensity, resource cost, and risk association identifier of each cockpit application.

[0157] A scheduling score is calculated for each candidate application. This scheduling score is determined by weighting multiple factors, including application priority, current state, recent interaction intensity, resource cost, and risk association identifier.

[0158] Scheduling Score = W1 × Priority Score + W2 × Current State Score + W3 × Recent Interaction Intensity Score - W4 × Resource Cost + W5 × Risk Association Bonus

[0159] Among them, W1 to W5 are preset weighting coefficients, for example, W1=0.3, W2=0.2, W3=0.2, W4=0.2, W5=0.1; the priority score is determined by the preset priority level in the application description file; the current state score is mapped to different values ​​according to whether the application is currently in the foreground, background, or frozen state; the recent interaction intensity score is calculated based on the frequency of user operations within a preset time window; the resource cost value is calculated based on the processor utilization and memory usage currently occupied by the application, and is used as a deduction item; the risk association bonus is a preset positive number when the application has a risk association identifier, otherwise it is zero;

[0160] Based on the scheduling score, a scheduling result is generated to determine the target running state of each candidate application. The target running state includes foreground state, background state, and frozen state.

[0161] When the available memory in the system resource parameters is lower than the preset memory threshold or the processor utilization is higher than the preset load threshold, one or more background applications with the lowest scheduling score will be switched to the frozen state based on the scheduling score.

[0162] Before being switched to frozen state, save the context information of the background application.

[0163] In a preferred embodiment of the present invention, the specific steps for generating scheduling results based on scheduling scores and determining the target running state of each candidate application are as follows:

[0164] Sort the candidate applications from highest to lowest according to their scheduling scores;

[0165] The application with the highest scheduling score will be designated as the foreground application, holding both display focus and audio focus.

[0166] Applications with scheduling scores in the middle are identified as background applications and are allowed to continue running at a lower frequency. For example, when the total number of candidate applications is N, the application ranked first is identified as a foreground application, the applications ranked second to ⌈N×30%⌉ are identified as background applications, and the remaining applications are identified as frozen applications.

[0167] One or more applications with the lowest scheduling scores are identified as frozen applications, their scheduling is suspended, and the resources they occupy are released.

[0168] The scheduling results include the target running status of each application, the display focus allocation result, the audio focus allocation result, and the processor quota allocation result.

[0169] For example, assuming there are 10 candidate applications, after sorting them from highest to lowest scheduling score, the application ranked 1st is determined as the foreground application, the applications ranked 2nd and 3rd are determined as background applications, and the applications ranked 4th to 10th are determined as frozen applications. In practical applications, the upper limit of the number of background applications can be dynamically adjusted according to the current system resource parameters: when available memory is sufficient, the number of background applications can be appropriately increased; when available memory is lower than a preset threshold or processor load is higher than a preset threshold, the number of background applications should be reduced, and more applications are switched to a frozen state to release resources.

[0170] In a preferred embodiment of the present invention, the state manager is configured to execute the following state transition rules:

[0171] Switch the application to foreground mode when the user interacts directly or when the scheduling policy specifies otherwise;

[0172] Switch the application to background mode when it loses focus but is still allowed to continue running;

[0173] When the background idle time exceeds the preset idle threshold, the available memory is lower than the preset memory threshold, or the processor load is higher than the preset load threshold, the background application will be switched to a frozen state to release system resources.

[0174] Upon detecting user wake-up, policy restoration, or risk resolution, the frozen application will be restored to either background or foreground state according to the restoration policy.

[0175] In the embodiment, the operating states of ordinary cockpit applications are divided into foreground state, background state, and frozen state.

[0176] Applications in the foreground state hold the main interactive focus and display focus, and can perform scheduling normally while holding display focus and audio focus;

[0177] Applications in the background are allowed to continue running at a lower frequency to maintain necessary session or data updates, without holding display focus and with limited audio focus;

[0178] Applications in a frozen state suspend execution scheduling, retaining only the minimum session information required for recovery, and releasing their occupied processor quota and memory resources. This minimum session information includes at least the application identifier, session ID, page anchor identifier, and resource quota baseline, but excludes temporary runtime data such as real-time rendering cache and media decoding buffer.

[0179] When a user actively wakes up a frozen application, a system policy restore command is received, or a risk event is resolved, the state manager restores the application to either the foreground or background state according to the recovery policy, provided that resources are available. For risky tasks, in the event of a risk event, they can bypass the competition for normal application states and be promoted to the foreground execution entity by the risk event arbitrator, thus preempting the current foreground application.

[0180] Background mode: The process is retained, allocated basic scheduling resources, and continues to run at a low frequency;

[0181] Frozen state: No CPU time slice is allocated, only the minimum session context is retained, and the process is not destroyed.

[0182] The present invention also provides a cockpit application operation control system for two-wheeled vehicles based on the method described herein, comprising:

[0183] The application description repository stores application description files for each cockpit application, recording the application identifier, version information, priority level, foreground eligibility, background quota, freeze eligibility, resource thresholds, dependencies, and recovery strategies for each cockpit application. An application description file must include at least the application name, application version, process entry point, foreground eligibility identifier, background periodic quota, freeze permission identifier, recovery priority, resource upper limit threshold, display focus occupancy rules, audio focus occupancy rules, a list of dependent services, and risk preemption exception rules.

[0184] The state manager is used to build the application runtime state machine, which includes foreground, background, and frozen states. It executes the state transitions of each application in the foreground, background, and frozen states based on resource thresholds and event triggering conditions. By establishing a strongly constrained state machine for the foreground, background, and frozen states, the application state can be matched with resource consumption, reducing the interaction lag caused by background applications occupying resources for a long time.

[0185] The resource monitor is used to periodically collect system resource parameters: processor utilization, memory usage, graphics processor load, remaining storage capacity, display refresh load, and network link status.

[0186] The risk event arbitrator is used to receive system events, determine whether a risk event exists based on the system events, and classify the risk level of the risk event if a risk event exists. By performing unified preemption of display, audio, and processor resources through the risk event arbitrator, the real-time performance and visibility of critical tasks such as risk warnings and fault alarms can be significantly improved.

[0187] The scheduler is used to determine the target operating status of each cockpit application and allocate system resources. When the risk event arbitrator determines that there is a risk event and the risk level of the risk event is not lower than the preset threshold, the scheduler triggers a unified arbitration mechanism for multiple resources, uniformly allocates display focus, audio focus and processor quota, raises the risk warning task to the highest priority, and forces non-critical applications to switch to background or frozen state.

[0188] Preferably, the scheduler collects user interaction events, system events, and risk events; reads the current state of each cockpit application and the usage information of processor, memory, display, and audio resources; determines whether there are any risk events; if there are risk events, it increases the priority of risky tasks and preempts display channels, audio channels, and processor quotas; if there are no risk events, it calculates scheduling scores for candidate applications, and depending on whether resources are sufficient, retains foreground and background applications or puts low-priority applications into a frozen state and saves their context; finally, it outputs the scheduling results and performs state transitions.

[0189] The Context Saving and Recovery Manager is used to save the context information of interrupted applications when non-critical applications are preempted or frozen. After the risk event ends, it performs hot recovery, cold recovery, or delayed recovery strategies based on the current system resource parameters and the integrity and validity of the saved context. By controlling the hot recovery and cold recovery of preempted or frozen applications through the Context Saving and Recovery Manager, the continuity of user experience after the risk event ends can be improved.

[0190] The Display / Audio Channel Manager is used to allocate display focus and audio focus according to the priority order of risk tasks, interactive foreground applications, and background services, based on the scheduler's instructions.

[0191] The overall structure of the cockpit application's operational framework is as follows:

[0192] The two-wheeled vehicle cockpit application operation control system of this invention can be deployed on scooters, motorcycles, electric motorcycles, or hybrid two-wheeled vehicles. An application description repository stores application description files for each cockpit application, defining parameters such as application priority, foreground qualifications, background quotas, freeze permission identifiers, and recovery strategies. This invention enhances adaptability between different vehicle models and hardware configurations by using application description files and a scheduling scoring mechanism tailored to resource-constrained two-wheeled vehicle scenarios.

[0193] The state manager and scheduler work together: the state manager maintains whether each application is currently in the foreground, background, or frozen state, while the scheduler determines the state transition and resource allocation of each application based on resource usage and event input.

[0194] The risk event arbitrator is used to elevate the risk alert application to the highest priority when events such as collision warnings and critical vehicle malfunctions are detected, and to coordinate the display / audio channel manager to switch display and audio focus. When the risk level is not lower than a preset threshold, the risk event arbitrator performs at least two of the following actions (through a unified resource arbitration mechanism, atomically preempting one or more resources (atomic preemption: a group of resource preemption actions are executed as a whole, without intermediate states where some resources are switched and some are not switched, such as batch execution of display focus, audio focus, processor quota, application state changes; if any operation fails, the whole process is rolled back to ensure resource state consistency) and allocation): pausing the current foreground application, reducing the execution frequency of background applications, freezing low-priority applications, switching the display focus to the risk alert interface, switching the audio focus to the risk broadcast task, and retaining the running permissions of the log application and the diagnostic application.

[0195] The resource monitor periodically samples the load of basic resources such as processor, memory, display channels, audio channels, and network links, while the context save and restore manager is responsible for saving and restoring the page state, playback progress, and session information of the preempted application.

[0196] Preferably, the hardware and software deployment of the present invention can be divided into a hardware layer, a system foundation layer, a runtime framework layer, and an application layer.

[0197] The hardware layer includes the main control SoC, memory, storage, display assembly, speakers, microphones, communication modules, and body sensors;

[0198] The system infrastructure layer includes the operating system kernel, drivers, middleware, message bus, and resource monitoring services;

[0199] The runtime framework layer includes an application description repository, a state manager, a scheduler, a risk event arbitrator, and a recovery manager; the application layer is divided into risk alerts / alarms, navigation / calls / screen mirroring, media / logs, and diagnostics / background services, etc., according to priority.

[0200] The runtime framework layer coordinates resource usage and state transitions between layers, ensuring that risk alert applications receive priority resources at all times.

[0201] The specific embodiments described herein are merely illustrative examples of the present invention. Those skilled in the art can make various modifications or additions to the described embodiments or use similar methods to substitute them, without departing from the technology of the present invention or exceeding the scope defined by the appended claims.

[0202] In the embodiments of this application, terms such as "fixed," "fixed connection," and "fixed connection" refer to common fixing methods in the prior art, such as welding, riveting, and screws. "Rotary connection" refers to common rotary connection methods in the prior art, such as hinges and bearing rotation. If electrical components are provided, the functions, control, and power supply methods of all electrical components are common technical means in the prior art. This application has not improved them and they are not within the protection scope of this application. Therefore, this application will not elaborate on them.

[0203] Furthermore, the selection of materials and strength limitations for all components in this application can be made and arranged by those skilled in the art based on the site environment and the requirements of relevant national or industry standards, and are not within the scope of protection of this application. Therefore, this application will not elaborate on these points.

Claims

1. A cockpit operation control method for two-wheeled vehicles, characterized in that, Includes the following steps: Construct an application runtime state machine, including a foreground state, a background state, and a frozen state, wherein the frozen state is the state in which the application suspends execution scheduling and retains only the minimum session information required for recovery; Collect system resource parameters and / or system events, and determine whether there are risk events based on system events; When a risk event is detected, a unified arbitration mechanism for multiple resources is triggered. Based on the risk level of the risk event, display focus, audio focus, and processor quota are uniformly allocated, and the risk alert task is elevated to the highest priority. When allocating resources for risk alert tasks, non-critical applications are forced to switch to background or frozen state, and the context of interrupted applications is saved. After a risk event ends, based on the current system resource parameters and the integrity and validity of the saved context, a hot recovery, cold recovery, or delayed recovery strategy is executed. If no risk event is detected, background applications that do not meet the operating conditions will be switched to a frozen state based on system resource parameters.

2. The cockpit application operation control method for two-wheeled vehicles according to claim 1, characterized in that, The steps for determining whether a risk event exists based on system events are as follows: Receive collision warning signals, abnormal posture signals, overspeed warning signals or critical fault signals reported by the vehicle controller or body sensors as system events; Determine whether a risk event exists based on system events: If a collision warning signal or a critical fault signal is received, it is directly determined that a risk event exists; If an abnormal attitude signal is received, the attitude angle data carried in the abnormal attitude signal is obtained, and the attitude angle data is compared with a preset attitude angle threshold. When the attitude angle data exceeds the preset attitude angle threshold, a risk event is determined to exist. If an overspeed alarm signal is received, the vehicle speed data carried in the overspeed alarm signal is obtained, and the vehicle speed data is compared with a preset vehicle speed threshold. If the vehicle speed data exceeds the preset vehicle speed threshold, a risk event is determined to exist. If a risk event exists, the risk event shall be classified into risk levels.

3. The cockpit application operation control method for two-wheeled vehicles according to claim 2, characterized in that, If a risk event exists, the risk event will be classified into risk levels, specifically as follows: Upon receiving a collision warning signal, regardless of its parameter value, it is directly classified as a high-risk level. If a critical fault signal is received, it will be directly classified as a high-risk level, regardless of the magnitude of its parameter value. If an abnormal attitude signal is received, the attitude angle data carried in it is obtained, and the attitude angle data is compared with a preset first attitude angle threshold and a preset second attitude angle threshold. The first attitude angle threshold is less than the second attitude angle threshold. When the attitude angle data exceeds the first attitude angle threshold but does not exceed the second attitude angle threshold, it is judged as a low-risk level; When the attitude angle data exceeds the second attitude angle threshold, it is judged as a high-risk level; If an overspeed warning signal is received, the vehicle speed data carried in it is obtained, and the vehicle speed data is compared with a preset first vehicle speed threshold and a second vehicle speed threshold. If the first vehicle speed threshold is less than the second vehicle speed threshold: When the vehicle speed data exceeds the first speed threshold but does not exceed the second speed threshold, it is judged as a low-risk level. When the vehicle speed data exceeds the second vehicle speed threshold, it is determined to be at a high risk level.

4. The cockpit application operation control method for two-wheeled vehicles according to claim 1, characterized in that, When a risk event is detected, a unified arbitration mechanism for multiple resources is triggered. Based on the risk level of the risk event, display focus, audio focus, and processor quotas are uniformly allocated, and the risk alert task is elevated to the highest priority. The specific steps are as follows: When the risk event arbitrator determines that a risk event exists and the risk level of the risk event is not lower than a preset threshold, it sends an arbitration trigger signal to the scheduler. After receiving the arbitration trigger signal, the scheduler sends a pause or downgrade command to the application currently in the foreground state, pausing the display refresh and audio output of the current foreground application, and switching the current foreground application to the background state or frozen state. The scheduler sends a focus switching command to the display / audio channel manager. Based on the focus switching command, the display / audio channel manager switches the display focus to the risk warning interface and the audio focus to the risk broadcast task. The scheduler adjusts processor quotas, elevates the process or thread corresponding to the risk warning task to the highest priority, and allocates processor time slices of no less than a preset threshold.

5. The cockpit application operation control method for two-wheeled vehicles according to claim 1, characterized in that, When allocating resources for risk alert tasks, the steps to forcibly switch non-critical applications to background or frozen state and save the context of interrupted applications are as follows: The scheduler obtains the current status and priority information of each cockpit application, and identifies non-critical applications currently in the foreground and background states based on the priority information and / or risk preemption exception rules. The scheduler sends pause or downgrade commands to non-critical applications that are currently in the foreground, switching the current foreground application to the background or frozen state; The scheduler switches background applications that have been idle for more than a preset idle threshold, have available memory less than a preset memory threshold, or have processor load higher than a preset load threshold to a frozen state. Before or simultaneously with the switching of non-critical applications, the context save and restore manager saves the context information of the interrupted application. The context information includes one or more of the following: current page identifier, playback progress, navigation path status, input cache, call session status, and window hierarchy information.

6. The cockpit application operation control method for two-wheeled vehicles according to claim 1, characterized in that, After a risk event concludes, the method for implementing hot recovery, cold recovery, or delayed recovery strategies, based on the current system resource parameters and the integrity and validity of the saved context, is as follows: The system uses a resource monitor to periodically collect data on processor utilization, memory usage, and display / audio channel usage as system resource parameters. After a risk event is resolved, the scheduler receives a risk resolution signal from the risk event arbitrator. In response to the risk clearance signal, the scheduler checks whether there is any saved context information of the interrupted application; If the context information is not available, or the context information is incomplete or invalid, then the cold recovery path is executed: the interrupted application is restarted according to the recovery strategy stored in the preset application description repository; If context information exists and is complete and valid, then determine whether the current system resource parameters meet the preset recovery conditions, including one or more of the following conditions: The current available memory value is greater than or equal to the preset memory recovery threshold; The current processor utilization is less than or equal to the preset load recovery threshold; The current display channel is not occupied by a high-priority task; The audio channel is not currently monopolized by other applications; If the current system resource parameters meet the preset recovery conditions, then execute the hot recovery path: restore the interrupted application from the background or frozen state to the foreground state, and replay the interface state and task progress according to the context information. The interface state includes the window hierarchy structure and page navigation stack, and the task progress includes the navigation path, media playback progress or call interface state. If the current system resource parameters do not meet the preset recovery conditions, the delayed recovery path will be executed: the interrupted application will be restored to the background state, and the low-priority application will continue to be frozen until the system resource parameters meet the preset recovery conditions, at which point the interrupted application will be restored from the background state to the foreground state and a hot recovery will be performed.

7. The cockpit application operation control method for two-wheeled vehicles according to claim 6, characterized in that, The recovery strategies stored in the preset application description repository include at least one or more of the following parameters: Recovery priority is used to determine the recovery order when multiple applications are waiting to be restored; Recovery trigger conditions are used to specify the system resource conditions that must be met to perform recovery; A list of dependent services, indicating the dependent services that need to be started before the application can be restored; Timeout handling rules are used to specify how to handle timeouts when resource conditions are not met for an extended period of time.

8. The cockpit application operation control method for two-wheeled vehicles according to claim 1, characterized in that, When no risk event is detected, the following method is used to switch background applications that do not meet the operating conditions to a frozen state based on system resource parameters: The resource monitor periodically collects system resource parameters, and the scheduler obtains the application priority, current status, recent interaction intensity, resource cost, and risk association identifier of each cockpit application. A scheduling score is calculated for each candidate application. This scheduling score is determined by weighting multiple factors, including application priority, current state, recent interaction intensity, resource cost, and risk association identifier. Scheduling Score = W1 × Priority Score + W2 × Current State Score + W3 × Recent Interaction Intensity Score - W4 × Resource Cost + W5 × Risk Association Bonus Among them, W1 to W5 are preset weight coefficients; the priority score is determined by the preset priority level in the application description file; the current state score is mapped to different values ​​according to whether the application is currently in the foreground, background, or frozen state; the recent interaction intensity score is calculated based on the frequency of user operations within a preset time window; the resource cost is calculated based on the processor utilization and memory usage currently occupied by the application, and serves as a deduction item; the risk association bonus is a preset positive number when the application has a risk association identifier, otherwise it is zero; Based on the scheduling score, a scheduling result is generated, and the target running state of each candidate application is determined. The target running state includes foreground state, background state, and frozen state. When the available memory in the system resource parameters is lower than the preset memory threshold or the processor utilization is higher than the preset load threshold, one or more background applications with the lowest scheduling score will be switched to the frozen state based on the scheduling score. Before being switched to frozen state, save the context information of the background application.

9. The cockpit application operation control method for two-wheeled vehicles according to claim 8, characterized in that, The specific steps for generating scheduling results based on scheduling scores and determining the target running state of each candidate application are as follows: Sort the candidate applications from highest to lowest according to their scheduling scores; The application with the highest scheduling score will be designated as the foreground application, holding both display focus and audio focus. Applications with middle scheduling scores are identified as background applications and allowed to continue running at a lower frequency. One or more applications with the lowest scheduling scores are identified as frozen applications, their scheduling is suspended, and the resources they occupy are released. The scheduling results include the target running status of each application, the display focus allocation result, the audio focus allocation result, and the processor quota allocation result.

10. The cockpit application operation control method for two-wheeled vehicles according to claim 1, characterized in that, Switch the application to foreground mode when the user interacts directly or when the scheduling policy specifies otherwise; Switch the application to background mode when it loses focus but is still allowed to continue running; When the background idle time exceeds the preset idle threshold, the available memory is lower than the preset memory threshold, or the processor load is higher than the preset load threshold, the background application will be switched to the frozen state. Upon detecting user wake-up, policy restoration, or risk resolution, the frozen application will be restored to either background or foreground state according to the restoration policy.

11. A cockpit application operation control system for two-wheeled vehicles based on the method of any one of claims 1-10, characterized in that, include: The application description repository is used to store application description files for each cockpit application. The application description files include application name, application version, process entry point, foreground qualification identifier, background periodic quota, freeze permission identifier, recovery priority, resource upper limit threshold, display focus occupancy rules, audio focus occupancy rules, dependent service list, and risk preemption exception rules. A state manager is used to build an application runtime state machine, which includes a foreground state, a background state, and a frozen state. Based on resource thresholds and event triggering conditions, the state manager executes the state transitions of each cockpit application between the foreground state, background state, and frozen state. The resource monitor is used to periodically collect system resource parameters: processor utilization, memory usage, graphics processor load, remaining storage capacity, display refresh load, and network link status. The risk event arbitrator is used to receive system events, determine whether a risk event exists based on the system events, and classify the risk level of the risk event if a risk event exists. The scheduler is used to determine the target operating status of each cockpit application and allocate system resources. When the risk event arbitrator determines that there is a risk event and the risk level of the risk event is not lower than a preset threshold, the scheduler triggers a unified arbitration mechanism for multiple resources, uniformly allocates display focus, audio focus and processor quota, raises the risk warning task to the highest priority, and forces non-critical applications to switch to background or frozen state. The Context Saving and Recovery Manager is used to save the context information of interrupted applications when non-critical applications are preempted or frozen, and to execute hot recovery, cold recovery or delayed recovery strategies after the risk event ends, based on the current system resource parameters and the integrity and validity of the saved context. The Display / Audio Channel Manager is used to allocate display focus and audio focus according to the priority order of risk tasks, interactive foreground applications, and background services, based on the scheduler's instructions.