Task processing method and device, storage medium and vehicle

By automatically monitoring the status of the on-board diagnostic system and adjusting the priority of firmware upgrade tasks, the problem of resource conflicts between OBD diagnostics and FOTA upgrades is resolved, thereby improving the vehicle's intelligence level and the stability of the upgrade process, and avoiding security vulnerabilities caused by upgrade failures.

CN122132055APending Publication Date: 2026-06-02GREAT WALL MOTOR CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GREAT WALL MOTOR CO LTD
Filing Date
2026-01-07
Publication Date
2026-06-02

Smart Images

  • Figure CN122132055A_ABST
    Figure CN122132055A_ABST
Patent Text Reader

Abstract

This application discloses a task processing method and apparatus, a storage medium, and a vehicle, relating to the field of task processing technology. The method includes: upon receiving an upgrade instruction from a firmware upgrade system, obtaining the operating status of an on-board diagnostic system (ODIS), wherein the upgrade instruction carries an upgrade task; if the ODIS is in the state of executing a diagnostic task, obtaining the task type of the diagnostic task; and if the task type is a target task type, adjusting the priority of the upgrade task so that the firmware upgrade system executes the upgrade task, wherein the target task type is a diagnostic task type that does not affect the safe operation of the vehicle. This method achieves automatic resource coordination without manual intervention, improves the vehicle's intelligence level and user experience, significantly reduces the upgrade failure rate, avoids security vulnerabilities caused by upgrade failures, ensures the FOTA upgrade process is efficient, stable, and reliable, and enhances vehicle safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of task processing technology, and in particular to a task processing method, a computer-readable storage medium, a vehicle, and a task processing device. Background Technology

[0002] In the context of the rapid development of intelligent vehicles and connected vehicle technologies, FOTA (Firmware Over-The-Air) has become the mainstream method for vehicle software updates. It allows for remote updates to onboard system firmware to fix vulnerabilities, improve performance, or add new features. However, OBD (On-Board Diagnostics), as a core tool for vehicle fault diagnosis, is frequently used in repairs and routine monitoring. Both OBD and FOTA upgrades rely on bus resources, meaning that when OBD diagnostics occupies a channel, the FOTA upgrade process can be interrupted or fail. Statistics show that approximately 15% of global FOTA upgrade failures are caused by OBD resource conflicts, which not only affects user experience but may also lead to security risks, such as the failure to promptly fix software vulnerabilities.

[0003] Current solutions mainly rely on manually pausing OBD diagnostics, but the results are unsatisfactory and cannot meet the goals of today's intelligent processing tasks, nor can they achieve automatic coordination, resulting in a poor user experience. Therefore, there is an urgent need for an efficient method to resolve this conflict. Summary of the Invention

[0004] This application aims to at least partially address one of the technical problems in related technologies. To this end, the first objective of this application is to propose a task processing method that automatically monitors the operating status of the on-board diagnostic system and intelligently adjusts the priority of firmware upgrade tasks according to the type of diagnostic task. This achieves automatic resource coordination. By automatically adjusting task priorities, the vehicle can intelligently handle multiple concurrent tasks without manual intervention, significantly improving the vehicle's intelligence level and user experience. It also significantly reduces the upgrade failure rate, avoids security vulnerabilities caused by upgrade failures, ensures the FOTA upgrade process is efficient, stable, and reliable, and enhances vehicle security.

[0005] The second objective of this application is to provide a computer-readable storage medium.

[0006] The third objective of this application is to propose a vehicle.

[0007] The fourth objective of this application is to propose a task processing device.

[0008] To achieve the above objectives, a first aspect of this application proposes a task processing method, the method comprising: upon receiving an upgrade instruction from a firmware upgrade system, obtaining the operating status of an on-board diagnostic system, wherein the upgrade instruction carries an upgrade task; when the operating status of the on-board diagnostic system is executing a diagnostic task, obtaining the task type of the diagnostic task; and if the task type is a target task type, adjusting the priority of the upgrade task so that the firmware upgrade system executes the upgrade task, wherein the target task type is a diagnostic task type that does not affect the safe operation of the vehicle.

[0009] According to the task processing method of this application embodiment, upon receiving an upgrade instruction from a firmware upgrade system, the operating status of the on-board diagnostic system is obtained, wherein the upgrade instruction carries an upgrade task; when the operating status of the on-board diagnostic system is executing a diagnostic task, the task type of the diagnostic task is obtained; if the task type is a target task type, the priority of the upgrade task is adjusted so that the firmware upgrade system executes the upgrade task, wherein the target task type is a diagnostic task type that does not affect the safe operation of the vehicle. Therefore, this method achieves automatic resource coordination without manual intervention, improves the vehicle's intelligence level and user experience, significantly reduces the upgrade failure rate, avoids security vulnerabilities caused by upgrade failures, ensures that the FOTA upgrade process is efficient, stable, and reliable, and enhances vehicle safety.

[0010] In addition, the task processing method according to the above embodiments of this application may also have the following additional technical features: According to one embodiment of this application, adjusting the priority of the upgrade task includes: obtaining a first priority of the diagnostic task; and controlling the priority of the upgrade task to increase to a second priority, wherein the second priority is greater than the first priority.

[0011] According to one embodiment of this application, the method further includes: after controlling the priority of the upgrade task to increase to the second priority, controlling the on-board diagnostic system to suspend the execution of the diagnostic task, so that the firmware upgrade system continues to execute the upgrade task.

