Page switching method, electronic equipment, device and medium
By deleting the current page and loading the page to be accessed when receiving page switching instructions in the BIOS Setup interface, the problem of pre-creating all pages in the BIOS Setup interface is solved, and the page switching function is realized and memory space is saved.
Patent Information
- Application Number
- CN202510217844.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-30
AI Technical Summary
All pages need to be created in the BIOS Setup interface to achieve page switching, but this will waste a lot of memory space.
By deleting the first screen object of the current page when receiving the page switching instruction, and creating and loading the second screen object of the page to be accessed, the page is generated only when needed to save memory.
It realizes the function of page switching in the BIOS Setup interface, while saving memory space and avoiding the need to create a large number of pages.
Smart Images

Figure CN120066594A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software technology, and in particular to a page switching method, electronic equipment, device and medium. Background Art
[0002] BIOS (Basic Input Output System) is a set of programs fixed on a ROM (Read-Only Memory) chip on the computer's motherboard. It stores the most important basic input and output programs of the computer, the self-test program after powering on, and the system self-starting program. It can read and write specific information of system settings from CMOS (Complementary Metal Oxide Semiconductor). Its main function is to provide the lowest-level and most direct hardware settings and control for the computer.
[0003] The BIOS Setup interface is a user interface provided by the firmware program embedded on the computer motherboard, which is used to manage and configure the hardware settings of electronic devices. The BIOS Setup interface is usually entered by pressing a specific key combination (such as the Delete key, the Esc key, etc.) when the computer is started. Its appearance can be a text-based menu structure or a modern graphical interface that presents various setting options in the form of graphics or text.
[0004] The BIOS Setup interface often contains multiple pages. The BIOS Setup interface of a server may even contain hundreds of pages. The user can control the BIOS Setup interface to switch between different pages. In order to achieve the above switching process, the related art needs to pre-create all pages in the BIOS Setup interface, so that when the user enters a page switching instruction, the user can switch between different pages. However, in reality, only one page is displayed at the same time, and pre-creating all pages will waste a lot of memory space. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a page switching method, electronic device, device and medium to implement page switching in the BIOS Setup interface and save memory space. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present application provides a page switching method, the method comprising:
[0007] Upon receiving a page switching instruction, delete the first screen object of the original page originally displayed in the Basic Input / Output System (BIOS) Setup interface, and delete the components defined within the original page included in the first screen object;
[0008] Create and load the second screen object of the page to be accessed indicated by the page switching instruction, and create the components defined within the page to be accessed within the second screen object.
[0009] In one embodiment of the present application, at least one vfr file is defined in the program of the BIOS Setup interface, a formset is defined in the vfr file, the formset includes at least one form, each form is used to define a page in the BIOS Setup interface, and when a page switching component is included in the page, each page switching component is associated with a first identifier of a formset or a second identifier of a form;
[0010] The creating and loading the second screen object of the page to be accessed indicated by the page switching instruction includes:
[0011] Determine the target identifier associated with the target switching component, where the target switching component is the page switching component that triggers the current page switching in the original page;
[0012] When the target identifier is a first identifier, create the second screen object of the page to be accessed defined by the target initial form, where the target initial form is the preset initial form included in the target formset indicated by the target identifier;
[0013] When the target identifier is a second identifier, create the second screen object of the page to be accessed indicated by the target identifier.
[0014] In one embodiment of the present application, there is a target stack, context information of the page is stored in the target stack, the context information includes the screen object identifier of the screen object corresponding to the page, and the context information of the initial default page of the BIOS Setup interface is stored in the bottom node of the target stack;
[0015] The deleting the first screen object of the original page originally displayed in the Basic Input / Output System (BIOS) Setup interface includes:
[0016] Delete the first screen object indicated by the screen object identifier included in the context information of the top node of the target stack;
[0017] After creating and loading the second screen object, it further includes:
[0018] Construct and store the context information of the page to be accessed in the target stack.
[0019] In one embodiment of the present application, the method further includes:
[0020] When a page back instruction is received, obtain and remove the first context information recorded in the top node of the current target stack;
[0021] Delete the third screen object indicated by the screen object identifier in the first context information;
[0022] Obtain the second context information recorded in the top node of the current target stack;
[0023] Create and load the fourth screen object indicated by the screen object identifier in the second context information.
[0024] In one embodiment of the present application, after creating and loading the second screen object, it further includes:
[0025] Create a page back component in the second screen object.
[0026] In one embodiment of the present application, the context information corresponding to the initial default page of the BIOS Setup interface further includes at least one of the following information: the first page type information indicating that this page is the initial default page, the identifier associated with the page switching component included in this page;
[0027] And / or
[0028] The context information corresponding to the non-initial default page of the BIOS Setup interface further includes at least one of the following information: the form identifier defining the form of this page, the formset identifier of the formset to which the form of this page belongs, the second page type information indicating that this page is not the initial default page.
[0029] In one embodiment of the present application, before deleting the first screen object, it further includes:
[0030] Create and load a blank screen object;
[0031] After creating the components defined in the page to be accessed in the second screen object, it further includes:
[0032] Delete the blank screen object.
[0033] In one embodiment of the present application, each vfr file records the page information of the page for setting a hardware component.
[0034] In one embodiment of the present application, each page switching component included in the initial default page of the BIOS Setup interface is associated with a first identifier of a formset.
[0035] Second aspect, an embodiment of the present application provides an electronic device, the electronic device includes:
[0036] A processor;
[0037] A transceiver;
[0038] A machine-readable storage medium storing machine-executable instructions executable by the processor, the machine-executable instructions causing the processor to perform the following steps:
[0039] When a page switching instruction is received, delete the first screen object of the original page originally displayed in the basic input / output system BIOS setup Setup interface, and delete the components defined within the original page included in the first screen object;
[0040] Create and load a second screen object of the page to be accessed indicated by the page switching instruction, and create the components defined within the page to be accessed in the second screen object.
[0041] In one embodiment of the present application, at least one vfr file is defined in the program of the BIOS Setup interface, a formset is defined in the vfr file, the formset includes at least one form, each form is used to define a page in the BIOS Setup interface, and when a page switching component is included in the page, each page switching component is associated with a first identifier of a formset or a second identifier of a form;
[0042] The creating and loading the second screen object of the page to be accessed indicated by the page switching instruction specifically includes:
[0043] Determine the target identifier associated with the target switching component, where the target switching component is the page switching component that triggers the current page switching in the original page;
[0044] When the target identifier is a first identifier, create a second screen object of the page to be accessed defined by the target initial form, where the target initial form is the preset initial form included in the target formset indicated by the target identifier;
[0045] When the target identifier is a second identifier, create a second screen object of the page to be accessed defined by the target form indicated by the target identifier.
[0046] In one embodiment of the present application, there is a target stack, in which context information of pages is stored. The context information includes screen object identifiers of screen objects corresponding to the pages. The context information of the initial default page of the BIOS Setup interface is stored in the bottom node of the target stack;
[0047] Deleting the first screen object of the original page originally displayed in the BIOS (Basic Input Output System) Setup interface specifically includes:
[0048] Deleting the first screen object indicated by the screen object identifier included in the context information of the top node of the target stack;
[0049] After creating and loading the second screen object, the machine-executable instructions further cause the processor to perform the following steps:
[0050] Construct and deposit the context information of the page to be accessed into the target stack.
[0051] In one embodiment of the present application, the machine-executable instructions further cause the processor to perform the following steps:
[0052] In the case of receiving a page back instruction, obtain and remove the first context information recorded in the top node of the current target stack;
[0053] Delete the third screen object indicated by the screen object identifier in the first context information;
[0054] Obtain the second context information recorded in the top node of the current target stack;
[0055] Create and load the fourth screen object indicated by the screen object identifier in the second context information.
[0056] In one embodiment of the present application, after creating and loading the second screen object, the machine-executable instructions further cause the processor to perform the following steps:
[0057] Create a page back component in the second screen object.
[0058] In one embodiment of the present application, the context information corresponding to the initial default page of the BIOS Setup interface further includes at least one of the following information: first page type information indicating that the page is an initial default page, an identifier associated with a page switching component included in the page;
[0059] and / or
[0060] The context information corresponding to the non-initial default page of the BIOS Setup interface further includes at least one of the following information: the form identifier of the form defining the page, the formset identifier of the formset to which the form defining the page belongs, and the second page type information indicating that the page is not the initial default page.
[0061] In an embodiment of the present application, before deleting the first screen object, the machine-executable instructions further cause the processor to perform the following steps:
[0062] Create and load a blank screen object;
[0063] After creating the components defined in the page to be accessed in the second screen object, the machine-executable instructions further cause the processor to perform the following steps:
[0064] Delete the blank screen object.
[0065] In an embodiment of the present application, each vfr file records the page information of the page for setting a hardware component.
[0066] In an embodiment of the present application, each page switching component included in the initial default page of the BIOS Setup interface is associated with a first identifier of a formset.
[0067] In a third aspect, an embodiment of the present application provides a page switching device, and the device includes:
[0068] A first object deletion module, configured to delete the first screen object of the original page originally displayed in the BIOS Setup interface and delete the components defined in the original page included in the first screen object when receiving a page switching instruction;
[0069] A second object creation module, configured to create and load a second screen object of the page to be accessed indicated by the page switching instruction and create the components defined in the page to be accessed in the second screen object.
[0070] In an embodiment of the present application, at least one vfr file is defined in the program of the BIOS Setup interface, a formset is defined in the vfr file, the formset includes at least one form, each form is used to define a page in the BIOS Setup interface, and when a page switching component is included in the page, each page switching component is associated with a first identifier of a formset or a second identifier of a form;
[0071] The second object creation module is specifically configured to:
[0072] Determine the target identifier associated with the target switching component, where the target switching component is the page switching component that triggers the current page switching in the original page;
[0073] When the target identifier is the first identifier, create a second screen object of the to-be-accessed page defined by the target initial form, where the target initial form is the preset initial form included in the target formset indicated by the target identifier;
[0074] When the target identifier is the second identifier, create a second screen object of the to-be-accessed page defined by the target form indicated by the target identifier;
[0075] Create the components defined within the to-be-accessed page in the second screen object.
[0076] In an embodiment of the present application, there is a target stack, where the target stack stores the context information of the page, and the context information includes the screen object identifier of the screen object corresponding to the page. The context information of the initial default page of the BIOS Setup interface is stored in the bottom node of the target stack;
[0077] The first object deletion module is specifically configured to:
[0078] Delete the first screen object indicated by the screen object identifier included in the context information of the top node of the target stack;
[0079] Delete the components defined within the original page included in the first screen object;
[0080] The device further includes:
[0081] An information construction module, configured to construct and store the context information of the to-be-accessed page into the target stack.
[0082] In an embodiment of the present application, the device further includes:
[0083] A first information removal module, configured to, when receiving a page backtracking instruction, obtain and remove the first context information recorded in the top node of the current target stack;
[0084] A third object deletion module, configured to delete the third screen object indicated by the screen object identifier in the first context information;
[0085] A second information acquisition module, configured to acquire the second context information recorded in the top node of the current target stack;
[0086] A fourth object creation module, configured to create and load a fourth screen object indicated by a screen object identifier in the second context information.
[0087] In one embodiment of the present application, the device further includes:
[0088] A fallback component creation module, configured to create a page fallback component in the second screen object.
[0089] In one embodiment of the present application, the context information corresponding to the initial default page of the BIOS Setup interface further includes at least one of the following information: first page type information indicating that this page is the initial default page, an identifier associated with a page switching component included in this page;
[0090] and / or
[0091] The context information corresponding to a non-initial default page of the BIOS Setup interface further includes at least one of the following information: a form identifier defining the form of this page, a formset identifier of the formset to which the form of this page belongs, second page type information indicating that this page is not the initial default page.
[0092] In one embodiment of the present application, the device further includes:
[0093] A blank object creation module, configured to create and load a blank screen object;
[0094] A blank object deletion module, configured to delete the blank screen object.
[0095] In one embodiment of the present application, each vfr file records page information of a page for setting a hardware component.
[0096] In one embodiment of the present application, each page switching component included in the initial default page of the BIOS Setup interface is associated with a first identifier of a formset.
[0097] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the method steps described in any one of the first aspect are implemented.
[0098] In a fifth aspect, an embodiment of the present application further provides a computer program product including instructions, and when it runs on a computer, it causes the computer to execute the method steps described in any one of the first aspect.
[0099] Advantageous effects of the embodiments of the present application:
[0100] The page switching method provided by the embodiment of the present application will only delete the first screen object of the original page that was originally displayed when receiving a page switching instruction for triggering page switching, and then generate the second screen object of the page to be accessed. That is, the second screen object of the new page to be accessed will only be generated after receiving the page switching instruction, and the first screen object of the original page will also be deleted. Therefore, in most cases, there will only be one screen object in the BIOS Setup interface, and there is no need to pre-generate a large number of pages, which will not occupy too much memory. BRIEF DESCRIPTION OF THE DRAWINGS
[0101] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can also obtain other embodiments based on these drawings.
[0102] Figure 1 It is a schematic flowchart of the first page switching method provided by the embodiment of the present application;
[0103] Figure 2 It is a schematic diagram of the vrf file hierarchy relationship in the present application;
[0104] Figure 3 It is a schematic flowchart of the second page switching method provided by the embodiment of the present application;
[0105] Figure 4 It is a schematic flowchart of the third page switching method provided by the embodiment of the present application;
[0106] Figure 5 It is a schematic structural diagram of an electronic device provided by the embodiment of the present application;
[0107] Figure 6 It is a schematic structural diagram of a page switching device provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0108] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art based on the present application belong to the scope of protection of the present application.
[0109] The BIOS Setup interface is a user interface for setting the hardware of an electronic device. There are often many hardware components in an electronic device, such as memory, processor, hard disk, network adapter, power supply unit, etc. Therefore, there are often a large number of pages in the BIOS Setup interface for setting various hardware components. In the related art, in order to implement the switching of different pages in the BIOS Setup interface, a large number of pages need to be pre-generated, and then the page loading function can be called when page switching is required to load the page to be switched from the pre-generated pages for display, so as to achieve page switching. It can be seen that a large number of pages need to be pre-generated in the related art, occupying a large amount of memory space.
[0110] To solve the above problems, embodiments of the present application provide a page switching method, an electronic device, a device and a medium.
[0111] See Figure 1 , which is a schematic flowchart of the first page switching method provided by the embodiments of the present application, including the following steps S101 - step S102.
[0112] S101: When receiving a page switching instruction for triggering page switching, delete the first screen object of the original page originally displayed in the BIOS Setup interface, and delete the components defined in the original page included in the first screen object.
[0113] The above page switching instruction can be input by the user through the keyboard or input by clicking a page switching component in the original page. The above page switching component is registered with an event callback function that responds to the LV_EVENT_CLICKED (button click event), so the switching function is executed when the page switching component is clicked.
[0114] The identifier of the first screen object of the original page originally displayed can be called old_scr. An event callback function is registered in each component included in the first screen object to respond to events. For example, the above events can be LV_EVENT_CLICKED, information input events, etc. When deleting the above components, the event callback functions registered for the components also need to be deleted.
[0115] S102: Create and load the second screen object of the page to be accessed indicated by the page switching instruction, and create the components defined in the page to be accessed in the second screen object.
[0116] Specifically, the relevant information of the page to be accessed is defined in the vrf file. Parsing and compiling the information in the vrf file can obtain the relevant information of the page to be accessed, including the page type of the page to be accessed, the functional types, names, sizes, colors, associated events, and event callback functions of the components included therein. For the specific description of the vrf file, please refer to the following text and will not be elaborated here for the time being.
[0117] During the process of creating a component, for a component of the go to (switching) type, an event callback function also needs to be registered for this component to respond to LV_EVENT_CLICKED. Thus, page switching can be triggered when the user clicks on this component.
[0118] The above page switching process can be implemented through the page switching function (Iv_scr_page_switch), and the inputs to this function are the screen object identifier of the first screen object and the screen object identifier of the second screen object.
[0119] As can be seen from the above, for the page switching method provided by the embodiments of the present application, only when a page switching instruction for triggering page switching is received, the first screen object of the original page that was originally displayed will be deleted, and then the second screen object of the page to be accessed will be generated. That is, the second screen object of the new page to be accessed will only be generated after receiving the page switching instruction, and the first screen object of the original page will also be deleted. Therefore, in most cases, there will only be one screen object in the BIOS Setup interface, and there is no need to pre-generate a large number of pages, and it will not occupy too much memory.
[0120] Moreover, a large number of pages will result in a very complex switching logic between pages, a complicated switching relationship between each page, and a high coupling degree. Using related technologies for page switching requires configuring a complex switching relationship between pages when generating pages. However, the pages in the present application do not need to be pre-generated. Each time a switch occurs, only the page to be accessed needs to be determined, and then the screen object of this page can be created and loaded, and there is no need to configure a complex switching relationship between pages. Therefore, the logic of page switching can be simplified, and the coupling degree between pages can be reduced.
[0121] In another embodiment of the present application, before deleting the first screen object, step A is also executed, and after step S102, step B is also executed.
[0122] Step A: Create and load a blank screen object.
[0123] Specifically, the blank screen object does not contain any components and only plays a transitional role within the time interval between deleting the first screen object of the original page and creating the second screen object of the new page to be accessed.
[0124] After creating a blank screen object, the screen object loading function can be called to load the blank screen object. The above screen object loading function can be called lv_scr_load.
[0125] Step B: Delete the above blank screen object.
[0126] It can be seen that at least a blank screen object exists in the BIOS Setup interface during the period from the deletion of the first screen object to the creation of the second screen object, and the problem of display jamming caused by the deletion of all screen objects in the BIOS Setup interface will not occur. In addition, since the time required for creating and deleting screen objects is very short, often only a few milliseconds, the blank screen object is actually invisible to the user and will not have an adverse impact on the page display effect of the BIOS Setup interface.
[0127] In another embodiment of the present application, at least one vfr file is defined in the program of the above BIOS Setup interface. A formset is defined in the above vfr file. At least one form is included in the above formset, and each form is used to define a page in the above BIOS Setup interface.
[0128] One formset is defined in each vfr file. Each formset is uniquely identified by a GUID. At least one form is included in each formset, and the information of the components included in its corresponding page is defined in the form.
[0129] See Figure 2 , which is a schematic diagram of the vrf file hierarchy relationship in the present application.
[0130] The formset in the figure includes one form, and the form defines a subtitle component, a text component, a checkbox component, a one of component, a goto component, and other components.
[0131] In the case where a page switching component is included in the above page, each page switching component is associated with a first identifier of a formset or a second identifier of a form. If clicking the page switching component triggers a page switch to a page defined by a form in a new formset, the page switching component is associated with the first identifier. If clicking the page switching component triggers a page switch to a page corresponding to another form belonging to the same formset as the form corresponding to the original page, the page switching component is associated with the second identifier. Among them, the first identifier is the GUID of the formset, and the second identifier is the formlD of the form.
[0132] In one embodiment of the present application, page information of a page for setting a hardware component is recorded in each VFR file.
[0133] For example, the above-mentioned hardware components include a processor, a memory, a storage, a network adapter, and a power unit. That is, a form for configuring a page of a hardware component is recorded in each VFR file, and forms for configuring pages of the same hardware component form a formset.
[0134] By using the above method to define formsets corresponding to different hardware components in different VRF files, the classification of VRF files is relatively clear, which is convenient for programmers to define VRF files.
[0135] In this case, the initial default page of the BIOS Setup interface can be defined as the main page for navigation. The initial default page contains page switching components, and each page switching component is associated with a first identifier of a formset. After the user clicks on the page switching component, the page can be switched to the page for configuring the hardware component corresponding to the formset associated with the page switching component.
[0136] In one embodiment of the present application, each page switching component included in the initial default page of the above-mentioned BIOS Setup interface is associated with a first identifier of a formset.
[0137] On this basis, referring to Figure 3 , which is a schematic flowchart of the second page switching method provided by the embodiment of the present application. Compared with the embodiment shown in the foregoing Figure 1 , the above step S102 can be implemented through the following steps S102A - S102D.
[0138] S102A: Determine the target identifier associated with the target switching component.
[0139] Among them, the above-mentioned target switching component is the page switching component that triggers the current page switching in the original page.
[0140] S102B: When the above target identifier is the first identifier, create a second screen object of the page to be accessed defined by the target initial form.
[0141] Among them, the above-mentioned target initial form is: the preset initial form included in the target formset indicated by the above target identifier.
[0142] If the above target identifier is the first identifier, it indicates that after clicking the page switching component, it will switch to the page defined by a form in a new formset, and this page is the default preset initial form, that is, the page defined by the target initial form. The formID of this preset initial form can be the default value, such as 0. That is, when the target is marked as the first mark, the page is default switched to the page defined by the target initial form with the formID as the default value.
[0143] S102C:: In the case where the above target identifier is the second identifier, create a second screen object for the page to be accessed defined by the above target identifier.
[0144] If the above target identifier is the second identifier, it indicates that after clicking the page switching component, it will switch to the page corresponding to another form belonging to the same formset as the form corresponding to the original page, that is, switch to the page defined by the form marked as the target identifier and belonging to the same formset as the form corresponding to the original page.
[0145] S102D: Create the components defined in the above page to be accessed in the above second screen object.
[0146] As can be seen from the above, in the embodiment of the present application, the information of the page is defined in the vrf file, and the page switching can be realized based on the forms in the formset defined in the vrf file.
[0147] In another embodiment of the present application, there is a target stack, and the above target stack stores the context information of the page. The context information includes the screen object identifier of the screen object corresponding to the page. The context information of the initial default page of the above BIOS Setup interface is stored in the bottom node of the above target stack.
[0148] Since the initial default page of the BIOS Setup interface is the first page explicitly displayed in the BIOS Setup interface, the context information of this page is stored in the bottom node of the target stack.
[0149] On this basis, the first screen object can be deleted through the following step C, and step D is executed after creating and loading the second screen object.
[0150] Step C: Delete the above first screen object indicated by the screen object identifier included in the context information of the top node of the above target stack.
[0151] Step D: Construct and deposit the context information of the above page to be accessed into the target stack.
[0152] It can be seen that in the present application, whenever a new page to be accessed is switched to, the context information of the page to be accessed is stored in the target stack. Since the stack is a linear data structure with the feature of last in first out, the newly pushed context information will be stored in the top node of the target stack. Therefore, the context information stored in the top node always represents the context information of the currently latest accessed page.
[0153] Therefore, since the second screen object has not been constructed when step C is executed, the context information in the top node of the target stack is the context information of the last displayed page in the BIOS Setup interface before the page to be accessed is displayed, that is, the context information of the original page. The screen object identifier included in this context information is the screen object identifier of the first screen object. Therefore, the first screen object to be deleted can be determined based on the screen object identifier included in the context information in the top node of the target stack.
[0154] Among them, in addition to the screen object identifier, the context information corresponding to the initial default page of the above BIOS Setup interface further includes at least one of the following information: first page type information indicating that this page is the initial default page, and an identifier associated with the page switching component included in this page.
[0155] and / or
[0156] The context information corresponding to the non-initial default page of the above BIOS Setup interface further includes at least one of the following information: form identifier defining the form of this page, formset identifier defining the formset to which the form of this page belongs, and second page type information indicating that this page is not the initial default page.
[0157] In one embodiment, the above initial default page includes page switching components, and each page switching component corresponds to a formset. Thus, the user can switch to the page to be accessed corresponding to the target initial form in different formsets by clicking different page switching components on the initial default page.
[0158] The text displayed in the page switching components included in the initial default page can be the formsettitle (form set name) of the formset corresponding to this page switching component. The identifier associated with the above page switching component can be represented in the form of data, and each node in the array stores an identifier associated with a page switching component.
[0159] The above initial default page may also include page switching components associated with a second identifier.
[0160] The context information corresponding to the non-initial default page of the above BIOS Setup interface further includes at least one of the following information: the form identifier of the form defining the page, the formset identifier of the formset to which the form defining the page belongs, and the second page type information indicating that the page is not the initial default page. Among them, the formset identifier is the GUID shown above, and the form identifier is the formID shown above.
[0161] If the non-initial default page is a page defined by the preset initial form in a certain formset, the form identifier of the non-initial default page is a default value, such as 0, etc., and the formset identifier is the first identifier associated with the page switching component that triggers the switch to this page.
[0162] If the non-initial default page is not a page defined by the preset initial form in a certain formset, the form identifier of the non-initial default page is the second identifier associated with the page switching component that triggers the switch to this page, and the formset identifier is the formset identifier recorded in the context information of the original page.
[0163] In the case of the existence of the above target stack, refer to Figure 4 , which is a schematic flowchart of the third page switching method provided by the embodiments of the present application, including the following steps S401 - step S404.
[0164] S401: When receiving a page back instruction, obtain and remove the first context information recorded in the top node of the current above target stack.
[0165] Since a page back is to be performed, the page will be backed from the currently displayed page to the previous level page. Since the top node of the target stack records the context information of the latest displayed page, the first context information in the current top node is the context information of the currently displayed page and needs to be deleted. After deletion, the context information in the new top node is the context information that was originally after the deleted first context information. According to the principle of last-in-first-out of the stack, the context information in the new top node is the context information of the page that was displayed before the first context information and was stored in the target stack before the first context information. From the method of storing context information in the target stack described above, the context information before the first context information is the context information of the page that was displayed before the currently backed page.
[0166] S402: Delete the above third screen object indicated by the screen object identifier in the above first context information.
[0167] As shown above, the third screen object indicated by the screen object identifier in the first context information is the screen object of the backed page.
[0168] S403: Obtain the second context information recorded by the top node of the current target stack.
[0169] As shown above, the second context information is the context information of the page displayed immediately before the page currently being rolled back.
[0170] S404: Create and load the fourth screen object indicated by the screen object identifier in the above second context information.
[0171] As shown above, the fourth screen object indicated by the screen object identifier in the second context information is the screen object of the page displayed immediately before the page currently being rolled back.
[0172] As can be seen from the above, in the embodiment of the present application, the context information of the page is stored in the target stack, and by using the feature of the stack that data is stored in a last-in-first-out manner, the display order of each page is recorded in the target stack, so that when the page needs to be rolled back, the page can be rolled back to the page displayed immediately before the current page.
[0173] In addition, before deleting the third screen object, step E is also executed, and after creating and loading the fourth screen object, step F is also executed.
[0174] Step E: Create and load a blank screen object.
[0175] Step F: Delete the above blank screen object.
[0176] It can be seen that at least a blank screen object exists in the BIOS Setup interface during the period from the deletion of the third screen object to the creation of the fourth screen object, and the problem of display jamming caused by the deletion of all screen objects in the BIOS Setup interface will not occur. In addition, since the time required for creating and deleting screen objects is very short, often only a few milliseconds, the blank screen object is actually invisible to the user and will not have an adverse impact on the page display effect of the BIOS Setup interface.
[0177] In another embodiment of the present application, after creating and loading the second screen object, the following step G can also be executed.
[0178] Step G: Create a page rollback component in the above second screen object.
[0179] The above page back component does not need to be defined in the vrf file, that is, as long as the page is generated after page switching, the page back component can be created by default in this application. Appearance parameters such as the size and color of the page back component can be default values, and its position only needs to not conflict with other components in the page. Since there is no upper-level page for the initial default page, the page back component may not be created in the initial default page. When the user clicks the page back component, the page can be triggered to go back.
[0180] The page back component is associated with an event callback function to respond to the LV_EVENT_CLICKED event and go back to the previous page.
[0181] To create and delete pages, a page creation function for page creation and a page destruction function for page deletion need to be defined.
[0182] For the initial default page, the page creation function creates a screen object by calling Iv_obj_create, creates multiple page switching components in the screen object, and registers event callback functions for each page switching component. The event callback function responds to the LV_EVENT_CLICKED event and performs page switching according to the foregoing embodiments after being clicked. The specific switching process will not be elaborated here. The page destruction function is used to remove the screen object of the initial default page, remove the components in the screen object, and remove the event callback functions associated with the components when switching from the initial default page to a sub-page of the initial default page, and release the memory occupied by the initial default page.
[0183] For non-initial default pages, the page creation function creates a screen object through lv_obj_create. If there are components that need to be displayed in the screen object, the components are created and loaded. If there are goto-type components that need to be created, page switching components are created in the screen object, and event callback functions are registered for the page switching components to respond to the LV_EVENT_CLICKED event. The page switching components are associated with formID or GUID. And a page back component is added, and an event callback function is associated with the page back component to respond to the LV_EVENT_CLICKED event and go back to the previous page. The response page destruction function is used to execute the destruction process of the page after the user clicks the page back component in the page or clicks the page switching component in the page. Remove the screen object of the initial default page, remove the components in the screen object, and remove the event callback functions associated with the components, and release the memory occupied by the non-initial default page.
[0184] Corresponding to the foregoing page switching method, an embodiment of the present application further provides an electronic device.
[0185] SeeFigure 5 , which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The above electronic node includes:
[0186] Processor 501;
[0187] Transceiver 504;
[0188] A machine-readable storage medium 502, the machine-readable storage medium 502 stores machine-executable instructions that can be executed by the processor 501, and the machine-executable instructions cause the processor 501 to execute the following steps:
[0189] When receiving a page switching instruction, delete the first screen object of the original page originally displayed in the basic input / output system BIOS setup Setup interface, and delete the components defined within the original page included in the first screen object;
[0190] Create and load a second screen object of the page to be accessed indicated by the page switching instruction, and create the components defined within the page to be accessed in the second screen object.
[0191] As Figure 5 shown, the network device may further include a communication bus 503. Communication between the processor 501, the machine-readable storage medium 502, and the transceiver 504 is completed through the communication bus 503. The communication bus 503 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 503 may be divided into an address bus, a data bus, a control bus, etc.
[0192] The transceiver 504 may be a wireless communication module. Under the control of the processor 501, the transceiver 504 performs data interaction with other devices.
[0193] The machine-readable storage medium 502 may include a Random Access Memory (RAM), and may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Additionally, the machine-readable storage medium 502 may also be at least one storage device located far from the aforementioned processor.
[0194] The processor 501 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may 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.
[0195] As can be seen from the above, in the page switching method provided by the embodiments of the present application, the first screen object of the original page originally displayed is deleted only when a page switching instruction for triggering page switching is received, and then the second screen object of the page to be accessed is generated. That is, the second screen object of the new page to be accessed is generated only after receiving the page switching instruction, and the first screen object of the original page is also deleted. Therefore, in most cases, there will be only one screen object in the BIOS Setup interface, and there is no need to pre-generate a large number of pages, and it will not occupy too much memory.
[0196] In one embodiment of the present application, at least one vfr file is defined in the program of the BIOS Setup interface, a formset is defined in the vfr file, at least one form is included in the formset, and each form is used to define a page in the BIOS Setup interface. When a page switching component is included in the page, each page switching component is associated with a first identifier of a formset or a second identifier of a form.
[0197] The creating and loading of the second screen object of the page to be accessed indicated by the page switching instruction specifically includes:
[0198] Determine the target identifier associated with the target switching component, where the target switching component is the page switching component in the original page that triggers the current page switching.
[0199] When the target identifier is the first identifier, create a second screen object of the page to be accessed defined by the target initial form, where the target initial form is the preset initial form included in the target formset indicated by the target identifier.
[0200] When the target identifier is the second identifier, create a second screen object of the page to be accessed indicated by the target identifier.
[0201] As can be seen from the above, in the embodiment of the present application, the information of the page is defined in the vrf file, and the switching of the page can be realized based on the form in the formset defined in the vrf file.
[0202] In one embodiment of the present application, there is a target stack, and the context information of the page is stored in the target stack. The context information includes the screen object identifier of the screen object corresponding to the page. The context information of the initial default page of the BIOS Setup interface is stored in the bottom node of the target stack;
[0203] Deleting the first screen object of the original page originally displayed in the basic input / output system BIOS setup Setup interface specifically includes:
[0204] Deleting the first screen object indicated by the screen object identifier included in the context information of the top node of the target stack;
[0205] After creating and loading the second screen object, the machine-executable instruction further causes the processor to perform the following steps:
[0206] Construct and deposit the context information of the page to be accessed into the target stack.
[0207] In one embodiment of the present application, the machine-executable instruction further causes the processor 601 to perform the following steps:
[0208] When receiving a page back instruction, obtain and remove the first context information recorded in the top node of the current target stack;
[0209] Delete the third screen object indicated by the screen object identifier in the first context information;
[0210] Obtain the second context information recorded in the top node of the current target stack;
[0211] Create and load the fourth screen object indicated by the screen object identifier in the second context information.
[0212] As can be seen from the above, in the embodiment of the present application, the context information of the page is stored through the target stack, and by using the feature that the stack stores data in a last-in-first-out manner, the display order of each page is recorded by the target stack, so that when the page needs to be backed, the page can be backed to the page displayed before the current page.
[0213] In one embodiment of the present application, after creating and loading the second screen object, the machine-executable instruction further causes the processor to perform the following steps:
[0214] Create a page back component in the second screen object.
[0215] In one embodiment of the present application, the context information corresponding to the initial default page of the BIOS Setup interface further includes at least one of the following information: first page type information indicating that this page is the initial default page, an identifier associated with the page switching component included in this page;
[0216] and / or
[0217] The context information corresponding to the non-initial default page of the BIOS Setup interface further includes at least one of the following information: a form identifier defining the form of this page, a formset identifier defining the formset to which the form of this page belongs, second page type information indicating that this page is not the initial default page.
[0218] In one embodiment of the present application, before deleting the first screen object, the machine-executable instructions further cause the processor to perform the following steps:
[0219] Create and load a blank screen object;
[0220] After creating the components defined in the page to be accessed in the second screen object, the machine-executable instructions further cause the processor to perform the following steps:
[0221] Delete the blank screen object.
[0222] It can be seen that there is at least a blank screen object in the BIOS Setup interface during the period from the deletion of the first screen object to the creation of the second screen object, and the problem of display jamming caused by the deletion of all screen objects in the BIOS Setup interface will not occur. In addition, since the time required for creating and deleting screen objects is very short, often only a few milliseconds, the blank screen object is actually invisible to the user and will not have an adverse impact on the page display effect of the BIOS Setup interface.
[0223] In one embodiment of the present application, each vfr file records the page information of the page for setting a hardware component.
[0224] In one embodiment of the present application, each page switching component included in the initial default page of the BIOS Setup interface is associated with a first identifier of a formset.
[0225] See Figure 6 , which is a schematic structural diagram of a page switching device provided by an embodiment of the present application. The above device includes:
[0226] The first object deletion module 601 is configured to, when receiving a page switching instruction, delete the first screen object of the original page originally displayed in the BIOS Setup interface of the basic input / output system, and delete the components defined in the original page included in the first screen object;
[0227] The second object creation module 602 is configured to create and load the second screen object of the page to be accessed indicated by the page switching instruction, and create the components defined in the page to be accessed in the second screen object.
[0228] As can be seen from the above, for the page switching method provided by the embodiment of the present application, only when receiving a page switching instruction that triggers page switching, will the first screen object of the original page originally displayed be deleted, and then the second screen object of the page to be accessed will be generated. That is, only after receiving the page switching instruction will the second screen object of the new page to be accessed be generated, and the first screen object of the original page will also be deleted. Therefore, in most cases, there will be only one screen object in the BIOS Setup interface, and there is no need to pre-generate a large number of pages, and excessive memory will not be occupied.
[0229] In an embodiment of the present application, at least one vfr file is defined in the program of the BIOS Setup interface, a formset is defined in the vfr file, at least one form is included in the formset, and each form is used to define a page in the BIOS Setup interface. When a page switching component is included in the page, each page switching component is associated with a first identifier of a formset or a second identifier of a form.
[0230] The second object creation module 602 is specifically configured to:
[0231] Determine the target identifier associated with the target switching component, where the target switching component is the page switching component in the original page that triggers the current page switching;
[0232] When the target identifier is the first identifier, create the second screen object of the page to be accessed defined by the target initial form, where the target initial form is the preset initial form included in the target formset indicated by the target identifier;
[0233] When the target identifier is the second identifier, create the second screen object of the page to be accessed defined by the target form indicated by the target identifier;
[0234] Create the components defined in the page to be accessed in the second screen object.
[0235] As can be seen from the above, in the embodiments of the present application, the information of the page is defined in the vrf file, and the switching of the page can be realized based on the form in the formset defined in the vrf file.
[0236] In one embodiment of the present application, there is a target stack, and the context information of the page is stored in the target stack. The context information includes the screen object identifier of the screen object corresponding to the page. The context information of the initial default page of the BIOS Setup interface is stored in the bottom node of the target stack.
[0237] The first object deletion module 601 is specifically configured to:
[0238] Delete the first screen object indicated by the screen object identifier included in the context information in the top node of the target stack;
[0239] Delete the components defined in the original page included in the first screen object;
[0240] The device further includes:
[0241] An information construction module, configured to construct and store the context information of the page to be accessed in the target stack.
[0242] In one embodiment of the present application, the device further includes:
[0243] A first information removal module, configured to, when receiving a page back instruction, obtain and remove the first context information recorded in the top node of the current target stack;
[0244] A third object deletion module, configured to delete the third screen object indicated by the screen object identifier in the first context information;
[0245] A second information acquisition module, configured to acquire the second context information recorded in the top node of the current target stack;
[0246] A fourth object creation module, configured to create and load the fourth screen object indicated by the screen object identifier in the second context information.
[0247] As can be seen from the above, in the embodiments of the present application, the context information of the page is stored through the target stack, and by using the feature that the data stored in the stack is first in last out, the display order of each page is recorded using the target stack, so that when it is necessary to backtrack the page, the page can be backtracked to the page displayed before the current page.
[0248] In one embodiment of the present application, the device further includes:
[0249] A backtracking component creation module, configured to create a page backtracking component in the second screen object.
[0250] In one embodiment of the present application, the context information corresponding to the initial default page of the BIOS Setup interface further includes at least one of the following information: the first page type information indicating that this page is the initial default page, and the identifier associated with the page switching component included in this page.
[0251] and / or
[0252] The context information corresponding to the non-initial default page of the BIOS Setup interface further includes at least one of the following information: the form identifier of the form defining this page, the formset identifier of the formset to which the form defining this page belongs, and the second page type information indicating that this page is not the initial default page.
[0253] In one embodiment of the present application, the device further includes:
[0254] A blank object creation module, configured to create and load a blank screen object;
[0255] A blank object deletion module, configured to delete the blank screen object.
[0256] It can be seen that during the period from the deletion of the first screen object to the creation of the second screen object, there is at least a blank screen object in the BIOS Setup interface, and the problem of display jamming caused by the deletion of all screen objects in the BIOS Setup interface will not occur. In addition, since the time required for the creation and deletion of screen objects is very short, often only a few milliseconds, the blank screen object is actually invisible to the user and will not have an adverse impact on the page display effect of the BIOS Setup interface.
[0257] In one embodiment of the present application, each vfr file records the page information of the page for setting a certain hardware component.
[0258] In one embodiment of the present application, each page switching component included in the initial default page of the BIOS Setup interface is associated with a first identifier of a formset.
[0259] In another embodiment provided by the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above page switching methods are implemented.
[0260] In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when running on a computer, causes the computer to execute any of the page switching methods in the above embodiments.
[0261] 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 processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
[0262] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variation thereof is 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 expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article, or device including the element.
[0263] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the electronic device, apparatus, computer-readable storage medium, and computer program product, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.
[0264] The above are only the preferred embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application are all included in the protection scope of the present application.
Claims
1. A page switching method, characterized in that: The method comprises: In the case of receiving a page switching instruction, deleting a first screen object of an original page originally displayed in a BIOS setup interface, and deleting components defined in the original page contained in the first screen object; A second screen object of the page to be accessed indicated by the page switching instruction is created and loaded, and components defined in the page to be accessed are created in the second screen object.
2. The method according to claim 1, characterized in that At least one vfr file is defined in the program of the BIOS Setup interface, and a form set formset is defined in the vfr file. The formset includes at least one form form, and each form is used to define a page in the BIOS Setup interface. When the page includes a page switching component, each page switching component is associated with a first identifier of a formset or a second identifier of a form; The creating and loading the second screen object of the page to be accessed indicated by the page switching instruction includes: Determine a target identifier associated with a target switching component, wherein the target switching component is a page switching component in the original page that triggers the current page switching; In the case where the target identifier is the first identifier, creating a second screen object of the page to be accessed defined by the target initial form, wherein the target initial form is: a preset initial form included in the target formset indicated by the target identifier; In the case where the target identifier is the second identifier, a second screen object of the page to be accessed defined by the target form indicated by the target identifier is created.
3. The method according to claim 2, characterized in that There is a target stack, the target stack stores context information of the page, the context information includes a screen object identifier of the screen object of the corresponding page, and the bottom node of the target stack stores context information of the initial default page of the BIOS Setup interface; The deleting the first screen object of the original page originally displayed in the BIOS Setup interface includes: Deleting the first screen object indicated by the screen object identifier included in the context information in the top node of the target stack; After creating and loading the second screen object, also include: Build and store the context information of the page to be accessed into the target stack.
4. The method according to claim 3, characterized in that The method further comprises: When a page rollback instruction is received, obtaining and removing the first context information recorded in the top node of the current target stack; deleting the third screen object indicated by the screen object identifier in the first context information; Obtaining second context information recorded by the top node of the current target stack; A fourth screen object indicated by the screen object identifier in the second context information is created and loaded.
5. The method according to claim 4, characterized in that After creating and loading the second screen object, also include: A page fallback component is created in the second screen object.
6. The method according to claim 3, characterized in that: The context information corresponding to the initial default page of the BIOS Setup interface further includes at least one of the following information: first page type information indicating that the page is an initial default page, and an identifier associated with a page switching component included in the page; and / or The context information corresponding to the non-initial default page of the BIOS Setup interface also includes at least one of the following information: a form identifier defining the form of the page, a formset identifier defining the formset to which the form of the page belongs, and second page type information indicating that the page is not the initial default page.
7. The method according to any one of claims 1 to 6, characterized in that Before deleting the first screen object, also include: Create and load a blank screen object; After creating the components defined in the to-be-accessed page in the second screen object, the method further includes: Delete the blank screen object.
8. The method according to claim 2, characterized in that: Each vfr file records page information of a page used to set a hardware component.
9. The method according to claim 3, characterized in that: Each page switching component included in the initial default page of the BIOS Setup interface is associated with a first identifier of a formset.
10. An electronic device, characterized in that: The electronic device comprises: processor; Transceiver; A machine-readable storage medium storing machine-executable instructions that can be executed by the processor, the machine-executable instructions causing the processor to perform the following steps: In the case of receiving a page switching instruction, deleting a first screen object of an original page originally displayed in a BIOS setup interface, and deleting components defined in the original page contained in the first screen object; A second screen object of the page to be accessed indicated by the page switching instruction is created and loaded, and components defined in the page to be accessed are created in the second screen object.
11. A page switching device, characterized in that: The device comprises: A first object deleting module is used to delete a first screen object of an original page originally displayed in a basic input and output system BIOS Setup interface and delete components defined in the original page contained in the first screen object when a page switching instruction is received; The second object creation module is used to create and load a second screen object of the page to be visited indicated by the page switching instruction, and create components defined in the page to be visited in the second screen object.
12. 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 steps described in any one of claims 1 to 9 are implemented.