Method and apparatus for constructing basic input / output system, and electronic device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2026-08-11
AI Technical Summary
这不能很好的提高工作效率,导致人工劳动成本较高
[0016]本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述基本输入输出系统的构建方法。
Smart Images

Figure CN119690404B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, and electronic device for constructing a basic input / output system. Background Technology
[0002] The Basic Input Output System (BIOS) is a set of programs embedded in a chip on the computer's motherboard.
[0003] According to relevant technologies, currently, to implement the functionality of a standalone basic input / output system, engineers often need to manually develop and implement it according to the architecture corresponding to the development toolkit. This does not significantly improve work efficiency and results in high manual labor costs.
[0004] Therefore, finding a method for constructing a basic input-output system that can improve the efficiency of basic input-output system construction has become a current research hotspot. Summary of the Invention
[0005] This invention provides a method, apparatus, and electronic device for constructing a basic input / output system, which enables the automatic construction of a basic input / output system, improves the construction efficiency of the basic input / output system, and reduces manual labor costs.
[0006] This invention provides a method for constructing a basic input / output system. The method includes: acquiring construction information of a target basic input / output system; invoking a pre-trained programming model and inputting the construction information into the programming model to obtain a target basic input / output system output by the programming model that matches the construction information. The programming model is used to determine the compilation environment and compilation functions required to construct the target basic input / output system based on the construction information, and to compile the target basic input / output system based on the compilation environment and compilation functions.
[0007] According to a method for constructing a basic input / output system provided by the present invention, the construction information includes at least the tool development kit architecture required to construct the target basic input / output system and the functional requirements of the target basic input / output system; the compilation function includes a target main function and target library functions; the programming model implements the target basic input / output system that matches the construction information in the following manner: based on the tool development kit architecture required to construct the target basic input / output system, determining the compilation environment required to construct the target basic input / output system; based on the compilation environment, determining the configuration file required to construct the target basic input / output system under the tool development kit architecture; based on the functional requirements of the target basic input / output system, determining the target main function and target library functions for constructing the target basic input / output system; and compiling the configuration file, the target main function, and the target library functions to obtain the target basic input / output system that matches the construction information.
[0008] According to a method for constructing a basic input / output system provided by the present invention, the configuration file includes function name information configured for the target main function; after determining the target main function for constructing the target basic input / output system based on the functional requirements of the target basic input / output system, the method further includes: setting the function name of the target main function according to the function name information configured for the target main function included in the configuration file.
[0009] According to a method for constructing a basic input / output system provided by the present invention, before determining the target library functions for constructing the target basic input / output system based on the functional requirements of the target basic input / output system, the method further includes: deploying multiple library functions in the configuration file under the tool development kit architecture, wherein different library functions are matched with different functional requirements; the step of determining the target library functions for constructing the target basic input / output system based on the functional requirements of the target basic input / output system specifically includes: determining and calling the target library functions that match the functional requirements of the target basic input / output system in the configuration file based on the functional requirements of the target basic input / output system.
[0010] According to a method for constructing a basic input / output system provided by the present invention, after the target basic input / output system is compiled based on the compilation environment and compilation functions, the method further includes: obtaining the compilation log of the target basic input / output system; determining, based on the compilation log, whether the compiled target basic input / output system is compiled accurately; and if the compiled target basic input / output system is compiled inaccurately, modifying the inaccurate compilation content of the target basic input / output system based on the compilation log to obtain a modified target basic input / output system.
[0011] According to a method for constructing a basic input / output system provided by the present invention, the method further includes: if the compiled target basic input / output system is accurately compiled, performing simulation operation processing on the target basic input / output system to obtain simulation operation processing results; if the simulation operation processing results do not meet the functional requirements of the target basic input / output system, recompiling the target basic input / output system.
[0012] According to a method for constructing a basic input / output system provided by the present invention, a target basic input / output system is recompiled by means of the following: calling the programming model; inputting the construction information of the target basic input / output system into the programming model; and inputting a target basic input / output system that does not meet the functional requirements as a negative reference into the programming model in parallel, thereby obtaining a recompiled target basic input / output system output by the programming model.
[0013] According to a method for constructing a basic input / output system provided by the present invention, the method further includes: when the simulation operation result does not meet the functional requirements of the target basic input / output system, obtaining a target basic input / output system that does not meet the functional requirements, and construction information corresponding to the target basic input / output system that does not meet the functional requirements; determining training negative samples based on the target basic input / output system that does not meet the functional requirements and the construction information; iteratively training the programming model based on the training negative samples to obtain an iteratively trained programming model; using the iteratively trained programming model as the programming model, or when the simulation operation result meets the functional requirements of the target basic input / output system, obtaining a target basic input / output system that meets the functional requirements, and construction information corresponding to the target basic input / output system that meets the functional requirements; determining training positive samples based on the target basic input / output system that meets the functional requirements and the construction information; iteratively training the programming model based on the training positive samples to obtain an iteratively trained programming model; and using the iteratively trained programming model as the programming model.
[0014] The present invention also provides a basic input / output system construction apparatus, the apparatus comprising: an acquisition module for acquiring construction information of a target basic input / output system; and a processing module for invoking a pre-trained programming model and inputting the construction information into the programming model to obtain a target basic input / output system output by the programming model that matches the construction information, wherein the programming model is used to determine the compilation environment and compilation functions required to construct the target basic input / output system based on the construction information, and to compile the target basic input / output system based on the compilation environment and compilation functions.
[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for constructing a basic input / output system as described above.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for constructing a basic input / output system as described above.
[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a method for constructing a basic input / output system as described above.
[0018] The present invention provides a method, apparatus, and electronic device for constructing a basic input / output system, which acquires construction information of a target basic input / output system; calls a pre-trained programming model and inputs the construction information into the programming model, thereby automatically obtaining a target basic input / output system output by the programming model that matches the construction information. This enables the automatic construction of basic input / output systems, improves the construction efficiency of basic input / output systems, and reduces manual labor costs. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is one of the flowcharts illustrating the construction method of the basic input / output system provided by the present invention.
[0021] Figure 2 This is a schematic diagram of the target basic input / output system that matches the programming model output with the construction information provided by the present invention.
[0022] Figure 3 This is the second flowchart illustrating the construction method of the basic input / output system provided by this invention.
[0023] Figure 4 This is a schematic diagram illustrating an application scenario of the basic input / output system construction method provided by this invention.
[0024] Figure 5 This is a schematic diagram of the structure of the basic input / output system construction device provided by the present invention.
[0025] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0027] The method for constructing a basic input / output system provided by this invention can automatically obtain a target basic input / output system that matches the construction information by calling a pre-trained programming model and inputting construction information into the programming model. This achieves automatic construction of the basic input / output system, improves the construction efficiency of the basic input / output system, and reduces manual labor costs.
[0028] Figure 1 This is one of the flowcharts illustrating the construction method of the basic input / output system provided by the present invention.
[0029] The following will combine Figure 1 The process of constructing the basic input / output system provided by this invention will be described.
[0030] In an exemplary embodiment of the present invention, combined with Figure 1 As can be seen, the construction method of a basic input / output system may include steps 110 and 120, which will be described in detail below.
[0031] In step 110, the construction information of the target basic input / output system is obtained.
[0032] In one embodiment, the build information of the target basic input / output system can be obtained. This build information may include at least the tool development kit architecture required to build the target basic input / output system, such as the EDKII architecture, and the functional requirements of the target basic input / output system. These functional requirements may include specific module types of the target basic input / output system, dependencies of the target basic input / output system, the operating environment of the target basic input / output system, and functional details of the implementation of the target basic input / output system.
[0033] It is understandable that the functional module architecture of the target basic input / output system can be determined based on the construction information of the target basic input / output system.
[0034] In step 120, a pre-trained programming model is invoked, and the construction information is input into the programming model to obtain the target basic input-output system output by the programming model that matches the construction information. The programming model is used to determine the compilation environment and compilation functions required to build the target basic input-output system based on the construction information, and compiles the target basic input-output system based on the compilation environment and compilation functions.
[0035] In another embodiment, a pre-trained programming model can be invoked, and the construction information can be input into the programming model. This allows for the automatic generation of a target basic input / output system (API) that matches the construction information, output by the programming model. Specifically, the programming model can determine the compilation environment and compilation functions required to construct the target API based on the construction information, and then compile the API using these resources. Since this embodiment automatically compiles the target API that matches the construction information based on a pre-trained programming model, the efficiency of building the API can be improved, and manual labor costs can be reduced.
[0036] Figure 2 This is a schematic diagram of the target basic input / output system that matches the programming model output with the construction information provided by the present invention.
[0037] The following will combine Figure 2 The process of matching the output of the programming model provided by this invention with the target basic input / output system is described.
[0038] In an exemplary embodiment of the present invention, the compilation function includes a target main function and a target library function; combined with Figure 2 As can be seen, the target basic input-output system that matches the output of the programming model with the construction information may include steps 210 to 240, which will be described in detail below.
[0039] In step 210, the compilation environment required to build the target basic input / output system is determined based on the tool development package architecture required to build the target basic input / output system.
[0040] In one embodiment, the tool development kit architecture required to build the target basic input / output system can be either the EDKII architecture or the EDK architecture. For ease of explanation, this embodiment will use the EDKII architecture as an example to illustrate the tool development kit architecture required to build the target basic input / output system. During application, the compilation environment required to build the target basic input / output system can be determined based on the tool development kit architecture required to build the target basic input / output system, i.e., the EDKII architecture.
[0041] In yet another embodiment, the compilation environment required to construct the target basic input / output system can be implemented in the following manner: Based on the tool development package architecture required to build the target basic input / output system, such as the EDKII architecture, download and install the corresponding virtual machine workstation, download and install Python, and download and install the ASL file, thereby building the compilation environment required by the target basic input / output system under the EDKII architecture.
[0042] In step 220, based on the compilation environment, the configuration files required to build the target basic input / output system under the tool development kit architecture are determined.
[0043] In step 230, based on the functional requirements of the target basic input / output system, the target main function and target library function for constructing the target basic input / output system are determined.
[0044] In another embodiment, the configuration files required to build the target basic input / output system under the tool development kit architecture can be determined based on the compilation environment. In other words, the basic files (corresponding configuration files) under the EDKII architecture can be set based on the compilation environment, such as dec files, dsc files, fdf files, c files, h files, and inf files. The inf file can specify ENTRY_POINT, MODULE_TYPE, and LibraryClasses to facilitate the subsequent automatic compilation of the target basic input / output system.
[0045] In another embodiment, the target main function and target library function for constructing the target basic input / output system can be determined based on the functional requirements of the target basic input / output system, thereby laying the foundation for compiling a target basic input / output system that matches the construction information.
[0046] In step 240, the configuration file, target main function, and target library functions are compiled to obtain a target basic input / output system that matches the build information.
[0047] In another embodiment, compilation can be performed based on configuration files, target main functions, and target library functions, thereby automatically compiling a target basic input / output system that matches the build information.
[0048] In yet another exemplary embodiment of the present invention, the configuration file may further include function name information configured for the target main function; continuing from the preceding text Figure 2 The above embodiment is used as an example for illustration. After determining the target main function for constructing the target basic input / output system based on the functional requirements of the target basic input / output system, the construction method of the basic input / output system may further include the following steps: Set the function name of the target main function according to the function name information configured for the target main function included in the configuration file.
[0049] In one embodiment, the target main function can be named according to the function name information ENTRY_POINT set in the configuration file (inf file). By setting the target main function according to the ENTRY_POINT set in the configuration file, the target main function can be matched with the configuration file, thereby enabling better compilation based on the configuration file, the target main function, and the target library functions, resulting in a target basic input / output system that matches the build information.
[0050] In yet another exemplary embodiment of the present invention, continuing with Figure 2 The above embodiment is used as an example for illustration. Before determining the target library functions for constructing the target basic input / output system based on the functional requirements of the target basic input / output system, the construction method of the basic input / output system may also include the following steps: Multiple library functions are deployed in the configuration file under the tool development kit architecture, where different library functions are matched with different functional requirements; Based on the functional requirements of the target basic input / output system, the target library functions for constructing the target basic input / output system can be determined in the following ways: Based on the functional requirements of the target basic input / output system, the target library functions that match the functional requirements of the target basic input / output system are identified and called in the configuration file.
[0051] In one embodiment, since multiple library functions are already deployed in the configuration file under the tool development kit architecture, further, based on the functional requirements of the target basic input / output system, the target library function that matches the functional requirements of the target basic input / output system can be identified and called from among the multiple library functions in the configuration file, effectively realizing the reference of the target library function, thereby laying the foundation for automatically compiling the target basic input / output system.
[0052] Figure 3 This is the second flowchart illustrating the construction method of the basic input / output system provided by this invention.
[0053] The following will combine Figure 3 The process of constructing another basic input / output system is explained.
[0054] In an exemplary embodiment of the present invention, combined with Figure 3 As can be seen, after the target basic input / output system is obtained by compiling based on the compilation environment and compilation function, the construction method of the basic input / output system may also include steps 310 to 330, which will be described in detail below.
[0055] In step 310, the compilation log of the target basic input / output system is obtained.
[0056] In step 320, the compiler log is used to determine whether the target basic input / output system has been compiled accurately.
[0057] In step 330, if the compiled target basic input / output system is inaccurate, the inaccurate content of the target basic input / output system is modified based on the compilation log to obtain the modified target basic input / output system.
[0058] In one embodiment, after automatically compiling the target basic input / output system, a compilation log of the target basic input / output system can be obtained, which records compilation process parameters of the target basic input / output system. Furthermore, the compilation log can be used to determine whether the compiled target basic input / output system is accurate. If the compiled target basic input / output system is detected to be inaccurate, compilation error handling can be performed.
[0059] In another example, since the compilation log records the compilation process parameters of the target basic input / output system, inaccurate compilation information of the target basic input / output system can be corrected based on the compilation log, thus obtaining a modified target basic input / output system. It is understandable that the modified target basic input / output system overcomes the defects caused by inaccurate compilation information compared to the original target basic input / output system.
[0060] In yet another exemplary embodiment of the present invention, continuing with Figure 3 The above-described embodiment is used as an example to illustrate the construction method of a basic input / output system, which may further include the following steps: If the target basic input / output system is compiled accurately, the target basic input / output system is simulated and processed to obtain the simulation results. If the simulation results show that the target basic input / output system does not meet the functional requirements of the target basic input / output system, the target basic input / output system is recompiled.
[0061] In one embodiment, if the compiled target basic input / output system is found to be correctly compiled, a simulation run can be performed on the target basic input / output system to obtain the simulation run result. In other words, if the target basic input / output system is correctly compiled, simulation software can be invoked to run it, thereby determining whether the target basic input / output system can effectively achieve the required functional requirements.
[0062] In another embodiment, if the simulation results show that the functional requirements of the target basic input / output system are not met, it indicates that although the software compilation process is accurate, the functions of the compiled target basic input / output system do not meet the requirements. In this case, the target basic input / output system can be recompiled based on the compilation model.
[0063] In yet another exemplary embodiment of the present invention, continuing with the previously described embodiments, the target basic input / output system can be recompiled in the following manner: Call the programming model; The construction information of the target basic input-output system is input into the programming model, and the target basic input-output system that does not meet the functional requirements is input into the programming model in parallel as a negative reference, so as to obtain the target basic input-output system that has been recompiled and processed by the programming model.
[0064] In one embodiment, to ensure that the target basic input / output system compiled based on the compilation model better matches the functional requirements, in addition to inputting the construction information of the target basic input / output system into the programming model, a target basic input / output system that does not meet the functional requirements can also be input into the programming model as a negative reference in parallel, so as to obtain a recompiled target basic input / output system output by the programming model. In this embodiment, because a negative reference is set, it can be effectively guaranteed that the recompiled target basic input / output system output in this instance can meet the functional requirements.
[0065] In another example, the programming model can also be a generative pre-trained model. During application, negative correction prompts can be determined based on the target basic input / output system that does not meet functional requirements. The corresponding construction information of the target basic input / output system serves as positive prompt text. Furthermore, the negative correction prompts and positive prompt texts can be jointly input into the generative pre-trained model to obtain a recompiled target basic input / output system. Because a negative reference is set, it can be effectively ensured that the recompiled target basic input / output system output in this instance meets the functional requirements.
[0066] In yet another exemplary embodiment of the present invention, the method for constructing a basic input / output system may further include the following steps: If the simulation results show that the target basic input / output system does not meet the functional requirements, obtain the target basic input / output system that does not meet the functional requirements, and the corresponding construction information of the target basic input / output system that does not meet the functional requirements. Based on the target basic input-output system that does not meet functional requirements, and the construction information, determine the training negative samples; Based on training negative samples, the programming model is iteratively trained to obtain the iteratively trained programming model. Use the iteratively trained programming model as the programming model, or
[0067] If the simulation results show that the target basic input / output system meets the functional requirements, obtain the target basic input / output system that meets the functional requirements, and the construction information corresponding to the target basic input / output system that meets the functional requirements. Based on the target basic input-output system that meets functional requirements, and the construction information, the training positive samples are determined; The programming model is iteratively trained based on positive training samples to obtain the iteratively trained programming model. The programming model trained iteratively is used as the programming model.
[0068] In one embodiment, if the simulation results show that the target basic input / output system does not meet the functional requirements, the target basic input / output system that does not meet the functional requirements, along with its corresponding construction information, can be obtained. Further, the target basic input / output system that does not meet the functional requirements and its corresponding construction information can be identified as training negative samples, and the programming model can be iteratively trained based on these negative samples to obtain an iteratively trained programming model. This iteratively trained programming model can then be used as a subsequent programming model. In this embodiment, the obtained programming model is a model calibrated based on the training negative samples, which effectively improves the model's accuracy and lays the foundation for the accuracy of the subsequently obtained target basic input / output system.
[0069] In another embodiment, if the simulation results show that the target basic input / output system meets the functional requirements, the target basic input / output system that meets the functional requirements, along with the corresponding construction information, can be obtained. Further, the target basic input / output system that meets the functional requirements and its corresponding construction information can be identified as positive training samples. The programming model can then be iteratively trained based on these positive training samples to obtain the iteratively trained programming model. This iteratively trained programming model can then be used as a subsequent programming model. In this embodiment, the positive training samples further increase the training sample size of the model, thereby further improving the accuracy of the trained model and laying the foundation for the accuracy of the subsequently obtained target basic input / output system.
[0070] Figure 4 This is a schematic diagram illustrating an application scenario of the basic input / output system construction method provided by this invention.
[0071] The following will combine Figure 4 The application scenarios of the basic input / output system construction method provided by this invention are described.
[0072] In an exemplary embodiment of the present invention, combined with Figure 4 It is known that an AI model, i.e., the programming model mentioned above, can be pre-trained. Furthermore, a development environment and editing environment matching the construction information of the target basic input / output system can be obtained based on the programming model, and the corresponding development and editing environments can be configured. During application, the collected BIOS functional requirements of the basic input / output system can be analyzed through the programming model, thereby obtaining the functional modules required to build the target basic input / output system. These modules may include, for example, basic files set up under the EDK II architecture (corresponding to the configuration file mentioned above), the target main function for building the target basic input / output system (corresponding to the main function in the diagram), and target library functions (corresponding to the library functions in the diagram). In another embodiment, the entire module, i.e., the target basic input / output system, can be automatically compiled based on the developed target main function, the called target library functions, and the basic files.
[0073] In another embodiment, it can be determined whether the automatically compiled target basic input / output system has been successfully compiled. If it has, a simulation test can be automatically performed to obtain the simulation results. If the simulation results show that the target basic input / output system does not meet its functional requirements (i.e., it fails), the scheme is adjusted and the target basic input / output system is recompiled. If the simulation results show that the target basic input / output system meets its functional requirements (i.e., it passes), the scheme is terminated.
[0074] The method for constructing a basic input / output system provided by this invention can realize the functional modules corresponding to the development of a basic input / output system BIOS under the EDKII architecture, and realize the artificial intelligence of the basic input / output system BIOS development code, thereby saving the workload of basic input / output system BIOS developers and improving the efficiency of code development.
[0075] As described above, the basic input / output system construction method provided by the present invention obtains the construction information of the target basic input / output system; calls a pre-trained programming model and inputs the construction information into the programming model, thereby automatically obtaining the target basic input / output system output by the programming model that matches the construction information, realizing the automatic construction of the basic input / output system, improving the construction efficiency of the basic input / output system, and reducing manual labor costs.
[0076] The following describes the apparatus for constructing a basic input / output system provided by the present invention. The apparatus for constructing a basic input / output system described below can be referred to in correspondence with the method for constructing a basic input / output system described above.
[0077] Figure 5 This is a schematic diagram of the structure of the basic input / output system construction device provided by the present invention.
[0078] The following will combine Figure 5 The structure of the device for building a basic input / output system is explained.
[0079] In an exemplary embodiment of the present invention, combined with Figure 5 As can be seen, the basic input / output system construction device may include an acquisition module 510 and a processing module 520, and each module will be described in detail below.
[0080] The acquisition module 510 can be configured to acquire the construction information of the target basic input / output system; Processing module 520 can be configured to invoke a pre-trained programming model, input the construction information into the programming model, and obtain a target basic input / output system output by the programming model that matches the construction information, wherein...
[0081] The programming model is used to determine the compilation environment and compilation functions required to build the target basic input / output system based on the construction information, and to compile the target basic input / output system based on the compilation environment and compilation functions.
[0082] In an exemplary embodiment of the present invention, the construction information includes at least the tool development package architecture required to construct the target basic input / output system, and the functional requirements of the target basic input / output system; the compilation function includes the target main function and the target library functions; Processing module 520 can implement a target basic input / output system that outputs a model that matches the construction information based on the programming model in the following ways: Based on the tool development package architecture required to build the target basic input / output system, the compilation environment required to build the target basic input / output system is determined. Based on the compilation environment, determine the configuration files required to build the target basic input / output system under the tool development kit architecture; Based on the functional requirements of the target basic input / output system, the target main function and target library functions for constructing the target basic input / output system are determined. The configuration file, the target main function, and the target library functions are compiled to obtain a target basic input / output system that matches the build information.
[0083] In an exemplary embodiment of the present invention, the configuration file includes function name information configured for the target main function; Processing module 520 can also be configured to: The function name of the target main function is set according to the function name information configured for the target main function included in the configuration file.
[0084] In an exemplary embodiment of the present invention, the processing module 520 may further be configured to: Multiple library functions are deployed in the configuration file under the tool development kit architecture, where different library functions are matched with different functional requirements; The processing module 520 can also implement the functional requirements based on the target basic input / output system and determine the target library functions for constructing the target basic input / output system in the following ways: Based on the functional requirements of the target basic input / output system, the target library function that matches the functional requirements of the target basic input / output system is determined and called in the configuration file.
[0085] In an exemplary embodiment of the present invention, the processing module 520 may further be configured to: Obtain the compilation logs of the target basic input / output system; Based on the compilation log, determine whether the compiled target basic input / output system is compiled accurately; If the compiled target basic input / output system is inaccurate, the inaccurate content of the target basic input / output system is modified based on the compilation log to obtain the modified target basic input / output system.
[0086] In an exemplary embodiment of the present invention, the processing module 520 may further be configured to: If the target basic input / output system is compiled accurately, the target basic input / output system is simulated to obtain the simulation results. If the simulation results do not meet the functional requirements of the target basic input / output system, the target basic input / output system is recompiled.
[0087] In an exemplary embodiment of the present invention, the processing module 520 may perform recompilation processing on the target basic input / output system in the following manner: Invoke the programming model; The construction information of the target basic input / output system is input into the programming model, and the target basic input / output system that does not meet the functional requirements is input into the programming model in parallel as a negative reference, so as to obtain the target basic input / output system that has been recompiled and processed by the programming model.
[0088] In an exemplary embodiment of the present invention, the processing module 520 may further be configured to: If the simulation results show that the functional requirements of the target basic input / output system are not met, the target basic input / output system that does not meet the functional requirements is obtained, along with the construction information corresponding to the target basic input / output system that does not meet the functional requirements. Based on the target basic input / output system that does not meet the functional requirements, and the construction information, training negative samples are determined; Based on the training negative samples, the programming model is iteratively trained to obtain the iteratively trained programming model; The programming model trained iteratively is used as the programming model, or
[0089] If the simulation results meet the functional requirements of the target basic input / output system, obtain the target basic input / output system that meets the functional requirements, and the construction information corresponding to the target basic input / output system that meets the functional requirements. Based on the target basic input / output system that meets the functional requirements and the construction information, training positive samples are determined; The programming model is iteratively trained based on the training positive samples to obtain the iteratively trained programming model. The programming model after iterative training is used as the programming model.
[0090] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a method for constructing a basic input / output system. This method includes: acquiring construction information of a target basic input / output system; calling a pre-trained programming model and inputting the construction information into the programming model to obtain a target basic input / output system output by the programming model that matches the construction information; wherein the programming model is used to determine the compilation environment and compilation functions required to construct the target basic input / output system based on the construction information, and compiles the target basic input / output system based on the compilation environment and compilation functions.
[0091] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0092] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the basic input / output system construction method provided by the above methods. The method includes: obtaining construction information of a target basic input / output system; calling a pre-trained programming model and inputting the construction information into the programming model to obtain a target basic input / output system output by the programming model that matches the construction information. The programming model is used to determine the compilation environment and compilation functions required to construct the target basic input / output system based on the construction information, and to compile the target basic input / output system based on the compilation environment and compilation functions.
[0093] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a method for constructing a basic input / output system provided by the above methods. The method includes: acquiring construction information of a target basic input / output system; invoking a pre-trained programming model and inputting the construction information into the programming model to obtain a target basic input / output system output by the programming model that matches the construction information. The programming model is used to determine, based on the construction information, the compilation environment and compilation functions required to construct the target basic input / output system, and to compile the target basic input / output system based on the compilation environment and compilation functions.
[0094] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a basic input / output system, characterized in that, The method includes: Obtain the construction information of the target basic input / output system; A pre-trained programming model is invoked, and the construction information is input into the programming model to obtain a target basic input-output system whose output matches the construction information. The programming model is used to determine the compilation environment and compilation functions required to build the target basic input / output system based on the construction information, and to compile the target basic input / output system based on the compilation environment and compilation functions. The compilation functions include the target main function and the target library functions. Based on the compilation environment, the configuration file required to build the target basic input / output system under the tool development kit architecture is determined. Based on the functional requirements of the target basic input / output system, the target main function and target library functions for constructing the target basic input / output system are determined. The configuration file, the target main function, and the target library functions are compiled to obtain a target basic input / output system that matches the build information.
2. The method for constructing a basic input / output system according to claim 1, characterized in that, The construction information includes at least the tool development kit architecture required to construct the target basic input / output system, and the functional requirements of the target basic input / output system; the programming model implements the target basic input / output system whose output matches the construction information in the following manner: Based on the tool development package architecture required to build the target basic input / output system, the compilation environment required to build the target basic input / output system is determined.
3. The method for constructing a basic input / output system according to claim 2, characterized in that, The configuration file includes function name information configured for the target main function; After determining the target main function for constructing the target basic input / output system based on its functional requirements, the method further includes: The function name of the target main function is set according to the function name information configured for the target main function included in the configuration file.
4. The method for constructing a basic input / output system according to claim 2, characterized in that, Before determining the target library functions for constructing the target basic input / output system based on its functional requirements, the method further includes: Multiple library functions are deployed in the configuration file under the tool development kit architecture, where different library functions are matched with different functional requirements; The determination of the target library functions for constructing the target basic input / output system based on the functional requirements of the target basic input / output system specifically includes: Based on the functional requirements of the target basic input / output system, the target library function that matches the functional requirements of the target basic input / output system is determined and called in the configuration file.
5. The method for constructing a basic input / output system according to any one of claims 1 to 4, characterized in that, After the target basic input / output system is compiled based on the compilation environment and compilation functions, the method further includes: Obtain the compilation logs of the target basic input / output system; Based on the compilation log, determine whether the compiled target basic input / output system is compiled accurately; If the compiled target basic input / output system is inaccurate, the inaccurate content of the target basic input / output system is modified based on the compilation log to obtain the modified target basic input / output system.
6. The method for constructing a basic input / output system according to claim 5, characterized in that, The method further includes: If the target basic input / output system is compiled accurately, the target basic input / output system is simulated to obtain the simulation results. If the simulation results do not meet the functional requirements of the target basic input / output system, the target basic input / output system is recompiled.
7. The method for constructing a basic input / output system according to claim 6, characterized in that, The target basic input / output system is recompiled using the following method: Invoke the programming model; The construction information of the target basic input / output system is input into the programming model, and the target basic input / output system that does not meet the functional requirements is input into the programming model in parallel as a negative reference, so as to obtain the target basic input / output system that has been recompiled and processed by the programming model.
8. The method for constructing a basic input / output system according to claim 6, characterized in that, The method further includes: If the simulation results show that the functional requirements of the target basic input / output system are not met, the target basic input / output system that does not meet the functional requirements is obtained, along with the construction information corresponding to the target basic input / output system that does not meet the functional requirements. Based on the target basic input / output system that does not meet the functional requirements, and the construction information, training negative samples are determined; Based on the training negative samples, the programming model is iteratively trained to obtain the iteratively trained programming model; The programming model trained iteratively is used as the programming model, or If the simulation results meet the functional requirements of the target basic input / output system, obtain the target basic input / output system that meets the functional requirements, and the construction information corresponding to the target basic input / output system that meets the functional requirements. Based on the target basic input / output system that meets the functional requirements and the construction information, training positive samples are determined; The programming model is iteratively trained based on the training positive samples to obtain the iteratively trained programming model. The programming model trained iteratively is used as the programming model.
9. A device for constructing a basic input / output system, characterized in that, The apparatus is used to implement the method for constructing the basic input / output system according to any one of claims 1 to 8, and the apparatus comprises: The acquisition module is used to obtain the construction information of the target basic input / output system; The processing module is used to invoke a pre-trained programming model, input the construction information into the programming model, and obtain a target basic input / output system output by the programming model that matches the construction information. The programming model is used to determine the compilation environment and compilation functions required to build the target basic input / output system based on the construction information, and to compile the target basic input / output system based on the compilation environment and compilation functions.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for constructing a basic input / output system as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Method and system for implementing suite mechanism based on low-code platform
CN118312167A