CN117149224A - Mirror image processing method and device - Google Patents

Mirror image processing method and device Download PDF

Info

Publication number
CN117149224A
CN117149224A CN202311109061.7A CN202311109061A CN117149224A CN 117149224 A CN117149224 A CN 117149224A CN 202311109061 A CN202311109061 A CN 202311109061A CN 117149224 A CN117149224 A CN 117149224A
Authority
CN
China
Prior art keywords
image
script
user
error
mirror image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311109061.7A
Other languages
Chinese (zh)
Inventor
田婷婷
孙家昌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202311109061.7A priority Critical patent/CN117149224A/en
Publication of CN117149224A publication Critical patent/CN117149224A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a mirror image processing method and device, and relates to the technical field of cloud computing. One embodiment of the method comprises the following steps: receiving a source image uploaded by a first user, analyzing and identifying the source image, and extracting metadata; receiving script configuration information input by a first user, calling a script generator, and generating an automatic script to perform diversified format conversion processing according to the script configuration information and metadata to obtain an automatic script set suitable for different mirror image types; responding to the selection operation of the second user for generating the mirror image, calling an automation tool, triggering and displaying an operation interface, and receiving the requirement parameters input by the second user on the operation interface; and determining a target automation script corresponding to the requirement parameter from the automation script set, calling the target automation script, generating a new mirror image and returning the new mirror image to the second user. This embodiment sets up automation and standardization mechanisms for mirror image production and conversion to address the inefficiency, high risk and complexity of traditional manual operations.

Description

