Data processing method, system and device and medium

By applying for and managing preset logical blocks in the BIOS, the configuration storage problem after CMOS is removed on the new platform is solved, and the storage and recovery of user-customized functions are realized.

CN119576653APending Publication Date: 2025-03-07INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411755596.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-30
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

On the new platform, CMOS storage devices are removed, resulting in the inability to store and restore user-customized functions and configuration information normally.

Method used

By applying for a preset logical block with preset storage capacity in the BIOS, assigning a preset identification number to the block, determining its offset address, and using predefined functional functions to write, read and data recovery operations on the data in the block.

Benefits of technology

It realizes storage and recovery of user-customized functions without CMOS, solving the configuration storage problem after CMOS is removed on the new platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576653A_ABST
    Figure CN119576653A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, system and device and a medium, and relates to the field of data storage, a preset logic block with a preset storage capacity is applied in a basic input / output system, a preset identification number is distributed to the block, and the position of the preset logic block can be adjusted according to the relative position of the preset logic block and an original logic block in a BIOS (Basic Input / Output System). The offset address is determined according to the preset storage capacity, so that the data can be stored in a correct position; the pre-defined performance function is used for executing the preset operations such as the write operation, the read operation and the data recovery on the data in the preset logic block, so that the function similar to that of a CMOS (Complementary Metal Oxide Semiconductor) can be realized, and the configuration information can be processed and recovered. The method does not depend on traditional CMOS storage, storage and recovery of user customized functions are achieved through the internal storage block of the BIOS, and the problem of configuration storage after the CMOS is removed on a new platform is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data storage, and in particular to a data processing method, system, device and medium. Background Art

[0002] On some new server platforms, due to architectural changes, the PCH (Platform Controller Hub) chip has been removed, resulting in the devices originally integrated on the PCH no longer being supported, including CMOS (Complementary Metal-Oxide-Semiconductor Memory Device) storage devices. On previous platforms, user-customized functions rely on CMOS to store data, which maintains security and integrity under normal circumstances and can be restored to the default state by removing the battery that powers the CMOS. For example, users may need to configure different numbers of storage devices or network cards according to different scenarios. The BIOS (Basic Input / Output System) automatically allocates the PCIe port bandwidth on the CPU (Central Processing Unit) according to the externally connected devices and stores the configuration information in the CMOS. When the external device configuration cannot be obtained, the BIOS reads the current configuration information from the CMOS for initialization. Users can also define the required configuration by setting the CMOS.

[0003] However, on the new server platform, CMOS is no longer available, so how to find an alternative way to implement the function of CMOS is a technical problem that technicians in this field need to solve. Summary of the invention

[0004] The purpose of the present invention is to provide a data processing method, system, device and medium, which do not rely on traditional CMOS storage, but realize the storage and recovery of user customized functions through the internal storage block of BIOS, and solve the configuration storage problem after CMOS is removed on the new platform.

[0005] In a first aspect, the present application provides a data processing method, comprising:

[0006] Applying for a preset logical block of preset storage capacity from a basic input / output system, and applying for a preset identification number for the preset logical block;

[0007] Determine an offset address of the preset logic block in the basic input and output system according to the position between the preset logic block and the original logic block in the basic input and output system and the preset storage capacity;

[0008] According to the predefined function and the offset address, a preset operation is performed on the data in the preset logic block, and the preset operation includes at least one of a write operation, a read operation and a data recovery operation.

[0009] Optionally, performing a preset operation on the data in the preset logic block according to the predefined function and the offset address includes:

[0010] Determine the data length of the data to be written, and copy the original data corresponding to the data to be written in the preset logical block to the temporary cache according to a predefined write function or a data recovery function, the data length of the data to be written, the base address of the preset logical block and the offset address; wherein the data to be written corresponding to the data recovery function is 0;

[0011] Updating the data to be written into the temporary cache and clearing the original data in the preset logical block;

[0012] The to-be-written data stored in the temporary buffer is written into the preset logic block.

[0013] Optionally, before determining the data length of the data to be written, the method further includes:

[0014] Obtaining write permission for the preset logic block in the basic input and output system;

[0015] After writing the to-be-written data stored in the temporary cache into the preset logical block, the method further includes:

[0016] The write permission of the preset logic block in the basic input and output system is disabled.

[0017] Optionally, performing a preset operation on the data in the preset logic block according to the predefined function and the offset address includes:

[0018] Obtain the data length of the data to be read; and read the data to be read from the preset logical block into a temporary cache in byte order according to a predefined read function, the data length of the data to be read, the base address of the preset logical block and the offset address.

[0019] Optionally, after determining the offset address of the preset logic block in the basic input and output system, the method further includes:

[0020] Initialize the data in the preset logic block to 0.

[0021] Optionally, initializing the data in the preset logic block to 0 includes:

[0022] Mounting a binary file with all zeros on the preset logical block;

[0023] The binary file is loaded during the basic input and output system compilation process to initialize the data in the preset logic block to 0.

[0024] Optionally, also include:

[0025] When the basic input and output system is started and initialized, the state of the data recovery flag is obtained, and the data recovery flag is used to indicate whether the preset logic block performs a data recovery operation;

[0026] Determining whether the state of the data recovery flag is the first state or the second state;

[0027] When the data recovery flag is in the first state, it is determined that the data in the preset logic block are all 0, and there is no need to recover the data in the preset logic block, and the data recovery flag is updated to the second state;

[0028] When the data recovery flag is in the second state, it is determined that there is non-zero data in the preset logic block, and data recovery is required for the data in the preset logic block;

[0029] Registering a predefined function to read and write data in the preset logic block;

[0030] The process of recovering the data in the preset logic block includes:

[0031] Determine whether a data recovery instruction sent by the user is received, or read the status of the power management register to determine whether the status of the real-time clock battery is normal;

[0032] When the data recovery instruction is received or the state of the real-time clock battery is abnormal, the data in the preset logic block is cleared.

[0033] In a third aspect, the present application provides a data processing system, comprising:

[0034] An application unit, used for applying for a preset logical block of a preset storage capacity from a basic input / output system, and applying for a preset identification number for the preset logical block;

[0035] An address determination unit, configured to determine an offset address of the preset logic block in the basic input output system according to a position between the preset logic block and an original logic block in the basic input output system and the preset storage capacity;

[0036] The data operation unit is used to perform a preset operation on the data in the preset logic block according to a predefined function and the offset address, and the preset operation includes at least one of a write operation, a read operation and a data recovery operation.

[0037] In a third aspect, the present application provides a data processing device, including:

[0038] Memory for storing computer programs;

[0039] The processor is used to implement the steps of the data processing method as described above when executing a computer program.

[0040] In a fourth aspect, the present application provides a non-volatile storage medium having a computer program stored thereon, and the computer program, when executed by a processor, implements the steps of the data processing method as described above.

[0041] The present application provides a data processing method, system, device and medium, which relates to the field of data storage. By applying for a preset logical block with a preset storage capacity in a basic input and output system and assigning a preset identification number to the block, the position of the preset logical block can be determined according to its relative position with the original logical block in the BIOS and the preset storage capacity to determine the offset address, thereby ensuring that the data can be stored in the correct position; by using predefined function functions to perform preset operations such as write operations, read operations and data recovery on the data in the preset logical block, it is ensured that functions similar to CMOS can be realized, and configuration information can be processed and recovered. This method does not rely on traditional CMOS storage, but uses the internal storage block of BIOS to realize the storage and recovery of user-customized functions, solving the configuration storage problem after CMOS is removed on the new platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A flow chart of a data processing method provided by the present invention;

[0044] Figure 2 A flowchart of a write function provided by the present invention;

[0045] Figure 3 A flow chart of data recovery provided by the present invention;

[0046] Figure 4A schematic diagram of a data processing system provided by the present invention. DETAILED DESCRIPTION

[0047] The core of the present invention is to provide a data processing method, system, device and medium, which do not rely on traditional CMOS storage, but use the internal storage block of BIOS to realize the storage and recovery of user customized functions, solving the configuration storage problem after CMOS is removed on the new platform.

[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] First, as Figure 1 As shown, the present application provides a data processing method, comprising:

[0050] S11: applying for a preset logical block of a preset storage capacity from a basic input / output system, and applying for a preset identification number for the preset logical block;

[0051] In this step, the process of applying for a preset logical block of preset storage capacity from a basic input and output system (BIOS) and applying for a preset identification number for the logical block is intended to provide an alternative solution for the CMOS storage device removed in the new platform.

