CN113064556A - BIOS data storage method, device, equipment and storage medium - Google Patents

BIOS data storage method, device, equipment and storage medium Download PDF

Info

Publication number
CN113064556A
CN113064556A CN202110476040.3A CN202110476040A CN113064556A CN 113064556 A CN113064556 A CN 113064556A CN 202110476040 A CN202110476040 A CN 202110476040A CN 113064556 A CN113064556 A CN 113064556A
Authority
CN
China
Prior art keywords
data
repeated
storage area
current target
variable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110476040.3A
Other languages
Chinese (zh)
Inventor
王晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110476040.3A priority Critical patent/CN113064556A/en
Publication of CN113064556A publication Critical patent/CN113064556A/en
Priority to PCT/CN2022/089755 priority patent/WO2022228500A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • G06F3/0641De-duplication techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a BIOS data storage method, a device, BIOS equipment and a computer readable storage medium, wherein the method comprises the following steps: the BIOS acquires UEFI variable data to be stored; detecting repeated data corresponding to target data in UEFI variable data to be stored in a repeated data storage area; if the current repeated data corresponding to the current target data is detected in the repeated data storage area, acquiring an index of the current repeated data, and replacing the current target data with the index of the current repeated data for storage in the process of storing UEFI variable data to be stored in the variable data storage area; according to the invention, the current target data is stored by replacing the index of the current repeated data, the repeated target data of each UEFI variable data can be stored by using the repeated data storage area, and the space occupied by the storage of the repeated target data is reduced, so that the space occupied by the storage of the UEFI variable data is reduced.

Description

