CN117459544A - Mirror synchronization method, device, equipment and storage medium - Google Patents

Mirror synchronization method, device, equipment and storage medium Download PDF

Info

Publication number
CN117459544A
CN117459544A CN202311473982.1A CN202311473982A CN117459544A CN 117459544 A CN117459544 A CN 117459544A CN 202311473982 A CN202311473982 A CN 202311473982A CN 117459544 A CN117459544 A CN 117459544A
Authority
CN
China
Prior art keywords
task
synchronization
mirror
mirror image
target
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
CN202311473982.1A
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.)
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Unicom Cloud Data Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Unicom Cloud Data 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 China United Network Communications Group Co Ltd, Unicom Digital Technology Co Ltd, Unicom Cloud Data Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202311473982.1A priority Critical patent/CN117459544A/en
Publication of CN117459544A publication Critical patent/CN117459544A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a mirror synchronization method, a device, equipment and a storage medium. The method comprises the following steps: acquiring at least one mirror image pushing task from a mirror image pushing task queue; responding to the task pushing state as an initial state, modifying the task pushing state into an executing state, controlling target pushing cloud resource pool management equipment corresponding to the target pushing cloud resource pool identifier to create a mirror image synchronous task corresponding to the mirror image pushing task through an application program control interface corresponding to the target pushing cloud resource pool identifier, and adding the mirror image synchronous task to a mirror image synchronous task queue; the mirror synchronization task is used for indicating the target pushing cloud resource pool management equipment to acquire a target synchronization mirror image from the object storage equipment according to the target synchronization mirror image identification, and importing the target synchronization mirror image into the target pushing cloud resource pool to realize mirror synchronization. The method improves the mirror image synchronization efficiency and can be suitable for various types of mirror images.

Description