[0012] According to one embodiment of this application, the method further includes: when the firmware upgrade system completes the upgrade task, controlling the on-board diagnostic system to perform the diagnostic task.

[0013] According to one embodiment of this application, the method further includes: when the task type is a non-target task type, controlling the firmware upgrade system to suspend the execution of the upgrade task, so that the on-board diagnostic system can execute the diagnostic task.

[0014] According to one embodiment of this application, the method further includes: controlling the firmware upgrade system to perform the upgrade task after the on-board diagnostic system has completed the diagnostic task.

[0015] According to one embodiment of this application, the method further includes: during the process of the firmware upgrade system executing the upgrade task or the vehicle diagnostic system executing the diagnostic task, responding to a user's priority adjustment instruction for the diagnostic task or the upgrade task, adjusting the priority of the corresponding task according to the priority adjustment instruction, and controlling the execution state of the firmware upgrade system for the upgrade task or the execution state of the vehicle diagnostic system for the diagnostic task according to the adjusted priority.

[0016] To achieve the above objectives, a second aspect of this application provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the task processing method described above.

[0017] The computer-readable storage medium according to the embodiments of this application implements the above-described task processing method during execution, thereby achieving automatic resource coordination without manual intervention, improving the vehicle's intelligence level and user experience, significantly reducing the upgrade failure rate, avoiding security vulnerabilities caused by upgrade failures, ensuring that the FOTA upgrade process is efficient, stable and reliable, and enhancing vehicle safety.

[0018] To achieve the above objectives, a vehicle is provided in a third aspect of this application, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described task processing method.

[0019] The vehicle according to the embodiments of this application, by executing the above-described task processing method, achieves automatic resource coordination without human intervention, improves the vehicle's intelligence level and user experience, significantly reduces the upgrade failure rate, avoids security vulnerabilities caused by upgrade failure, ensures that the FOTA upgrade process is efficient, stable and reliable, and enhances vehicle security.

[0020] To achieve the above objectives, a fourth aspect of this application provides a task processing apparatus, comprising: an acquisition module, configured to acquire the operating status of an on-board diagnostic system upon receiving an upgrade instruction from a firmware upgrade system, wherein the upgrade instruction carries an upgrade task; the acquisition module is further configured to acquire the task type of the diagnostic task when the operating status of the on-board diagnostic system is executing a diagnostic task; and a processing module, configured to adjust the priority of the upgrade task when the task type is a target task type, so that the firmware upgrade system executes the upgrade task, wherein the target task type is a diagnostic task type that does not affect the safe operation of the vehicle.

[0021] According to the task processing apparatus of this application embodiment, the acquisition module is used to acquire the operating status of the on-board diagnostic system upon receiving an upgrade instruction from the firmware upgrade system. The upgrade instruction carries an upgrade task. The acquisition module is also used to acquire the task type of the diagnostic task when the operating status of the on-board diagnostic system is executing a diagnostic task. The processing module is used to adjust the priority of the upgrade task when the task type is a target task type, so that the firmware upgrade system can execute the upgrade task. The target task type is a diagnostic task type that does not affect the safe operation of the vehicle. Therefore, this apparatus achieves automatic resource coordination without manual intervention, improves the vehicle's intelligence level and user experience, significantly reduces the upgrade failure rate, avoids security vulnerabilities caused by upgrade failures, ensures that the FOTA upgrade process is efficient, stable, and reliable, and enhances vehicle safety.

[0022] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0023] Figure 1 This is a flowchart of a task processing method according to an embodiment of this application.

[0024] Figure 2 This is a flowchart of a specific example of a task processing method according to this application.

[0025] Figure 3 This is a block diagram of a vehicle according to an embodiment of this application.

[0026] Figure 4 This is a block diagram of a task processing apparatus according to an embodiment of this application. Detailed Implementation

[0027] The embodiments of this application 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 intended to explain this application, and should not be construed as limiting this application.

[0028] The following description, with reference to the accompanying drawings, outlines a task processing method, a computer-readable storage medium, a vehicle, and a task processing apparatus according to embodiments of this application.

[0029] Figure 1 This is a flowchart of a task processing method according to an embodiment of this application.

[0030] like Figure 1 As shown, the task processing method in this application embodiment may include the following steps: S1, upon receiving an upgrade instruction from the firmware upgrade system, obtains the operating status of the on-board diagnostic system, with the upgrade instruction carrying the upgrade task.

[0031] S2, when the on-board diagnostic system is running in the state of executing a diagnostic task, obtain the task type of the diagnostic task.

[0032] S3, when the task type is the target task type, adjust the priority of the upgrade task so that the firmware upgrade system can execute the upgrade task. The target task type is a diagnostic task type that does not affect the safe operation of the vehicle.

[0033] Specifically, upon receiving an upgrade command from the firmware upgrade system, the operating status of the on-board diagnostic system (OBD) can be obtained. The upgrade command carries the upgrade task. The firmware upgrade system refers to the system that remotely updates vehicle firmware via a wireless network. The upgrade command is the upgrade task request sent by the firmware upgrade system. The on-board diagnostic system is used for vehicle fault detection and maintenance, and its operating status refers to the current task execution status of the on-board diagnostic system. For example, an arbitration module can be introduced as the monitoring entity. This module, such as embedding one in the vehicle gateway, monitors OBD and FOTA request signals in real time, monitors and waits for upgrade commands from the firmware upgrade system, and upon receiving the upgrade command, simultaneously checks the current operating status of the on-board diagnostic system. In other words, by obtaining the operating status of the on-board diagnostic system, information is provided for subsequent task scheduling.

