Disclosure of Invention
The invention mainly aims to provide an electronic device, a startup picture display method and a computer readable storage medium, and aims to realize that the startup picture can be updated and switched by updating only SMBIOS information without firmware upgrading, thereby greatly reducing the time cost of managing products by customers and improving the product shipment efficiency.
In order to achieve the above object, an electronic device according to the present invention includes a memory and a processor, wherein a boot-up screen display system capable of running on the processor is stored in the memory, and the boot-up screen display system, when executed by the processor, performs the following steps:
A1, starting up and initializing;
B1, reading character string data of a preset position in SMBIOS information;
C1, determining whether the BIOS has the boot picture information corresponding to the read character string data according to the mapping relation between the predetermined character string data and the boot picture information;
D1, after determining that the boot-strap picture information corresponding to the read character string data exists in the BIOS, acquiring the boot-strap picture information corresponding to the read character string data from the BIOS;
and E1, generating a starting picture according to the acquired starting picture information and displaying the starting picture.
Preferably, the step A1 includes:
The BIOS establishes an SMBIOS data structure, and completes the initialization of the existing SMBIOS type data and the protocol accessing the SMBIOS.
Preferably, the character string data of the preset position in the SMBIOS information in the step B1 is system manufacturer information data in the SMBIOS type 1.
Preferably, after the step C1, the processor is further configured to execute the boot-up screen display system to implement the following steps:
after determining that the BIOS does not have the startup picture information corresponding to the read character string data, acquiring default startup picture information from the BIOS;
And generating a starting picture according to the acquired default starting picture information to display.
Preferably, after the step A1 and before the step B1, the processor is further configured to execute the boot-up picture display system to implement the following steps:
inquiring whether a function for displaying a startup picture is opened or not;
After determining that the function of displaying the boot screen is on, step B1 is performed.
The invention also provides a startup picture display method, which comprises the following steps:
A2, starting up and initializing;
B2, reading character string data of a preset position in the SMBIOS information;
c2, determining whether the startup picture information corresponding to the read character string data exists in the BIOS according to the mapping relation between the predetermined character string data and the startup picture information;
D2, after determining that the boot-strap picture information corresponding to the read character string data exists in the BIOS, acquiring the boot-strap picture information corresponding to the read character string data from the BIOS;
and E2, generating a starting picture according to the acquired starting picture information and displaying the starting picture.
Preferably, the step A2 includes:
The BIOS establishes an SMBIOS data structure, and completes the initialization of the existing SMBIOS type data and the protocol accessing the SMBIOS.
Preferably, after the step C2, the method further includes:
after determining that the BIOS does not have the startup picture information corresponding to the read character string data, acquiring default startup picture information from the BIOS;
And generating a starting picture according to the acquired default starting picture information to display.
Preferably, after the step A2, before the step B2, the method further includes:
inquiring whether a function for displaying a startup picture is opened or not;
After determining that the function of displaying the boot screen is on, step B2 is performed.
The present invention also provides a computer readable storage medium storing a boot-strap picture display system executable by at least one processor to cause the at least one processor to perform the steps of:
Initializing the starting;
Reading character string data of a preset position in the SMBIOS information;
determining whether the BIOS has the boot picture information corresponding to the read character string data according to the mapping relation between the predetermined character string data and the boot picture information;
after determining that the BIOS has the startup picture information corresponding to the read character string data, acquiring the startup picture information corresponding to the read character string data from the BIOS;
And generating a starting picture according to the acquired starting picture information to display.
According to the technical scheme, character string data of a preset position in SMBIOS information is read, starting picture information corresponding to the read character string data is obtained from BIOS according to a mapping relation between the predetermined character string data and the starting picture information, and finally a corresponding starting picture is generated according to the obtained starting picture information and displayed on display equipment. According to the scheme, in the production of the product, the starting picture can be switched to meet different customer requirements only by modifying the character string data of the preset position in the SMBIOS information, and compared with the existing mode of updating firmware and updating the SMBIOS to replace the starting picture, the method has the advantages that the firmware is not required to be updated, the time cost of managing the product by the customer is greatly reduced, and the product shipment efficiency is improved.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides a startup picture display method which can be applied to various computer products (such as notebook computers, desktop computers, tablets, PC intelligent devices, POS machines, network security devices and the like).
Fig. 1 is a flowchart of a boot-strap screen display method according to an embodiment of the invention.
In this embodiment, the method for displaying a boot image includes:
Step S10, starting up and initializing;
after the computer is started, initializing all functional interfaces of the computer, establishing an SMBIOS data structure by the BIOS, and initializing all existing SMBIOS type data and protocols for accessing the SMBIOS.
Step S20, reading character string data of a preset position in the SMBIOS information;
after the start-up initialization is completed, the SMBIOS information is accessed and the character string data of a preset position (i.e., preset position) is read therefrom. In this step, the character string data of the preset position in the SMBIOS information is preferably the system Manufacturer information data in the SMBIOS type1 (i.e. the Manufacturer in the structure of type1 as follows), and the system Manufacturer information data in type1 in this embodiment is a character string.
The structure of SMBIOS type1 is:
The specific process of reading the vendor information data in the SMBIOS type1 is as follows: the initial address of the SMBIOS is found through EFI_SMBIOS_PROTOCOL_ GIUD, then the corresponding type1 is found according to the SMBIOS specification rule, and the character string data corresponding to the Manufacturer is extracted from the type 1. Of course, in this embodiment, only the manufacturer information data in the SMBIOS type1 is used as a preferred scheme, and in other embodiments, the character string data in the SMBIOS type1 may be other information data in the type1 or some information data in the rest types.
Step S30, determining whether the BIOS has the boot picture information corresponding to the read character string data according to the mapping relation between the predetermined character string data and the boot picture information;
In this embodiment, the boot images of a plurality of system manufacturers are compiled into the BIOS in advance, and a mapping relationship table of the boot image information and the character string data is created in advance, wherein each system manufacturer corresponds to one character string data, that is, each system manufacturer corresponds to the boot image stored in the BIOS; for example, the character string data A, B, C corresponds to three different system manufacturers, the boot pictures A1, B1, and C1 are respectively the boot pictures of the three different system manufacturers compiled into the BIOS, the character string data a maps to the boot picture A1, the character string data B maps to the boot picture B1, and the character string data C maps to the boot picture C1. The startup picture information includes information of length, width, color, and the like. After the character string data of the preset position in the SMBIOS information is read, whether the boot picture information corresponding to the read character string data exists in the BIOS or not is judged by inquiring the mapping relation table.
Step S40, after determining that the BIOS has the startup picture information corresponding to the read character string data, acquiring the startup picture information corresponding to the read character string data from the BIOS;
After the BIOS is queried to store the boot-strap information corresponding to the read character string data, the boot-strap information corresponding to the read character string data is obtained according to the mapping relation table.
Step S50, a starting picture is generated according to the acquired starting picture information to display.
After the startup picture information is acquired, the computer generates a corresponding startup picture according to the acquired startup picture information and displays the startup picture on the display device.
According to the technical scheme, character string data of a preset position in SMBIOS information is read, starting picture information corresponding to the read character string data is obtained from BIOS according to a mapping relation between the predetermined character string data and the starting picture information, and finally a corresponding starting picture is generated according to the obtained starting picture information and displayed on a display device. According to the startup picture display method, in the production of products, the startup picture can be switched to meet different customer requirements only by modifying character string data of a preset position in the SMBIOS information, and compared with the existing mode of updating firmware and updating the SMBIOS to replace the startup picture, the startup picture display method does not need to update the firmware, so that time cost is greatly reduced, and product shipment efficiency is improved.
Fig. 2 is a flowchart of a boot-strap screen display method according to a second embodiment of the invention.
In this embodiment, after the step S30, the startup picture display method further includes:
Step S60, after determining that the BIOS does not have the startup picture information corresponding to the read character string data, acquiring default startup picture information from the BIOS;
when the boot image information corresponding to the read character string data cannot be found according to the mapping relation table of the character string data and the boot image information, the special cases may be that the boot image information corresponding to the read character string data is not compiled in the BIOS, or the read character string data is modified into the character string data not in the mapping relation table, and the like. The BIOS also compiles a default boot-strap picture, and at this time, the default boot-strap picture information stored in the BIOS is obtained.
Step S70, generating a startup picture according to the acquired default startup picture information for display.
And after the default starting-up picture information is acquired, generating a default starting-up picture stored in the BIOS according to the acquired default starting-up picture information, and displaying the default starting-up picture on the display equipment.
In the embodiment, by setting the default startup picture, the display device does not display the startup picture when special conditions occur.
In this embodiment, after the step S10, before the step S20, the method further includes:
inquiring whether a function for displaying a startup picture is opened or not;
In the starting process of the computer, the function of displaying the starting picture can be closed, if the function of displaying the starting picture is in the closed state, the starting picture can not be displayed, and at the moment, the subsequent steps of the starting picture display method have no executing significance. So that it is first queried to confirm whether the function of displaying the boot picture is in an on state.
After determining that the function of displaying the boot screen is on, step S20 is performed.
When it is determined that the display startup picture function is in an on state, step S20 is continued to be executed. When the function of displaying the startup picture is determined to be in a closed state, the startup picture display process can be skipped, and the startup picture can be directly loaded into a computer system; or perform other operations such as turning on a display of a boot screen function, etc.
In this embodiment, by querying the status of the function of displaying the boot-strap screen, the subsequent steps are executed after the function of displaying the boot-strap screen is determined to be opened, which avoids the system from doing useless processing and saves system resources.
In addition, the invention also provides a startup picture display system.
Referring to FIG. 3, a diagram of an operating environment of a boot display system 10 according to a preferred embodiment of the present invention is shown.
In the present embodiment, the startup screen display system 10 is installed and operated in the electronic device 1. The electronic device 1 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a server, or the like. The electronic device 1 may include, but is not limited to, a memory 11, a processor 12, and a display 13. Fig. 3 shows only the electronic device 1 with components 11-13, but it is understood that not all shown components are required to be implemented, and that more or fewer components may alternatively be implemented.
The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1. The memory 11 may also be an external storage device of the electronic apparatus 1 in other embodiments, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the electronic apparatus 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic apparatus 1. The memory 11 is used for storing application software installed in the electronic device 1 and various types of data, such as program codes of the chat data processing system 10. The memory 11 may also be used to temporarily store data that has been output or is to be output.
The processor 12 may in some embodiments be a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chip for executing program code or processing data stored in the memory 11, such as executing the boot-up display system 10, etc.
The display 13 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like in some embodiments. The display 13 is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface. The components 11-13 of the electronic device 1 communicate with each other via a system bus.
Referring to FIG. 4, a block diagram of a boot display system 10 according to a preferred embodiment of the present invention is shown. In this embodiment, the boot-up display system 10 may be divided into one or more modules, and one or more modules are stored in the memory 11 and executed by one or more processors (the processor 12 in this embodiment) to complete the present invention. For example, in fig. 4, the startup screen display system 10 may be divided into an initialization module 101, a reading module 102, a determination module 103, a first acquisition module 104, and a production module 105. The modules referred to in the present invention refer to a series of instruction segments of a computer program capable of performing a specific function, more suitable than the program for describing the execution of the boot-image display system 10 in the electronic device 1, wherein:
An initialization module 101, configured to initiate a power-on;
After the computer is started, the initialization module 101 initializes each function interface of the computer, the BIOS establishes an SMBIOS data structure, and initializes all the existing SMBIOS type data and protocols accessing the SMBIOS.
The reading module 102 is configured to read character string data of a preset position in the SMBIOS information;
After the power-on initialization is completed, the reading module 102 accesses the SMBIOS information and reads the character string data of a preset location (i.e., a preset location) therefrom. In this step, the character string data of the preset position in the SMBIOS information is preferably the system Manufacturer information data in the SMBIOS type1 (i.e. the Manufacturer in the structure of type1 as follows), and the system Manufacturer information data in type1 in this embodiment is a character string.
The structure of SMBIOS type1 is:
The specific process of reading the vendor information data in the SMBIOS type1 is as follows: the initial address of the SMBIOS is found through EFI_SMBIOS_PROTOCOL_ GIUD, then the corresponding type1 is found according to the SMBIOS specification rule, and the character string data corresponding to the Manufacturer is extracted from the type 1. Of course, in this embodiment, only the manufacturer information data in the SMBIOS type1 is used as a preferred scheme, and in other embodiments, the character string data in the SMBIOS type1 may be other information data in the type1 or some information data in the rest types.
A determining module 103, configured to determine whether the boot-strap information corresponding to the read character string data exists in the BIOS according to a predetermined mapping relationship between the character string data and the boot-strap information;
In this embodiment, the boot images of a plurality of system manufacturers are compiled into the BIOS in advance, and a mapping relationship table of the boot image information and the character string data is created in advance, wherein each system manufacturer corresponds to one character string data, that is, each system manufacturer corresponds to the boot image stored in the BIOS; for example, the character string data A, B, C corresponds to three different system manufacturers, the boot pictures A1, B1, and C1 are respectively the boot pictures of the three different system manufacturers compiled into the BIOS, the character string data a maps to the boot picture A1, the character string data B maps to the boot picture B1, and the character string data C maps to the boot picture C1. The startup picture information includes information of length, width, color, and the like. After the reading module 102 reads the character string data in the preset position in the SMBIOS information, the determining module 103 determines whether the boot image information corresponding to the read character string data exists in the BIOS by querying the mapping relationship table.
A first obtaining module 104, configured to obtain, from the BIOS, boot-strap information corresponding to the read character string data after determining that the BIOS has boot-strap information corresponding to the read character string data;
After the BIOS is queried that the boot image information corresponding to the read character string data is stored therein, the first obtaining module 104 obtains the boot image information corresponding to the read character string data according to the mapping relation table.
And the generating module 105 is used for generating a startup picture according to the acquired startup picture information to display.
After the obtaining module 104 obtains the startup picture information, the generating module 105 generates a corresponding startup picture according to the obtained startup picture information, and displays the startup picture on the display device.
According to the technical scheme, character string data of a preset position in SMBIOS information is read, starting picture information corresponding to the read character string data is obtained from BIOS according to a mapping relation between the predetermined character string data and the starting picture information, and finally a corresponding starting picture is generated according to the obtained starting picture information and displayed on a display device. According to the startup picture display system, in the production of products, the startup picture can be switched to meet different customer requirements only by modifying character string data of a preset position in the SMBIOS information, and compared with the existing mode of updating firmware and updating the SMBIOS to replace the startup picture, the startup picture display system does not need to update the firmware, so that the time cost is greatly reduced, and the product shipment efficiency is improved.
As shown in fig. 5, the boot-image display system of the present embodiment further includes a second obtaining module 106.
A second obtaining module 106, configured to obtain default boot-strap information from the BIOS after determining that the boot-strap information corresponding to the read character string data does not exist in the BIOS;
When the boot image information corresponding to the read character string data cannot be found according to the mapping relation table of the character string data and the boot image information, the special cases may be that the boot image information corresponding to the read character string data is not compiled in the BIOS, or the read character string data is modified into the character string data not in the mapping relation table, and the like. The BIOS also compiles a default boot-up picture, and the second obtaining module 106 obtains the stored default boot-up picture information from the BIOS.
The generating module 105 is further configured to generate a boot picture for display according to the acquired default boot picture information.
After the second obtaining module 106 obtains the default boot-up picture information, the generating module 105 generates the default boot-up picture stored in the BIOS according to the obtained default boot-up picture information, and displays the default boot-up picture on the display device.
In the embodiment, by setting the default startup picture, the display device does not display the startup picture when special conditions occur.
As shown in fig. 6, the boot-image display system of the present embodiment further includes:
a query module 107, configured to query whether a function of displaying a startup picture is turned on;
In the starting process of the computer, the function of displaying the starting picture can be closed, if the function of displaying the starting picture is in the closed state, the starting picture can not be displayed, and at the moment, the subsequent steps of the starting picture display method have no executing significance. So that it is first queried to confirm whether the function of displaying the boot picture is in an on state.
The query module 107 is further configured to invoke the reading module 102 after determining that the function of displaying the boot screen is on.
After determining that the function of displaying the boot screen is in an on state, the query module 107 invokes the reading module 102 to read the character string data of the preset position in the SMBIOS information. When the query module 107 determines that the function of displaying the startup picture is in a closed state, the computer can skip the startup picture display process and directly load the startup picture into the computer system; or perform other operations such as turning on a display of a boot screen function, etc.
In this embodiment, by querying the status of the function of displaying the boot-strap screen, the subsequent steps are executed after the function of displaying the boot-strap screen is determined to be opened, which avoids the system from doing useless processing and saves system resources.
Further, the present invention also proposes a computer readable storage medium storing a boot-image display system executable by at least one processor to cause the at least one processor to execute the boot-image display method in any of the above embodiments.
The foregoing description of the preferred embodiments of the present invention should not be construed as limiting the scope of the invention, but rather should be understood to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention as defined by the following description and drawings or any application directly or indirectly to other relevant art(s).