File system mirror image generation method and device and storage medium
By generating structured configuration files in embedded scenarios and displaying the output results in real time, the problem of insufficient consistency of image files is solved, and image generation with high consistency and traceability is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-04-07
AI Technical Summary
In embedded scenarios, existing technologies lack standardized parameter output, resulting in insufficient consistency in image file delivery.
By acquiring the configuration components and parameter information determined by the graphical interface, a structured configuration file is generated, and the standard output result and the actual output result are displayed in real time during the image generation process to ensure consistency.
It improves the consistency and traceability of image file generation, reduces the rate of human error, and enhances the visibility of operations through visualization methods.
Smart Images

Figure CN121807787A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of embedded image construction, and in particular to a file system image generation method and device and storage medium. BACKGROUND
[0002] In an embedded scenario, system customization usually needs to be performed for a specific application set to perform dependency analysis, resource copying and image construction. The existing process relies on manual operation of scripts, lacks unified parameter output, and affects delivery consistency. SUMMARY
[0003] The present application provides a file system image generation method, device and storage medium to solve the technical problem of how to ensure the consistency of the image file in an embedded scenario.
[0004] In a first aspect, the present application provides a file system image generation method, characterized in that the method comprises: obtaining configuration components and parameter information of the configuration components determined in a graphical interface; determining a configuration file in a structured format according to the configuration components and the parameter information; wherein the configuration file contains a dependency tree structure of the configuration components; in the process of generating an image based on the configuration file, displaying a standard output result and an actual output result of the configuration components in a first target area in real time; wherein the standard output result is a theoretical result of the configuration components determined based on the dependency tree structure, and the actual output result is a result actually generated based on the configuration components; in the case where the actual output result and the standard output result of each group are consistent, determining that the image file generation is completed; if the actual output result and the standard output result are inconsistent, determining that the image file generation fails.
[0005] Optionally, obtaining configuration components and parameter information of the configuration components determined in a graphical interface comprises: determining a target dependency file of a target file system; wherein the target file system is a system restored based on the image file; obtaining configuration components of the target file system configured in a graphical interface; wherein the configuration components include at least one of a graphics card, a font, a rendering window and a driver component; determining parameter information of the graphics card according to a model of the graphics card; obtaining a rendering mode corresponding to the rendering window, and taking the rendering mode as parameter information of the rendering window.
[0006] Optionally, the configuration file in the structured format is determined according to the configuration component and the parameter information, and the configuration file in the structured format is generated according to the dependency relationship of the target dependency file. A dependency tree structure is generated according to the dependency relationship of the target dependency file. The configuration file in the structured format is generated according to the target dependency file, the configuration component and the parameter information according to the dependency tree structure.
[0007] Optionally, in the process of obtaining the configuration component of the target file system configured in the graphical interface, the method further comprises: When the configuration component is selected, the parameter information of the configuration component is displayed in real time in a second target area to preview the parameter information.
[0008] Optionally, before the image is generated based on the configuration file, the method further comprises: The existence of the target dependency file is checked according to the dependency tree structure. If the existence check result of the target item is missing, the target item is taken as a missing item, and the target item is highlighted in the first target area. If all the existence check results are normal, the target dependency file is stored in a temporary space.
[0009] Optionally, after the target dependency file is stored in the temporary space, the method further comprises: The target dependency file is processed for conflict removal in the temporary space, and the processed target dependency file is generated into an image file based on the configuration file.
[0010] Optionally, the configuration file is an extensible markup language file, and the image is generated based on the configuration file, comprising: The image file is sequentially packaged according to the dependency tree structure in the extensible markup language file.
[0011] In a second aspect, the present application provides a file system image generation device, the device comprising: An obtaining module is configured to obtain a configuration component and parameter information of the configuration component determined in a graphical interface. A first determining module is configured to determine a configuration file in a structured format according to the configuration component and the parameter information, wherein the configuration file comprises a dependency tree structure of the configuration component. An output module is configured to display standard output results and actual output results of the configuration component in real time in a first target area in the process of generating an image based on the configuration file, wherein the standard output results are theoretical results of the configuration component determined based on the dependency tree structure, and the actual output results are results actually generated based on the configuration component. the actual output result is consistent with the standard output result, determining that the mirror file generation is completed; the actual output result is inconsistent with the standard output result, determining that the mirror file generation fails.
[0012] In a third aspect, the present application provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; the memory is used for storing a computer program; the processor is used for executing the program stored on the memory, and realizing the file system mirror generation method in any one of the embodiments of the first aspect.
[0013] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the file system mirror generation method in any one of the embodiments of the first aspect.
[0014] The above technical solution provided by the embodiments of the present application has the following advantages compared with the prior art: the method provided by the embodiments of the present application acquires the configuration component and the parameter information of the configuration component determined in the graphical interface; determines the configuration file in a structured format according to the configuration component and the parameter information; wherein the configuration file contains the dependency tree structure of the configuration component; in the process of mirror generation based on the configuration file, the standard output result and the actual output result of the configuration component are displayed in the first target area in real time; wherein the standard output result is the theoretical result of the configuration component determined based on the dependency tree structure, and the actual output result is the result actually generated based on the configuration component; in the case that the actual output result of each group is consistent with the standard output result, it is determined that the mirror file generation is completed; if the actual output result is inconsistent with the standard output result, it is determined that the mirror file generation fails. The method can determine the configuration component and the parameter information in the graphical interface, determine the configuration file in a structured format according to the configuration component and the parameter information, and improve the traceability while ensuring the consistency of the mirror file in the process of mirror generation based on the configuration file. In the process of mirror generation based on the configuration file, the standard output result and the actual output result of the configuration component are displayed in the first target area in real time, in the case that the actual output result of each group is consistent with the standard output result, it is determined that the mirror file generation is completed; if the actual output result is inconsistent with the standard output result, it is determined that the mirror file generation fails, and the visualization degree during mirror generation is improved. BRIEF DESCRIPTION OF DRAWINGS
[0015] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate preferred embodiments of the present application and, together with the description, serve to explain the principles of the application.
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the field, based on the accompanying drawings, other drawings can be obtained without creative labor.
[0017] One or more embodiments are illustrated by way of example in the drawings that are not intended to be limiting of the application, and the same or similar reference numbers in different drawings represent the same or similar elements. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the application.
[0018] Figure 1 A flowchart of a file system image generation method provided by an embodiment of the present application is shown in the figure. Figure 2 A structural diagram of a file system image generation device provided by an embodiment of the present application is shown in the figure. Figure 3 A structural diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0019] To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0020] The following disclosure provides many different embodiments, or examples, for implementing different structures of the present application. For the purpose of simplifying the present application, the components and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeatedly refer to numbers and / or letters in different examples. Such repetition is for the purpose of simplification and clarity, and it does not indicate the relationship between the various embodiments and / or settings discussed.
[0021] In order to solve the technical problem of how to ensure the consistency of the image file in the embedded scenario in the prior art, the present application provides a file system image generation method, device and storage medium, which can generate an image based on a configuration file, and can improve traceability while ensuring the consistency of the image file.
[0022] The first embodiment of the present application provides a file system image generation method, which can be applied to a terminal device of a user. The terminal device can be a desktop computer, a tablet computer, a notebook computer, a supercomputer, or the like. The terminal device is configured with a file system customization and image generation tool. Specifically, the file system customization and image generation tool can include a component configuration module, an image generation module, a log output module, and a user interface module. The user interface module can be a graphical interface, such as a Qt graphical interface, which refers to a graphical user interface (GUI) built using a Qt framework (a cross-platform C++ development framework). The graphical interface includes the visual component configuration module, the image generation module, and the log output module.
[0023] Next, the file system image generation method will be described in detail as follows. Figure 1 The file system image generation method includes the following steps. In step 101, configuration components and parameter information of the configuration components determined in the graphical interface are obtained.
[0024] The configuration components can be determined in the component configuration module in the graphical interface, and the parameter information of the configuration components can be displayed synchronously in the log output module.
[0025] In one embodiment, obtaining the configuration components and the parameter information of the configuration components determined in the graphical interface includes determining a target dependency file of a target file system, wherein the target file system is a system restored based on an image file; obtaining configuration components of the target file system configured in the graphical interface, wherein the configuration components include at least one of a graphics card, a font, a rendering window, and a driver component; determining parameter information of the graphics card according to a model of the graphics card; and obtaining a rendering mode corresponding to the rendering window, and taking the rendering mode as the parameter information of the rendering window.
[0026] In this embodiment, the target file system is a system restored on a client based on the finally generated image file. The target file system can be first scanned to obtain a target dependency file, and relevant components of the target file system are preconfigured, such as graphics card configuration, font configuration, rendering window configuration, and driver component configuration. Of course, the framework dependency configuration and input method configuration can also be included. The graphics card configuration is to select a corresponding graphics card model of the target file system. According to the selected graphics card model, the display resolution, color bit number, refresh rate range, and other parameter information supported by the graphics card can be determined. The font configuration is to select a font of the target file system. A plurality of Chinese font library components can be provided. When the font is configured, the installed font can be viewed in the log output module, and the dynamic installation and update of the font library can be performed. The rendering window configuration indicates whether the target file system supports a single window rendering mode or a multi-window rendering mode. The corresponding rendering mode can be selected according to the needs of the target file system without limitation. The driver component configuration specifies the specified setting of the driver module supported by the target file system, such as universal serial bus (USB), port physical layer (phy), serial peripheral interface (spi), high-speed serial computer expansion bus (pcie), and universal serial data bus (uart). The framework dependency configuration indicates the configuration of the target dependency file. The text dependency description of the target dependency file can be parsed into a parent-child hierarchical relationship, and a dependency tree structure can be generated according to the parent-child hierarchical relationship. The dependency tree structure can be expanded and displayed in the interface. Multiple nodes can be presented. In addition, the hierarchical dependency tree structure can be converted into a linear structure in the framework dependency configuration, which is used as a standard input set for subsequent verification. The input method configuration can configure the input method framework, such as supporting pinyin and wubi Chinese input methods.
[0027] In one embodiment, in the process of obtaining the configuration component of the target file system configured in the graphical interface, the method further includes: when the configuration component is selected, the parameter information of the configuration component is displayed in the second target area in real time to preview the parameter information.
[0028] In this embodiment, in the process of obtaining the configuration component of the target file system configured in the graphical interface, the parameter information of the configuration component can be obtained when each configuration component is selected, and the parameter information is displayed in the second target area of the log output module in real time, so as to facilitate the user to preview the parameter information of the configuration component. For example, when the user performs font configuration and selects different fonts, the actual effect of the font can be displayed in the second target area, so as to facilitate the user to preview the actual effect of the font when running in the target file system.
[0029] In step 102, a configuration file in a structured format is determined according to the configuration component and the parameter information. The configuration file includes the dependency tree structure of the configuration component.
[0030] The configuration component and the parameter information of the configuration component can be exported in a structured format to obtain a configuration file, which can be an Extensible Markup Language (XML) file for example. The configuration file includes a dependency tree structure of the configuration component generated based on the target dependency file.
[0031] In one embodiment, determining the configuration file in the structured format according to the configuration component and the parameter information includes: generating the dependency tree structure according to the dependency relationship of the target dependency file; and generating the configuration file in the structured format according to the target dependency file, the configuration component and the parameter information according to the dependency tree structure.
[0032] In this embodiment, the dependency tree structure can be generated according to the dependency relationship of the target dependency file, and then the configuration file in the structured format can be generated according to the target dependency file, the configuration component and the parameter information according to the dependency tree structure. The configuration component and the parameter information set in the graphical interface in the customization process are exported in the structured format by generating an XML file to generate the entire file system image, so that a consistent running environment and component configuration information can be restored when the target file system is deployed. The XML file covers all key parameters configured manually by the user in the Qt interface, including a graphics card, a font, a window mode, the name, the package name, the description and the dependency tree structure of each application component, to form a unified delivery configuration file. The target file system can read the XML file when deployed to batch load the parameter information of all configuration components, so that a system environment completely consistent with the customization side can be achieved. For example, the required font can be automatically enabled, the correct window mode can be set, and specific graphics parameters can be configured. The detailed information of each selected application, including the dependency relationship and the description, is recorded in the XML file, so that the deployment end can accurately restore the dependency tree of each application to prevent system failure caused by missing dependencies.
[0033] In step 103, during the image generation based on the configuration file, the standard output result and the actual output result of the configuration component are displayed in real time in the first target area. The standard output result is a theoretical result of the configuration component determined based on the dependency tree structure, and the actual output result is a result actually generated based on the configuration component.
[0034] The log information in the file system mirror image generation process can be provided by the log output module, and the first target area can be an area for displaying the log information. For example, the standard output result and the actual output result of the configuration component are displayed in real time in the first target area. The standard output result is the theoretically correct result of the configuration component determined based on the dependency tree structure, and the actual output result is the result actually generated based on the configuration component. The second target area of the log output module can display interactive prompt information. For example, when a configuration component, such as an application manifest item of a target dependency file, is checked or switched, the dependency tree and details are triggered to update in linkage, accompanied by state prompts and information echoes, to facilitate confirmation of whether the currently selected item and its dependencies are correctly parsed and displayed. Interactive nodes such as font selection and preview switching, graphical parameter drop-down box changing, window mode selection, and the like will have state updates or instant effect echoes in the second target area.
[0035] In one embodiment, before the mirror image is generated based on the configuration file, the method further includes: performing existence verification on the target dependency file item by item based on the dependency tree structure; if the existence verification result of the target item is missing, the target item is taken as a missing item, and highlighted display is performed in the first target area; and if all existence verification results are normal, the target dependency file is stored in the temporary space.
[0036] In this embodiment, before the mirror image is generated based on the configuration file, existence verification can be performed on the target dependency file item by item based on the dependency tree structure, that is, it is determined whether there is a missing item in the actually obtained target dependency file. If the existence verification result of the target item is missing, the target item is taken as a missing item, and highlighted display is performed in the first target area. If all existence verification results are normal, the target dependency file is stored in the temporary space. In the temporary space, the target dependency file can be subjected to conflict removal processing to form a clean and traceable mirror image input set, and the processed target dependency file is subjected to mirror image file generation based on the configuration file to encapsulate a system mirror image file that can be distributed, installed, and started.
[0037] In one embodiment, the mirror image is generated based on the configuration file, including: sequentially packaging the mirror image file according to the dependency tree structure in the extensible markup language file.
[0038] In this embodiment, the target dependency file processed in the temporary space can be sequentially packaged to generate a system mirror image file that can be distributed, installed, and started according to the dependency tree structure in the XML file.
[0039] In step 104, in the case where the actual output result and the standard output result of each group are consistent, it is determined that the mirror image file generation is completed.
[0040] If the actual output result displayed in the log output module is consistent with the standard output result all the time, it is determined that the image file is generated completely and correctly.
[0041] If the actual output result is inconsistent with the standard output result, it is determined that the image file generation fails.
[0042] If the actual output result displayed in the log output module is inconsistent with the standard output result during the image file generation process, the image file generation fails, and the log output module can display prompt information and an exit code of the generation failure, and of course, the image failure reason can also be given.
[0043] The method can determine configuration components and parameter information in a graphical interface, determine a configuration file in a structured format according to the configuration components and the parameter information, and perform image generation based on the configuration file, which can improve traceability while ensuring consistency of the image file, and in the process of image generation based on the configuration file, the standard output result and the actual output result of the configuration components are displayed in real time in the first target area, and in the case that the actual output result of each group is consistent with the standard output result, it is determined that the image file generation is completed; if the actual output result is inconsistent with the standard output result, it is determined that the image file generation fails, and the visualization degree during image generation is improved.
[0044] In one specific embodiment, the work flow of the component configuration module, the image generation module, the log output module and the user interface module is simply described.
[0045] In the component configuration module, first, the user can click the font button in the Qt graphical interface to configure the font of the target file system, and after selection, the selected font can be previewed in the font configuration window, second, click the graphics card button to configure the target graphics card, select the corresponding graphics card, and then click the window button to select whether the generated image supports single-window mode or multi-window mode, and finally, click the add button to select the configuration components in the target directory through the pop-up file system window.
[0046] In the image generation module, after the completion of the component configuration module, click the verification button, and the corresponding exception information will be output in the application output window below, if there is no exception, click the XML button, and the information such as graphics card, font, window mode, name, package name, description and dependency tree structure of each application component will be written into the XML file, and the xml write success information will be output in the application output window, and finally, click the generate image button to package the information contained in the XML file and the components to generate the image file required by the user.
[0047] In the log output module, three log output windows can be included in the tool window, which are respectively a component and application information window, a dependent package list window, and an application program output window. The component and application information window is used to output the version of the added component application and the application description information. The dependent package list window is used to obtain metadata such as a dependent directory and a dependent list by scanning a configuration file of the selected component, parse the text dependent description into a parent-child hierarchical relationship, generate a dependency tree and display it in the interface, and support multi-level node presentation. The hierarchical dependency is converted into a de-duplicated linear list as a standard input set for subsequent verification and copying. The application program output window is used to output abnormal information such as missing dependencies and copying failures of the added component after the verification button is clicked. Clicking the XML button displays information such as whether the XML file is normally written. Clicking the image generation button outputs the information of the packaging tool during image building.
[0048] The user interface module is responsible for providing a comprehensive user operation experience. The graphical configuration interface can provide a user-friendly configuration interface, and output the information of the corresponding component when adding the component, so that the user can get the first-time feedback. The user interface module can support real-time preview function, for example, the user can preview the selected font in the configuration interface.
[0049] In the embodiment, Qt graphical interface is adopted, and configuration component list selection, dependency analysis and visualization, target dependency file verification, conflict de-duplication, image building and configuration file export are integrated into the same process, which significantly reduces the complexity and human error rate of script-based operation. Secondly, the text dependent description of the target dependency file is parsed into a parent-child hierarchical relationship, and a dependency tree structure is generated according to the parent-child hierarchical relationship. The system can perform item-by-item existence verification on the dependency tree structure before image file building, and highlight the missing items in the log to realize problem pre-movement and rapid positioning, thereby improving the one-time building success rate. The scheme adopts temporary space for conflict de-duplication to form a clean and traceable image input set, and real-time echoes the standard output result and the actual output result in the image building stage, which can record the completion status and exit code, so that the packaging process is transparent, auditable and convenient for review. At the same time, the configuration file is exported in XML structure, the deployment end can restore the running environment according to the configuration file, ensures the consistency and reproducibility of delivery, and the font preview, single / multi-window mode visualization setting further improves the accuracy and adaptability of human-computer configuration. In addition, the operation experience, delivery consistency, traceability and maintenance efficiency are significantly optimized as a whole.
[0050] Based on the same technical concept, the second embodiment of the present application provides a file system image generation device, as shown in Figure 2 , the device comprises: The acquisition module 201 is configured to acquire the configuration component and the parameter information of the configuration component determined in the graphical interface. The first determining module 202 is configured to determine a configuration file in a structured format according to the configuration component and the parameter information; wherein the configuration file comprises a dependency tree structure of the configuration component; The output module 203 is configured to display a standard output result and an actual output result of the configuration component in real time in a first target area in a process of generating a mirror image based on the configuration file; wherein the standard output result is a theoretical result of the configuration component determined based on the dependency tree structure, and the actual output result is a result actually generated based on the configuration component; The second determining module 204 is configured to determine that the generation of the mirror image file is completed when the actual output result of each group is consistent with the standard output result. The third determining module 205 is configured to determine that the generation of the mirror image file fails if the actual output result is not consistent with the standard output result.
[0051] The device can determine the configuration component and the parameter information in a graphical interface, determine a configuration file in a structured format according to the configuration component and the parameter information, and generate a mirror image based on the configuration file, which can ensure the consistency of the mirror image file and improve traceability. In addition, the device displays the standard output result and the actual output result of the configuration component in real time in a first target area in a process of generating a mirror image based on the configuration file, determines that the generation of the mirror image file is completed when the actual output result of each group is consistent with the standard output result, and determines that the generation of the mirror image file fails if the actual output result is not consistent with the standard output result, thereby improving the visualization degree during the generation of the mirror image.
[0052] As shown in Figure 3 The electronic device provided by the embodiment of the present application comprises a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112 and the memory 113 complete mutual communication through the communication bus 114, The memory 113 is configured to store a computer program. In an embodiment of the present application, the processor 111 is configured to execute the program stored in the memory 113, and implement the file system mirror image generation method provided by any one of the preceding method embodiments.
[0053] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0054] The communication interface is used for communication between the terminal and other devices.
[0055] The memory can include a Random Access Memory (RAM) and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0056] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0057] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the file system mirror generation method provided by any one of the foregoing method embodiments.
[0058] The apparatus embodiments described above are only schematic, wherein the units shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place or distributed on a plurality of network units. According to actual needs, some or all of the modules can be selected to achieve the purpose of the embodiment.
[0059] Those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course can be implemented by hardware. Based on such an understanding, the technical solutions described above essentially or in other words make contributions to the related art, and can be embodied in a software product form, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, or an optical disk, and includes a plurality of instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0060] It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises", "comprising", "includes", "including" and "has" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order in which they are described, unless specifically identified as an order dependent step. It is also to be understood that additional or alternative steps can be employed.
[0061] It should be understood that the specific embodiments described herein merely exemplify the application and should not be construed to limit the scope of the application. In the description, the suffixes "module", "part" or "unit" used for components are merely intended for facilitating description of the present application, and are not intended to limit the application itself. Therefore, "module", "part" or "unit" can be mixedly used.
[0062] The above descriptions are merely specific embodiments of the present application, making those skilled in the art understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Accordingly, the present application will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating a file system image, characterized in that, The method includes: Obtain the configuration components and parameter information of the configuration components as determined in the graphical interface; A structured configuration file is determined based on the configuration components and the parameter information; wherein the configuration file contains the dependency tree structure of the configuration components; During the image generation process based on the configuration file, the standard output result and the actual output result of the configuration component are displayed in real time in the first target area; wherein, the standard output result is the theoretical result of the configuration component determined based on the dependency tree structure, and the actual output result is the result actually generated based on the configuration component; If the actual output of each group is consistent with the standard output, the image file generation is considered complete. If the actual output result is inconsistent with the standard output result, the image file generation is determined to have failed.
2. The method according to claim 1, characterized in that, Obtain the configuration components determined in the graphical interface and the parameter information of the configuration components, including: Determine the target dependent files of the target file system; wherein, the target file system is a system restored based on the image file; Obtain the configuration components of the target file system configured in the graphical interface; wherein the configuration components include at least one of the following: graphics card, font, rendering window, and driver components; The parameter information of the graphics card is determined based on its model number; Obtain the rendering mode corresponding to the rendering window, and use the rendering mode as the parameter information of the rendering window.
3. The method according to claim 2, characterized in that, The structured configuration file is determined based on the configuration components and the parameter information, including: Generate a dependency tree structure based on the dependency relationships of the target dependency files; The target dependency file, the configuration component, and the parameter information are used to generate a structured configuration file according to the dependency tree structure.
4. The method according to claim 2, characterized in that, In the process of obtaining the configuration components of the target file system configured in the graphical interface, the method further includes: When selecting a configuration component, the parameter information of the configuration component is displayed in real time in the second target area to preview the parameter information.
5. The method according to claim 2, characterized in that, Before generating the image based on the configuration file, the method further includes: The existence of each target dependency file is verified according to the dependency tree structure. If the existence check result of the target item is missing, the target item will be treated as a missing item and highlighted in the first target area; If all existence checks are normal, the target dependency file is stored in temporary space.
6. The method according to claim 5, characterized in that, After storing the target dependency file to a temporary space, the method further includes: The target dependency files are conflict-removed and deduplicated in the temporary space, and a mirror file is generated from the processed target dependency files based on the configuration file.
7. The method according to claim 1, characterized in that, The configuration file is an Extensible Markup Language (XML) file. Image generation is performed based on this configuration file, including: The image files are generated by sequentially packaging according to the dependency tree structure described in the Extensible Markup Language (XML) file.
8. A file system image generation device, characterized in that, The device includes: The acquisition module is used to acquire the configuration components determined in the graphical interface and the parameter information of the configuration components; The first determining module is used to determine a structured configuration file based on the configuration component and the parameter information; wherein the configuration file contains the dependency tree structure of the configuration component; The output module is used to display the standard output result and the actual output result of the configuration component in real time in the first target area during the image generation process based on the configuration file; wherein, the standard output result is the theoretical result of the configuration component determined based on the dependency tree structure, and the actual output result is the result actually generated based on the configuration component; The second determining module is used to determine that the image file generation is complete when the actual output result of each group is consistent with the standard output result. The third determining module is used to determine that the image file generation failed if the actual output result is inconsistent with the standard output result.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the file system image generation method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the file system image generation method as described in any one of claims 1-7.