[0034] The operational status of the on-board diagnostic system (OBD) is assessed. When the OBD system is executing a diagnostic task, the task type can be obtained. A diagnostic task refers to the ongoing diagnostic activity of the OBD system. Specifically, the OBD system is queried to determine if any diagnostic tasks are in progress. If so, the type of these tasks is further determined to provide a basis for task scheduling. For example, if OBD is currently detecting engine performance diagnostics...

[0035] When the on-board diagnostic system is performing a diagnostic task, the type of the diagnostic task is determined. If the task type is the target task type, the priority of the upgrade task can be adjusted to allow the firmware upgrade system to perform the upgrade task. In other words, the priority of the firmware upgrade task needs to be adjusted based on the type of diagnostic task. The types of diagnostic tasks can include tasks that affect vehicle driving safety (referred to as emergency tasks) and tasks that do not affect vehicle driving safety (referred to as non-emergency tasks). For example, tasks that affect vehicle driving safety include brake system fault diagnosis, steering system anomaly detection, airbag status diagnosis, and tire pressure monitoring system fault troubleshooting; tasks that do not affect vehicle driving safety include entertainment system function checks, air conditioning system performance testing, window lift function testing, and interior lighting system status diagnosis. By classifying diagnostic tasks in this way, the degree of their impact on vehicle safe operation can be more accurately determined, thus providing a clear and crucial basis for adjusting the priority of subsequent upgrade tasks.

[0036] If the diagnostic task is a target task type, the priority of the firmware upgrade task can be increased to ensure that the upgrade task can be executed. Target task types are diagnostic tasks that do not affect the safe operation of the vehicle, such as in-vehicle entertainment system function testing tasks and in-vehicle ambient temperature and humidity sensor calibration tasks. The upgrade task's priority is then set to the highest priority to ensure the firmware upgrade can be performed. For example, when the in-vehicle diagnostic system is performing tasks that affect driving safety, such as brake system fault diagnosis, the firmware upgrade system can temporarily suspend non-urgent upgrade tasks, prioritizing the successful completion of the diagnostic task to ensure vehicle safety. Conversely, if the diagnostic task is an entertainment system function check, and the upgrade task involves optimizing critical safety modules, the priority of the upgrade task can be appropriately increased to complete the firmware update without affecting the vehicle's basic safe operation. This achieves automatic resource coordination without manual intervention, ensuring an efficient and stable FOTA upgrade process.

[0037] In summary, when the vehicle's firmware over-the-air (FOTA) system sends an upgrade command to the arbitration module, it first needs to confirm whether the on-board diagnostic (OBD) system is currently running, such as whether it is performing tasks like fault diagnosis or data acquisition. The upgrade command must clearly include specific upgrade task information, such as upgrading the ECU (Electronic Control Unit) and the upgrade version number. For example, if the vehicle receives an upgrade command from a remote server to "upgrade the engine control module to version V2.1," the arbitration module immediately checks whether the OBD system is running. For instance, the arbitration module can establish a real-time communication connection with the OBD system and send a status query command to obtain the current operating status information of the OBD system. This status information may specifically include whether the OBD system is currently performing a diagnostic task, such as task identification, task type (e.g., fault code reading, real-time data stream acquisition, emissions testing, etc.), task start time, and estimated end time; it can also obtain the current resource usage of the OBD system, such as CPU usage, memory usage, and communication bus load. When the arbitration module receives this information, if it detects that the OBD system has a diagnostic task in progress, or that the OBD system's resource utilization exceeds a preset threshold (e.g., CPU utilization exceeds 80% and memory utilization exceeds 75%), it determines that the OBD system is currently running. Conversely, if the OBD system has no diagnostic tasks in progress and its resource utilization is below the preset threshold, it determines that the OBD system is not currently in a running state that would affect firmware upgrades.

[0038] If the OBD system is running, it is necessary to further identify the type of diagnostic task currently being executed, i.e., to determine whether it belongs to the target task type. The target task type refers to diagnostic tasks that do not affect the safe operation of the vehicle. For such tasks, the priority of the upgrade task can be increased through the system scheduling mechanism, allowing it to be executed before the current diagnostic task. If the diagnostic task is a type that affects the safe operation of the vehicle (such as safety fault diagnosis), the upgrade task must wait for its completion.

[0039] For example, if the OBD system is currently performing an urgent task (a diagnostic task type that affects vehicle safety), such as a core diagnostic task directly related to vehicle driving safety, like in-depth engine fault diagnosis, braking system performance testing, or steering system status assessment, the arbitration module must pause the firmware upgrade task and generate a task conflict warning message. The upgrade process will only restart after the core diagnostic task is completed. Conversely, if the OBD system is currently performing a non-urgent task (a diagnostic task type that does not affect vehicle safety), such as non-core safety diagnostic tasks like in-vehicle navigation map data update assistance testing or in-vehicle ambient lighting control logic verification, the arbitration module will dynamically adjust task priorities according to preset rules, raising the priority of the firmware upgrade task above the current non-core diagnostic task. Simultaneously, it will pause the resource usage of the non-core diagnostic task, allocating the necessary computing resources, communication bandwidth, and storage space to the firmware upgrade task. Once the firmware upgrade task is completed, the paused non-core diagnostic task will resume execution. During this process, the arbitration module must monitor the allocation of system resources and task execution progress in real time to ensure data integrity and system stability during resource switching, avoiding upgrade failures or diagnostic data loss due to resource conflicts.