Mirror image processing method and device
Technical Field
The present invention relates to the field of cloud computing technologies, and in particular, to a method and an apparatus for processing a mirror image.
Background
The traditional mirror image making and converting process requires manual intervention and manual execution of a plurality of steps and operations, is time-consuming and labor-consuming, is easy to leak and error, requires a series of manual operations again for making or converting the mirror image each time, is unfavorable for large-scale mirror image deployment and updating, and the whole process involves a plurality of steps and complicated configuration operations, so that difficulties exist for non-professionals.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for processing an image, which at least can solve the problems of inefficiency, high risk, complexity, etc. of the conventional image making and converting manual operations in the prior art.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a mirroring method, including:
receiving a source image uploaded by a first user, and analyzing and identifying the source image to extract metadata of the source image;
receiving script configuration information input by a first user, and calling a script generator to generate an automatic script according to the script configuration information and the metadata;
performing diversified format conversion processing on the automatic script to obtain an automatic script set adapted to different mirror image types;
Responding to the selection operation of the second user for generating the mirror image, calling an automation tool to trigger the display of an operation interface, and receiving the requirement parameters input by the second user on the operation interface;
and determining a target automation script corresponding to the requirement parameter from the automation script set, calling the target automation script to generate a new image and returning the new image to a second user.
Optionally, the analyzing and identifying the source image to extract metadata of the source image includes:
extracting key features of the source image by using a machine learning technology, and inputting the key features into a target recognition model to obtain metadata of the source image;
wherein the metadata includes: operating system type and version, configured application information, components, dependencies between components, as well as source images, user information, application information, file structures of the operating system.
Optionally, before the inputting the key feature into the target recognition model, the method further includes:
receiving sample data; the sample data are images of different operating systems and metadata;
extracting key features of each sample image by using a machine learning technology;
And training the source recognition model based on the key features and the metadata to obtain a trained target recognition model.
Optionally, the method further comprises: before training the source recognition model, a preset number of computing resources are allocated from a pool of computing resources to use the computing resources to train the recognition model and recognize metadata.
Optionally, the method further comprises: and in the process of calling the target automation script to generate a new image, determining an idle host, starting a virtual machine in the idle host, executing the target automation script in the virtual machine, and packaging the execution information and the operating system information of the virtual machine to generate the new image.
Optionally, the method further comprises: and in the process of generating the new mirror image, a real-time monitoring mechanism is called to monitor each step and key indexes, so that when an error or abnormal condition is monitored, an error processing mechanism is triggered to process.
Optionally, when an error or an abnormal situation is monitored, triggering an error processing mechanism to process, including:
analyzing the error type when an error or abnormal condition is monitored;
in response to the error type being a temporary error, performing an error automatic recovery mechanism;
In response to the error type being a rollback error, performing an automatic rollback mechanism to restore the new image generation process to a state prior to the error occurrence;
in response to the error type being a non-rollback error, a notification administrator mechanism is performed.
Optionally, after the generating the new image and returning to the second user, the method further includes: receiving a version number configured by a second user for the new image; and
receiving one of adding, deleting and changing metadata of a new mirror image by a second user to obtain a first mirror image, and receiving a version number configured for the first mirror image;
in response to a selective upload operation of the first image, uploading the first image to a cloud computing platform to generate an automation script set corresponding to the first image and adapted to different image types based on the cloud computing platform;
and inquiring other images related to the name and version number of the first image, and establishing the related relation between the first image and the other images.
Optionally, the method further comprises: receiving a use operation of the second image, and responding to a selection operation of image rollback in the process of using the second image, and inquiring version numbers of other images related to the second image; in response to a select operation for a third image of the other images, the second image is rolled back to the third image.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided a mirror image processing apparatus including:
the analysis and identification module is used for receiving the source image uploaded by the first user, analyzing and identifying the source image, and extracting metadata of the source image;
the script generation module is used for receiving script configuration information input by a first user, and calling a script generator to generate an automatic script according to the script configuration information and the metadata;
performing diversified format conversion processing on the automatic script to obtain an automatic script set adapted to different mirror image types;
the mirror image generation module is used for responding to the selection operation of the second user for generating the mirror image, calling an automation tool to trigger the display of an operation interface and receiving the requirement parameters input by the second user on the operation interface;
and determining a target automation script corresponding to the requirement parameter from the automation script set, calling the target automation script to generate a new image and returning the new image to a second user.
Optionally, the analysis and identification module is configured to:
extracting key features of the source image by using a machine learning technology, and inputting the key features into a target recognition model to obtain metadata of the source image;
Wherein the metadata includes: operating system type and version, configured application information, components, dependencies between components, as well as source images, user information, application information, file structures of the operating system.
Optionally, the apparatus further comprises a model training module for:
receiving sample data; the sample data are images of different operating systems and metadata;
extracting key features of each sample image by using a machine learning technology;
and training the source recognition model based on the key features and the metadata to obtain a trained target recognition model.
Optionally, the apparatus further includes a resource allocation module configured to:
before training the source recognition model, a preset number of computing resources are allocated from a pool of computing resources to use the computing resources to train the recognition model and recognize metadata.
Optionally, the resource allocation module is configured to:
and in the process of calling the target automation script to generate a new image, determining an idle host, starting a virtual machine in the idle host, executing the target automation script in the virtual machine, and packaging the execution information and the operating system information of the virtual machine to generate the new image.
Optionally, the device further includes a monitoring processing module, configured to:
and in the process of generating the new mirror image, a real-time monitoring mechanism is called to monitor each step and key indexes, so that when an error or abnormal condition is monitored, an error processing mechanism is triggered to process.
Optionally, the monitoring processing module is configured to:
analyzing the error type when an error or abnormal condition is monitored; in response to the error type being a temporary error, performing an error automatic recovery mechanism; in response to the error type being a rollback error, performing an automatic rollback mechanism to restore the new image generation process to a state prior to the error occurrence; in response to the error type being a non-rollback error, a notification administrator mechanism is performed.
Optionally, the apparatus further includes a version control module configured to: receiving a version number configured by a second user for the new image; receiving one of adding, deleting and changing metadata of the new mirror image by a second user to obtain a first mirror image, and receiving a version number configured for the first mirror image; in response to a selective upload operation of the first image, uploading the first image to a cloud computing platform to generate an automation script set corresponding to the first image and adapted to different image types based on the cloud computing platform; and inquiring other images related to the name and version number of the first image, and establishing the related relation between the first image and the other images.
Optionally, the version control module is further configured to: receiving a use operation of the second image, and responding to a selection operation of image rollback in the process of using the second image, and inquiring version numbers of other images related to the second image; in response to a select operation for a third image of the other images, the second image is rolled back to the third image.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a mirroring electronic device.
The electronic equipment of the embodiment of the invention comprises: one or more processors; and a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement any of the above-described mirroring methods.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements any one of the above-described mirroring methods.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer program product. The computer program product of the embodiment of the invention comprises a computer program, and the program is executed by a processor to realize the mirror image processing method provided by the embodiment of the invention.
According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: the mirror image manufacturing method can ensure that mirror image manufacturing and conversion are performed by using the same specifications and steps under different virtual machine environments, improve manufacturing consistency and accuracy, and reduce configuration differences and errors caused by human factors. In addition, the provided automatic work and flow simplify the complexity of operation, the automatic flow can realize the flexibility and expandability of the mirror image making and converting process through parameterization and configuration options, and a user can select different configuration options according to the needs so as to adapt to different application scenes and requirements, and even non-professional personnel can easily execute the mirror image making and converting tasks.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic flow diagram of a mirroring method according to an embodiment of the invention;
FIG. 2 is a flow diagram of an alternative mirroring method according to an embodiment of the invention;
FIG. 3 is a flow diagram of another alternative mirroring method according to an embodiment of the invention;
FIG. 4 is a flow diagram of yet another alternative mirroring method according to an embodiment of the invention;
FIG. 5 is a flow diagram of yet another alternative mirroring method according to an embodiment of the invention;
FIG. 6 (a) is a schematic diagram of a mirroring method according to an embodiment of the invention;
FIG. 6 (b) is a schematic diagram of the main blocks of a mirror image processing apparatus according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 8 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is noted that embodiments of the invention and features of the embodiments may be combined with each other without conflict. In the technical scheme of the invention, the related aspects of acquisition, analysis, use, transmission, storage and the like of the personal information of the user accord with the regulations of related laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside the legal use aspects and the like, and are subjected to supervision and management of a supervision department. Necessary measures should be taken for the personal information of the user to prevent illegal access to such personal information data, ensure that personnel having access to the personal information data comply with the regulations of the relevant laws and regulations, and ensure the personal information of the user.
Once these user personal information data are no longer needed, the risk should be minimized by limiting or even prohibiting the data collection and/or deletion. User privacy is protected, when applicable, by de-identifying the data, including in some related applications, such as by removing a particular identifier (e.g., date of birth, etc.), controlling the amount or specificity of stored data (e.g., collecting location data at a city level rather than at a specific address level), controlling how the data is stored, and/or other methods.
Referring to fig. 1, a main flowchart of a mirror image processing method provided by an embodiment of the present invention is shown, including the following steps:
s101: receiving a source image uploaded by a first user, and analyzing and identifying the source image to extract metadata of the source image;
s102: receiving script configuration information input by a first user, and calling a script generator to generate an automatic script according to the script configuration information and the metadata;
s103: performing diversified format conversion processing on the automatic script to obtain an automatic script set adapted to different mirror image types;
s104: responding to the selection operation of the second user for generating the mirror image, calling an automation tool to trigger the display of an operation interface, and receiving the requirement parameters input by the second user on the operation interface;
s105: and determining a target automation script corresponding to the requirement parameter from the automation script set, calling the target automation script to generate a new image and returning the new image to a second user.
In the above embodiment, for step S101, the source image refers to an initial image or a base image used in a software development or system deployment process. It is a template containing the operating system and pre-installed software that can be used as a basis for creating and constructing other images. Source images are commonly used in rapid deployment and replication system environments for software development, testing, and deployment on different computers or servers.
The cloud service provider may support a variety of different operating system source images on the cloud computing platform, such as a first user uploading a source image on the cloud computing platform. In order to manage these images more effectively, save storage resources and provide a better experience for users, image recognition and machine learning techniques may be introduced to analyze and identify the source images to extract metadata of the source images themselves. The metadata includes operating system type and version (e.g. Ubuntu 20.04, centOS 8), configured application information (e.g. ABC), components, dependency between components, and file structures of source images, user information, application information, and operating system.
For components, in image analysis, components refer to the different software, applications, and libraries contained in the image. For example, in a Web server image, the following components may be included: web server software (e.g., apache or nmginx), programming language environments (e.g., PHP, python, or node. Js), database software (e.g., mySQL or PostgreSQL), operating system infrastructure components (e.g., linux kernel).
For dependencies, the dependencies refer to inter-dependencies between the components in the image, as well as the external libraries and resources that are required. For example, a Web server image dependency may include: web server software relies on network services and resources provided by the operating system. The programming language environment may depend on a particular version of the runtime library. Database software relies on file systems and storage resources.
For file structure, the file structure refers to the layout and organization of the individual files and directories in the image. In image analysis, common files and directories in the image may be identified, for example: /bin: including executable binary files. /usr: including user-level applications and files. /etc: including configuration files. /var: including change data such as log files and temporary files. Lib: containing library files.
For steps S102 to S103, the first user may also input script configuration information, such as script names, image types, etc., and call the script generator to automatically design and develop to generate an automation script according to the result of the foregoing image analysis. And performing multi-format conversion processing on the automation script to obtain the automation scripts with different mirror image types. For example, in the script configuration information input by the user, the mirror image type is raw, so that an automation script suitable for raw is generated, and confidentiality and integrity of the script are ensured, so that malicious tampering, theft or unauthorized access is prevented. Assuming that the image type has three types qcow2, raw, vmdk in total, format conversion is also required for the automation script to generate an automation script adapted to qcow2, and an automation script adapted to vmdk. The code in the script needs to be converted for different image types, for example AAA in the script adapted to raw, and AAA in the script adapted to qcow 2.
The mirror image type may be other types besides qcow2, raw, vmdk, and may be user input or analyzed, preferably user input, such as: 1. web server mirroring: images suitable for deploying Web applications may include Web servers, programming language environments, and databases. 2. Database mirroring: the mirror used to deploy the database system (e.g., mySQL, postgreSQL) may contain database software and configuration. 3. Application mirroring: mirroring for a particular application, such as message queuing, container orchestration engine, etc. 4. Operating system base image: the base image, which contains the operating system kernel components, may be used to build other types of images.
For steps S104 to S105, the present solution aims at generating a new image based on the image provided by the original user if the new user wants to generate a new image. The proposal develops an integrated automation tool, and provides a visual operation interface and a command line interface. The tool has functions of function selection, configuration options, parameter setting, operation record and the like so as to support customization and management of users.
Function selection-mirror image creation: allowing the user to select the type of image that needs to be made, such as a Web server, database, application, etc. Mirror conversion: support for converting existing images to other formats, such as Docker images, virtual machine images, etc. Configuration management: configuration options are provided for the user to customize the configuration of the image, such as application version, environment variables, port mapping, etc. Depending on the installation: allowing the user to select whether to automatically install the dependency library and software package required for the image. And (3) resource adjustment: allowing the user to adjust the resource allocation, such as CPU, memory, storage, etc.
Configuration options-mirror type selection: a drop down menu is provided for the user to select from a predefined image type, such as a Web server, database, etc. Application configuration: the user is allowed to enter configuration information for the application such as database connection strings, authentication keys, etc. Setting environment variables: allowing the user to set environmental variables to affect the behavior of the image, such as development environment, production environment. Port mapping settings: the user is allowed to specify the mapping of external ports and internal ports in order to access applications in the container or virtual machine.
Parameter settings-resource allocation parameters: the user is allowed to set the resource allocation parameters such as CPU core number, memory size and the like. Mirror naming parameters: the user is allowed to set the name and version number of the generated image. Depending on the installation option: allowing the user to choose whether to automatically install the dependency library and software packages or manually specify a list of software packages that need to be installed.
Operation record-operation log record: the tool records each operation of the user, including selected functions, configuration options, parameter settings, etc. Performing history viewing: the user can view previously performed operations, as well as related configurations and parameters. Error log: if an error occurs during operation, the tool records the error information and displays it to the user for troubleshooting. And (3) operation result display: after the operation is completed, the result of the operation, such as the generated image file path, execution time, etc., is displayed.
The automation tool may interact with the user to receive the user entered requirements and parameters and invoke the automatically generated script to perform the image generation process. The second user may click a "generate mirror" button in the cloud computing platform, and based on the operation, the platform automatically triggers the invocation of the automation tool to trigger the display of an operation interface on which the second user may input the demand parameters. The requirements may be: and (3) rapidly making mirror images: the user needs to make an image in a short time in order to deploy the application in the cloud environment. Multiple format conversion: the user needs to convert one image into multiple formats, such as a Docker image, a virtual machine image, etc. And (3) large-scale batch manufacturing: users need to make multiple images at the same time to meet the large-scale deployment needs. Customizing configuration: the user needs to configure different application versions, environment variables, etc. for the image. High performance requirements: higher computation and storage performance is required in making and converting the mirror image.
The requirement parameters in this solution include, but are not limited to, image type, operating system type, application information. Operating system type: different operating system types may require different automation scripts to accommodate their specific deployment and configuration requirements. For example: linux platform: applicable deployment and configuration scripts are generated for different Linux releases (e.g., centOS, ubuntu, debian). Windows platform: and generating a corresponding automation script for the Windows operating system for deploying and configuring the Windows image.
Firstly, according to the image type, determining an automation script set corresponding to the image type. Assuming that there are 100 source images in the cloud computing platform, according to the foregoing steps, 100 (the actual numerical value is generally greater than the 100) automation script sets are generated, and 100 automation scripts are obtained by screening according to the image types. From the 100 automation scripts, the matching degree between the type of the operating system and the application program information is determined, for example, the application program information of the automation scripts is ABC, the application program information input by the second user is ABD, and the matching degree between the type of the operating system and the application program information is 88% when the types of the operating systems are the same. The 100 automation scripts are then ordered one by one in order of matching from high to low, such as 90%, 88%, … ….
The second user may manually select one of the automation scripts, or the system automatically defaults to select one of the automation scripts, typically the one with the highest matching degree, as the target automation script, which is invoked to generate a new image and return to the second user. The script comprises the steps of image creation, initialization, software installation, configuration modification and the like, and has flexible configuration options and parameter settings.
In addition, in the mirror image making and converting process, sensitive data and configuration information of the user may be involved, so that privacy and security of the user data need to be ensured, and data leakage or unauthorized access is prevented. This includes handling confidentiality and security of user data during image analysis, script generation, and image conversion. For this problem, user rights and access control mechanisms may be set, such as establishing a rights relationship between the user and the tool, only authorized users can access and use the functions and operations of the tool, and their rights are restricted to prevent abuse or misuse.
According to the method provided by the embodiment, the automatic script is generated based on the source image and is processed in a diversified mode, a set of image generation automatic flow is designed, so that image production and conversion are guaranteed to be carried out under different environments by using the same specifications and steps, consistency, expandability and flexibility of production are improved, non-professional staff can easily execute the method, dependence on manual operation is reduced, manual error risks are reduced, and operation efficiency and productivity are improved.
Referring to fig. 2, a flowchart of an alternative mirroring method according to an embodiment of the invention is shown, including the following steps:
S201: receiving a source image uploaded by a first user, extracting key features of the source image by using a machine learning technology, and inputting the key features into a target recognition model to obtain metadata of the source image;
s202: receiving script configuration information input by a first user, and calling a script generator to generate an automatic script according to the script configuration information and the metadata;
s203: performing diversified format conversion processing on the automatic script to obtain an automatic script set adapted to different mirror image types;
s204: responding to the selection operation of the second user for generating the mirror image, calling an automation tool to trigger the display of an operation interface, and receiving the requirement parameters input by the second user on the operation interface;
s205: and determining a target automation script corresponding to the requirement parameter from the automation script set, calling the target automation script to generate a new image and returning the new image to a second user.
In the above embodiment, the steps S202 to S205 are described with reference to fig. 1, and are not described herein.
For step S201, the method trains the target recognition model in advance, including the steps of data collection and preprocessing, feature extraction, and model training. Sample data of a large number of different operating system images and metadata are collected, including CentOS, ubuntu, windows, etc., preprocessed, and key features, such as file system structures, configuration files, software package lists, etc., are extracted using machine learning techniques. Based on the extracted key features, a source recognition model, such as a classifier or a cluster, is trained to obtain a target recognition model to recognize metadata.
Here, the source recognition model may be a classifier model, a cluster model, a deep learning model, or the like. Classifier model: classifiers (e.g., support vector machines, decision trees, random forests, etc.) are used to determine the operating system type, application type, etc. of the image. Clustering model: images are grouped into categories with similar characteristics, such as images with similar software packages and file structures, by clustering techniques. Deep learning model: such as a recurrent neural network (RNN, full scale Recurrent Neural Network), long short-term memory network (LSTM, full scale Long Short Term Memory Network), etc., for processing sequence data, such as profile content, etc.
Thus, when the first user uploads the source image to the cloud computing platform, the cloud computing platform automatically uses the machine learning technique and the target recognition model to obtain metadata for the source image. In addition to machine learning techniques, image recognition techniques may be used to detect operating system logo, interface features, etc. in the source image to further determine the operating system type. Here, the image recognition technology may be convolutional neural network (CNN, full name Convolutional Neural Networks), an object detection algorithm, or the like. CNN is excellent in image recognition field, and can be used for recognizing image features in mirror images, such as logo and interface elements of an operating system. Object detection algorithm: such as YOLO (You Only Look Once) or fast R-CNN, may be used to detect a particular object or component in the image, such as identifying an installed application icon.
Various embodiments may be provided herein:
embodiment one: firstly, identifying an operating system logo, interface characteristics and the like in a source image by using an image identification technology so as to determine the type of the operating system; machine identification techniques and identification models are then used to identify other metadata in addition to the operating system. For example, the user uploads an unnamed operating system image, the cloud computing platform automatically analyzes that the image is Ubuntu 20.04 through an image recognition technology, then further extracts key features of the image, and determines that the image is a Web server image based on an LAMP (Linux, apache, mySQL, PHP) technology stack.
Embodiment two: firstly, identifying an operating system logo, interface characteristics and the like in a source image by using an image identification technology so as to determine the type of the operating system; and then using a machine identification technology and an identification model to identify metadata in the source image, judging whether the operating system type is consistent with the operating system type in the metadata, and if not, taking the metadata as the reference.
Embodiment III: the third preferred embodiment of the present solution uses machine identification techniques and identification models to identify metadata in the source image.
In actual operation, according to the identified operating system type, an automatic configuration recommendation operation may be performed to automatically recommend appropriate configurations for the user, including pre-installed applications, resource allocation, network settings, and the like. According to the use condition and feedback of the user, the machine learning technology and the recognition model are continuously optimized, and the recognition accuracy and efficiency are improved.
Mirror image identification and analysis are key steps for realizing automatic mirror image making and conversion, and it is very important to protect confidentiality and accuracy of algorithms and models. Unauthorized access and copying, and malicious tampering of algorithms and models are prevented. Unauthorized manifestation: unauthorized refers to an action that occurs without legal rights or permissions, including but not limited to: unauthorized access: an unauthorized person or entity accesses algorithms, models, scripts, or tool code. Unauthorized copying: the algorithm, model, script, or tool code is copied, propagated, or transmitted without permission. Unauthorized modification: an algorithm, model, script, or tool code is maliciously modified, tampered with, or destroyed without permission.
The metadata includes, in addition to the above-mentioned operating system types, components in the source image, dependency relationships among the components, and file structures including the file structure of the source image, the file structure of the user information, the file structure of the application information, and the file structure of the operating system. Metadata is descriptive information about the image, including: 1) Operating system type and version; 2) A list of applications and components and versions thereof; 3) A dependency graph showing the relationship between the components; 4) And the file structure diagram shows the file and directory layout in the mirror image.
According to the method provided by the embodiment, the accuracy and the efficiency of identifying the source mirror image metadata can be improved by training the identification model and continuously optimizing, the problems that the prior art is too dependent on manpower and is unfavorable for large-scale deployment are solved, and the operation difficulty is reduced.
Referring to fig. 3, a flowchart of another alternative mirroring method according to an embodiment of the invention is shown, comprising the steps of:
s301: receiving a source image uploaded by a first user, extracting key features of the source image by using a machine learning technology, and inputting the key features into a target recognition model to obtain metadata of the source image; before training a source identification model, allocating a preset number of computing resources from a computing resource pool so as to train the identification model and identify metadata by using the computing resources;
s302: receiving script configuration information input by a first user, and calling a script generator to generate an automatic script according to the script configuration information and the metadata;
s303: performing diversified format conversion processing on the automatic script to obtain an automatic script set adapted to different mirror image types;
s304: responding to the selection operation of the second user for generating the mirror image, calling an automation tool to trigger the display of an operation interface, and receiving the requirement parameters input by the second user on the operation interface;
S305: determining a target automation script corresponding to the demand parameter from an automation script set;
s306: and determining an idle host, starting a virtual machine in the idle host, executing the target automation script in the virtual machine, packaging the execution information and the operating system information of the virtual machine to generate a new mirror image, and returning the new mirror image to a second user.
In the above embodiment, the steps S302 to S305 are described with reference to fig. 1, and are not described herein.
For step S301, the use of the computing resource in the mirror creation and conversion process includes, but is not limited to: and running the container or the virtual machine to execute mirror image making and converting operations. Executing configuration management script and automatically configuring mirror image environment. And performing dependency installation to ensure that the dependency library and the software package required by the image are installed correctly. And performing image format conversion, such as converting the image into a Docker image or a virtual machine image. And performing performance optimization to ensure that the manufacturing and conversion processes are completed in a high-performance environment.
The scheme can be allocated with a preset number of computing resources, such as 1 machine, machine rule, CPU number, memory number and hard disk size, before the recognition model is trained, and the scheme is used when the recognition model is trained and the recognition model recognizes metadata of a source image.
For step S306, image creation and conversion refers to creating and converting an image file of a computer system. An image file is an exact duplicate and contains the contents of the operating system, applications, and data. Making images may facilitate deployment of the same computer system onto multiple devices, while converting images may convert image files of different formats or types to each other. The technology is widely applied in the fields of software development, system deployment, virtualization and the like.
In the process of calling the automation script to generate the new mirror image, the scheme also needs to allocate resources for the new mirror image, and calculates the specific process of resource allocation: demand analysis: the specific requirements of mirror image production and conversion, such as production quantity, conversion format, configuration options and the like, are analyzed according to the requirements of users. Performance evaluation: the performance requirements of the required computing resources are evaluated, taking into account the possible computing, storage and network loads during fabrication and conversion. And (3) resource allocation: and according to the performance evaluation result, automatically distributing proper computing nodes, CPU core numbers, memories and storage spaces. And (3) concurrent treatment: for large-scale batch production requirements, the concurrent number of simultaneous production and conversion is determined according to available resources. Dynamic adjustment: according to the performance in the actual manufacturing and conversion process, the computing resource allocation can be dynamically adjusted to maintain high efficiency.
The scheme is characterized in that the computing resource distribution process comprises the steps of determining an idle host, starting a virtual machine in the host, running a target automation script in the virtual machine, and then packaging the operating system information of the virtual machine and the execution information of the execution target automation script to generate a new mirror image.
According to the method provided by the embodiment, proper computing resources are automatically allocated and configured according to the requirements of mirror image production and conversion, so that an efficient mirror image production and conversion environment is provided, efficient operation of the production process is ensured, available resources are utilized to the greatest extent, and flexible resource management is realized.
Referring to fig. 4, a flowchart of yet another alternative mirroring method according to an embodiment of the invention is shown, comprising the steps of:
s401: in the process of generating a new mirror image, a real-time monitoring mechanism is called to monitor each step and key indexes so as to analyze the error type when an error or abnormal situation is monitored;
s402: in response to the error type being a temporary error, performing an error automatic recovery mechanism;
s403: in response to the error type being a rollback error, performing an automatic rollback mechanism to restore the new image generation process to a state prior to the error occurrence;
S404: in response to the error type being a non-rollback error, a notification administrator mechanism is performed.
In the above embodiment, for steps S401 to S404, the present solution further introduces a real-time monitoring mechanism to monitor each step and key indicators, such as progress, performance indicators, and error logs, in the mirror image making and converting process. In the event of an error or abnormal condition, error handling mechanisms are automatically triggered, including error recovery, automatic rollback, or notification to an administrator, etc., to ensure the stability and reliability of the image production and conversion.
Example 1
The type and severity of errors are temporary errors, meaning that some errors may be temporary, such as a brief network outage or insufficient resources. These errors may only need to wait for a period of time before the system can recover itself. If a temporary error occurs, the system may attempt to wait for a period of time before retrying the operation in order to expect that the error will self-disappear, such as network connection recovery, thereby setting an error automatic recovery mechanism.
Example two
The type and severity of errors are rollback errors, meaning that some errors may affect the image making or conversion process, but may be restored to a previous state by a undo or rollback operation. If a rollback error occurs, an automatic rollback operation may be performed to restore the production or conversion process to a state prior to the error occurrence, thus setting an automatic rollback mechanism.
Example III
The type and severity of errors are non-rollback errors, meaning that some errors may cause serious problems that cannot be resolved by the rollback operation, requiring additional processing. If a non-rollback error occurs, the system may automatically notify the administrator for manual intervention and further processing, thus setting a notification administrator mechanism.
Assuming that an error occurs in the mirror image making process, the installation failure of the dependency library, the judgment of which mechanism is used can be based on the following conditions: 1) If the failure to rely on library installation is due to a temporary network outage, the system may wait for a period of time before automatically retrying. 2) If a dependent library installation failure may affect the stability of the image, but may be resolved by rolling back the pre-installation state, an automatic rollback operation may be selected. 3) If the failure of the dependent library installation severely affects the image production and requires manual repair by the administrator, the administrator may be automatically notified to handle the process.
By introducing the real-time monitoring and error processing mechanism, the method provided by the embodiment can timely discover and process errors and abnormal conditions in the mirror image manufacturing and conversion process, is beneficial to improving the reliability and stability of the mirror image manufacturing and conversion, protecting the confidentiality and integrity of a monitoring system, reducing faults and interruption, and preventing malicious interference, tampering or destroying the functions of monitoring and error processing.
Referring to fig. 5, a flowchart of yet another alternative mirroring method according to an embodiment of the invention is shown, comprising the steps of:
s501: receiving a version number configured by a second user for the new image;
s502: receiving one of adding, deleting and changing metadata of a new mirror image by a second user to obtain a first mirror image, and receiving a version number configured for the first mirror image;
s503: in response to a selective upload operation of the first image, uploading the first image to a cloud computing platform to generate an automation script set corresponding to the first image and adapted to different image types based on the cloud computing platform;
s504: inquiring other images related to the name and version number of the first image, and establishing the relationship between the first image and the other images;
s505: receiving a use operation of the second image, and responding to a selection operation of image rollback in the process of using the second image, and inquiring version numbers of other images related to the second image;
s506: in response to a select operation for a third image of the other images, the second image is rolled back to the third image.
In the above embodiment, for steps S501 to S506, the present solution also establishes a mirror version control system to track changes and modifications (such as application program update, configuration change, dependency library update, performance optimization, security update, and new addition function) in the mirror image creation and conversion process, and records metadata and configuration information of each version. The second user may configure a version number, such as v01, for the new image, and may also perform an add-delete-modify operation on the metadata thereof to obtain the new image. Assuming that the original new image is Q, adding and deleting metadata and obtaining a first image which is P. And then the second user can upload the mirror image P to the cloud computing platform, so that the cloud computing platform generates an automation script based on the mirror image P, and the automation script is subjected to diversified format conversion to obtain an automation script set suitable for different mirror image types, and the process is shown in the figure 1.
The second user may also set a version number, such as v02, for the first image P. When the image is updated, the change is automatically detected and a new image version is generated, and meanwhile, the history record of the old version is reserved so as to support the version management and rollback operation of the image. The same series of mirror names are not changed, and only version numbers are changed, so that the mirrors in the cloud computing platform can be queried through the mirror names in a correlated way, such as querying other mirrors correlated with the names and version numbers of the mirrors P, and the correlation relation between the mirror names and the version numbers is established. When any image is used by the subsequent user, and the second image is assumed to be the second image W, if the user needs to roll back to the previous version, the user can click on an image roll-back option to query the version numbers of other images associated with the image W, such as images Q v 01-P v 02-Wv 03, and the user selects image P v02, the user rolls back from the image W to the image P.
The method provided by the embodiment provides the functions of controlling and updating the mirror image version, can track the change and the modification of the mirror image, record the metadata and the configuration information of each version, ensure the integrity and the reliability of a version control system, prevent the malicious tampering, deletion or unauthorized access to the mirror image version, and enable a subsequent user to conveniently manage and update the mirror image and rapidly deploy the latest mirror image version.
Referring to fig. 6 (a), a schematic frame diagram of a mirror image processing method according to an embodiment of the present invention is shown, including: the method comprises the steps of automatic tool integration, script automatic generation, elastic resource management, intelligent mirror image analysis, mirror image version control and updating, real-time monitoring and error processing, and by integrating the technologies, the efficient, intelligent and reliable comprehensive mirror image conversion tool is realized.
The prior mirror image making and converting provides the following scheme:
1. template-based fabrication and conversion: maintaining and managing the template library requires additional effort, particularly where multiple image versions and updates are involved. Each time a template is modified or updated, it is necessary to ensure that all images that use the template are updated accordingly.
2. Virtual machine snapshot making and conversion: the use of snapshots can lead to disk space occupation and management difficulties in large scale deployment and conversion of images. The snapshot may contain the complete state of the virtual machine and disk content, so for large images the snapshot file may be large.
3. Automated deployment tool: the use of automated deployment tools requires some skill in script writing and configuration management. For non-technical professionals or beginners, learning and grasping these tools may require some time and learning costs.
4. Containerized mirror image creation and conversion: containerized mirror image fabrication and conversion requires understanding and grasping of the concept and principles of operation of container technology. For the containerization of legacy applications, appropriate modifications and adjustments to the application may be required to accommodate the requirements of the container environment.
In addition, these approaches may present challenges in addressing some of the specific issues in the mirror creation and conversion process. For example, handling complex application dependencies, achieving cross-platform compatibility, ensuring security and stability of images, and the like may all present certain challenges.
In order to solve the technical problems, the scheme provides a mirror image manufacturing and conversion scheme based on a virtualization technology, so that the rapid manufacturing of a mirror image and the rapid conversion of a mirror image format are realized, the working efficiency is improved, and the working errors are reduced. The method comprises the following steps:
1. the automatic process is set, so that tedious manual operation can be converted into an automatic task, the tedious task and repeated operation can be automatically executed, manual operation and manual intervention are reduced, time and resources are saved, mirror image manufacturing and conversion speed is increased, and operation efficiency and productivity are improved. The automatically generated script and tool code comprise key logic and realization of mirror image making and conversion, convert the automatic script, support various mirror image types and formats, adapt to different application scenes and technical stacks, and reduce the risk of manual errors.
2. An automation tool is arranged, and the tool provides a visual operation interface and a visual command line interface, so that management and operation of mirror image manufacture and conversion are simplified. The tool has flexible configuration options and extensible functions so as to meet the requirements of different users, can be integrated with other tools and platforms, and can be used for simplifying operation by selecting the configuration options, parameter settings and functions through an interface.
The automatic flow set by the scheme can ensure that mirror image manufacture and conversion are carried out by using the same specifications and steps under different virtual machine environments, so that the consistency and accuracy of manufacture are improved, each operation is carried out according to the predefined flow and rule, the generated mirror image is ensured to have the same configuration and attribute, and configuration differences and errors caused by human factors are reduced. In addition, the automation work and the process provided by the scheme simplify the complexity of operation, the automation process can realize the flexibility and the expandability of the mirror image making and converting process through parameterization and configuration options, and a user can select different configuration options according to the needs so as to adapt to different application scenes and requirements, and even non-professional personnel can easily execute the mirror image making and converting tasks.
Referring to fig. 6 (b), a schematic diagram of main modules of a mirror image processing apparatus 600 according to an embodiment of the present invention is shown, including:
the analysis and identification module 601 is configured to receive a source image uploaded by a first user, and analyze and identify the source image to extract metadata of the source image;
the script generation module 602 is configured to receive script configuration information input by a first user, and call a script generator to generate an automation script according to the script configuration information and the metadata;
performing diversified format conversion processing on the automatic script to obtain an automatic script set adapted to different mirror image types;
the image generating module 603 is configured to invoke an automation tool in response to a selection operation of the second user for generating an image, so as to trigger to display an operation interface, and receive a requirement parameter input by the second user on the operation interface;
and determining a target automation script corresponding to the requirement parameter from the automation script set, calling the target automation script to generate a new image and returning the new image to a second user.
In the embodiment of the present invention, the analysis and identification module 601 is configured to:
extracting key features of the source image by using a machine learning technology, and inputting the key features into a target recognition model to obtain metadata of the source image;
Wherein the metadata includes: operating system type and version, configured application information, components, dependencies between components, as well as source images, user information, application information, file structures of the operating system.
The implementation device of the invention also comprises a model training module for:
receiving sample data; the sample data are images of different operating systems and metadata;
extracting key features of each sample image by using a machine learning technology;
and training the source recognition model based on the key features and the metadata to obtain a trained target recognition model.
The implementation device of the invention also comprises a resource allocation module for:
before training the source recognition model, a preset number of computing resources are allocated from a pool of computing resources to use the computing resources to train the recognition model and recognize metadata.
In the embodiment of the present invention, the resource allocation module is configured to:
and in the process of calling the target automation script to generate a new image, determining an idle host, starting a virtual machine in the idle host, executing the target automation script in the virtual machine, and packaging the execution information and the operating system information of the virtual machine to generate the new image.
The implementation device of the invention also comprises a monitoring processing module which is used for:
and in the process of generating the new mirror image, a real-time monitoring mechanism is called to monitor each step and key indexes, so that when an error or abnormal condition is monitored, an error processing mechanism is triggered to process.
In the embodiment of the invention, the monitoring processing module is used for: analyzing the error type when an error or abnormal condition is monitored; in response to the error type being a temporary error, performing an error automatic recovery mechanism; in response to the error type being a rollback error, performing an automatic rollback mechanism to restore the new image generation process to a state prior to the error occurrence; in response to the error type being a non-rollback error, a notification administrator mechanism is performed.
The implementation device of the invention also comprises a version control module for: receiving a version number configured by a second user for the new image; receiving one of adding, deleting and changing metadata of the new mirror image by a second user to obtain a first mirror image, and receiving a version number configured for the first mirror image; in response to a selective upload operation of the first image, uploading the first image to a cloud computing platform to generate an automation script set corresponding to the first image and adapted to different image types based on the cloud computing platform; and inquiring other images related to the name and version number of the first image, and establishing the related relation between the first image and the other images.
In the embodiment of the present invention, the version control module is further configured to: receiving a use operation of the second image, and responding to a selection operation of image rollback in the process of using the second image, and inquiring version numbers of other images related to the second image; in response to a select operation for a third image of the other images, the second image is rolled back to the third image.
In addition, the implementation of the apparatus in the embodiments of the present invention has been described in detail in the above method, so that the description is not repeated here.
Fig. 7 shows an exemplary system architecture 700, including terminal devices 701, 702, 703, a network 704, and a server 705 (by way of example only), to which embodiments of the invention may be applied.
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, are installed with various communication client applications, and a user may interact with the server 705 through the network 704 using the terminal devices 701, 702, 703 to receive or transmit messages, etc.
The network 704 is the medium used to provide communication links between the terminal devices 701, 702, 703 and the server 705. The network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The server 705 may be a server providing various services, and it should be noted that the method provided by the embodiment of the present invention is generally performed by the server 705, and accordingly, the apparatus is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 801.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor comprises an analysis and identification module, a script generation module and a mirror image generation module. The names of these modules do not in any way constitute a limitation of the module itself, for example, the analysis recognition module may also be described as a "receiving module".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform any of the mirroring methods described above.
The computer program product of the present invention comprises a computer program which, when executed by a processor, implements the mirror image processing method in the embodiment of the present invention.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (20)

1. A method of mirror image processing, comprising:
receiving a source image uploaded by a first user, and analyzing and identifying the source image to extract metadata of the source image;
Receiving script configuration information input by a first user, and calling a script generator to generate an automatic script according to the script configuration information and the metadata;
performing diversified format conversion processing on the automatic script to obtain an automatic script set adapted to different mirror image types;
responding to the selection operation of the second user for generating the mirror image, calling an automation tool to trigger the display of an operation interface, and receiving the requirement parameters input by the second user on the operation interface;
and determining a target automation script corresponding to the requirement parameter from the automation script set, calling the target automation script to generate a new image and returning the new image to a second user.
2. The method of claim 1, wherein analyzing and identifying the source image to extract metadata of the source image comprises:
extracting key features of the source image by using a machine learning technology, and inputting the key features into a target recognition model to obtain metadata of the source image;
wherein the metadata includes: operating system type and version, configured application information, components, dependencies between components, as well as source images, user information, application information, file structures of the operating system.
3. The method of claim 2, wherein prior to said entering the key features into a target recognition model, the method further comprises:
receiving sample data; the sample data are images of different operating systems and metadata;
extracting key features of each sample image by using a machine learning technology;
and training the source recognition model based on the key features and the metadata to obtain a trained target recognition model.
4. A method according to claim 3, characterized in that the method further comprises:
before training the source recognition model, a preset number of computing resources are allocated from a pool of computing resources to use the computing resources to train the recognition model and recognize metadata.
5. The method according to any one of claims 1-4, further comprising:
and in the process of calling the target automation script to generate a new image, determining an idle host, starting a virtual machine in the idle host, executing the target automation script in the virtual machine, and packaging the execution information and the operating system information of the virtual machine to generate the new image.
6. The method according to any one of claims 1-4, further comprising:
and in the process of generating the new mirror image, a real-time monitoring mechanism is called to monitor each step and key indexes, so that when an error or abnormal condition is monitored, an error processing mechanism is triggered to process.
7. The method of claim 6, wherein triggering the error handling mechanism to handle when an error or abnormal condition is monitored comprises:
analyzing the error type when an error or abnormal condition is monitored;
in response to the error type being a temporary error, performing an error automatic recovery mechanism;
in response to the error type being a rollback error, performing an automatic rollback mechanism to restore the new image generation process to a state prior to the error occurrence;
in response to the error type being a non-rollback error, a notification administrator mechanism is performed.
8. The method of any of claims 1-4, wherein after the generating the new image and returning to the second user, the method further comprises:
receiving a version number configured by a second user for the new image; and
receiving one of adding, deleting and changing metadata of a new mirror image by a second user to obtain a first mirror image, and receiving a version number configured for the first mirror image;
In response to a selective upload operation of the first image, uploading the first image to a cloud computing platform to generate an automation script set corresponding to the first image and adapted to different image types based on the cloud computing platform;
and inquiring other images related to the name and version number of the first image, and establishing the related relation between the first image and the other images.
9. The method of claim 8, wherein the method further comprises:
receiving a use operation of the second image, and responding to a selection operation of image rollback in the process of using the second image, and inquiring version numbers of other images related to the second image;
in response to a select operation for a third image of the other images, the second image is rolled back to the third image.
10. A mirror image processing apparatus, comprising:
the analysis and identification module is used for receiving the source image uploaded by the first user, analyzing and identifying the source image, and extracting metadata of the source image;
the script generation module is used for receiving script configuration information input by a first user, and calling a script generator to generate an automatic script according to the script configuration information and the metadata; performing diversified format conversion processing on the automatic script to obtain an automatic script set adapted to different mirror image types;
The mirror image generation module is used for responding to the selection operation of the second user for generating the mirror image, calling an automation tool to trigger the display of an operation interface and receiving the requirement parameters input by the second user on the operation interface; and determining a target automation script corresponding to the requirement parameter from the automation script set, calling the target automation script to generate a new image and returning the new image to a second user.
11. The apparatus of claim 10, wherein the analysis and identification module is configured to:
extracting key features of the source image by using a machine learning technology, and inputting the key features into a target recognition model to obtain metadata of the source image; wherein the metadata includes: operating system type and version, configured application information, components, dependencies between components, as well as source images, user information, application information, file structures of the operating system.
12. The apparatus of claim 11, further comprising a model training module to:
receiving sample data; the sample data are images of different operating systems and metadata;
Extracting key features of each sample image by using a machine learning technology;
and training the source recognition model based on the key features and the metadata to obtain a trained target recognition model.
13. The apparatus of claim 12, further comprising a resource allocation module configured to:
before training the source recognition model, a preset number of computing resources are allocated from a pool of computing resources to use the computing resources to train the recognition model and recognize metadata.
14. The apparatus according to any of claims 10-13, wherein the resource allocation module is configured to:
and in the process of calling the target automation script to generate a new image, determining an idle host, starting a virtual machine in the idle host, executing the target automation script in the virtual machine, and packaging the execution information and the operating system information of the virtual machine to generate the new image.
15. The apparatus according to any one of claims 10-13, further comprising a monitoring processing module for:
and in the process of generating the new mirror image, a real-time monitoring mechanism is called to monitor each step and key indexes, so that when an error or abnormal condition is monitored, an error processing mechanism is triggered to process.
16. The apparatus of claim 15, wherein the monitor processing module is configured to:
analyzing the error type when an error or abnormal condition is monitored;
in response to the error type being a temporary error, performing an error automatic recovery mechanism;
in response to the error type being a rollback error, performing an automatic rollback mechanism to restore the new image generation process to a state prior to the error occurrence;
in response to the error type being a non-rollback error, a notification administrator mechanism is performed.
17. The apparatus of any one of claims 10-13, wherein the apparatus further comprises a version control module to:
receiving a version number configured by a second user for the new image; and
receiving one of adding, deleting and changing metadata of a new mirror image by a second user to obtain a first mirror image, and receiving a version number configured for the first mirror image;
in response to a selective upload operation of the first image, uploading the first image to a cloud computing platform to generate an automation script set corresponding to the first image and adapted to different image types based on the cloud computing platform;
and inquiring other images related to the name and version number of the first image, and establishing the related relation between the first image and the other images.
18. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-9.
19. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-9.
20. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-9.
CN202311109061.7A 2023-08-31 2023-08-31 Mirror image processing method and device Pending CN117149224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311109061.7A CN117149224A (en) 2023-08-31 2023-08-31 Mirror image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311109061.7A CN117149224A (en) 2023-08-31 2023-08-31 Mirror image processing method and device

