Image processing method, and computer program product, device and storage medium

By dividing the image files into binary and folder formats on the server and storing them in Nand Flash and eMMC partitions respectively, and by adopting a dual-image synchronization and failover mechanism, the problem of insufficient storage capacity of traditional Nand Flash is solved, and efficient image file management and system stability are achieved.

WO2026040555A1PCT designated stage Publication Date: 2026-02-26INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
PCT/CN2025/099311
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-20
Filing Date
2025-06-05
Publication Date
2026-02-26

AI Technical Summary

Technical Problem

Traditional Nand Flash storage capacity cannot meet the growing demand for mirrored storage, leading to difficulties in system updates and maintenance.

Method used

By acquiring binary image files and folder image files, the system verifies and refreshes them to the preset logical flash memory partition and embedded memory partition, and expands the capacity using Nand Flash and eMMC. A dual-image synchronization and fault-to-connection mechanism is adopted to ensure the stability and reliability of the system.

Benefits of technology

It increases the storage space for image files, enhances the accuracy and security of system updates and maintenance, and ensures the continuous and stable operation of the server and data integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025099311_26022026_PF_FP_ABST
    Figure CN2025099311_26022026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to an image processing method, and a computer program product, a device and a storage medium. The method comprises: acquiring a first image file and a second image file, wherein the first image file is a binary image file, and the second image file is a folder image file; verifying the first image file and the second image file; and refreshing the successfully verified first image file to a first partition of a preset logical flash, and refreshing the successfully verified second image file to a second partition of the preset logical flash, wherein the first partition of the preset logical flash is a flash partition, and the second partition of the preset logical flash is an embedded memory partition. The method can improve the efficiency of system updating and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Mirror processing method, computer program product, device and storage medium

[0001] Cross-reference to related applications

[0002] The present application claims priority to the Chinese patent application No. 202411141097.8, filed on August 20, 2024, and entitled "Mirror processing method, computer program product, device and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present application relates to the technical field of computers, and in particular to a mirror processing method, a computer program product, a device and a storage medium. BACKGROUND

[0004] In terms of storage technology, the storage of the mirror of the baseboard management controller mainly relies on advanced storage devices such as Nand Flash (non-volatile memory based on Nand technology) and eMMC (Embedded Multi Media Card). Nand Flash occupies an important position in the field of data storage due to its high-speed writing performance and large storage capacity, and is particularly suitable for application scenarios that require frequent writing operations and large-capacity data storage. At the same time, eMMC, as a storage device integrated with a storage controller, is also widely used due to its high performance and large capacity.

[0005] However, as customer demand continues to grow and the Linux system kernel continues to expand, the traditional Nand Flash storage capacity has been unable to meet the growing mirror storage demand, which also leads to system updates and maintenance difficulties. SUMMARY

[0006] In a first aspect, the present application provides a mirror processing method, the method comprising:

[0007] obtaining a first mirror file and a second mirror file, the first mirror file being a binary mirror file, and the second mirror file being a folder mirror file;

[0008] verifying the first mirror file and the second mirror file; and

[0009] refreshing the first mirror file that passes the verification to a first partition of a preset logical flash memory, and refreshing the second mirror file that passes the verification to a second partition of the preset logical flash memory, wherein the first partition of the preset logical flash memory is a flash memory partition, and the second partition of the preset logical flash memory is an embedded memory partition.

[0010] In some embodiments, obtaining the first image file and the second image file comprises:

[0011] obtaining information of a first storage area corresponding to a first partition of the preset logical flash memory;

[0012] obtaining information of a second storage area corresponding to a second partition of the preset logical flash memory;

[0013] determining whether the first partition and the second partition are readable and writable according to the information of the first storage area and the information of the second storage area;

[0014] in response to determining that the first partition and the second partition are readable and writable, exporting a file system path;

[0015] mounting the first storage area corresponding to the first partition to the file system based on the file system path; and

[0016] mounting the second storage area corresponding to the second partition to the file system based on the file system path.

[0017] In some embodiments, the method further comprises:

[0018] obtaining a start address position and an end address position of a first partition of the preset logical flash memory corresponding to the first image file;

[0019] obtaining a start address position and an end address position of a second partition of the preset logical flash memory corresponding to the second image file; and

[0020] filling the first image file according to the start address position and the end address position of the first partition of the preset logical flash memory, and filling the second image file according to the start address position and the end address position of the second partition of the preset logical flash memory, to obtain a target image file.

[0021] In some embodiments, the verifying the first image file and the second image file comprises:

[0022] verifying the first image file and the second image file according to a preset method respectively, to obtain a first verification result;

[0023] verifying the first partition of the preset logical flash memory and the second partition of the preset logical flash memory respectively, to obtain a second verification result; and

[0024] determining whether the verification result of the first image file and the second image file is abnormal according to the first verification result and the second verification result.

[0025] In some embodiments, the method further comprises:

[0026] In response to determining that the check results of the first mirror file and the second mirror file are abnormal, the reading start offset, the data segment size, and the data value corresponding to the first mirror file and the second mirror file are obtained, and the data value of the data segment size is written to the start offset position in the underlying memory of the basic management controller; and

[0027] The substrate management controller parses the first mirror file and the second mirror file according to the data value of the data segment size, and refreshes the first mirror file and the second mirror file according to the parsed mirror file.

[0028] In some embodiments, the method further comprises:

[0029] A plurality of preset logical flash memories are set, and the plurality of preset logical flash memories are used to store a plurality of target mirror files, wherein the plurality of preset logical flash memories include a first preset logical flash memory and a second preset logical flash memory, and the plurality of target mirror files include a main target mirror file and a backup target mirror file; and

[0030] The main target backup file is refreshed into the first preset logical flash memory, and the backup target mirror file is refreshed into the second preset logical flash memory.

[0031] In some embodiments, the method further comprises:

[0032] The main target mirror file is monitored in real time to determine whether a change occurs;

[0033] In response to determining that the main target mirror file has changed, a change setting item is triggered;

[0034] In response to determining that the change setting item is triggered, the to-be-synchronized information of the main target mirror file is obtained; and

[0035] The backup target mirror file is updated according to the to-be-synchronized information, so as to realize information synchronization between the main target mirror file and the backup target mirror file.

[0036] In some embodiments, updating the backup target mirror file according to the to-be-synchronized information comprises:

[0037] In response to the change of the main target mirror file, the to-be-synchronized information and the position information of the to-be-synchronized information in the main target mirror file are obtained; and

[0038] The backup target mirror file is updated according to the to-be-synchronized information and the position information of the to-be-synchronized information in the main target mirror file.

