Processing method and device of electronic device and electronic device

CN115543478BActive Publication Date: 2026-08-18LENOVO (BEIJING) LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211191826.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2026-08-18
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

但是该存储方式中并无软件或硬件加密机制,存在数据泄露的风险

Benefits of technology

[0027]本申请处理方法对于频繁使用的第一处理单元的目标变量,可以将其存储在并不会被频繁使用的EC等第二处理单元中,使得电子设备中的BIOS等第一处理单元的运行效率得到提高。同时,由于EC等第二处理单元的存储空间的安全性较高,因此能够防止目标变量被非法获取和非法操作,提高了安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115543478B_ABST
    Figure CN115543478B_ABST
Patent Text Reader

Abstract

The application discloses a processing method of an electronic device and the electronic device. The method comprises the following steps: if an instruction for requesting an operation target variable is received, determining a data amount of the target variable of a first processing unit; and if the data amount satisfies a first condition, performing a first operation on the target variable based on a first data storage structure, wherein the first operation comprises storing the target variable in a second processing unit, and the first data storage structure comprises a first mark area and a first data area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing methods in electronic devices such as computers, and particularly to a processing method, apparatus, and electronic device for an electronic device. Background Technology

[0002] With the increasing number of UEFI BIOS-related functions in computers and other electronic devices, BIOS variables are being used more and more widely, and these variables are generally stored in SPI ROM. However, this storage method lacks software or hardware encryption mechanisms, posing a risk of data leakage. Furthermore, BIOS variables are frequently accessed under normal circumstances. When the BIOS storage space reaches a certain threshold, the BIOS will initiate a variable storage space reclamation mechanism after booting, a process that sometimes takes 30 to 40 seconds (taking a 300KB BIOS variable storage space as an example), significantly impacting the user experience. Summary of the Invention

[0003] This application provides a processing method for an electronic device, including:

[0004] If an instruction to manipulate the target variable is received, determine the data volume of the target variable in the first processing unit;

[0005] If the amount of data satisfies the first condition, a first operation is performed on the target variable based on the first data storage structure, including storing the target variable in a second processing unit, wherein the first data storage structure includes a first flag area and a first data area.

[0006] Alternatively, the method may further include:

[0007] If the amount of data does not meet the first condition, a first operation is performed on the target variable based on the second data storage structure, including storing the target variable in a second processing unit, wherein the second data storage structure includes a second flag area and a second data area.

[0008] Optionally, the target variable is stored in the second processing unit in the form of bit-level data; correspondingly, after determining the data volume of the target variable, the method further includes:

[0009] If the amount of data satisfies the second condition, then it is determined whether the target variable is a first type of data, wherein the first type of data is compatible with the data format of the word storage;

[0010] If the target variable is determined to be data of the first type, the first operation is allowed to be performed on the target variable.

[0011] Optionally, both the first and second flag areas have at least one flag bit, and both the first and second data areas have at least one data sub-area, wherein the flag bit is used to indicate the validity of the associated data sub-area.

[0012] Optionally, both the first and second flag regions have at least one flag bit, and the number of flag bits is consistent with the number of target variables.

[0013] Optionally, the first data area includes at least one first data sub-area, each first data sub-area includes a plurality of the said word bits, and each first data sub-area stores one of the said target variables.

[0014] Optionally, the second data area includes at least one second data sub-area, each second data sub-area includes one word, and each second data sub-area stores one target variable.

[0015] Optionally, the first operation on the target variable based on the first data storage structure includes:

[0016] Based on the flag bits in the first flag area, determine whether the corresponding word bit in the first data area is valid;

[0017] If the word position in the first data area is determined to be valid, the target variable is operated on;

[0018] Accordingly, the operation on the target variable based on the second data storage structure includes:

[0019] Based on the flag bits in the second flag area, determine whether the corresponding word bit in the second data area is valid;

[0020] If the word in the second data area is determined to be valid, the target variable is operated on.

[0021] Optionally, the operation on the target variable includes:

[0022] The target variable is processed by the second processing unit, wherein the data conversion includes: converting the target variable from being operated on as bytes to being operated on as bits;

[0023] The target variable after data transformation is read and / or stored.