[0040] Therefore, these steps effectively schedule on-board diagnostic tasks and firmware upgrade tasks, ensuring that firmware upgrade tasks are executed at the appropriate time while avoiding negative impacts on on-board diagnostic tasks. This intelligent task scheduling method improves the operational efficiency and reliability of the vehicle system, reduces task conflicts, and avoids security vulnerabilities caused by upgrade failures, ensuring vehicle performance and safety. Furthermore, it requires no hardware modifications, reducing implementation costs.

[0041] According to one embodiment of this application, adjusting the priority of an upgrade task includes: obtaining a first priority for a diagnostic task; and controlling the priority of the upgrade task to increase to a second priority, wherein the second priority is greater than the first priority.

[0042] Specifically, this involves real-time scanning of diagnostic tasks that are currently running or pending in the on-board diagnostic system, extracting priority identification information for each diagnostic task, including but not limited to preset priority values, priority level labels (such as "low", "medium", "high", "urgent"), or priority weight coefficients, and then determining the first priority of the diagnostic task.

[0043] After obtaining the first priority of the diagnostic task, the priority of the upgrade task can be increased to the second priority, where the second priority is greater than the first priority. In other words, increasing the upgrade task's priority to the second priority involves, after determining the first priority, raising the current priority value of the upgrade task according to preset priority adjustment rules or user configuration parameters. This ensures that the increased second priority is clearly higher than the first priority in terms of numerical value or hierarchical order, thereby enabling the upgrade task to obtain processor resources and execution rights in the system scheduling queue before the diagnostic task.

[0044] For example, if the first priority value of the diagnostic task is 2 (assuming that the larger the value, the higher the priority), the preset priority adjustment rule is that the priority of the upgrade task must be at least 2 numerical units higher than that of the diagnostic task. In this case, the priority of the upgrade task will be increased from the current 2 to 4. At this time, 4 (second priority) is greater than 2 (first priority). If the priority level label of the diagnostic task is "high", and the priority level sorting in the system is "low" < "medium" < "high" < "urgent", then the priority level of the upgrade task will be raised to "urgent" to ensure that its priority is higher than that of the "high" level diagnostic task.

[0045] For example, the On-Board Diagnostics (OBD) system continuously scans the vehicle's status, such as real-time monitoring of tire pressure data or battery health. At this time, the task is in a "running" state, with a priority value of 2 or a "high" level label. The Firmware Over-The-Air (FOTA) system receives an upgrade command from a remote server (such as upgrading an automated driving assistance system). At this time, the upgrade task is in a "pending execution" state, with an initial priority value of 2 or a "medium" level label. If the diagnostic task is detected as having a first priority of 2, the upgrade task's priority is increased to 4 (or "urgent" level) according to the rules. At this point, the upgrade task takes precedence over the diagnostic task in the system scheduling queue, the diagnostic task is suspended, the upgrade task starts and occupies processor resources, and after the upgrade task is completed, the execution of the diagnostic task can be automatically resumed, with the priority returning to the original value of 2, ensuring the continuity of vehicle status monitoring.

[0046] Therefore, by prioritizing in this way, we can effectively avoid delays in upgrade tasks due to diagnostic tasks, ensure that upgrades to the vehicle system can be carried out in a timely manner, and guarantee the updating and iteration of system functions and the improvement of security.

[0047] According to one embodiment of this application, the task processing method further includes: after the priority of the control upgrade task is increased to the second priority, controlling the on-board diagnostic system to suspend the execution of the diagnostic task, so that the firmware upgrade system continues to execute the upgrade task.

[0048] Specifically, after increasing the priority of the upgrade task to the second priority, the on-board diagnostic system can be paused to allow the firmware upgrade system to continue executing the upgrade task. In other words, by pausing non-critical diagnostic tasks through the system scheduling mechanism, hardware resources such as processors and memory are released, ensuring that the upgrade task receives continuous and stable resource support. This avoids upgrade interruptions or failures due to resource contention, thereby improving the stability and reliability of the FOTA process. For example, if the diagnostic task is "in-vehicle temperature sensor calibration" (a non-urgent task, i.e., a diagnostic task that does not affect vehicle driving safety), and the upgrade task is "autonomous driving assistance system firmware update," the temperature calibration task can be paused, and resources can be prioritized for the ADAS upgrade, ensuring a smooth and uninterrupted upgrade process.

[0049] As a result, firmware upgrades can be executed faster, reducing delays caused by waiting for resources. By pausing diagnostic tasks, system instability that may result from resource contention is avoided, thus improving the stability of the vehicle's electronic systems. Through this control strategy, vehicle firmware upgrades and diagnostic tasks can be performed more coordinatedly, ensuring the high priority and timely execution of firmware upgrades while also taking into account the importance of diagnostic tasks. This achieves a balance between tasks, which is crucial for maintaining vehicle performance, safety, and user experience.

[0050] According to one embodiment of this application, the task processing method further includes: controlling the on-board diagnostic system to perform a diagnostic task when the firmware upgrade system has completed the upgrade task.

[0051] Specifically, the system determines whether the firmware upgrade system has completed the upgrade task. If the firmware upgrade system has completed the upgrade task, the on-board diagnostic system can be controlled to perform diagnostic tasks. For example, the status feedback and log records of the firmware upgrade system can determine whether the firmware upgrade was successful. Once the firmware upgrade task is complete, control is transferred to the on-board diagnostic system to continue its diagnostic tasks. For example, the intelligent arbitration module can send instructions to the on-board diagnostic system, instructing it to resume previously suspended diagnostic tasks or start new diagnostic tasks. That is, suspended diagnostic tasks are automatically resumed after the upgrade is completed without manual intervention, ensuring the continuity of vehicle status monitoring, thereby avoiding vehicle function loss due to the upgrade and improving user experience and vehicle safety. For example, after the ADAS upgrade is completed, the "in-vehicle temperature sensor calibration" task is automatically resumed to ensure accurate control of the vehicle's air conditioning system. At the same time, the upgrade task priority can be downgraded from "urgent" to "medium" to await the next instruction.

[0052] For example, when a vehicle needs to undergo a routine emissions system diagnostic check, the progress of the firmware upgrade task is monitored until the upgrade is complete. Then, the emissions system diagnostics are continued via the on-board diagnostic system, allowing the system to receive instructions and begin executing the emissions system diagnostic check. Ultimately, the emissions system diagnostic check is successfully completed, ensuring the vehicle meets environmental standards, and the firmware upgrade is also successfully implemented, improving vehicle performance.

[0053] Therefore, by ensuring the continuous execution of firmware upgrades and diagnostic tasks, the system can utilize its resources more effectively, improving overall efficiency. By smoothly handling task switching, the system avoids instability caused by task interruptions or conflicts, enhancing system stability. Through this task processing method, vehicle firmware upgrades and diagnostic tasks can be performed more coordinatedly, ensuring the execution of critical tasks while improving the operational efficiency and stability of the vehicle system.

[0054] According to one embodiment of this application, the task processing method further includes: when the task type is a non-target task type, controlling the firmware upgrade system to suspend the execution of the upgrade task so that the on-board diagnostic system can perform the diagnostic task.

[0055] Specifically, the system determines the task type of the diagnostic tasks performed by the on-board diagnostic system. If the task type is a non-target task type, the firmware upgrade system can be controlled to pause the upgrade task, allowing the on-board diagnostic system to perform the diagnostic task. Non-target task types refer to emergency diagnostic tasks, which are those requiring immediate attention and affecting the safe operation of the vehicle, such as engine failures or braking system problems. These tasks are crucial to the safe operation of the vehicle and can be identified by real-time monitoring of the vehicle's status and received diagnostic requests.

[0056] Upon identifying an urgent diagnostic task, the firmware upgrade system needs to pause its ongoing upgrade task to free up resources for the on-board diagnostic system. For example, it can send a command to the firmware upgrade system, requesting it to pause its current upgrade task and transfer control to the on-board diagnostic system. Upon receiving the execution command, the on-board diagnostic system begins performing the urgent diagnostic task, such as reading fault codes and conducting performance tests. This allows the on-board diagnostic system to utilize the freed-up resources and immediately begin performing diagnostic tasks to quickly identify and resolve problems.

[0057] For example, while the vehicle is in motion, the on-board diagnostic system detects a fault in the engine control system, requiring immediate diagnosis. First, the fault in the engine control system is identified as an urgent diagnostic task. Then, the firmware upgrade system is instructed to pause its ongoing upgrade task. Next, the on-board diagnostic system begins executing the emergency diagnostic task, reading fault codes and performing necessary tests. In this way, the engine fault is diagnosed and addressed promptly, preventing potentially more serious problems, while the firmware upgrade task safely resumes after the diagnosis is complete.

[0058] Therefore, by prioritizing emergency diagnostic tasks, potential vehicle safety issues can be identified and resolved more quickly. By suspending firmware upgrades, resources can be utilized more effectively, ensuring that emergency tasks are given priority. This enables rapid response to emergencies and improves vehicle operational efficiency and stability.

[0059] According to one embodiment of this application, the task processing method further includes: controlling the firmware upgrade system to perform an upgrade task when the on-board diagnostic system has completed the diagnostic task.

[0060] Specifically, the system can determine whether the on-board diagnostic system has completed its diagnostic task. If the on-board diagnostic system has completed its diagnostic task, the firmware upgrade system can be controlled to perform the upgrade task. This involves real-time monitoring of the on-board diagnostic system's task execution status until completion. For example, the completion of the diagnostic task can be determined through status feedback and task completion signals from the on-board diagnostic system. Once the on-board diagnostic task is complete, control can be transferred to the firmware upgrade system to execute its upgrade task, such as by sending instructions to the firmware upgrade system to start or continue the firmware upgrade task. Furthermore, based on the task completion status, resource allocation and task priorities can be readjusted according to the current vehicle status and task requirements.

[0061] For example, if the on-board diagnostic system detects a fault in the engine control system while the vehicle is in motion and requires immediate diagnosis, it can instruct the firmware upgrade system to pause the ongoing upgrade task. The on-board diagnostic system will then begin performing an emergency diagnostic task, reading fault codes and performing necessary tests. Once the diagnostic task is completed, it can instruct the firmware upgrade system to resume the paused upgrade task.

[0062] Therefore, by intelligently managing task execution, instability caused by resource competition or task conflicts can be avoided, ensuring a smooth handover between firmware upgrade and diagnostic tasks, maintaining the stability and efficiency of the vehicle system, and enabling a smooth transition between firmware upgrade and diagnostic tasks to avoid system interruption or instability caused by task switching.

[0063] According to one embodiment of this application, the task processing method further includes: during the process of the firmware upgrade system performing an upgrade task or the vehicle diagnostic system performing a diagnostic task, responding to a user's priority adjustment instruction for the diagnostic task or the upgrade task, adjusting the priority of the corresponding task according to the priority adjustment instruction, and controlling the execution state of the firmware upgrade system for the upgrade task or the execution state of the vehicle diagnostic system for the diagnostic task according to the adjusted priority.

[0064] Specifically, during the firmware upgrade system's upgrade task or the vehicle diagnostic system's diagnostic task, the system can respond to user commands to adjust the priority of the diagnostic or upgrade tasks. The priority of the corresponding task can be adjusted according to the command, and the execution status of the firmware upgrade system for the upgrade task or the vehicle diagnostic system for the diagnostic task can be controlled based on the adjusted priority. This allows the system to continuously receive status updates from the firmware upgrade system and the vehicle diagnostic system via the vehicle's communication network. For example, a user interface can be provided via a mobile device connected to the user, allowing the user to adjust task priorities as needed. This requires the system to be able to receive commands from the user through the vehicle's user interface (such as a touchscreen, mobile application, or remote control). Based on the user's commands, the priorities of the firmware upgrade and vehicle diagnostic tasks are dynamically adjusted. Thus, after the task priorities are adjusted, the task execution order is rescheduled.

[0065] For example, if a user increases the priority of a firmware upgrade task, the execution status of the on-board diagnostic system can be controlled according to the adjusted priority. For instance, the current on-board diagnostic task can be paused, regardless of its task type. Similarly, if the user increases the priority of an on-board diagnostic task, the execution status of the firmware upgrade system can be controlled, such as pausing the current firmware upgrade task. This allows the diagnostic task to be executed with priority even if it is a non-urgent task, while the upgrade task is paused. Furthermore, after executing the user's command, feedback is provided to confirm the result of the priority adjustment and task scheduling. The user interface displays task status updates, including whether the task is paused, continued, or completed, and also shows the remaining execution time of the current task.

[0066] For example, if a user manually adjusts the priority of a firmware upgrade task from "Medium" to "Urgent" via a mobile application, the currently executing on-board diagnostic task will be immediately paused (regardless of whether the diagnostic task is "engine fault code scanning," "tire pressure monitoring," or "battery health check"), and processor resources will be allocated to the upgrade task first. If the user adjusts the priority of an on-board diagnostic task from "Low" to "High," even if the diagnostic task is not urgent (such as "in-vehicle temperature sensor calibration"), the system will still pause the ongoing firmware upgrade task and execute the diagnostic task first. Furthermore, after executing the user's command, feedback is provided to the user to confirm the result of the priority adjustment and task scheduling. The user interface displays task status updates, including whether the task is paused, continued, or completed, and also shows the remaining execution time of the current task. By responding to the user's priority adjustment commands, the task processing becomes more flexible and adaptable, better meeting the personalized needs of users in different scenarios and further optimizing the dynamic allocation of vehicle system resources.

[0067] As a result, users can control the vehicle maintenance and upgrade process according to their personal needs, improving satisfaction. The system can also respond flexibly to user commands, adapt to different usage scenarios and needs, and manage resources more effectively by dynamically adjusting task priorities, thus avoiding resource waste.

[0068] In one embodiment of this application, if an upgrade command is received from the firmware upgrade system, the operating status of the on-board diagnostic system is obtained. If the on-board diagnostic system has not performed the corresponding diagnostic task, the firmware upgrade task is executed directly, and the upgrade progress is displayed in real time on the user interface, including the percentage completed, the estimated remaining time, and the current upgrade stage (such as "Downloading upgrade package", "Verifying upgrade file", "System configuration update", etc.). If an unstable network connection is detected during the upgrade process, causing the upgrade package download to be interrupted, the system will automatically trigger a breakpoint resume mechanism. After the network is restored, the download will continue from the last interrupted position without restarting. At the same time, the system will push network error and recovery prompts to the user to ensure that the user is informed of the upgrade status in a timely manner. Furthermore, during the firmware upgrade task, if the on-board diagnostic system receives a new diagnostic task request, it will perform task scheduling based on preset default priority rules (e.g., the default priority of firmware upgrade tasks is "medium", and the priority of emergency diagnostic tasks such as "airbag fault detection" is "highest"). If the priority of the newly requested diagnostic task is higher than that of the current upgrade task, the upgrade task will be paused and the current upgrade progress will be saved. The diagnostic task will be executed first, and the upgrade task will be automatically resumed after the diagnostic task is completed. If the priority of the newly requested diagnostic task is lower than or equal to that of the upgrade task, the user interface will prompt the user that "a firmware upgrade task is currently in progress. Do you want to pause the upgrade to execute the diagnostic task?" and provide two options: "Pause upgrade" and "Execute diagnostic later". The user can choose the subsequent operation independently, which fully protects the user's right to know and right to decide.

[0069] In one embodiment of this application, if a diagnostic command from the vehicle diagnostic system is initially received, the running status of the firmware upgrade system can also be obtained. If the firmware upgrade system is not currently executing the corresponding upgrade task, i.e., the firmware system is not running, the diagnostic command can be responded to directly and the diagnostic process can be started to ensure that the diagnostic task can be processed in a timely manner. If the firmware upgrade system is detected to be running, i.e., executing an upgrade task, the priority of the task corresponding to the diagnostic command and the priority of the current upgrade task need to be compared according to the preset priority rules. When the priority of the diagnostic task is higher than that of the upgrade task, the current firmware upgrade task will be paused, the upgrade progress data will be saved, and the execution process of the diagnostic task will be switched immediately. If the priority of the diagnostic task is lower than or equal to that of the upgrade task, a prompt message will be displayed on the user interface, which reads "Firmware upgrade task is in progress, the current diagnostic task has a low priority, do you want to execute the diagnostic task first?" The user will be provided with two interactive options: "Prioritize Diagnosis" and "Continue Upgrade", which can be selected by the user according to their actual needs. This ensures the orderly processing of system tasks while maximizing the satisfaction of the user's personalized operation needs.

[0070] The following is combined with Figure 2 The method described in this application is used to describe the method.

[0071] As a specific example, the task processing method of this application may include the following steps: S101, upon receiving an upgrade instruction from the firmware upgrade system, obtains the operating status of the on-board diagnostic system, with the upgrade instruction carrying the upgrade task.

[0072] S102, determine whether the on-board diagnostic system is in the process of performing a diagnostic task. If yes, proceed to step S103; if no, proceed to step S101.

[0073] S103, Obtain the task type for the diagnostic task.

[0074] S104. Determine whether the task type is a diagnostic task type that does not affect the safe operation of the vehicle. If yes, proceed to step S105; if no, proceed to step S109.

[0075] S105: Obtain the first priority of the diagnostic task and control the priority of the target upgrade task to increase to the second priority, which is greater than the first priority, so that the firmware upgrade system can execute the upgrade task.

[0076] S106, control the on-board diagnostic system to suspend the execution of the target diagnostic task.

[0077] S107. Determine whether the firmware upgrade system has completed the target upgrade task. If yes, proceed to step S108; otherwise, proceed to step S106.

[0078] S108 controls the on-board diagnostic system to perform target diagnostic tasks.

[0079] S109, the firmware upgrade system is controlled to suspend the target upgrade task so that the on-board diagnostic system can perform the target diagnostic task.

[0080] S110, after the on-board diagnostic system has completed the target diagnostic task, controls the firmware upgrade system to perform the target upgrade task.

[0081] In summary, the task processing method according to the embodiments of this application, upon receiving an upgrade instruction from the firmware upgrade system, obtains the operating status of the on-board diagnostic system, wherein the upgrade instruction carries an upgrade task; when the operating status of the on-board diagnostic system is executing a diagnostic task, obtains the task type of the diagnostic task; if the task type is a target task type, adjusts the priority of the upgrade task so that the firmware upgrade system executes the upgrade task, wherein the target task type is a diagnostic task type that does not affect the safe operation of the vehicle. Therefore, this method achieves automatic resource coordination without manual intervention, improves the vehicle's intelligence level and user experience, significantly reduces the upgrade failure rate, avoids security vulnerabilities caused by upgrade failures, ensures that the FOTA upgrade process is efficient, stable, and reliable, and enhances vehicle safety.

[0082] Corresponding to the above embodiments, this application also proposes a computer-readable storage medium.

[0083] The computer-readable storage medium of this application embodiment stores a program thereon, which, when executed by a processor, implements the above-described task processing method.

[0084] The computer-readable storage medium according to the embodiments of this application realizes automatic resource coordination by executing the above-described task processing method, without the need for manual intervention, thereby improving the vehicle's intelligence level and user experience. It can significantly reduce the upgrade failure rate, avoid security vulnerabilities caused by upgrade failures, ensure that the FOTA upgrade process is efficient, stable and reliable, and enhance vehicle safety.

[0085] Corresponding to the above embodiments, this application also proposes a vehicle.

[0086] like Figure 3 As shown, the vehicle 200 in this embodiment may include: a memory 210, a processor 220, and a program stored in the memory 210 and executable on the processor 220. When the processor 220 executes the program, it implements the above-described task processing method.

[0087] The vehicle according to the embodiments of this application, by executing the above-described task processing method, achieves automatic resource coordination without human intervention, improves the vehicle's intelligence level and user experience, significantly reduces the upgrade failure rate, avoids security vulnerabilities caused by upgrade failure, ensures that the FOTA upgrade process is efficient, stable and reliable, and enhances vehicle security.

[0088] Corresponding to the above embodiments, this application also proposes a task processing device.

[0089] like Figure 4 As shown, the task processing device 100 of this application embodiment includes: an acquisition module 110 and a processing module 120.

[0090] The acquisition module 110 is used to acquire the operating status of the on-board diagnostic system upon receiving an upgrade command from the firmware upgrade system. The upgrade command carries an upgrade task. The acquisition module 110 is also used to acquire the task type of the diagnostic task when the on-board diagnostic system is in the state of executing a diagnostic task. The processing module 120 is used to adjust the priority of the upgrade task when the task type is a target task type, so that the firmware upgrade system can execute the upgrade task. The target task type is a diagnostic task type that does not affect the safe operation of the vehicle.

