Storage system upgrading method and device, equipment, storage medium and program product
By introducing independent storage areas and flexible upgrade control logic into the storage system, the problem of insufficient firmware upgrade flexibility in dual-partition redundant storage architecture is solved, enabling reliable, secure, and stable upgrades of the storage system to adapt to upgrade needs in different scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-21
- Publication Date
- 2026-04-14
AI Technical Summary
The existing dual-partition redundant storage architecture lacks flexibility during firmware upgrades. The lack of backups for new versions can lead to data compatibility issues with older versions.
By introducing an independent storage area into the storage system to store synchronization identifiers and firmware upgrade files, and flexibly controlling the upgrade process of the second partition after the terminal restarts based on the synchronization identifiers and the running status of the target slot, including operations such as mirror synchronization and rollback.
It enables reliable, secure, and stable upgrades of the storage system, adapts to upgrade requirements in different scenarios, avoids loss of upgrade logic due to partition restarts, and ensures consistency and reliability of dual-partition firmware versions.
Smart Images

Figure CN121858136A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device, storage medium, and program product for upgrading a storage system. Background Technology
[0002] Dual-partition redundant storage architecture has become the mainstream technology. Its core design involves dividing the storage system into a primary partition (first partition) and a backup partition (second partition), providing a hardware foundation for the reliability of firmware upgrades.
[0003] Currently, most dual-partition upgrade solutions employ forced dual-partition synchronization logic, meaning that once the primary partition is successfully upgraded, the new firmware is immediately synchronized to the backup partition. However, this solution lacks flexibility; the new version is not backed up, and if problems arise, the older version may experience data compatibility issues. Summary of the Invention
[0004] Therefore, it is necessary to provide a storage system upgrade method, apparatus, device, storage medium, and program product that can reliably, safely, and stably upgrade the storage system in response to the above-mentioned technical problems.
[0005] In a first aspect, this application provides a storage system upgrade method applied to a terminal. The terminal's storage system includes a first partition and a second partition, wherein the second partition is a symmetrical mirror image of the first partition, comprising:
[0006] Obtain a synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server; wherein, the synchronization identifier is used to indicate whether the first partition and the second partition need to be upgraded synchronously;
[0007] The synchronization identifier is stored in an independent storage area, and the firmware upgrade file is written to the target slot of the first partition; wherein, the independent storage area is a storage area in the storage system that is independent of the first partition and the second partition;
[0008] After the firmware upgrade file is written, control the terminal to restart;
[0009] After the terminal restarts, the second partition is processed according to the synchronization identifier and the operating status of the target slot.
[0010] In one embodiment, processing the second partition based on the synchronization identifier and the operating status of the target slot includes:
[0011] In response to determining that the first partition and the second partition need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, the target slot is mirrored and synchronized to the second partition;
[0012] In response to determining that the first partition and the second partition need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
[0013] In one embodiment, processing the second partition based on the synchronization identifier and the operating status of the target slot includes:
[0014] In response to determining that the first partition and the second partition do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is configured as the active slot of the first partition; the active slot is the storage slot that the storage system is currently running;
[0015] In response to determining that the first partition and the second partition do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
[0016] In one embodiment, the system upgrade package further includes a delayed synchronization duration; the processing of the second partition based on the synchronization identifier and the operating status of the target slot includes:
[0017] In response to determining that the first partition and the second partition need to be upgraded synchronously based on the synchronization identifier, the delayed synchronization duration is obtained from the system upgrade package;
[0018] In response to determining that the target slot is operating normally within the time delay synchronization period based on its operating status, the target slot is mirrored and synchronized to the second partition.
[0019] In one embodiment, synchronizing the target slot mirror to the second partition includes:
[0020] The encrypted image data to be synchronized in the target slot is decrypted to obtain decrypted image data;
[0021] The decrypted image data is encrypted using a preset encryption algorithm, and the encrypted decrypted image data is written to the second partition.
[0022] In one embodiment, writing the firmware upgrade file to the target slot of the first partition includes:
[0023] The firmware upgrade file is subjected to integrity and signature verification.
[0024] In response to the integrity verification and signature verification both passing, the firmware upgrade file is written to the target slot of the first partition.
[0025] Secondly, this application also provides a storage system upgrade device, configured in a terminal, wherein the terminal's storage system includes a first partition and a second partition, the second partition being a symmetrical mirror partition of the first partition, comprising:
[0026] The data acquisition module is used to obtain a synchronization identifier and a firmware upgrade file from the system upgrade package for the storage system sent by the server; wherein, the synchronization identifier is used to indicate whether the first partition and the second partition need to be synchronized for upgrade.
[0027] The file writing module is used to store the synchronization identifier to an independent storage area and write the firmware upgrade file to the target slot of the first partition; wherein, the independent storage area is a storage area in the storage system that is independent of the first partition and the second partition;
[0028] The terminal restart module is used to control the terminal to restart after the firmware upgrade file has been written.
[0029] The partition processing module is used to process the second partition according to the synchronization identifier and the running status of the target slot after the terminal restarts.
[0030] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0031] Obtain a synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server; wherein, the synchronization identifier is used to indicate whether the first partition and the second partition need to be upgraded synchronously;
[0032] The synchronization identifier is stored in an independent storage area, and the firmware upgrade file is written to the target slot of the first partition; wherein, the independent storage area is a storage area in the storage system that is independent of the first partition and the second partition;
[0033] After the firmware upgrade file is written, control the terminal to restart;
[0034] After the terminal restarts, the second partition is processed according to the synchronization identifier and the operating status of the target slot.
[0035] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0036] Obtain a synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server; wherein, the synchronization identifier is used to indicate whether the first partition and the second partition need to be upgraded synchronously;
[0037] The synchronization identifier is stored in an independent storage area, and the firmware upgrade file is written to the target slot of the first partition; wherein, the independent storage area is a storage area in the storage system that is independent of the first partition and the second partition;
[0038] After the firmware upgrade file is written, control the terminal to restart;
[0039] After the terminal restarts, the second partition is processed according to the synchronization identifier and the operating status of the target slot.
[0040] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0041] Obtain a synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server; wherein, the synchronization identifier is used to indicate whether the first partition and the second partition need to be upgraded synchronously;
[0042] The synchronization identifier is stored in an independent storage area, and the firmware upgrade file is written to the target slot of the first partition; wherein, the independent storage area is a storage area in the storage system that is independent of the first partition and the second partition;
[0043] After the firmware upgrade file is written, control the terminal to restart;
[0044] After the terminal restarts, the second partition is processed according to the synchronization identifier and the operating status of the target slot.
[0045] The aforementioned storage system upgrade method, apparatus, device, storage medium, and program product obtain a synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server. The synchronization identifier indicates whether the first and second partitions require synchronous upgrades. The synchronization identifier is stored in an independent storage area, and the firmware upgrade file is written to the target slot of the first partition. The independent storage area is a storage region in the storage system independent of the first and second partitions. After the firmware upgrade file is written, the control terminal restarts. After the terminal restarts, the second partition is processed according to the synchronization identifier and the operating status of the target slot. This scheme flexibly controls the dual-partition upgrade logic through the synchronization identifier, achieving compatibility with different synchronization schemes and adapting to upgrade requirements in different scenarios. Furthermore, since the synchronization identifier is stored in an independent area, the upgrade instructions can still be accurately read after the terminal restarts, avoiding the loss of upgrade logic due to partition restarts. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is an application environment diagram of a storage system upgrade method in one embodiment;
[0048] Figure 2 This is a flowchart illustrating a storage system upgrade method in one embodiment;
[0049] Figure 3 This is a schematic diagram of the process of synchronizing the second partition in one embodiment;
[0050] Figure 4 This is a schematic diagram illustrating the process of synchronizing the target slot image to the second partition in one embodiment;
[0051] Figure 5 This is a schematic diagram illustrating the process of writing a firmware upgrade file to a target slot in one embodiment;
[0052] Figure 6 This is a flowchart illustrating a storage system upgrade method in another embodiment;
[0053] Figure 7 This is a structural block diagram of a storage system upgrade device in one embodiment;
[0054] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0056] The storage system upgrade method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 101 communicates with server 102 via a network. Terminal 101 includes a storage system with a dual-partition architecture, comprising a first partition and a second partition. The first partition is the currently running partition, and the second partition is a symmetrical mirror partition of the first partition. The two partitions operate independently and back each other up. Terminal 101 can be, but is not limited to, various personal computers, laptops, smartphones, and tablets. Server 102 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0057] In one exemplary embodiment, such as Figure 2 As shown, a storage system upgrade method is provided, which can be applied to... Figure 1 Taking terminal 101 as an example, the explanation includes the following steps:
[0058] S201: Obtain the synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server.
[0059] The synchronization identifier indicates whether the first and second partitions need to be upgraded synchronously. The system upgrade package is a standardized compressed or packaged data packet, custom-generated by the server, used for firmware updates of the terminal storage system. It carries all the core content required for the upgrade. The firmware upgrade file is the new version of the storage system's firmware program; it is a binary executable file containing the kernel, drivers, applications, configuration parameters, etc., required for system operation.
[0060] Optionally, the server encapsulates the upgrade package according to a preset format. The system upgrade package includes a synchronization identifier field and a firmware upgrade file data segment, and also includes integrity verification information for the upgrade package. The terminal can obtain the system upgrade package sent by the server through active polling or passive push.
[0061] After receiving the system upgrade package, the terminal starts the system upgrade package parsing program to parse the package according to a preset package structure format. For example, the synchronization identifier field in the header of the system upgrade package can be located. This field has a fixed length, such as 1 byte, and its value is a preset instruction code, such as 0x01 representing "synchronization upgrade required" and 0x00 representing "synchronization upgrade not required". The value of the synchronization identifier field is extracted and converted into an instruction format that the terminal can recognize.
[0062] Locate the data segment of the upgrade package and extract the firmware upgrade file. This file is a binary executable file that contains the firmware program, drivers, configuration parameters, etc. of the storage system.
[0063] S202 stores the synchronization identifier in a separate storage area and writes the firmware upgrade file to the target slot of the first partition.
[0064] The independent storage area is a storage region in the storage system that is independent of the first and second partitions. In this embodiment, the independent storage area can be a non-volatile secure storage area with access control functionality; only the terminal's upgrade management module and bootloader can read or write to this storage area, while other applications have no access rights.
[0065] The extracted synchronization identifier is stored in a separate storage area, and the firmware upgrade file is moved to the write queue, awaiting subsequent instructions to write to the target slot of the first partition. The terminal can report the status information "Synchronization identifier and firmware file successfully extracted" to the server, completing this step of the process.
[0066] S203: After the firmware upgrade file is written, the control terminal restarts.
[0067] The terminal can retrieve the following status information to determine whether the restart conditions are met: the independent storage area synchronization identifier storage status is "valid"; the firmware write status of the first partition target slot is "successful", and the checksum is consistent with the source file; there are no unprocessed hardware faults or storage area abnormal alarms. If any condition is not met, the restart process is terminated, and a "restart prerequisites not met" error is reported.
[0068] If all the above conditions are met, the terminal upgrade control module generates a standardized restart command and sends it to the terminal hardware restart controller. After receiving the command, the restart controller cuts off the power supply to the terminal's non-core hardware modules (such as peripheral interfaces and extended storage); keeps the core control module powered on, and waits for the system to complete the final state solidification; triggers the core control module to reset, and the terminal enters the restart process, with all hardware modules being powered on again in a preset order.
[0069] After the terminal is powered on, it first enters the boot loading stage. The bootloader reads the upgrade / reboot flag in the reboot control area and identifies this as a firmware upgrade / reboot. The bootloader skips the default partition loading logic, actively locates the target slot in the first partition, and reads the new firmware information for that slot. The bootloader verifies the validity of the new firmware's boot entry point. After confirming that it is correct, the bootloader transfers system control to the new firmware and starts the new firmware initialization process.
[0070] S204: After the terminal restarts, the second partition is processed according to the synchronization identifier and the running status of the target slot.
[0071] The operating status of the target slot describes the overall performance of the firmware program it carries, including its startup, functionality, and stability.
[0072] The terminal starts the running status detection module, performs a full self-test on the new firmware of the target slot in the first partition, and generates the running status of the target slot based on the self-test results, marking the running status as "normal" or "abnormal". The terminal reads the synchronization identifier from the independent storage area and performs validity verification.
[0073] Furthermore, the terminal can execute the corresponding second partitioning processing strategy based on the combination of the synchronization identifier and the operating status of the target slot.
[0074] It should be noted that, to improve the efficiency and flexibility of synchronization identifier configuration, in one embodiment, a synchronization identifier can also be preset in the independent storage area of the terminal. Furthermore, the priority of the synchronization identifier pre-stored in the independent storage area and the synchronization identifier carried in the system upgrade package can be pre-set. For example, if the system upgrade package does not carry a synchronization identifier, the synchronization identifier pre-stored in the terminal is used as the target's synchronization identifier; if the system upgrade package carries a synchronization identifier, it is used as the target's synchronization identifier. Further, a corresponding second partitioning processing strategy can be executed based on the combination of the target's synchronization identifier and the operating status of the target slot.
[0075] In the aforementioned storage system upgrade method, a synchronization identifier and firmware upgrade file are obtained from the system upgrade package sent by the server. The synchronization identifier indicates whether the first and second partitions require synchronous upgrades. The synchronization identifier is stored in an independent storage area, and the firmware upgrade file is written to the target slot of the first partition. The independent storage area is a storage region in the storage system independent of the first and second partitions. After the firmware upgrade file is written, the terminal is restarted. After the terminal restarts, the second partition is processed according to the synchronization identifier and the operating status of the target slot. This scheme flexibly controls the dual-partition upgrade logic through the synchronization identifier, achieving compatibility with different synchronization schemes and adapting to upgrade requirements in different scenarios. Furthermore, since the synchronization identifier is stored in an independent area, the upgrade instructions can still be accurately read after the terminal restarts, avoiding the loss of upgrade logic due to partition restarts.
[0076] Optionally, in an exemplary embodiment, a method is provided for processing a second partition based on the synchronization identifier and the operating status of the target slot, and different hierarchical processing strategies are applied to the second partition according to different combinations of the synchronization identifier and the target slot.
[0077] Optionally, in one embodiment, in response to determining that the first partition and the second partition need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, the target slot is mirrored and synchronized to the second partition. If the synchronization identifier reading result indicates that a synchronous upgrade is required, and the new firmware of the target slot in the first partition has completed full-dimensional detection of boot integrity, core performance effectiveness, and operational stability and is determined to be operating normally, then the second partition needs to be upgraded synchronously. In this embodiment, a mirror synchronization method can be used to upgrade the second partition synchronously.
[0078] In one embodiment, in response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is malfunctioning based on its operating status, upgrading the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition. When the synchronization identifier indicates a synchronous upgrade is required, but the target slot's status analysis shows malfunction, the terminal upgrade control module, upon receiving the combined signal of "needs synchronous upgrade + target slot malfunction," immediately triggers a second partition upgrade blocking command. Read and write permissions for the corresponding slot of the second partition are locked, and a write-prohibited flag is set to prevent accidental transmission of new firmware data to the second partition. A blocking log is generated, recording the blocking reason (target slot malfunction), blocking time, and the current firmware version of the second partition, ensuring traceability of the operation.
[0079] The second partition is marked as the rollback data source partition. All processes of the abnormal new firmware in the target slot are stopped, the system resources occupied by the slot are released, and a data erasure operation is performed on the target slot to clear all data of the abnormal new firmware, avoiding data mixing between the old and new firmware. After erasure, it is checked whether the target slot is in a blank and writable state to ensure that the rollback data can be stored normally. The target slot is rolled back using a preset rollback procedure.
[0080] The above embodiments, based on the dual judgment logic of synchronization identifier and target slot operation status, respectively perform differentiated operations of mirror synchronization and prohibit upgrade + cross-partition rollback, which not only ensures the consistency and reliability of firmware versions of the two partitions, but also can quickly stop the loss in the event of upgrade anomaly.
[0081] In one embodiment, in response to determining from the synchronization identifier that the first partition and the second partition do not require synchronized upgrades, and determining from the operating status of the target slot that the target slot is operating normally, upgrading the second partition is prohibited, and the target slot is configured as the active slot of the first partition; the active slot is a storage slot that the storage system is currently running. Specifically, the active slot is a dedicated storage slot where the storage system is currently loading and running firmware, and all system business processes are started and executed based on the firmware of the active slot. The original firmware is a historically verified stable and reliable firmware version in the second partition that did not participate in this upgrade, serving as a backup resource for system failure rollback.
[0082] If the synchronization flag read indicates that no synchronization upgrade is needed, and the new firmware in the target slot of the first partition has completed full-dimensional checks on boot integrity, core function validity, and operational stability, and the result is deemed normal operation, the upgrade blocking command for the second partition is immediately triggered. A read-only lock flag is set for the corresponding slot of the second partition, and a second partition status lock log is generated, recording the reason for the lock (no synchronization upgrade needed), the lock time, and the current original firmware version of the second partition, ensuring traceability of the operation. The terminal reads the configuration information of the currently active slot from the preset persistent storage area, recording the address and firmware version of the original active slot. The slot status configuration interface is called to change the mapping address of the system active slot from the original firmware slot to the target slot of the first partition.
[0083] In one embodiment, in response to determining that the first and second partitions do not require synchronized upgrades based on the synchronization identifier, and determining that the target slot is malfunctioning based on its operating status, upgrading the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition. If the read synchronization identifier indicates that synchronized upgrades are not required, and the new firmware of the target slot in the first partition has undergone comprehensive checks on boot integrity, core function validity, and operational stability, and the result is determined to be malfunctioning, the terminal immediately triggers a strong blocking command for the second partition upgrade, preventing any firmware write, erase, or synchronization operations on the second partition. Dual-access locking is performed on the corresponding slot of the second partition, generating a second partition lock log that records the locking reason, locking time, and the original firmware version of the second partition, ensuring traceability of the operation.
[0084] The second partition is marked as the rollback data source partition. All processes of the abnormal new firmware in the target slot are stopped, the system resources occupied by the slot are released, and a data erasure operation is performed on the target slot to clear all data of the abnormal new firmware, avoiding data mixing between the old and new firmware. After erasure, it is checked whether the target slot is in a blank and writable state to ensure that the rollback data can be stored normally. The target slot is rolled back using a preset rollback procedure.
[0085] The above embodiments, based on the operating status of the target slot in the first partition, respectively execute differentiated operations such as disabling the upgrade of the second partition + configuring the target slot as an active slot and disabling the upgrade of the second partition + rolling back based on the original firmware of the second partition. This achieves both flexible upgrade of a single partition and maximizes the stability of system operation.
[0086] Optionally, to further reduce the risks of simultaneous upgrades across two partitions and ensure that the firmware synchronized to the second partition is a fully verified and reliable version, in one embodiment, the system upgrade package also includes a delayed synchronization duration; based on this, such as Figure 3 As shown, a synchronization method for a second partition is provided, which specifically includes the following steps:
[0087] S301, in response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, obtains the delayed synchronization duration from the system upgrade package.
[0088] The delay synchronization duration refers to the stable observation time interval from the start of the new firmware in the target slot of the first partition to the execution of the mirror synchronization operation of the second partition; in this embodiment, the delay synchronization duration can be flexibly set according to actual needs.
[0089] Optionally, the terminal reads the synchronization identifier from the independent storage area and verifies that the identifier indicates a synchronization upgrade is required. The terminal re-parses the stored system upgrade package, extracts the preset delay synchronization duration parameter within the package, and verifies the parameter format and value range. If the duration parameter is valid, the terminal starts the delay timing module and marks the timing start time as "the time point when the new firmware in the first partition completes startup and enters stable operation"; if the parameter is invalid, it reports "delay synchronization duration configuration abnormal" and performs synchronization or termination operations according to the original process (without delay observation).
[0090] Throughout the entire delay synchronization period, the terminal continuously and frequently detects the status of the new firmware in the target slot through the built-in monitoring module. If any abnormal judgment criterion is found during the monitoring process, the delay timer is immediately terminated, marked as "abnormal operation within the delay period", and the abnormal handling process is executed, that is, the synchronization of the second partition and the rollback of the first partition are prohibited.
[0091] S302, in response to determining that the target slot is operating normally within the delay synchronization period based on the operating status of the target slot, mirrors and synchronizes the target slot to the second partition.
[0092] Among them, "normal operation within the delay synchronization period" means that the new firmware meets all the judgment criteria for startup integrity, core function effectiveness, and operational stability throughout the entire delay synchronization period, without any abnormal alarms.
[0093] If no abnormalities are detected during the monitoring process, and the delay synchronization timer expires, the system is marked as "operating normally within the delay period" and enters the second partition synchronization preparation stage. The terminal triggers the second partition preprocessing command to check the capacity, read / write permissions, and hardware status of the corresponding slot. Once the synchronization conditions are confirmed, the target slot is mirrored and synchronized to the second partition.
[0094] In the above embodiments, the synchronization operation will only be triggered if the new firmware continuously meets the full-dimensional standards of stable startup, effective function, and reasonable resource consumption within the delayed synchronization period. This means that the firmware synchronized in the second partition is a reliable version that has been verified by actual operation over a long period of time, completely avoiding the risk of simultaneous failure of both partitions due to synchronization of faulty firmware.
[0095] Optionally, in the case where the target slot image data is in an encrypted format, in one embodiment, such as Figure 4 As shown, a method for mirroring a target slot to a second partition is provided, which specifically includes the following steps:
[0096] S401, decrypt the encrypted image data to be synchronized in the target slot to obtain decrypted image data.
[0097] The encrypted image data to be synchronized is a complete copy of the new firmware data protected by encryption in the target slot of the first partition.
[0098] Optionally, the terminal reads the encrypted image data of the target slot in the first partition through the encrypted storage access interface. During the reading process, an encrypted data transmission channel is enabled to prevent data from being stolen during inter-partition transmission. The read encrypted image data is split into fixed block sizes to generate an encrypted block queue with index identifiers, and the original checksum of each block is recorded.
[0099] The terminal loads a valid decryption key and a preset decryption algorithm, initializes the encryption / decryption environment, and locks the key so that it can only be accessed by the current synchronization process, prohibiting other processes from accessing it. The encrypted image data is decrypted and verified block by block. After all blocks are decrypted, the decrypted blocks in the temporary buffer are concatenated according to their indices to generate complete decrypted image data. The checksum of the entire plaintext data is calculated and compared with the original full checksum of the firmware plaintext in the upgrade package to confirm that the decrypted data is complete and unaltered.
[0100] S402 uses a preset encryption algorithm to encrypt the decrypted image data and writes the encrypted decrypted image data to the second partition.
[0101] The preset encryption algorithm is a symmetric or asymmetric decryption algorithm agreed upon by the terminal and the server, used to restore the original plaintext form of the encrypted image data.
[0102] The terminal unloads the decryption key, loads the preset re-encryption algorithm and corresponding key, and configures the encryption parameters to ensure that the parameters completely match the decryption parameters when the second partition firmware is booted. The decrypted image data is re-encrypted block by block and its format verified to confirm that the corresponding slot in the second partition has been erased and is in a writable state. The write encryption verification interface of the second partition is then enabled, and the encrypted decrypted image data is written to the second partition.
[0103] In the above embodiments, the end-to-end processing logic of decrypting the original encrypted image → reencrypting plaintext data → writing to the second partition ensures both the consistency and availability of the image data and constructs a multi-layered security protection system.
[0104] Optionally, in one embodiment, such as Figure 5As shown, a method for writing firmware upgrade files to a target slot in the first partition is provided, specifically including the following steps:
[0105] S501 performs integrity and signature verification on firmware upgrade files.
[0106] The terminal transfers the parsed firmware upgrade file to a dedicated verification area. This area is read-only to prevent accidental modification of the file during the verification process. The terminal reads the basic attribute information of the firmware upgrade file and compares it with the terminal's preset compatibility conditions. If the comparison is consistent, the verification process begins; if the comparison is inconsistent, the process is terminated directly, and a firmware incompatibility error is reported.
[0107] The terminal invokes a preset integrity verification algorithm to perform a full data hash operation on the firmware upgrade files within the verification area, generating the actual integrity verification value for the current file. During the operation, the file reading progress and operation time are recorded to prevent interruption due to file corruption. The terminal reads the baseline integrity verification value pre-stored on the server from the upgrade package and compares the actual verification value byte-by-byte with the baseline value. If they match, the integrity verification is marked as successful; if they do not match, the integrity verification is marked as failed, and the upgrade process is terminated.
[0108] In this embodiment, signature verification can be performed based on an asymmetric encryption mechanism to ensure the legitimacy of the firmware source, which is a higher level of security verification than integrity verification.
[0109] S502, in response to both integrity and signature verifications passing, writes the firmware upgrade file to the target slot in the first partition.
[0110] The operation of writing the firmware upgrade file to the target slot of the first partition can only be performed if both the integrity verification and the signature verification pass.
[0111] In this embodiment, dual verification of integrity and signature is performed, and the firmware is written to the target slot of the first partition only when both verifications pass. This establishes a secure entry threshold for firmware upgrades from the source, ensuring the legality and integrity of the upgrade files while significantly reducing the risk of upgrade failures caused by malicious tampering or file corruption.
[0112] Figure 6 This is a flowchart illustrating a storage system upgrade method in another embodiment. Based on the above embodiments, this embodiment provides an optional example of a storage system upgrade method. (Combined with...) Figure 6 The specific implementation process is as follows:
[0113] S601 obtains the synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server.
[0114] The synchronization flag is used to indicate whether the first and second partitions need to be upgraded synchronously.
[0115] S602 stores the synchronization identifier in a separate storage area and performs integrity and signature verification on the firmware upgrade file.
[0116] The independent storage area is a storage region in the storage system that is independent of the first and second partitions.
[0117] S603, in response to both integrity and signature verifications passing, writes the firmware upgrade file to the target slot in the first partition.
[0118] After the firmware upgrade file is written, the S604 control terminal restarts.
[0119] S605: After the terminal restarts, determine whether the first and second partitions need to be upgraded synchronously based on the synchronization identifier; if yes, then execute S606; otherwise, execute S609.
[0120] S606: Determine if the target slot is operating normally based on its operating status; if so, proceed to S607; otherwise, proceed to S608.
[0121] S607, mirror the target slot to the second partition.
[0122] S608 prohibits upgrading the second partition and rolls back the target slot based on the original firmware in the second partition.
[0123] S609: Determine if the target slot is operating normally based on its operating status; if so, proceed to S610; otherwise, proceed to S611.
[0124] S610, prohibit upgrades to the second partition, and configure the target slot as the active slot of the first partition.
[0125] S611 prohibits upgrades to the second partition and rolls back the target slot based on the original firmware in the second partition.
[0126] The specific processes of S601-S611 described above can be found in the description of the above method embodiments. Their implementation principles and technical effects are similar, and will not be repeated here.
[0127] It should be understood that although the steps in the flowcharts of the embodiments described above 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 embodiments described above 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.
[0128] Based on the same inventive concept, this application also provides a storage system upgrade apparatus for implementing the storage system upgrade method described above. This apparatus can be applied to or integrated into a chip or chip module, for example. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more storage system upgrade apparatus embodiments provided below can be found in the limitations of the storage system upgrade method described above, and will not be repeated here.
[0129] In one exemplary embodiment, such as Figure 7 As shown, a storage system upgrade device 700 is provided, configured in a terminal, including: a data acquisition module 710, a file writing module 720, a terminal restart module 730, and a partition processing module 740, wherein:
[0130] The data acquisition module 710 is used to obtain a synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server; wherein, the synchronization identifier is used to indicate whether the first partition and the second partition need to be upgraded synchronously.
[0131] The file writing module 720 is used to store the synchronization identifier to an independent storage area and write the firmware upgrade file to the target slot of the first partition; wherein, the independent storage area is a storage area in the storage system that is independent of the first partition and the second partition.
[0132] The terminal restart module 730 is used to control the terminal to restart after the firmware upgrade file has been written.
[0133] The partition processing module 740 is used to process the second partition according to the synchronization identifier and the running status of the target slot after the terminal restarts.
[0134] The aforementioned storage system upgrade device obtains a synchronization identifier and firmware upgrade file from the system upgrade package sent by the server. The synchronization identifier indicates whether the first and second partitions require synchronous upgrades. The synchronization identifier is stored in an independent storage area, and the firmware upgrade file is written to the target slot of the first partition. The independent storage area is a storage region in the storage system independent of the first and second partitions. After the firmware upgrade file is written, the terminal is restarted. After the terminal restarts, the second partition is processed according to the synchronization identifier and the operating status of the target slot. This scheme flexibly controls the dual-partition upgrade logic through the synchronization identifier, achieving compatibility with different synchronization schemes and adapting to upgrade requirements in different scenarios. Furthermore, since the synchronization identifier is stored in an independent area, the upgrade command can still be accurately read after the terminal restarts, avoiding the loss of upgrade logic due to partition restarts.
[0135] In one embodiment, the partitioning module 740 is specifically used for:
[0136] In response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, the target slot is mirrored and synchronized to the second partition; in response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, the upgrade of the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
[0137] In one embodiment, the partitioning module 740 is further configured to:
[0138] In response to determining that the first and second partitions do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is configured as the active slot of the first partition; the active slot is the storage slot in which the storage system is running; in response to determining that the first and second partitions do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
[0139] In one embodiment, the system upgrade package also includes a delayed synchronization duration; the partition processing module 740 is further configured to:
[0140] In response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, the delayed synchronization duration is obtained from the system upgrade package; in response to determining that the target slot is running normally within the delayed synchronization duration based on the operating status of the target slot, the target slot is mirrored and synchronized to the second partition.
[0141] In one embodiment, the partitioning module 740 is further configured to:
[0142] The encrypted image data to be synchronized in the target slot is decrypted to obtain decrypted image data; the decrypted image data is encrypted using a preset encryption algorithm, and the encrypted decrypted image data is written to the second partition.
[0143] In one embodiment, the file writing module 720 is specifically used for:
[0144] Perform integrity and signature verification on the firmware upgrade file; in response to both integrity and signature verifications passing, write the firmware upgrade file to the target slot in the first partition.
[0145] Regarding the modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, hardware modules / units, or a combination of both. For example, for various devices and products applied to or integrated into a chip, all of their modules / units can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs that run on a processor integrated within the chip, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits; for various devices and products applied to or integrated into a chip module, all of their modules / units can be implemented using hardware methods such as circuits, and different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented using hardware methods such as circuits. The components can be implemented using software programs that run on the processor integrated within the chip module. The remaining (if any) modules / units can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into the terminal, each of its components / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or in different components within the terminal. Alternatively, at least some modules / units can be implemented using software programs that run on the processor integrated within the terminal, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits.
[0146] Each module in the aforementioned storage system upgrade device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0147] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a storage system upgrade method.
[0148] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0149] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0150] Obtain the synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server; the synchronization identifier is used to indicate whether the first partition and the second partition need to be upgraded synchronously.
[0151] The synchronization identifier is stored in a separate storage area, and the firmware upgrade file is written to the target slot of the first partition; wherein, the separate storage area is a storage area in the storage system that is independent of the first partition and the second partition;
[0152] After the firmware upgrade file is written, the control terminal restarts.
[0153] After the terminal restarts, the second partition is processed based on the synchronization identifier and the running status of the target slot.
[0154] In one embodiment, when the processor executes a computer program to process the second partition based on the synchronization identifier and the operating status of the target slot, it also performs the following steps:
[0155] In response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, the target slot is mirrored and synchronized to the second partition; in response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, the upgrade of the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
[0156] In one embodiment, when the processor executes a computer program to process the second partition based on the synchronization identifier and the operating status of the target slot, it also performs the following steps:
[0157] In response to determining that the first and second partitions do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is configured as the active slot of the first partition; the active slot is the storage slot in which the storage system is running; in response to determining that the first and second partitions do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
[0158] In one embodiment, the system upgrade package further includes a delayed synchronization duration; when the processor executes the computer program to process the second partition based on the synchronization identifier and the operating status of the target slot, it also performs the following steps:
[0159] In response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, the delayed synchronization duration is obtained from the system upgrade package; in response to determining that the target slot is running normally within the delayed synchronization duration based on the operating status of the target slot, the target slot is mirrored and synchronized to the second partition.
[0160] In one embodiment, when the processor executes a computer program to synchronize the target slot image to the second partition, it also performs the following steps:
[0161] The encrypted image data to be synchronized in the target slot is decrypted to obtain decrypted image data; the decrypted image data is encrypted using a preset encryption algorithm, and the encrypted decrypted image data is written to the second partition.
[0162] In one embodiment, when the processor executes a computer program to write the firmware upgrade file to the target slot of the first partition, it also performs the following steps:
[0163] Perform integrity and signature verification on the firmware upgrade file; in response to both integrity and signature verifications passing, write the firmware upgrade file to the target slot in the first partition.
[0164] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0165] Obtain the synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server; the synchronization identifier is used to indicate whether the first partition and the second partition need to be upgraded synchronously.
[0166] The synchronization identifier is stored in a separate storage area, and the firmware upgrade file is written to the target slot of the first partition; wherein, the separate storage area is a storage area in the storage system that is independent of the first partition and the second partition;
[0167] After the firmware upgrade file is written, the control terminal restarts.
[0168] After the terminal restarts, the second partition is processed based on the synchronization identifier and the running status of the target slot.
[0169] In one embodiment, when the processor executes a computer program to process the second partition based on the synchronization identifier and the operating status of the target slot, it also performs the following steps:
[0170] In response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, the target slot is mirrored and synchronized to the second partition; in response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, the upgrade of the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
[0171] In one embodiment, when the processor executes a computer program to process the second partition based on the synchronization identifier and the operating status of the target slot, it also performs the following steps:
[0172] In response to determining that the first and second partitions do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is configured as the active slot of the first partition; the active slot is the storage slot in which the storage system is running; in response to determining that the first and second partitions do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
[0173] In one embodiment, the system upgrade package further includes a delayed synchronization duration; when the processor executes the computer program to process the second partition based on the synchronization identifier and the operating status of the target slot, it also performs the following steps:
[0174] In response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, the delayed synchronization duration is obtained from the system upgrade package; in response to determining that the target slot is running normally within the delayed synchronization duration based on the operating status of the target slot, the target slot is mirrored and synchronized to the second partition.
[0175] In one embodiment, when the processor executes a computer program to synchronize the target slot image to the second partition, it also performs the following steps:
[0176] The encrypted image data to be synchronized in the target slot is decrypted to obtain decrypted image data; the decrypted image data is encrypted using a preset encryption algorithm, and the encrypted decrypted image data is written to the second partition.
[0177] In one embodiment, when the processor executes a computer program to write the firmware upgrade file to the target slot of the first partition, it also performs the following steps:
[0178] Perform integrity and signature verification on the firmware upgrade file; in response to both integrity and signature verifications passing, write the firmware upgrade file to the target slot in the first partition.
[0179] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0180] Obtain the synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server; the synchronization identifier is used to indicate whether the first partition and the second partition need to be upgraded synchronously.
[0181] The synchronization identifier is stored in a separate storage area, and the firmware upgrade file is written to the target slot of the first partition; wherein, the separate storage area is a storage area in the storage system that is independent of the first partition and the second partition;
[0182] After the firmware upgrade file is written, the control terminal restarts.
[0183] After the terminal restarts, the second partition is processed based on the synchronization identifier and the running status of the target slot.
[0184] In one embodiment, when the processor executes a computer program to process the second partition based on the synchronization identifier and the operating status of the target slot, it also performs the following steps:
[0185] In response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, the target slot is mirrored and synchronized to the second partition; in response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, the upgrade of the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
[0186] In one embodiment, when the processor executes a computer program to process the second partition based on the synchronization identifier and the operating status of the target slot, it also performs the following steps:
[0187] In response to determining that the first and second partitions do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is configured as the active slot of the first partition; the active slot is the storage slot in which the storage system is running; in response to determining that the first and second partitions do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
[0188] In one embodiment, the system upgrade package further includes a delayed synchronization duration; when the processor executes the computer program to process the second partition based on the synchronization identifier and the operating status of the target slot, it also performs the following steps:
[0189] In response to determining that the first and second partitions need to be upgraded synchronously based on the synchronization identifier, the delayed synchronization duration is obtained from the system upgrade package; in response to determining that the target slot is running normally within the delayed synchronization duration based on the operating status of the target slot, the target slot is mirrored and synchronized to the second partition.
[0190] In one embodiment, when the processor executes a computer program to synchronize the target slot image to the second partition, it also performs the following steps:
[0191] The encrypted image data to be synchronized in the target slot is decrypted to obtain decrypted image data; the decrypted image data is encrypted using a preset encryption algorithm, and the encrypted decrypted image data is written to the second partition.
[0192] In one embodiment, when the processor executes a computer program to write the firmware upgrade file to the target slot of the first partition, it also performs the following steps:
[0193] Perform integrity and signature verification on the firmware upgrade file; in response to both integrity and signature verifications passing, write the firmware upgrade file to the target slot in the first partition.
[0194] It should be noted that the data involved in this application (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0195] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0196] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0197] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for upgrading a storage system, characterized in that, Applied to a terminal, the terminal's storage system includes a first partition and a second partition, the second partition being a symmetrical mirror image of the first partition, the method comprising: Obtain a synchronization identifier and firmware upgrade file from the system upgrade package for the storage system sent by the server; wherein, the synchronization identifier is used to indicate whether the first partition and the second partition need to be upgraded synchronously; The synchronization identifier is stored in an independent storage area, and the firmware upgrade file is written to the target slot of the first partition; wherein, the independent storage area is a storage area in the storage system that is independent of the first partition and the second partition; After the firmware upgrade file is written, control the terminal to restart; After the terminal restarts, the second partition is processed according to the synchronization identifier and the operating status of the target slot.
2. The method according to claim 1, characterized in that, The step of processing the second partition based on the synchronization identifier and the operating status of the target slot includes: In response to determining that the first partition and the second partition need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, the target slot is mirrored and synchronized to the second partition; In response to determining that the first partition and the second partition need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
3. The method according to claim 1, characterized in that, The step of processing the second partition based on the synchronization identifier and the operating status of the target slot includes: In response to determining that the first partition and the second partition do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating normally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is configured as the active slot of the first partition; the active slot is the storage slot that the storage system is currently running; In response to determining that the first partition and the second partition do not need to be upgraded synchronously based on the synchronization identifier, and determining that the target slot is operating abnormally based on the operating status of the target slot, upgrading the second partition is prohibited, and the target slot is rolled back based on the original firmware in the second partition.
4. The method according to claim 1, characterized in that, The system upgrade package also includes a delayed synchronization duration; the processing of the second partition based on the synchronization identifier and the operating status of the target slot includes: In response to determining that the first partition and the second partition need to be upgraded synchronously based on the synchronization identifier, the delayed synchronization duration is obtained from the system upgrade package; In response to determining that the target slot is operating normally within the time delay synchronization period based on its operating status, the target slot is mirrored and synchronized to the second partition.
5. The method according to claim 2 or 4, characterized in that, The step of mirroring and synchronizing the target slot to the second partition includes: The encrypted image data to be synchronized in the target slot is decrypted to obtain decrypted image data; The decrypted image data is encrypted using a preset encryption algorithm, and the encrypted decrypted image data is written to the second partition.
6. The method according to claim 1, characterized in that, The step of writing the firmware upgrade file to the target slot of the first partition includes: The firmware upgrade file is subjected to integrity and signature verification. In response to the integrity verification and signature verification both passing, the firmware upgrade file is written to the target slot of the first partition.
7. A storage system upgrade device, characterized in that, Configured in a terminal, the terminal's storage system includes a first partition and a second partition, the second partition being a symmetrical mirror image of the first partition, the device comprising: The data acquisition module is used to obtain a synchronization identifier and a firmware upgrade file from the system upgrade package for the storage system sent by the server; wherein, the synchronization identifier is used to indicate whether the first partition and the second partition need to be synchronized for upgrade. The file writing module is used to store the synchronization identifier to an independent storage area and write the firmware upgrade file to the target slot of the first partition; wherein, the independent storage area is a storage area in the storage system that is independent of the first partition and the second partition; The terminal restart module is used to control the terminal to restart after the firmware upgrade file has been written. The partition processing module is used to process the second partition according to the synchronization identifier and the running status of the target slot after the terminal restarts.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.