[0024] This application also provides a processing apparatus for an electronic device, comprising:

[0025] The determination module is configured to determine the data volume of the target variable of the first processing unit if it receives an instruction requesting operation on the target variable;

[0026] The processing module is configured to perform a first operation on the target variable based on a first data storage structure when the amount of data meets a first condition, including storing the target variable in a second processing unit, wherein the first data storage structure includes a first flag area and a first data area.

[0027] The processing method of this application allows frequently used target variables of the first processing unit to be stored in less frequently used second processing units such as the EC (Executive Processor), thereby improving the operating efficiency of the first processing unit, such as the BIOS, in electronic devices. Simultaneously, because the storage space of the second processing unit, such as the EC, has higher security, it can prevent unauthorized access and manipulation of the target variables, thus improving security. Attached Figure Description

[0028] Figure 1 This is a schematic diagram illustrating the storage of the target variable in an embodiment of this application;

[0029] Figure 2 A flowchart illustrating a processing method of an electronic device according to an embodiment of this application;

[0030] Figure 3 This is a flowchart of one embodiment of the processing method of this application;

[0031] Figure 4 This is a flowchart of another embodiment of the processing method described in this application;

[0032] Figure 5 Examples of embodiments of this application Figure 1 A flowchart of one embodiment of step S200;

[0033] Figure 6 Examples of embodiments of this application Figure 1 A flowchart of one embodiment of step S300;

[0034] Figure 7 This is a structural block diagram of the first data storage structure according to an embodiment of this application;

[0035] Figure 8 This is a structural block diagram of the second data storage structure according to an embodiment of this application;

[0036] Figure 9 The flowchart is a further specific embodiment of the processing method of this application.

[0037] Figure 10 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0038] Various embodiments and features of this application are described herein with reference to the accompanying drawings.

[0039] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.

[0040] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0041] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.

[0042] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application.

[0043] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.

[0044] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.

[0045] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.

[0046] This application provides a processing method for an electronic device. This method can be applied to an electronic device to process target variables, such as variables of the basic input / output system of the electronic device. This includes storing the target variables in the embedded controller of the electronic device, such as... Figure 1 As shown, it performs read and write operations on the target variable, thereby saving storage space of the basic input / output system and improving operating efficiency.

[0047] Furthermore, this processing method can store Boolean type target variables in the embedded controller as bit-level data, thereby further saving the storage space of the embedded controller.

[0048] The following section, with reference to the accompanying drawings, provides a detailed explanation of this processing method. Figure 1 This is a schematic diagram illustrating the storage of the target variable in an embodiment of this application. Figure 2 This is a flowchart illustrating a processing method of an electronic device according to an embodiment of this application. Figure 1 and Figure 2 As shown, the method includes the following steps:

[0049] S100: If an instruction to operate on the target variable is received, the data volume of the target variable in the first processing unit is determined.

[0050] For example, the first processing unit in this embodiment may be a component in an electronic device, including a basic input / output system.

[0051] The target variable of the first processing unit can be the target of data processing, and the type of the target variable can be a variable used by multiple components in the electronic device. In one embodiment, the target variable can be a variable of the basic input / output system (BIOS) of the electronic device.

[0052] This instruction can be generated by the electronic device based on its needs, or it can be received from an external source, such as an input instruction, requesting an operation on the target variable. For example, requesting an operation on the target variable includes: requesting to write to the target variable, requesting to read from the target variable, requesting to modify the target variable, etc.

[0053] The data size of the target variable can be determined in bytes. For example, the target variable can be 1 byte, 2 bytes, 3 bytes, etc. The data size of the target variable is determined based on the number of bytes.

[0054] S200, if the amount of data satisfies the first condition, a first operation is performed on the target variable based on the first data storage structure, including storing the target variable in a second processing unit based on the first data storage structure, wherein the first data storage structure includes a first flag area and a first data area.

[0055] For example, the first condition could be a condition concerning a specific numerical range, which can be determined based on requirements or empirical data. If the data volume is determined to be within this numerical range, the target variable can be stored in the second processing unit based on the first data storage structure. Otherwise, the target variable can be stored in the second processing unit based on the second data storage structure.

[0056] The second processing unit can be a component in an electronic device that differs from the first processing unit. For example, it could be an embedded controller (EC) with its own storage space. The target variable of the first processing unit can be stored in the storage space of the second processing unit. Since this target variable has a high usage rate, this method of storing and using the target variable can improve the operating efficiency of the first processing unit. Simultaneously, because the storage space of the embedded controller has high security—for example, the data can be encrypted—it can prevent the stored target variable from being illegally accessed or used, thus improving the security of the target variable.

[0057] For example, during the use of electronic devices, BIOS variables are frequently accessed under normal circumstances. When the BIOS storage space reaches a certain threshold, the BIOS operation process will be continuously slowed down. However, in this application, the target variables of the BIOS are stored in the embedded controller (EC), so the BIOS is frequently used (while the EC is not frequently called), which can effectively improve the running speed and efficiency.

[0058] The first data storage structure can be a data storage structure in the second processing unit used to store the target variable, and it is adapted to the target variable. The first data storage structure includes a first flag area and a first data area. The first data area is used to store data, and the first flag area is used to indicate the validity of the data in the first data area.

[0059] In one specific embodiment, if the data volume is determined to meet the first condition, such as the target data volume being greater than 1 byte, the target variable is stored in the second processing unit. Specifically, the target variable is stored in the first data area. For example, if the target data volume is 2 bytes or 3 bytes, the target data can be stored in the first data area, and the first flag area, which defaults to indicating that the first data area is invalid data, is modified to indicate that the data in the first data area is valid data.

[0060] The processing method of this application allows frequently used target variables of the first processing unit to be stored in less frequently used second processing units such as the EC (Executive Processor), thereby improving the operating efficiency of the first processing unit, such as the BIOS, in electronic devices. Simultaneously, because the storage space of the second processing unit, such as the EC, has higher security, it can prevent unauthorized access and manipulation of the target variables, thus improving security.

[0061] In one embodiment of this application, such as Figure 3 As shown, the method further includes the following steps:

[0062] S300, if the amount of data does not meet the first condition, a first operation is performed on the target variable based on the second data storage structure, including storing the target variable in a second processing unit based on the second data storage structure, wherein the second data storage structure includes a second flag area and a second data area.

[0063] For example, the first condition can be a condition about a specific numerical range. If it is determined that the amount of data of the target variable in the first processing unit does not meet the first condition, the target variable can be stored and / or read and written based on the second data storage structure in the second processing unit.

[0064] The second data storage structure includes a second flag area and a second data area. The second data area is used to store data, and the second flag area is used to indicate the validity of the data in the second data area.

[0065] The second data storage structure differs from the first data storage structure. For example, the second data storage structure has the same number of words as the first data storage structure, but the number of flag bits in the first flag area differs from the number of flag bits in the second flag area, and the number of words in the first data area also differs from the number of words in the second data area. This allows the first and second data storage structures to be applied to target variables with different data volumes, respectively.

[0066] In one embodiment of this application, such as Figure 4 and Figure 9 As shown, the target variable is stored in the second processing unit in the form of bit-level data; correspondingly, after determining the data volume of the target variable, the method further includes:

[0067] S400, if the amount of data satisfies the second condition, then determine whether the target variable is a first type of data, wherein the first type of data is compatible with the data format of the word storage.

[0068] For example, the target variable is stored in the second processing unit as bit-based data. A bit, or byte, occupies less storage space compared to a byte, thus further saving storage space in the second processing unit.

[0069] The second condition concerns whether the target data can be stored in the second processing unit. If the target data is too large, it cannot be stored in the second processing unit, and therefore, read and write operations cannot be performed on it within the second processing unit. This ensures the normal operation of the second processing unit and prevents errors.

[0070] For example, the second condition could also be a condition concerning a specific numerical range. If it is determined that the data volume falls within this range, then the data type of the target variable can be determined. Conversely, if it is determined that the data volume does not fall within this range, then the target variable cannot be stored in the second processing unit.

[0071] For example, combining Figure 9 The second condition is whether the data size of the target variable is less than or equal to 3 bytes. If it is less than or equal to 3 bytes, the data size of the target variable meets the second condition, and then the data type of the target variable is judged. If the data size is greater than 3 bytes, the data size does not meet the second condition. In this case, the target variable can be stored without using the first or second data storage structure, and hardware-based read and write operations can be performed directly on the target variable through EC.

[0072] Furthermore, if the data volume meets the second condition, then the target variable can be stored in the second processing unit. Next, it is determined whether the target variable is of the first type of data.

[0073] The first type of data can be data that can be represented with a very small amount of data. For example, the first type of data can be Boolean data, which can itself be "yes" or "no", and can be represented by "1" for "yes" and "0" for "no". Boolean data is compatible with the word-based storage format, meaning that "1" and "0" can each occupy only one word. Therefore, the target variable can be stored in the first or second data area in word-based storage format.

[0074] S500, if the target variable is determined to be first type data, the first operation is allowed to be performed on the target variable.

[0075] For example, if the target variable is a first type of data, it can be stored in the second processing unit according to a first data storage structure or a second data storage structure to reduce storage space usage. However, if it is determined that the target variable is not a first type of data (such as Boolean data), it can be stored without relying on the first or second data storage structure, and the second processing unit can directly perform hardware-based read and write operations on the target variable.

[0076] Furthermore, if the target variable is determined to be first type data, it is allowed to store the target variable in the second processing unit according to the first data storage structure or the second data storage structure, and read and / or write operations are allowed on the target variable.

[0077] In one embodiment of this application, both the first flag area and the second flag area have at least one flag bit, and both the first data area and the second data area have at least one data sub-area, wherein the flag bit is used to indicate the validity of the data sub-area associated with it.

[0078] In one embodiment of this application, both the first flag region and the second flag region have at least one flag bit, and the number of flag bits is consistent with the number of target variables.

[0079] For example, the first flag area has at least one flag bit, each flag bit can indicate the validity of data in the data sub-area associated with it in the first data area, and each data sub-area can store a target variable.

[0080] Furthermore, in one embodiment, each flag bit may occupy one word bit, while each data sub-region may occupy one or more word bits.

[0081] Combination Figure 7 For example, the first flag area has two flag bits, and the first data area has two data sub-areas. This means the number of flag bits can match the number of target variables, avoiding wasted space. The first flag bit is associated with the first data sub-area and indicates the validity of the data within it. For instance, a "1" in the first flag bit indicates valid data in the first data sub-area, while a "0" indicates invalid data.

[0082] Similarly, the second flag area has at least one flag bit, each flag bit can indicate the validity of the data in the data sub-area associated with it in the second data area, and each data sub-area can store a target variable.

[0083] Combination Figure 8 For example, the second flag area has 4 flag bits, and the second data area has 4 data sub-areas. This means the number of flag bits can match the number of target variables, avoiding wasted space. The first flag bit is associated with the first data sub-area and indicates the validity of the data within it. A "1" in the first flag bit indicates valid data in the first data sub-area, while a "0" indicates invalid data.

[0084] In one embodiment of this application, the first data area includes at least one first data sub-area, each first data sub-area includes a plurality of the said word bits, and each first data sub-area stores one said target variable.

[0085] In one specific embodiment, combined with Figure 7 The first data storage structure occupies 1 byte (including 8 bits), and the first flag area occupies 2 bits. The first flag area includes 2 flag bits, and each flag bit occupies 1 bit.

[0086] The data sub-area within the first data area is designated as the first data sub-area. The first data area comprises two first data sub-areas, each occupying 3 words, resulting in a total of 6 words occupied by the two first data sub-areas. Each first data sub-area can store one target variable.

[0087] In conjunction with the above embodiments, further in combination Figure 9 For example, if the data size of the target variable meets the first condition, such as the target data size (Size) being greater than 1 byte (i.e., meeting the first condition), then the target variable is stored in the first data area. For instance, the data size of the target variable may be 2 or 3 bytes, but since the data type of the target variable is Boolean, it can occupy only 2 or 3 bits. Therefore, the target variable can be stored in the first data sub-area, where each first data sub-area has 3 bits, and thus each first data sub-area can hold one target variable.

[0088] In one embodiment of this application, the second data area includes at least one second data sub-area, each second data sub-area includes one word, and each second data sub-area stores one target variable.

[0089] In one specific embodiment, such as Figure 8 As shown, the second data storage structure occupies 1 byte (including 8 bits), of which the second flag area occupies 4 bits. The second flag area includes 4 flag bits, each of which occupies 1 bit.

[0090] The data sub-area within the second data area is designated as the second data sub-area. The second data area comprises four first data sub-areas, each occupying one word, thus the four second data sub-areas occupy four words. Each second data sub-area can store one target variable.

[0091] To further illustrate with reference to the above embodiments, if it is determined that the data size of the target variable does not meet the first condition, such as the data size (Size) of the target data being equal to 1 byte (i.e. not meeting the first condition), the target variable can be stored in the second data area. However, since the data type of the target variable is Boolean data, it can occupy only 1 word, and thus the target variable can be stored in the second data sub-area. Each second data sub-area has 1 word, so each second data sub-area can accommodate one target variable.

[0092] In one embodiment of this application, the first operation is performed on the target variable based on the first data storage structure, such as... Figure 5 As shown, it includes:

[0093] S210, based on the flag bits in the first flag area, determine whether the corresponding word bit in the first data area is valid;

[0094] S220, if it is determined that the word in the first data area is valid, the target variable is operated on;

[0095] For example, the flag bits in the first flag area can also appear in the form of bits, that is, one flag bit occupies one bit. The flag bits in the first flag area indicate whether the corresponding bit in the first data area is valid. One flag bit can indicate whether one or more bits are valid. For example, when the flag bit is "1", it indicates that the corresponding bit in the first data area is valid. And when the flag bit is "0", it indicates that the corresponding bit in the first data area is invalid.

[0096] When the flag indicates that a word in the first data area is valid, the target variable can be stored, read, and / or written. If it is determined that a word in the first data area is invalid, no operation is required on the target variable, or the operation should be performed only after the flag is adjusted (e.g., from "0" to "1").

[0097] Accordingly, based on the second data storage structure, the first operation is performed on the target variable, such as... Figure 6 As shown, it includes:

[0098] S310, based on the flag bits in the second flag area, determine whether the corresponding word bit in the second data area is valid;

[0099] S320, if it is determined that the word in the second data area is valid, the target variable is operated on.

[0100] Similarly, the flag bits in the second flag area can also appear in the form of bits, meaning one flag bit occupies one bit. The flag bits in the second flag area indicate whether the corresponding bit in the second data area is valid. One flag bit can indicate whether one or more bits are valid. For example, when the flag bit is "1", it indicates that the corresponding bit in the second data area is valid. When the flag bit is "0", it indicates that the corresponding bit in the second data area is invalid.

[0101] When the flag indicates that a word in the second data area is valid, the target variable can be stored, read, and / or written. If it is determined that a word in the second data area is invalid, no operation is required on the target variable, or the operation should be performed only after the flag is adjusted (e.g., from "0" to "1").

[0102] In one embodiment of this application, the operation on the target variable includes the following steps:

[0103] The target variable is processed by the second processing unit, wherein the data conversion includes: converting the target variable from being operated on as bytes to being operated on as bits;

[0104] The target variable after data transformation is read and / or stored.

[0105] For example, the second processing unit can be an EC (Entity Control Unit). Operations on the target variable include storing the target variable in the second processing unit, reading and / or writing data, and performing data transformation on the target variable. Specifically, after storing the target variable in the second processing unit, when needed, the target variable needs to be read or modified. During this process, the EC can convert the operation on the target variable from byte-based to word-based, allowing the BIOS (first processing unit) to still use the target variable in word-based mode. Furthermore, after performing data transformation on the target variable, the EC can perform hardware-based read and / or store operations on the target variable, thereby satisfying the electronic device's operation on the target variable.

[0106] Based on the same inventive concept, embodiments of this application also provide a processing apparatus for an electronic device, such as... Figure 10 As shown, it includes:

[0107] The determination module is configured to determine the data volume of the target variable of the first processing unit if it receives an instruction requesting operation on the target variable.

[0108] For example, the first processing unit in this embodiment may be a component in an electronic device, including a basic input / output system.

[0109] The target variable of the first processing unit can be the target of data processing, and the type of the target variable can be a variable used by multiple components in the electronic device. In one embodiment, the target variable can be a variable of the basic input / output system (BIOS) of the electronic device.

[0110] This instruction can be generated by the electronic device based on its needs, or it can be received from an external source, such as an input instruction, requesting an operation on the target variable. For example, requesting an operation on the target variable includes: requesting to write to the target variable, requesting to read from the target variable, requesting to modify the target variable, etc.

[0111] The data size of the target variable can be determined in bytes. For example, the target variable can be 1 byte, 2 bytes, 3 bytes, etc. The determination module determines the data size of the target variable based on the number of bytes.

[0112] The processing module is configured to perform a first operation on the target variable based on a first data storage structure when the amount of data meets a first condition, including storing the target variable in a second processing unit, wherein the first data storage structure includes a first flag area and a first data area.

[0113] For example, the first condition can be a condition concerning a specific numerical range, which can be determined based on requirements or empirical data. If the processing module determines that the data volume is within this numerical range, it can store the target variable in the second processing unit based on the first data storage structure. Otherwise, the processing module can store the target variable in the second processing unit based on the second data storage structure.

[0114] The second processing unit can be a component in an electronic device that differs from the first processing unit. For example, it could be an embedded controller (EC) with its own storage space. The target variable of the first processing unit can be stored in the storage space of the second processing unit. Since this target variable has a high usage rate, this method of storing and using the target variable can improve the operating efficiency of the first processing unit. Simultaneously, because the storage space of the embedded controller has high security—for example, the data can be encrypted—it can prevent the stored target variable from being illegally accessed or used, thus improving the security of the target variable.

[0115] For example, during the use of electronic devices, BIOS variables are frequently accessed under normal circumstances. When the BIOS storage space reaches a certain threshold, the BIOS operation process will be continuously slowed down. However, in this application, the target variables of the BIOS are stored in the embedded controller (EC), so the BIOS is frequently used (while the EC is not frequently called), which can effectively improve the running speed and efficiency.

[0116] The first data storage structure can be a data storage structure in the second processing unit used to store the target variable, and it is adapted to the target variable. The first data storage structure includes a first flag area and a first data area. The first data area is used to store data, and the first flag area is used to indicate the validity of the data in the first data area.

[0117] In one specific embodiment, if the processing module determines that the data volume meets the first condition, such as the target data volume being greater than 1 byte, then the target variable is stored in the second processing unit. Specifically, the target variable is stored in the first data area. For example, if the target data volume is 2 bytes or 3 bytes, the target data can be stored in the first data area, and the first flag area, which defaults to indicating that the first data area is invalid data, is modified to indicate that the data in the first data area is valid data.

[0118] In one embodiment of this application, the processing module is further configured as follows:

[0119] If the amount of data does not meet the first condition, the first operation is performed on the target variable based on the second data storage structure, including storing the target variable in the second processing unit, wherein the second data storage structure includes a second flag area and a second data area.

[0120] In one embodiment of this application, the target variable is stored in the second processing unit in the form of bit-level data; correspondingly, the processing module is further configured as follows:

[0121] If the amount of data satisfies the second condition, then it is determined whether the target variable is a first type of data, wherein the first type of data is compatible with the data format of the word storage;

[0122] If the target variable is determined to be data of the first type, the first operation is allowed to be performed on the target variable.

[0123] In one embodiment of this application, both the first flag area and the second flag area have at least one flag bit, and both the first data area and the second data area have at least one data sub-area, wherein the flag bit is used to indicate the validity of the data sub-area associated with it.

[0124] In one embodiment of this application, both the first flag region and the second flag region have at least one flag bit, and the number of flag bits is consistent with the number of target variables.

[0125] In one embodiment of this application, the first data area includes at least one first data sub-area, each first data sub-area includes a plurality of the said word bits, and each first data sub-area stores one said target variable.

[0126] In one embodiment of this application, the second data area includes at least one second data sub-area, each second data sub-area includes one word, and each second data sub-area stores one target variable.

[0127] In one embodiment of this application, the processing module is further configured as follows:

[0128] Based on the flag bits in the first flag area, determine whether the corresponding word bit in the first data area is valid;

[0129] If the word position in the first data area is determined to be valid, the target variable is operated on;

[0130] Accordingly, the processing module is further configured as follows:

[0131] Based on the flag bits in the second flag area, determine whether the corresponding word bit in the second data area is valid;

[0132] If the word in the second data area is determined to be valid, the target variable is operated on.

[0133] In one embodiment of this application, the processing module is further configured to:

[0134] The target variable is processed by the second processing unit, wherein the data conversion includes: converting the target variable from being operated on as bytes to being operated on as bits;

[0135] The target variable after data transformation is read and / or stored.

[0136] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.

Claims

1. A processing method for an electronic device, comprising: If an instruction to operate on a target variable is received, the data volume of the target variable of the first processing unit is determined, wherein the first processing unit is a basic input / output system, and the target variable is the target of data processing or use; If the amount of data satisfies the first condition, a first operation is performed on the target variable based on the first data storage structure, including storing the target variable in a second processing unit, wherein the second processing unit is a component in an electronic device that is different from the first processing unit, the second processing unit is an embedded controller, the first data storage structure is a data storage structure in the second processing unit used to store the target variable, and the first data storage structure includes a first flag area and a first data area; The method further includes: If the amount of data does not meet the first condition, the first operation is performed on the target variable based on the second data storage structure, including storing the target variable in the second processing unit, wherein the second data storage structure includes a second flag area and a second data area, and the first data storage structure and the second data storage structure are respectively applicable to target variables with different amounts of data.

2. The method according to claim 1, wherein the target variable is stored in the second processing unit in the form of bit-level data; correspondingly, after determining the data volume of the target variable, the method further includes: If the amount of data satisfies the second condition, then it is determined whether the target variable is a first type of data, wherein the first type of data is compatible with the data format of the word storage; If the target variable is determined to be data of the first type, the first operation is allowed to be performed on the target variable.

3. The method according to claim 1, wherein, Both the first and second flag areas have at least one flag bit, and both the first and second data areas have at least one data sub-area. The flag bit is used to indicate the validity of the data sub-area associated with it.

4. The method according to claim 1, wherein both the first flag region and the second flag region have at least one flag bit, and the number of flag bits is consistent with the number of target variables.

5. The method of claim 3, wherein, The first data area includes at least one first data sub-area, each first data sub-area includes multiple word bits, and each first data sub-area stores one target variable.

6. The method according to claim 3, wherein, The second data area includes at least one second data sub-area, each second data sub-area includes one word, and each second data sub-area stores one target variable.

7. The method according to claim 1, wherein performing the first operation on the target variable based on the first data storage structure includes: Based on the flag bits in the first flag area, determine whether the corresponding word bit in the first data area is valid; If the word position in the first data area is determined to be valid, the target variable is operated on; Accordingly, performing the first operation on the target variable based on the second data storage structure includes: Based on the flag bits in the second flag area, determine whether the corresponding word bit in the second data area is valid; If the word in the second data area is determined to be valid, the target variable is operated on.

8. The method according to claim 1, wherein performing the first operation on the target variable further comprises: The target variable is processed by the second processing unit, wherein the data conversion includes: converting the target variable from being operated on as bytes to being operated on as bits; The target variable after data transformation is read and / or stored.

9. A processing apparatus for an electronic device, comprising: The determination module is configured to determine the data volume of the target variable of the first processing unit if it receives an instruction requesting operation on the target variable, wherein the first processing unit is a basic input / output system, and the target variable is the target of data processing or use; A processing module, configured to perform a first operation on the target variable based on a first data storage structure when the data volume meets a first condition, includes storing the target variable in a second processing unit. The second processing unit is a component in an electronic device different from the first processing unit, and is an embedded controller. The first data storage structure is a data storage structure in the second processing unit used to store the target variable, and includes a first flag area and a first data area. The processing module is further configured to: if the data volume does not meet the first condition, perform the first operation on the target variable based on the second data storage structure, including storing the target variable in the second processing unit, wherein the second data storage structure includes a second flag area and a second data area, and the first data storage structure and the second data storage structure are respectively applicable to target variables with different data volumes.

Citation Information

Patent Citations

  • Data processing method and apparatus, and device and storage medium

    WO2021068564A1