[0039] In some embodiments, the method further comprises:

[0040] The main target mirror file is called by a boot program started by the substrate management controller, and the substrate management controller is started; and

[0041] The number of times the boot program calls the main target image file is obtained, and in response to determining that the number of times the boot program calls the main target image file is greater than a preset number of calls, the boot program calls the backup target image file.

[0042] In some embodiments, the method further comprises:

[0043] In response to determining that the time length for starting the baseboard management controller using the main target image file exceeds a first time length without starting the baseboard management controller, starting the baseboard management controller using the backup target image file;

[0044] After starting the baseboard management controller using the backup target image file, verifying whether the main target image file is abnormal; and

[0045] In response to determining that the main target image file is abnormal, setting that the time length for starting the baseboard management controller using the main target image file exceeds a second time length without starting the baseboard management controller, starting the baseboard management controller using the backup target image file, wherein the second time length is less than the first time length.

[0046] In some embodiments, the preset logical flash memory further comprises a third partition of the preset logical flash memory, the third partition of the preset logical flash memory being used to store to-be-synchronized information, and the method comprises:

[0047] In response to detecting the to-be-synchronized information, storing the to-be-synchronized information into the third partition of the preset logical flash memory, the third partition being a shared partition of the main target image file and the backup target image file.

[0048] In some embodiments, the method further comprises:

[0049] Obtaining the volume of the to-be-synchronized information;

[0050] Obtaining the size of the remaining space of the first preset logical flash memory and the second preset logical flash memory; and

[0051] According to the volume of the upgrade data corresponding to the target image file and the size of the remaining space of the first preset logical flash memory and the second preset logical flash memory, dividing the third partition of the preset logical flash memory.

[0052] In some embodiments, the step of verifying the first image file and the second image file according to the preset method to obtain the first verification result comprises:

[0053] Obtaining the hash value corresponding to the first image file and the hash value corresponding to the second image file;

[0054] comparing the hash value corresponding to the first mirror file with the standard first hash value, and comparing the hash value corresponding to the second mirror file with the standard second hash value; and

[0055] in response to determining that the hash value corresponding to the first mirror file is consistent with the standard first hash value, and determining that the hash value corresponding to the second mirror file is consistent with the standard second hash value, obtaining a first check result that the first mirror file and the second mirror file are not tampered with.

[0056] In some embodiments, the step of refreshing the first mirror file checked successfully to the first partition of the preset logical flash memory and refreshing the second mirror file checked successfully to the second partition of the preset logical flash memory includes:

[0057] splicing the first mirror file refreshed to the first partition of the preset logical flash memory and the second mirror file refreshed to the second partition of the preset logical flash memory to obtain a target mirror file, and processing the target mirror file.

[0058] In some embodiments, the step of checking the first partition of the preset logical flash memory and the second partition of the preset logical flash memory respectively to obtain a second check result includes:

[0059] determining whether the storage devices corresponding to the first partition and the second partition can operate normally to obtain the second check result.

[0060] In some embodiments, the step of checking the first partition of the preset logical flash memory and the second partition of the preset logical flash memory respectively to obtain a second check result includes:

[0061] determining whether the available storage space of the first partition can accommodate the first mirror file, and determining whether the available storage space of the second partition can accommodate the second mirror file to obtain the second check result.

[0062] In some embodiments, the method further includes:

[0063] obtaining effective data corresponding to the first mirror file and effective data corresponding to the second mirror file;

[0064] compressing the effective data corresponding to the first mirror file to generate a first compressed mirror file, and compressing the effective data corresponding to the second mirror file to generate a second compressed mirror file; and

[0065] splicing the first compressed mirror file and the second compressed mirror file to obtain a target mirror file

[0066] In a second aspect, a computer program product is provided, comprising computer readable instructions which, when executed by one or more processors, implement the steps of the method of the first aspect.

[0067] In a third aspect, a computer device is provided, comprising

[0068] one or more processors; and

[0069] a memory associated with the one or more processors, the memory configured to store computer readable instructions which, when executed by the one or more processors, implement the steps of the method of the first aspect.

[0070] In a fourth aspect, a non-volatile computer readable storage medium is provided, having stored thereon computer readable instructions which, when executed by one or more processors, implement the steps of the method of the first aspect.

[0071] Compared with the related art, in the present application, a first image file and a second image file are acquired, the first image file is a binary image file, and the second image file is a folder image file; the first image file and the second image file are verified; the first image file that passes the verification is refreshed to a first partition of a preset logical flash memory, and the second image file that passes the verification is refreshed to a second partition of the preset logical flash memory, wherein the first partition of the preset logical flash memory is a flash memory partition, and the second partition of the preset logical flash memory is an embedded memory partition. BRIEF DESCRIPTION OF DRAWINGS

[0072] Fig. 1 is a structural schematic diagram of an image processing system in an embodiment of the present application;

[0073] Fig. 2 is a structural schematic diagram of a preset logical flash memory in an embodiment of the present application;

[0074] Fig. 3 is a flow schematic diagram of an image processing method in an embodiment of the present application;

[0075] Fig. 4 is a structural block diagram of an image processing apparatus in an embodiment of the present application;

[0076] Fig. 5 is an internal structural diagram of a computer device in an embodiment of the present application;

[0077] Fig. 6 is a structural block diagram of a non-volatile computer readable storage medium in an embodiment of the present application;

[0078] Fig. 7 is a structural block diagram of a computer program product in an embodiment of the present application. DETAILED DESCRIPTION

[0079] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.

[0080] In some embodiments, the mirror processing method of the present application is applied to a mirror processing system, as shown in FIG. 1, the mirror processing system includes a BMC (Baseboard Management Controller) Soc (System on a Chip), a Flash, an eMMC (Embedded Multi-Media Card), a first end of the BMC Soc is connected with a first end of the Flash, and a second end of the BMC Soc is connected with a first end of the eMMC, wherein the BMC Soc integrates a plurality of different functional components, including a processor core, a memory controller, a graphics processor, a hardware accelerator, an interface controller, etc. In a server, SoC usually refers to an integrated circuit on the server motherboard, which integrates the main functions of the server, such as processor, memory controller, PCIe (Peripheral Component Interconnect Express) controller, etc. SoC plays a role of connecting and coordinating various hardware components in the server, providing the computing and processing power required by the server system. The Flash includes Flash0 and Flash1 on the diagram, wherein the Flash can be Nand Flash (non-volatile memory based on Nand technology), which has higher storage density, lower power consumption and longer life than traditional Flash. The eMMC refers to a package composed of a flash memory and a flash memory controller integrated on the same silicon chip. Nand Flash and eMMC are suitable for application scenarios that require frequent write operations and large-capacity data storage.