Publications (1)

Publication Number Publication Date
CN117149224A true CN117149224A (en) 2023-12-01

Family

ID=88898195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311109061.7A Pending CN117149224A (en) 2023-08-31 2023-08-31 Mirror image processing method and device

Country Status (1)

Country Link
CN (1) CN117149224A (en)

Similar Documents

Publication Publication Date Title
US10419546B2 (en) Migration assessment for cloud computing platforms
CN108304201B (en) Object updating method, device and equipment
EP3835987B1 (en) Method and system for automatically identifying and correcting security vulnerabilities in containers
RU2419854C2 (en) Template based service management
JP5982366B2 (en) Systems and methods for private cloud computing
CN112564988B (en) Alarm processing method and device and electronic equipment
US11062022B1 (en) Container packaging device
US8954859B2 (en) Visually analyzing, clustering, transforming and consolidating real and virtual machine images in a computing environment
US11995453B2 (en) Method and apparatus for generating image file and computer-readable storage medium
US11144292B2 (en) Packaging support system and packaging support method
US20130111018A1 (en) Passive monitoring of virtual systems using agent-less, offline indexing
US20160098563A1 (en) Signatures for software components
US20220129539A1 (en) Embedding security requirements in container images
US20220179711A1 (en) Method For Platform-Based Scheduling Of Job Flow
US20230273959A1 (en) Computer-implemented methods, systems comprising computer-readable media, and electronic devices for narrative representation of a network computing environment
CN111694750A (en) Method and device for constructing software testing environment
CN115113972A (en) Application transformation method, system, cluster, medium and program product
WO2023151397A1 (en) Application program deployment method and apparatus, device, and medium
US20190370489A1 (en) Processing requests at a remote service to implement local data classification
CN117149224A (en) Mirror image processing method and device
CN114995941A (en) Task scheduling method and device and readable storage medium
CN114363079A (en) Distributed intelligent data supervision system of cloud platform
CN112817782A (en) Data acquisition reporting method and device, electronic equipment and storage medium
WO2021096346A1 (en) A computer-implemented system for management of container logs and its method thereof
WO2023218875A1 (en) System construction device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination