Information determination method and electronic device
By pre-allocating fixed memory addresses for UEFI modules and constructing a mapping table, the difficulty in locating anomalies caused by dynamic allocation of UEFI module loading addresses is resolved, enabling fast and accurate location of abnormal modules and improving startup efficiency and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LENOVO (BEIJING) LTD
- Filing Date
- 2021-10-28
- Publication Date
- 2026-05-26
AI Technical Summary
During computer startup, the dynamic allocation of the UEFI module's loading address makes it difficult to locate abnormalities and prevents the rapid identification of faulty modules.
Before startup, a fixed memory address is determined for the file corresponding to each UEFI module, and a mapping table is built through attribute parameters and identifiers to quickly locate abnormal modules.
It improves the efficiency and accuracy of locating abnormal UEFI modules, simplifies the startup process, reduces workload, and enhances system stability and security.
Smart Images

Figure CN114090084B_ABST
Abstract
Description
Technical Field
[0001] This application relates to information determination technology in the field of information determination, and more particularly to an information determination method and electronic device. Background Technology
[0002] The current Basic Input Output System (BIOS) is modular. During startup, the BIOS needs to boot multiple Unified Extensible Firmware Interface (UEFI) modules. Each UEFI module is loaded into memory during the machine's boot process, then its address is relocated before execution. However, the addresses used to load UEFI modules into memory are dynamically allocated; for the same UEFI module, the memory address is different each time it is loaded. This makes it difficult to quickly locate the malfunctioning UEFI module when anomalies occur during multiple boot processes. Summary of the Invention
[0003] To address the aforementioned technical problems, this application aims to provide an information determination method and electronic device that solves the problem of being unable to quickly locate abnormal UEFI modules and improves the efficiency of locating abnormal UEFI modules.
[0004] The technical solution of this application is implemented as follows:
[0005] An information determination method, the method comprising:
[0006] Obtain the first file of the boot system;
[0007] Based on the attribute parameters of the first file, determine the first memory address corresponding to the first file;
[0008] The boot system is started based on the first memory address corresponding to the first file and the first file itself;
[0009] In the event of an anomaly during the boot process of the boot system, the abnormal second file is determined based on the first memory address.
[0010] In the above scheme, determining the first memory address corresponding to the first file based on the attribute parameters of the first file includes:
[0011] The size of the third file is determined, and a second memory address is determined based on the size of the third file; wherein the third file includes multiple first files;
[0012] The size of each first file is determined, and the first memory address corresponding to each first file is determined from the second memory address based on the size of each first file.
[0013] The method in the above scheme further includes:
[0014] Store the first memory address of the first file into the target field of the first file.
[0015] In the above scheme, starting the boot system based on the first memory address corresponding to the first file and the first file includes:
[0016] Each of the first files is analyzed, and the first memory address is determined from the target field of each of the first files;
[0017] The boot system is started based on the first memory address corresponding to each first file and the plurality of first files.
[0018] In the above scheme, starting the boot system based on the first memory address corresponding to each first file and the plurality of first files includes:
[0019] Based on the first memory address corresponding to each first file, the target physical address corresponding to each first file is determined;
[0020] Load each of the first files into the physical memory space corresponding to the target physical address of each of the first files;
[0021] Within the physical memory space corresponding to each first file, the boot system is started based on the first file.
[0022] In the above scheme, obtaining multiple first files of the boot system includes:
[0023] Obtain multiple initial files from the boot system;
[0024] Each initial file is compiled to obtain the plurality of first files.
[0025] The method in the above scheme further includes:
[0026] Obtain the identifier of each of the first files;
[0027] Construct a relationship between the identifier of each first file and the first memory address of each first file.
[0028] In the above scheme, determining the abnormal second file based on the first memory address in the event of an anomaly during the boot process includes:
[0029] In the event of an anomaly during the boot process of the system, obtain the address where the abnormal data is located;
[0030] From the plurality of first memory addresses, determine the target memory address corresponding to the address where the abnormal data is located;
[0031] Based on the target memory address and the relationship, the abnormal second file is identified.
[0032] The method in the above scheme further includes:
[0033] Obtain the initial memory address of the second file;
[0034] Based on the initial memory address and the address where the abnormal data is located, determine the target offset;
[0035] Obtain the initial file corresponding to the second file, and determine the abnormal information in the initial file based on the initial file and the target offset.
[0036] An electronic device, comprising: a processor, a memory, and a communication bus;
[0037] The communication bus is used to realize the communication connection between the processor and the memory;
[0038] The processor is used to execute the information determination program stored in the memory to perform the following steps:
[0039] Obtain the first file of the boot system;
[0040] Based on the attribute parameters of the first file, determine the first memory address corresponding to the first file;
[0041] The boot system is started based on the first memory address corresponding to the first file and the first file itself;
[0042] In the event of an anomaly during the boot process of the boot system, the abnormal second file is determined based on the first memory address.
[0043] The information determination method and electronic device provided in the embodiments of this application obtain a first file of the boot system; determine a first memory address corresponding to the first file based on the attribute parameters of the first file; start the boot system based on the first memory address and the first file; in the event of an anomaly during the boot system startup process, determine an abnormal second file based on the first memory address; thus, before starting the boot system, a first memory address is determined for the first file corresponding to each UEFI module, and the first file can be loaded into the memory space corresponding to the first memory address each time it starts. The address to which the same UEFI module is loaded into memory is the same each time. In the event of an anomaly during the boot system startup process, the second file corresponding to the abnormal UEFI module can be determined based on the fixed first memory address of each module, thereby achieving rapid location of the abnormal UEFI module and improving the accuracy of the determined abnormal UEFI module. Attached Figure Description
[0044] Figure 1 A flowchart illustrating an information determination method provided in an embodiment of this application;
[0045] Figure 2 A flowchart illustrating another information determination method provided in an embodiment of this application;
[0046] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0047] Figure 4 This is a schematic diagram of an information determination device provided in an embodiment of this application. Detailed Implementation
[0048] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0049] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0050] This application provides an information determination method, which can be applied to electronic devices, as described above. Figure 1 As shown, the method includes the following steps:
[0051] Step 101: Obtain the first file of the boot system.
[0052] The boot system can be the Basic Input / Output System, or BIOS for short; the first file is the module file corresponding to the UEFI module in the BIOS. The UEFI module can be a module used to implement different functions.
[0053] In one feasible implementation, the module file may include, but is not limited to, files that support the basic functions of a central processing unit (CPU), graphical files of the boot screen, and preboot execution environment (PXE) files.
[0054] In this application embodiment, the first file may be actively sent to the electronic device by the user's (developer's) terminal; or the electronic device may initiate a retrieval command to the user's terminal, and the user's terminal may retrieve the first file from the database and send it to the electronic device based on the retrieval command; or the electronic device may actively download it via the network.
[0055] Step 102: Determine the first memory address corresponding to the first file based on the attribute parameters of the first file.
[0056] The attribute parameters of the first file include, but are not limited to, the size and type of the first file; the first memory address can be a virtual memory address.
[0057] In this embodiment of the application, there can be multiple first files. The electronic device can determine the first memory address corresponding to the free virtual address space for each first file according to the attribute parameters of the first file. The first memory address of each first file is different. The multiple first memory addresses are consecutive.
[0058] It should be noted that the first memory address can refer to the virtual address segment corresponding to the virtual address space required when loading the first file. This virtual address segment can be determined based on the initial virtual memory address and the size of the first file.
[0059] Step 103: Start the boot system based on the first memory address corresponding to the first file and the first file.
[0060] In this embodiment, the electronic device can load a first file into the memory space corresponding to a first memory address, and start the boot system by processing the first file in the memory space.
[0061] It should be noted that in the prior art, the address for loading the first file is dynamically allocated for each first file during the boot process, and then the first file is loaded into the memory space corresponding to that address for processing. This results in a long boot time and low efficiency. However, in the embodiments of this application, the first memory address can be determined for each first file before booting, eliminating the need to allocate an address for each first file during the boot process, thus saving boot time and improving efficiency. Moreover, in the embodiments of this application, a fixed first memory address is allocated for the first file. The address for loading the first file corresponding to the UEFI module is the same every time the same UEFI module is booted. That is, after allocating a fixed first memory address for the first file corresponding to each UEFI module for the first time, the address for loading each first file is fixed every time the boot system is booted, eliminating the need to allocate an address each time, simplifying the boot process and further improving the efficiency of the boot system.
[0062] Step 104: If an exception occurs during the boot process, determine the second file that is in error based on the first memory address.
[0063] It should be noted that an anomaly in the boot process can be understood as an error in the first file corresponding to the UEFI module; in one feasible implementation, the error could be caused by a code error in the first file of at least one UEFI module during the boot process.
[0064] In this embodiment of the application, when an abnormal situation occurs during the boot process of the electronic device, the specific UEFI module that is malfunctioning can be determined based on the first memory address corresponding to the abnormal situation, and the first file corresponding to the malfunctioning UEFI module can be used as the second file of the abnormal situation.
[0065] In one feasible implementation, when an exception occurs during the boot process, the first memory address corresponding to the exception code can be determined through logs or debug logs. Based on this first memory address, the corresponding exception's second file can then be identified. The logs or debug logs can be used for problem tracking, status monitoring, and security auditing during the boot process. Problem tracking includes not only tracing bugs in the first file but also identifying issues during installation and configuration through logs. Status monitoring allows for real-time log analysis to monitor the boot system's operational status, enabling early detection and handling to prevent boot system failures and disruptions to electronic devices. Security auditing focuses on security; log analysis can identify unauthorized operations, eliminating security risks and improving the boot system's security.
[0066] The information determination method provided in the embodiments of this application obtains a first file of the boot system; determines a first memory address corresponding to the first file based on the attribute parameters of the first file; starts the boot system based on the first memory address and the first file; and determines an abnormal second file based on the first memory address in the event of an anomaly during the boot system startup process. Thus, before starting the boot system, a first memory address is determined for the first file corresponding to each UEFI module. During each startup, the first file can be loaded into the memory space corresponding to the first memory address. The address to which the same UEFI module is loaded into memory is the same each time. In the event of an anomaly during the boot system startup process, the second file corresponding to the abnormal UEFI module can be determined based on the fixed first memory address of each module. This achieves rapid location of the abnormal UEFI module and improves the accuracy of identifying the abnormal UEFI module.
[0067] Based on the foregoing embodiments, this application provides an information determination method, referring to... Figure 2 As shown, the method includes the following steps:
[0068] Step 201: The electronic device acquires multiple initial files for the boot system.
[0069] In this embodiment of the application, the initial file may be an uncompiled module file corresponding to the UEFI module; the initial file may be written by the developer in a specific language and actively sent to the electronic device by the user terminal.
[0070] In one feasible implementation, the initial file can be a file containing code written in C by the developer to implement a specific function.
[0071] Step 202: The electronic device compiles each initial file to obtain multiple first files.
[0072] Compiling each initial file refers to converting the initial file, written by the developer in a specific language (high-level language), into a binary language file that can be recognized by the electronic device.
[0073] In one feasible implementation, the first file can be an executable file; an executable file refers to a file that can be loaded and executed by the operating system; the type of the first file varies under different operating system environments, and the first file can be a file of type ".exe", ".sys", or ".com".
[0074] Step 203: The electronic device determines the size of the third file and determines the second memory address based on the size of the third file.
[0075] The third document includes multiple first documents.
[0076] In the embodiments of this application, the electronic device can determine the size of a third file comprising multiple first files, and based on the size of the third file, determine the size of the memory space required to load the third file. Then, according to the determined size of the memory space, it determines a virtual memory space to be used from the free virtual memory address space, corresponding to the size of that memory space, and determines a second memory address corresponding to the virtual memory space to be used. The size of the virtual memory space to be used is not less than the size of the third file.
[0077] In one feasible implementation, if the size of the third file is M, the virtual memory address space is 0 to 2G; where 1G to 2G is the free virtual memory address space in the virtual memory address space, the memory space between 1G and 1G+M can be determined from the 1G to 2G virtual memory address space as the virtual memory space to be used when the third file starts, and the address segment corresponding to the virtual memory space to be used is determined as the second memory address.
[0078] Step 204: The electronic device determines the size of each first file and, based on the size of each first file, determines the first memory address corresponding to each first file from the second memory address.
[0079] In this embodiment of the application, the electronic device can determine the size of each first file, determine the size of the memory space required when loading each first file based on the size of each first file, determine the virtual memory space of each first file from the virtual memory space to be used based on the size of the memory space required when loading each first file, and then determine the first memory address corresponding to the virtual memory space of each first file.
[0080] It should be noted that after determining the first memory address corresponding to each first file, address relocation of each first file is also required. Address relocation refers to modifying the relevant address parameters in the first file based on its first memory address. In this embodiment, the address relocation of the first file can be completed before starting the boot system, instead of being performed every time the boot system is started, as in the prior art. This saves boot system startup time and improves efficiency. Furthermore, since the address allocated to the first file is different each time the boot system is started in the prior art, address relocation of the first file is required each time the boot system is started. This application only requires address relocation of the first file before the first boot system startup, and subsequent address relocations are not necessary. This simplifies the boot system startup process, reduces the workload of the electronic device, and improves the efficiency of the electronic device.
[0081] In one feasible implementation, if a certain code in the first file represents an instruction to jump at address A, and the first memory address of the first file refers to the address segment between B and C, then address A in the first file needs to be modified to address B+C to achieve address relocation of the first file.
[0082] Step 205: The electronic device acquires the identifier of each first file.
[0083] The identifier of the first file may include, but is not limited to, the name of the first file.
[0084] In this embodiment of the application, the identifier of the first file may be carried in the file content of the first file, and the electronic device may parse the first file to obtain the identifier of the first file; alternatively, the developer may mark the first file to obtain the identifier of the first file, and then send the identifier of the first file to the electronic device.
[0085] Step 206: The electronic device constructs the relationship between the identifier of each first file and the first memory address of each first file.
[0086] In this embodiment, the electronic device can determine the mapping relationship between the identifier of the first file and the first memory address based on the identifier of the first file and the first memory address of the first file, and generate a mapping table. In the mapping table, each identifier of the first file corresponds one-to-one with the first memory address of the first file.
[0087] It should be noted that steps 205 and 206 can be executed between steps 204 and 207, or between steps 207 and 209. The specific execution order of steps 205 and 206 is not limited in this embodiment.
[0088] Step 207: The electronic device stores the first memory address of the first file into the target field of the first file.
[0089] In this embodiment, the target field may refer to a specific field in a pre-specified first file; in one feasible implementation, the target field may be a field in the header of the first file, and the header may also store the size of the first file and the identifier of the first file.
[0090] In one feasible implementation, if the number of first files is three, specifically files A, B, and C, the first memory address of file A can be stored in the field of the file header of file A, the first memory address of file B can be stored in the field of the file header of file B, and the first memory address of file C can be stored in the field of the file header of file C.
[0091] Step 208: The electronic device analyzes each first file and determines the first memory address from the target field of each first file.
[0092] In this embodiment of the application, when it is necessary to start the boot system, the electronic device can analyze each first file and determine the first memory address of each first file from the target field of each first file.
[0093] Step 209: The electronic device starts the boot system based on the first memory address corresponding to each first file and multiple first files.
[0094] In this embodiment of the application, each first file can be loaded into the memory space corresponding to each first file, and the program in the first file can be executed in the memory space corresponding to each first file when the boot system is started.
[0095] It should be noted that the order in which multiple first files are loaded into memory can be determined based on the dependencies between each first file. In one feasible implementation, the first files include file A, file B, and file C. File B depends on file C, and file C depends on file A. When loading the first files into memory, file B can be loaded first, then file C, and finally file A.
[0096] It should be noted that step 209 can be achieved through steps a1-a3:
[0097] Step a1: The electronic device determines the target physical address corresponding to each first file based on the first memory address corresponding to each first file.
[0098] It should be noted that the first memory address is a virtual memory address. When loading the first file into memory, the first file needs to be loaded into the physical memory space to execute the first file. Therefore, the electronic device needs to determine the target physical address based on the first memory address so that the first file can be loaded into the target physical space corresponding to the target physical address.
[0099] In this embodiment of the application, the electronic device can obtain an address mapping table between virtual memory addresses and physical memory addresses, and determine the target physical address corresponding to each first memory address based on the address mapping table and each first memory address; the address mapping table can represent the mapping relationship between virtual memory space and physical memory space.
[0100] Step a2: The electronic device loads each first file into the physical memory space corresponding to the target physical address of each first file.
[0101] Among them, the target physical addresses corresponding to each first file are consecutive.
[0102] In one feasible implementation, the electronic device can load file B first, then file C, and finally file A. The address of file B can be 1-2, the address of file C can be 3-4, and the address of file A can be 0-1. The order of the first loaded files is A, B, C. In contrast, existing technologies dynamically allocate memory addresses, allocating addresses based on the loading order. In one feasible implementation, continuing the example above, if the target physical address of file B is 1-2, the target physical address of file C is 3-4, and the target physical address of file A is 5-6, the order of the first loaded files is B, C, and A. That is to say, in existing technologies, the target physical address of the first file is related to the loading order, with the target physical address of the first loaded file preceding the target physical address of the last loaded file. However, in the technical solution of this application, the order of the first loaded files is not affected by the loading order, improving the stability of loading the first file and facilitating subsequent problem location.
[0103] Step a3: The electronic device starts the boot system based on the first file in the physical memory space corresponding to each first file.
[0104] In this embodiment of the application, the electronic device can start the boot system by executing the code (program) in the first file in the physical memory space corresponding to each first file.
[0105] Step 210: If an abnormality occurs during the boot process of the system, the electronic device obtains the address where the abnormal data is located.
[0106] In this embodiment of the application, when an abnormality occurs during the boot process, the address of the abnormal data can be obtained through the logs generated during the boot process (such as log or debug logs). The address of the abnormal data can refer to the physical memory address where the error code is located, or it can refer to the virtual memory address corresponding to the physical memory address where the error code is located.
[0107] Step 211: The electronic device determines the target memory address corresponding to the address where the abnormal data is located from multiple first memory addresses.
[0108] The target memory address refers to the first memory address corresponding to the abnormal data.
[0109] In this embodiment of the application, the first memory address can be the address segment corresponding to the first loaded file. When the address where the abnormal data is located is a virtual memory address, it can be determined which address segment the address where the abnormal data is located is in, and the address segment to which the address where the abnormal data is located belongs is used as the target memory address. When the address where the abnormal data is located is a physical memory address, it is necessary to determine the virtual memory address corresponding to the physical memory address according to the address mapping table, and then determine which address segment the virtual memory address is located in, and use the address segment to which the virtual memory address belongs as the target memory address.
[0110] Step 212: The electronic device determines the abnormal second file based on the target memory address and relationship.
[0111] In this embodiment of the application, the file corresponding to the target memory address can be determined to be an abnormal second file based on the relationship between the identifier of each first file and the first memory address of each first file, as well as the target memory address.
[0112] Based on the foregoing embodiments, in other embodiments of this application, the information determination method may further include the following steps:
[0113] Step 213: The electronic device obtains the initial memory address of the second file.
[0114] The initial memory address of the second file refers to the initial address in the first memory address, also known as the starting address.
[0115] In this embodiment of the application, the initial memory address may be stored in the target field of the first file, or it may be determined by the electronic device after analyzing the first memory address.
[0116] It should be noted that if the address where the abnormal data is located is a virtual memory address, then the initial memory address is also a virtual memory address; if the address where the abnormal data is located is a physical memory address, then the initial memory address is also a physical memory address.
[0117] Step 214: The electronic device determines the target offset based on the initial memory address and the address where the abnormal data is located.
[0118] The target offset is the location of the abnormal data in the second file.
[0119] In this embodiment of the application, the target offset can be determined by the difference between the address where the abnormal data is located and the address where the abnormal data is located; in one feasible implementation, if the initial memory address is A and the address where the abnormal data is located is B, then the target offset is BA.
[0120] Step 215: The electronic device obtains the initial file corresponding to the second file, and determines the abnormal information in the initial file based on the initial file and the target offset.
[0121] In this embodiment, the electronic device stores multiple initial files. Based on the identifier of the second file, an initial file matching the identifier of the second file is determined from among the multiple initial files. Furthermore, based on the initial file and the target offset, the abnormal information corresponding to the abnormal data in the initial file is determined. The abnormal information can be anomaly codes within the initial file.
[0122] In one feasible implementation, the target location of the abnormal information corresponding to the abnormal data in the initial file can be determined based on the target offset, and then the abnormal code can be obtained at the target location in the initial file.
[0123] It should be noted that the descriptions of the same steps and contents as in other embodiments in this embodiment can be found in the descriptions in other embodiments, and will not be repeated here.
[0124] The information determination method provided in this application determines a first memory address for a first file corresponding to each UEFI module before starting the boot system. During each startup, the first file can be loaded into the memory space corresponding to the first memory address. The address to which the same UEFI module is loaded into memory is the same each time. When an abnormal situation occurs during the boot process, the second file corresponding to the abnormal UEFI module can be determined based on the fixed first memory address of each module. This achieves rapid location of the abnormal UEFI module and improves the accuracy of the identified abnormal UEFI module.
[0125] Based on the foregoing embodiments, embodiments of this application provide an electronic device that can be applied to... Figures 1-2In the information determination method provided in the corresponding embodiment, refer to Figure 3 As shown, the electronic device 3 may include: a processor 32, a memory 31, and a communication bus 33; wherein:
[0126] Communication bus 33 is used to realize the communication connection between processor 32 and memory 31;
[0127] The processor 32 is used to execute the information determination program stored in the memory 31 to perform the following steps:
[0128] Obtain the first file of the boot system;
[0129] Based on the attribute parameters of the first file, determine the first memory address corresponding to the first file;
[0130] Based on the first memory address corresponding to the first file and the first file itself, start the boot system;
[0131] In the event of an exception during the boot process, the second file that is at fault is determined based on the first memory address.
[0132] In other embodiments of this application, the processor 32 is used to execute the information determination program in the memory 31 based on the attribute parameters of the first file to determine the first memory address corresponding to the first file, so as to implement the following steps:
[0133] Determine the size of the third file, and determine the second memory address based on the size of the third file; wherein the third file includes multiple first files;
[0134] Determine the size of each first file, and based on the size of each first file, determine the first memory address corresponding to each first file from the second memory address.
[0135] In other embodiments of this application, the processor 32 is used to execute an information determination program in the memory 31 to perform the following steps:
[0136] Store the first memory address of the first file into the target field of the first file.
[0137] In other embodiments of this application, the processor 32 is used to execute the information determination program in the memory 31, based on the first memory address corresponding to the first file and the first file, to start the boot system to implement the following steps:
[0138] Analyze each first file and determine the first memory address from the target field of each first file;
[0139] The boot system is started based on the first memory address corresponding to each first file and multiple first files.
[0140] In other embodiments of this application, the processor 32 is used to execute the information determination program in the memory 31, based on the first memory address corresponding to each first file and multiple first files, to start the boot system to implement the following steps:
[0141] Based on the first memory address corresponding to each first file, determine the target physical address corresponding to each first file;
[0142] Load each first file into the physical memory space corresponding to the target physical address of each first file;
[0143] Within the physical memory space corresponding to each first file, the boot system is started based on the first file.
[0144] In other embodiments of this application, the processor 32 is used to execute an information determination program in the memory 31 to obtain multiple first files of the boot system to perform the following steps:
[0145] Obtain multiple initial files for the boot system;
[0146] Each initial file is compiled to obtain multiple first files.
[0147] In other embodiments of this application, the processor 32 is used to execute an information determination program in the memory 31 to perform the following steps:
[0148] Obtain the identifier of each first file;
[0149] Construct the relationship between the identifier of each first file and the first memory address of each first file.
[0150] In other embodiments of this application, the processor 32 is used to execute the information determination program in the memory 31 to determine the abnormal second file based on the first memory address in the event of an exception during the boot process of the system, in order to implement the following steps:
[0151] In the event of an error during the boot process, obtain the address where the abnormal data is located;
[0152] From multiple first memory addresses, determine the target memory address corresponding to the address where the abnormal data is located;
[0153] Based on the target memory address and relationship, identify the second file that is abnormal.
[0154] In other embodiments of this application, the processor 32 is used to execute an information determination program in the memory 31 to perform the following steps:
[0155] Get the initial memory address of the second file;
[0156] The target offset is determined based on the initial memory address and the address where the abnormal data is located;
[0157] Obtain the initial file corresponding to the second file, and determine the abnormal information in the initial file based on the initial file and the target offset.
[0158] It should be noted that the specific implementation process of the steps executed by the processor in this embodiment can be referred to Figures 1-2 The implementation process of the information determination method provided in the corresponding embodiments will not be described in detail here.
[0159] The electronic device provided in the embodiments of this application determines a first memory address for a first file corresponding to each UEFI module before starting the boot system. During each startup, the first file can be loaded into the memory space corresponding to the first memory address. The address to which the same UEFI module is loaded into memory is the same each time. When an abnormal situation occurs during the boot process, the second file corresponding to the abnormal UEFI module can be determined based on the fixed first memory address of each module. This enables rapid location of the abnormal UEFI module and improves the accuracy of identifying the abnormal UEFI module.
[0160] Based on the foregoing embodiments, embodiments of this application provide an information determining device, which can be applied to... Figures 1-2 In the information determination method provided in the corresponding embodiment, refer to Figure 4 As shown, the device may include: an acquisition unit 41, a determination unit 42, and a start unit 43, wherein:
[0161] Acquisition unit 41 is used to acquire the first file of the boot system;
[0162] The determining unit 42 is used to determine the first memory address corresponding to the first file based on the attribute parameters of the first file;
[0163] The boot unit 43 is used to boot the boot system based on the first memory address corresponding to the first file and the first file;
[0164] The determining unit 42 is also used to determine the abnormal second file based on the first memory address in the event of an abnormality during the boot process of the system.
[0165] In other embodiments of this application, the determining unit 42 is further configured to perform the following steps:
[0166] Determine the size of the third file, and determine the second memory address based on the size of the third file; wherein the third file includes multiple first files;
[0167] Determine the size of each first file, and based on the size of each first file, determine the first memory address corresponding to each first file from the second memory address.
[0168] In other embodiments of this application, the device may further include: a storage unit 44, wherein
[0169] Storage unit 44 is used to store the first memory address of the first file into the target field of the first file.
[0170] In other embodiments of this application, the initiation unit 43 is further configured to perform the following steps:
[0171] Analyze each first file and determine the first memory address from the target field of each first file;
[0172] The boot system is started based on the first memory address corresponding to each first file and multiple first files.
[0173] In other embodiments of this application, the initiation unit 43 is further configured to perform the following steps:
[0174] Based on the first memory address corresponding to each first file, determine the target physical address corresponding to each first file;
[0175] Load each first file into the physical memory space corresponding to the target physical address of each first file;
[0176] Within the physical memory space corresponding to each first file, the boot system is started based on the first file.
[0177] In other embodiments of this application, the acquisition unit 41 is further configured to perform the following steps:
[0178] Obtain multiple initial files for the boot system;
[0179] Each initial file is compiled to obtain multiple first files.
[0180] In other embodiments of this application, the acquisition unit 41 is further configured to perform the following steps:
[0181] Obtain the identifier of each first file;
[0182] Accordingly, refer to Figure 4 As shown, the device may also include a building unit 45, wherein:
[0183] Construction unit 45 is used to construct the relationship between the identifier of each first file and the first memory address of each first file.
[0184] In other embodiments of this application, the determining unit 42 is further configured to perform the following steps:
[0185] In the event of an error during the boot process, obtain the address where the abnormal data is located;
[0186] From multiple first memory addresses, determine the target memory address corresponding to the address where the abnormal data is located;
[0187] Based on the target memory address and relationship, identify the second file that is abnormal.
[0188] In other embodiments of this application, the acquisition unit 41 is further configured to perform the following steps:
[0189] Get the initial memory address of the second file;
[0190] In other embodiments of this application, the determining unit 42 is further configured to perform the following steps:
[0191] The target offset is determined based on the initial memory address and the address where the abnormal data is located;
[0192] Obtain the initial file corresponding to the second file, and determine the abnormal information in the initial file based on the initial file and the target offset.
[0193] It should be noted that the specific implementation process of the steps performed by each unit in this embodiment can be referred to Figures 1-2 The implementation process of the information determination method provided in the corresponding embodiments will not be described in detail here.
[0194] The information determination device provided in the embodiments of this application determines a first memory address for a first file corresponding to each UEFI module before starting the boot system. During each startup, the first file can be loaded into the memory space corresponding to the first memory address. The address to which the same UEFI module is loaded into memory is the same each time. When an abnormal situation occurs during the boot system startup process, the second file corresponding to the abnormal UEFI module can be determined based on the fixed first memory address of each module. This achieves rapid location of the abnormal UEFI module and improves the accuracy of the identified abnormal UEFI module.
[0195] Based on the foregoing embodiments, embodiments of this application provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement... Figures 1-2 The corresponding embodiments provide the steps of the information determination method.
[0196] It should be noted that the aforementioned computer-readable storage media can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various electronic devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0197] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0198] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0199] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0200] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0201] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0202] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0203] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. An information determination method, the method comprising: Obtain the first file of the boot system; wherein, multiple first files are allocated contiguous memory address spaces; Based on the attribute parameters of the first file, the first memory address corresponding to the first file is determined. The matching relationship of the first memory address corresponding to the first file has been determined before the boot system is started. Store the first memory address of the first file into the target field of the first file; start the boot system based on the first memory address corresponding to the first file and the first file; In the event of an anomaly during the boot process of the boot system, the abnormal second file is determined based on the first memory address; The second file that is determined to be abnormal based on the first memory address includes: Based on the relationship between the identifier of each first file and the first memory address of each first file, and the target memory address, the file corresponding to the target memory address is determined to be an abnormal second file; the target memory address is the first memory address corresponding to the abnormal data; there is a mapping relationship between the identifier of the first file and the first memory address.
2. The method according to claim 1, wherein determining the first memory address corresponding to the first file based on the attribute parameters of the first file includes: The size of the third file is determined, and a second memory address is determined based on the size of the third file; wherein the third file includes multiple first files; The size of each first file is determined, and the first memory address corresponding to each first file is determined from the second memory address based on the size of each first file.
3. The method according to claim 1, wherein starting the boot system based on the first memory address corresponding to the first file and the first file comprises: Each of the first files is analyzed, and the first memory address is determined from the target field of each of the first files; The boot system is started based on the first memory address corresponding to each first file and the plurality of first files.
4. The method according to claim 3, wherein starting the boot system based on the first memory address corresponding to each first file and the plurality of first files comprises: Based on the first memory address corresponding to each first file, the target physical address corresponding to each first file is determined; Load each of the first files into the physical memory space corresponding to the target physical address of each of the first files; Within the physical memory space corresponding to each first file, the boot system is started based on the first file.
5. The method according to claim 1, wherein obtaining the first file of the boot system comprises: Obtain multiple initial files from the boot system; Each initial file is compiled to obtain the plurality of first files.
6. The method according to claim 2, further comprising: Obtain the identifier of each of the first files; Construct a relationship between the identifier of each first file and the first memory address of each first file.
7. The method according to claim 6, wherein determining the abnormal second file based on the first memory address in the event of an anomaly during the boot process of the boot system includes: In the event of an anomaly during the boot process of the system, obtain the address where the abnormal data is located; From the first memory address, determine the target memory address corresponding to the address where the abnormal data is located; Based on the target memory address and the relationship, the abnormal second file is identified.
8. The method according to claim 7, further comprising: Obtain the initial memory address of the second file; Based on the initial memory address and the address where the abnormal data is located, determine the target offset; Obtain the initial file corresponding to the second file, and determine the abnormal information in the initial file based on the initial file and the target offset.
9. An electronic device, comprising: Processor, memory, and communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is used to execute the information determination program stored in the memory to perform the following steps: Obtain the first file of the boot system; wherein, multiple first files are allocated contiguous memory address spaces; Based on the attribute parameters of the first file, the first memory address corresponding to the first file is determined. The matching relationship of the first memory address corresponding to the first file has been determined before the boot system is started. Store the first memory address of the first file into the target field of the first file; The boot system is started based on the first memory address corresponding to the first file and the first file itself; In the event of an anomaly during the boot process of the boot system, the abnormal second file is determined based on the first memory address; The second file that is determined to be abnormal based on the first memory address includes: Based on the relationship between the identifier of each first file and the first memory address of each first file, and the target memory address, the file corresponding to the target memory address is determined to be an abnormal second file; the target memory address is the first memory address corresponding to the abnormal data; there is a mapping relationship between the identifier of the first file and the first memory address.