[0081] In the present application, the first partition (non-volatile memory 0, non-volatile memory 1) and the second partition (storage area 0, storage area 1) in the eMMC are set to form the preset logical flash memory (logical non-volatile memory 0 and logical non-volatile memory 1). The non-volatile memory 0 and the non-volatile memory 1 shown in the figure are Nand Flash. The non-volatile memory and the storage area in the eMMC are combined to design a logical non-volatile memory for capacity expansion, which can optimize hardware resources. As shown in FIG. 2, two non-volatile memories (non-volatile memory 0, non-volatile memory 1) are used to form two logical non-volatile memories (logical non-volatile memory 0 and logical non-volatile memory 1) with two storage areas (storage area 0, storage area 1) in the eMMC.

[0082] In the embodiment of the present application, as shown in FIG. 3, the present application provides a mirror processing method, comprising the following steps:

[0083] In step 101, a first mirror file and a second mirror file are obtained. The first mirror file is a binary mirror file, and the second mirror file is a folder mirror file.

[0084] In some embodiments, the first mirror file and the second mirror file are files required when the server component performs firmware upgrade, that is, the mirror files that need to be refreshed during firmware upgrade. It can be understood that, since firmware upgrade is required, the first mirror file and the second mirror file are both new version mirror files. The first mirror file is a binary mirror file, and the second mirror file is a folder mirror file.

[0085] In some embodiments, taking a commonly used 64M Nand Flash as an example, if the required mirror space is 256M, the first 64M will be encoded in binary form to form the first mirror file. This encoding method ensures the compactness and efficiency of the mirror, providing strong support for the fast startup and operation of the system. The remaining 192M space is stored in a folder format to form the second mirror file, which has higher flexibility and scalability, facilitating subsequent data updating and management. Finally, the first mirror file and the second mirror file will be spliced, signed and packaged into a complete target mirror file for subsequent use.

[0086] In some embodiments, obtaining the first image file and the second image file further comprises: obtaining information of a first storage area corresponding to a first partition of the preset logical flash memory; obtaining information of a second storage area corresponding to a second partition of the preset logical flash memory; determining whether the first partition and the second partition are readable and writable according to the information of the first storage area and the information of the second storage area; in response to determining that the first partition and the second partition are readable and writable, exporting a file system path; mounting the first storage area corresponding to the first partition into the file system based on the file system path; and mounting the second storage area corresponding to the second partition into the file system based on the file system path.

[0087] The first partition of the preset logical flash memory herein is a flash partition, i.e., a non-volatile memory storage area in the logical non-volatile memory. The second partition herein is an embedded memory partition, i.e., a storage area in the eMMC in the logical non-volatile memory.

[0088] The first storage area information can be storage data and address information of the first partition, and the second storage area information can be storage data and address information of the second partition. According to the first storage area information and the second storage area information, it is determined whether the first partition and the second partition are readable and writable. In response to determining that the first partition and the second partition are readable and writable, a file system path is exported. The first storage area corresponding to the first partition is mounted into the file system based on the file system path. The second storage area corresponding to the second partition is mounted into the file system based on the file system path. That is, after confirming that all partitions in the logical non-volatile memory are readable and writable, subsequent operations are performed. At the same time, the path of the exported file system is recorded, which can track and confirm which file systems are being shared and the location of the file system on the server. This process not only helps to ensure the stability and reliability of the file system, but also improves the overall work efficiency and effectively avoids interruptions and other problems during server operation.

[0089] When the server is started subsequently, the Soc processor is responsible for loading the u-boot (Universal Boot Loader) bootloader first. This key step lays a solid foundation for subsequent system startup. When the u-boot boots the kernel (kernel), it will mount the corresponding storage area in the eMMC into the Linux file system of the BMC, and also mount the non-volatile memory into the Linux file system formed by the BMC to form a logical storage space, i.e., the logical non-volatile memory. In this way, the BMC can conveniently perform read and write operations on the logical non-volatile memory file system, thereby realizing efficient management of system data.

[0090] In the present application, the second mirror file is configured to store some execution function files. In this case, the non-volatile memory can be mounted to the Linux file system formed by the BMC during the mounting process, and then the corresponding storage area in the eMMC is mounted to the Linux file system of the BMC. Since the second mirror file is some execution function, even if the non-volatile memory is mounted, the mounting of the eMMC does not affect the start of the BMC.

[0091] In step 102, the first mirror file and the second mirror file are verified.

[0092] In step 103, the first mirror file that passes the verification is refreshed to the first partition of the preset logical flash memory, and the second mirror file that passes the verification is refreshed to the second partition of the preset logical flash memory. The first partition of the preset logical flash memory is a flash memory partition, and the second partition of the preset logical flash memory is an embedded memory partition.

[0093] The present application designs the preset logical partition formed by the flash memory partition and the embedded memory partition, which can expand the mirror file storage space. The mirror files are divided into binary mirror files and folder mirror files according to different types, and the mirror files are refreshed according to different types of mirror files, which can improve the refresh speed of the target mirror file.

[0094] In some embodiments, the first mirror file and the second mirror file can be verified according to a preset method to obtain a first verification result. The first partition of the preset logical flash memory and the second partition of the preset logical flash memory are verified to obtain a second verification result. Whether the verification result of the first mirror file and the second mirror file is abnormal is determined according to the first verification result and the second verification result.

[0095] The preset method here can be to calculate the hash value of the first mirror file and the second mirror file using the system self-provided tool. In some embodiments, the cmd command can be input to enter the directory of the mirror file. Then, the certutil command provided by the system is used to verify the hash value of the specified file. The obtained hash value is a unique string used to verify the integrity of the file. The hash values of the first mirror file and the second mirror file are compared with the standard hash values published by the official. When the hash value of the first mirror file is consistent with the standard first hash value and the hash value of the second mirror file is consistent with the standard second hash value, it is indicated that the mirror file has not been tampered with, otherwise the mirror file may be damaged or incomplete.

[0096] In addition, the detection of the mirror file is not limited to the hash value check, but also includes the check of the file format, size, and whether containing virus or malware, etc. Ensuring the security and integrity of the file is a necessary step before using the mirror file, especially when performing critical operations such as system installation or data recovery.

[0097] After the first mirror file and the second mirror file are checked according to the preset method, the first partition and the second partition of the preset logical flash memory are checked. The check here can be to determine whether the storage devices corresponding to the first partition and the second partition can operate normally, and whether the available storage space of the first partition and the second partition can accommodate the first mirror file and the second mirror file. When the first check result and the second check result are both normal, it is determined that the check results of the first mirror file and the second mirror file are normal.

[0098] By first checking the first mirror file and the second mirror file by calculating the hash value to check the file content, and checking the first partition and the second partition of the preset logical flash memory, the accuracy of system updating and maintenance can be improved.

[0099] In some possible embodiments, the data signature and the public key corresponding to the target mirror file can be obtained, the target mirror file is signed and checked by using the data signature and the public key, the mirror file that has not been refreshed is obtained, the hash value corresponding to the mirror file that has not been refreshed is calculated as the data signature, the target mirror file is calculated by using the public key to calculate the hash value, the hash value corresponding to the target mirror file is obtained, the data signature and the hash value corresponding to the target mirror file are compared, and in response to determining that the data signature and the hash value corresponding to the target mirror file are consistent, the target mirror file passes the signature verification. In response to determining that the hash value corresponding to the target mirror file and the data signature are inconsistent, it is determined that the hash value corresponding to the target mirror file does not pass the verification.

[0100] By comparing the data signature and the hash value corresponding to the target mirror file, it is determined whether the data signature and the hash value corresponding to the target mirror file are consistent. In response to determining that the data signature and the hash value corresponding to the target mirror file are consistent, the secure boot is performed. In response to determining that the data signature and the hash value corresponding to the target mirror file are inconsistent, it is considered that the target mirror file is tampered, and the server is prohibited from starting. The security of the server startup can be ensured, and the cost of the security check of the target mirror file is reduced.

[0101] In some embodiments, in response to determining that the verification result of the first image file and / or the second image file is abnormal, the reading start offset, the data segment size, and the data value corresponding to the first image file and the second image file are obtained, and the data value of the data segment size is written to the start offset position in the underlying memory of the basic management controller. The baseboard manager parses the first image file and the second image file according to the data value of the data segment size, and refreshes the first image file and the second image file according to the parsed image file.

[0102] Wherein, the underlying memory is EEPROM (Electrically Erasable Programmable Read-Only Memory), by providing an EEPROM data modification file. Directly let the baseboard management controller modify the underlying memory. The version number can be added at the same time to facilitate the compatibility of BMC (baseboard management controller) parsing software. When the verification result of the first image file and the second image file is abnormal, the reading start offset, the data segment size, and the data value corresponding to the first image file and the second image file can be written, and the data value of the data segment size is written to the start offset position in the underlying memory of the basic management controller. Thus, the parsing of the image file can be started according to the data value of the data segment size written to the start offset position in the underlying memory, and the image file is refreshed according to the parsing result.

[0103] The refresh mechanism is a key link of BMC firmware update. Through the web interface, the administrator can conveniently upload the target image file. After uploading is completed, the BMC will perform signature verification operation on the uploaded target image file to ensure its security and integrity. After the signature verification is passed, the BMC will unpack the target image file and distribute it to two independent upgrade processes for image refresh operation. This dual-process design scheme aims to improve the upgrade speed and shorten the upgrade time, so as to ensure the continuous and stable operation of the system.

[0104] In some embodiments, taking the commonly used 64M Nand Flash as an example, if the required image space is 256M, in the flashing process, the data of the first 64M (the first image file) will be written into the Nand Flash (the first partition) according to the sector block; and the remaining 192M data is efficiently written into the storage area of the eMMC (the second partition) in the form of a folder.

[0105] In the related art, when the storage area of a non-volatile memory is not enough to store a target image file, multiple non-volatile memories are usually established to expand the storage area by setting multiple non-volatile memories, establishing the correspondence relationship of the multiple non-volatile memories, storing the target image file in the multiple non-volatile memories having the mapping relationship, and finding the non-volatile memories having the mapping relationship of the same target image file when refreshing the image, and refreshing the image file to these non-volatile memories. Alternatively, in the related art, when the storage area of a non-volatile memory is not enough, part of the area of another non-volatile memory is divided to store the excess part of the non-volatile memory, and the form of storage intersection exists. The logical non-volatile memory designed in the present application expands the storage area in the non-volatile memory and eMMC, and forms the logical non-volatile memory without establishing the mapping relationship between different devices. And in the subsequent refreshing of the image file according to the type of the image file, the subsequent system data updating and management can be facilitated.

[0106] In some embodiments, the first image file and the second image file can also be spliced to generate the target image file, and the target image file is verified.

[0107] In some embodiments, the starting address position and the ending address position of the first partition of the preset logical flash corresponding to the first image file can be obtained; the starting address position and the ending address position of the second partition of the preset logical flash corresponding to the second image file can be obtained; the first image file is filled according to the starting address position and the ending address of the first partition of the preset logical flash, and the second image file is filled according to the starting address position and the ending address of the second partition of the preset logical flash, to obtain the target image file.

[0108] In some embodiments, the invalid data and the valid data corresponding to the first image file and the second image file can be extracted, the valid data corresponding to the first image file and the second image file is compressed to generate the first compressed image file and the second compressed image file, and the first compressed image file and the second compressed image file are spliced to obtain the target image file, so as to reduce the size of the target image file.

[0109] The starting address position is the starting address number of the storage area; the ending address position is the ending address number of the storage area; the valid data refers to the data saved in the partition which has an important role in the operation of starting the system, parameter configuration and the like; and the invalid data refers to the data filled in the partition to make up for the vacancy of the valid data, which is usually filled with the number 0.

[0110] When it is judged that the target image file is successfully verified, the target image file is unpacked to obtain a first image file and a second image file, and the first image file and the second image file are subjected to refreshing operations respectively.

[0111] The preset logical flash storages in the application are multiple, and the multiple preset logical flash storages are used to store multiple target image files; wherein the multiple preset logical flash storages include a first preset logical flash storage and a second preset logical flash storage, and the multiple target image files include a main target image file and a backup target image file; the main target image file is refreshed into the first preset logical flash storage, and the backup target image file is refreshed into the second preset logical flash storage.

[0112] It can be understood that each of the multiple preset logical flash storages in the application includes a first partition and a second partition. The first preset logical flash storage can be used to store the main target image file, and the second preset logical flash storage can be used to store the backup target image file. The main target image file and the backup target image file are a kind of redundancy mechanism. When the main target image file is used to execute the baseboard management controller startup or image refreshing operation, the backup target image file can be switched to re-execute the operation.

[0113] After the image upgrade is completed in the application, the BMC restarts the firmware system and starts from the backup image. At this time, the backup target image file will become the new main target image file. In order to facilitate data management and correspondence, a fixed correspondence mode is adopted between the non-volatile memory (first partition) and the eMMC storage area (second partition). In addition, the eMMC can also be designed into a master-slave switching architecture and decoupled with the non-volatile memory. The first priority can be to start from logical non-volatile memory 0, or the first priority can be to start from logical non-volatile memory 1. Assuming that logical non-volatile memory 0 is started now to refresh, logical non-volatile memory 1 is refreshed, the next time it starts from logical non-volatile memory 1, and the next time it starts, logical non-volatile memory 1 becomes the main image. Then logical non-volatile memory 0 becomes the backup image. In this way, the master-slave switching architecture and the decoupling operation of the non-volatile memory can be realized.

[0114] In some embodiments, the application further includes: monitoring whether the main target image file is changed in real time; in response to determining that the main target image file is changed, triggering a change setting item; when the change setting item is triggered, obtaining the to-be-synchronized information of the main target image file; and updating the backup target image file according to the to-be-synchronized information, so as to realize information synchronization between the main target image file and the backup target image file.

[0115] When the primary target image file is changed, the to-be-synchronized information and the location information of the to-be-synchronized information in the primary target image file are obtained, and the standby target image file is updated according to the to-be-synchronized information and the location information of the to-be-synchronized information in the primary target image file.

[0116] To ensure the integrity and consistency of data, the substrate management controller adopts a dual-mirror synchronization mechanism during operation. Because the Linux system may change the configuration file due to automatic adjustment or user settings, the configuration refresh function needs to be retained in many application scenarios. At the same time, the consistency of the configuration file also needs to be maintained during the dual-mirror fault switching. To achieve this goal, the BMC runs two logical non-volatile memories, and each contains two storage partitions of the logical non-volatile memories (i.e., the non-volatile memory and the eMMC storage area). The file architectures of the two logical non-volatile memory partitions are decoupled, that is, the file contents are not cross-stored. When synchronizing the target image file, the rsync image synchronization process is run between the non-volatile memories to ensure the consistency of the data; rsync is a data mirror backup tool under the Linux system. Remote synchronization can be achieved using the fast incremental backup tool Remote Sync, which supports local replication or synchronization with other SSH, rsync hosts. At the same time, similar rsync image synchronization processes are also run between the eMMC storage areas. It is worth noting that the buffer of the non-volatile memory rsync process is placed in the memory of the BMC to improve the data exchange speed; while the buffer of the eMMC storage area rsync process is placed in the eMMC file system to take advantage of its high performance and large capacity.

[0117] In some embodiments, the application also includes the setting of the fault switching of the logical non-volatile memory, wherein the primary target image file can be called by the boot program started by the substrate management controller to start the substrate management controller when the server starts; the number of times of calling the primary target image file by the boot program is obtained, and the boot program calls the standby target image file when the number of times of calling the primary target image file by the boot program is greater than a preset calling number. When the substrate management controller is started for a time period longer than a first time period using the primary target image file, the substrate management controller is started using the standby target image file.

[0118] After the substrate management controller is started using the standby target image file, it is verified whether the primary target image file is abnormal, and in response to determining that the primary target image file is abnormal, it is set that the substrate management controller is started using the standby target image file when the substrate management controller is not started for a time period longer than a second time period using the primary target image file, wherein the second time period is shorter than the first time period.

[0119] The BMC image contains three parts, U-boot, kernel and file system. The U-boot is an image boot program, when it starts normal boot, it starts the watchdog timing function, the function of the watchdog is a time countdown timer. For example, the watchdog timeout time is 60 seconds, the U-boot starts to boot the image program to start timing, if the kernel information is not successfully booted within 60 seconds, the watchdog will not be closed and will timeout. The watchdog timeout action can be set to switch the spi interface to the standby Flash information, that is, to continue to start from the standby Flash, so as to realize the dual image switching logic. In addition, if the U-boot successfully boots the kernel information, the kernel startup program will update the watchdog timeout time, that is, set the kernel startup process timeout time, to avoid the problem that the kernel startup process is stuck and cannot switch the image due to kernel panic (kernel error) information and the like. Through the timeout mechanism limitation of the U-boot and kernel two processes, it is ensured that the image switching mechanism can be triggered in any step of the image startup process.

[0120] At startup, the BMC is first booted by the u-boot to load the kernel. In response to determining that the u-boot fails, the watchdog of the SoC is responsible for detecting the abnormal state and starting the system from the standby image to ensure continuous running capability. When the standby image starts, it detects the current active flash and mounts the eMMC storage area corresponding to the non-volatile memory at the kernel startup to ensure data continuity and integrity. In response to determining that the u-boot starts successfully but the kernel fails to start, the u-boot remains active and loads the kernel in the standby image for startup operation; at the same time, the kernel in the standby image also loads the eMMC storage area corresponding to the standby non-volatile memory to ensure the normal running capability of the system. Once the BMC is successfully started as a whole, the dual image synchronization mechanism is immediately executed to ensure that the firmware information in the two logical non-volatile memories is highly consistent and synchronized; this mechanism greatly improves the reliability and data security of the system, and provides a strong guarantee for the stable operation of the BMC.

[0121] If the watchdog monitoring system timing length meets the preset length before receiving the second information, it indicates that the BIOS (Basic Input Output System) is normally loaded, and the CPU normally starts according to the current flash.

[0122] The second time length is less than the first time length, so that when the main mirror is abnormal, the backup mirror can be used to start the baseboard management controller immediately, avoiding the long start-up time caused by the mirror switching mechanism again next time.

[0123] In some embodiments, the application forms a preset logical flash memory (logical non-volatile memory) by regulating the storage area (storage area 0, storage area 1) in the non-volatile memory and eMMC. The important scenarios of the logical non-volatile memory in use are described: mirror start, mirror generation, mirror refresh, double mirror synchronization, double flash fault switching, and other important scenarios. The BMC start and mirror management mechanism is set: during the start-up process of the BMC, the Soc processor first loads the u-boot boot program, and the u-boot mounts the corresponding storage area in the eMMC to the Linux file system of the BMC when booting the kernel, forming a logical non-volatile memory. The generation of the mirror involves the combination of binary format and file format, and through the optimization of the storage structure and management method, the fast access and update of the mirror are realized. The BMC refresh mechanism is set: through the web interface to upload a new firmware mirror, the BMC will automatically perform signature verification, unpacking, distribution and writing operations. The data is written into the non-volatile memory and eMMC during the refresh process, realizing the smooth upgrade of the firmware. After the upgrade is completed, the BMC starts from the backup mirror, realizing the smooth switching of the main and backup mirrors, ensuring the continuous and stable operation of the system. The double mirror synchronization and fault switching mechanism is set: in order to improve the reliability and stability of the system, the application designs a double mirror synchronization and fault switching mechanism. The two logical non-volatile memory partitions in the BMC running keep the data consistency between the non-volatile memory and the eMMC storage area through the rsync mirror synchronization process. When a fault is detected, the system switches to the backup mirror, ensuring the continuity and integrity of the data. This mechanism significantly improves the fault tolerance and stability of the system.

[0124] In some embodiments, the preset logical flash memory in the application further includes a third partition of the preset logical flash memory, and the third partition of the preset logical flash memory is used to store synchronization information. The method comprises: after detecting the synchronization information, storing the synchronization information into the third partition of the preset logical flash memory, and the third partition is a shared partition of the main target mirror file and the backup target mirror file.

[0125] In some embodiments, the volume of the information to be synchronized can be acquired before the server starts; the size of the remaining space of the first preset logical flash memory and the second preset logical flash memory is acquired; here, the size of the remaining space refers to the size of the available space remaining after the main target image file / backup target image file is stored. According to the size of the information to be synchronized, a space with the size of the volume of the information to be synchronized is allocated from the second partition of the first preset logical flash memory and the second partition of the second preset logical flash memory, and the information to be synchronized is stored in the space. As can be known from FIG. 2, the second partition of any preset logical flash memory in the present application is a storage area divided from an eMMC device, and a third space can be divided from the eMMC storage space outside the storage area. The eMMC storage space can be designed according to the size of the remaining space of the first preset logical flash memory and the second preset logical flash memory and the volume of the information to be synchronized, so that the eMMC storage space is fully utilized, and the space of the eMMC storage space is dynamically adjusted according to the volume of the information to be synchronized of different sizes, to meet the upgrade of different system files. Through the method, the eMMC storage space can be fully utilized, and the space of the eMMC storage space is dynamically adjusted according to the upgrade of the image data, to meet the upgrade of different system files, and the normal operation of the system can be ensured.

[0126] It should be understood that, although the steps in the flowchart of FIG. 3 are shown in sequence according to the arrows, the steps are not necessarily executed in sequence according to the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other sequences. Moreover, at least part of the steps in FIG. 3 can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of the sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.

[0127] In the embodiments of the present application, as shown in FIG. 4, an image processing apparatus is provided, comprising an acquisition module 20, a verification module 21 and a refreshing module 22, wherein:

[0128] The acquisition module 20 is configured to acquire a first image file and a second image file, the first image file being a binary image file, and the second image file being a folder image file; the verification module 21 is configured to verify the first image file and the second image file; and the refreshing module 22 is configured to refresh the first image file that passes the verification to a first partition of a preset logical flash memory, and refresh the second image file that passes the verification to a second partition of the preset logical flash memory, wherein the first partition of the preset logical flash memory is a flash memory partition, and the second partition of the preset logical flash memory is an embedded memory partition.

[0129] In the embodiment of the present application, the device can realize another embodiment of the mirror image processing method, and the steps are as follows:

[0130] The obtaining of the first mirror image file and the second mirror image file includes: obtaining information of a first storage area corresponding to a first partition of the preset logical flash memory; obtaining information of a second storage area corresponding to a second partition of the preset logical flash memory; determining whether the first partition and the second partition are readable and writable according to the information of the first storage area and the information of the second storage area; in response to determining that the first partition and the second partition are readable and writable, exporting a file system path; mounting the first storage area corresponding to the first partition into the file system based on the file system path; and mounting the second storage area corresponding to the second partition into the file system based on the file system path.

[0131] In the embodiment of the present application, the device can realize another embodiment of the mirror image processing method, and the steps are as follows:

[0132] The method further includes: obtaining a start address position and an end address position of a first partition of the preset logical flash memory corresponding to the first mirror image file; obtaining a start address position and an end address position of a second partition of the preset logical flash memory corresponding to the second mirror image file; filling the first mirror image file according to the start address position and the end address of the first partition of the preset logical flash memory, and filling the second mirror image file according to the start address position and the end address of the second partition of the preset logical flash memory, to obtain a target mirror image file.

[0133] In the embodiment of the present application, the device can realize another embodiment of the mirror image processing method, and the steps are as follows:

[0134] The verifying of the first mirror image file and the second mirror image file includes: verifying the first mirror image file and the second mirror image file according to a preset method respectively to obtain a first verification result; verifying the first partition of the preset logical flash memory and the second partition of the preset logical flash memory respectively to obtain a second verification result; and determining whether the verification result of the first mirror image file and the second mirror image file is abnormal according to the first verification result and the second verification result.

[0135] In the embodiment of the present application, the device can realize another embodiment of the mirror image processing method, and the steps are as follows:

[0136] The method further comprises: in response to determining that the check results of the first mirror file and the second mirror file are abnormal, obtaining a read starting offset, a data segment size and data values corresponding to the first mirror file and the second mirror file, and writing the data values of the data segment size to a starting offset position in the underlying memory of the basic management controller; the basic management controller parses the first mirror file and the second mirror file according to the data values of the data segment size, and refreshes the first mirror file and the second mirror file according to the parsed mirror files.

[0137] In the embodiment of the present application, the above-mentioned device can realize another embodiment of the mirror processing method, and the steps are as follows:

[0138] The method further comprises: setting a plurality of preset logical flash memories, wherein the plurality of preset logical flash memories are used to store a plurality of target mirror files; the plurality of preset logical flash memories include a first preset logical flash memory and a second preset logical flash memory, and the plurality of target mirror files include a main target mirror file and a backup target mirror file; the main target mirror file is refreshed into the first preset logical flash memory, and the backup target mirror file is refreshed into the second preset logical flash memory.

[0139] In the embodiment of the present application, the above-mentioned device can realize another embodiment of the mirror processing method, and the steps are as follows:

[0140] The method further comprises: monitoring whether the main target mirror file is changed in real time; in response to determining that the main target mirror file is changed, triggering a change setting item; when the change setting item is triggered, obtaining to-be-synchronized information of the main target mirror file; updating the backup target mirror file according to the to-be-synchronized information, so as to realize information synchronization between the main target mirror file and the backup target mirror file.

[0141] In the embodiment of the present application, the above-mentioned device can realize another embodiment of the mirror processing method, and the steps are as follows:

[0142] The updating of the backup target mirror file according to the to-be-synchronized information comprises: in response to the main target mirror file being changed, obtaining the to-be-synchronized information and position information of the to-be-synchronized information in the main target mirror file; and updating the backup target mirror file according to the to-be-synchronized information and the position information of the to-be-synchronized information in the main target mirror file.

[0143] In the embodiment of the present application, the above-mentioned device can realize another embodiment of the mirror processing method, and the steps are as follows:

[0144] The method further comprises: starting the baseboard management controller by a boot program; calling the main target image file by the boot program; starting the baseboard management controller; obtaining the number of times of calling the main target image file by the boot program; and calling the standby target image file by the boot program when the number of times of calling the main target image file by the boot program is greater than a preset calling number.

[0145] In the embodiment of the present application, the device can implement another embodiment of the image processing method, and the steps are as follows:

[0146] The method further comprises: starting the baseboard management controller by a boot program; calling the main target image file by the boot program; starting the baseboard management controller; obtaining the number of times of calling the main target image file by the boot program; and calling the standby target image file by the boot program when the number of times of calling the main target image file by the boot program is greater than a preset calling number.

[0147] In the embodiment of the present application, the device can implement another embodiment of the image processing method, and the steps are as follows:

[0148] The preset logical flash memory further comprises a third partition of the preset logical flash memory, and the third partition of the preset logical flash memory is used to store the to-be-synchronized information. The method comprises: storing the to-be-synchronized information into the third partition of the preset logical flash memory after detecting the to-be-synchronized information, and the third partition is a shared partition of the main target image file and the standby target image file.

[0149] In the embodiment of the present application, the device can implement another embodiment of the image processing method, and the steps are as follows:

[0150] The method further comprises: obtaining the volume of the to-be-synchronized information; obtaining the size of the remaining space of the first preset logical flash memory and the second preset logical flash memory; and dividing the third partition of the preset logical flash memory according to the volume of the upgrade data corresponding to the target image file and the size of the remaining space of the first preset logical flash memory and the second preset logical flash memory.

[0151] The limitation on the image processing device can refer to the limitation on the image processing method in the foregoing, and will not be described herein. Each module in the image processing device can be implemented by software, hardware and a combination thereof in whole or in part. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operation corresponding to each module.

[0152] In some embodiments, as shown in FIG. 7, the present application also provides a computer program product, which comprises computer readable instructions stored on a non-volatile computer readable storage medium, and when the readable instructions are executed by a computer, the computer can perform the mirror processing method provided by each of the above methods.

[0153] In the embodiments of the present application, a computer device is provided, which can be a terminal, and its internal structure diagram can be as shown in FIG. 5. The computer device comprises a processor, a memory, a network interface, a display screen and an input device connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer readable instructions. The internal memory provides an environment for the operating system and the computer readable instructions in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with external terminals through network connection. The computer readable instructions are executed by the processor to implement a mirror processing method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.

[0154] Those skilled in the art can understand that the structure shown in FIG. 5 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The computer device can comprise more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0155] In the embodiments of the present application, a computer device is provided, which comprises one or more processors; and a memory associated with the one or more processors, the memory being configured to store computer readable instructions, the computer readable instructions being configured to implement the following steps when read and executed by the one or more processors:

[0156] In step 101, a first mirror file and a second mirror file are obtained. The first mirror file is a binary mirror file, and the second mirror file is a folder mirror file.

[0157] In step 102, the first mirror file and the second mirror file are verified.

[0158] In step 103, the first mirror file that passes the verification is refreshed to a first partition of a preset logical flash memory, and the second mirror file that passes the verification is refreshed to a second partition of the preset logical flash memory. The first partition of the preset logical flash memory is a flash memory partition, and the second partition of the preset logical flash memory is an embedded memory partition.

[0159] In the embodiments of the present application, as shown in FIG. 6, a nonvolatile computer readable storage medium is provided, and the computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by one or more processors to implement the following steps:

[0160] In step 101, a first image file and a second image file are acquired, the first image file is a binary image file, and the second image file is a folder image file.

[0161] In step 102, the first image file and the second image file are verified.

[0162] In step 103, the first image file that passes the verification is refreshed to a first partition of a preset logical flash memory, and the second image file that passes the verification is refreshed to a second partition of the preset logical flash memory, wherein the first partition of the preset logical flash memory is a flash memory partition, and the second partition of the preset logical flash memory is an embedded memory partition.

[0163] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by computer readable instructions instructing related hardware, and the computer readable instructions can be stored in a nonvolatile computer readable storage medium. When the computer readable instructions are executed, the processes of the above-mentioned embodiments can be included. Any reference to a memory, storage, database or other medium used in the embodiments provided by the present application can include nonvolatile and / or volatile memory. The nonvolatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. The volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM) and memory bus dynamic RAM (RDRAM) and the like.

[0164] The technical features of the above embodiments can be combined in any manner. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present disclosure.

[0165] The above embodiments only express several implementation ways of the present application, and the description is specific and detailed, but it should not be understood as a limitation to the patent scope. It should be pointed out that, for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are all within the protection scope of the present application.

Claims

1. A mirror processing method characterized by, The method comprises: obtaining a first image file and a second image file, the first image file being a binary image file, and the second image file being a folder image file; verifying the first image file and the second image file; and refreshing the first image file with a successful verification to a first partition of a preset logical flash memory, and refreshing the second image file with a successful verification to a second partition of the preset logical flash memory, wherein the first partition of the preset logical flash memory is a flash memory partition, and the second partition of the preset logical flash memory is an embedded memory partition. Before the step of obtaining the first image file and the second image file, the method further comprises:

2. The method of claim 1, wherein, obtaining information of a first storage area corresponding to the first partition of the preset logical flash memory; obtaining information of a second storage area corresponding to the second partition of the preset logical flash memory; determining whether the first partition and the second partition are readable and writable according to the information of the first storage area and the information of the second storage area; in response to determining that the first partition and the second partition are readable and writable, deriving a file system path; mounting the first storage area corresponding to the first partition to a file system based on the file system path; and mounting the second storage area corresponding to the second partition to the file system based on the file system path. The method further comprises:

3. The method of claim 1, wherein, obtaining a start address position and an end address position of the first partition of the preset logical flash memory corresponding to the first image file; obtaining a start address position and an end address position of the second partition of the preset logical flash memory corresponding to the second image file; and filling the first image file according to the start address position and the end address position of the first partition of the preset logical flash memory, and filling the second image file according to the start address position and the end address position of the second partition of the preset logical flash memory, to obtain a target image file. The step of verifying the first image file and the second image file comprises:

4. The method of claim 1, wherein, verifying the first image file and the second image file according to a preset method, respectively, to obtain a first verification result; verifying the first partition of the preset logical flash memory and the second partition of the preset logical flash memory, respectively, to obtain a second verification result; and determining whether the verification result of the first image file and the second image file is abnormal according to the first verification result and the second verification result. The method further comprises:

5. The method of claim 4, wherein, in response to determining that the verification result of the first image file and the second image file is abnormal, obtaining a read start offset, a data segment size, and a data value corresponding to the first image file and the second image file, and writing the data value of the data segment size to a start offset position in a bottom memory of a baseboard management controller; and the baseboard management controller parses the first image file and the second image file according to the data value of the data segment size, and refreshes the first image file and the second image file according to the parsed image file. The method further comprises:

6. The method of claim 3, wherein, ​ A plurality of preset logical flash memories are provided for storing a plurality of target image files, wherein the plurality of preset logical flash memories include a first preset logical flash memory and a second preset logical flash memory, and the plurality of target image files include a main target image file and a backup target image file. The main target image file is refreshed into the first preset logical flash memory, and the backup target image file is refreshed into the second preset logical flash memory.

7. The method of claim 6, wherein, The method further includes: monitoring whether the main target image file is changed in real time; in response to determining that the main target image file is changed, triggering a change setting item; in response to determining that the change setting item is triggered, obtaining to-be-synchronized information of the main target image file; and updating the backup target image file according to the to-be-synchronized information to realize information synchronization between the main target image file and the backup target image file.

8. The method of claim 7, wherein, The updating of the backup target image file according to the to-be-synchronized information includes: in response to the main target image file being changed, obtaining the to-be-synchronized information and position information of the to-be-synchronized information in the main target image file; and updating the backup target image file according to the to-be-synchronized information and the position information of the to-be-synchronized information in the main target image file.

9. The method of claim 1, wherein, The method further includes: starting the baseboard management controller by a boot program calling the main target image file to realize starting of the baseboard management controller; and obtaining a number of times of the boot program calling the main target image file, and in response to determining that the number of times of the boot program calling the main target image file is greater than a preset calling number of times, guiding the boot program to call the backup target image file.

10. The method of claim 9, wherein, The method further includes: in response to determining that a time length of starting the baseboard management controller by using the main target image file exceeds a first time length without starting the baseboard management controller, starting the baseboard management controller by using the backup target image file; in response to determining that the baseboard management controller is started by using the backup target image file, verifying whether the main target image file is abnormal; and in response to determining that the main target image file is abnormal, setting that the baseboard management controller is started by using the backup target image file when a time length of starting the baseboard management controller by using the main target image file exceeds a second time length without starting the baseboard management controller, wherein the second time length is less than the first time length.

11. The method of claim 1, wherein, The preset logical flash memory further includes a third partition of the preset logical flash memory for storing the to-be-synchronized information, and the method includes: in response to detecting the to-be-synchronized information, storing the to-be-synchronized information into the third partition of the preset logical flash memory, and the third partition is a shared partition of the main target image file and the backup target image file.

12. The method of claim 11, wherein, The method further includes: obtaining a volume of the to-be-synchronized information; obtaining a size of a remaining space of the first preset logical flash memory and the second preset logical flash memory; and dividing the third partition of the preset logical flash memory according to a volume of upgrade data corresponding to the target image file and the size of the remaining space of the first preset logical flash memory and the second preset logical flash memory.

13. The method of claim 1, wherein, The step of verifying the first mirror file and the second mirror file according to a preset method to obtain a first verification result comprises: obtaining a hash value corresponding to the first mirror file and a hash value corresponding to the second mirror file; comparing whether the hash value corresponding to the first mirror file is consistent with a standard first hash value and whether the hash value corresponding to the second mirror file is consistent with a standard second hash value; and in response to determining that the hash value corresponding to the first mirror file is consistent with the standard first hash value and that the hash value corresponding to the second mirror file is consistent with the standard second hash value, obtaining a first verification result that the first mirror file and the second mirror file are not tampered with.

14. The method of claim 1, wherein, The step of refreshing the first mirror file verified successfully to a first partition of a preset logical flash memory and refreshing the second mirror file verified successfully to a second partition of the preset logical flash memory comprises: splicing the first mirror file refreshed to the first partition of the preset logical flash memory and the second mirror file refreshed to the second partition of the preset logical flash memory to obtain a target mirror file, and processing the target mirror file.

15. The method of claim 1, wherein, The step of verifying the first partition of the preset logical flash memory and the second partition of the preset logical flash memory respectively to obtain a second verification result comprises: determining whether the storage devices corresponding to the first partition and the second partition can operate normally to obtain the second verification result.

16. The method of claim 1, wherein, The step of verifying the first partition of the preset logical flash memory and the second partition of the preset logical flash memory respectively to obtain a second verification result comprises: determining whether the available storage space of the first partition can accommodate the first mirror file and whether the available storage space of the second partition can accommodate the second mirror file to obtain the second verification result.

17. The method of claim 1, wherein, The method further comprises: obtaining effective data corresponding to the first mirror file and effective data corresponding to the second mirror file; compressing the effective data corresponding to the first mirror file to generate a first compressed mirror file and compressing the effective data corresponding to the second mirror file to generate a second compressed mirror file; and splicing the first compressed mirror file and the second compressed mirror file to obtain the target mirror file.

18. A computer program product comprising computer readable instructions, characterized in that, The computer readable instructions, when executed by a processor, implement the steps of the method of any one of claims 1-17.

19. A computer device, comprising: one or more processors; and a memory associated with the one or more processors, the memory being configured to store computer readable instructions, the computer readable instructions, when read and executed by the one or more processors, implementing the steps of the method of any one of claims 1-17.

20. A non-transitory computer readable storage medium, comprising: The non-volatile computer readable storage medium has stored thereon computer readable instructions, the computer readable instructions, when executed by one or more processors, implementing the steps of the method of any one of claims 1-17.

Citation Information

Patent Citations

  • Mirror image updating method and device, chip, electronic equipment and storage medium

    CN115454469A

  • Embedded system generation method and device, embedded system starting method and device and storage medium

    CN117667503A

  • Mirror image refreshing method and device of substrate management controller, equipment and medium

    CN118466996A

  • Mirror image processing method, computer program product, device and storage medium

    CN118656036A

  • Method and apparatus for designing dual-mirror shared CONF partition file

    US20210365361A1

Cited By

  • BMC (Baseboard Management Controller) coprocessing method and device, electronic equipment and storage medium

    CN121807654A