Mirror synchronization method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for synchronizing images.
Background
With the development of cloud computing technology, more and more enterprises and users choose to deploy servers in the cloud. The user can pack the application program and the operating system into an independent virtual machine image file through the image technology, and upload the image file to the cloud platform, so that the application program can be rapidly deployed and updated.
At present, an image file can only be managed through an image service glance provided by a cloud platform, and the glance can only manage the image of a cloud host in a cloud resource pool. Therefore, when a new image needs to be released or an existing image needs to be updated, the following two ways can only be adopted to realize image synchronization. The first way is to upload the new image into the cloud resource pool and import it through the glance. The second way is to upload the new image to the global wide area network web service in a publicly readable way, and set url of the new image to the glace of the cloud resource pool, and download the new image from the web service by the glace and import the new image. The first method is suitable for all types of images, but uploading files in each cloud resource pool consumes a lot of time, so that the efficiency of image synchronization is low. The second approach is applicable only to public images and not to private images. Moreover, in the two modes, operation and maintenance personnel are required to log in each cloud resource pool to perform corresponding operation, and operation errors are very easy to occur along with the increase of the number of cloud pools and the number of mirror images.
In summary, the problem in the prior art is that all types of images cannot be synchronized timely and accurately.
Disclosure of Invention
The application provides a mirror image synchronization method, device, equipment and storage medium, which are used for solving the technical problem that all types of mirror images cannot be synchronized timely and accurately in the prior art.
In a first aspect, the present application provides a mirror synchronization method, which is applied to a mirror management server device, where the mirror management server device is located in a preset network architecture, and the preset network architecture further includes an object storage device and at least one cloud resource pool management device; the method comprises the following steps:
acquiring at least one mirror image pushing task from a mirror image pushing task queue; the mirror image pushing task is created by mirror image management server equipment and added to the mirror image pushing task queue; the mirror image pushing task comprises a task pushing state, a target pushing mirror image identifier and a target pushing cloud resource pool identifier; the task pushing state when the mirror image pushing task is created is an initial state;
responding to the task pushing state as an initial state, modifying the task pushing state into an executing state, controlling target pushing cloud resource pool management equipment corresponding to a target pushing cloud resource pool identifier to create a mirror synchronization task corresponding to the mirror synchronization task through an application program control interface corresponding to the target pushing cloud resource pool identifier, and adding the mirror synchronization task to a mirror synchronization task queue; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state; the target synchronous mirror image identifier is a target push mirror image identifier of a corresponding mirror image push task; the mirror synchronization task is used for indicating the target pushing cloud resource pool management device to acquire a target synchronization mirror image from the object storage device according to the target synchronization mirror image identification, and importing the target synchronization mirror image into the target pushing cloud resource pool to realize mirror synchronization.
Optionally, in the method, the controlling, through an application control interface corresponding to the target push cloud resource pool identifier, the target push cloud resource pool management device corresponding to the target push cloud resource pool identifier to create a mirror synchronization task corresponding to the mirror push task, and adding the mirror synchronization task to a mirror synchronization task queue includes:
sending a mirror image synchronization request to target pushing cloud resource pool management equipment through an application program control interface corresponding to a target pushing cloud resource pool identifier; the mirror synchronization request comprises a target push mirror identifier; the mirror synchronization request is used for indicating the target pushing cloud resource pool management device to create a mirror synchronization task, determining the target pushing mirror identification as a target synchronization mirror identification of the mirror synchronization task, and adding the mirror synchronization task to a mirror synchronization task queue.
Optionally, in the method as described above, the responding to the task pushing state being an initial state, modifying the task pushing state to an executing state, controlling, by an application control interface corresponding to a target pushing cloud resource pool identifier, a target pushing cloud resource pool management device corresponding to the target pushing cloud resource pool identifier to create a mirror synchronization task corresponding to the mirror pushing task, and adding the mirror synchronization task to a mirror synchronization task queue, further includes:
Acquiring the task pushing state according to a first time interval until the task pushing state is not an execution state or until the mirror image pushing task is deleted;
responding to the acquisition that the task pushing state is an executing state, and according to a second time interval, receiving a task synchronization state of the mirror image synchronization task sent by the target pushing cloud resource pool management device through an application program query interface corresponding to a target pushing cloud resource pool identifier until the task synchronization state of the mirror image synchronization task is received as a completion state or a failure state, and correspondingly modifying the task pushing state as the completion state or the failure state; the second time interval is less than the first time interval.
Optionally, the method as described above, before the obtaining at least one mirror image push task from the mirror image push task queue, further includes:
receiving a mirror image pushing request sent by mirror image management client equipment; the image pushing request comprises a target image identifier;
verifying whether the target image can be pushed according to the image pushing request;
and responding to the verification result of the target image as being pushable, creating at least one image pushing task according to the image pushing request, and adding each image pushing task to the image pushing task queue.
Optionally, the method as described above, the image push request further includes a target image download address and at least one target cloud resource pool identifier; the method for verifying the target mirror image includes the steps that the verification result of the target mirror image is pushable, at least one mirror image push task is created according to the mirror image push request, and before each mirror image push task is added to the mirror image push task queue, the method further includes:
downloading a target image file according to the target image downloading address;
performing format conversion on the target image file;
and uploading the target image file after format conversion to the object storage device.
In a second aspect, the present application provides a mirror synchronization method, applied to a cloud resource pool management device, where the cloud resource pool management device is located in a preset network architecture, and the preset network architecture further includes an object storage device and a mirror management server device, where the method includes:
acquiring at least one mirror synchronous task from a mirror synchronous task queue; the mirror image synchronization task is created and added to the mirror image synchronization task queue by the cloud resource pool management device under the control of the mirror image management server device; the cloud resource pool management equipment is controlled by the mirror image management server equipment through an application program control interface corresponding to the cloud resource pool; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state;
And responding to the task synchronization state as an initial state, modifying the task synchronization state into an execution state, acquiring a target synchronization mirror image from the object storage device according to the target synchronization mirror image identification, and importing the target synchronization mirror image into a cloud resource pool to realize mirror image synchronization.
Optionally, the method as described above, before the obtaining at least one mirror synchronization task from the mirror synchronization task queue, further includes:
and responding to the control of the mirror image management server-side equipment through the application program control interface corresponding to the cloud resource pool, creating a mirror image synchronous task, and adding the mirror image synchronous task to a mirror image synchronous task queue.
Optionally, in the method as described above, the responding to the control of the mirror management server device through the application control interface corresponding to the cloud resource pool creates a mirror synchronization task, and adds the mirror synchronization task to a mirror synchronization task queue, including:
receiving a mirror image synchronization request sent by the mirror image management server-side equipment through an application program control interface corresponding to a cloud resource pool; the mirror synchronization request comprises a target push mirror identifier;
Creating a mirror synchronization task, determining the target push mirror identifier as a target synchronization mirror identifier of the mirror synchronization task, and adding the mirror synchronization task to a mirror synchronization task queue.
Optionally, in the method as described above, after the responding to the task synchronization state being the initial state, modifying the task synchronization state to the execution state, obtaining the target synchronization image from the object storage device according to the target synchronization image identifier, and importing the target synchronization image into a cloud resource pool to achieve image synchronization, the method further includes:
responding to successful acquisition of the target synchronous mirror image and successful introduction of the cloud resource pool, and modifying the task synchronous state into a completion state;
responding to failure of acquisition of the target synchronous mirror image or failure of importing a cloud resource pool, and modifying the task synchronous state into a failure state;
and according to a second time interval, responding to the query of the mirror image management server-side equipment through the application program query interface corresponding to the cloud resource pool, and sending the task synchronization state of the mirror image synchronization task to the mirror image management server-side equipment until the task synchronization state of the mirror image synchronization task is a completion state or a failure state.
In a third aspect, the present application provides a synchronization apparatus, which is applied to a mirror management server device, where the mirror management server device is located in a preset network architecture, and the preset network architecture further includes an object storage device and at least one cloud resource pool management device; the device comprises:
the acquisition module is used for acquiring at least one mirror image pushing task from the mirror image pushing task queue; the mirror image pushing task is created by mirror image management server equipment and added to the mirror image pushing task queue; the mirror image pushing task comprises a task pushing state, a target pushing mirror image identifier and a target pushing cloud resource pool identifier; the task pushing state when the mirror image pushing task is created is an initial state;
the synchronous module is used for responding to the task pushing state as an initial state, modifying the task pushing state into an execution state, controlling target pushing cloud resource pool management equipment corresponding to the target pushing cloud resource pool identifier to create a mirror synchronous task corresponding to the mirror synchronous task through an application program control interface corresponding to the target pushing cloud resource pool identifier, and adding the mirror synchronous task to a mirror synchronous task queue; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state; the target synchronous mirror image identifier is a target push mirror image identifier of a corresponding mirror image push task; the mirror synchronization task is used for indicating the target pushing cloud resource pool management device to acquire a target synchronization mirror image from the object storage device according to the target synchronization mirror image identification, and importing the target synchronization mirror image into the target pushing cloud resource pool to realize mirror synchronization.
In a fourth aspect, the present application provides a synchronization apparatus, applied to a cloud resource pool management device, where the cloud resource pool management device is located in a preset network architecture, and the preset network architecture further includes an object storage device and a mirror management server device, where the apparatus includes:
the acquisition module is used for acquiring at least one mirror synchronous task from the mirror synchronous task queue; the mirror image synchronization task is created and added to the mirror image synchronization task queue by the cloud resource pool management device under the control of the mirror image management server device; the cloud resource pool management equipment is controlled by the mirror image management server equipment through an application program control interface corresponding to the cloud resource pool; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state;
and the synchronization module is used for responding to the task synchronization state as an initial state, modifying the task synchronization state as an execution state, acquiring a target synchronization mirror image from the object storage device according to the target synchronization mirror image identifier, and importing the target synchronization mirror image into a cloud resource pool to realize mirror image synchronization.
In a fifth aspect, the present application provides a mirror management server device, where the mirror management server device is located in a preset network architecture, and the preset network architecture further includes an object storage device and at least one cloud resource pool management device; the mirror image management server device includes: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method as described in the first aspect.
In a sixth aspect, the present application provides a cloud resource pool management device, where the cloud resource pool management device is located in a preset network architecture, and the preset network architecture further includes an object storage device and a mirror management server device; the cloud resource pool management apparatus includes: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the method as described in the second aspect.
In a seventh aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for implementing the method according to the first or second aspect when executed by a processor.
In an eighth aspect, the present application provides a computer program product comprising a computer program for implementing the method according to the first or second aspect when the computer program is executed by a processor.
The mirror image synchronization method, the device, the equipment and the storage medium acquire at least one mirror image push task from the mirror image push task queue; the mirror image pushing task is created by mirror image management server equipment and added to the mirror image pushing task queue; the mirror image pushing task comprises a task pushing state, a target pushing mirror image identifier and a target pushing cloud resource pool identifier; the task pushing state when the mirror image pushing task is created is an initial state; responding to the task pushing state as an initial state, modifying the task pushing state into an executing state, controlling target pushing cloud resource pool management equipment corresponding to a target pushing cloud resource pool identifier to create a mirror synchronization task corresponding to the mirror synchronization task through an application program control interface corresponding to the target pushing cloud resource pool identifier, and adding the mirror synchronization task to a mirror synchronization task queue; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state; the target synchronous mirror image identifier is a target push mirror image identifier of a corresponding mirror image push task; the mirror synchronization task is used for indicating the target pushing cloud resource pool management device to acquire a target synchronization mirror image from the object storage device according to the target synchronization mirror image identification, and importing the target synchronization mirror image into the target pushing cloud resource pool to realize mirror synchronization. Because the image files are stored in the object storage device, the object storage device can support a plurality of cloud resource pools to read the image files concurrently, private images can be prevented from being disclosed, and various types of images are supported, so that the plurality of cloud resource pools can acquire the images from the object storage device concurrently, and the image synchronization efficiency is improved. Meanwhile, as the mirror image pushing task pushes one target pushing mirror image to one target pushing cloud resource pool, for the mirror images needing to be pushed to a plurality of cloud resource pools, the mirror image management server side equipment can create a plurality of mirror image pushing tasks, and after the mirror image management server side equipment adds the mirror image pushing task to the mirror image pushing queue, the mirror image management server side equipment can acquire the mirror image pushing task from the mirror image pushing task queue through a plurality of concurrent processes and perform concurrent processing, and meanwhile, the mirror image is pushed to a plurality of cloud resource pools, so that the mirror image synchronization efficiency is improved. Meanwhile, the mirror image management server side equipment can control the target pushing cloud resource pool management equipment corresponding to the target pushing cloud resource pool identifier through the application program control interface corresponding to the target cloud resource pool identifier, so that the mirror image management server side equipment can control a plurality of cloud resource pools to uniformly manage the cloud resources without logging in each cloud resource pool in sequence to operate. The cloud resource pool management device also can read the mirror image synchronization tasks from the mirror image synchronization task queues through a plurality of concurrent processes to perform concurrent processing, and simultaneously acquire a plurality of mirror images, so that mirror image synchronization efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a network architecture diagram corresponding to an application scenario of the mirror synchronization method provided in the present application;
fig. 2 is a flow chart of a mirror synchronization method according to an embodiment of the present application;
fig. 3 is a flow chart of a mirror synchronization method according to a second embodiment of the present application;
fig. 4 is a flow chart of a mirror synchronization method according to a third embodiment of the present application;
fig. 5 is a schematic diagram of a change in a task pushing state of a mirror image pushing task and a task synchronization state of a mirror image synchronization task according to a fourth embodiment of the present application;
fig. 6 is a schematic structural diagram of a mirror synchronization device according to a fifth embodiment of the present application;
fig. 7 is a schematic structural diagram of a mirror synchronization device according to a sixth embodiment of the present application;
fig. 8 is a schematic structural diagram of a mirror management server device according to a seventh embodiment of the present application;
fig. 9 is a schematic structural diagram of a cloud resource pool management device according to an eighth embodiment of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards, and provide corresponding operation entries for the user to select authorization or rejection.
The terms referred to in the present application are explained first.
An application programming interface, also known as an application programming interface, called application programming interface, an API for short, is a number of predefined functions that are designed to provide the ability for applications and developers to access a set of routines based on certain software or hardware without having to access source code or understand the details of the internal operating mechanisms.
The prior art to which the present application relates is described in detail below.
In the prior art, more and more enterprises and users choose to deploy servers in the cloud. The user can pack the application program and the operating system into an independent virtual machine image file through the image technology, and upload the image file to the cloud platform, so that the application program can be rapidly deployed and updated. However, the image file can only be managed through an image service glance provided by the cloud platform, and the glance can only manage the image of the cloud host in the cloud resource pool. Therefore, when a new image needs to be released or an existing image needs to be updated, the following two ways can only be adopted to realize image synchronization. The first mode is to maintain the mirror image needed to be used by each cloud resource pool through the gateway of each cloud resource pool, upload the mirror image file to the corresponding cloud resource pool management equipment, then convert the mirror image file into the format supported by the cloud platform, and then import the mirror image file after the format conversion into the corresponding cloud host through the gateway. The second way is to upload the new image to the global wide area network web service in a publicly readable way, and set url of the new image to the glace of the cloud resource pool, and download the new image from the web service by the glace and import the new image.
The first method is suitable for all types of images, but operation and maintenance personnel are required to log in each cloud resource pool in sequence to operate, and a large amount of time is required to be consumed for uploading and format conversion when the data volume of the image file is generally large, so that the time required for image synchronization operation can be increased linearly along with the number of the cloud resource stamps required to be imported by the images, and the efficiency of image synchronization is low. The second mode also requires operation and maintenance personnel to log in each cloud resource pool in sequence to operate, and is only applicable to public images but not private images.
In view of the problems in the prior art, the inventors propose the following inventive concepts: if multiple cloud resource pools can be managed uniformly, various types of images can be pushed to the corresponding cloud resource pools at the same time, and multiple image files can be imported into the cloud resource pools at the same time, so that the image synchronization efficiency can be improved, and various types of images can be supported.
Therefore, the inventor proposes the technical scheme of the application, which is applied to the mirror image management server-side equipment, wherein the mirror image management server-side equipment is positioned in a preset network architecture, and the preset network architecture further comprises an object storage device and at least one cloud resource pool management device; the method comprises the following steps: acquiring at least one mirror image pushing task from a mirror image pushing task queue; the mirror image pushing task is created by the mirror image management server side equipment and added to a mirror image pushing task queue; the mirror image pushing task comprises a task pushing state, a target pushing mirror image identifier and a target pushing cloud resource pool identifier; the task pushing state when the mirror image pushing task is created is an initial state; responding to the task pushing state as an initial state, modifying the task pushing state into an executing state, controlling target pushing cloud resource pool management equipment corresponding to the target pushing cloud resource pool identifier to create a mirror image synchronous task corresponding to the mirror image pushing task through an application program control interface corresponding to the target pushing cloud resource pool identifier, and adding the mirror image synchronous task to a mirror image synchronous task queue; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state; the target synchronous mirror image identifier is a target push mirror image identifier of the corresponding mirror image push task; the mirror synchronization task is used for indicating the target pushing cloud resource pool management equipment to acquire a target synchronization mirror image from the object storage equipment according to the target synchronization mirror image identification, and importing the target synchronization mirror image into the target pushing cloud resource pool to realize mirror synchronization. Because the image files are stored in the object storage device, the object storage device can support a plurality of cloud resource pools to read the image files concurrently, private images can be prevented from being disclosed, and various types of images are supported, so that the plurality of cloud resource pools can acquire the images from the object storage device concurrently, and the image synchronization efficiency is improved. Meanwhile, as the mirror image pushing task pushes one target pushing mirror image to one target pushing cloud resource pool, for the mirror images needing to be pushed to a plurality of cloud resource pools, the mirror image management server side equipment can create a plurality of mirror image pushing tasks, and after the mirror image management server side equipment adds the mirror image pushing task to the mirror image pushing queue, the mirror image management server side equipment can acquire the mirror image pushing task from the mirror image pushing task queue through a plurality of concurrent processes and perform concurrent processing, and meanwhile, the mirror image is pushed to a plurality of cloud resource pools, so that the mirror image synchronization efficiency is improved. Meanwhile, the mirror image management server side equipment can control the target pushing cloud resource pool management equipment corresponding to the target pushing cloud resource pool identifier through the application program control interface corresponding to the target cloud resource pool identifier, so that the mirror image management server side equipment can control a plurality of cloud resource pools to uniformly manage the cloud resources without logging in each cloud resource pool in sequence to operate. Because the mirror image management server side equipment controls the cloud resource pool management equipment to create a mirror image synchronization task corresponding to the mirror image pushing task through the application program control interface and adds the mirror image synchronization task to the mirror image synchronization task queue, the cloud resource pool management equipment can read the mirror image synchronization task from the mirror image synchronization task queue through a plurality of concurrent processes to perform concurrent processing, and simultaneously acquire a plurality of mirror images, so that mirror image synchronization efficiency is improved.
Fig. 1 is a network architecture diagram corresponding to an application scenario of the mirror synchronization method provided in the present application. As shown in fig. 1, the mirror synchronization method provided in the present application includes: the image management server device 10, the image management client device 11, at least one cloud resource pool management device 12, and an object storage device 13.
The mirror image management server device 10 is configured with a mirror image management service, the mirror image management server device 10 is in communication connection with the mirror image management client device 11, a user can send a mirror image push request to the mirror image management server device 10 through an application program interface of the mirror image management service on the mirror image management client device 11, or access a web page of the mirror image management service through a web address of the mirror image management service, trigger the mirror image push request in the web page, and the mirror image management client device 11 receives the mirror image push request triggered by the user and sends the mirror image push request to the mirror image management server device 10.
The image management server device 10 receives an image push request sent by the image management client device 11, where the image push request includes a target image identifier.
The image management server device 10 may store the target image to the object storage device 13 according to the target image identification.
The mirror management server device 10 may create a mirror push task according to the mirror push request, and may add the mirror push task to the mirror push task queue 101.
The mirror management server device 10 obtains at least one mirror push task from the mirror push task queue 101. The mirror image pushing task is created by the mirror image management server side equipment and added to a mirror image pushing task queue; the mirror image pushing task comprises a task pushing state, a target pushing mirror image identifier and a target pushing cloud resource pool identifier; the task push state when the mirror push task is created is the initial state.
The mirror image management server device 10 modifies the task push state into the execution state in response to the task push state being the initial state, and controls the target push cloud resource pool management device 12 corresponding to the target push cloud resource pool identifier to create a mirror image synchronization task corresponding to the mirror image push task through the application control interface corresponding to the target push cloud resource pool identifier, and adds the mirror image synchronization task to the mirror image synchronization task queue 121. The mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state; the target synchronous mirror image identifier is a target push mirror image identifier of the corresponding mirror image push task; the mirror synchronization task is used for indicating the target pushing cloud resource pool management device 12 to acquire a target synchronization mirror image from the object storage device 13 according to the target synchronization mirror image identification, and importing the target synchronization mirror image into the target pushing cloud resource pool to realize mirror synchronization.
The cloud resource pool management device 12 is controlled by the mirror image management server device 11 through an application control interface corresponding to the cloud resource pool, and the cloud resource pool management device 12 creates a mirror image synchronization task and adds the mirror image synchronization task to the mirror image synchronization task queue 121 under the control of the mirror image management server device 11. The mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is the initial state.
The cloud resource pool management apparatus 12 acquires at least one mirror synchronization task from the mirror synchronization task queue 121; and in response to the task synchronization state being the initial state, modifying the task synchronization state to an execution state, acquiring a target synchronization mirror image from the object storage device 13 according to the target synchronization mirror image identifier, and importing the target synchronization mirror image into the cloud resource pool to realize mirror image synchronization.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Example 1
Fig. 2 is a flowchart of a mirror synchronization method according to an embodiment of the present application. As shown in fig. 2, the execution body of the embodiment is a mirror synchronization device, and the pair of mirror synchronization devices are located in a mirror management server device. The mirror image management server side equipment is located in a preset network architecture, and the preset network architecture further comprises an object storage device and at least one cloud resource pool management device. The mirror synchronization method includes steps 201 to 202.
Step 201, obtaining at least one mirror image push task from a mirror image push task queue; the mirror image pushing task is created by the mirror image management server side equipment and added to a mirror image pushing task queue; the mirror image pushing task comprises a task pushing state, a target pushing mirror image identifier and a target pushing cloud resource pool identifier; the task push state when the mirror push task is created is the initial state.
In this embodiment, the image push task may be created by the image management server device according to an image push request sent by the image management client device. The image push request can comprise a target push image identifier and a target push cloud resource pool identifier, and the image push task can comprise a task push state, the target push image identifier and the target push cloud resource pool identifier. When the mirror image management client device creates the mirror image push task, the task push state of the mirror image push task can be determined to be an initial state, and after the mirror image management client device creates the mirror image push task, the mirror image push task can be added to the tail end of the mirror image push task queue.
The mirror image management server side equipment can process at least one mirror image push task through at least one mirror image push thread, that is, the mirror image management server side equipment can acquire the mirror image push task from the mirror image push task queue through a plurality of mirror image push threads, and simultaneously process the plurality of mirror image push tasks in parallel. Each mirror image pushing thread obtains a mirror image pushing task from the head end of the mirror image pushing task queue.
Step 202, in response to the task pushing state being an initial state, modifying the task pushing state to an execution state, controlling a target pushing cloud resource pool management device corresponding to the target pushing cloud resource pool identifier to create a mirror synchronization task corresponding to the mirror pushing task through an application control interface corresponding to the target pushing cloud resource pool identifier, and adding the mirror synchronization task to a mirror synchronization task queue; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state; the target synchronous mirror image identifier is a target push mirror image identifier of the corresponding mirror image push task; the mirror synchronization task is used for indicating the target pushing cloud resource pool management equipment to acquire a target synchronization mirror image from the object storage equipment according to the target synchronization mirror image identification, and importing the target synchronization mirror image into the target pushing cloud resource pool to realize mirror synchronization.
In this embodiment, for any mirror image push thread, if the task push state of the mirror image push task is obtained as an initial state, the task push state may be modified into an execution state, and meanwhile, according to a target push cloud resource pool identifier included in the mirror image push task, an application program control interface corresponding to the target push cloud resource pool identifier is used to control a target push cloud resource pool management device corresponding to the target push cloud resource pool identifier to create a mirror image synchronization task corresponding to the mirror image push task, and the mirror image synchronization task is added to a mirror image synchronization task queue.
The cloud resource pool management device creates a mirror image synchronous task corresponding to the mirror image pushing task under the control of the mirror image management server device, and adds the mirror image synchronous task to the tail end of the mirror image pushing task queue.
The cloud resource pool management device can acquire at least one mirror image synchronous task from the mirror image synchronous task queue through at least one mirror image synchronous thread for processing, that is, the cloud resource pool management device can simultaneously process a plurality of mirror image synchronous tasks through a plurality of mirror image synchronous threads. Each mirror synchronization thread acquires a mirror synchronization task from the head end of a mirror synchronization task queue.
According to the mirror image synchronization method provided by the embodiment, at least one mirror image push task is obtained from a mirror image push task queue; the mirror image pushing task is created by the mirror image management server side equipment and added to a mirror image pushing task queue; the mirror image pushing task comprises a task pushing state, a target pushing mirror image identifier and a target pushing cloud resource pool identifier; the task pushing state when the mirror image pushing task is created is an initial state; responding to the task pushing state as an initial state, modifying the task pushing state into an executing state, controlling target pushing cloud resource pool management equipment corresponding to the target pushing cloud resource pool identifier to create a mirror image synchronous task corresponding to the mirror image pushing task through an application program control interface corresponding to the target pushing cloud resource pool identifier, and adding the mirror image synchronous task to a mirror image synchronous task queue; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state; the target synchronous mirror image identifier is a target push mirror image identifier of the corresponding mirror image push task; the mirror synchronization task is used for indicating the target pushing cloud resource pool management equipment to acquire a target synchronization mirror image from the object storage equipment according to the target synchronization mirror image identification, and importing the target synchronization mirror image into the target pushing cloud resource pool to realize mirror synchronization. Because the image files are stored in the object storage device, the object storage device can support a plurality of cloud resource pools to read the image files concurrently, private images can be prevented from being disclosed, and various types of images are supported, so that the plurality of cloud resource pools can acquire the images from the object storage device concurrently, and the image synchronization efficiency is improved. Meanwhile, as the mirror image pushing task pushes one target pushing mirror image to one target pushing cloud resource pool, for the mirror images needing to be pushed to a plurality of cloud resource pools, the mirror image management server side equipment can create a plurality of mirror image pushing tasks, and after the mirror image management server side equipment adds the mirror image pushing task to the mirror image pushing queue, the mirror image management server side equipment can acquire the mirror image pushing task from the mirror image pushing task queue through a plurality of concurrent processes and perform concurrent processing, and meanwhile, the mirror image is pushed to a plurality of cloud resource pools, so that the mirror image synchronization efficiency is improved. Meanwhile, the mirror image management server side equipment can control the target pushing cloud resource pool management equipment corresponding to the target pushing cloud resource pool identifier through the application program control interface corresponding to the target cloud resource pool identifier, so that the mirror image management server side equipment can control a plurality of cloud resource pools to uniformly manage the cloud resources without logging in each cloud resource pool in sequence to operate. Because the mirror image management server side equipment controls the cloud resource pool management equipment to create a mirror image synchronization task corresponding to the mirror image pushing task through the application program control interface and adds the mirror image synchronization task to the mirror image synchronization task queue, the cloud resource pool management equipment can read the mirror image synchronization task from the mirror image synchronization task queue through a plurality of concurrent processes to perform concurrent processing, and simultaneously acquire a plurality of mirror images, so that mirror image synchronization efficiency is improved.
Optionally, in step 202, "the image synchronization task corresponding to the image push task is created by the application control interface corresponding to the target push cloud resource pool identifier, and the image synchronization task is added to the image synchronization task queue by the target push cloud resource pool management device corresponding to the target push cloud resource pool identifier" is controlled, which includes step 301.
Step 301, sending a mirror synchronization request to a target pushing cloud resource pool management device through an application control interface corresponding to a target pushing cloud resource pool identifier; the mirror synchronization request comprises a target push mirror identifier; the mirror synchronization request is used for indicating the target pushing cloud resource pool management equipment to create a mirror synchronization task, determining a target pushing mirror identifier as a target synchronization mirror identifier of the mirror synchronization task, and adding the mirror synchronization task to a mirror synchronization task queue.
In this embodiment, an application control interface corresponding to each cloud resource pool in the network architecture is prestored in the mirror image management server device. The mirror image management server side equipment can determine an application program control interface corresponding to the target pushing cloud resource pool identifier through the target pushing cloud resource pool identifier included in the mirror image pushing task.
Specifically, the mirror image management server side device may call an application control interface corresponding to the target push cloud resource pool identifier, and send a mirror image synchronization request to the target cloud resource pool management device. The mirror synchronization request includes a target push mirror identifier, which may be a parameter of an application control interface corresponding to the call target push cloud resource pool identifier.
The mirror synchronization task may include a target synchronization identifier, which may be a target push mirror identifier included in the mirror synchronization request.
According to the mirror image synchronization method, the application program control interface corresponding to the cloud resource pool enables the mirror image management server side equipment to directly control cloud resource pool management, and further, when the mirror image is required to be pushed to the cloud resource pool management, the cloud resource pool management does not need to be logged in, and mirror image synchronization efficiency is improved.
Optionally, after step 202, steps 401 to 402 are further included.
Step 401, acquiring a task push state according to a first time interval until the acquired task push state is not an execution state, or until the mirror image push task is deleted.
In this embodiment, the mirror image management server device may acquire the task push state according to the first preset time interval until the mirror image push task is deleted, or acquire that the task push state is not the execution state. Specifically, when the task push state is not the execution state, it may be an initial state, a completion state, a failure state, or the like.
Step 402, in response to obtaining that the task pushing state is an executing state, receiving a task synchronization state of a mirror synchronization task sent by the target pushing cloud resource pool management device through an application query interface corresponding to the target pushing cloud resource pool identifier at a second time interval until the task synchronization state of the mirror synchronization task is received as a completion state or a failure state, and correspondingly modifying the task pushing state as the completion state or the failure state; the second time interval is less than the first time interval.
In this embodiment, if the task push state is obtained as the execution state, it indicates that the mirror image push task is being executed, and the mirror image management server device may query the task synchronization state of the mirror image synchronization task corresponding to the mirror image push task through the application query interface corresponding to the target push cloud resource pool identifier. And the task synchronization state of the mirror image synchronization task is sent to the mirror image management server-side equipment by the target pushing cloud resource pool management equipment through the corresponding application program query interface.
After the mirror synchronization task is acquired, if the task synchronization state of the mirror synchronization task is an initial state, the task state of the mirror synchronization task can be modified into an execution state, a target synchronization mirror image is acquired from the object storage device according to the target synchronization mirror image identification, and the target synchronization mirror image is imported into the cloud resource pool to realize mirror synchronization.
If the cloud resource pool management device successfully acquires the target synchronous mirror image from the object storage device and successfully guides the target synchronous mirror image into the cloud resource pool, the task state of the mirror image synchronous task can be modified into a synchronous completion state. If the cloud resource pool management device fails to acquire the target synchronous mirror image from the object storage device or fails to import the target synchronous mirror image into the cloud resource pool, the task synchronous state can be modified into a synchronous failure state.
And if the task synchronous state of the mirror image synchronous task received by the mirror image management server-side equipment is the synchronous completion state, modifying the task push state of the mirror image push task corresponding to the mirror image synchronous task into the push completion state. If the task synchronization state of the mirror image synchronization task received by the mirror image management server-side equipment is a synchronization failure state, the task pushing state of the mirror image pushing task corresponding to the mirror image synchronization task is modified to be a pushing failure state. If the task synchronization state of the mirror image synchronization task received by the mirror image management server-side equipment is the execution state, the task synchronization state of the mirror image synchronization task is continuously inquired according to the second time interval. The second time interval is less than the first time interval, which may be an integer multiple of the second time interval.
Optionally, if the task synchronization status of the mirror image synchronization task received by the mirror image management server device is a synchronization failure status, a synchronization failure message may be sent to the mirror image management client device, so that the mirror image management client device outputs the synchronization failure message to the user. After the user acquires the synchronization failure message, the user can send a synchronization retry instruction or a task deletion instruction to the mirror management server device through an application program interface of the mirror management service.
The mirror image management server side equipment responds to the task deleting instruction, deletes the mirror image pushing task, and controls the target cloud resource pool management equipment to delete the mirror image synchronous task corresponding to the mirror image pushing task through the application program control interface corresponding to the target cloud resource pool. The mirror image management server side equipment responds to the synchronization retry instruction, controls the target cloud resource pool management equipment to synchronously retry the mirror image synchronization task corresponding to the push task through an application program control interface corresponding to the target cloud resource pool, and illustratively, controls the target cloud resource pool management equipment to modify the task synchronization state of the mirror image synchronization task from the synchronization failure state to an initial state and re-add the initial state to the mirror image synchronization task queue.
According to the mirror image synchronization method provided by the embodiment, the mirror image synchronization state of the mirror image pushing task is obtained through the second time interval, the task pushing state of the mirror image pushing task can be updated timely according to the mirror image synchronization state of the corresponding mirror image pushing task, the task pushing state of the mirror image pushing task is obtained through the first time interval, the failure state of the mirror image pushing task can be obtained timely, and further the failed mirror image pushing task is processed timely.
Example two
Fig. 3 is a flow chart of a mirror synchronization method according to a second embodiment of the present application. As shown in fig. 3, the mirror synchronization method provided in this embodiment further includes steps 501 to 503 before step 201 on the basis of the first embodiment.
Step 501, receiving a mirror push request sent by a mirror management client device; the image push request includes a target image identification.
In this embodiment, a user may trigger a mirror image push request in a mirror image management client device, where the mirror image management client device sends the mirror image push request to a mirror image management server device in response to receiving the mirror image push request triggered by the user. The user is a user who needs to update the image file of the cloud host or upload the image file to the cloud host.
The image push request includes a target image identifier, which is an identifier of an image to be synchronized. Illustratively, if the user needs to update a certain image in the cloud host, the target image is identified as the image that needs to be updated.
Step 502, verifying whether the target image can be pushed according to the image push request.
In this embodiment, the image push request may include an image management client identifier. The mirror image management server device can pre-store a mirror image list allowed to be managed by the mirror image management client device, can determine the mirror image list allowed to be managed by the mirror image management client device according to the mirror image management client device identification, and can verify whether the target mirror image can be pushed according to whether the target mirror image identification exists in the mirror image list allowed to be managed by the mirror image management client device.
Optionally, the image push request may further include target image attribute information and a target image download address. And, step 502 refinement includes steps 5021 to 5024.
Step 5021, determining whether the target image download address is accessible.
Step 5022, determining whether the target image attribute information meets a preset image pushable condition.
In step 5023, in response to the target image download address being accessible, and the target image attribute information meeting the image pushable condition of the corresponding target push cloud resource pool, determining the verification result of whether the target image is pushable as pushable.
In step 5024, in response to the target image download address being inaccessible, or the target image attribute information not meeting the image pushable condition of the corresponding target push cloud resource pool, determining the verification result of whether the target image is pushable as not pushable.
In this embodiment, whether the target image download address is accessible refers to whether the target image can be downloaded from the target image download address. The target image attribute information may include a target image type, a file format of the target image, a file size of the target image, and the like. The mirror image type refers to whether the mirror image is a private mirror image or a public mirror image.
Each cloud resource pool may have preset image pushable conditions, where the image pushable conditions may include image attributes that allow pushing, and for example, the cloud resource pool may not allow pushing a public image, not allow pushing an image in a certain file format, and so on. The mirror image pushable conditions of the cloud resource pools can be stored in the mirror image management server side equipment in advance, and whether the target mirror image attribute information meets the mirror image pushable conditions of the corresponding target pushable cloud resource pools can be determined.
Optionally, in response to the verification result of whether the target image is pushable or not being determined as being not pushable, the image management server device may send an image pushing abnormal response to the image management client device, so as to remind a user that the target image download address is not accessible, or that the target image attribute information does not meet the image pushable condition of the corresponding target pushing cloud resource pool.
In step 503, in response to the verification result of the target image being pushable, at least one image pushing task is created according to the image pushing request, and each image pushing task is added to the image pushing task queue.
In this embodiment, if the verification result of the target image is that the target image is pushable, the image management server device may create at least one image pushing task according to the image pushing request. Specifically, the mirror image management server device may use a target mirror image identifier included in the mirror image push request as a target push mirror image identifier, use each target cloud resource pool identifier included in the mirror image push request as each target push cloud resource pool identifier, and create each mirror image push task so as to push the target mirror image to each target cloud resource pool.
According to the mirror image synchronization method, at least one mirror image pushing task is created according to the mirror image pushing request, when the target mirror image needs to be pushed to a plurality of cloud resource pools, the target mirror image is pushed to the plurality of cloud resource pools through the plurality of mirror image pushing tasks which can be parallel, and therefore mirror image synchronization efficiency is improved.
Optionally, the image push request further includes a target image download address and at least one target cloud resource pool identifier, and before step 503, steps 601 to 603 are further included.
And step 601, downloading the target image file according to the target image downloading address.
Step 602, format conversion is performed on the target image file.
And 603, uploading the target image file after format conversion to the object storage device.
In this embodiment, after receiving the image push request, the image management server device may create an image upload task of the target image, and add the image upload task to the tail end of the image download task queue. The image uploading task comprises an image uploading state, a target image downloading address and a target image identifier. When the image uploading task is created, the image management server device determines the image uploading state as an initial state.
The image management server side equipment can acquire the image uploading task from the head end of the image uploading task queue through at least one downloading thread. If the image uploading state of the image uploading task acquired by the downloading thread is the initial state, the target image downloading address can be accessed, the target image file is downloaded from the target image downloading address, and the task state of the image uploading task is modified to be the downloading state. If the downloading thread successfully downloads the target image from the target image downloading address, the task state of the image uploading task can be modified into a downloading completion state. If the downloading thread fails to download the target image from the target image downloading address, the task state of the image uploading task can be modified into a downloading failure state.
For the image uploading task acquired by the downloading thread, the image management server side equipment can acquire the image uploading state of the image uploading task according to a third time interval until the image uploading state of the image uploading task is not the downloading state.
If the image management server side equipment obtains that the image uploading state of the image uploading task is the downloading completion state, the image uploading task can be added to the tail end of the format task transferring queue.
The image management server device can obtain an image uploading task from the head end of the format conversion task queue through at least one format conversion thread. If the image uploading state of the image uploading task acquired by the format conversion thread is the downloading completion state, transcoding and compressing the target image according to the target image identification, and modifying the image uploading state of the image uploading task into the in-conversion state. If the format conversion thread successfully transcodes and compresses the target image, the image uploading state of the image uploading task can be modified into a conversion completion state. If the format conversion thread fails to transcode and compress the target image, the image uploading state of the image uploading task can be modified into a conversion failure state.
For the image uploading task acquired by the format conversion thread, the image management server device can acquire the image uploading state of the image uploading task according to the fourth time interval until the image uploading state of the image uploading task is not the in-conversion state.
If the image management server side equipment obtains that the image uploading state of the image uploading task is the conversion completion state, the image uploading task can be added to the tail end of the image uploading task queue.
The image management server side equipment can acquire the image uploading task from the head end of the image uploading task queue through at least one image uploading thread. If the image uploading state of the image uploading task obtained by the image uploading thread is the conversion completion state, uploading the target image after conversion compression to the object storage device according to the target image identification, and modifying the image uploading state of the image uploading task into the uploading state. If the image uploading thread successfully uploads the target image after the conversion compression is completed to the object storage device, the image uploading state of the image uploading task can be modified into an uploading completion state. If the image uploading thread fails to upload the target image after the conversion compression to the object storage device, the image uploading state of the image uploading task can be modified into an uploading failure state.
For the image uploading task acquired by the image uploading thread, the image management server side equipment can acquire the image uploading state of the image uploading task according to the fourth time interval until the image uploading state of the image uploading task is not the uploading state.
For the image uploading task acquired by the downloading thread, if the image management server side equipment acquires that the image uploading state of the image uploading task is the downloading failure state, a downloading failure message can be sent to the image management client side equipment, so that the image management client side equipment outputs the downloading failure message to a user. After the user obtains the download failure message, the user can control the mirror management server device to retry the download of the mirror uploading task through the application program interface of the mirror management service, for example, control the mirror management server device to modify the mirror uploading state of the mirror uploading task into an initial state and re-add the mirror uploading task to the tail end of the mirror downloading task queue.
For the image uploading task acquired by the format conversion thread, if the image management server side equipment acquires that the image uploading state of the image uploading task is a conversion failure state, a conversion failure message can be sent to the image management client side equipment, so that the image management client side equipment outputs the conversion failure message to a user. After the user obtains the conversion failure message, the user can control the image management server device to retry transcoding compression of the image uploading task through an application program interface of the image management service, for example, control the image management server device to modify the image uploading state of the image uploading task into a downloading completion state, and re-add the image uploading task to the tail end of the format transferring task queue.
For the image uploading task acquired by the image uploading thread, if the image management server side equipment acquires that the image uploading state of the image uploading task is the uploading failure state, an uploading failure message can be sent to the image management client side equipment, so that the image management client side equipment outputs the uploading failure message to a user. After the user acquires the uploading failure message, the user can control the image management server device to retry uploading of the image uploading task through an application program interface of the image management service, for example, control the image management server device to modify the image uploading state of the image uploading task into a conversion completion state and re-add the image uploading task to the tail end of the image uploading task queue.
According to the mirror image synchronization method provided by the embodiment, the target mirror image file is downloaded according to the target mirror image downloading address; performing format conversion on the target image file; and uploading the target image file after format conversion to the object storage device. The target image file after format conversion can be added to the object storage device, so that a plurality of cloud resource pools can acquire the target image from the object storage device simultaneously.
Optionally, the image pushing request further includes a preset hash value of the target image, where the preset hash value is a hash value calculated and processed by a preset hash algorithm of the target image file; and for the target image file downloaded from the target image downloading place, the safety and the integrity of the target image file can be checked through a preset hash algorithm and a preset hash value.
Optionally, converting and compressing the target image, and dividing the target image file into a plurality of fragments with the upper limit of 32M; and uploading the converted and compressed target image, and sequentially uploading a plurality of fragments with the upper limit of 32M.
Example III
Fig. 4 is a flow chart of a mirror synchronization method according to a third embodiment of the present application. As shown in fig. 4, the execution body of the embodiment is a mirror synchronization device, and the mirror synchronization device is located in the cloud resource pool management apparatus. The cloud resource pool management device is located in a preset network architecture, and the preset network architecture further comprises an object storage device and a mirror image management server device. The mirror synchronization method provided in this embodiment includes steps 701 to 702.
Step 701, obtaining at least one mirror synchronous task from a mirror synchronous task queue; the mirror image synchronous task is created and added to a mirror image synchronous task queue by the cloud resource pool management equipment under the control of the mirror image management server equipment; the cloud resource pool management equipment is controlled by the mirror image management server equipment through an application program control interface corresponding to the cloud resource pool; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is the initial state.
In this embodiment, the cloud resource pool management device may receive, through an application control interface corresponding to the cloud resource pool, a mirror synchronization request sent by the mirror management server device; the mirror synchronization request includes a target push mirror identification. The cloud resource pool management equipment responds to the mirror image synchronization request, creates a mirror image synchronization task, determines a target push mirror image identifier as a target synchronization mirror image identifier of the mirror image synchronization task, and adds the mirror image synchronization task to a mirror image synchronization task queue.
In this embodiment, the cloud resource pool management device may acquire at least one mirror image synchronization task from the mirror image synchronization task queue through at least one task synchronization thread for processing, that is, the cloud resource pool management device may simultaneously perform concurrent processing on multiple mirror image synchronization tasks through multiple task synchronization threads. Each task synchronization thread acquires the mirror image synchronization task from the head end of the mirror image synchronization task queue.
Optionally, step 801 is further included before step 701.
Step 801, in response to control of the mirror management server device through the application control interface corresponding to the cloud resource pool, a mirror synchronization task is created, and the mirror synchronization task is added to a mirror synchronization task queue.
Optionally, step 801 refinement includes steps 901 through 902.
Step 901, receiving a mirror synchronization request sent by a mirror management server device through an application control interface corresponding to a cloud resource pool; the mirror synchronization request includes a target push mirror identification.
And step 902, creating a mirror synchronization task, determining a target push mirror identifier as a target synchronization mirror identifier of the mirror synchronization task, and adding the mirror synchronization task to a mirror synchronization task queue.
The image synchronization task is created and added to the image synchronization task queue by the cloud resource pool management device under the control of the image management server device, and specifically, reference may be made to the description in the first embodiment, which is not repeated herein.
According to the mirror image synchronization method, the control of the mirror image management server device is received through the application program control interface corresponding to the cloud resource pool, so that a user can control the cloud resource pool without logging in the cloud resource pool, and the mirror image synchronization tasks of the mirror images can be processed concurrently by the mirror image synchronization threads by adding the mirror image synchronization tasks to the mirror image synchronization task queue, and further mirror image synchronization efficiency is improved.
Step 702, in response to the task synchronization state being an initial state, modifying the task synchronization state to an execution state, acquiring a target synchronization mirror image from the object storage device according to the target synchronization mirror image identifier, and importing the target synchronization mirror image into the cloud resource pool to achieve mirror image synchronization.
In this embodiment, after the mirror synchronization task is acquired, if the task synchronization state of the mirror synchronization task is an initial state, the task state of the mirror synchronization task may be modified to an execution state, and a target synchronization mirror image is acquired from the object storage device according to the target synchronization mirror image identifier, and is imported into the cloud resource pool to implement mirror synchronization.
If the cloud resource pool management device successfully acquires the target synchronous mirror image from the object storage device and successfully imports the target synchronous mirror image into the cloud resource pool, the task state of the mirror image synchronous task can be modified into a completion state. If the cloud resource pool management device fails to acquire the target synchronous mirror image from the object storage device or fails to import the target synchronous mirror image into the cloud resource pool, the task synchronous state can be modified into a failure state.
According to the mirror image synchronization method provided by the embodiment, at least one mirror image synchronization task is obtained from a mirror image synchronization task queue; and in response to the task synchronization state being the initial state, modifying the task synchronization state into an execution state, acquiring a target synchronization mirror image from the object storage device according to the target synchronization mirror image identification, and importing the target synchronization mirror image into a cloud resource pool to realize mirror image synchronization. The cloud resource pool management device can obtain the target images from the object storage device in parallel and guide the target images into the cloud resource pool, so that the image synchronization efficiency can be improved.
Optionally, after step 702, steps 1001 to 1003 are further included.
In step 1001, in response to successful acquisition of the target synchronization image and successful import of the cloud resource pool, the task synchronization state is modified to a completion state.
In step 1002, in response to failure of acquisition of the target synchronous mirror image or failure of importing the cloud resource pool, the task synchronous state is modified to a failure state.
Step 1003, according to the second time interval, responding to the query of the mirror management server device through the application program query interface corresponding to the cloud resource pool, and sending the task synchronization state of the mirror synchronization task to the mirror management server device until the task synchronization state of the mirror synchronization task is a completion state or a failure state.
For an explanation of this embodiment, reference may be made to the description in step 402, which is not repeated here.
Optionally, the cloud resource pool management device may delete the mirror synchronization task in response to control of the mirror management server device through the application control interface corresponding to the cloud resource pool, or modify the task synchronization state of the mirror synchronization task from the synchronization failure state to an initial state, and re-add the same to the mirror synchronization task queue.
According to the mirror image synchronization method provided by the embodiment, the task synchronization state of the mirror image synchronization task is sent to the mirror image management server device through the query of the application program query interface corresponding to the cloud resource pool, so that the mirror image management server device can timely acquire the task synchronization state of the mirror image synchronization task, and further, corresponding processing is timely performed after the task synchronization is successful or failed.
Example IV
Fig. 5 is a schematic diagram illustrating a change in a task pushing state of a mirror image pushing task and a task synchronization state of a mirror image synchronization task according to a fourth embodiment of the present application. As shown in fig. 5, when the mirror image push task is created by the mirror image management server device, the task push state is an initial state, and after the mirror image push task is acquired by the mirror image push thread of the mirror image management server device, the task push state is modified into an execution state. The mirror synchronization task is in an initial state when being created by the cloud resource pool management device. After the mirror image pushing task is acquired by a task synchronization thread managed by the cloud resource pool, the task synchronization state is modified into an execution state.
The cloud resource pool management responds to the failure of acquiring the mirror image or the failure of importing the mirror image, modifies the task synchronization state of the mirror image synchronization task into a synchronization failure state, and sends the synchronization failure state of the mirror image synchronization task to the mirror image management server-side equipment. And the mirror image management server-side equipment responds to the received synchronization failure state of the mirror image synchronization task and modifies the task pushing state of the mirror image pushing task into a pushing failure state.
And the cloud resource pool management responds to successful image acquisition and successful image introduction, modifies the task synchronization state of the image synchronization task into a synchronization completion state, and sends the synchronization completion state of the image synchronization task to the image management server-side equipment. The mirror image management server-side equipment responds to the synchronous completion state of the mirror image synchronous task, and modifies the task push state of the mirror image push task into a push completion state.
Example five
Fig. 6 is a schematic structural diagram of a mirror synchronization device according to a fifth embodiment of the present application. As shown in fig. 6, the mirror synchronization apparatus provided in this embodiment is located in a mirror management server device. The mirror image management server side equipment is located in a preset network architecture, and the preset network architecture further comprises an object storage device and at least one cloud resource pool management device. The mirror synchronization device 60 comprises an acquisition module 61 and a synchronization module 62.
An obtaining module 61, configured to obtain at least one mirror image push task from a mirror image push task queue; the mirror image pushing task is created by the mirror image management server side equipment and added to a mirror image pushing task queue; the mirror image pushing task comprises a task pushing state, a target pushing mirror image identifier and a target pushing cloud resource pool identifier; the task push state when the mirror push task is created is the initial state.
The synchronization module 62 is configured to, in response to the task push state being an initial state, modify the task push state to an execution state, control, through an application control interface corresponding to the target push cloud resource pool identifier, create a mirror synchronization task corresponding to the mirror push task by using a target push cloud resource pool management device corresponding to the target push cloud resource pool identifier, and add the mirror synchronization task to a mirror synchronization task queue; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state; the target synchronous mirror image identifier is a target push mirror image identifier of the corresponding mirror image push task; the mirror synchronization task is used for indicating the target pushing cloud resource pool management equipment to acquire a target synchronization mirror image from the object storage equipment according to the target synchronization mirror image identification, and importing the target synchronization mirror image into the target pushing cloud resource pool to realize mirror synchronization.
Optionally, the synchronization module is specifically configured to:
sending a mirror image synchronization request to target pushing cloud resource pool management equipment through an application program control interface corresponding to the target pushing cloud resource pool identifier; the mirror synchronization request comprises a target push mirror identifier; the mirror synchronization request is used for indicating the target pushing cloud resource pool management equipment to create a mirror synchronization task, determining a target pushing mirror identifier as a target synchronization mirror identifier of the mirror synchronization task, and adding the mirror synchronization task to a mirror synchronization task queue.
Optionally, the mirror synchronization device further includes an acquisition module, where the acquisition module is configured to:
acquiring a task pushing state according to a first time interval until the acquired task pushing state is not an executing state or until the mirror image pushing task is deleted;
responding to the acquisition of the task pushing state as an executing state, and receiving the task synchronization state of the mirror image synchronization task sent by the target pushing cloud resource pool management equipment through an application program query interface corresponding to the target pushing cloud resource pool identifier according to a second time interval until the task synchronization state of the mirror image synchronization task is received as a completion state or a failure state, and correspondingly modifying the task pushing state as the completion state or the failure state; the second time interval is less than the first time interval.
Optionally, the mirror synchronization device further includes a receiving module, where the receiving module is configured to:
receiving a mirror image pushing request sent by mirror image management client equipment; the image push request comprises a target image identifier;
verifying whether the target image can be pushed according to the image pushing request;
and responding to the verification result of the target image as being pushable, creating at least one image pushing task according to the image pushing request, and adding each image pushing task to an image pushing task queue.
Optionally, the image push request further includes a target image download address and at least one target cloud resource pool identifier; the receiving module is also used for:
downloading the target image file according to the target image downloading address;
performing format conversion on the target image file;
and uploading the target image file after format conversion to the object storage device.
The mirror synchronization device provided in this embodiment may perform any one of the mirror synchronization methods provided in the first embodiment or the second embodiment, and the specific implementation manner is similar to the principle, and will not be repeated here.
Example six
Fig. 7 is a schematic structural diagram of a mirror synchronization device according to a sixth embodiment of the present application. As shown in fig. 7, the mirror synchronization apparatus provided in this embodiment is located in a cloud resource pool management device. The cloud resource pool management device is located in a preset network architecture, and the preset network architecture further comprises an object storage device and a mirror image management server device. The mirror synchronization device 70 provided in this embodiment includes an acquisition module 71 and a synchronization module 72.
An obtaining module 71, configured to obtain at least one mirror synchronization task from the mirror synchronization task queue; the mirror image synchronous task is created and added to a mirror image synchronous task queue by the cloud resource pool management equipment under the control of the mirror image management server equipment; the cloud resource pool management equipment is controlled by the mirror image management server equipment through an application program control interface corresponding to the cloud resource pool; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is the initial state.
And the synchronization module 72 is configured to, in response to the task synchronization state being an initial state, modify the task synchronization state to an execution state, obtain a target synchronization image from the object storage device according to the target synchronization image identifier, and import the target synchronization image into the cloud resource pool to achieve image synchronization.
Optionally, the mirror synchronization device further includes a creation module, where the creation module is configured to:
and responding to the control of the mirror image management server-side equipment through the application program control interface corresponding to the cloud resource pool, creating a mirror image synchronous task, and adding the mirror image synchronous task to a mirror image synchronous task queue.
Optionally, the creation module is specifically configured to:
receiving a mirror image synchronization request sent by a mirror image management server device through an application program control interface corresponding to a cloud resource pool; the mirror synchronization request comprises a target push mirror identifier;
creating a mirror synchronization task, determining a target push mirror identifier as a target synchronization mirror identifier of the mirror synchronization task, and adding the mirror synchronization task to a mirror synchronization task queue.
Optionally, the mirror synchronization device further includes a modification module, where the modification module is configured to:
responding to successful acquisition of the target synchronous mirror image and successful introduction into the cloud resource pool, and modifying the task synchronous state into a completion state;
Responding to failure of acquisition of the target synchronous mirror image or failure of importing the cloud resource pool, and modifying the task synchronous state into a failure state;
and according to the second time interval, responding to the query of the mirror image management server-side equipment through the application program query interface corresponding to the cloud resource pool, and sending the task synchronization state of the mirror image synchronization task to the mirror image management server-side equipment until the task synchronization state of the mirror image synchronization task is a completion state or a failure state.
The mirror synchronization device provided in this embodiment may perform any one of the mirror synchronization methods provided in the third embodiment, and specific implementation manners and principles are similar, and are not repeated here.
Example seven
Fig. 8 is a schematic structural diagram of a mirror management server device according to a seventh embodiment of the present application. As shown in fig. 8, the image management server device 80 provided in this embodiment includes: a processor 82 and a memory 81 communicatively coupled to the processor 82.
The memory 81 stores computer-executable instructions.
The processor 82 executes the computer-executable instructions stored in the memory 81 to implement any one of the mirror synchronization methods provided in the first or second embodiments, and the specific implementation manner is similar to the principle, and will not be repeated here.
Optionally, the image management server device further comprises a transceiver communicatively coupled to the memory and the processor for transceiving data.
Example eight
Fig. 9 is a schematic structural diagram of a cloud resource pool management device according to an eighth embodiment of the present application. As shown in fig. 9, the cloud resource pool management apparatus 90 provided in the present embodiment includes: a processor 92 and a memory 91 communicatively coupled to the processor 92.
The memory 91 stores computer-executable instructions.
The processor 92 executes the computer-executable instructions stored in the memory 91 to implement any one of the mirror synchronization methods provided in the third embodiment, and the specific implementation manner is similar to the principle, and will not be repeated here.
Optionally, the cloud resource pool management device further comprises a transceiver communicatively connected to the memory and the processor for transceiving data.
In the above embodiments, the communication connection between the memory and the processor may be implemented through a bus. The bus may be an industry standard architecture (Industry Standard Architecture, abbreviated ISA) bus, an external device interconnect (Peripheral Component Interconnect, abbreviated PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 8 and 9, but not only one bus or one type of bus.
In the above embodiments, the memory may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk, and the like.
In the above embodiments, the image management server device and the cloud resource pool management device may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for performing the image synchronization method described above.
The embodiment of the present application further provides a computer readable storage medium, where computer execution instructions are stored, where the computer execution instructions are used to implement the mirror synchronization method provided in any one of the foregoing embodiments when executed by a processor, and specific implementation manners are similar to the principle and are not repeated herein. By way of example, computer readable storage media may be read-only memory, random-access memory, magnetic tape, floppy disk, optical data storage device, and the like.
The embodiments of the present application further provide a computer program product, which includes a computer program, where the computer program when executed by a processor implements the mirror synchronization method provided in any one of the foregoing embodiments, and the specific implementation manner is similar to the principle, and is not repeated herein.
It should be understood that the above-described method embodiments are merely illustrative, and that the methods of the present application may be implemented in other ways. For example, the division of the modules in the above embodiment is merely a logic function division, and there may be another division manner when actually implemented. For example, multiple modules may be combined, or may be integrated into another system, or some features may be omitted or not performed.
In addition, each functional module in each embodiment of the present application may be integrated into one module, or each module may exist alone physically, or two or more modules may be integrated together, unless otherwise specified. The integrated modules may be implemented in hardware or in software program modules.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts and modules referred to are not necessarily required in the present application.
It should be further noted that, although the steps in the flowchart are sequentially shown as indicated by arrows, the steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in the flowcharts may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order in which the sub-steps or stages are performed is not necessarily sequential, and may be performed in turn or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (14)

1. The mirror synchronization method is characterized by being applied to mirror management server equipment, wherein the mirror management server equipment is located in a preset network architecture, and the preset network architecture further comprises object storage equipment and at least one cloud resource pool management equipment; the method comprises the following steps:
acquiring at least one mirror image pushing task from a mirror image pushing task queue; the mirror image pushing task is created by mirror image management server equipment and added to the mirror image pushing task queue; the mirror image pushing task comprises a task pushing state, a target pushing mirror image identifier and a target pushing cloud resource pool identifier; the task pushing state when the mirror image pushing task is created is an initial state;
responding to the task pushing state as an initial state, modifying the task pushing state into an executing state, controlling target pushing cloud resource pool management equipment corresponding to a target pushing cloud resource pool identifier to create a mirror synchronization task corresponding to the mirror synchronization task through an application program control interface corresponding to the target pushing cloud resource pool identifier, and adding the mirror synchronization task to a mirror synchronization task queue; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state; the target synchronous mirror image identifier is a target push mirror image identifier of a corresponding mirror image push task; the mirror synchronization task is used for indicating the target pushing cloud resource pool management device to acquire a target synchronization mirror image from the object storage device according to the target synchronization mirror image identification, and importing the target synchronization mirror image into the target pushing cloud resource pool to realize mirror synchronization.
2. The method according to claim 1, wherein the controlling, through the application control interface corresponding to the target push cloud resource pool identifier, the target push cloud resource pool management device corresponding to the target push cloud resource pool identifier to create a mirror synchronization task corresponding to the mirror push task, and adding the mirror synchronization task to a mirror synchronization task queue, includes:
sending a mirror image synchronization request to target pushing cloud resource pool management equipment through an application program control interface corresponding to a target pushing cloud resource pool identifier; the mirror synchronization request comprises a target push mirror identifier; the mirror synchronization request is used for indicating the target pushing cloud resource pool management device to create a mirror synchronization task, determining the target pushing mirror identification as a target synchronization mirror identification of the mirror synchronization task, and adding the mirror synchronization task to a mirror synchronization task queue.
3. The method according to claim 1, wherein after the responding to the task pushing state being the initial state, modifying the task pushing state to an executing state, and controlling the target pushing cloud resource pool management device corresponding to the target pushing cloud resource pool identifier to create the mirror synchronization task corresponding to the mirror synchronization task through the application control interface corresponding to the target pushing cloud resource pool identifier, and adding the mirror synchronization task to the mirror synchronization task queue, further comprises:
Acquiring the task pushing state according to a first time interval until the task pushing state is not an execution state or until the mirror image pushing task is deleted;
responding to the acquisition that the task pushing state is an executing state, and according to a second time interval, receiving a task synchronization state of the mirror image synchronization task sent by the target pushing cloud resource pool management device through an application program query interface corresponding to a target pushing cloud resource pool identifier until the task synchronization state of the mirror image synchronization task is received as a completion state or a failure state, and correspondingly modifying the task pushing state as the completion state or the failure state; the second time interval is less than the first time interval.
4. The method of claim 1, further comprising, prior to the retrieving at least one mirrored push task from the mirrored push task queue:
receiving a mirror image pushing request sent by mirror image management client equipment; the image pushing request comprises a target image identifier;
verifying whether the target image can be pushed according to the image pushing request;
and responding to the verification result of the target image as being pushable, creating at least one image pushing task according to the image pushing request, and adding each image pushing task to the image pushing task queue.
5. The method of claim 4, wherein the image push request further comprises a target image download address and at least one target cloud resource pool identification; the method for verifying the target mirror image includes the steps that the verification result of the target mirror image is pushable, at least one mirror image push task is created according to the mirror image push request, and before each mirror image push task is added to the mirror image push task queue, the method further includes:
downloading a target image file according to the target image downloading address;
performing format conversion on the target image file;
and uploading the target image file after format conversion to the object storage device.
6. The mirror image synchronization method is characterized by being applied to cloud resource pool management equipment, wherein the cloud resource pool management equipment is located in a preset network architecture, the preset network architecture further comprises object storage equipment and mirror image management server equipment, and the method comprises the following steps:
acquiring at least one mirror synchronous task from a mirror synchronous task queue; the mirror image synchronization task is created and added to the mirror image synchronization task queue by the cloud resource pool management device under the control of the mirror image management server device; the cloud resource pool management equipment is controlled by the mirror image management server equipment through an application program control interface corresponding to the cloud resource pool; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state;
And responding to the task synchronization state as an initial state, modifying the task synchronization state into an execution state, acquiring a target synchronization mirror image from the object storage device according to the target synchronization mirror image identification, and importing the target synchronization mirror image into a cloud resource pool to realize mirror image synchronization.
7. The method of claim 6, further comprising, prior to the obtaining at least one mirror synchronization task from the mirror synchronization task queue:
and responding to the control of the mirror image management server-side equipment through the application program control interface corresponding to the cloud resource pool, creating a mirror image synchronous task, and adding the mirror image synchronous task to a mirror image synchronous task queue.
8. The method according to claim 7, wherein the creating the mirror synchronization task and adding the mirror synchronization task to a mirror synchronization task queue in response to the control of the mirror management server device through the application control interface corresponding to the cloud resource pool includes:
receiving a mirror image synchronization request sent by the mirror image management server-side equipment through an application program control interface corresponding to a cloud resource pool; the mirror synchronization request comprises a target push mirror identifier;
Creating a mirror synchronization task, determining the target push mirror identifier as a target synchronization mirror identifier of the mirror synchronization task, and adding the mirror synchronization task to a mirror synchronization task queue.
9. The method according to claim 6, wherein after the task synchronization state is modified to an execution state in response to the task synchronization state being an initial state, the target synchronization image is obtained from the object storage device according to the target synchronization image identifier, and the target synchronization image is imported into a cloud resource pool to achieve image synchronization, further comprising:
responding to successful acquisition of the target synchronous mirror image and successful introduction of the cloud resource pool, and modifying the task synchronous state into a completion state;
responding to failure of acquisition of the target synchronous mirror image or failure of importing a cloud resource pool, and modifying the task synchronous state into a failure state;
and according to a second time interval, responding to the query of the mirror image management server-side equipment through the application program query interface corresponding to the cloud resource pool, and sending the task synchronization state of the mirror image synchronization task to the mirror image management server-side equipment until the task synchronization state of the mirror image synchronization task is a completion state or a failure state.
10. The mirror image synchronization device is characterized by being applied to mirror image management server-side equipment, wherein the mirror image management server-side equipment is positioned in a preset network architecture, and the preset network architecture further comprises object storage equipment and at least one cloud resource pool management equipment; the device comprises:
the acquisition module is used for acquiring at least one mirror image pushing task from the mirror image pushing task queue; the mirror image pushing task is created by mirror image management server equipment and added to the mirror image pushing task queue; the mirror image pushing task comprises a task pushing state, a target pushing mirror image identifier and a target pushing cloud resource pool identifier; the task pushing state when the mirror image pushing task is created is an initial state;
the synchronous module is used for responding to the task pushing state as an initial state, modifying the task pushing state into an execution state, controlling target pushing cloud resource pool management equipment corresponding to the target pushing cloud resource pool identifier to create a mirror synchronous task corresponding to the mirror synchronous task through an application program control interface corresponding to the target pushing cloud resource pool identifier, and adding the mirror synchronous task to a mirror synchronous task queue; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state; the target synchronous mirror image identifier is a target push mirror image identifier of a corresponding mirror image push task; the mirror synchronization task is used for indicating the target pushing cloud resource pool management device to acquire a target synchronization mirror image from the object storage device according to the target synchronization mirror image identification, and importing the target synchronization mirror image into the target pushing cloud resource pool to realize mirror synchronization.
11. The utility model provides a mirror image synchronization device, is characterized in that is applied to cloud resource pool management equipment, cloud resource pool management equipment is located and presets network architecture, presets network architecture and still includes object storage device and mirror image management server side equipment, and the device includes:
the acquisition module is used for acquiring at least one mirror synchronous task from the mirror synchronous task queue; the mirror image synchronization task is created and added to the mirror image synchronization task queue by the cloud resource pool management device under the control of the mirror image management server device; the cloud resource pool management equipment is controlled by the mirror image management server equipment through an application program control interface corresponding to the cloud resource pool; the mirror image synchronization task comprises a task synchronization state and a target synchronization mirror image identifier; the task synchronization state when the mirror synchronization task is created is an initial state;
and the synchronization module is used for responding to the task synchronization state as an initial state, modifying the task synchronization state as an execution state, acquiring a target synchronization mirror image from the object storage device according to the target synchronization mirror image identifier, and importing the target synchronization mirror image into a cloud resource pool to realize mirror image synchronization.
12. The mirror image management server side equipment is characterized in that the mirror image management server side equipment is located in a preset network architecture, and the preset network architecture further comprises an object storage device and at least one cloud resource pool management device; the mirror image management server device includes: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1 to 5.
13. The cloud resource pool management device is characterized by being positioned in a preset network architecture, and the preset network architecture further comprises an object storage device and a mirror image management server device; the cloud resource pool management apparatus includes: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 6 to 9.
14. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1 to 9.
CN202311473982.1A 2023-11-07 2023-11-07 Mirror synchronization method, device, equipment and storage medium Pending CN117459544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311473982.1A CN117459544A (en) 2023-11-07 2023-11-07 Mirror synchronization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311473982.1A CN117459544A (en) 2023-11-07 2023-11-07 Mirror synchronization method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117459544A true CN117459544A (en) 2024-01-26

Family

ID=89594552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311473982.1A Pending CN117459544A (en) 2023-11-07 2023-11-07 Mirror synchronization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117459544A (en)

Similar Documents

Publication Publication Date Title
CN110532247B (en) Data migration method and data migration system
CN112866310B (en) CDN back-to-source verification method and verification server, and CDN cluster
US20190266134A1 (en) Data migration method, apparatus, and storage medium
CN108566290B (en) Service configuration management method, system, storage medium and server
CN109714330B (en) Cross-network breakpoint resume method and system
CN107689976B (en) File transmission method and device
WO2017215646A1 (en) Data transmission method and apparatus
US20150227605A1 (en) Information processing terminal, synchronization control method, and computer-readable recording medium
CN112948340A (en) Data synchronization method and device, electronic equipment and readable storage medium
CN112527562A (en) Data backup method and device of distributed storage system and computer equipment
CN111177159A (en) Data processing system and method and data updating equipment
CN114362983A (en) Firewall policy management method and device, computer equipment and storage medium
CN109697112B (en) Distributed intensive one-stop operating system and implementation method
WO2022116846A1 (en) Method and apparatus for acquiring operation data of virtual network element
CN110442601A (en) A kind of method and apparatus that Openstack mirror image data accelerates parallel
CN115129574A (en) Code testing method and device
CN110807000B (en) File repair method and device, electronic equipment and storage medium
CN112130889A (en) Resource management method and device, storage medium and electronic device
EP3349416A1 (en) Relationship chain processing method and system, and storage medium
CN117459544A (en) Mirror synchronization method, device, equipment and storage medium
CN114201370B (en) Webpage file monitoring method and system
CN112688905B (en) Data transmission method, device, client, server and storage medium
CN111460436B (en) Unstructured data operation method and system based on blockchain
CN110309191B (en) Method, device and system for storing business data
CN114610446A (en) Method, device and system for automatically injecting probe

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