[0091] According to one embodiment of this application, the processing module 120 adjusts the priority of the upgrade task, specifically for: obtaining the first priority of the diagnostic task; and controlling the priority of the upgrade task to increase to the second priority, wherein the second priority is greater than the first priority.

[0092] According to one embodiment of this application, the processing module 120 is further configured to: after the priority of the control upgrade task is increased to the second priority, control the on-board diagnostic system to suspend the execution of the diagnostic task so that the firmware upgrade system continues to execute the upgrade task.

[0093] According to one embodiment of this application, the processing module 120 is further configured to: control the on-board diagnostic system to perform a diagnostic task when the firmware upgrade system has completed the upgrade task.

[0094] According to one embodiment of this application, the processing module 120 is further configured to: control the firmware upgrade system to suspend the execution of the upgrade task when the task type is not the target task type, so that the on-board diagnostic system can perform the diagnostic task.

[0095] According to one embodiment of this application, the processing module 120 is further configured to: control the firmware upgrade system to perform an upgrade task when the on-board diagnostic system has completed the diagnostic task.

[0096] According to one embodiment of this application, the processing module 120 is further configured to: in response to a user's priority adjustment instruction for the diagnostic task or the upgrade task during the execution of an upgrade task by the firmware upgrade system or a diagnostic task by the vehicle diagnostic system, adjust the priority of the corresponding task according to the priority adjustment instruction, and control the execution state of the upgrade task by the firmware upgrade system or the execution state of the diagnostic task by the vehicle diagnostic system according to the adjusted priority.

[0097] It should be noted that for details not disclosed in the task processing device of this application embodiment, please refer to the details disclosed in the task processing method of this application embodiment, which will not be repeated here.

[0098] According to the task processing apparatus of this application embodiment, the first acquisition module is used to acquire the operating status of the on-board diagnostic system upon receiving an upgrade instruction from the firmware upgrade system. The upgrade instruction carries an upgrade task. The acquisition module is further used to acquire the task type of the diagnostic task when the operating status of the on-board diagnostic system is executing a diagnostic task. The processing module is used to adjust the priority of the upgrade task when the task type is a target task type, so that the firmware upgrade system executes the upgrade task. The target task type is a diagnostic task type that does not affect the safe operation of the vehicle. Therefore, this apparatus achieves automatic resource coordination without manual intervention, improves the vehicle's intelligence level and user experience, significantly reduces the upgrade failure rate, avoids security vulnerabilities caused by upgrade failures, ensures that the FOTA upgrade process is efficient, stable, and reliable, and enhances vehicle safety.

[0099] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0100] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0101] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0102] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0103] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A task processing method, characterized in that, The method includes: Upon receiving an upgrade instruction from the firmware upgrade system, the operating status of the on-board diagnostic system is obtained, wherein the upgrade instruction carries an upgrade task. When the on-board diagnostic system is in the operation state of performing a diagnostic task, the task type of the diagnostic task is obtained; When the task type is the target task type, the priority of the upgrade task is adjusted so that the firmware upgrade system executes the upgrade task, wherein the target task type is a diagnostic task type that does not affect the safe operation of the vehicle.

2. The task processing method according to claim 1, characterized in that, Adjusting the priority of the upgrade task includes: Obtain the first priority of the diagnostic task; The priority of the upgrade task is increased to a second priority, which is greater than the first priority.

3. The task processing method according to claim 2, characterized in that, The method further includes: After the priority of the upgrade task is increased to the second priority, the on-board diagnostic system is controlled to suspend the execution of the diagnostic task so that the firmware upgrade system continues to execute the upgrade task.

4. The task processing method according to claim 3, characterized in that, The method further includes: When the firmware upgrade system completes the upgrade task, it controls the on-board diagnostic system to perform the diagnostic task.

5. The task processing method according to claim 2, characterized in that, The method further includes: If the task type is a non-target task type, control the firmware upgrade system to suspend the upgrade task so that the on-board diagnostic system can perform the diagnostic task.

6. The task processing method according to claim 5, characterized in that, The method further includes: If the on-board diagnostic system completes the diagnostic task, the firmware upgrade system is controlled to perform the upgrade task.

7. The task processing method according to claim 1, characterized in that, The method further includes: During the execution of the upgrade task by the firmware upgrade system or the diagnostic task by the vehicle diagnostic system, in response to the user's priority adjustment instruction for the diagnostic task or the upgrade task, the priority of the corresponding task is adjusted according to the priority adjustment instruction, and the execution status of the upgrade task by the firmware upgrade system or the execution status of the diagnostic task by the vehicle diagnostic system is controlled according to the adjusted priority.

8. A computer-readable storage medium, characterized in that, It stores a program that, when executed by a processor, implements the task processing method according to any one of claims 1-7.

9. A vehicle, characterized in that, include: A memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the task processing method according to any one of claims 1-7.

10. A task processing device, characterized in that, The device includes: The acquisition module is used to acquire the operating status of the on-board diagnostic system when it receives an upgrade instruction from the firmware upgrade system, wherein the upgrade instruction carries an upgrade task. The acquisition module is also used to acquire the task type of the diagnostic task when the on-board diagnostic system is in the operation state of executing a diagnostic task; The processing module is configured to adjust the priority of the upgrade task when the task type is the target task type, so that the firmware upgrade system can execute the upgrade task, wherein the target task type is a diagnostic task type that does not affect the safe operation of the vehicle.