[0052] Specifically, first, a preset storage space is requested from the BIOS through the operating system or firmware level. This storage area is called a preset logical block. The size of the preset logical block is determined by the amount of configuration data that needs to be stored, and usually needs to be large enough to store user-defined device configurations and other related data. Next, in order to distinguish different storage blocks, each preset logical block will be assigned a unique preset identification number (ID), which is used to identify and reference the logical block in the system so that subsequent operations can correctly identify and access the data in the block. The identification number can be managed and assigned by the firmware or operating system, and provides a key access path during data operations.

[0053] As an optional embodiment, applying for a preset logical block with a preset storage capacity from a basic input / output system includes: obtaining the storage capacity of the original logical blocks of the basic input / output system and the remaining capacity of each original logical block, and re-dividing the entire storage capacity of the basic input / output system according to the remaining capacity and the number of original logical blocks to obtain updated original logical blocks and at least one preset logical block, wherein the storage capacity of the updated original logical blocks is greater than or equal to the used storage capacity of the original logical blocks.

[0054] In this embodiment, the process of applying for a preset logical block with a preset storage capacity from the basic input and output system (BIOS) first requires obtaining the storage capacity of the original logical blocks in the BIOS and the remaining capacity of each logical block. This information provides an understanding of the existing storage resources to ensure that the existing storage space can be effectively utilized. Next, based on the remaining capacity of these original logical blocks and the total number of logical blocks, the storage capacity of the entire BIOS is re-divided. The purpose of re-dividing is to optimize and adjust the allocation of storage resources to ensure that each logical block can adapt to different storage requirements. Through this division, the updated original logical blocks obtained will be able to meet the requirements of the used capacity of the original logical blocks, while also providing sufficient space for the new preset logical blocks.

[0055] During this process, the storage capacity of the updated original logical block will be greater than or equal to the storage capacity already used in the original logical block. This means that after the storage capacity is redivided, the original logical block will not lose the existing data or configuration, and at the same time, space will be made for the newly added preset logical block, ensuring that the newly added storage block will not conflict with the original block and can independently store new configuration information or system data. In this way, not only can the storage resources of the BIOS be effectively utilized, but new storage requirements can also be met without affecting existing data and configurations. This flexible storage partitioning solution enables the system to support dynamic expansion and customization functions even when storage resources are limited, solving the problem of how to manage storage space and configure data in the absence of CMOS in the new platform.

[0056] Through this step, a flexible storage mechanism that can replace CMOS is provided for the new platform to store data related to device configuration and provide a basis for subsequent data reading, writing or recovery.

[0057] S12: determining an offset address of the preset logic block in the basic input and output system according to the position between the preset logic block and the original logic block in the basic input and output system and the preset storage capacity;

[0058] In this step, the process of determining the offset address of the preset logical block in the basic input and output system (BIOS) according to the positional relationship between the preset logical block and the original logical block in the basic input and output system (BIOS), as well as the preset storage capacity, is to ensure that the newly applied storage block is compatible with the existing system structure and has a clear location in the physical address space. First, by understanding the distribution of the original logical block and its memory occupancy, the storage space required for the preset logical block is calculated according to the preset storage capacity, and it is ensured that it does not overlap with other allocated memory areas. Next, according to the order of the logical blocks or the predetermined memory planning, the offset address of the preset logical block in the BIOS, that is, the starting position of the logical block in the physical memory, is determined. The calculation of the offset address must not only consider the position of the existing logical block, but also ensure that the size of the preset logical block is consistent with the requirements of the system memory mapping, so that the block can be correctly accessed by the operating system or firmware. Through the determination of this offset address, an accurate address pointing is provided for subsequent data operations (such as reading, writing or restoring) on ​​the preset logical block, ensuring that the data can be correctly stored or accessed, and separated from other memory areas or configuration data to avoid conflicts.

[0059] S13: performing a preset operation on the data in the preset logic block according to the predefined function and the offset address, where the preset operation includes at least one of a write operation, a read operation and a data recovery operation.

[0060] In this step, the process of performing a preset operation on the data in the preset logical block according to the predefined function and the previously determined offset address involves the actual operation of the data stored in the logical block. First, the preset operation includes at least one of a read operation, a write operation, and a data recovery operation, and the appropriate operation type is selected according to the specific task requirements.

[0061] When performing a write operation, the function will write the specified data to the specified location of the preset logical block to ensure that the data is correctly stored in the block. When performing a read operation, the function will start from the offset address, read the data in the preset logical block in sequence, and return the read data for subsequent use. During a data recovery operation, if the preset logical block is used to store configuration or system recovery related data, data recovery is performed according to predetermined rules or conditions (for example, based on the status of the backup data or the recovery flag bit) to restore the block to its previous state. When performing these operations, the offset address ensures the accurate location of the data in the memory, and the predefined function provides the logic and code to implement these operations, so that the system can access and manage data according to the established goals. In this way, the data in the preset logical block can be managed flexibly, not only supporting conventional access operations, but also ensuring that the data recovery function is correctly executed in the event of an error or the need for recovery.

[0062] In summary, the data processing method provided by the present application does not rely on traditional CMOS storage, but implements the storage and recovery of user customized functions through the internal storage block of BIOS, thereby solving the configuration storage problem after the CMOS is removed on the new platform.

[0063] Based on the above embodiments:

[0064] As an optional embodiment, according to a predefined function function and an offset address, a preset operation is performed on the data in a preset logical block, including: determining the data length of the data to be written, and according to a predefined write function or a data recovery function, the data length of the data to be written, the base address and the offset address of the preset logical block, copying the original data corresponding to the data to be written in the preset logical block to a temporary cache; wherein the data to be written corresponding to the data recovery function is 0; updating the data to be written to the temporary cache, and clearing the original data in the preset logical block; and writing the data to be written stored in the temporary cache to the preset logical block.

[0065] In this step, when the preset operation is performed on the data in the preset logical block as a write operation according to the predefined function and offset address, the specific implementation method is as follows: First, determine the length of the data to be written, which is usually determined by external input or system requirements. On this basis, the data to be written is processed according to the predefined write function or data recovery function. The write function is usually used for normal data write operations, while the data recovery function is used to restore the data to the default state (usually writing 0 to the preset logical block, so data recovery can be understood as a special data write, but the written data is all 0). The memory area that needs to be operated is calculated based on the length of the data to be written, the base address of the preset logical block, and the offset address, and the original data corresponding to the data to be written in the preset logical block is copied to the temporary cache. At this time, the temporary cache acts as an intermediate storage area to ensure that the data is not lost before the update.

[0066] Then, the data to be written is updated to the temporary cache through predefined operations. If the data to be written needs to be cleared (such as data recovery operation), the corresponding position in the temporary cache will be cleared through the data recovery function. At this time, the data in the temporary cache reflects the update status of the data to be written. Then, the data to be written stored in the temporary cache is written to the preset logical block to complete the data update operation. At this time, the original data in the preset logical block is cleared and replaced with new data. This process ensures the security of the original data and guarantees the accuracy and integrity of the data.

[0067] This operation method ensures the security and efficiency of the data writing process, avoids the risk of original data loss, and also allows flexible data processing through predefined functions, such as clearing data or writing in a specific format during data recovery. Through this mechanism, the system can flexibly respond to different data update requirements, including normal data writing and restoring default values.

[0068] As an optional embodiment, before determining the data length of the data to be written, it also includes: obtaining the write permission of the preset logical block in the basic input and output system; after writing the data to be written stored in the temporary cache to the preset logical block, it also includes: closing the write permission of the preset logical block in the basic input and output system.

[0069] In this embodiment, the data writing operation needs to follow certain permission control to ensure the security and consistency of the data. Before starting to write data, it is necessary to first obtain the write permission of the preset logical block in the basic input and output system (BIOS). This is a protection mechanism to ensure that only authorized operations can modify the data in the preset logical block. By checking and obtaining the write permission, it can be ensured that no permission conflict or unauthorized modification occurs during the data update process.

[0070] After obtaining the write permission, the length of the data to be written will be determined, which is usually determined by external input, calculation or preset conditions. According to this data length, the corresponding operation is performed according to the predefined write function or data recovery function, such as writing the data to the temporary cache, performing necessary data clearing or updating operations, and finally writing the data to be written in the temporary cache to the preset logical block.

[0071] Once the data is successfully written to the preset logical block, the permission recovery operation will be performed, that is, the write permission of the preset logical block will be closed. This step is to prevent unauthorized operations from continuing to modify the updated data. Disabling write permission not only improves the security of the system, but also ensures the integrity and consistency of the data, preventing miswriting or unnecessary modifications in subsequent operations.

[0072] This method adds a layer of security protection to the data writing process by introducing permission management and permission control mechanisms, thereby ensuring the reliability of data and the security of system operations. Through this permission control, the system can strictly manage the data writing process and avoid potential risks and inconsistency issues.

[0073] like Figure 2 As shown, UCDA is a preset logic block. In a specific embodiment, the write function of the preset logic block can be implemented according to the following steps:

[0074] First, you need to obtain write permission to the BIOS area in SMM (System Management Mode). In SMM mode, the BIOS area is usually protected and requires explicit permission to modify it.

[0075] Secondly, according to the definition of the preset logical block (UCDA, Unified Core Data Area) in the firmware volume (FV, Firmware Volume), find the base address (Base) and size (Size) of the preset logical block, and then calculate the offset address (Offset) of the preset logical block in the BIOS. This offset address is used to locate the location of the preset logical block data in the memory.

[0076] Next, the data in the preset logical block area is read and copied to the temporary buffer by calling the MmioRead8 function. MmioRead8 is a memory mapped input and output (MMIO) read function used to read data from a specified memory address.

[0077] Then, the data to be updated is written into the temporary cache. At this time, the content in the cache is updated according to the new data requirements (data to be written).

[0078] After that, the clearing function FlashErase in the SPI protocol is called to clear the data in the preset logical block area. This operation will erase the data stored in the area and prepare for writing new data.

[0079] Next, the data in the temporary cache is written back to the preset logic block area through the FlashWrite function in the SPI protocol. The FlashWrite function writes the updated data in the temporary cache to the original location of the preset logic block to complete the data update operation.

[0080] Finally, after the data is written, the BIOS area write permission in SMM mode is turned off. This step is to protect the security of the BIOS area and prevent further unauthorized write operations, thereby ensuring data integrity and system stability.

[0081] The Restore function of the preset logical block is implemented similarly to the Write function of the preset logical block, except that the data to be updated is initialized to 0.

[0082] Through these steps, the write function of the preset logic block can safely update the data in the BIOS area and ensure the security and reliability of the operation through permission control.

[0083] As an optional embodiment, according to a predefined function function and an offset address, a preset operation is performed on the data in a preset logical block, including: obtaining the data length of the data to be read; according to a predefined read function, the data length of the data to be read, the base address and the offset address of the preset logical block, the data to be read is read out from the preset logical block to a temporary cache in byte order.

[0084] In this embodiment, the process of performing the data reading operation in the preset logic block is as follows:

[0085] First, it is necessary to obtain the data length of the data to be read, that is, determine the size of the data to be read from the preset logical block. This length is usually determined by the application scenario or data operation requirements;

[0086] Next, a predefined read function is used to perform a data read operation. According to this function, the system reads the data in the preset logical block byte by byte based on the base address of the preset logical block (i.e., the starting position of the logical block in the memory or storage) and the offset address (i.e., the position of the specific data in the logical block). When reading, the data will be copied from the preset logical block to a temporary buffer in byte order.

[0087] Throughout the process, the read operation is precisely controlled according to the size and offset address of the preset logical block to ensure the correct reading of data and avoid reading unnecessary or erroneous data. Finally, the read data is stored in a temporary cache, waiting for further processing or use.

[0088] As an optional embodiment, after determining the offset address of the preset logic block in the basic input and output system, the method further includes: initializing the data in the preset logic block to 0.

[0089] In this embodiment, after determining the offset address of the preset logical block in the basic input and output system (BIOS), it is also necessary to perform an initialization operation to clear the data in the preset logical block. That is, the data in the logical block is initialized to 0. The purpose of the initialization operation is to ensure that the data in the preset logical block is blank or invalid, so as to provide a clean starting point for subsequent data operations. Generally, this initialization step is to ensure that the data will not be affected by the previous data when writing, updating or restoring data, so as to avoid potential data conflicts or errors. The process of initialization to 0 can be completed by directly accessing the memory address of the preset logical block and setting its value to 0 one by one, or by using a special clearing function (such as a write 0 operation). This process ensures the correctness and integrity of the data and lays the foundation for subsequent logical block operations.

[0090] As an optional embodiment, initializing the data in the preset logical block to 0 includes: mounting a binary file with all 0s on the preset logical block; loading the binary file during the basic input and output system compilation process to initialize the data in the preset logical block to 0.

[0091] In this optional embodiment, the method of initializing the data in the preset logical block to 0 is achieved by mounting a binary file with all 0s. First, create a binary file with all 0s, the content of which is a series of zero bytes (0x00). The size of this file should match the storage capacity of the preset logical block to ensure that all data areas of the logical block can be fully covered. Then, during the compilation process of the basic input and output system (BIOS), this binary file with all 0s is mounted on the preset logical block. The mounting process is actually loading the file into the memory location corresponding to the preset logical block during the startup process of the BIOS. Through the mounting process, the data in the file will be directly written into the preset logical block, thereby completing the initialization operation.

[0092] The advantage of this method is that it is simple to implement. By mounting and loading a binary file with all zeros into the BIOS system, the data in the preset logic block can be quickly cleared to 0 without complex memory clearing or byte-by-byte operations. This not only reduces the complexity of the implementation, but also reduces the potential risk of errors, ensuring the reliability and consistency of the initialization operation. In short, mounting a binary file with all zeros and loading it through the BIOS compilation process is an efficient and simple implementation method that can quickly and thoroughly initialize the data of the preset logic block to 0.

[0093] As an optional embodiment, it also includes: when the basic input and output system is powered on and initialized, obtaining the state of the data recovery flag, the data recovery flag is used to indicate whether the preset logic block performs a data recovery operation; judging whether the state of the data recovery flag is a first state or a second state; when the data recovery flag is in the first state, judging that the data in the preset logic block are all 0, and there is no need to recover the data in the preset logic block, and updating the data recovery flag to the second state; when the data recovery flag is in the second state, judging that there are non-0 data in the preset logic block, and it is necessary to recover the data in the preset logic block; registering a predefined function to read and write the data in the preset logic block; wherein the process of recovering the data in the preset logic block includes: judging whether a data recovery instruction sent by a user is received, or reading the state of a power management register to determine whether the state of a real-time clock battery is normal; when a data recovery instruction is received, or when the state of the real-time clock battery is abnormal, clearing the data in the preset logic block.

[0094] In this optional embodiment, the basic input and output system (BIOS) obtains and determines the state of the data recovery flag during the boot initialization process to determine whether the data in the preset logic block needs to be recovered. The data recovery flag is a key indicator for indicating whether data recovery needs to be performed.

[0095] First, when the computer is initialized, the BIOS will check the status of the data recovery flag. The data recovery flag has two states: the first state and the second state. The first state indicates that the data in the preset logic block has been initialized to 0 and no data recovery is required; the second state indicates that there is non-zero data in the preset logic block and a data recovery operation needs to be performed.

[0096] When the data recovery flag is in the first state, it means that the data is all 0, indicating that the data recovery operation is no longer needed, so there is no need to perform any data recovery operation on the preset logical block. At this time, the data recovery flag is updated to the second state, indicating that the data recovery operation can be performed next (if necessary). When the data recovery flag is in the second state, it is determined that the data in the preset logical block contains non-zero content, and the data recovery operation needs to be performed. In this process, predefined function functions are registered, which can read and write data in the preset logical block to achieve data recovery.

[0097] The data recovery process includes several steps: First, determine whether the data recovery command sent by the user has been received. If the command is received, or the system reads that the status of the real-time clock (RTC) battery is abnormal, it means that there may be a problem with the system battery, causing the system to be unable to save the necessary configuration information normally. At this time, the system will start the data recovery process. In the case of a data recovery command or RTC battery abnormality, all data in the preset logic block will be cleared to ensure that the system can restart from a clean state. After the data is cleared, the data in the preset logic block will be restored to 0, and subsequent configuration or initialization operations can continue.

[0098] In summary, this embodiment determines whether the data in the preset logic block needs to be restored through the management of the data recovery flag bit, and performs a clearing operation when necessary. This method can ensure the security and integrity of the data and prevent data inconsistency or damage during system initialization. By registering a predefined function to handle data recovery, data recovery operations can be performed flexibly and ensure that the system configuration can be successfully restored in different scenarios.

[0099] Thirdly, Figure 4 As shown, the present application provides a data processing system, including:

[0100] An application unit 41, used for applying for a preset logical block of a preset storage capacity from a basic input / output system, and applying for a preset identification number for the preset logical block;

[0101] An address determination unit 42, configured to determine an offset address of a preset logic block in the basic input and output system according to a position between the preset logic block and an original logic block in the basic input and output system and a preset storage capacity;

[0102] The data operation unit 43 is used to perform a preset operation on the data in the preset logic block according to the predefined function and offset address, and the preset operation includes at least one of a write operation, a read operation and a data recovery operation. For other introductions to the data processing system, please refer to the above embodiments, and this application will not repeat them here.

[0103] In a third aspect, the present application provides a data processing device, including:

[0104] Memory for storing computer programs;

[0105] The processor is used to implement the steps of the above-mentioned data processing method when executing the computer program. For other introductions to the data processing device, please refer to the above-mentioned embodiments, which will not be described in detail in this application.

[0106] In a fourth aspect, the present application provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned data processing method are implemented. For other introductions to the non-volatile storage medium, please refer to the above-mentioned embodiments, and the present application will not repeat them here.

[0107] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned data processing method when the computer program / instruction is executed by a processor. For other introductions to the computer program product, please refer to the above-mentioned embodiments, and the present application will not repeat them here.

[0108] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0109] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, characterized in that: include: Applying for a preset logical block of preset storage capacity from a basic input / output system, and applying for a preset identification number for the preset logical block; Determine an offset address of the preset logic block in the basic input and output system according to the position between the preset logic block and the original logic block in the basic input and output system and the preset storage capacity; According to the predefined function and the offset address, a preset operation is performed on the data in the preset logic block, and the preset operation includes at least one of a write operation, a read operation and a data recovery operation.

2. The data processing method according to claim 1, characterized in that: According to the predefined function and the offset address, a preset operation is performed on the data in the preset logic block, including: Determine the data length of the data to be written, and copy the original data corresponding to the data to be written in the preset logical block to the temporary cache according to a predefined write function or a data recovery function, the data length of the data to be written, the base address of the preset logical block and the offset address; wherein the data to be written corresponding to the data recovery function is 0; Updating the data to be written into the temporary cache and clearing the original data in the preset logical block; The to-be-written data stored in the temporary buffer is written into the preset logic block.

3. The data processing method according to claim 2, characterized in that: Before determining the data length of the data to be written, it also includes: Obtaining write permission for the preset logic block in the basic input and output system; After writing the to-be-written data stored in the temporary cache into the preset logical block, the method further includes: The write permission of the preset logic block in the basic input and output system is disabled.

4. The data processing method according to claim 1, characterized in that: According to the predefined function and the offset address, a preset operation is performed on the data in the preset logic block, including: Obtain the data length of the data to be read; and read the data to be read from the preset logical block into a temporary cache in byte order according to a predefined read function, the data length of the data to be read, the base address of the preset logical block and the offset address.

5. The data processing method according to claim 1, characterized in that: After determining the offset address of the preset logic block in the basic input and output system, the method further includes: Initialize the data in the preset logic block to 0.

6. The data processing method according to claim 5, characterized in that: Initializing the data in the preset logic block to 0 includes: Mounting a binary file with all zeros on the preset logical block; The binary file is loaded during the basic input and output system compilation process to initialize the data in the preset logic block to 0.

7. The data processing method according to any one of claims 1 to 6, characterized in that: Also includes: When the basic input and output system is started and initialized, the state of the data recovery flag is obtained, and the data recovery flag is used to indicate whether the preset logic block performs a data recovery operation; Determining whether the state of the data recovery flag is the first state or the second state; When the data recovery flag is in the first state, it is determined that the data in the preset logic block are all 0, and there is no need to recover the data in the preset logic block, and the data recovery flag is updated to the second state; When the data recovery flag is in the second state, it is determined that there is non-zero data in the preset logic block, and data recovery is required for the data in the preset logic block; Registering a predefined function to read and write data in the preset logic block; The process of recovering the data in the preset logic block includes: Determine whether a data recovery instruction sent by the user is received, or read the status of the power management register to determine whether the status of the real-time clock battery is normal; When the data recovery instruction is received or the state of the real-time clock battery is abnormal, the data in the preset logic block is cleared.

8. A data processing system, characterized in that: include: An application unit, used for applying for a preset logical block of a preset storage capacity from a basic input / output system, and applying for a preset identification number for the preset logical block; An address determination unit, configured to determine an offset address of the preset logic block in the basic input output system according to a position between the preset logic block and an original logic block in the basic input output system and the preset storage capacity; The data operation unit is used to perform a preset operation on the data in the preset logic block according to a predefined function and the offset address, and the preset operation includes at least one of a write operation, a read operation and a data recovery operation.

9. A data processing device, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the data processing method according to any one of claims 1 to 7 when executing a computer program.

10. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Parameter clearing circuit of server, parameter clearing control method, storage medium and server

    CN121070160A