BIOS data storage method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for storing BIOS data, a BIOS device, and a computer-readable storage medium.
Background
The UEFI (Unified Extensible Firmware Interface) variable refers to an Nvram (non-volatile random access memory) variable stored in a BIOS chip and used in a UEFI BIOS (Basic Input Output System), and provides an operation that an Interface function at runtime can acquire or set the Nvram variable.
The UEFI variables have fixed attribute descriptions in UEFI SPEC (a standard industry specification) and specify that the interface function GetVariable () can obtain the contents of the variables, SetVariable () can generate or modify the contents of one UEFI variable. The UEFI variable is usually stored in a FLASH memory (FLASH memory) of a BIOS, and although an external interface is defined in UEFI SPEC standard industrial specification, the format stored in the FLASH is not required, and the implementation modes are different.
In the prior art, as shown in fig. 1, each UEFI variable data (such as variables 1-N) is generally stored sequentially in a fixed region divided in FLASH; the UEFI Variable data are aggregated in FLASH in a fixed format as a unit, such as Variable basic units shown in fig. 2, where each Variable basic unit includes storage attribute data (i.e., a Variable header), name data of the UEFI Variable data (i.e., a Variable name), GUID (globally unique identifier) data of the UEFI Variable data, and user-specific data of the UEFI Variable data (i.e., Variable data). Because the number of UEFI variable data in the BIOS is large, the FLASH occupied by the UEFI variable data during final storage is large. Therefore, how to reduce the space occupied by UEFI variable data stored in the BIOS is a problem that needs to be solved urgently today.
Disclosure of Invention
The invention aims to provide a BIOS data storage method and device, a BIOS device and a computer readable storage medium, so as to reduce the space occupied by UEFI variable data storage in the BIOS.
In order to solve the above technical problem, the present invention provides a data storage method for a BIOS, including:
the BIOS acquires UEFI variable data to be stored;
detecting repeated data corresponding to target data in the UEFI variable data to be stored in the repeated data storage area; wherein the target data comprises name data and/or GUID data;
if the current repeated data corresponding to the current target data is detected in the repeated data storage area, acquiring an index of the current repeated data, and replacing the current target data with the index of the current repeated data for storage in the process of storing the UEFI variable data to be stored in the variable data storage area; the current target data is any one of the target data, and the data size of the current target data is larger than the data size of the index of the current repeated data.
Optionally, the method further includes:
if the repeated data corresponding to the current target data is not detected in the repeated data storage area, storing the current target data into the repeated data storage area, and generating an index of the current target data in the repeated data storage area;
and in the process of storing the UEFI variable data to be stored into the variable data storage area, replacing the current target data with the index of the current target data for storage.
Optionally, the method further includes:
if the repeated data corresponding to the current target data is not detected in the repeated data storage area, detecting whether the repeated data corresponding to the current target data exists in UEFI variable data stored in the variable data storage area;
if so, storing the current target data into the repeated data storage area, and generating an index of the current target data in the repeated data storage area; in the process of storing the UEFI variable data to be stored into the variable data storage area, replacing the current target data with the index of the current target data for storage;
if not, storing the current target data in the variable data storage area in the process of storing the UEFI variable data to be stored in the variable data storage area.
Optionally, in the process of storing the UEFI variable data to be stored in the variable data storage area, the step of replacing the current target data with the index of the current duplicate data for storage includes:
and in the process of storing the UEFI variable data to be stored into the variable data storage area, replacing the current target data with the index of the current repeated data for storage, and adjusting the repeated attribute corresponding to the current target data in the storage attribute data corresponding to the UEFI variable data to be stored into a repeated state.
Optionally, when the target data includes the name data and the GUID data, the duplicate data storage area includes a duplicate name data storage area and a duplicate GUID data storage area.
Optionally, the method further includes: obtaining UEFI variable data to be read from the variable data storage area;
the process of obtaining the UEFI variable data to be read from the variable data storage area includes:
when the index of the current target data in the UEFI variable data to be read is stored in the variable data storage area, acquiring the index of the current target data;
and acquiring the current target data from the repeated data storage area according to the index of the current target data.
Optionally, when the index of the current target data in the UEFI variable data to be read is stored in the variable data storage area, acquiring the index of the current target data, including:
detecting whether a repeated attribute corresponding to current target data in storage attribute data corresponding to the UEFI variable data to be read in the variable data storage area is in a repeated state;
if so, acquiring an index of the current target data, and executing the step of acquiring the current target data from the repeated data storage area according to the index of the current target data;
if not, the current target data is obtained from the variable data storage area.
The present invention also provides a data storage device of BIOS, comprising:
the acquisition module is used for acquiring each binary menu data to be stored; each binary menu data to be stored is allowed state data or forbidden state data;
the detection module is used for detecting the repeated data corresponding to the target data in the UEFI variable data to be stored in the repeated data storage area; wherein the target data comprises name data and/or GUID data;
the repeated data storage module is used for acquiring an index of the current repeated data if the current repeated data corresponding to the current target data is detected in the repeated data storage area, and replacing the current target data with the index of the current repeated data for storage in the process of storing the UEFI variable data to be stored in the variable data storage area; the current target data is any one of the target data, and the data size of the current target data is larger than the data size of the index of the current repeated data.
The present invention also provides a BIOS device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the data storage method of the BIOS when executing the computer program.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data storage method of the BIOS as described above.
The invention provides a data storage method of a BIOS, which comprises the following steps: the BIOS acquires UEFI variable data to be stored; detecting repeated data corresponding to target data in UEFI variable data to be stored in a repeated data storage area; wherein the target data comprises name data and/or GUID data; if the current repeated data corresponding to the current target data is detected in the repeated data storage area, acquiring an index of the current repeated data, and replacing the current target data with the index of the current repeated data for storage in the process of storing UEFI variable data to be stored in the variable data storage area; the current target data is any one of the target data, and the data size of the current target data is larger than the data size of the index of the current repeated data;
therefore, in the process of storing the UEFI variable data to be stored in the variable data storage area, the current target data is stored by replacing the index of the current repeated data with the current target data, the repeated target data of each UEFI variable data can be stored by using the repeated data storage area, the space occupied by the storage of the repeated target data in the BIOS is reduced, and the space occupied by the storage of the UEFI variable data in the BIOS is reduced. In addition, the invention also provides a data storage device of the BIOS, the BIOS equipment and a computer readable storage medium, and the beneficial effects are also achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating a storage manner of UEFI variable data in a BIOS FLASH in the prior art;
FIG. 2 is a diagram illustrating a basic unit for storing UEFI variable data in BIOS FLASH according to the prior art;
fig. 3 is a schematic diagram of storage attribute data of basic units of UEFI variable data stored in BIOS FLASH in the prior art;
FIG. 4 is a flowchart illustrating a method for storing BIOS data according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a UEFI variable data storage method of another BIOS data storage method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating index storage of another BIOS data storage method according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating storage attribute data of another BIOS data storage method according to an embodiment of the present invention;
FIG. 8 is a flowchart illustrating a name data storage method of another BIOS according to an embodiment of the present invention;
FIG. 9 is a flowchart illustrating name data reading of another BIOS data storage method according to an embodiment of the present invention;
fig. 10 is a block diagram of a data storage device of a BIOS according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 4, fig. 4 is a flowchart illustrating a data storage method of a BIOS according to an embodiment of the present invention. The method can comprise the following steps:
step 101: and the BIOS acquires UEFI variable data to be stored.
It is understood that the UEFI variable data to be stored in this step may be UEFI variable data that needs to be stored. The embodiment does not limit the specific content of the UEFI variable data to be stored, and may be implemented in the same or similar manner as the data content of the UEFI variable in the prior art, for example, the UEFI variable data to be stored may include name data, GUID data, and specific user data.
Specifically, the specific way in which the BIOS device (e.g., the BIOS chip) acquires the UEFI variable data to be stored in this embodiment may be set by a designer according to a practical scenario and a user requirement, for example, the BIOS device may acquire the UEFI variable data to be stored by using a SetVariable () interface function, for example, if the method is the same as or similar to the method for acquiring the UEFI variable data to be stored in the prior art.
Step 102: detecting repeated data corresponding to target data in UEFI variable data to be stored in a repeated data storage area; wherein the target data comprises name data and/or GUID data.
It is understood that the target data in this step may be partial data (such as name data and/or GUID data) in each UEFI variable data, where a duplicate situation may occur, that is, partial data that can be stored in the duplicate data storage area in the UEFI variable data to be stored. The repeated data storage area in this step may be an Nvram area for storing repeated target data.
Specifically, for the specific setting of the target data in this embodiment, the setting may be set by a designer according to a practical scenario and a user requirement, for example, the target data may include name data or GUID data, that is, the repeated data storage area may include a repeated name data storage area (e.g., the repeated variable name storage area in fig. 5) for storing repeated name data or a repeated GUID data storage area (e.g., the repeated variable GUID storage area in fig. 5) for storing repeated GUID data; the target data may also include name data and GUID data, i.e., the duplicate data store may include a duplicate name data store and a duplicate GUID data store.
It should be noted that the repeated data corresponding to the target data in this step may be the same data as the target data in the UEFI variable data to be stored, which is stored in the repeated data storage area. In this step, the BIOS device may detect the duplicate data corresponding to the target data in the UEFI variable data to be stored in the duplicate data storage area by detecting the duplicate data corresponding to the target data in the UEFI variable data to be stored in the duplicate data storage area, and may detect, in the duplicate name data storage area, the data (i.e., duplicate name data) identical to the name data in the UEFI variable data to be stored and the data (i.e., duplicate GUID data) identical to the name data in the UEFI variable data to be stored in the duplicate GUID data storage area, sequentially or separately, if the target data includes name data and GUID data.
Step 103: if the current repeated data corresponding to the current target data is detected in the repeated data storage area, acquiring an index of the current repeated data, and replacing the current target data with the index of the current repeated data for storage in the process of storing UEFI variable data to be stored in the variable data storage area; the current target data is any one of the target data, and the data size of the current target data is larger than the data size of the index of the current repeated data.
It can be understood that the current repeated data in this step may be the repeated data corresponding to the current target data (such as name data or GUID data) in the UEFI variable data to be stored in the repeated data storage area, that is, the data in the repeated data storage area that is the same as the current target data. In this step, the index (index) of the current duplicate data may be information used to indicate a storage location of the current duplicate data in the duplicate data storage area, such as an offset of the current duplicate data in the duplicate data storage area, that is, the BIOS device may search the current duplicate data in the duplicate data storage area by using the index of the current duplicate data. The variable data holding area in this step may be an Nvram area (e.g., a single variable holding area in fig. 5) for storing UEFI variable data.
Correspondingly, in this step, when the current target data to be stored in the UEFI variable data is stored in the duplicate data storage area, the BIOS device may obtain an index of the current target data (i.e., the current duplicate data) in the duplicate data storage area, so that in the process of storing the UEFI variable data to be stored in the variable data storage area, the current target data is replaced with the index of the current duplicate data for storage, so that the current target data does not need to be stored again in the variable data storage area, but an index with a smaller occupied space is stored, and therefore, the occupied space for storing the UEFI variable data to be stored is reduced without affecting the reading and use of the UEFI variable data to be stored. As shown in fig. 6, when the current target data is Name data in UEFI variable data to be stored corresponding to the variable 1, in this step, in the process of storing the UEFI variable data to be stored in the single variable storage area, the BIOS device may replace the actual current target data with the INDEX Name INDEX 1 of Name 1 (i.e., current duplicate data) in the duplicate variable Name storage area corresponding to the current target data at the variable Name in the variable 1, so that the storage of the actual ASCII character string of the current target data can be replaced with Name INDEX 1 (i.e., INDEX) occupying a smaller storage space at the variable Name in the variable 1 in the single variable storage area; correspondingly, when the current target data is GUID data, in the process of storing the UEFI variable data to be stored in the variable data storage area in this step, the BIOS device in this step may replace the actual 16-byte hexadecimal data of the current target data with a smaller INDEX (e.g., GUID INDEX 1-N in fig. 6) occupying a storage space at the GUID of the variable basic unit (e.g., variables 1-N in fig. 6) corresponding to the UEFI variable data to be stored in the variable data storage area.
It should be noted that, this step is illustrated by taking, as an example, storage processing of the BIOS device on any target data (i.e., current target data) of the UEFI variable data to be stored, that is, when the UEFI variable data to be stored includes two or more target data (such as name data and GUID data), each target data may be stored in the same or similar manner as this step.
Correspondingly, in the process that the basic input/output system (BIOS) device stores the UEFI variable data to be stored in the variable data storage area, the BIOS device not only can replace the current target data with the index of the current repeated data for storage, but also can adjust the repeated attribute corresponding to the current target data in the storage attribute data corresponding to the UEFI variable data to be stored into a repeated state, so that when the current target data of the UEFI variable data to be stored is subsequently read, whether the current target data or the index corresponding to the current target data is stored in the variable data storage area can be determined by detecting the repeated attribute corresponding to the current target data in the storage attribute data. That is, in this embodiment, the storage attribute data (i.e., the variable header) of the variable basic unit may include not only the existing attributes such as the size attribute for describing the total size of the variable basic units, the next attribute for describing the offset of the next variable basic unit, and the flags attribute for describing the attribute of the variable basic unit, but also the duplicate attribute corresponding to each target data.
Specifically, when the target data includes name data and GUID data, as shown in fig. 3 and 7, in this embodiment, two attributes, namely, a variable name duplicate attribute corresponding to the name data and a duplicate attribute corresponding to the GUID data (namely, a variable GUID duplicate attribute), may be added to the storage attribute data (namely, the variable header) of the variable basic unit corresponding to the UEFI variable data to be stored, so as to respectively identify whether the name data and the GUID data in the variable basic unit are respectively stored in corresponding duplicate data storage areas; for example, when the duplicate attribute corresponding to the name data is 1 (i.e., duplicate state), it may be indicated that the variable basic unit stores the index corresponding to the name data, and the actual name data (e.g., ASCII string) is stored in the duplicate name data storage area; when the duplicate attribute corresponding to the name data is 0 (i.e., non-duplicate state), it can indicate that the actual name data (e.g., ASCII string) is stored in the variable basic unit.
It should be noted that, in the method provided in this embodiment, if the duplicate data corresponding to the current target data is not detected in the duplicate data storage area, the current target data is stored in the duplicate data storage area, and an index of the current target data in the duplicate data storage area is generated; and in the process of storing the UEFI variable data to be stored into the variable data storage area, replacing the current target data with the index of the current target data for storage. That is to say, in this embodiment, when the BIOS device cannot detect the duplicate data corresponding to the current target data in the duplicate data storage area, the BIOS device may directly store the current target data in the duplicate data storage area, and store the current target data in the variable data storage area by replacing the index of the current target data in the duplicate data storage area with the index of the current target data. For example, in this embodiment, the repeated data storage area may store actual target data in all UEFI variable data, so that only an index corresponding to the target data is stored in the variable data storage area; correspondingly, because only the index corresponding to the target data is stored in the variable data storage area, the repeated attribute corresponding to the target data does not need to be set in the storage attribute data of the variable basic unit corresponding to the UEFI variable data in the variable data storage area.
Specifically, as shown in fig. 8, when the current target data is a variable name (i.e., name data), the BIOS device may search, according to the variable name transferred by SetVariable (), whether the variable name exists in the repeated variable name storage area; if not, storing the ACSII data of the name data in the repeated variable name storage area, generating an index (index) of the ACSII data of the variable name in the repeated variable name storage area, setting a variable name repeated attribute in a variable header of a variable basic unit corresponding to the variable name to be 1, setting the variable name of the variable basic unit to be the generated index (such as a hexadecimal numerical value), and then executing other steps of SetVariable () to finish the storage of the variable basic unit in the variable data storage area; if so, directly acquiring the index (index) of the ACSII data of the variable name stored in the duplicate name data storage area, setting the variable name duplicate attribute in the variable header of the variable basic unit corresponding to the variable name to be 1, setting the variable name of the variable basic unit to be the acquired index, and then executing other steps of SetVariable () to finish the storage of the variable basic unit in the variable data storage area. Correspondingly, in a manner similar to the process shown in fig. 8, the current target data is GUID data, and utilization of the index of the GUID data in the duplicate GUID data storage area, setting of the variable name duplicate attribute in the variable basic unit, and storage of the index corresponding to the GUID data can be achieved.
It can be understood that, the method provided by this embodiment may further include detecting whether the stored UEFI variable data in the variable data storage area includes the repeated data corresponding to the current target data if the repeated data corresponding to the current target data is not detected in the repeated data storage area; if yes, storing the current target data into the repeated data storage area, generating an index of the current target data in the repeated data storage area, and replacing the current target data with the index of the current target data for storage in the process of storing the UEFI variable data to be stored into the variable data storage area; and if not, storing the current target data in the variable data storage area in the process of storing the UEFI variable data to be stored in the variable data storage area.
That is to say, in this embodiment, when the duplicate data corresponding to the current target data cannot be detected in the duplicate data storage area, the BIOS device may continue to detect whether the duplicate data corresponding to the current target data exists in UEFI variable data (that is, UEFI variable data already stored) stored in the variable data storage area, that is, whether the current target data is repeated with data in the variable data storage area, so that when the current target data is repeated with data in the variable data storage area, the current target data is stored in the duplicate data storage area, so that an index corresponding to the current target data can be stored when the current target data needs to be stored again; when the current target data is not repeated with the data in the variable data storage area, the current target data can be stored in the variable data storage area, so that the target data which is not repeated does not need to be stored in the repeated data storage area, and the storage quantity of indexes corresponding to the target data in the variable data storage area is reduced.
Correspondingly, when the repeated data corresponding to the current target data is not detected in the repeated data storage area, and the repeated data corresponding to the current target data exists in the stored UEFI variable data in the variable data storage area, the BIOS device may store the current target data in the repeated data storage area, generate an index of the current target data in the repeated data storage area, replace the current target data with the index of the current target data for storage in the process of storing the UEFI variable data to be stored in the variable data storage area, and adjust the repeated attribute corresponding to the current target data in the storage attribute data corresponding to the UEFI variable data to be stored to be a repeated state. Correspondingly, the BIOS device may further adjust the repeated data corresponding to the current target data in the variable data storage area to an index of the current target data, and adjust a repeated attribute corresponding to the current target data in the storage attribute data corresponding to the UEFI variable data stored where the repeated data is located to a repeated state, thereby implementing storage adjustment of repeated target data occurring in the variable data storage area, and further reducing an occupied space of the repeated target data.
In the embodiment, in the process of storing the UEFI variable data to be stored in the variable data storage area, the current target data is stored by replacing the index of the current repeated data, so that the repeated target data of each UEFI variable data can be stored by using the repeated data storage area, the space occupied by the storage of the repeated target data in the BIOS is reduced, and the space occupied by the storage of the UEFI variable data in the BIOS is reduced.
Based on the above embodiment, the data storage method for the BIOS provided in this embodiment may further include a process of obtaining the UEFI variable data to be read from the variable data storage area, so as to ensure that the BIOS device may obtain complete UEFI variable data (e.g., the UEFI variable data to be stored in the above embodiment) from the variable data storage area. Specifically, the process of obtaining UEFI variable data to be read from the variable data storage area may include the following steps:
step 201: and when the index of the current target data in the UEFI variable data to be read is stored in the variable data storage area, acquiring the index of the current target data.
It can be understood that the UEFI variable data to be read in this step may be stored UEFI variable data that needs to be read; the current target data in this step may be any target data (such as name data or GUID data) in the UEFI variable data to be read. In this step, the BIOS device may store an index of current target data in UEFI variable data to be read in the duplicate data storage area, that is, when the current target data is stored in the duplicate data storage area, obtain the index corresponding to the current target data in the variable data storage area, so as to obtain the current target data from the duplicate data storage area by using the index.
Specifically, for the specific way in which the BIOS device determines the index of the current target data in the UEFI variable data to be read in the variable data storage area in this embodiment, the specific way may be set by a designer according to a practical scenario and a user requirement, for example, only the index corresponding to the target data is stored in the variable data storage area, that is, when the actual target data in the stored UEFI variable data is stored in the duplicate data storage area, the BIOS may default that the index of the current target data in the UEFI variable data to be read is stored in the variable data storage area in this step.
Correspondingly, when actual target data can be stored in the variable data storage area, the BIOS device in this step may also determine whether an index of the current target data in the UEFI variable data to be read is stored in the variable data storage area by detecting whether a repetition attribute corresponding to the current target data in the storage attribute data of the UEFI variable data to be read in the variable data storage area is a repetition state; therefore, when the repeated attribute is in a repeated state, the index of the current target data can be obtained, and the step 202 is carried out to obtain the current target data from the repeated data storage area; and when the repeated attribute is in a non-repeated state, directly acquiring the current target data from the variable data storage area. As shown in fig. 9, when the current target data is name data, the BIOS device may first check a variable name repetition attribute in a variable basic unit corresponding to UEFI variable data to be read when the current target data is read by using GetVariable (); if the value is 1 (i.e. the duplicate state), the area of the variable name in the variable basic unit in the variable data storage area (i.e. the variable name area) is an index (index) corresponding to the name data, but not the ASCII string of the actual name data, according to the index, the ASCII string of the actual name data can be read from the duplicate variable name storage area, and then other processes of GetVariable () can be executed to complete the reading of UEFI variable data to be read; if the variable name area is 0 (i.e. non-duplicate state), the ASCII string of the actual name data in the variable name area in the variable basic unit in the variable data storage area can be directly read from the ASCII string of the name data, and then the other process of GetVariable () can be executed to complete the reading of the UEFI variable data to be read. Accordingly, reading of the stored GUID data can be realized in a manner similar to the process shown in fig. 9 when the current target data is the GUID data.
Step 202: and acquiring the current target data from the repeated data storage area according to the index of the current target data.
It can be understood that, in this step, the BIOS device may obtain the current target data from the repeated data storage area by using the index of the current target data obtained from the variable data storage area; if the current target data is name data, the BIOS device may read the actual current target data (e.g., ASCII string) from the offset area corresponding to the index in the duplicate name data storage area using the index corresponding to the current target data in the variable data storage area.
Corresponding to the above method embodiments, the embodiments of the present invention further provide a data storage device of a BIOS, and the data storage device of the BIOS described below and the data storage method of the BIOS described above may be referred to correspondingly.
Referring to fig. 10, fig. 10 is a block diagram illustrating a data storage device of a BIOS according to an embodiment of the present invention. The apparatus may include:
an obtaining module 10, configured to obtain each binary menu data to be stored; each binary menu data to be stored is allowed state data or forbidden state data;
the detection module 20 is configured to detect duplicate data corresponding to target data in UEFI variable data to be stored in the duplicate data storage area; wherein the target data comprises name data and/or GUID data;
the repeated data storage module 30 is configured to, if current repeated data corresponding to current target data is detected in the repeated data storage area, obtain an index of the current repeated data, and replace the current target data with the index of the current repeated data for storage in a process of storing UEFI variable data to be stored in the variable data storage area; the current target data is any one of the target data, and the data size of the current target data is larger than the data size of the index of the current repeated data.
Optionally, the apparatus may further include:
the index generation module is used for storing the current target data into the repeated data storage area and generating an index of the current target data in the repeated data storage area if the repeated data corresponding to the current target data is not detected in the repeated data storage area;
and the index storage module is used for replacing the current target data with the index of the current target data for storage in the process of storing the UEFI variable data to be stored into the variable data storage area.
Optionally, the apparatus may further include:
the variable detection module is used for detecting whether the repeated data corresponding to the current target data exists in the stored UEFI variable data in the variable data storage area or not if the repeated data corresponding to the current target data is not detected in the repeated data storage area;
the repeated storage module is used for storing the current target data into the repeated data storage area if the repeated data corresponding to the current target data exists, and generating an index of the current target data in the repeated data storage area; in the process of storing UEFI variable data to be stored into a variable data storage area, replacing the current target data with the index of the current target data for storage;
and the variable storage module is used for storing the current target data in the variable data storage area in the process of storing the UEFI variable data to be stored in the variable data storage area if the repeated data corresponding to the current target data does not exist.
Optionally, the data storage module 30 may include:
and the attribute adjusting submodule is used for replacing the current target data with the index of the current repeated data for storage in the process of storing the UEFI variable data to be stored in the variable data storage area, and adjusting the repeated attribute corresponding to the current target data in the storage attribute data of the UEFI variable data to be stored into a repeated state.
Optionally, when the target data includes name data and GUID data, the duplicate data storage area includes a duplicate name data storage area and a duplicate GUID data storage area.
Optionally, the apparatus may further include: the reading module is used for acquiring UEFI variable data to be read from the variable data storage area;
wherein, the reading module may include:
the index acquisition submodule is used for acquiring the index of the current target data when the index of the current target data in the UEFI variable data to be read is stored in the repeated data storage area;
and the repeated reading submodule is used for acquiring the current target data from the repeated data storage area according to the index of the current target data.
Optionally, the index obtaining sub-module may include:
the detection unit is used for detecting whether the repeated attribute corresponding to the current target data in the storage attribute data of the UEFI variable data to be read in the variable data storage area is in a repeated state;
the index acquisition unit is used for acquiring the index of the current target data and sending a starting signal to the repeated reading submodule if the current target data is in a repeated state;
and the variable reading unit is used for acquiring the current target data from the variable data storage area if the current target data is in a non-repetitive state.
In this embodiment, in the process of storing the UEFI variable data to be stored in the variable data storage area, the repeated data storage module 30 replaces the current target data with the index of the current repeated data for storage, so that the repeated target data generated by each UEFI variable data can be stored in the repeated data storage area, and the space occupied by the storage of the repeated target data in the BIOS is reduced, thereby reducing the space occupied by the storage of the UEFI variable data in the BIOS.
Corresponding to the above method embodiments, the embodiments of the present invention further provide a BIOS device, and the following BIOS device and the above described data storage method of the BIOS may be referred to correspondingly.
An embodiment of the present invention further provides a BIOS device, including:
a memory for storing a computer program;
a processor for implementing the steps of the data storage method of the BIOS as provided in the above embodiments when executing the computer program.
Corresponding to the above method embodiments, the embodiments of the present invention further provide a computer-readable storage medium, and the computer-readable storage medium described below and the data storage method of the BIOS described above may be referred to correspondingly.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the device testing method provided in the foregoing embodiment are implemented.
Wherein the storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device, the BIOS apparatus, and the computer-readable storage medium disclosed in the embodiments correspond to the method disclosed in the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method.
The data storage method and device of the BIOS, the BIOS device, and the computer readable storage medium provided by the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A data storage method of a BIOS is characterized by comprising the following steps:
the BIOS acquires UEFI variable data to be stored;
detecting repeated data corresponding to target data in the UEFI variable data to be stored in the repeated data storage area; wherein the target data comprises name data and/or GUID data;
if the current repeated data corresponding to the current target data is detected in the repeated data storage area, acquiring an index of the current repeated data, and replacing the current target data with the index of the current repeated data for storage in the process of storing the UEFI variable data to be stored in the variable data storage area; the current target data is any one of the target data, and the data size of the current target data is larger than the data size of the index of the current repeated data.
2. The data storage method of the BIOS of claim 1, further comprising:
if the repeated data corresponding to the current target data is not detected in the repeated data storage area, storing the current target data into the repeated data storage area, and generating an index of the current target data in the repeated data storage area;
and in the process of storing the UEFI variable data to be stored into the variable data storage area, replacing the current target data with the index of the current target data for storage.
3. The data storage method of the BIOS of claim 1, further comprising:
if the repeated data corresponding to the current target data is not detected in the repeated data storage area, detecting whether the repeated data corresponding to the current target data exists in UEFI variable data stored in the variable data storage area;
if so, storing the current target data into the repeated data storage area, and generating an index of the current target data in the repeated data storage area; in the process of storing the UEFI variable data to be stored into the variable data storage area, replacing the current target data with the index of the current target data for storage;
if not, storing the current target data in the variable data storage area in the process of storing the UEFI variable data to be stored in the variable data storage area.
4. The method for storing the data of the BIOS according to claim 1, wherein in the process of storing the UEFI variable data to be stored in the variable data storage area, replacing the current target data with an index of current duplicate data for storage includes:
and in the process of storing the UEFI variable data to be stored into the variable data storage area, replacing the current target data with the index of the current repeated data for storage, and adjusting the repeated attribute corresponding to the current target data in the storage attribute data corresponding to the UEFI variable data to be stored into a repeated state.
5. The BIOS data storage method of claim 1 wherein when the target data comprises the name data and the GUID data, the duplicate data store comprises a duplicate name data store and a duplicate GUID data store.
6. The BIOS data storage method of any one of claims 1 to 5, further comprising: obtaining UEFI variable data to be read from the variable data storage area;
the process of obtaining the UEFI variable data to be read from the variable data storage area includes:
when the index of the current target data in the UEFI variable data to be read is stored in the variable data storage area, acquiring the index of the current target data;
and acquiring the current target data from the repeated data storage area according to the index of the current target data.
7. The data storage method of the BIOS of claim 6, wherein when the index of the current target data in the UEFI variable data to be read is stored in the variable data storage area, acquiring the index of the current target data, including:
detecting whether a repeated attribute corresponding to current target data in storage attribute data corresponding to the UEFI variable data to be read in the variable data storage area is in a repeated state;
if so, acquiring an index of the current target data, and executing the step of acquiring the current target data from the repeated data storage area according to the index of the current target data;
if not, the current target data is obtained from the variable data storage area.
8. A data storage device of a BIOS, comprising:
the acquisition module is used for acquiring each binary menu data to be stored; each binary menu data to be stored is allowed state data or forbidden state data;
the detection module is used for detecting the repeated data corresponding to the target data in the UEFI variable data to be stored in the repeated data storage area; wherein the target data comprises name data and/or GUID data;
the repeated data storage module is used for acquiring an index of the current repeated data if the current repeated data corresponding to the current target data is detected in the repeated data storage area, and replacing the current target data with the index of the current repeated data for storage in the process of storing the UEFI variable data to be stored in the variable data storage area; the current target data is any one of the target data, and the data size of the current target data is larger than the data size of the index of the current repeated data.
9. A BIOS device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the data storage method of the BIOS as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, realizes the steps of the data storage method of the BIOS according to one of claims 1 to 7.
CN202110476040.3A 2021-04-29 2021-04-29 BIOS data storage method, device, equipment and storage medium Pending CN113064556A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110476040.3A CN113064556A (en) 2021-04-29 2021-04-29 BIOS data storage method, device, equipment and storage medium
PCT/CN2022/089755 WO2022228500A1 (en) 2021-04-29 2022-04-28 Data storage method and apparatus for bios, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110476040.3A CN113064556A (en) 2021-04-29 2021-04-29 BIOS data storage method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113064556A true CN113064556A (en) 2021-07-02

Family

ID=76567911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110476040.3A Pending CN113064556A (en) 2021-04-29 2021-04-29 BIOS data storage method, device, equipment and storage medium

Country Status (2)

Country Link
CN (1) CN113064556A (en)
WO (1) WO2022228500A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022228500A1 (en) * 2021-04-29 2022-11-03 山东英信计算机技术有限公司 Data storage method and apparatus for bios, device and storage medium
CN117667788A (en) * 2024-01-30 2024-03-08 苏州元脑智能科技有限公司 Data interaction method, computer system, electronic device and storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103403717A (en) * 2013-01-09 2013-11-20 华为技术有限公司 Data processing method and data processing device
CN103838765A (en) * 2012-11-26 2014-06-04 比亚迪股份有限公司 Contact information storage method and device and electronic equipment
CN105917304A (en) * 2014-12-09 2016-08-31 华为技术有限公司 Apparatus and method for de-duplication of data
CN106611035A (en) * 2016-06-12 2017-05-03 四川用联信息技术有限公司 Retrieval algorithm for deleting repetitive data in cloud storage
CN107885619A (en) * 2017-11-16 2018-04-06 郑州云海信息技术有限公司 A kind of data compaction duplicate removal and the method and system of mirror image remote backup protection
CN108052291A (en) * 2017-12-14 2018-05-18 郑州云海信息技术有限公司 A kind of storage method of Cloud Server, system, device and readable storage medium storing program for executing
CN109241023A (en) * 2018-09-21 2019-01-18 郑州云海信息技术有限公司 Distributed memory system date storage method, device, system and storage medium
CN109416681A (en) * 2016-08-29 2019-03-01 国际商业机器公司 The data de-duplication of workload optimization is carried out using ghost fingerprint
CN109947731A (en) * 2017-07-31 2019-06-28 星辰天合(北京)数据科技有限公司 The delet method and device of repeated data
CN110944040A (en) * 2019-10-31 2020-03-31 浙江工商大学 Coding method in data compression process
CN111026327A (en) * 2019-10-22 2020-04-17 苏州浪潮智能科技有限公司 Magnetic tape filing system and method based on deduplication
CN111125033A (en) * 2018-10-31 2020-05-08 深信服科技股份有限公司 Space recovery method and system based on full flash memory array
CN111143288A (en) * 2019-12-22 2020-05-12 北京浪潮数据技术有限公司 Data storage method, system and related device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101236525A (en) * 2008-01-24 2008-08-06 创新科存储技术(深圳)有限公司 File memory, reading, deleting and copying method and its relevant system
US10732963B2 (en) * 2017-04-05 2020-08-04 Dell Products, Lp System and method for automatically managing updated UEFI variables
CN109002330A (en) * 2018-07-27 2018-12-14 郑州云海信息技术有限公司 A kind of method, device and equipment identifying UEFI OS startup item
CN111949629B (en) * 2020-07-22 2024-03-22 金钱猫科技股份有限公司 File storage method and terminal oriented to edge cloud
CN113064556A (en) * 2021-04-29 2021-07-02 山东英信计算机技术有限公司 BIOS data storage method, device, equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838765A (en) * 2012-11-26 2014-06-04 比亚迪股份有限公司 Contact information storage method and device and electronic equipment
CN103403717A (en) * 2013-01-09 2013-11-20 华为技术有限公司 Data processing method and data processing device
CN105917304A (en) * 2014-12-09 2016-08-31 华为技术有限公司 Apparatus and method for de-duplication of data
CN106611035A (en) * 2016-06-12 2017-05-03 四川用联信息技术有限公司 Retrieval algorithm for deleting repetitive data in cloud storage
CN109416681A (en) * 2016-08-29 2019-03-01 国际商业机器公司 The data de-duplication of workload optimization is carried out using ghost fingerprint
CN109947731A (en) * 2017-07-31 2019-06-28 星辰天合(北京)数据科技有限公司 The delet method and device of repeated data
CN107885619A (en) * 2017-11-16 2018-04-06 郑州云海信息技术有限公司 A kind of data compaction duplicate removal and the method and system of mirror image remote backup protection
CN108052291A (en) * 2017-12-14 2018-05-18 郑州云海信息技术有限公司 A kind of storage method of Cloud Server, system, device and readable storage medium storing program for executing
CN109241023A (en) * 2018-09-21 2019-01-18 郑州云海信息技术有限公司 Distributed memory system date storage method, device, system and storage medium
CN111125033A (en) * 2018-10-31 2020-05-08 深信服科技股份有限公司 Space recovery method and system based on full flash memory array
CN111026327A (en) * 2019-10-22 2020-04-17 苏州浪潮智能科技有限公司 Magnetic tape filing system and method based on deduplication
CN110944040A (en) * 2019-10-31 2020-03-31 浙江工商大学 Coding method in data compression process
CN111143288A (en) * 2019-12-22 2020-05-12 北京浪潮数据技术有限公司 Data storage method, system and related device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022228500A1 (en) * 2021-04-29 2022-11-03 山东英信计算机技术有限公司 Data storage method and apparatus for bios, device and storage medium
CN117667788A (en) * 2024-01-30 2024-03-08 苏州元脑智能科技有限公司 Data interaction method, computer system, electronic device and storage medium
CN117667788B (en) * 2024-01-30 2024-04-19 苏州元脑智能科技有限公司 Data interaction method, computer system, electronic device and storage medium

Also Published As

Publication number Publication date
WO2022228500A1 (en) 2022-11-03

Similar Documents

Publication Publication Date Title
US10599413B2 (en) Method and device for identifying file
CN113064556A (en) BIOS data storage method, device, equipment and storage medium
CN111125008B (en) Dynamic repairing method and system of abnormal inode and related components
CN108228443B (en) Web application testing method and device
CN109271323B (en) Page element processing method and device, test equipment and storage medium
CN111258905A (en) Defect positioning method and device, electronic equipment and computer readable storage medium
CN108427580B (en) Configuration pair naming repetition detection method, storage medium and intelligent device
CN107169057B (en) Method and device for detecting repeated pictures
CN114647548A (en) Log generation method and device
CN110727565B (en) Network equipment platform information collection method and system
CN111142871A (en) Front-end page development system, method, equipment and medium
CN115981617A (en) Code sentence recommendation method and device, electronic equipment and storage medium
CN107832341B (en) AGNSS user duplicate removal statistical method
CN114861003A (en) Object enumeration method, device and medium under specified directory
CN115765754A (en) Data coding method and coded data comparison method
CN115390847A (en) Log processing method and device, computer readable storage medium and terminal
CN112700886A (en) Medical data processing method and device and storage medium
CN111538651A (en) Interface testing method, device, server and storage medium
CN114003489B (en) Front-end code file detection method and device, electronic equipment and storage medium
CN113434943B (en) BIM standard code processing method and device, electronic equipment and readable storage medium
CN112181539B (en) File processing method, device, equipment and medium
CN110795297B (en) Electronic equipment testing method and device
CN111046012B (en) Method and device for extracting inspection log, storage medium and electronic equipment
CN113064555A (en) BIOS data storage method, device, equipment and storage medium
CN107391666B (en) Method and device for generating composite index key value

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination