Interface display method and device, equipment and medium
By using LVGL controls to create GUI objects, a self-developed BIOS setting interface is realized, which solves the problems of poor operating experience, high development difficulty and high cost of BIOS setting interface in the existing technology, improves the aesthetics and development efficiency of the interface, and reduces the quality of the interface. Reliance on BIOS providers.
Patent Information
- Application Number
- CN202411274212.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-01-10
AI Technical Summary
Most of the existing BIOS setting interfaces are text mode, with low operating experience and aesthetics. It is difficult to develop the graphical mode interface by yourself, with a long cycle and high cost. It is costly to purchase the graphical mode interface and equipment manufacturers rely too much on BIOS providers.
Use multiple controls of Light and Versatile Graphics Library (LVGL) to create GUI objects and display them on the BIOS settings interface. By reading element components in the HII database and calling LVGL controls, the output device can display the BIOS settings interface to reduce development difficulty and cycles to reduce costs.
It improves the operating experience and aesthetics of the BIOS setting interface, reduces the difficulty and cost of the development of the graphical mode interface, reduces the dependence on independent BIOS providers, and solves the problem of high purchase costs.
Smart Images

Figure CN119292593A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an interface display method, device, equipment and medium. Background Art
[0002] At present, the Basic Input Output System (BIOS) Setup interface is mostly presented in text mode, and the operation experience and aesthetics of the text-mode BIOS Setup interface are relatively low. In order to improve the operation experience and aesthetics of the BIOS Setup interface, some equipment manufacturers develop graphic-mode BIOS Setup interfaces on their own or purchase graphic-mode BIOS Setup interfaces from BIOS providers. Self-development of graphic-mode BIOS Setup interfaces faces problems such as high development difficulty, long cycle, and high cost; purchasing graphic-mode BIOS Setup interfaces from independent BIOS vendors (IBVs) faces problems such as high cost and excessive reliance of equipment manufacturers on IBVs. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an interface display method, device, equipment and medium to reduce the development difficulty and cycle of the graphical mode BIOS setting interface and reduce the cost. The specific technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides an interface display method, the method comprising:
[0005] Read multiple element components in the Human Interface Infrastructure (HII) database;
[0006] Call multiple controls of the Light and Versatile Graphics Library (LVGL) to create a Graphical User Interface (GUI) object of an element component corresponding to each control;
[0007] The output device is driven to display a BIOS setting interface including the created GUI object.
[0008] In some embodiments, the step of driving the output device to display a BIOS setup interface including the created GUI object comprises:
[0009] When the cycle timer corresponding to the output device times out, the first callback function is called to drive the output device to display the BIOS setting interface including the created GUI object.
[0010] In some embodiments, the method further comprises:
[0011] When the cyclic timer corresponding to the input device times out, calling the second callback function to drive the input device to read the state parameter of the input device;
[0012] The state parameters are passed to the plurality of controls to adjust the GUI objects included in the BIOS setup interface.
[0013] In some embodiments, the method further comprises:
[0014] Obtaining user modification information from the state parameters;
[0015] The user modification information is written into the global variable memory.
[0016] In some embodiments, the method further comprises:
[0017] receiving a tuning instruction, wherein the tuning instruction includes a target timeout duration of a target cycle timer;
[0018] The timeout duration of the target cycle timer is adjusted to the target timeout duration.
[0019] In some embodiments, the method further comprises:
[0020] Receiving a cropping instruction, wherein the cropping instruction includes a target control to be cropped;
[0021] The target control is deleted from the plurality of controls.
[0022] In a second aspect, an embodiment of the present application provides an interface display device, the device comprising:
[0023] A reading module, used for reading multiple element components in the HII database;
[0024] A creation module is used to call multiple controls of LVGL to create a GUI object of an element component corresponding to each control;
[0025] The first driving module is used to drive the output device to display the BIOS setting interface including the created GUI object.
[0026] In some embodiments, the first driver module is specifically configured to call a first callback function when a cycle timer corresponding to the output device times out, so as to drive the output device to display a BIOS setup interface including the created GUI object.
[0027] In some embodiments, the device also includes: a second driver module, which is used to call a second callback function when the loop timer corresponding to the input device times out, so as to drive the input device to read the status parameters of the input device; and pass the status parameters to the multiple controls to adjust the GUI objects included in the BIOS setting interface.
[0028] In some embodiments, the second driving module is further used to obtain user modification information from the state parameter; and write the user modification information into the global variable memory.
[0029] In some embodiments, the device further includes: an adjustment module, configured to receive a tuning instruction, wherein the tuning instruction includes a target timeout duration of a target cycle timer; and adjust the timeout duration of the target cycle timer to the target timeout duration.
[0030] In some embodiments, the device further includes: a cropping module, configured to receive a cropping instruction, wherein the cropping instruction includes a target control to be cropped; and delete the target control from the multiple controls.
[0031] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0032] Memory, used to store computer programs;
[0033] The processor is used to implement any of the above-mentioned interface display methods when executing the program stored in the memory.
[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above-mentioned interface display methods is implemented.
[0035] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned interface display methods.
[0036] Beneficial effects of the embodiments of the present application:
[0037] In the technical solution provided by the embodiment of the present application, multiple controls of LVGL are used to create GUI objects of corresponding element components, and the GUI objects are displayed on the BIOS setup interface to obtain a BIOS setup interface in a graphic mode. The technical solution provided by the embodiment of the present application uses the open source project LVGL to implement a self-developed BIOS setup interface in a graphic mode, which improves the operating experience and aesthetics of the BIOS setup interface, reduces the development difficulty and cycle of the BIOS setup interface in a graphic mode, and reduces the cost. At the same time, equipment manufacturers do not need to purchase the BIOS setup interface in a graphic mode from IBV, which solves the problems of high purchase cost and excessive dependence of equipment manufacturers on IBV.
[0038] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0040] Figure 1 A schematic diagram of a first flow chart of the interface display method provided in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of the hierarchical relationship of the vfr components provided in the embodiment of the present application;
[0042] Figure 3 A second flow chart of the interface display method provided in the embodiment of the present application;
[0043] Figure 4 A third flow chart of the interface display method provided in the embodiment of the present application;
[0044] Figure 5 A schematic diagram showing a BIOS setup interface provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of the structure of an interface display device provided in an embodiment of the present application;
[0046] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0048] Currently, device manufacturers mainly develop BIOS setup interfaces in the following two ways.
[0049] Method 1: Develop the BIOS setup interface by yourself. Equipment manufacturers usually develop the BIOS setup interface based on the Embedded Development Kit II (EDK II). EDK II only supports the text-mode BIOS setup interface, and the operation experience and aesthetics of the text-mode BIOS setup interface are relatively low. In order to improve the operation experience and aesthetics of the BIOS setup interface, some equipment manufacturers develop the graphic-mode BIOS setup interface by themselves, but they face problems such as high development difficulty, long cycle, and high cost, which leads to equipment manufacturers only investing resources to develop the graphic-mode BIOS setup interface for some high-end models.
[0050] Method 2: Purchase the BIOS setup interface from the IBV. The IBV will charge fees based on the complexity and feature richness of the BIOS setup interface. That is, the more complex the project, the richer the features, the more exquisite the BIOS setup interface, and the higher the fee. Therefore, equipment manufacturers need to pay expensive fees to use the graphical BIOS setup interface provided by the IBV. Whether it is a commission based on shipment volume or a fee based on the project, the cost remains high.
[0051] In addition, the BIOS code provided by IBV is huge, and some functions of the BIOS setup interface used by device manufacturers will take up more program space. Device manufacturers can also conduct secondary development of the BIOS setup interface provided by IBV and customize and modify the personalized BIOS setup interface. However, since the BIOS setup interface provided by IBV is designed to meet the needs of many device manufacturers and has complex functions and rich features, secondary development requires a high learning cost and is difficult, and will inevitably require a large amount of code modification, resulting in major difficulties and uncertainties when upgrading the system. In addition, purchasing the BIOS setup interface from IBV will also lead to the problem of device manufacturers' over-reliance on BIOS providers.
[0052] In order to solve the above problems, an embodiment of the present application provides an interface display method, which can be applied to electronic devices such as computers and servers. For the convenience of description, the electronic device will be used as the execution subject in the following, and it does not serve as a limitation.
[0053] See also Figure 1 , Figure 1 The first flow chart of the interface display method provided in the embodiment of the present application is as follows. The above interface display method comprises the following steps.
[0054] Step S11, reading multiple element components in the HII database.
[0055] Step S12, calling multiple controls of LVGL to create a GUI object of an element component corresponding to each control.
[0056] Step S13: driving the output device to display the BIOS setting interface including the created GUI object.
[0057] In the technical solution provided by the embodiment of the present application, multiple controls of LVGL are used to create GUI objects of corresponding element components, and the GUI objects are displayed on the BIOS setup interface to obtain a BIOS setup interface in a graphic mode. The technical solution provided by the embodiment of the present application uses the open source project LVGL to implement a self-developed BIOS setup interface in a graphic mode, which improves the operating experience and aesthetics of the BIOS setup interface, reduces the development difficulty and cycle of the BIOS setup interface in a graphic mode, and reduces the cost. At the same time, equipment manufacturers do not need to purchase the BIOS setup interface in a graphic mode from IBV, which solves the problems of high purchase cost and excessive dependence of equipment manufacturers on IBV.
[0058] In the above step S11, the HII database stores components (referred to as element components) for implementing various elements of the BIOS setup interface, and the elements may include but are not limited to fonts, images, forms, strings, etc. Among them, the elements may be defined using a specified file. In the embodiment of the present application, the specified file defining the element is referred to as an element definition file. The element definition file may include at least one of the following files: a character (unicode, uni) file (i.e., a .uni file) and a visual forms representation (visual forms representation, vfr) file (i.e., a .vfr file) and other files.
[0059] Take the example of the element definition file being a .vfr file and the element being a form. The .vfr file defines the element components of the form (called vfr components), such as Figure 2The hierarchical relationship of vfr components shown in the figure, each .vfr file includes a formset, each formset can include one or more forms, and each form has multiple vfr components defined, such as jump (goto) component, reset button (resetbutton) component, subtitle (subtitle) component, text (text) component, action (action) component, checkbox (checkbox) component, date (date) component, numeric (numeric) component, ordered list (orderedlist) component, password (password) component, string (string) component and time (time) component, etc. Different types of vfr components have different functions. For example, the goto component is used to realize the jump function between different interfaces and different forms; the text component is used to realize the text editing function. Figure 2 Only one form is used as an example for explanation, and there is no limitation on the number of forms and the vfr components included in the forms.
[0060] In the embodiment of the present application, the HII database can be integrated in the electronic device, or in other electronic devices, such as a disk, etc. When displaying the BIOS setting interface, the electronic device reads the element components defined in the element definition file from the element definition file stored in the HII database.
[0061] In the above step S12, the electronic device pre-stores LVGL controls and the corresponding relationship between each element component and the LVGL control, one element component corresponds to one control, and one control may correspond to one or more element components. For each element component read, the electronic device calls the corresponding control, creates a GUI object of the element component, and displays the created GUI object on the BIOS setting interface to realize the display of the element component.
[0062] Still taking the vfr component as an example, the LVGL controls corresponding to the vfr component may include button (lv_btn) controls, label (lv_label) controls, checkbox (lv_checkbox) controls, calendar (lv_calendar) controls, textbox (lv_textarea) controls, drop-down list (lv_dropdown) controls, roller (lv_roller) controls, etc. The controls corresponding to different types of vfr components may be the same or different. For example, the goto component, resetbutton component, and action component correspond to the lv_btn control, and the subtitle component and text component correspond to the lv_label control. The correspondence between the vfr component and the LVGL controls can be seen in Table 1.
[0063] Table 1
[0064]
[0065]
[0066] In an embodiment of the present application, if the electronic device reads a goto component and a resetbutton component of a form, the electronic device can call the lv_btn control, use the lv_btn control to create a GUI object of the goto component and a GUI object of the resetbutton component respectively, and display the two created GUI objects on the BIOS setting interface; if the electronic device reads a goto component and a text component of a form, the electronic device can call the lv_btn control, use the lv_btn control to create a GUI object of the goto component, call the lv_label control, use the lv_label control to create a GUI object of the resetbutton component, and display the two created GUI objects on the BIOS setting interface.
[0067] In the above step S13, the output device has a display interface for displaying the BIOS setup interface. The output device may be a monitor, etc. After creating the GUI object, the electronic device drives the output device to display the BIOS setup interface through the output device. The BIOS setup interface includes the created GUI object, so the created GUI object is displayed along with the display of the BIOS setup interface.
[0068] In the embodiment of the present application, before executing step S11, the electronic device can integrate LVGL into the Unified Extensible Firmware Interface (UEFI) environment, that is, compile the LVGL source code into a UEFI library (Library, Lib) as LVGL GUI Lib. The electronic device displays the BIOS setting interface in the UEFI environment based on the obtained LVGL GUI Lib.
[0069] LVGL source code is the source code of the control that implements LVGL. LVGL source code may include multiple files such as files under the source code (src) directory and the porting directory, header files (i.e., lvgl.h) and configuration files (i.e., lv_conf_template.h). The electronic device receives the compilation instruction input by the user, creates a device information (information, inf) file (i.e., .inf file), and writes the source code files under the src directory and the porting directory into the .inf file to compile the LVGL source code into a UEFI Lib, and obtains the LVGL GUILib storing various controls of LVGL. Afterwards, the electronic device receives the addition instruction input by the user, adds the .inf file to the platform description (Platform Description) file (i.e., .dsc) of the setting interface package (Package, Pkg), so as to integrate the LVGL GUI Lib into the UEFI environment, and then the electronic device can perform steps S11 to S13 in the UEFI environment.
[0070] In some embodiments, see Figure 3 , Figure 3 A second flow chart of the interface display method provided in the embodiment of the present application. The interface display method may include the following steps.
[0071] Step S31, reading multiple element components in the HII database, which is the same as the above step S11.
[0072] Step S32, calling multiple controls of LVGL to create a GUI object of an element component corresponding to each control, which is the same as the above step S12.
[0073] Step S33: When the cycle timer corresponding to the output device times out, the first callback function is called to drive the output device to display the BIOS setting interface including the created GUI object.
[0074] In the technical solution provided in the embodiment of the present application, the electronic device drives the output device through a driver, regularly calls the first callback function, and updates the BIOS setup interface displayed on the output device, so that the user can obtain the displayed BIOS setup interface in time, thereby improving the user experience and interactivity.
[0075] In the above step S33, each output device corresponds to a pre-created cycle timer (such as a first cycle timer), and the timeout duration of the first cycle timer is a first duration. The first duration can be milliseconds (ms), 50ms, etc., which is not limited. Each output device also corresponds to a pre-registered callback (flush) function (such as a first callback function) for displaying buffered data on the output device.
[0076] Taking the output device as a display as an example, the first callback function can be a screen display (display, disp) refresh callback function (such as disp_flush()). The electronic device implements the first callback function based on the block transfer (Blt) function (such as EFI_GRAPHICS_OUTPUT_PROTOCOL.Blt()) of the image display protocol (GRAPHICS OUTPUT PROTOCOL, GOP) of the extensible firmware interface (Extensible FirmwareInterface, EFI), receives the buffered data, and displays the received buffered data on the output device.
[0077] When the electronic device has implemented the LVGL output device driver in the UEFI environment (i.e., the first loop timer has been created and the first callback function has been registered), the electronic device calls the first callback function according to the duration indicated by the first loop timer, that is, when the first loop timer times out (i.e., the duration indicated by the first loop timer is greater than or equal to the first duration), the electronic device calls the first callback function, receives the buffered data for the operation on one or more GUI objects, and transmits the buffered data received this time to the output device, and then the output device displays the BIOS setup interface including the GUI object after the operation. The operation on the GUI object can be creation, adjustment or deletion, etc., which is not limited here.
[0078] After the first cycle timer times out, the electronic device clears the duration indicated by the first cycle timer and restarts timing until the first cycle timer times out again, and then executes step S33.
[0079] In an embodiment of the present application, before executing step S33, the electronic device may receive a registration instruction input by the user and register the driver of the output device in the driver structure of the output device of LVGL. When the output device is a display, the structure may be a display driver (driver, drv) structure (such as lv_disp_drv_t). The electronic device creates a first loop timer in the structure and registers a first callback function to implement the output device driver of LVGL in the UEFI environment.
[0080] In some embodiments, see Figure 4 , Figure 4 This is a third flow chart of the interface display method provided in the embodiment of the present application. The above interface display method may include the following steps.
[0081] Step S41, reading multiple element components in the HII database, which is the same as the above step S11.
[0082] Step S42, calling multiple controls of LVGL to create a GUI object of an element component corresponding to each control, which is the same as the above step S12.
[0083] Step S43: driving the output device to display the BIOS setting interface including the created GUI object, which is the same as the above step S13.
[0084] Step S44: when the cyclic timer corresponding to the input device times out, the second callback function is called to drive the input device to read the state parameters of the input device.
[0085] Step S45, passing the state parameters to multiple controls to adjust the GUI objects included in the BIOS setting interface.
[0086] In the technical solution provided by the embodiment of the present application, the electronic device drives the input device through a driver, regularly monitors and responds to the user's operation on the mouse, keyboard and other input devices, obtains the state parameters of the input device, and realizes user interaction in combination with the BIOS setup interface displayed on the output device and the event callback mechanism provided by LVGL. Compared with the BIOS setup interface in text mode, the BIOS setup interface provided by the embodiment of the present application is more user-friendly and beautiful, and has a better user experience.
[0087] In the above step S44, the input device is used to receive the operation instructions input by the user. The input device can be a mouse, a keyboard, etc., and the input device is not limited here. Each input device corresponds to a pre-created cycle timer (such as a second cycle timer), and the timeout duration of the second cycle timer is the second duration. The second duration can be 30ms, 50ms, etc. The first duration and the second duration can be the same or different, and there is no limitation on this. Each output device also corresponds to a pre-registered callback function (such as a second callback function) for reading the state parameters of the input device.
[0088] For example, when the output device is a mouse, the second callback function can be a mouse read callback function (such as mouse_read()). The electronic device implements the second callback function based on the GetState function of the Simple Pointer Protocol of EFI (such as EFI_SIMPLE_POINTER_PROTOCOL.GetState()), reads the state of the mouse from UEFI, and obtains the state parameters.
[0089] When the output device is a keyboard, the second callback function can be a keyboard read callback function (such as keyboard_read()). The electronic device implements the second callback function based on the function of obtaining key input (ReadKeyStroke) of the Simple Text Input Protocol of EFI (such as EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke()), reads the status of the keyboard from UEFI, and obtains the status parameter, that is, the corresponding key value. Table 2 shows the callback functions of different device drivers for implementing LVGL in the UEFI environment and the method of implementing the callback functions.
[0090] Table 2
[0091] Device Type Callback Function How to implement callback function Monitor disp_flush EFI_GRAPHICS_OUTPUT_PROTOCOL.Blt() Mouse mouse_read EFI_SIMPLE_POINTER_PROTOCOL.GetState() Keyboard keyboard_read EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke()
[0092] When the electronic device has implemented the LVGL input device driver in the UEFI environment (i.e., a second loop timer has been created and a second callback function has been registered), the electronic device calls the second callback function according to the duration indicated by the second loop timer. That is, when the second loop timer times out (i.e., the duration indicated by the second loop timer is greater than or equal to the second duration), the electronic device calls the second callback function, drives the input device, reads the status of the input device from UEFI, and obtains the status parameters.
[0093] After the second cycle timer times out, the electronic device clears the duration indicated by the second cycle timer and restarts timing until the second cycle timer times out again, and then executes step S44.
[0094] The electronic device can convert the obtained state parameters into state parameters of the input device defined by LVGL, and execute step S45 to pass the converted state parameters to LVGL, that is, to pass the converted state parameters to one or more corresponding controls. The electronic device calls the corresponding control to adjust the GUI object included in the BIOS setting interface.
[0095] For example, when the output device is a mouse, the electronic device converts the obtained state parameters into the state parameters of the mouse defined by LVGL, passes the state parameters of the mouse defined by LVGL to the corresponding control 1, and calls control 1 to adjust the corresponding GUI object; when the output device is a keyboard, the electronic device converts the obtained key value into the key value of the keyboard defined by LVGL, passes the key value of the keyboard defined by LVGL to the corresponding control 2, and calls control 2 to adjust the corresponding GUI object.
[0096] In an embodiment of the present application, before executing step S44, the electronic device can receive a registration instruction input by the user, register the driver of the input device to the driver structure (such as lv_indev_drv_t) of the LVGL input device (input devices, indev), and create a second loop timer in the structure and register a second callback function to implement the LVGL input device driver in the UEFI environment.
[0097] In some embodiments, after the above step S44, the above interface display method may further include the following steps: obtaining user modification information from the state parameters; writing the user modification information to the global variable store. The global variable store is used to store the user's modification information of the GUI object on the BIOS setting interface. The electronic device obtains the user modification information from the obtained state parameters and writes the user modification information to the global variable store to ensure that the user's settings can be permanently saved, so that the user can call the previous user modification information from the global variable store for viewing.
[0098] In some embodiments, the above-mentioned interface display method may further include the following steps: receiving a tuning instruction, the tuning instruction including a target timeout duration of a target cycle timer; adjusting the timeout duration of the target cycle timer to the target timeout duration. The target cycle timer may be a first cycle timer or a second cycle timer, which is not limited. The target timeout duration may be any duration, such as 10ms, 100ms, 200ms, etc. Taking the target cycle timer as the second cycle timer as an example, in order to enable the electronic device to respond to user input in a timely manner and not occupy too many CPU resources, the target timeout duration may be set to 100ms. The target timeout duration is not limited here.
[0099] Before executing the above step S33 or step S44, the electronic device may receive a tuning instruction input by the user, use the cycle timer indicated by the tuning instruction as the target cycle timer, and use the target timeout duration included in the tuning instruction as the new timeout duration of the target cycle timer.
[0100] Because too high an input and output processing frequency may lead to unnecessary consumption of CPU resources and will not bring about a significant improvement in user experience, while too low an input and output processing frequency may lead to a poor user experience. The technical solution provided by the embodiment of the present application is that the electronic device receives the tuning instruction input by the user and appropriately adjusts the input and output processing frequency to make full use of CPU resources, optimize performance, balance resource utilization and user needs, and does not occupy too much CPU resources while responding to user input and displaying the interface in a timely manner.
[0101] In some embodiments, the above-mentioned interface display method may further include the following steps: receiving a cropping instruction, the cropping instruction including a target control to be cropped; and deleting the target control from multiple controls.
[0102] Before executing the above step S11, the electronic device may receive a cropping instruction input by the user, and delete the target control included in the cropping instruction from the multiple controls of LVGL. Afterwards, the electronic device may use other controls except the target control as multiple controls of LVGL, and call these multiple controls to create a GUI object. The electronic device may also receive the cropping instruction before or after executing other steps, which is not limited.
[0103] For example, when receiving a crop instruction input by the user to delete the canvas (lv_canvas) control, the electronic device may delete the corresponding source code file from the .inf file, that is, delete the lv canvas.c file corresponding to the lv_canvas control from the .inf file.
[0104] In the technical solution provided in the embodiment of the present application, the electronic device cuts out unnecessary controls in the functional requirements of the BIOS setting interface, so that the LVGL controls become more streamlined, reducing the storage space occupied by the program and improving performance efficiency.
[0105] Below through Figure 5 The interface display method provided in the embodiment of the present application is described in detail. Figure 5 A schematic diagram of a BIOS setup interface provided in an embodiment of the present application is provided, and is described by taking a mouse and keyboard as input devices and a display as output device as an example.
[0106] The display of the BIOS setup interface involves three aspects: user space, kernel space, and hardware. The kernel space includes the BIOS setup interface, the HII database that stores element definition files (such as .vfr files), the EFI global variable memory that stores user modification information, the LVGL GUI Lib that stores LVGL source code (including LVGL controls), and the driver that implements the input device driver and output device driver of LVGL.
[0107] The electronic device reads the element components defined in the element definition file stored in the HII database, calls the LVGL controls stored in the LVGLGUI Lib, and creates GUI objects of each element component on the BIOS setup interface. The driver corresponding to the display displays the BIOS setup interface on the display, and the user views the BIOS setup interface displayed in the application in the user space through the display.
[0108] The user operates the BIOS setup interface in the application through the mouse and keyboard. The driver corresponding to the input device obtains the user's operation, that is, obtains the mouse status and the keyboard key value, converts the mouse status and the keyboard key value into parameters (data) and passes them to LVGL GUI Lib. The corresponding controls in LVGL GUI Lib adjust the GUI objects on the BIOS setup interface so that the user can view the adjusted BIOS setup interface through the display to achieve user interaction. In addition, the driver also passes the parameters to the EFI global variable memory so that the EFI global variable memory obtains and stores the user modification information therefrom.
[0109] As a GUI system framework, LVGL has the advantages of small code size, easy user interface development, rich functions, flexibility, and portability, which can help developers quickly and conveniently create beautiful and feature-rich graphical user interfaces. In the technical solution provided in the embodiment of the present application, LVGL is integrated in the UEFI BIOS environment, providing a low-cost BIOS setup interface development solution, realizing a BIOS setup interface in a graphic mode based on LVGL, significantly reducing the difficulty and cycle of equipment manufacturers developing a BIOS setup interface in a graphic mode, thereby reducing development costs. Compared with the traditional text-mode BIOS setup interface, it is more user-friendly and beautiful, thereby improving the user's operating experience and enhancing the competitiveness of the product.
[0110] Corresponding to the above interface display method, the present application embodiment also provides an interface display device, see Figure 6 , the above-mentioned device comprises:
[0111] A reading module 61 is used to read multiple element components in the HII database;
[0112] A creation module 62, used for calling multiple controls of LVGL to create a GUI object of an element component corresponding to each control;
[0113] The first driving module 63 is used to drive the output device to display the BIOS setting interface including the created GUI object.
[0114] In some embodiments, the first driver module 63 is specifically configured to call the first callback function when the cycle timer corresponding to the output device times out, so as to drive the output device to display the BIOS setting interface including the created GUI object.
[0115] In some embodiments, the above-mentioned device also includes: a second driver module, which is used to call a second callback function when the loop timer corresponding to the input device times out, so as to drive the input device to read the status parameters of the input device; and pass the status parameters to multiple controls to adjust the GUI objects included in the BIOS setting interface.
[0116] In some embodiments, the second driving module is further used to: obtain user modification information from the state parameters; and write the user modification information into the global variable storage.
[0117] In some embodiments, the above-mentioned device also includes: an adjustment module, which is used to receive a tuning instruction, the tuning instruction includes a target timeout duration of a target cycle timer; and adjust the timeout duration of the target cycle timer to the target timeout duration.
[0118] In some embodiments, the above-mentioned device also includes: a cropping module, which is used to receive a cropping instruction, the cropping instruction includes a target control to be cropped; and delete the target control from the multiple controls.
[0119] In the technical solution provided by the embodiment of the present application, multiple controls of LVGL are used to create GUI objects of corresponding element components, and the GUI objects are displayed on the BIOS setup interface to obtain a BIOS setup interface in a graphic mode. The technical solution provided by the embodiment of the present application uses the open source project LVGL to implement a self-developed BIOS setup interface in a graphic mode, which improves the operating experience and aesthetics of the BIOS setup interface, reduces the development difficulty and cycle of the BIOS setup interface in a graphic mode, and reduces the cost. At the same time, equipment manufacturers do not need to purchase the BIOS setup interface in a graphic mode from IBV, which solves the problems of high purchase cost and excessive dependence of equipment manufacturers on IBV.
[0120] The present application also provides an electronic device, such as Figure 7 As shown, it includes a processor 71, a communication interface 72, a memory 73 and a communication bus 74, wherein the processor 71, the communication interface 72 and the memory 73 communicate with each other through the communication bus 74;
[0121] The memory 73 is used to store computer programs;
[0122] The processor 71 is used to implement any of the above-mentioned interface display methods when executing the program stored in the memory 73.
[0123] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0124] The communication interface 72 is used for communication between the above electronic device and other devices.
[0125] The memory 73 may include a random access memory (RAM) or a non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory 73 may also be at least one storage device located away from the processor 71 .
[0126] The above-mentioned processor 71 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0127] In another embodiment provided in the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned interface display methods is implemented.
[0128] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any interface display method in the above embodiments.
[0129] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0130] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0131] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, storage medium, and program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0132] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. An interface display method, characterized in that: The method comprises: Read multiple element components in the HII database; Call multiple controls of the lightweight general graphics library LVGL to create a graphical user interface GUI object of an element component corresponding to each control; The output device is driven to display a basic input and output system BIOS setting interface including the created GUI object.
2. The method according to claim 1, characterized in that The step of driving the output device to display the BIOS setting interface including the created GUI object comprises: When the cycle timer corresponding to the output device times out, the first callback function is called to drive the output device to display the BIOS setting interface including the created GUI object.
3. The method according to claim 1, characterized in that The method further comprises: When the cyclic timer corresponding to the input device times out, calling the second callback function to drive the input device to read the state parameter of the input device; The state parameters are passed to the plurality of controls to adjust the GUI objects included in the BIOS setup interface.
4. The method according to claim 3, characterized in that The method further comprises: Obtaining user modification information from the state parameters; The user modification information is written into the global variable memory.
5. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: receiving a tuning instruction, wherein the tuning instruction includes a target timeout duration of a target cycle timer; The timeout duration of the target cycle timer is adjusted to the target timeout duration.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Receiving a cropping instruction, wherein the cropping instruction includes a target control to be cropped; The target control is deleted from the plurality of controls.
7. An interface display device, characterized in that: The device comprises: A reading module, used for reading a plurality of element components in a human-machine interface infrastructure HII database; A creation module is used to call multiple controls of a lightweight general graphics library LVGL to create a graphical user interface GUI object of an element component corresponding to each control; The first driving module is used to drive the output device to display a basic input and output system BIOS setting interface including the created GUI object.
8. The device according to claim 7, characterized in that The first driver module is specifically configured to call a first callback function when a cycle timer corresponding to the output device times out, so as to drive the output device to display a BIOS setting interface including the created GUI object.
9. The device according to claim 7, characterized in that The device also includes: a second driver module, which is used to call a second callback function when the cycle timer corresponding to the input device times out, so as to drive the input device to read the state parameters of the input device; and pass the state parameters to the multiple controls to adjust the GUI objects included in the BIOS setting interface.
10. The device according to claim 9, characterized in that The second driving module is further used to obtain user modification information from the state parameter; and write the user modification information into the global variable storage.
11. The device according to any one of claims 8 to 10, characterized in that: The device also includes: an adjustment module, which is used to receive a tuning instruction, wherein the tuning instruction includes a target timeout duration of a target cycle timer; and adjust the timeout duration of the target cycle timer to the target timeout duration.
12. The device according to any one of claims 7 to 10, characterized in that: The device further includes: a cropping module, configured to receive a cropping instruction, wherein the cropping instruction includes a target control to be cropped; and delete the target control from the multiple controls.
13. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-6 when executing a program stored in a memory.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.