System upgrade method, device, control system, vehicle, storage medium, program product, and chip system
By employing a redundant design with at least two sets of storage media and a hierarchical verification strategy in the control system, the cumbersome and risky issues of system upgrades under hardware burning methods are resolved, enabling seamless system upgrades and fault tolerance, and improving the efficiency and reliability of system upgrades.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAOMI EV TECH CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-06-02
Smart Images

Figure CN122132060A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data writing technology, and in particular to system upgrade methods, devices, control systems, vehicles, storage media, program products, and chip systems. Background Technology
[0002] Commonly, updating data in non-volatile storage areas usually relies on hardware burning. Staff need to disassemble the controller and use special tools to update the data. This update method is not only cumbersome and inefficient, but also carries the risk of hardware damage, which seriously restricts the convenience of software maintenance and upgrades. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides a system upgrade method, apparatus, control system, vehicle, storage medium, program product, and chip system.
[0004] According to some embodiments of this disclosure, a system upgrade method is provided, including:
[0005] When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information to an idle storage medium; the control system includes the processor and at least two sets of the storage medium.
[0006] Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
[0007] By employing a redundant storage design with at least two sets of storage media, the control system can perform writes only on idle storage media during upgrades, without affecting the storage media currently accessed by the processor. This avoids response delays in the core control program currently running on the processor due to mid-upgrades of storage media, enabling seamless system upgrades for users. Furthermore, if one set of storage media experiences a hardware failure, the processor can access the other set of storage media, preventing tasks from failing due to a single storage media failure and reducing the frequency of maintenance due to hardware failures.
[0008] In some embodiments of the first aspect, the processor writes upgrade information to a free storage medium, including:
[0009] If the upgrade information would prevent the processor from performing its task, the processor will write the upgrade information to an idle storage medium.
[0010] In some embodiments of the first aspect, before the processor writes the upgrade information to the idle storage medium, it further includes:
[0011] If the control system requires a code upgrade, or a configuration upgrade and a code upgrade, it is determined that the upgrade information would prevent the processor from performing its task.
[0012] It can support remote configuration upgrades, and through remote automated upgrades of the control system, it can liberate human resources, freeing maintenance personnel from tedious and repetitive physical labor and reducing operating costs.
[0013] In some embodiments of the first aspect, when the control system requires configuration and code upgrades, the processor writes the upgrade information to an idle storage medium, including:
[0014] The processor allocates corresponding storage locations for the data and code to be upgraded in a pre-set allocation order, and writes the data and code to be upgraded into the available storage media in sequence according to the allocated storage locations.
[0015] By using a preset allocation order, overlapping storage locations can be avoided for different upgrade content. The order of allocation ensures that the data required for configuration upgrades is allocated to the write location first, thus guaranteeing the successful upgrade of the NVR. By writing in sequence, bus congestion that may occur when writing multiple types of content in parallel is avoided, preventing data transmission errors.
[0016] In some embodiments of the first aspect, upon completion of the upgrade information writing, the method further includes:
[0017] The processor performs partial hash verification on the written code, and / or performs partial hash verification on the written code, and performs full hash verification on the written data.
[0018] If the verification passes, the processor accesses the storage medium containing the upgrade information and executes subsequent tasks; otherwise, the processor continues to access the current storage medium and executes subsequent tasks.
[0019] A layered strategy of partial or full verification is adopted. Partial hash verification is performed on upgrade content that directly affects task operation, has a large amount of data, and takes a long time to verify, thereby avoiding excessive computing power consumption by full verification. Full hash verification is performed on upgrade content that does not directly affect task operation, has a large amount of data, and takes less time to verify, thereby ensuring that parameters are not tampered with or missing. This layered design makes verification more targeted and maximizes the utilization efficiency of the control system's computing resources while ensuring the normal functioning of the control system.
[0020] Upon completion of the upgrade information writing, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks, including:
[0021] After the upgrade information has been written and the processor has finished processing the current task, the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks; or
[0022] Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, in order to execute the currently being processed task and subsequent tasks based on the storage medium where the upgrade information was written.
[0023] It can avoid the risks that may arise from complex access switching of the processor, ensure that each task is completed in a single system environment, thereby guaranteeing data consistency and reducing the difficulty of task response; or, at the moment the control system receives the upgrade information, it can make the tasks running in the control system use the new version of the system for subsequent responses, so that the new features of the upgrade information can be quickly applied to the task response, thereby ensuring the rapid application of the upgrade information.
[0024] In some embodiments of the first aspect, the step of the processor writing upgrade information to an idle storage medium when the processor is performing a task and the control system needs to be upgraded includes:
[0025] When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information into one of the available storage media based on the available capacity of multiple free storage media.
[0026] Upgrade information has fixed capacity requirements. If it is blindly written to storage media with insufficient storage space, the writing process will be interrupted, resulting in incomplete and unusable upgrade information. By pre-checking the available capacity of the free storage media and ensuring that it is greater than or equal to the total size of the upgrade information, the processor can fundamentally avoid the risk of upgrade failure due to insufficient available capacity of the storage media.
[0027] In some embodiments of the first aspect, upon completion of the upgrade information writing, the processor switches to access the storage medium where the upgrade information was written to perform subsequent tasks, including:
[0028] Once the upgrade information has been written and the processor's operating environment meets the preset requirements, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
[0029] By systematically verifying the processor's operating environment before the switching operation, it is possible to effectively avoid performing storage media access switching when system resources are scarce or hardware status is abnormal, reduce the risk of access switching failure due to environmental incompatibility, prevent the control system from falling into a paralyzed state of being unable to work normally, and provide crucial stability assurance for the upgrade process; moreover, it can maintain the current access status of the storage media when any preset requirements are not met, thereby ensuring the business continuity of the control system.
[0030] In some embodiments of the first aspect, after the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks upon completion of the upgrade information writing, the process further includes:
[0031] If a subsequent task fails, the processor switches to the previously accessed storage medium and re-executes the subsequent task.
[0032] By detecting and rolling back the execution failures of subsequent tasks, the smooth execution of subsequent tasks is ensured. This ensures that even if there are defects in the upgrade information, the processor can automatically recover to normal response in a very short time, avoiding the complex operations and high-pressure scenarios that require manual intervention for emergency recovery when problems occur.
[0033] In some embodiments of the first aspect, after the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks upon completion of the upgrade information writing, the process further includes:
[0034] If the processor accesses the storage medium where the upgrade information is written and successfully executes subsequent tasks for a preset duration, the processor will synchronously update the code and / or data in the currently accessed storage medium to at least one other storage medium.
[0035] The redundant and fault-tolerant architecture of the control system was effectively rebuilt and strengthened. During the upgrade process, the previously idle storage media was used to carry upgrade information, which actually consumed the redundant backup resources of the control system. By synchronizing the upgrade information that has been verified to be stable operation to the other storage media, the processor can realize the establishment of a multi-copy redundant state, thereby providing the processor with the basis for access switching and avoiding the control system from stopping due to the failure of a single storage medium.
[0036] In some embodiments of the first aspect, after the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks upon completion of the upgrade information writing, the process further includes:
[0037] If the processor accesses the storage medium where the upgrade information is written and successfully executes subsequent tasks for a preset time, the historical upgrade information stored in the storage medium previously accessed by the processor will be deleted.
[0038] It can maintain the storage of historical upgrade information before new upgrade information is confirmed to be valid and available, thus avoiding the need for the processor to access and roll back, thereby ensuring the smooth operation of the control system. Furthermore, by promptly cleaning up outdated historical upgrade information, it can effectively prevent the storage space from being filled with useless information, ensuring that the control system always has sufficient free capacity to cope with the next upgrade or sudden data storage needs, and avoiding system function limitations or upgrade failures due to insufficient storage space.
[0039] According to some embodiments of this disclosure, a system upgrade apparatus is provided, comprising:
[0040] A first write module is configured to, when the processor is performing a task and the control system needs to be upgraded, write upgrade information to an idle storage medium; the control system includes the processor and at least two sets of the storage medium; when the processor is performing a task and the control system needs to be upgraded, the processor writes upgrade information to an idle storage medium.
[0041] The first execution module is configured such that, upon completion of the upgrade information writing, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
[0042] In some embodiments of the second aspect, the writing module is further configured to:
[0043] If the upgrade information would prevent the processor from performing its task, the processor writes the upgrade information to an idle storage medium and then performs its task.
[0044] In some embodiments of the second aspect, the writing module is further configured to:
[0045] If the control system requires code upgrades, or data and code upgrades, it is determined that the upgrade information will prevent the processor from performing tasks.
[0046] In some embodiments of the second aspect, where the control system requires configuration and code upgrades, the writing module is further configured to:
[0047] The processor allocates corresponding storage locations for the data and code to be upgraded in a pre-set allocation order, and writes the data and code to be upgraded into the available storage media in sequence according to the allocated storage locations.
[0048] In some embodiments of the second aspect, the first execution module is further configured to:
[0049] The processor performs partial hash verification on the written code, or performs partial hash verification on the written code and full hash verification on the written data.
[0050] If the verification passes, the processor accesses the storage medium containing the upgrade information and executes subsequent tasks; otherwise, the processor continues to access the current storage medium and executes subsequent tasks.
[0051] In some embodiments of the second aspect, the first execution module is further configured to:
[0052] After the upgrade information has been written and the processor has finished processing the current task, the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks; or
[0053] Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, in order to execute the currently being processed task and subsequent tasks based on the storage medium where the upgrade information was written.
[0054] In some embodiments of the second aspect, the writing module is further configured to:
[0055] When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information into one of the available storage media based on the available capacity of multiple free storage media.
[0056] In some embodiments of the second aspect, the writing module is further configured to:
[0057] Once the upgrade information has been written and the processor's operating environment meets the preset requirements, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
[0058] In some embodiments of the second aspect, the system upgrade apparatus further includes:
[0059] The second execution module is configured to switch the processor to the previously accessed storage medium and re-execute the subsequent task when the subsequent task fails.
[0060] In some embodiments of the second aspect, the system upgrade apparatus further includes:
[0061] The synchronization module is configured to, when the processor accesses the storage medium that writes the upgrade information and successfully executes subsequent tasks for a preset duration, synchronize and update the code and / or data in the currently accessed storage medium to at least one other storage medium.
[0062] In some embodiments of the second aspect, the system upgrade apparatus further includes:
[0063] The deletion module is configured to delete the historical upgrade information stored in the storage medium previously accessed by the processor when the processor accesses the storage medium that writes the upgrade information and successfully executes subsequent tasks for a preset time.
[0064] According to some embodiments of the present disclosure, a control system is provided, the control system including a processor and at least two sets of storage media;
[0065] The control system is used to execute the steps of the method described in any of the above embodiments to write upgrade information into the storage medium via the processor.
[0066] According to some embodiments of this disclosure, a vehicle is provided, including the control system of any of the above embodiments.
[0067] According to some embodiments of this disclosure, a computer-readable storage medium is provided that stores a computer program or instructions, which, when executed by a processor of an electronic device, enable the electronic device to perform the steps of the method described in any of the above embodiments.
[0068] According to some embodiments of this disclosure, a computer program product is provided, including a computer program that is executed by a processor to perform the steps of the method described in any of the above embodiments.
[0069] According to some embodiments of this disclosure, a chip system is provided, including a processing unit and an interface circuit. The processing unit obtains program instructions through the interface circuit, and the program instructions are executed by the processing unit. The processing unit is used to perform the steps of the method described in any of the above embodiments.
[0070] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: By using a redundant storage design with at least two sets of storage media, the control system can perform writes only on the idle storage media during upgrades, without affecting the storage media currently accessed by the processor. This avoids response delays in the core control program currently running by the processor due to mid-upgrades of the storage media, thereby achieving system upgrades that are imperceptible to the user. Furthermore, if one set of storage media experiences a hardware failure, the processor can access the other set of storage media, avoiding the inability of tasks to run due to a single storage media failure, thereby reducing the frequency of maintenance caused by hardware failures.
[0071] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0072] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0073] Figure 1 This is a flowchart illustrating a system upgrade method according to some embodiments of the present disclosure.
[0074] Figure 2 This is a block diagram illustrating a system upgrade apparatus according to some embodiments of the present disclosure.
[0075] Figure 3 This is a block diagram illustrating a system upgrade apparatus according to some embodiments of the present disclosure.
[0076] Figure 4 This is a block diagram illustrating a system upgrade apparatus according to some embodiments of the present disclosure.
[0077] Figure 5 This is a block diagram illustrating a system upgrade apparatus according to some embodiments of the present disclosure.
[0078] Figure 6 This is a functional block diagram of a vehicle according to some embodiments of the present disclosure.
[0079] Figure 7 This is a functional block diagram of a chip system according to some embodiments of the present disclosure. Detailed Implementation
[0080] Some embodiments of this disclosure will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. Various changes, modifications, and equivalents of the methods, apparatus, and / or systems described herein will become apparent upon understanding this disclosure. For example, the order of operations described herein is merely illustrative and is not limited to those orders set forth herein, but can be changed as will become apparent upon understanding this disclosure, except for operations that must be performed in a particular order. Furthermore, for clarity and brevity, descriptions of features known in the art may be omitted.
[0081] The embodiments described in the following examples of this disclosure are not representative of all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0082] Figure 1 This is a flowchart illustrating a system upgrade method according to some embodiments of the present disclosure, such as... Figure 1 As shown, the system upgrade method includes the following steps.
[0083] In step S11, when the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information into an idle storage medium; the control system includes a processor and at least two sets of storage media.
[0084] A control system is an overall system composed of hardware such as processors and storage media, and internal control software, used to achieve specific control functions. Control systems receive instructions, process data, and drive actuators to complete tasks. Examples include industrial equipment controllers, intelligent terminal control systems, vehicle control systems, and Internet of Things (IoT) control systems.
[0085] The processor is the core computing component of the control system. It is the core entity that triggers access to and upgrades to the storage medium. The processor is responsible for executing preset programs, processing task data, and coordinating the work of various hardware components.
[0086] Storage media refers to the hardware carrier that stores program code, task data, upgrade information, etc. Storage media can be, for example, flash memory, hard disk, etc. A redundant storage structure with at least two sets of storage media is used to ensure that the control system can operate without interruption during the upgrade process.
[0087] Upgrade information refers to a set of data used to update the functionality of a control system, fix vulnerabilities, or optimize performance. Upgrade information can include new program code, configuration files, patch packages, etc. When the control system is a vehicle control system, upgrade information can be used to update the vehicle control system's functionality, fix software vulnerabilities, and optimize control algorithms. Upgrade information may include, for example, powertrain control optimization programs, intelligent driving assistance algorithm upgrade packages, and body control function patches, and is typically pushed out by the vehicle's service provider via over-the-air (OTA) download technology.
[0088] The following embodiments are all based on vehicle control systems as examples. It should be noted that the control system can also be other types of control systems, which will not be elaborated in this application.
[0089] In this embodiment, the processor can obtain complete upgrade information from the service provider's cloud server via the vehicle network, and monitor network stability in real time during the acquisition process. After acquisition, the processor immediately performs integrity and compatibility checks on the upgrade information to confirm that the upgrade information is complete and has not been tampered with, thus preventing malicious program injection. The processor also checks whether the upgrade information matches the current vehicle model, year, and control program version to prevent system failure caused by incorrectly installing upgrade packages for other vehicle models. If the verification fails, the processor immediately stops the upgrade and prompts the user that the upgrade information is abnormal through the vehicle's central control system.
[0090] After successful verification, the processor can, for example, write the upgrade information step by step to the idle storage medium according to a preset secure write protocol. During the writing process, the processor can monitor the write speed of the storage medium, the write status such as the presence of bad blocks, and the driving status such as whether the vehicle suddenly enters high-speed driving or triggers emergency braking. If a write error occurs on the storage medium, the processor will immediately pause the writing and attempt to repair it. If the repair fails, the upgrade will be terminated. If the vehicle status indicates that it is currently in a non-secure upgrade state, such as when the user suddenly accelerates, the writing will be paused and will continue after the vehicle returns to a secure upgrade state.
[0091] In step S12, after the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
[0092] As an example, after the processor has written all the upgrade information to the free storage medium, it can perform a second integrity check on the written upgrade information, comparing the content of the written upgrade information segment by segment with the original upgrade information to see if they are consistent. After confirming that there are no errors or omissions, the processor waits for an appropriate time to switch to accessing the storage medium where the upgrade information was written and execute subsequent tasks.
[0093] In one embodiment, the aforementioned appropriate timing refers to a non-critical moment in driving to ensure that the switching process does not affect the core control function. For example, the processor can determine the current state of the vehicle. If the vehicle is in motion, the processor can consider the current moment not to be an appropriate moment. When the vehicle is stationary and the engine is off, the handbrake is engaged, etc., the processor can consider the current moment to be an appropriate moment. At this time, the processor switches to accessing the storage medium that writes the upgrade information and executes subsequent tasks.
[0094] The aforementioned system upgrade method, through a redundant storage design of at least two sets of storage media, allows the control system to perform writes only on idle storage media during upgrades, without affecting the storage media currently accessed by the processor. This avoids response delays in the core control program currently running by the processor due to mid-upgrade of the storage media, thus achieving a seamless system upgrade for the user. Furthermore, if one set of storage media experiences a hardware failure, the processor can access the other set of storage media, preventing tasks from failing due to a single storage media failure and reducing the frequency of maintenance due to hardware failures.
[0095] In some optional embodiments, step S11 includes:
[0096] If the upgrade information would prevent the processor from performing its tasks, the processor will write the upgrade information to an idle storage medium.
[0097] Specifically, the processor can determine that upgrade information will prevent the processor from performing tasks when the control system requires code upgrades, or when the control system requires both configuration and code upgrades.
[0098] Code upgrade refers to updating the program code in the vehicle control system that is responsible for implementing core functions.
[0099] Configuration upgrade refers to updating, modifying, or replacing the hardware initialization-related configuration data stored in the non-volatile region (NVR) of the vehicle control system chip. This operation will write the new configuration data to the NVR region and complete the configuration.
[0100] Specifically, the steps by which the processor writes the data and code that need to be upgraded to the free storage medium include:
[0101] The processor allocates corresponding storage locations for the data and code that need to be upgraded in a pre-set allocation order, and then writes the data and code to be upgraded into the available storage media in sequence according to the allocated storage locations.
[0102] The pre-set allocation order refers to the storage allocation order of configuration upgrade data and code upgrade code based on principles such as storage efficiency, functional relevance, and security priority. In this embodiment, for example, the data required for configuration upgrade can be set as the highest priority.
[0103] The above system upgrade method can support remote configuration upgrades of NVRs. By using a preset allocation order, it can avoid allocating overlapping storage locations to different upgrade contents. Furthermore, by determining the order of allocation, it can ensure that the data required for configuration upgrades can be allocated to the write location first, thereby ensuring the successful upgrade of the NVR. By writing in sequence, it avoids bus congestion that may occur when multiple types of content are written in parallel, and prevents data transmission errors.
[0104] In some optional embodiments, the above system upgrade method further includes:
[0105] When the processor is performing a task and the control system needs to be configured and upgraded, the processor writes the data that needs to be upgraded into the currently accessed storage medium.
[0106] Once the data requiring upgrade has been written, the processor continues to access the current storage medium to execute subsequent tasks.
[0107] Among them, the data writing required for NVR configuration upgrades does not require a lot of computing power and storage resources, and will not conflict with real-time tasks, so it can be completed in the storage medium currently accessed by the processor.
[0108] In this embodiment, the processor can set the data writing task required for NVR configuration upgrade to a low priority, and prioritize the operation of other high-priority tasks to avoid the data writing process occupying too much bus bandwidth and causing the other tasks running by the processor to be blocked.
[0109] In one embodiment, the processor can save the original NVR configuration data to a preset location before writing the configuration upgrade data. If a read / write error occurs during the writing process, causing the data writing to fail and the NVR to be unable to perform the configuration upgrade normally, the processor can immediately stop writing and restore the original NVR configuration data from the preset location to ensure that the NVR can still operate normally.
[0110] The above system upgrade method does not trigger the switching of storage media accessed by the processor during NVR upgrade, completely avoiding the various risks involved in the storage media switching process. By directly writing the NVR upgrade-related data to the current storage media, there is no need to occupy the storage resources of the idle storage media, so that the idle storage media always has sufficient space, reserving resources for the upgrade of core functions or emergency storage, and avoiding system scheduling pressure caused by storage resource competition.
[0111] In some optional embodiments, after the upgrade information has been written, the system upgrade method further includes:
[0112] The processor performs partial hash verification on the written code, or performs partial hash verification on the written code and full hash verification on the written data.
[0113] If the verification passes, the processor accesses the storage medium containing the upgrade information and executes subsequent tasks; otherwise, the processor continues to access the current storage medium and executes subsequent tasks.
[0114] Partial hash verification refers to a verification method where the processor does not perform a complete hash value check on the code written to the storage medium. Instead, it randomly selects a portion of the code, or a segment of code containing key functional modules, calculates its hash value, and compares it with a standard hash value provided by the service provider. This partial hash verification method can reduce the computational power consumption and shorten the verification time while ensuring security.
[0115] Full hash verification refers to a verification method in which the processor calculates the hash value of the complete data file written to the storage medium and compares it bit by bit with the standard hash value. Since upgrade data is usually a lightweight configuration file, full verification is quick, and data integrity directly affects the normal operation of the function. Therefore, full verification is necessary to ensure that the upgrade data is free from any missing, tampered, or transmitted errors, achieving global verification of data integrity.
[0116] The aforementioned system upgrade method employs a layered strategy of partial or full verification. Partial hash verification is performed on upgrade content that directly affects task operation, involves large amounts of data, and takes a long time to verify, thereby avoiding excessive computing power consumption by full verification. Full hash verification is performed on upgrade content that does not directly affect task operation, involves large amounts of data, and takes less time to verify, thereby ensuring that parameters are not tampered with or missing. This layered design makes verification more targeted, maximizing the utilization efficiency of the control system's computing resources while ensuring the normal functional response of the control system.
[0117] In some optional embodiments, step S11 includes:
[0118] When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information to one of the available storage media based on the available capacity of multiple free storage media.
[0119] Available capacity refers to the amount of unused storage space in a free storage medium that can be used to write data.
[0120] In this embodiment, after obtaining the upgrade information, the processor can send a query command to each free storage medium to obtain its precise available capacity. Furthermore, the processor can compare the total size of the upgrade information with the available capacity of each free storage medium to filter out storage media whose available capacity is less than the total size of the upgrade information.
[0121] Furthermore, the processor can, for example, write the upgrade information to a random remaining storage medium, or it can write the upgrade information to the storage medium with the largest available capacity.
[0122] The aforementioned system upgrade method requires upgrade information with a fixed capacity. If the upgrade information is blindly written to a storage medium with insufficient storage space, the writing process will be interrupted, resulting in incomplete and unusable upgrade information. By pre-checking the available capacity of the free storage medium and ensuring that it is greater than or equal to the total size of the upgrade information, the processor can fundamentally avoid the risk of upgrade failure due to insufficient available capacity of the storage medium.
[0123] In some optional embodiments, step S12 includes:
[0124] Once the upgrade information has been written and the processor's operating environment meets the preset requirements, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
[0125] It should be noted that the processor can also continue to access the current storage medium to perform subsequent tasks and output a prompt message indicating that the storage medium cannot be switched after the upgrade information has been written.
[0126] The processor's operating environment refers to the state of the control system and external conditions during the processor's task execution. The operating environment can include information such as vehicle driving status, core function operation status, system resource load, and hardware health status, which directly affect the security and success rate of storage media switching.
[0127] Preset requirements refer to the pre-defined storage media switching trigger conditions based on vehicle safety and system stability. Preset requirements are used to determine whether the processor's operating environment is suitable for switching.
[0128] A notification message refers to the message displayed by the processor to the user through the in-vehicle interface or the user's terminal when the processor's operating environment does not meet preset requirements and the access to the storage medium cannot be switched. The notification message typically includes the reason for the switching failure and suggested actions.
[0129] In this embodiment, after the upgrade information is written and the data integrity verification is passed, before the processor restarts and switches the access to the storage medium, it first strictly compares the various indicators of the current operating environment with a set of preset requirements.
[0130] If any preset requirement is not met, the processor will terminate the storage medium access switching process and continue to access the current storage medium, that is, continue to run the original version of the system to ensure business continuity.
[0131] The aforementioned system upgrade method, by systematically verifying the processor's operating environment before the switching operation, can effectively avoid performing storage media access switching when system resources are scarce or hardware status is abnormal. This reduces the risk of access switching failure due to environmental incompatibility, prevents the control system from falling into a paralyzed state of being unable to work normally, and provides crucial stability assurance for the upgrade process. Furthermore, it can maintain the current access status of the storage media even if any preset requirements are not met, thereby ensuring the business continuity of the control system.
[0132] In some optional embodiments, after step S12, the method further includes:
[0133] If a subsequent task fails, the processor switches to the previously accessed storage medium and re-executes the subsequent task.
[0134] In this embodiment, after the processor successfully switches to the storage medium where the upgrade information is written and starts executing subsequent tasks, the processor can continuously monitor the execution status of the subsequent tasks. If the subsequent tasks fail, the processor can assume that the written upgrade information is faulty and unusable. At this time, the processor can immediately start the automatic rollback process, quickly restore the switch back to accessing the previous storage medium, and use the information in the original storage medium to run the subsequent tasks, thereby minimizing the upgrade risk.
[0135] The above system upgrade method ensures the smooth execution of subsequent tasks by detecting failures and rolling back access. It also ensures that even if there are defects in the upgrade information, the processor can automatically recover to normal response in a very short time, avoiding the complex operations and high-pressure scenarios that require manual intervention for emergency recovery when problems occur.
[0136] In some optional embodiments, after step S12, the method further includes:
[0137] If the processor accesses the storage medium that writes upgrade information and executes subsequent tasks for a preset duration, the processor will synchronously update the code and / or data in the currently accessed storage medium to at least one other storage medium.
[0138] In this embodiment, after the processor successfully switches to the storage medium for accessing and writing upgrade information and begins executing subsequent tasks, the processor can simultaneously control an internal timer to start timing and continuously monitor the execution status of subsequent tasks.
[0139] If no subsequent tasks fail and the timer reaches the preset duration, the processor can determine that the upgrade has been verified as successful and stable. If subsequent tasks fail before the timer reaches the preset duration, the processor can assume that the written upgrade information is faulty and unusable. In this case, the processor can immediately initiate an automatic rollback process, quickly restore and switch back to accessing the previous storage medium, and use the information in the original storage medium to run subsequent tasks, thereby minimizing the upgrade risk.
[0140] After the processor determines that the upgrade has been verified as successful and stable, the processor can allocate some resources to read, verify and write the specified code and / or data blocks in the storage medium containing the upgrade information to each of the remaining storage media that need to be synchronized, in order to perform system backup. After the writing is completed, integrity verification can be performed to ensure the accuracy of the backup.
[0141] The above system upgrade method effectively rebuilds and strengthens the redundancy and fault tolerance architecture of the control system. During the upgrade process, the previously idle storage media is used to carry upgrade information, which actually consumes the redundant backup resources of the control system. By synchronizing the upgrade information that has been verified through stable operation to other storage media, the processor can establish a multi-copy redundancy state, thereby providing the processor with the basis for access switching and avoiding the control system from stopping due to the failure of a single storage medium.
[0142] In some optional embodiments, after step S12, the method further includes:
[0143] If subsequent tasks are executed successfully, the processor will delete the historical upgrade information stored in each storage medium after a preset time.
[0144] In this embodiment, the processor can retain the historical upgrade information stored in the storage medium that the processor originally accessed before the processor completes the stable operation verification of the upgrade information, i.e. the data of the old version. After determining that the new version supported by the new upgrade information can run stably, the historical upgrade information is deleted, thereby avoiding the need for the processor to perform access rollback switching before the preset time.
[0145] The above-mentioned system upgrade method can maintain the storage of historical upgrade information before new upgrade information is confirmed to be valid and available, thus avoiding the need for the processor to access and roll back, thereby ensuring the smooth operation of the control system. Furthermore, by promptly cleaning up outdated historical upgrade information, it can effectively prevent the storage space from being filled with useless information, ensuring that the control system always has sufficient free capacity to cope with the next upgrade or sudden data storage needs, and avoiding system function limitations or upgrade failures due to insufficient storage space.
[0146] In some optional embodiments, step S12 includes:
[0147] Once the upgrade information has been written and the processor has finished processing the current task, the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks; or
[0148] Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, in order to execute the currently being processed and subsequent tasks based on the storage medium where the upgrade information was written.
[0149] In this embodiment, after the upgrade information is written, the processor does not immediately perform a switch, but continues to access the current storage medium until all steps of the current task being run by the processor are successfully executed. At this point, the processor then performs an access switch, using the new version of the system corresponding to the upgrade information to process subsequent tasks.
[0150] Alternatively, the processor can immediately abandon the execution of the current task after the upgrade information is written, perform an access switch, and then use the new version of the system corresponding to the upgrade information to process the current task. After all steps of the current task are successfully executed, the processor can continue to use the new version of the system corresponding to the upgrade information to process subsequent tasks.
[0151] In one embodiment, the processor may not immediately perform the switch after the upgrade information is written, but instead perform the access switch when the processor is idle; or, the processor may perform the access switch at a preset time point after the upgrade information is written, for example, at 2:00 AM.
[0152] The above system upgrade methods can avoid the risks that may arise from complex processor access switching, ensure that each task is completed in a single system environment, thereby guaranteeing data consistency and reducing the difficulty of task response; or, at the moment the control system receives the upgrade information, the tasks running in the control system can be made to use the new version of the system for subsequent responses, so that the new features of the upgrade information can be quickly applied to task responses, thereby ensuring the rapid application of the upgrade information.
[0153] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0154] Figure 2 This is a block diagram illustrating a system upgrade apparatus 200 according to some embodiments of the present disclosure. (Refer to...) Figure 2 The device includes a writing module 201 and a first execution module 202.
[0155] The write module 201 is configured to write upgrade information to an idle storage medium when the processor is performing a task and the control system needs to be upgraded; the control system includes a processor and at least two sets of storage media.
[0156] The first execution module 202 is configured to, after the upgrade information has been written, switch the processor to access the storage medium where the upgrade information was written and execute subsequent tasks.
[0157] In some optional embodiments, the write module 201 is further configured to:
[0158] If the upgrade information would prevent the processor from performing its tasks, the processor will write the upgrade information to an idle storage medium.
[0159] In some optional embodiments, the write module 201 is further configured to:
[0160] In situations where the control system requires code upgrades, or data and code upgrades, determining that the upgrade information will prevent the processor from performing tasks.
[0161] In some optional embodiments, the write module 201 is further configured to:
[0162] The processor allocates corresponding storage locations for the data and code that need to be upgraded in a pre-set allocation order, and then writes the data and code to be upgraded into the available storage media in sequence according to the allocated storage locations.
[0163] In some optional embodiments, the first execution module 202 is further configured to:
[0164] The processor performs partial hash verification on the written code and / or full hash verification on the written data;
[0165] If the verification passes, the processor accesses the storage medium containing the upgrade information and executes subsequent tasks; otherwise, the processor continues to access the current storage medium and executes subsequent tasks.
[0166] In some optional embodiments, the write module 201 is further configured to:
[0167] When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information to one of the available storage media based on the available capacity of multiple free storage media.
[0168] In some optional embodiments, the write module 201 is further configured to:
[0169] Once the upgrade information has been written and the processor's operating environment meets the preset requirements, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
[0170] Otherwise, the processor continues to access the current storage medium to perform subsequent tasks and outputs a message indicating that the storage medium cannot be switched.
[0171] like Figure 3 As shown, in some optional embodiments, the system upgrade device 200 further includes:
[0172] The second execution module 205 is configured to switch the processor to the previously accessed storage medium and re-execute the subsequent task when the subsequent task fails.
[0173] like Figure 4 As shown, in some optional embodiments, the system upgrade device 200 further includes:
[0174] Synchronization module 206 is configured to, when the processor accesses the storage medium that writes upgrade information and successfully executes subsequent tasks for a preset duration, the processor will synchronously update the code and / or data in the currently accessed storage medium to the other storage media.
[0175] like Figure 5 As shown, in some optional embodiments, the system upgrade device 200 further includes:
[0176] The deletion module 207 is configured to delete the historical upgrade information stored in the storage medium previously accessed by the processor when the processor accesses the storage medium that writes the upgrade information and successfully executes subsequent tasks for a preset duration.
[0177] In some optional embodiments, the write module 201 is further configured to:
[0178] Once the upgrade information has been written and the processor has finished processing the current task, the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks; or
[0179] Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, in order to execute the currently being processed and subsequent tasks based on the storage medium where the upgrade information was written.
[0180] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0181] Figure 6 This is a block diagram illustrating a vehicle 600 according to an exemplary embodiment. For example, vehicle 600 can be a hybrid vehicle, a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other types of vehicle. Vehicle 600 can be an intelligent assisted driving vehicle, a semi-intelligent assisted driving vehicle, or a non-intelligent assisted driving vehicle.
[0182] Reference Figure 6 The vehicle 600 may include various subsystems, such as an infotainment system 610, a perception system 620, a decision control system 630, a drive system 640, and a computing platform 650. The vehicle 600 may also include more or fewer subsystems, and each subsystem may include multiple components. Furthermore, each subsystem and each component of the vehicle 600 can be interconnected via wired or wireless means.
[0183] In some embodiments, the infotainment system 610 may include a communication system, an entertainment system, and a navigation system, etc.
[0184] The perception system 620 may include several sensors for sensing information about the environment surrounding the vehicle 600. For example, the perception system 620 may include a global positioning system (which may be GPS, BeiDou, or other positioning systems), an inertial measurement unit (IMU), lidar, millimeter-wave radar, ultrasonic radar, and a camera device.
[0185] The decision control system 630 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.
[0186] The drive system 640 may include components that provide powered motion to the vehicle 600. In one embodiment, the drive system 640 may include an engine, an energy source, a transmission system, and wheels. The engine may be one or a combination of internal combustion engines, electric motors, and compressed air engines. The engine is capable of converting energy provided by the energy source into mechanical energy.
[0187] Some or all of the functions of vehicle 600 are controlled by computing platform 650. Computing platform 650 may include at least one processor 651 and memory 652, processor 651 can execute instructions 653 stored in memory 652.
[0188] Processor 651 can be any conventional processor, such as a commercially available CPU. Processors may also include graphics processing units (GPUs), field-programmable gate arrays (FPGAs), systems-on-chips (SoCs), application-specific integrated circuits (ASICs), or combinations thereof.
[0189] The memory 652 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0190] In addition to instruction 653, memory 652 can also store data, such as road maps, route information, vehicle position, direction, speed, and other data. The data stored in memory 652 can be used by computing platform 650.
[0191] In this embodiment of the disclosure, processor 651 may execute instruction 653 to complete all or part of the steps of the above-described system upgrade method.
[0192] In some embodiments of this disclosure, a computer-readable storage medium including instructions is also provided, such as a memory including instructions that can be executed by a processor of a device to perform the methods described above. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0193] A computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a system upgrade method, the method comprising:
[0194] When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information to an idle storage medium; the control system includes a processor and at least two sets of storage media.
[0195] Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
[0196] In some alternative embodiments, the processor writes upgrade information to a free storage medium, including:
[0197] If the upgrade information would prevent the processor from performing its tasks, the processor will write the upgrade information to an idle storage medium.
[0198] In some optional embodiments, before the processor writes the upgrade information to an idle storage medium, the method further includes:
[0199] In cases where the control system requires code upgrades, or both configuration and code upgrades, determining that upgrade information will prevent the processor from performing tasks.
[0200] In some alternative embodiments, when the control system requires configuration and code upgrades, the processor writes the upgrade information to an idle storage medium.
[0201] The processor allocates corresponding storage locations for the data and code that need to be upgraded in a pre-set allocation order, and then writes the data and code to be upgraded into the available storage media in sequence according to the allocated storage locations.
[0202] In some optional embodiments, the method further includes, upon completion of the upgrade information writing:
[0203] When the processor is performing a task and the control system needs to be configured and upgraded, the processor writes the data that needs to be upgraded into the currently accessed storage medium.
[0204] Once the data requiring upgrade has been written, the processor continues to access the current storage medium to execute subsequent tasks.
[0205] In some optional embodiments, the method further includes, upon completion of the upgrade information writing:
[0206] The processor performs partial hash verification on the written code, or performs partial hash verification on the written code and full hash verification on the written data.
[0207] If the verification passes, the processor accesses the storage medium containing the upgrade information and executes subsequent tasks; otherwise, the processor continues to access the current storage medium and executes subsequent tasks.
[0208] In some optional embodiments, after the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and performs subsequent tasks, including:
[0209] Once the upgrade information has been written and the processor has finished processing the current task, the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks; or
[0210] Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, in order to execute the currently being processed and subsequent tasks based on the storage medium where the upgrade information was written.
[0211] In some optional embodiments, when the processor is performing a task and the control system needs to be upgraded, the processor writes upgrade information to an idle storage medium, including:
[0212] When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information to one of the available storage media based on the available capacity of multiple free storage media.
[0213] In some optional embodiments, after the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and performs subsequent tasks, including:
[0214] Once the upgrade information has been written and the processor's operating environment meets the preset requirements, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
[0215] Otherwise, the processor continues to access the current storage medium to perform subsequent tasks and outputs a message indicating that the storage medium cannot be switched.
[0216] In some optional embodiments, after the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, and after performing subsequent tasks, the process further includes:
[0217] If a subsequent task fails, the processor switches to the previously accessed storage medium and re-executes the subsequent task.
[0218] In some optional embodiments, after the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, and after performing subsequent tasks, the process further includes:
[0219] If the processor accesses the storage medium where upgrade information is written and successfully executes subsequent tasks for a preset duration, the processor will synchronously update the code and / or data in the currently accessed storage medium to at least one other storage medium.
[0220] In some optional embodiments, after the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, and after performing subsequent tasks, the process further includes:
[0221] If the processor accesses the storage medium where the upgrade information was written and successfully executes subsequent tasks for a preset duration, the historical upgrade information stored in the storage medium previously accessed by the processor will be deleted.
[0222] This disclosure also provides a computer program product, including a computer program executed by a processor to perform a system upgrade method, the method comprising:
[0223] When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information to an idle storage medium; the control system includes a processor and at least two sets of storage media.
[0224] Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
[0225] In some alternative embodiments, the processor writes upgrade information to a free storage medium, including:
[0226] If the upgrade information would prevent the processor from performing its tasks, the processor will write the upgrade information to an idle storage medium.
[0227] In some optional embodiments, before the processor writes the upgrade information to an idle storage medium, the method further includes:
[0228] In cases where the control system requires code upgrades, or both configuration and code upgrades, determining that upgrade information will prevent the processor from performing tasks.
[0229] In some alternative embodiments, when the control system requires configuration and code upgrades, the processor writes the upgrade information to an idle storage medium.
[0230] The processor allocates corresponding storage locations for the data and code that need to be upgraded in a pre-set allocation order, and then writes the data and code to be upgraded into the available storage media in sequence according to the allocated storage locations.
[0231] In some optional embodiments, the method further includes, upon completion of the upgrade information writing:
[0232] When the processor is performing a task and the control system needs to be configured and upgraded, the processor writes the data that needs to be upgraded into the currently accessed storage medium.
[0233] Once the data requiring upgrade has been written, the processor continues to access the current storage medium to execute subsequent tasks.
[0234] In some optional embodiments, the method further includes, upon completion of the upgrade information writing:
[0235] The processor performs partial hash verification on the written code, or performs partial hash verification on the written code and full hash verification on the written data.
[0236] If the verification passes, the processor accesses the storage medium containing the upgrade information and executes subsequent tasks; otherwise, the processor continues to access the current storage medium and executes subsequent tasks.
[0237] In some optional embodiments, after the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and performs subsequent tasks, including:
[0238] Once the upgrade information has been written and the processor has finished processing the current task, the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks; or
[0239] Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, in order to execute the currently being processed and subsequent tasks based on the storage medium where the upgrade information was written.
[0240] In some optional embodiments, when the processor is performing a task and the control system needs to be upgraded, the processor writes upgrade information to an idle storage medium, including:
[0241] When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information to one of the available storage media based on the available capacity of multiple free storage media.
[0242] In some optional embodiments, after the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and performs subsequent tasks, including:
[0243] Once the upgrade information has been written and the processor's operating environment meets the preset requirements, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
[0244] Otherwise, the processor continues to access the current storage medium to perform subsequent tasks and outputs a message indicating that the storage medium cannot be switched.
[0245] In some optional embodiments, after the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, and after performing subsequent tasks, the process further includes:
[0246] If a subsequent task fails, the processor switches to the previously accessed storage medium and re-executes the subsequent task.
[0247] In some optional embodiments, after the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, and after performing subsequent tasks, the process further includes:
[0248] If the processor accesses the storage medium where upgrade information is written and successfully executes subsequent tasks for a preset duration, the processor will synchronously update the code and / or data in the currently accessed storage medium to at least one other storage medium.
[0249] In some optional embodiments, after the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, and after performing subsequent tasks, the process further includes:
[0250] If the processor accesses the storage medium where the upgrade information was written and successfully executes subsequent tasks for a preset duration, the historical upgrade information stored in the storage medium previously accessed by the processor will be deleted.
[0251] Some embodiments of this disclosure also provide a chip system, such as Figure 7 As shown, the chip system includes at least one processor 701 and at least one interface circuit 702. The processor 701 and the interface circuit 702 are interconnected via lines. For example, the interface circuit 702 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 702 can be used to send signals to other devices (e.g., the processor 701). Exemplarily, the interface circuit 702 can read instructions stored in memory and send those instructions to the processor 701. When the instructions are executed by the processor 701, the system upgrade device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, and some embodiments of this disclosure do not specifically limit this.
[0252] In some embodiments of this disclosure, the interface circuit 702 can acquire data, program instructions, and / or information from the internal storage area of the chip system; it can also acquire data, program instructions, and / or information from outside the chip system.
[0253] Optionally, the chip system also includes a memory 703, which is used to store necessary computer programs and data.
[0254] Those skilled in the art will also understand that the various illustrative logical blocks and steps listed in the embodiments of this application can be implemented by electronic hardware, computer software, or a combination of both. Whether such functionality is implemented through hardware or software depends on the specific application and the overall system design requirements. Those skilled in the art can implement the functionality using various methods for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of this application.
[0255] Furthermore, the term “exemplary” is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as “exemplary” is not necessarily to be construed as advantageous compared to other aspects or designs. Rather, the use of the term “exemplary” is intended to present the concept in a concrete manner. As used herein, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or.” That is, unless otherwise specified or clear from the context, “X applies A or B” is intended to mean any of the natural inclusive arrangements. That is, “X applies A or B” satisfies any of the foregoing instances if X applies A; X applies B; or both X applies A and B. Additionally, unless otherwise specified or clear from the context to refer to the singular form, the articles “a” and “an” as used in this application and the appended claims are generally understood to mean “one or more.”
[0256] Similarly, although this disclosure has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art upon reading and understanding this specification and the accompanying drawings. This disclosure includes all such modifications and variations and is limited only by the scope of the claims. In particular, with respect to the various functions performed by the components described above (e.g., elements, resources, etc.), unless otherwise indicated, the terminology used to describe such components is intended to correspond to any component (functionally equivalent) that performs the specific function of the described component, even if structurally not equivalent to the disclosed structure. Furthermore, although specific features of this disclosure may have been disclosed with respect to only one of several implementations, such features may be combined with one or more other features of other implementations, as may be desired and advantageous to any given or particular application. Moreover, with regard to the terms “comprising,” “owning,” “having,” “having,” or variations thereof as used in the detailed description or claims, such terms are intended to be inclusive in a manner similar to the term “including.”
[0257] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0258] Although terms such as “first,” “second,” and “third” may be used herein to describe various components, parts, regions, layers, or sections, these components, parts, regions, layers, or sections are not limited to these terms. Rather, these terms are used only to distinguish one component, part, region, layer, or section from another. Therefore, without departing from the teachings of the examples described herein, the first component, part, region, layer, or section mentioned in the examples may also be referred to as the second component, part, region, layer, or section. 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 indicated technical features. Thus, a feature defined as “first” or “second” may explicitly or implicitly include at least one of that feature. In the description herein, “a plurality” means at least two, such as two, three, etc., unless otherwise explicitly specified.
Claims
1. A system upgrade method, characterized in that, include: When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information to an idle storage medium. The control system includes the processor and at least two sets of the storage media; Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
2. The system upgrade method according to claim 1, characterized in that, The processor writes the upgrade information into an idle storage medium, including: If the upgrade information would prevent the processor from performing its task, the processor will write the upgrade information to an idle storage medium.
3. The system upgrade method according to claim 2, characterized in that, Before the processor writes the upgrade information to the idle storage medium, it also includes: If the control system requires a code upgrade, or if the control system requires both a configuration upgrade and a code upgrade, it is determined that the upgrade information will prevent the processor from performing the task.
4. The system upgrade method according to claim 3, characterized in that, In the event that the control system requires configuration and code upgrades, the processor writes the upgrade information to an idle storage medium, including: The processor allocates corresponding storage locations for the data and code to be upgraded in a pre-set allocation order, and writes the data and code to be upgraded into the available storage media in sequence according to the allocated storage locations.
5. The system upgrade method according to claim 3 or 4, characterized in that, When the upgrade information has been written, the method further includes: The processor performs partial hash verification on the written code, or performs partial hash verification on the written code and full hash verification on the written data. If the verification passes, the processor accesses the storage medium containing the upgrade information and executes subsequent tasks; otherwise, the processor continues to access the current storage medium and executes subsequent tasks.
6. The system upgrade method according to claim 1, characterized in that, Upon completion of the upgrade information writing, the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks, including: After the upgrade information has been written and the processor has finished processing the current task, the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks; or Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, in order to execute the currently being processed task and subsequent tasks based on the storage medium where the upgrade information was written.
7. The system upgrade method according to claim 1, characterized in that, When the processor is executing a task and the control system needs to be upgraded, the processor writes upgrade information to an idle storage medium, including: When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information into one of the available storage media based on the available capacity of multiple free storage media.
8. The system upgrade method according to claim 1, characterized in that, Upon completion of the upgrade information writing, the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks, including: Once the upgrade information has been written and the processor's operating environment meets the preset requirements, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
9. The system upgrade method according to claim 1, characterized in that, After the upgrade information is written, and the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks, the process further includes: If a subsequent task fails, the processor switches to the previously accessed storage medium and re-executes the subsequent task.
10. The system upgrade method according to claim 1, characterized in that, After the upgrade information is written, and the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks, the process further includes: If the processor accesses the storage medium where the upgrade information is written and successfully executes subsequent tasks for a preset duration, the processor will synchronously update the code and / or data in the currently accessed storage medium to at least one other storage medium.
11. The system upgrade method according to claim 10, characterized in that, After the upgrade information is written, and the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks, the process further includes: If the processor accesses the storage medium where the upgrade information is written and successfully executes subsequent tasks for a preset time, the historical upgrade information stored in the storage medium previously accessed by the processor will be deleted.
12. A system upgrade device, characterized in that, include: The write module is configured to write upgrade information to an idle storage medium when the processor is performing a task and the control system needs to be upgraded. The control system includes the processor and at least two sets of the storage media; The first execution module is configured such that, upon completion of the upgrade information writing, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
13. The system upgrade device according to claim 12, characterized in that, The writing module is also configured to: If the upgrade information would prevent the processor from performing its task, the processor will write the upgrade information to an idle storage medium.
14. The system upgrade device according to claim 13, characterized in that, The writing module is also configured to: If the control system requires code upgrades, or data and code upgrades, it is determined that the upgrade information will prevent the processor from performing tasks.
15. The system upgrade device according to claim 14, characterized in that, In cases where the control system requires configuration and code upgrades, the writing module is further configured to: The processor allocates corresponding storage locations for the data and code to be upgraded in a pre-set allocation order, and writes the data and code to be upgraded into the available storage media in sequence according to the allocated storage locations.
16. The system upgrade device according to claim 14 or 15, characterized in that, The first execution module is also configured to: The processor performs partial hash verification on the written code, or performs partial hash verification on the written code and full hash verification on the written data. If the verification passes, the processor accesses the storage medium containing the upgrade information and executes subsequent tasks; otherwise, the processor continues to access the current storage medium and executes subsequent tasks.
17. The system upgrade device according to claim 12, characterized in that, The first execution module is also configured to: After the upgrade information has been written and the processor has finished processing the current task, the processor switches to access the storage medium where the upgrade information was written to execute subsequent tasks; or Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written, in order to execute the currently being processed task and subsequent tasks based on the storage medium where the upgrade information was written.
18. The system upgrade device according to claim 12, characterized in that, The writing module is also configured to: When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information into one of the available storage media based on the available capacity of multiple free storage media.
19. The system upgrade device according to claim 12, characterized in that, The writing module is also configured to: Once the upgrade information has been written and the processor's operating environment meets the preset requirements, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
20. The system upgrade device according to claim 12, characterized in that, The system upgrade device also includes: The second execution module is configured to switch the processor to the previously accessed storage medium and re-execute the subsequent task when the subsequent task fails.
21. The system upgrade device according to claim 12, characterized in that, The system upgrade device also includes: The synchronization module is configured to, when the processor accesses the storage medium that writes the upgrade information and successfully executes subsequent tasks for a preset duration, synchronize and update the code and / or data in the currently accessed storage medium to at least one other storage medium.
22. The system upgrade device according to claim 12, characterized in that, The system upgrade device also includes: The deletion module is configured to delete the historical upgrade information stored in the storage medium previously accessed by the processor when the processor accesses the storage medium that writes the upgrade information and successfully executes subsequent tasks for a preset time.
23. A control system, characterized in that, The control system includes a processor and at least two sets of storage media; The control system is used to employ the system upgrade method as described in any one of claims 1-11, by writing upgrade information into the storage medium through the processor.
24. A vehicle, characterized in that, Includes the control system as described in claim 23.
25. A computer-readable storage medium, characterized in that, The storage medium stores a computer program or instructions that, when executed by a processor of an electronic device, enable the electronic device to perform a system upgrade method, the method comprising: When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information to an idle storage medium; the control system includes the processor and at least two sets of the storage medium. Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
26. A computer program product, characterized in that, Includes a computer program, which is executed by a processor to implement a system upgrade method, the method comprising: When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information to an idle storage medium; the control system includes the processor and at least two sets of the storage medium. Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.
27. A chip system, characterized in that, The chip system includes a processing unit and an interface circuit. The processing unit obtains program instructions through the interface circuit, and the program instructions are executed by the processing unit. The processing unit is used to execute a system upgrade method, the method including: When the processor is performing a task and the control system needs to be upgraded, the processor writes the upgrade information to an idle storage medium; the control system includes the processor and at least two sets of the storage medium. Once the upgrade information has been written, the processor switches to access the storage medium where the upgrade information was written and executes subsequent tasks.