Mirror image file configuration method and apparatus, and electronic device
By acquiring user configuration requirements, identifying target components, and performing multi-dimensional analysis, customized image files are generated. This solves the problems of high technical barriers and high costs in the process of customizing operating system image files, and achieves efficient and low-cost customized image building and deployment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, the customization process of operating system image files has high technical barriers and high costs, making it difficult for customers to accept. Furthermore, not customizing the files will increase learning and implementation costs.
By acquiring user configuration requirements, identifying target components and their information, and using a software configuration availability lookup table for multi-dimensional analysis, we determine the tasks that need customization, perform configuration customization, and generate customized image files. This includes testing and generating unique identifiers to ensure the integrity and reliability of the image files.
It enables a streamlined process for building customized image files, reducing technical barriers and customization costs, improving build efficiency, ensuring image quality, reducing operation and maintenance costs and risks, and meeting users' personalized needs.
Smart Images

Figure CN121349480B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of operating system technology, and more specifically to methods, apparatus, and electronic devices for configuring image files. Background Technology
[0002] Based on users' configuration and customization needs for Linux operating system ISO images, such as requirements for pre-installing specific business software, security hardening according to industry-wide compliance requirements, and integration of third-party security components, operating system vendors integrate the determination, escaping, customization, and automated installation of configuration requirements into the operating system ISO installation image according to the business customization needs of different industries. This allows users to complete the installation simply by distributing the image to each node in the current cluster deployment scenario, and all components come from the ISO image, eliminating the need to deploy software image sources or connect to the external network, making the deployment scenario more flexible.
[0003] Currently, in terms of configuration customization, the operations and maintenance team typically understands the business needs in advance and specifies the implementation plan and scheme. If the components and configurations to be deployed have requirements for operating system module customization or specific drivers, it is necessary to interact with the operating system vendor to determine feasible solutions, test them in a single-node environment, and then implement them according to the same customization process.
[0004] However, current operating system images released by various vendors are often large, comprehensive general-purpose operating system images and corresponding repositories. Customized systems typically involve developers creating a customized operating system for the client. This approach has a high technical threshold for developers and treats the customization of components as a product development activity, resulting in high costs that are unacceptable to clients. On the other hand, without customization, clients face increased learning and implementation costs when using the operating system. Thus, the customization of operating system image files is caught in a dilemma. Summary of the Invention
[0005] This invention provides a method, apparatus, and electronic device for configuring image files to solve the problems of high technical barriers and high costs associated with customized image files.
[0006] In a first aspect, the present invention provides a method for configuring an image file, the method comprising: obtaining configuration requirements; determining the business scenario and system environment based on the configuration requirements, and identifying at least one target component and component information corresponding to the target component, wherein the component information includes at least one of the following: configuration version, configuration file name, configuration parameters, and target parameter values of the configuration parameters; performing software support analysis, configuration compatibility analysis, and configuration feasibility analysis on the target component based on the component information and a pre-determined software configuration availability lookup table, and determining the tasks requiring customization, wherein the software configuration availability lookup table includes configuration component information, configuration compatible component information, and configuration escapable component information; performing configuration customization processing according to the tasks requiring customization to obtain configuration content; and generating a customized image file based on the configuration content.
[0007] The image file configuration method provided by this invention determines at least one target component and its corresponding component information based on the user's configuration requirements. It then performs multi-dimensional configuration analysis on the target component based on a pre-determined software configuration availability lookup table to obtain the customization tasks. Configuration customization processing is then performed based on these tasks to obtain the configuration settings. Finally, a customized image file is generated based on the configuration content. This application, through analysis and customization based on user configuration requirements, enables a streamlined process for building customized images, quickly constructing customized image files that meet individual needs, reducing manual operations, improving construction efficiency, lowering technical barriers and customization costs, and satisfying users' customization requirements.
[0008] In one optional implementation, before generating a customized image file based on the configuration content, the method further includes: performing a configuration customization test based on the configuration content; if the test passes, generating a customized image file based on the configuration content; otherwise, returning to the step of performing configuration customization processing based on the task to be customized to obtain the configuration content.
[0009] This invention enables the early detection of installation anomalies and component malfunctions by performing configuration customization tests on the configuration content. This avoids hidden problems caused by direct delivery after customization, ensures image quality, reduces post-deployment operation and maintenance costs and risks for customers, and improves customer satisfaction.
[0010] In one optional implementation, the customization tasks include: customizable components, component information requiring adjustment, and / or customizable configuration methods. Based on the component information and a pre-determined software configuration availability lookup table, software support analysis, configuration compatibility analysis, and configuration feasibility analysis are performed on the target components to determine the customization tasks. This includes: performing software support analysis based on the configuration version to determine whether each target component is included in the current system software repository; if not, the target component is identified as a component requiring customization; if included, software compatibility analysis and parameter compatibility analysis are performed on the target component based on the component information and the configuration compatibility analysis results to determine the component information requiring adjustment; and performing configuration feasibility analysis on the target component to determine whether the target component's business system, data processing, data transmission, and deployment are feasible, and determining the customizable configuration method based on the configuration feasibility analysis results.
[0011] This invention, through a step-by-step analysis logic that determines whether the warehouse contains components and performs compatibility and feasibility analysis on component information, can accurately locate key issues in customization requirements, transform vague user needs into clear customization tasks, avoid omissions or misjudgments when manually analyzing requirements, and improve the completeness and accuracy of configuration analysis.
[0012] In one optional implementation, based on a software configuration availability lookup table, software compatibility analysis and parameter compatibility analysis are performed on the target component according to component information. The component information requiring adjustment is determined based on the configuration compatibility analysis results. This includes: querying the configuration component information in the software configuration availability lookup table to see if a configuration file name exists; if a configuration file name exists, the software configuration is deemed compatible; if no configuration file name exists, a search is conducted in a pre-defined component replacement table to see if a preset replacement software exists; if a preset replacement software exists, the software configuration is deemed compatible; if the software configuration is deemed compatible, the configuration is adjusted according to the configuration file name or the preset replacement software. The system checks if a configuration parameter exists in the availability lookup table. If the parameter exists, it is determined that the parameter configuration is compatible. If it does not exist, the system checks if a preset compatible old version field exists in the configuration compatible component information of the software configuration availability lookup table. If a preset compatible old version field exists, the parameter configuration is determined to be compatible. If it does not exist, the system checks if an escapable identifier exists in the configuration escapable component information of the software configuration availability lookup table. If an escapable identifier exists, the parameter configuration is determined to be incompatible but escapable. The configuration parameter is then used as the component information that needs to be adjusted, and the corresponding escaping function index is determined in the software configuration availability lookup table.
[0013] This invention determines whether the current configuration system can directly support the user's customization needs by step-by-step querying a software configuration availability lookup table to see if it contains the configuration parameters required by the customer. This includes determining whether the corresponding configuration parameters are directly included or whether the system contains fields compatible with older versions. Based on a pre-built software configuration availability lookup table, this invention minimizes unfounded customization development and improves the customization process.
[0014] In some optional implementations, a configuration feasibility analysis is performed on the target components to determine whether the business system, data processing, data transmission, and deployment of the target components are feasible. Based on the configuration feasibility analysis results, the required customized configuration method is determined, including: sorting the startup order of each target component based on the runtime dependencies of each target component to obtain an initial startup order; obtaining the business configuration acquisition order and adjusting the initial startup order according to the business configuration acquisition order to obtain an adjusted startup order; performing business system feasibility analysis, data processing feasibility analysis, data transmission feasibility analysis, and deployment feasibility analysis based on the adjusted startup order to obtain dynamic configuration information, and determining the required customized configuration method based on the dynamic configuration information.
[0015] This invention, through feasibility analysis, can comprehensively verify the feasibility of the configuration scheme, verifying the adaptability of the business side, the effectiveness of the data side, and the rationality of the deployment side. It accurately identifies configuration information that needs to be dynamically generated, such as multi-node deployment and network initialization, to avoid the inability of the configured image to run properly due to omissions in a single dimension.
[0016] In one optional implementation, the configuration content includes: customized components, customized component information, and / or customized executable scripts. Configuration customization is performed according to the task requiring customization to obtain the configuration content, including: customizing the software based on the required customized components to obtain customized components, and placing the customized components in a customized component repository; calling the corresponding escape function based on the escape function index corresponding to the component information to be adjusted, and adjusting the configuration parameters to compatible parameter information based on the escape function to obtain customized component information; generating a customized executable script corresponding to the required customized configuration method based on the dynamic configuration information, and using the customized executable script to execute in the customer environment to obtain actual parameter values and supplement the configuration.
[0017] This invention, by customizing components, component information, and configuration methods, can ensure the integrity, compatibility, and feasibility of customized image components, improve customization efficiency and configuration accuracy, and meet users' personalized installation needs for operating systems, business software, and security components.
[0018] In one optional implementation, the configuration content further includes: general components, general component information and / or general executable scripts. The configuration customization test based on the configuration content includes: building a test environment according to the configuration content, installing components based on the test environment, and executing the configuration test script to test the components after the installation is completed. If there are no abnormalities during the installation process and no abnormalities in the component test, the test is deemed to have passed; otherwise, the test is deemed to have failed.
[0019] This invention simulates actual deployment scenarios by setting up a test environment for component installation and testing, and can resolve potential problems that may occur during actual deployment in advance, thereby preventing unqualified images from entering the customer's environment and reducing deployment failures and after-sales costs on the customer side.
[0020] In one optional implementation, generating a customized image file based on the configuration content includes: classifying the configuration content to obtain a configuration distribution list; obtaining user information and generating a unique identifier and authorization key based on the user information; modifying the bootloader based on the configuration content; and generating a customized image file based on the configuration distribution list, the current system software repository, the customized component repository, the unique identifier, the authorization key, and the bootloader.
[0021] This invention generates images by classifying and configuring content, generating unique identifiers and keys, modifying the bootloader, and merging repositories. This ensures the integrity and reliability of the image files and guarantees that customized logic can be automatically executed during image installation. Users can automatically install components based on customized image files, which not only ensures security but also allows them to view configuration information, reducing the difficulty of troubleshooting during subsequent maintenance.
[0022] Secondly, the present invention provides a configuration device for an image file, the device comprising: a requirement acquisition module for acquiring configuration requirements; a component identification module for determining the business scenario and system environment based on the configuration requirements, and identifying at least one target component and the component information corresponding to the target component, wherein the component information includes at least one of configuration version, configuration file name, configuration parameters, and target parameter values of the configuration parameters; a configuration analysis module for performing software support analysis, configuration compatibility analysis, and configuration feasibility analysis on the target component based on the component information and a pre-determined software configuration availability lookup table, and determining the tasks requiring customization, wherein the software configuration availability lookup table includes configuration component information, configuration compatible component information, and configuration escapable component information; a configuration customization module for performing configuration customization processing according to the tasks requiring customization to obtain configuration content; and an image generation module for generating a customized image file based on the configuration content.
[0023] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the configuration method of the image file of the first aspect or any corresponding embodiment described above.
[0024] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the configuration method of the image file of the first aspect or any corresponding embodiment thereof.
[0025] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the configuration method of the image file of the first aspect or any corresponding embodiment described above. Attached Figure Description
[0026] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of an application scenario according to an embodiment of the present invention;
[0028] Figure 2 This is a schematic diagram of the first process of configuring an image file according to an embodiment of the present invention;
[0029] Figure 3 This is a schematic diagram illustrating the specific process of configuring an image file according to an embodiment of the present invention;
[0030] Figure 4 This is a schematic diagram of the second process of configuring an image file according to an embodiment of the present invention;
[0031] Figure 5 This is a schematic diagram illustrating the specific process of compatibility analysis for the configuration method of image files according to an embodiment of the present invention;
[0032] Figure 6 This is a schematic diagram of the third process of configuring an image file according to an embodiment of the present invention;
[0033] Figure 7 This is a structural block diagram of an image file configuration device according to an embodiment of the present invention;
[0034] Figure 8This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0037] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0038] As an optional application scenario of this invention, such as Figure 1 As shown, application 101 is installed in terminal device 110, and user 130 can interact with application 101 through terminal device 110 and / or access device of terminal device 110.
[0039] For example, application 101 can be any application that provides question-and-answer related services. For instance, application 101 could be a question-and-answer interactive application, such as a text-to-text application, an image-to-text application, etc. Figure 1 In the application scenario shown, if application 101 is active, the terminal device 110 can display the interface 102 of application 101. The interface 102 may include various pages that application 101 can provide, such as interactive pages, settings pages, query pages, etc.
[0040] In some embodiments, terminal device 110 is communicatively connected to server 120 to provide services to application 101. Terminal device 110 may be a mobile terminal, fixed terminal, or portable terminal, etc., including but not limited to mobile phones, desktop computers, laptop computers, multimedia tablets, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, terminal device 110 may also support any type of interface, and server 120 may be various types of computing systems or servers capable of providing computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, etc.
[0041] It should be noted that, Figure 1 This is merely an example of an application scenario and does not limit the scope of protection of this invention.
[0042] The embodiments of the present invention will now be described with reference to the accompanying drawings. It should be understood that the pages shown in the drawings are merely examples, and various page designs are possible in practice. The various graphic elements on the page may have different arrangements and different visual representations; one or more elements may be omitted or replaced, and one or more other elements may also be present, without any limitation in the embodiments of the present invention. Furthermore, the embodiments described below primarily pertain to terminal device 110. It should be understood that the actions described relative to terminal device 110 can be performed by application 101 on terminal device 110, or can be performed by application 101 in conjunction with its server (e.g., server 120).
[0043] Based on users' needs for configuring and customizing Linux operating system ISO images, for example, some large enterprises need to pre-deploy multiple business software programs they specify and, in accordance with industry-related information security level requirements, need to harden the operating system and deploy third-party security components. Typically, enterprises purchase the operating system, operation and maintenance services, and specific security products separately. These three parties face numerous unresolved issues regarding component adaptation, operation and maintenance, and unified management, resulting in significant investment costs. Especially in today's scenarios with widespread cloud service applications, the rapid deployment and release of multiple nodes in a cluster environment places even higher demands on the efficiency of deployment and operation and maintenance of the runtime environment.
[0044] Therefore, operating system vendors integrate the determination, escaping, customization, and automated filling of configuration requirements into the operating system ISO installation image according to the business customization needs of different industries. This allows users to complete the installation simply by distributing the image to each node in the current cluster deployment scenario. Moreover, all components come from the ISO image, eliminating the need to deploy software image sources or connect to the external network, making the deployment scenario requirements more flexible.
[0045] Regarding configuration customization, the operations team typically understands the customer's business needs in advance and specifies implementation schemes and plans. During implementation, an NFS file server or local image repository is usually set up, the components to be deployed are prepared in advance, and an automated deployment program is written to complete batch deployment tasks. If the components and configurations to be deployed have requirements for operating system module customization or specific drivers, it is necessary to interact with the operating system vendor to determine feasible solutions, test them in a single-node environment, and then implement them according to the customization process described above.
[0046] In cluster scenarios based on virtual technology (such as cloud environments), a virtual template can be exported after customizing a single environment. This template can be a virtual machine image file or a container image for batch scheduling by the virtual engine.
[0047] However, in industrial scenarios, most industrial control computers are deployed directly to small industrial control computer boxes. In this case, everything from hardware, system installation, business customization, testing, and delivery is completed at one node. Therefore, completing all software-level customization within the ISO and distributing it to the designated hardware device is an optimization direction.
[0048] Currently, the operating system images released by various manufacturers are often large and comprehensive general operating images and corresponding repositories. For customized systems, R&D personnel often issue R&D tasks based on the customization requirements collected in advance by the management department, manually analyze or use analysis software to check software dependencies, determine the list of software to be installed, and finally prepare the customized operating system for the customer.
[0049] This approach places a high technical barrier on R&D personnel, treating the customization of components as a product development activity, resulting in high costs that are unacceptable to customers. However, without customization, customers face increased learning and implementation costs when using the operating system. Thus, the customization of operating system image files presents a dilemma.
[0050] Furthermore, the current industry landscape is as follows: if system vendors only deliver the system platform to users, regardless of the customized version, and then leave the middleware, business software, etc., to the users themselves, this delivery method falls under IaaS (Infrastructure as a Service), which is within the current delivery scope of operating system vendors. However, customers, especially those who want to directly use pre-configured business software to execute their business functions, require PaaS (Platform as a Service) or even SaaS (Software as a Service).
[0051] The latter two fall under the business scope of cloud service providers mentioned earlier. After receiving the operating system image released by the operating system vendor, cloud service providers build their own business software (such as databases, project management platforms, business service software, etc.) and then deliver the online user interface or deployed product machines to customers. This delivery model exceeds the scope of traditional operating system vendors, or operating system vendors may, based on factors such as investment costs and focus, respect industry specialization and delegate this business scope to business system suppliers. This invention provides a method for configuring image files, starting from the operating system vendor, to reduce manual operations, lower technical barriers, and reduce customization costs by constructing an image customization process.
[0052] According to an embodiment of the present invention, a method for configuring an image file is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0053] This embodiment provides a method for configuring an image file, which can be used in the aforementioned terminal devices, such as computers. Figure 2 This is a flowchart of a method for configuring an image file according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0054] Step S201: Obtain configuration requirements.
[0055] Specifically, in this embodiment of the invention, a structured table template is pre-designed based on users' frequently customized needs and industry compliance requirements. The core design concept is to cover key configurations for Linux installation and the entire subsequent customization process, mainly including three modules: a basic information area, a core configuration area, and an extended requirements area. Staff obtain the customer's configuration requirements and fill them into the table template according to a preset format. The terminal device obtains the completed table template and identifies the recorded configuration requirements.
[0056] In some optional implementations, the encryption of the three-user privileges and the bootloader user during installation is a mandatory field in the core configuration area. The three-user privileges are core accounts designed to meet the security principles of minimum permissions and separation of responsibilities during the Linux operating system installation phase, including: the system administrator account, the security administrator account, and the audit administrator account. The Linux bootloader is a critical component of system startup; encryption configuration prevents unauthorized users from bypassing account passwords by modifying boot parameters. For example, the table template offers options for overall GRUB menu encryption and specific boot item encryption. Users can choose the former for comprehensive protection and the latter, selecting the boot items to be encrypted, if only normal boot items need protection. Furthermore, encryption methods and algorithms can be selected.
[0057] Step S202: Determine the business scenario and system environment based on configuration requirements, and identify at least one target component and the component information corresponding to the target component. The component information includes at least one of the following: configuration version, configuration file name, configuration parameters, and target parameter values of the configuration parameters.
[0058] Specifically, in embodiments of the present invention, such as Figure 3 As shown, configuration target analysis is performed based on the configuration requirements filled in the table template to determine multiple target components that the customer needs to install on the operating system. For example, if the configuration requirement is to pre-install industrial business software, meet the Level 3 security hardening requirement, or GRUB boot encryption, then the requirement is mapped to an entity target component that can be installed on the operating system, and the component information corresponding to the target component is extracted, including: configuration version, configuration file name, configuration parameters, and target parameter values of the configuration parameters.
[0059] Taking pre-installed industrial business software as an example, industrial manufacturing enterprises need to install dedicated business software that supports data acquisition from industrial control equipment. The software must be compatible with the current Linux system version, and the default configuration must meet the requirements of the production data acquisition frequency. Therefore, the identified target component is the industrial data acquisition business software, with a configuration version of V2.0 and a configuration file name of / etc / industrial-collect.conf (the core configuration file of the business software). The configuration parameters include the data acquisition frequency, data storage path, and common device communication port. The corresponding acquisition frequency is 5 minutes / time, the storage path is / data / industrial-collect, and the communication port is 502. This is only an example and is not a limitation.
[0060] Step S203: Based on the component information and a pre-determined software configuration availability lookup table, perform software support analysis, configuration compatibility analysis, and configuration feasibility analysis on the target component to determine the tasks that need to be customized.
[0061] Specifically, in this embodiment of the invention, taking a large enterprise as an example, it is typically necessary to deploy multiple business software, third-party security components, or system hardening configuration modules based on the operating system. Therefore, before customizing the image file, it is first necessary to determine the target components to be installed based on the configuration requirements. There should be at least one target component, and usually multiple, which is not limited here. After determining the target components to be installed, a multi-dimensional configuration analysis is performed on each target component, including software support analysis, configuration compatibility analysis, and configuration feasibility analysis, to determine whether an image file can be built based on the components contained in the current system software repository and the customer's configuration requirements. If not, a customization task is generated, which includes the components to be customized, the component information to be adjusted, and / or the configuration method to be customized.
[0062] In some alternative implementations, to minimize unfounded custom development, cloud service providers pre-create software configuration availability lookup tables based on extensive customer needs and information about the software included in their custom systems. These tables record the configuration information of various components, information on directly identifiable components compatible with older versions, and information on escaped components that are not directly identifiable but can be escaped. During configuration compatibility analysis, the system matches the component information corresponding to the customer's configuration requirements with the software configuration availability lookup table to determine compatibility.
[0063] Step S204: Perform configuration customization processing according to the task to be customized to obtain the configuration content.
[0064] Specifically, in this embodiment of the invention, if the current system software repository does not contain the target component, such as dedicated business software that large enterprises need to pre-install or a specific version of a third-party security component, then the component to be customized needs to be generated based on the pre-built software customization module and added to the current system software repository. If the component information of the existing target component is incompatible with the customer's configuration requirements, such as multiple component configuration priority conflicts or version changes causing invalid configurations, then the component information needs to be adjusted. If the configuration needs to be implemented through dynamic scripts, such as multi-node network parameters or dynamic permission allocation in a cluster environment, then an executable script needs to be customized to ensure that the configuration takes effect. Therefore, the customized tasks within the customized tasks can be targeted through configuration customization processing to obtain customized configuration content: customized components, customized component information, and / or customized executable scripts.
[0065] Furthermore, for tasks that do not require customization, general configuration content is generated directly based on the current system software repository and the customer's basic configuration requirements, including: general components, general component information, and / or general executable scripts.
[0066] Step S205: Generate a customized image file based on the configuration content.
[0067] Specifically, in this embodiment of the invention, after determining the customized configuration content and the general configuration content, preliminary operations for image file creation can be performed based on the configuration content, including: configuration classification, repository merging, bootloader modification, etc., to provide a complete resource package for building. Further, the configuration content directory is integrated, the ISO build dependency environment is prepared, and commonly used ISO build tools for Linux systems are used to execute build commands to generate the final customized ISO image file. After generating the customized ISO image file, verification operations can be performed, including integrity verification and functional verification, to ensure that the image can be used normally.
[0068] In some optional implementations, after obtaining the customized image file, the customer must first verify the integrity and authorization validity of the image to avoid using tampered or unauthorized files; then, they can construct an actual deployment scenario, including physical devices or virtualized environments. After the physical device or virtualized environment boots up, it automatically enters the image boot interface. The customized image has integrated automated installation logic, requiring no manual operation after the device boots. It can automatically complete disk partitioning, install basic system components and customized business software from the image's built-in repository, and automatically execute initialization scripts after installation to perform operations such as modifying system configurations, starting business services, and dynamic configuration, thereby completing the deployment of the operating system and corresponding components.
[0069] The image file configuration method provided by this invention determines at least one target component based on the user's configuration requirements, performs multi-dimensional configuration analysis on the target component to obtain the customization tasks, performs configuration customization processing based on the customization tasks to obtain the configuration settings, and generates a customized image file based on the configuration content. This application, by analyzing and customizing based on user configuration requirements, can streamline the customized image building process, quickly build customized image files that meet individual needs, control costs during the customization process, and consider the scalability of different upper-layer software. This enables a product model that provides customers with truly out-of-the-box business solutions, reduces manual operations, improves building efficiency, lowers technical barriers and customization costs, meets users' customization needs, and thus further captures the customer market.
[0070] This embodiment provides a method for configuring an image file, which can be used in the aforementioned terminal devices, such as computers. Figure 4 This is a flowchart of a method for configuring an image file according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps:
[0071] Step S401: Obtain configuration requirements. For details, please refer to [link / reference]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.
[0072] Step S402: Determine the business scenario and system environment based on configuration requirements, and identify at least one target component and its corresponding component information. The component information includes at least one of the following: configuration version, configuration file name, configuration parameters, and target parameter values for the configuration parameters. For details, please refer to [link to relevant documentation]. Figure 2 Step S202 of the illustrated embodiment will not be described again here.
[0073] Step S403: Based on the component information and a pre-determined software configuration availability lookup table, perform software support analysis, configuration compatibility analysis, and configuration feasibility analysis on the target component to determine the tasks that need to be customized. The software configuration availability lookup table includes configuration component information, configuration compatible component information, and configuration escapable component information.
[0074] Specifically, step S403 includes:
[0075] Step S4031: Perform software support analysis based on the configuration version to determine whether the current system software repository contains each target component. If not, identify the target component as a component that needs to be customized.
[0076] Specifically, in this embodiment of the invention, after determining each target component and its corresponding component information, a software support analysis is first performed. That is, based on the configuration version of the target component, it is determined whether the current system software repository contains the target component. If it does, the component in the current system software repository can be directly called for installation. If it does not, it proves that the target component needs to be customized based on user needs. Therefore, the target component that is not included is regarded as a component that needs to be customized, and the component that needs to be customized is included in the customization task.
[0077] Step S4032, if included, then based on the software configuration availability lookup table, perform software compatibility analysis and parameter compatibility analysis on the target component according to the component information, and determine the component information that needs to be adjusted based on the configuration compatibility analysis results.
[0078] Specifically, in this embodiment of the invention, after determining that the current system software repository contains the target component, it is also necessary to perform a configuration compatibility analysis based on the component information of the target component, that is, to analyze the configuration version, configuration file name, configuration parameters and corresponding target parameter values to determine whether the configuration requirements are compatible and effective in the target component.
[0079] In some optional implementations, step S4032 above includes:
[0080] Step a1: Check if a configuration file name exists in the configuration component information of the software configuration availability lookup table.
[0081] Step a2: If a configuration file name exists, the software configuration is deemed compatible. If no configuration file name exists, the system searches the pre-defined component replacement table for a pre-set replacement software. If a pre-set replacement software exists, the software configuration is deemed compatible.
[0082] Step a3: If the software configuration is determined to be compatible, then check the software configuration availability table to see if the configuration parameters exist, based on the configuration file name or the preset replacement software.
[0083] Step a4: If the configuration parameters exist, determine that the parameter configuration is compatible; if not, check in the Software Configuration Availability Lookup Table for the Configuration Compatible Components information to see if there is a preset compatible old version field that is the same as the configuration parameters.
[0084] Step a5: If a preset field for compatibility with older versions exists, the parameter configuration is determined to be compatible. If not, the system checks the configuration escapable component information in the software configuration availability lookup table to see if an escapable identifier exists.
[0085] Step a6: If it exists, it is determined that the parameter configuration is incompatible but can be escaped. Then, the configuration parameter is used as the component information that needs to be adjusted, and the escape function index corresponding to the component information that needs to be adjusted is determined in the software configuration availability lookup table.
[0086] Specifically, in this embodiment of the invention, the system vendor pre-sets a "Software Configuration Availability Comparison Table." This table records available configuration item information for software provided in the operating system software repository, including: configuration component information, configuration-compatible component information, and configuration-escapeable component information. The data for this "Software Configuration Availability Comparison Table" is sourced from the official manuals of the components. The "Software Configuration Availability Comparison Table" is shown in the table below:
[0087] Software Configuration Availability Comparison Table
[0088]
[0089] Among them, Index, Key_name, Rpm_name, Rpm_version, Repo_name, and Rpm_index correspond to the configuration component information, Compatibility and Compatible_fields correspond to the configuration compatibility component information, and Escapable_identifier, Escape_original, and Escape_function correspond to the configuration escapeable component information.
[0090] When comparing and analyzing the compatibility of configuration items, such as Figure 5As shown, firstly, the configuration file name from the determined component information is used as Rpm_name. Based on this, a search is performed in the "Software Configuration Availability Comparison Table" to determine if the configuration file name directly exists. If it exists, it proves that the current target component is directly included in the configuration system, the software configuration is compatible, and no additional customization is required. If it does not exist, it may be due to inconsistent software versions or the existence of other software of the same type. Therefore, a search is performed in the software library based on the component index Rpm_name corresponding to the configuration file name. If it exists, it proves that the software configuration is compatible. If the target component does not exist, a search is performed in the pre-defined component replacement table to determine if a preset replacement software exists. If a preset replacement software exists, the software configuration is still considered compatible.
[0091] Provided the software configuration is compatible, the configuration parameter is used as the Key_name, and a lookup is performed in the "Software Configuration Availability Comparison Table" based on this. If a match is found, the configuration item is considered available. If no match is found in the "Software Configuration Availability Comparison Table," the configuration parameter is used as the Compatibility parameter, and a lookup is performed in the same table. If a match is found, the configuration item has a field compatible with older versions, and the parameter configuration is deemed compatible. This means the user's required configuration parameter is an older version field, while the configuration system updates it to the newer version field, and the newer version can directly recognize the older version field.
[0092] If no compatible old version field exists, the system checks the escapable component information in the Software Configuration Availability Lookup Table for the existence of the escapable identifier `Escapable_identifier`. If it exists, it proves that although the configuration system does not contain the configuration parameter, it can be escaped into a new configuration field. This configuration item is identified as a component information that needs adjustment, and the corresponding escape function index `Escape_function` is determined. If no matching is found in the Software Configuration Availability Lookup Table, a "Risk Configuration" item will be marked in the analysis results, and the process will be handled manually.
[0093] Furthermore, during the analysis process, a detection script for the component configuration will be generated simultaneously. Its execution effect is to check whether the configuration item exists and whether the configuration value matches the customized content after the component starts, essentially determining whether the component configuration is compatible. If incompatibility arises due to issues such as multiple component configuration priorities or component version changes, the component information needs to be adjusted to match the target component's information in the current system software repository. Therefore, the incompatible component information is listed as the component information requiring adjustment and included in the customization tasks.
[0094] Step S4033: Perform a configuration feasibility analysis on the target component to determine whether the business system, data processing, data transmission, and deployment of the target component are feasible, and determine the required customized configuration method based on the configuration feasibility analysis results.
[0095] Specifically, in this embodiment of the invention, after resolving the compatibility issue between the target component and the configuration requirements, a feasibility analysis of the target component is also required to determine whether the configuration can take effect in the customer's environment and whether it meets industry requirements, including identifying the customer's specified business, as well as business-related services and configurations.
[0096] In some optional implementations, step S4033 above includes:
[0097] Step b1: Sort the startup order of each target component based on the runtime dependencies of each target component to obtain the initial startup order.
[0098] Step b2: Obtain the order in which the service configurations are acquired, and adjust the initial startup order according to the order in which the service configurations are acquired to obtain the adjusted startup order.
[0099] Step b3: Based on the adjusted startup sequence, conduct feasibility analysis of the business system, data processing, data transmission, and deployment to obtain the dynamic configuration information required, and determine the customized configuration method based on the dynamic configuration information required.
[0100] Specifically, in this embodiment of the invention, before the feasibility analysis, a list of all target components to be configured is first compiled, such as application service components, database components, middleware components, network components, etc., and the runtime dependency metadata of each component is extracted. The metadata sources include the component's configuration files (such as pom.xml, docker-compose.yml, service.yaml), official deployment documentation, and a list of interface calls between components. Then, the dependencies between components are identified: if the startup of component A requires the full readiness of component B's service, then A and B have a strong dependency, such as the business application component depending on the listening status of port 6379 of the Redis caching component; if component A can asynchronously wait for component B to become ready after startup, then A and B have a weak dependency, such as the log collection component depending on the log directory generation of the application component; if components A and B run independently and do not depend on other components, then A and B have no dependency, such as the basic monitoring component. Following the principles of prioritizing basic components, dependent components, and strong dependencies, target components are sorted using topological sorting algorithms: basic components without dependencies are selected and listed as the first priority for startup; core components that only depend on basic components are selected and listed as the second priority for startup; business application components are arranged in order of strong dependency and weak dependency level; and components with circular dependencies are handled through startup delay triggering rules.
[0101] Furthermore, priority rules for business configurations are extracted from customer configuration requirement documents and business process specifications. The core focus is on the logical order of configuration acquisition. For example, permission-related configurations (built-in account passwords, key files) must be acquired before business function configurations, and data access-related configurations (database accounts, storage paths) must be acquired before data processing configurations. While retaining these core rules regarding technical dependencies, the initial startup order is adapted and adjusted. Based on this adjusted startup order, a multi-dimensional feasibility analysis is conducted, as detailed below:
[0102] ① Regarding business systems, this includes service names, built-in account passwords, key files, login methods, and directly associated middleware versions.
[0103] ② In terms of data processing, this includes databases, data caching middleware such as Elasticsearch and Redis, data table initialization SQL files, accounts, ports, data storage locations, engine affiliation, and directly related middleware versions, etc.
[0104] ③ In terms of data transmission, this includes host network card initialization configuration, service address configuration, node master-slave configuration, etc.
[0105] ④ Deployment feasibility: This includes orchestrating service startup order based on service dependencies, service status detection, and data verification rules.
[0106] This invention, based on the customer's configuration requirements, filters out configuration parameters from the adjusted component information that cannot be predetermined during the ISO image file customization process. These include dynamic configuration parameters related to multiple nodes (cluster node IPs, number of nodes, inter-node communication ports), network-related parameters (customer LAN gateway, DNS address, network card binding mode), and hardware-related parameters (local disk partition paths, external industrial equipment communication parameters, etc.). It then determines whether these dynamic configuration parameters can be automatically obtained in the customer's environment or whether they meet industry regulations. For example, a user might require deploying an 8-node cluster with each node automatically added to management. The IPs of each node and the number of cluster nodes depend on the customer's actual hardware network cards and deployment scale, constituting a dynamic configuration requirement. If these dynamic configuration parameters cannot be automatically obtained or do not meet industry regulations, they are not feasible in actual deployment. Therefore, they are considered customizable configuration methods. Customizable configuration methods refer to specific operational methods that require script customization or manual collaboration to solve dynamic configuration implementation or industry compliance adaptation issues.
[0107] In some alternative implementations, such as Figure 3As shown, the configuration analysis process also includes configuration requirement analysis in addition to configuration target analysis, software support analysis, configuration compatibility analysis and configuration feasibility analysis. It mainly configures the system for specific industry requirements. For example, when customers require the operating system to meet the national information system security level protection requirements, or other industry-specified system hardening or customization requirements, customers do not need to specify the configuration content. Instead, a series of configurations for this requirement are used as extended configuration requirements for configuration analysis.
[0108] Step S404: Perform configuration customization processing according to the task to be customized to obtain the configuration content.
[0109] Specifically, step S404 includes:
[0110] Step S4041: Customize the software according to the required components to obtain the customized components, and put the customized components into the customized component repository.
[0111] Specifically, in this embodiment of the invention, the problem of missing identified components or only being able to use specified versions of components is addressed by a pre-built software customization module, which adds the customized components to the customized component repository and merges and integrates the customized component repository with the current system software repository when generating the customized image file.
[0112] Furthermore, the primary method for software customization is containerization. Because the configurations required by users are incompatible and are strongly related to business needs and cannot be avoided, the component is deployed in a container environment, a container is prepared, and it is deployed along with the operating system installation, and configured to interface with the data of the original components on the host machine.
[0113] Step S4042: Call the corresponding escape function according to the escape function index corresponding to the component information to be adjusted, and adjust the configuration parameters to compatible parameter information based on the escape function to obtain customized component information.
[0114] Specifically, in this embodiment of the invention, when component configurations are incompatible or ineffective, there are two processing methods for adjusting component information: information escaping or information retrieval. For information escaping, if a configuration item is not matched in the configuration compatibility analysis but can be matched by the component name to which the original field belongs, and an escapable or compatible field can be found, then by using "Compatible_fields" and "Configuration Field Name," the current user configuration item can be made compatible in the new version without modification. The verification logic for this configuration is based on the verification script corresponding to the new component configuration. For configuration items that are completely unmatched, b) by referring to "Escape_original" and "Transfer Function Index," the escaping logic for this configuration item is obtained, and the escaping logic is called in the workspace to record the new configuration entries that the original configuration can use in the new version component in the actually enabled configuration fields. Similarly, the verification logic for this configuration is based on the verification script corresponding to the new component configuration. For information retrieval, the configuration dynamic data processing module is called to obtain the data that needs to be temporarily obtained, thereby obtaining the customized component information.
[0115] Step S4043: Generate a customized executable script corresponding to the required configuration method based on the dynamic configuration information. The customized executable script is used to execute in the customer environment to obtain actual parameter values and supplement the configuration.
[0116] Specifically, in this embodiment of the invention, for the dynamic configuration information identified in the above configuration feasibility analysis, the source type of its configuration parameters is parsed, and the method of obtaining parameter values is retrieved. If a direct match can be found, an acquisition script and a configuration script are automatically generated; if no match can be found, a list of issues is created and presented to manual processing.
[0117] In addition, other industry-specific configurations are loaded from the database after identification. The source of this configuration is not the "Software Configuration Availability Comparison Table" prepared by the software in the operating system software repository, but rather data prepared in advance or accumulated later based on the business software mainly used by the customer. Because the components may not be added to the software repository of the standard operating system, they are divided into a separate "Industry Software Configuration Availability Comparison Table".
[0118] Furthermore, configuration scripts for system hardening, such as permission hardening, that need to be preset during system installation are merged together with customized component information and customized executable scripts to generate configuration build scripts that are integrated into the ISO installer and triggered during or after system installation.
[0119] Step S405: Generate a customized image file based on the configuration settings. For details, please refer to [link to relevant documentation]. Figure 2 Step S205 of the illustrated embodiment will not be described again here.
[0120] The image file configuration method provided by this invention determines at least one target component based on the user's configuration requirements, performs multi-dimensional configuration analysis on the target component to obtain the customization tasks, performs configuration customization processing based on the customization tasks to obtain the configuration settings, and generates a customized image file based on the configuration content. This application, by analyzing and customizing based on user configuration requirements, can streamline the customized image building process, quickly build customized image files that meet individual needs, reduce manual operations, improve building efficiency, lower technical barriers and customization costs, and satisfy users' customization needs.
[0121] This embodiment provides a method for configuring an image file, which can be used in the aforementioned terminal devices, such as computers. Figure 6 This is a flowchart of a method for configuring an image file according to an embodiment of the present invention, such as... Figure 6 As shown, the process includes the following steps:
[0122] Step S601: Obtain configuration requirements. For details, please refer to [link to relevant documentation]. Figure 4 Step S401 of the illustrated embodiment will not be described again here.
[0123] Step S602: Determine the business scenario and system environment based on configuration requirements, and identify at least one target component and its corresponding component information. The component information includes at least one of the following: configuration version, configuration file name, configuration parameters, and target parameter values for the configuration parameters. For details, please refer to [link to relevant documentation]. Figure 4 Step S402 of the illustrated embodiment will not be described again here.
[0124] Step S403: Based on the component information and a pre-determined software configuration availability lookup table, perform software support analysis, configuration compatibility analysis, and configuration feasibility analysis on the target component to determine the tasks requiring customization. The software configuration availability lookup table includes configuration component information, configuration-compatible component information, and configuration-escapeable component information. For details, please refer to... Figure 4 Step S403 of the illustrated embodiment will not be described again here.
[0125] Step S604: Perform configuration customization based on the required task to obtain the configuration content. For details, please refer to [link to relevant documentation]. Figure 4 Step S404 of the illustrated embodiment will not be described again here.
[0126] Step S605: Perform configuration customization test based on the configuration content. If the test passes, generate a customized image file based on the configuration content; otherwise, return to the step of performing configuration customization processing according to the required customization task to obtain the configuration content.
[0127] Specifically, in this embodiment of the invention, in order to ensure the accuracy and reliability of the final customized image file, such as Figure 3 As shown, after the configuration customization process is completed, configuration customization tests can be performed based on the obtained configuration content to determine whether the components can be successfully installed and whether the component tests pass.
[0128] In some optional implementations, step S605 above includes:
[0129] Step S6051: Build a test environment according to the configuration content, install components based on the test environment, and execute the configuration test script to test the components after the installation is completed.
[0130] Specifically, in this embodiment of the invention, after the processing phase is completed and the test cases and scripts are confirmed, the test environment is built, which consists of two core stages: customized system image preparation and test environment deployment. The customized system image preparation is divided into three layers: using a standard operating system image as the base (foundation layer), basic components are added to the virtual root directory (rootfs) of the target system; the second layer (business middleware layer) uses user system customized configurations, adding the middleware and system configurations required by the business to the virtual root directory of the target system; and the third layer (business configuration layer) uses business usage configurations, adding service startup configurations, initialization configurations, network configurations, data integration configurations, user tables, key files, etc., that need to be executed after installation to the virtual root directory of the target system. The test environment deployment process includes: deploying the prepared customized system image to a KVM virtual machine simulating the customer's real environment, including a standard ISO image, a customized component repository, customized configuration scripts, test cases, and expected results; and configuring the KVM host machine to ensure that the test requirements are met and to avoid resource shortages or environmental anomalies affecting the results. Based on the actual hardware specifications deployed by the customer (such as industrial control computers and servers), a matching virtual machine is created in KVM, the system installation process is executed in the KVM virtual engine, and logs are recorded.
[0131] Step S6052: If there are no abnormalities during the installation process and the component test is normal, the test is considered to have passed; otherwise, the test is considered to have failed.
[0132] Specifically, in this embodiment of the invention, after the installation process is completed, a configuration test script is executed and a test report is output. The test content includes: system component, version, and service operation status tests; user-customized component, configuration file content, service operation status, and service activation configuration tests; user business availability tests and account access availability tests. If the installation process is abnormally interrupted or an item fails the test, the process is rejected and returned to the configuration customization processing stage for manual handling. If the installation is normal and the component tests are error-free, the test is considered passed, and the process enters the configuration customization distribution stage, generating the final customized image file.
[0133] Step 606: Generate a customized image file based on the configuration content.
[0134] Specifically, step S606 includes:
[0135] Step S6061: Classify the configuration content to obtain a configuration distribution list.
[0136] Specifically, in this embodiment of the invention, the configuration content includes: customized components, customized component information, and customized executable scripts; it also includes general components, general component information, and general executable scripts. Based on the above configuration content, directories are categorized according to different types, and a configuration distribution list is generated. The list records information such as the name, version, path, and purpose of all resources, serving as both a resource index for subsequent image generation and a verification benchmark after image delivery.
[0137] Step S6062: Obtain user information and generate a unique identifier and authorization key based on the user information.
[0138] Specifically, in this embodiment of the invention, user information (such as company name and batch number) is the basis for generating a unique identifier (such as "XX Company-202511 Batch"), used to distinguish images from different customers / batches and avoid confusion; the authorization key (public key / private key pair) is used for the security verification of the image (to prevent unauthorized use or tampering). Together, they endow the image with traceability and security, which are the core attributes of customized images.
[0139] Step S6063: Modify the bootloader according to the configuration.
[0140] Specifically, in this embodiment of the invention, the customized executable scripts and general executable scripts in the configuration content, as well as the initialization strategy after the first installation, need to be loaded through the bootloader configuration. The core of modifying the bootloader is to specify the paths of each script in its configuration file, ensuring that the customized logic is automatically executed during system installation without manual intervention.
[0141] Step S6064: Generate a customized image file based on the configuration distribution list, the current system software repository, the customized component repository, the exclusive identifier, the authorization key, and the bootloader.
[0142] Specifically, in this embodiment of the invention, the necessary resources obtained above, such as the configuration distribution list, exclusive identifier, authorization key, modified bootloader, and current system software repository, are integrated into a deployable customized image file. The configuration distribution list ensures that the integrated resources match the requirements (verified against the list to avoid omissions); the current system software repository provides standard and customized components (which are merged and placed in the image's local repository to support offline installation); the exclusive identifier is embedded in the image label or system file to identify the image's ownership; the authorization key embeds a public key for security verification during installation; and the modified bootloader ensures that the customized script and initialization strategy are automatically loaded after the image starts. These elements together constitute the image's content foundation, identity information, security mechanisms, and deployment logic. Only by integrating these elements can the generated customized image file meet the customer's core requirements for customization, traceability, security, and automation.
[0143] The image file configuration method provided by this invention determines at least one target component based on the user's configuration requirements, performs multi-dimensional configuration analysis on the target component to obtain the customization tasks, performs configuration customization processing based on the customization tasks to obtain the configuration settings, and generates a customized image file based on the configuration content. This application, by analyzing and customizing based on user configuration requirements, can streamline the customized image building process, quickly build customized image files that meet individual needs, reduce manual operations, improve building efficiency, lower technical barriers and customization costs, and satisfy users' customization needs.
[0144] This embodiment also provides a configuration device for an image file, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0145] This embodiment provides a configuration device for image files, such as... Figure 7 As shown, it includes:
[0146] The requirement retrieval module 701 is used to retrieve configuration requirements.
[0147] The component identification module 702 is used to determine the business scenario and system environment according to the configuration requirements, and to identify at least one target component and the component information corresponding to the target component. The component information includes at least one of the following: configuration version, configuration file name, configuration parameters, and target parameter values of the configuration parameters.
[0148] The configuration analysis module 703 is used to perform software support analysis, configuration compatibility analysis, and configuration feasibility analysis on the target component based on component information and a pre-determined software configuration availability lookup table, and to determine the tasks that need to be customized. The software configuration availability lookup table includes configuration component information, configuration compatible component information, and configuration escapable component information.
[0149] The configuration customization module 704 is used to perform configuration customization processing according to the required customization tasks to obtain configuration content.
[0150] The image generation module 705 is used to generate customized image files based on the configuration content.
[0151] In some alternative implementations, the configuration analysis module 703 includes:
[0152] The software support analysis unit is used to perform software support analysis based on the configuration version, determine whether the current system software repository contains each target component, and if not, identify the target component as a component that needs to be customized.
[0153] The configuration compatibility analysis unit is used to perform software compatibility analysis and parameter compatibility analysis on the target component based on the component information according to the software configuration availability lookup table, and to determine the component information that needs to be adjusted based on the configuration compatibility analysis results.
[0154] The configuration feasibility analysis unit is used to perform configuration feasibility analysis on the target component, determine whether the business system, data processing, data transmission and deployment of the target component are feasible, and determine the customized configuration method required based on the configuration feasibility analysis results.
[0155] In some optional implementations, configuring the compatibility analysis unit includes:
[0156] The first matching subunit is used to query whether a configuration file name exists in the configuration component information of the software configuration availability lookup table.
[0157] The second matching subunit is used to determine if the software configuration is compatible if a configuration file name exists, and if no configuration file name exists, to search in the pre-defined component replacement table for a preset replacement software. If a preset replacement software exists, the software configuration is determined to be compatible.
[0158] The third matching subunit is used to check whether the configuration parameters exist in the software configuration availability lookup table based on the configuration file name or the preset replacement software if the software configuration is determined to be compatible.
[0159] The fourth matching subunit is used to determine whether the configuration parameters are compatible if they exist, and if they do not exist, to check whether there is a preset compatible old version field in the software configuration availability lookup table that is the same as the configuration parameters.
[0160] The fifth matching subunit is used to determine whether the parameter configuration is compatible if a preset field compatible with older versions exists; otherwise, it checks whether an escapable identifier exists in the configuration escapable component information in the software configuration availability lookup table.
[0161] The sixth matching subunit is used to determine, if it exists, that the parameter configuration is incompatible but can be escaped, and then the configuration parameter is used as the component information to be adjusted, and the escape function index corresponding to the component information to be adjusted is determined in the software configuration availability lookup table.
[0162] In some optional implementations, the configuration feasibility analysis unit includes:
[0163] The component initial sorting subunit is used to sort the startup order of each target component based on the runtime dependencies of each target component, so as to obtain the initial startup order.
[0164] The component adjusts the sorting subunit to obtain the order in which business configurations are obtained, and adjusts the initial startup order according to the order in which business configurations are obtained, so as to obtain the adjusted startup order.
[0165] The component's multi-dimensional dynamic sub-unit is used to perform feasibility analysis of the business system, data processing, data transmission, and deployment based on the adjusted startup order, to obtain the dynamic configuration information required, and to determine the customized configuration method based on the dynamic configuration information required.
[0166] In some alternative implementations, the configuration customization module 704 includes:
[0167] The component customization unit is used to customize software according to the required components, obtain customized components, and put the customized components into the customized component repository.
[0168] The component information customization unit is used to call the corresponding escape function according to the escape function index of the component information that needs to be adjusted, and adjust the configuration parameters to compatible parameter information based on the escape function to obtain customized component information.
[0169] The script customization unit is used to generate customized executable scripts corresponding to the required configuration methods based on the dynamic configuration information. The customized executable scripts are executed in the customer environment to obtain actual parameter values and supplement the configuration.
[0170] In some alternative implementations, the image generation module 705 includes:
[0171] The list generation unit is used to classify the configuration content and obtain the configuration distribution list.
[0172] The identification key generation unit is used to obtain user information and generate a unique identifier and authorization key based on the user information.
[0173] The bootloader modification unit is used to modify the bootloader according to the configuration content.
[0174] The image file generation unit is used to generate customized image files based on the configuration distribution list, the current system software repository, the custom component repository, the exclusive identifier, the authorization key, and the bootloader.
[0175] In some optional implementations, the apparatus further includes: a configuration testing module, used to perform configuration customization testing based on configuration content; if the test passes, a customized image file is generated based on the configuration content; otherwise, the process returns to the step of performing configuration customization processing according to the required customization task to obtain the configuration content.
[0176] In some optional implementations, configuring the test module includes:
[0177] The component installation test unit is used to build a test environment based on the configuration content, install components based on the test environment, and execute the configuration test script to test the components after the installation is completed.
[0178] The test result determination unit is used to determine that the test passes if there are no abnormalities during the installation process and the component test is normal; otherwise, the test is rejected.
[0179] The image file configuration apparatus provided in this embodiment of the invention can execute the image file configuration method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method execution. Further functional descriptions of the various modules and units described above are the same as in the corresponding embodiments described above, and will not be repeated here.
[0180] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0181] The following is a detailed reference. Figure 8This diagram illustrates a suitable structural schematic for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 801, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 802 or a program loaded from memory 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the electronic device. The processor 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0182] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0183] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a memory 808, or installed from a ROM 802. When the computer program is executed by the processor 801, it performs the functions defined in the image file configuration method of the embodiments of the present invention.
[0184] Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0185] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded via a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the image file configuration method shown in the above embodiments is implemented.
[0186] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0187] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A configuration method of a mirror file, characterized by, The method comprises: acquiring configuration requirements; determining a business scenario and a system environment according to the configuration requirements, and identifying at least one target component and component information corresponding to the target component, the component information at least including one of a configuration version, a configuration file name, a configuration parameter, and a target parameter value of the configuration parameter; performing software support analysis, configuration compatibility analysis, and configuration feasibility analysis on the target component based on the component information and a pre-determined software configuration availability reference table, determining a customization task, and the software configuration availability reference table containing configuration component information, configuration compatible component information, and configuration escapable component information; the customization task including a customization component, adjustment component information, and / or a customization configuration method; and the performing software support analysis, configuration compatibility analysis, and configuration feasibility analysis on the target component based on the component information and the pre-determined software configuration availability reference table, determining a customization task, including: performing the software support analysis according to the configuration version, determining whether the current system software warehouse contains each target component, if not, determining the target component as the customization component; if yes, performing software compatibility analysis and parameter compatibility analysis on the target component based on the software configuration availability reference table according to the component information, and determining the adjustment component information according to the configuration compatibility analysis result; performing the configuration feasibility analysis on the target component, determining whether the business system of the target component is feasible, data processing is feasible, data transmission is feasible, and deployment is feasible, and determining the customization configuration method according to the configuration feasibility analysis result. The software compatibility analysis and the parameter compatibility analysis on the target component are performed according to the software configuration availability table based on the component information, and the component information to be adjusted is determined according to the configuration compatibility analysis result, including: querying whether the configuration file name exists in the configuration component information of the software configuration availability table; if the configuration file name exists, it is determined that the software configuration is compatible, and if the configuration file name does not exist, it is determined that the software configuration is compatible; if it is determined that the software configuration is compatible, it is determined whether the configuration parameter exists in the software configuration availability table according to the configuration file name or the preset replacement software; if the configuration parameter exists, it is determined that the parameter configuration is compatible, and if the configuration parameter does not exist, it is determined whether a preset compatible old version field is the same as the configuration parameter in the configuration compatible component information of the software configuration availability table; if the preset compatible old version field exists, it is determined that the parameter configuration is compatible, and if the preset compatible old version field does not exist, it is determined whether an escapable identifier exists in the configuration escapable component information of the software configuration availability table; if the escapable identifier exists, it is determined that the parameter configuration is incompatible but escapable, the configuration parameter is taken as the component information to be adjusted, and an escapable function index corresponding to the component information to be adjusted is determined in the software configuration availability table; The configuration customization processing is performed according to the customization task, and configuration content is obtained. The customized image file is generated according to the configuration content.
2. The method of claim 1, wherein, Before the customized image file is generated according to the configuration content, the following step is further included: The configuration customization test is performed based on the configuration content, if the test passes, the customized image file is generated according to the configuration content, otherwise, the step of obtaining the configuration content by performing the configuration customization processing according to the customization task is returned.
3. The method of claim 1, wherein, The configuration feasibility analysis on the target component is performed, it is determined whether the business system of the target component is feasible, whether the data processing is feasible, whether the data transmission is feasible, and whether the deployment is feasible, and the customization configuration mode to be customized is determined according to the configuration feasibility analysis result, including: The starting order of each target component is sorted based on the running dependency relationship of each target component, and an initial starting order is obtained; The business configuration acquisition order is obtained, and the initial starting order is adjusted according to the business configuration acquisition order, and an adjusted starting order is obtained; The business system feasibility analysis, the data processing feasibility analysis, the data transmission feasibility analysis, and the deployment feasibility analysis are performed according to the adjusted starting order, the dynamic configuration information to be adjusted is obtained, and the customization configuration mode to be customized is determined according to the dynamic configuration information to be adjusted.
4. The method of claim 3, wherein, The configuration content includes a customized component, customized component information, and / or a customized executable script, and the configuration customization processing is performed according to the customization task, and the configuration content is obtained, including: The software customization is performed according to the customization component, the customized component is obtained, and the customized component is placed in a customized component warehouse. According to the escape function index corresponding to the component information to be adjusted, a corresponding escape function is called, and the configuration parameter is adjusted into compatible parameter information based on the escape function, so as to obtain the customized component information; According to the dynamic configuration information, a customized executable script corresponding to the customized configuration mode is generated, and the customized executable script is used to execute in a customer environment to obtain actual parameter values and supplement configuration.
5. The method of claim 2, wherein, The configuration content further includes a general component, general component information and / or a general executable script, and the configuration customization test based on the configuration content includes: A test environment is built according to the configuration content, and component installation is performed based on the test environment, and after the installation is completed, a configuration test script is executed to test the component; If there is no exception in the installation process and the component test is normal, it is determined that the test is passed, otherwise it is determined that the test is not passed.
6. The method of claim 4, wherein, The customized image file generated according to the configuration content includes: The configuration content is classified to obtain a configuration distribution list; User information is obtained, and a special identifier and an authorization key are generated according to the user information; The boot program is modified according to the configuration content; A customized image file is generated according to the configuration distribution list, the current system software warehouse, the customized component warehouse, the special identifier, the authorization key and the boot program.
7. A configuration device for an image file, characterized in that, The device includes: A requirement acquisition module is configured to acquire configuration requirements; A component identification module is configured to determine a business scenario and a system environment according to the configuration requirements, and identify at least one target component and component information corresponding to the target component, the component information including at least one of a configuration version, a configuration file name, a configuration parameter and a target parameter value of the configuration parameter; A configuration analysis module is configured to perform software support analysis, configuration compatibility analysis and configuration feasibility analysis on the target component based on the component information and a pre-determined software configuration availability table, and determine a customization task, the software configuration availability table including configuration component information, configuration compatible component information and configuration escapable component information; The customization task includes a customization component, component information to be adjusted and / or a customization configuration mode; the software support analysis, configuration compatibility analysis and configuration feasibility analysis on the target component based on the component information and the pre-determined software configuration availability table to determine the customization task include: performing the software support analysis according to the configuration version, determining whether the current system software warehouse includes each target component, if not, determining the target component as the customization component; if yes, performing software compatibility analysis and parameter compatibility analysis on the target component based on the software configuration availability table according to the component information, and determining the component information to be adjusted according to the configuration compatibility analysis result; performing the configuration feasibility analysis on the target component, determining whether a business system of the target component is feasible, data processing is feasible, data transmission is feasible and deployment is feasible, and determining the customization configuration mode according to the configuration feasibility analysis result; The software configuration availability table is used to perform software compatibility analysis and parameter compatibility analysis on the target component according to the component information, and the component information to be adjusted is determined according to the configuration compatibility analysis result, including: querying whether the configuration file name exists in the configuration component information of the software configuration availability table; if the configuration file name exists, it is determined that the software configuration is compatible, and if the configuration file name does not exist, it is determined that the software configuration is compatible; if it is determined that the software configuration is compatible, whether the configuration parameter exists in the software configuration availability table is queried according to the configuration file name or the preset replacement software; if the configuration parameter exists, it is determined that the parameter configuration is compatible, and if the configuration parameter does not exist, whether a preset compatible old version field is queried in the configuration compatible component information of the software configuration availability table; if the preset compatible old version field exists, it is determined that the parameter configuration is compatible, and if the preset compatible old version field does not exist, whether an escapable identifier exists is queried in the configuration escapable component information of the software configuration availability table; if the escapable identifier exists, it is determined that the parameter configuration is incompatible but escapable, the configuration parameter is taken as the component information to be adjusted, and an escapable function index corresponding to the component information to be adjusted is determined in the software configuration availability table; The configuration customization module is configured to perform configuration customization processing according to the customization task to obtain configuration content. The image generation module is configured to generate a customized image file according to the configuration content.
8. An electronic device, comprising: Comprise: A memory and a processor, which are in communication connection with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the image file configuration method in any one of claims 1 to 6.
Citation Information
Patent Citations
Mirror image file generation method and device, electronic equipment and storage medium
CN113867778A
Software customization method and system in ISO mirror image of LINUX operating system
CN120578371A