Nothing Special   »   [go: up one dir, main page]

CN108173892B - Cloud mirror image operation method and device - Google Patents

Cloud mirror image operation method and device Download PDF

Info

Publication number
CN108173892B
CN108173892B CN201611116992.XA CN201611116992A CN108173892B CN 108173892 B CN108173892 B CN 108173892B CN 201611116992 A CN201611116992 A CN 201611116992A CN 108173892 B CN108173892 B CN 108173892B
Authority
CN
China
Prior art keywords
request
cloud
identifier
queue
mirror image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611116992.XA
Other languages
Chinese (zh)
Other versions
CN108173892A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201611116992.XA priority Critical patent/CN108173892B/en
Priority to PCT/CN2017/112906 priority patent/WO2018095416A1/en
Publication of CN108173892A publication Critical patent/CN108173892A/en
Priority to US16/279,606 priority patent/US11088903B2/en
Application granted granted Critical
Publication of CN108173892B publication Critical patent/CN108173892B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Facsimiles In General (AREA)

Abstract

The invention relates to a cloud mirror image operation method and a cloud mirror image operation device, wherein the method comprises the following steps: receiving a cloud mirror image operation request; storing a request identifier corresponding to the cloud mirror operation request in association with a request parameter carried by the cloud mirror operation request; adding a request identifier corresponding to the cloud mirror image operation request into a request receiving queue; executing a first timing task for taking out the request identifier from the request receiving queue at fixed time and a second timing task for taking out the request identifier from the abnormal request queue at fixed time; performing cloud mirror image operation according to the request parameters associated with the extracted request identifier; and when the cloud mirror image operation fails, adding the taken request identifier into the abnormal request queue. The cloud mirror operation method and device provided by the invention can realize high-availability cloud mirror operation.

Description

Cloud mirror image operation method and device
Technical Field
The invention relates to the technical field of cloud ends, in particular to a cloud end mirror image operation method and device.
Background
The cloud is a system for providing cloud services, such as cloud storage services or cloud computing services. The cloud technology is widely applied at present, online storage and sharing of data are achieved through the cloud, and data processing efficiency is improved by means of high-performance cloud computing capacity of the cloud. Various programs, files, websites or service sites exist on the cloud, and images are created for the programs, the files, the websites and the service sites, so that the cloud service is rapidly deployed by using the images.
In the conventional technology, the cloud can directly receive a cloud mirror image operation request and respond to the cloud mirror image operation request so as to perform mirror image operation, if a mirror image is created or deleted, an operation result of successful operation is returned if the operation is successful, and if the cloud is abnormal and the mirror image operation cannot be performed, an operation result of failed operation is returned. Therefore, in the conventional technology, the mirroring operation of the cloud is easy to fail due to the cloud exception, so that the success rate of the cloud mirroring operation is low.
Disclosure of Invention
Therefore, it is necessary to provide a cloud mirroring method and apparatus for solving the problem of low success rate of cloud mirroring in the conventional technology.
A cloud mirroring operation method comprises the following steps:
receiving a cloud mirror image operation request;
storing a request identifier corresponding to the cloud mirror operation request in association with a request parameter carried by the cloud mirror operation request;
adding a request identifier corresponding to the cloud mirror image operation request into a request receiving queue;
executing a first timing task for taking out the request identifier from the request receiving queue at fixed time and a second timing task for taking out the request identifier from the abnormal request queue at fixed time;
performing cloud mirror image operation according to the request parameters associated with the extracted request identifier;
and when the cloud mirror image operation fails, adding the taken request identifier into the abnormal request queue.
A cloud mirroring device, comprising:
the cloud mirror image operation request receiving module is used for receiving a cloud mirror image operation request;
the storage module is used for storing a request identifier corresponding to the cloud mirror image operation request in association with a request parameter carried by the cloud mirror image operation request;
the request receiving queue management module is used for adding a request identifier corresponding to the cloud mirror image operation request into a request receiving queue;
the timing task module is used for executing a first timing task for taking out the request identifier from the request receiving queue at regular time and a second timing task for taking out the request identifier from the abnormal request queue at regular time; performing cloud mirror image operation according to the request parameters associated with the extracted request identifier;
and the abnormal request queue management module is used for adding the taken request identifier into the abnormal request queue when the cloud mirror image operation fails.
According to the cloud mirror operation method and device, the request receiving queue and the abnormal request queue are additionally arranged, the request receiving queue is used for recording received cloud mirror operation requests, and the abnormal request queue is used for recording cloud mirror operation requests which fail in cloud mirror operation. Through the executed first timing task and the second timing task, the newly received cloud mirror image operation request can be processed in time, the cloud mirror image operation which fails in operation can be retried in time, the processing of the received cloud mirror image operation request is not influenced, and the success rate of the mirror image operation can be improved. And through the queue and the timing task, the cloud mirror image operation request quantity can be controlled, the cloud load is prevented from being too heavy due to sudden increase of the request quantity, and high-availability cloud mirror image operation is realized.
Drawings
FIG. 1 is a diagram of an application environment of a cloud mirroring operation method in one embodiment;
fig. 2 is a schematic internal structural diagram of a server for implementing the cloud mirroring operation method in one embodiment;
FIG. 3 is a flowchart illustrating a method of cloud mirroring in one embodiment;
FIG. 4 is a flowchart illustrating steps of performing a cloud mirroring operation according to request parameters associated with a retrieved request identifier in one embodiment;
fig. 5 is a schematic flowchart illustrating a step of storing a request identifier corresponding to a cloud mirroring operation request in association with a request parameter carried by the cloud mirroring operation request in one embodiment;
FIG. 6 is a flowchart illustrating a cloud mirroring method according to another embodiment;
fig. 7 is a block diagram illustrating a configuration of a cloud mirroring operation apparatus according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 1 is an application environment diagram of a cloud mirroring operation method in an embodiment. As shown in fig. 1, a cloud mirroring operating system includes a terminal 110, a server 120, and a cloud 130. The cloud 130 may be a hybrid cloud including a private cloud 131 and a public cloud 132. The terminal 110 may communicate with the server 120 through a network, the server 120 may communicate with the cloud 130 through the network, and the server 120 is configured to implement a cloud mirroring operation method. It is understood that the server 120 may also be part of the cloud 130.
In one embodiment, the terminal 110 is configured to send a cloud mirroring operation request to the server 120. The server 120 is configured to receive a cloud mirror operation request sent by the terminal 110; storing a request identifier corresponding to the cloud mirror operation request in association with a request parameter carried by the cloud mirror operation request; adding a request identifier corresponding to the cloud mirror image operation request into a request receiving queue; asynchronously executing a first timing task of taking out the request identifier from the request receiving queue at a timing and a second timing task of taking out the request identifier from the abnormal request queue at a timing; calling a mirror image operation interface provided by the cloud 130 and carrying out cloud mirror image operation on the cloud 130 according to the request parameter associated with the extracted request identifier; and when the cloud mirror image operation fails, adding the taken request identifier into an abnormal request queue.
Fig. 2 is a schematic diagram of an internal structure of a server for implementing the cloud mirroring operation method in one embodiment. Referring to fig. 2, the server includes a processor, a nonvolatile storage medium, an internal memory, and a network interface connected through a system bus. The nonvolatile storage medium of the server stores an operating system, a database and a cloud mirror operating device, and the cloud mirror operating device is used for realizing a cloud mirror operating method. The database can be used for storing the request identification corresponding to the cloud mirror operation request in association with the request parameter carried by the cloud mirror operation request. The processor of the server is used for providing calculation and control capacity and supporting the operation of the whole server. The internal memory may have stored therein computer readable instructions that, when executed by the processor, cause the processor to perform a cloud mirroring method. The network interface of the server is used for network communication, such as receiving a cloud mirror operation request. The server may be implemented as a stand-alone server or as a server cluster consisting of a plurality of servers. Those skilled in the art will appreciate that the architecture shown in fig. 2 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the servers to which the subject application applies, as a particular server may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Fig. 3 is a flowchart illustrating a cloud mirroring operation method in an embodiment. The embodiment is mainly illustrated by applying the method to the server 120 in fig. 1 and fig. 2. Referring to fig. 3, the method specifically includes the following steps:
s302, receiving a cloud mirror image operation request.
The cloud mirror operation request is a network request for requesting mirror operation on the cloud. The cloud may be a private cloud, a public cloud, or a hybrid cloud including a private cloud and a public cloud. Mirroring operations such as creating an image, copying an image, or deleting an image are operations related to the image. The image may be an image of an operating system, a site, or a service program, etc.
Specifically, the server can provide a cloud management page to the terminal, and the cloud management page comprises a mirroring operation configuration item. The terminal can receive a user instruction, configure a mirror image operation configuration item according to the user instruction, generate a request parameter according to the configured mirror image operation configuration item, trigger a cloud mirror image operation request carrying the request parameter, and send the cloud mirror image operation request to the server. The server receives the cloud mirror operation request.
And S304, storing the request identification corresponding to the cloud mirror operation request in association with the request parameter carried by the cloud mirror operation request.
Each cloud mirror image operation request corresponds to a unique request identifier, and the request identifier is used for uniquely identifying the corresponding end mirror image operation request. The request identifier may be carried in the cloud mirror operation request, or may be distributed by the server after receiving the cloud mirror operation request. The request identification is stored in association with the request parameter, and the associated request parameter can be queried through the request identification.
The request parameters are parameters required for requesting the mirroring operation on the cloud. Request parameters such as the type of mirroring operation, such as create mirror type, copy mirror type, delete mirror type, or the like, or the target identity on which the mirroring operation acts. The request parameters in the cloud mirror operation request can be used for enabling the server to carry out mirror operation of the mirror operation type in the request parameters on the target identified by the target identification in the request parameters on the cloud end according to the request parameters.
Specifically, after receiving the cloud mirror operation request, the server obtains a request identifier corresponding to the cloud mirror operation request, extracts a request parameter carried by the cloud mirror operation request, and stores the request identifier and the request parameter in a corresponding manner, specifically in a database, a file, or a cache.
S306, adding the request identification corresponding to the cloud mirror image operation request into the request receiving queue.
The request receiving queue is used for caching the request identifications corresponding to the cloud mirror image operation requests according to the receiving sequence, and further temporarily caching the received cloud mirror image operation requests. Each request identification of the request receiving queue represents a cloud mirror operation request. In one embodiment, steps S304 and S306 may be performed asynchronously.
In one embodiment, the capacity of the request receive queue may be dynamically adjusted based on the number of request identifications in the request receive queue. The capacity of the request receiving queue refers to the maximum number of request identifications that the request receiving queue can store.
In one embodiment, the method further comprises: when the capacity ratio of the number of the request identifications in the request receiving queue to the current level reaches a first ratio corresponding to the current capacity level, the current capacity level is increased by one capacity level; when the ratio of the number of the request identifications in the request receiving queue to the capacity of the current level is less than or equal to a second ratio corresponding to the current capacity level, reducing the current capacity level by one capacity level; wherein the first proportion corresponding to the current level capacity is larger than the second proportion corresponding to the current level capacity. The capacity level may be limited. The first and/or second ratios may increase as the capacity level increases and decrease as the capacity level decreases.
S308, a first timing task for taking out the request mark from the request receiving queue at regular time and a second timing task for taking out the request mark from the abnormal request queue at regular time are executed.
The first timing task and the second timing task are timing tasks, and the first description and the second description are used for distinguishing different timing tasks. The timed task may be a task that is executed at every preset time interval, such as 10ms (milliseconds), or every preset time point.
The first timing task is used for taking out the request identifier from the request receiving queue during timing execution and executing the subsequent step 310 according to the taken-out request identifier; the second timing task is used for fetching the request identifier from the abnormal request queue during timing execution, and executing the subsequent step 310 according to the fetched request identifier. The abnormal request queue is different from the request receiving queue and is used for caching the request identification corresponding to the cloud mirror operation request which fails in the cloud mirror operation.
In one embodiment, the first timed task and the second timed task may be executed asynchronously. When the first timing task and the second timing task are executed asynchronously, the execution sequence between the first timing task and the second timing task is unrelated. In other embodiments, the first timing task and the second timing task may be performed alternately.
And S310, carrying out cloud mirror image operation according to the request parameters associated with the extracted request identification.
The extracted request identifier may be extracted from the request receiving queue or extracted from the abnormal request queue. Specifically, the server can read the request parameters stored in association with the extracted request identifier, so as to call a mirror operation interface provided by the cloud and perform cloud mirror operation according to the read request parameters. Further, the server can call a mirror image operation interface provided by the cloud and transmit request parameters, so that the cloud determines the mirror image operation type and a target acted by the mirror image operation according to the request parameters, and the mirror image operation of the determined mirror image operation type is executed on the target on the cloud.
S312, when the cloud mirror image operation fails, adding the extracted request identification into an abnormal request queue.
Specifically, after the cloud mirroring operation is performed by the server, success or failure of the cloud mirroring operation can be judged. Specifically, the success or failure of the cloud mirroring operation can be judged through the return value of the cloud mirroring operation. And when the cloud mirror operation fails, adding the taken request identifier into an abnormal request queue by the server, so that the request identifier can be continuously taken out to try the corresponding cloud mirror operation request subsequently when the first timing task and the second timing task are asynchronously executed. When the cloud mirror image operation is judged to be successful, the server can record the operation success result corresponding to the request identification, and can specifically record the operation success result in a database, a file or a cache. The server can also feed back the operation success result to the terminal. When the operation success result corresponding to the request identification is recorded in the database, the operation success result corresponding to the request identification is written back to the data table where the request parameter corresponding to the request identification is located.
According to the cloud mirror operation method, the request receiving queue and the abnormal request queue are additionally arranged, the request receiving queue is used for recording received cloud mirror operation requests, and the abnormal request queue is used for recording cloud mirror operation requests which fail in cloud mirror operation. Through the executed first timing task and the second timing task, the newly received cloud mirror image operation request can be processed in time, the cloud mirror image operation which fails in operation can be retried in time, the processing of the received cloud mirror image operation request is not influenced, and the success rate of the mirror image operation can be improved. And through the queue and the timing task, the cloud mirror image operation request quantity can be controlled, the cloud load is prevented from being too heavy due to sudden increase of the request quantity, and high-availability cloud mirror image operation is realized. Moreover, the cloud mirror image operation process is decoupled through the receiving queue and the abnormal request queue, and subsequent expansion and optimization are facilitated.
In one embodiment, the request parameters include a machine room identifier and a cloud virtual machine identifier. Referring to fig. 4, step 310 in this embodiment specifically includes the following steps:
s402, reading a machine room identifier and a cloud virtual machine identifier associated with the taken request identifier.
The machine room identification and the cloud virtual machine identification are used for identifying a target acted by the cloud mirror image operation. The machine room identification is used for identifying the cloud physical server, and the cloud virtual machine identification is used for identifying a cloud virtual machine erected on the cloud server. Each cloud virtual machine may be used to provide one or more cloud services. Specifically, the server may read a machine room identifier and a cloud virtual machine identifier associated with the retrieved request identifier from a database, a file, or a cache.
And S404, performing cloud mirror image operation on the cloud virtual machine corresponding to the read cloud virtual machine identifier on the cloud physical server identified by the machine room identifier.
Specifically, the server can determine to read the cloud physical server identified by the machine room identifier, determine the cloud virtual machine corresponding to the read cloud virtual machine identifier on the cloud physical server, and then perform cloud mirror image operation on the determined cloud virtual machine.
In this embodiment, because the performance of high in the clouds physical server is very strong, erect the virtual machine in order to realize cloud service on high in the clouds physical server as required, can realize the rational utilization of resource, avoid high in the clouds wasting of resources.
As shown in fig. 5, in an embodiment, the step S304 specifically includes the following steps:
and S502, allocating a unique request identifier for the cloud mirror image operation request.
The unique request identifier means that the request identifier is unique in an environment to which the cloud mirror operation method of the embodiment is applied.
Specifically, the server may generate a unique serial number in a self-increment manner, and allocate the serial number as a request identifier to the received cloud mirror operation request. If a cloud mirror image operation request is received, a request identifier of 00001 is allocated to the cloud mirror image operation request; after receiving the next cloud mirror operation request, self-increment by 1 on the basis of 00001, and allocating a request identifier 00002 to the cloud mirror operation request.
In one embodiment, the server can also identify the request as a timestamp. In one embodiment, the server can also combine the terminal identifier or the user identifier which initiates the cloud mirroring operation request with a timestamp as the request identifier.
S504, extracting the machine room identification and the cloud virtual machine identification from the cloud mirror image operation request.
The machine room identification refers to an identification of the machine room where the cloud physical server is located, and can be used for identifying the cloud physical server. The cloud virtual machine identifier is an identifier for identifying a cloud virtual machine erected on a cloud server. The machine room identifier can be one or a combination of a plurality of numbers, letters, symbols and Chinese characters. The cloud virtual machine identifier can also be one or a combination of several of numbers, letters, symbols and Chinese characters. Step 502 and step S504 may be performed asynchronously.
S506, the extracted machine room identification and the extracted cloud virtual machine identification are stored in a manner of being related to the allocated request identification.
Specifically, the server may associate the extracted machine room identifier and the extracted cloud virtual machine identifier with the allocated request identifier, and store the association relationship. The server may specifically store the association in a database, file, or cache.
In the embodiment, the unique request identifier is distributed for the cloud mirror image operation request, the uniqueness of the request identifier can be ensured, the request receiving queue and the abnormal request queue only need to record the request identifier, and when mirror image operation is needed, the associated machine room identifier and cloud virtual machine identifier are read according to the request identifier, so that the data processing process is simple and efficient, and the efficiency of cloud mirror image operation is improved.
In one embodiment, step S312 specifically includes: when the cloud mirror image operation fails and the operation failure retry times corresponding to the extracted request identification reach the preset times, recording the operation failure result corresponding to the extracted request identification; and when the cloud mirror image operation fails and the operation failure retry times corresponding to the taken-out request identification do not reach the preset times, adding the taken-out request identification into the abnormal request queue.
Specifically, after the cloud mirroring operation is performed by the server, success or failure of the cloud mirroring operation can be judged. Specifically, the success or failure of the cloud mirroring operation can be judged through the return value of the cloud mirroring operation. When the cloud mirror operation is judged to be failed, the server can continuously judge whether the operation failure retry frequency corresponding to the request identifier reaches the preset frequency, namely whether the operation failure retry frequency corresponding to the request identifier is larger than or equal to the preset frequency.
Further, when the server determines that the number of operation failure retries corresponding to the retrieved request identifier is greater than or equal to the preset number, the server records the operation failure result corresponding to the retrieved request identifier, and the operation failure result may be recorded in a database, a file, or a cache. The operation failure result corresponding to the retrieved request identifier indicates that the mirroring operation requested by the cloud mirroring operation request identified by the retrieved request identifier fails. The server may also feed back the operation failure result to the terminal.
And when judging that the operation failure retry times corresponding to the extracted request identification are less than the preset times, the server adds the extracted request identification into an abnormal request queue, so that the request identification can be continuously extracted to try the corresponding cloud mirror image operation request subsequently when the first timing task and the second timing task are asynchronously executed.
In one embodiment, the server may determine whether the retrieved request identifier corresponds to a retry number of operation failures after retrieving the request identifier from the abnormal request queue; if not, generating operation failure retry times with the value of 1 corresponding to the extracted request identifier; and if so, increasing the number of operation failure retries corresponding to the extracted request identification by 1.
In this embodiment, the cloud mirror operation request has the largest operation failure retry times, that is, the preset times, which can avoid the cloud mirror operation failure caused by accidental factors, and can also avoid the cloud mirror operation request from being continuously retried to waste cloud resources caused by an obstacle that cannot be overcome in a short time.
In one embodiment, the cloud mirroring operation method further includes: and if at least one of the request receiving queue, the abnormal request queue, the first timing task and the second timing task is interrupted, enabling the corresponding at least one of the request receiving queue, the abnormal request queue, the first timing task and the second timing task of the distributed deployment to continue running.
The objects of the request receiving queue, the abnormal request queue, the first timing task and the second timing task are distributed. The distributed deployed objects may be deployed between different threads or processes on the same physical server, may be deployed on different virtual machines of the same physical server, or may be deployed on different physical servers. Data synchronization is maintained between the distributed deployed objects. An interrupt, such as one caused by a fault, is initiated.
Specifically, when the server executes the first timing task and the second timing task, if the request receiving queue is interrupted, the request receiving queue of the distributed deployment is enabled to continue executing the first timing task; if the first timed task is interrupted, the first timed task of the distributed deployment is started to continue running; if the abnormal request queue is interrupted, starting the abnormal request queue of distributed deployment to continue executing the second timing task; and if the second timing task is interrupted, enabling the second timing task of the distributed deployment to continue running.
In this embodiment, the request receiving queue, the abnormal request queue, the first timing task, and the second timing task are deployed in a distributed manner, and when at least one of the request receiving queue, the abnormal request queue, the first timing task, and the second timing task is interrupted, the request receiving queue, the abnormal request queue, the first timing task, and the second timing task deployed in a distributed manner can be started to continue running, so that the cloud mirror image operation is strong in robustness and high in disaster tolerance.
In one embodiment, step S310 includes: and when the cloud mirror operation request corresponding to the extracted request identifier aims at mirror operation on the private cloud, calling a mirror operation interface provided by the private cloud and carrying out mirror operation on the private cloud according to the request parameter associated with the extracted request identifier.
In one embodiment, step S310 includes: and when the cloud mirror operation request corresponding to the extracted request identifier aims at mirror operation on the public cloud, calling a mirror operation interface provided by the public cloud and carrying out mirror operation on the public cloud according to the request parameter associated with the extracted request identifier.
Specifically, the cloud mirror operation method of the embodiment is applied to a hybrid cloud including a private cloud and a public cloud. The private cloud is deployed in a private network environment, such as a cloud established by an enterprise, a government or other organizations in a machine room, and is physically isolated to ensure safety. Public cloud is deployed in the internet environment, and the computing power is strong. Mirroring operations on the private or public cloud may be included in the request parameters.
When the request of the cloud mirror operation request is the mirror operation on the private cloud, the server calls a mirror operation interface provided by the private cloud, and provides the request parameters associated with the extracted request identifier to the private cloud through the mirror operation interface, so that the private cloud performs the mirror operation on the private cloud according to the request parameters associated with the extracted request identifier.
When the request of the cloud mirror operation request is mirror operation on the public cloud, the server calls a mirror operation interface provided by the public cloud, and provides request parameters associated with the extracted request identifier to the public cloud through the mirror operation interface, so that the public cloud performs mirror operation on the public cloud according to the request parameters associated with the extracted request identifier.
In this embodiment, the cloud mirroring operation method is applied to a hybrid cloud including a private cloud and a public cloud, combines performance advantages of the private cloud and the public cloud, and achieves high-availability cloud mirroring operation in a hybrid cloud environment.
As shown in fig. 6, in an embodiment, a cloud mirroring operation method specifically includes the following steps:
s602, receiving a cloud mirror image operation request.
And S604, associating the request identifier corresponding to the cloud mirror operation request with the request parameter carried by the cloud mirror operation request in a database.
And S606, adding a request identifier corresponding to the cloud mirror image operation request into a request receiving queue adopting distributed deployment.
S608, asynchronously executing the first timing task and the second timing task which adopt distributed deployment, reading the request identification from the request receiving queue when executing the first timing task, and reading the request identification from the abnormal request queue when executing the second timing task.
And S610, calling a mirror image operation interface provided by the cloud and carrying out cloud mirror image operation according to the request parameter associated with the read request identifier.
And S612, judging whether the cloud mirror image operation is successful. If the cloud mirroring operation is successful, executing step S614; if the cloud mirroring operation fails, step S616 is executed.
And S614, writing back the operation success result to the database.
S616, determine whether the operation failure retry number corresponding to the read request identifier reaches a preset number. If the preset number of times is reached, go to step S618; if the preset number of times is not reached, step S620 is executed.
And S618, writing back the operation failure result to the database.
S620, adding the read request identification into an abnormal request queue.
In this embodiment, a request receiving queue and an abnormal request queue are added, where the request receiving queue is used to record a received cloud mirror operation request, and the abnormal request queue is used to record a cloud mirror operation request for which a cloud mirror operation failure occurs. Through the executed first timing task and the second timing task, the newly received cloud mirror image operation request can be processed in time, the cloud mirror image operation which fails in operation can be retried in time, the processing of the received cloud mirror image operation request is not influenced, and the success rate of the mirror image operation can be improved. And through the queue and the timing task, the cloud mirror image operation request quantity can be controlled, the cloud load is prevented from being too heavy due to sudden increase of the request quantity, and high-availability cloud mirror image operation is realized. Moreover, the cloud mirror image operation process is decoupled through the receiving queue and the abnormal request queue, and subsequent expansion and optimization are facilitated.
As shown in fig. 7, in one embodiment, a cloud mirroring device 700 is provided, where the cloud mirroring device 700 includes: the cloud mirror operation system comprises a cloud mirror operation request receiving module 701, a storage module 702, a request receiving queue management module 703, a timed task module 704 and an abnormal request queue management module 705.
A cloud mirror operation request receiving module 701, configured to receive a cloud mirror operation request.
The storage module 702 is configured to store the request identifier corresponding to the cloud mirror operation request in association with the request parameter carried by the cloud mirror operation request.
The request receiving queue management module 703 is configured to add a request identifier corresponding to the cloud mirror operation request to the request receiving queue.
The timing task module 704 is configured to execute a first timing task of timing the request identifier in the request receiving queue and a second timing task of timing the request identifier in the abnormal request queue. And carrying out cloud mirror image operation according to the request parameters associated with the extracted request identification.
The abnormal request queue management module 705 is configured to add the extracted request identifier to an abnormal request queue when the cloud mirroring operation fails.
The cloud mirror operation device 700 is additionally provided with a request receiving queue and an abnormal request queue, wherein the request receiving queue is used for recording received cloud mirror operation requests, and the abnormal request queue is used for recording cloud mirror operation requests which fail in cloud mirror operation. Through the executed first timing task and the second timing task, the newly received cloud mirror image operation request can be processed in time, the cloud mirror image operation which fails in operation can be retried in time, the processing of the received cloud mirror image operation request is not influenced, and the success rate of the mirror image operation can be improved. And through the queue and the timing task, the cloud mirror image operation request quantity can be controlled, the cloud load is prevented from being too heavy due to sudden increase of the request quantity, and high-availability cloud mirror image operation is realized. Moreover, the cloud mirror image operation process is decoupled through the receiving queue and the abnormal request queue, and subsequent expansion and optimization are facilitated.
In one embodiment, the request parameters include a machine room identifier and a cloud virtual machine identifier; the timing task module 704 is further configured to read a machine room identifier and a cloud virtual machine identifier associated with the retrieved request identifier; and carrying out cloud mirror image operation on the cloud virtual machine corresponding to the read cloud virtual machine identification on the cloud physical server identified by the machine room identification.
In this embodiment, because the performance of high in the clouds physical server is very strong, erect the virtual machine in order to realize cloud service on high in the clouds physical server as required, can realize the rational utilization of resource, avoid high in the clouds wasting of resources.
In one embodiment, the storage module 702 is further configured to assign a unique request identifier to the cloud mirroring operation request; extracting a machine room identifier and a cloud virtual machine identifier from the cloud mirror image operation request; and storing the extracted machine room identifier and the extracted cloud virtual machine identifier in association with the allocated request identifier.
In the embodiment, the unique request identifier is distributed for the cloud mirror image operation request, the uniqueness of the request identifier can be ensured, the request receiving queue and the abnormal request queue only need to record the request identifier, and when mirror image operation is needed, the associated machine room identifier and cloud virtual machine identifier are read according to the request identifier, so that the data processing process is simple and efficient, and the efficiency of cloud mirror image operation is improved.
In one embodiment, the abnormal request queue management module 705 is further configured to record an operation failure result corresponding to the retrieved request identifier when the cloud mirroring operation fails and the operation failure retry number corresponding to the retrieved request identifier reaches a preset number; and when the cloud mirror image operation fails and the operation failure retry times corresponding to the taken-out request identification do not reach the preset times, adding the taken-out request identification into the abnormal request queue.
In this embodiment, the cloud mirror operation request has the largest operation failure retry times, that is, the preset times, which can avoid the cloud mirror operation failure caused by accidental factors, and can also avoid the cloud mirror operation request from being continuously retried to waste cloud resources caused by an obstacle that cannot be overcome in a short time.
In one embodiment, the timed task module 704 is further configured to enable at least one of the distributively deployed request receive queue, the exception request queue, the first timed task, and the second timed task to continue running if at least one of the request receive queue, the exception request queue, the first timed task, and the second timed task is interrupted.
In this embodiment, the request receiving queue, the abnormal request queue, the first timing task, and the second timing task are deployed in a distributed manner, and when at least one of the request receiving queue, the abnormal request queue, the first timing task, and the second timing task is interrupted, the request receiving queue, the abnormal request queue, the first timing task, and the second timing task deployed in a distributed manner can be started to continue running, so that the cloud mirror image operation is strong in robustness and high in disaster tolerance.
In one embodiment, the timing task module 704 is further configured to, when the cloud mirror operation request corresponding to the retrieved request identifier is for mirror operation on the private cloud, invoke a mirror operation interface provided by the private cloud and perform mirror operation on the private cloud according to the request parameter associated with the retrieved request identifier; and when the cloud mirror operation request corresponding to the extracted request identifier aims at mirror operation on the public cloud, calling a mirror operation interface provided by the public cloud and carrying out mirror operation on the public cloud according to the request parameter associated with the extracted request identifier.
In this embodiment, the cloud mirroring operation method is applied to a hybrid cloud including a private cloud and a public cloud, combines performance advantages of the private cloud and the public cloud, and achieves high-availability cloud mirroring operation in a hybrid cloud environment.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (14)

1. A cloud mirroring operation method comprises the following steps:
receiving a cloud mirror image operation request; the cloud mirror operation request is a network request for mirror operation on the cloud; the mirroring operation is an operation related to mirroring;
storing a request identifier corresponding to the cloud mirror operation request in association with a request parameter carried by the cloud mirror operation request; the request parameter is a parameter required for requesting mirroring operation on the cloud;
adding a request identifier corresponding to the cloud mirror image operation request into a request receiving queue;
executing a first timing task for taking out the request identifier from the request receiving queue at fixed time and a second timing task for taking out the request identifier from the abnormal request queue at fixed time;
performing cloud mirror operation according to the request parameters associated with the extracted request identifier, including: performing mirroring operation of the mirroring operation type in the request parameters on a target identified by a target identification in the request parameters on a cloud according to the request parameters associated with the extracted request identification;
and when the cloud mirror image operation fails, adding the taken request identifier into the abnormal request queue.
2. The method of claim 1, wherein the request parameters include a machine room identifier and a cloud virtual machine identifier; the cloud mirroring operation according to the request parameter associated with the extracted request identifier includes:
reading a machine room identifier and a cloud virtual machine identifier associated with the taken request identifier;
and carrying out cloud mirror image operation on the cloud virtual machine corresponding to the read cloud virtual machine identification on the cloud physical server identified by the machine room identification.
3. The method of claim 2, wherein the storing the request identifier corresponding to the cloud mirroring operation request in association with the request parameter carried by the cloud mirroring operation request comprises:
allocating a unique request identifier for the cloud mirror image operation request;
extracting a machine room identifier and a cloud virtual machine identifier from the cloud mirror image operation request;
and storing the extracted machine room identifier and the extracted cloud virtual machine identifier in association with the allocated request identifier.
4. The method of claim 1, wherein the adding the fetched request identification to the exception request queue when the cloud mirroring operation fails comprises:
when the cloud mirror image operation fails and the operation failure retry times corresponding to the extracted request identification reach the preset times, recording the operation failure result corresponding to the extracted request identification;
and when the cloud mirror image operation fails and the operation failure retry frequency corresponding to the taken-out request identifier does not reach the preset frequency, adding the taken-out request identifier into the abnormal request queue.
5. The method of claim 1, further comprising:
enabling at least one corresponding one of the request receiving queue, the abnormal request queue, the first timed task and the second timed task in distributed deployment to continue running if at least one of the request receiving queue, the abnormal request queue, the first timed task and the second timed task is interrupted.
6. The method of claim 1, wherein performing cloud mirroring operations according to the request parameters associated with the retrieved request identifier comprises:
when the cloud mirror operation request corresponding to the extracted request identifier aims at mirror operation on the private cloud, calling a mirror operation interface provided by the private cloud and carrying out mirror operation on the private cloud according to request parameters associated with the extracted request identifier;
and when the cloud mirror operation request corresponding to the extracted request identifier aims at mirror operation on the public cloud, calling a mirror operation interface provided by the public cloud and carrying out mirror operation on the public cloud according to the request parameter associated with the extracted request identifier.
7. A cloud mirror operating device, comprising:
the cloud mirror image operation request receiving module is used for receiving a cloud mirror image operation request; the cloud mirror operation request is a network request for mirror operation on the cloud; the mirroring operation is an operation related to mirroring;
the storage module is used for storing a request identifier corresponding to the cloud mirror image operation request in association with a request parameter carried by the cloud mirror image operation request; the request parameter is a parameter required for requesting mirroring operation on the cloud;
the request receiving queue management module is used for adding a request identifier corresponding to the cloud mirror image operation request into a request receiving queue;
the timing task module is used for executing a first timing task for taking out the request identifier from the request receiving queue at regular time and a second timing task for taking out the request identifier from the abnormal request queue at regular time; performing cloud mirror operation according to the request parameters associated with the extracted request identifier, including: performing mirroring operation of the mirroring operation type in the request parameters on a target identified by a target identification in the request parameters on a cloud according to the request parameters associated with the extracted request identification;
and the abnormal request queue management module is used for adding the taken request identifier into the abnormal request queue when the cloud mirror image operation fails.
8. The apparatus of claim 7, wherein the request parameters comprise a machine room identifier and a cloud virtual machine identifier; the timing task module is also used for reading a machine room identifier and a cloud virtual machine identifier which are associated with the taken request identifier; and carrying out cloud mirror image operation on the cloud virtual machine corresponding to the read cloud virtual machine identification on the cloud physical server identified by the machine room identification.
9. The apparatus of claim 8, wherein the storage module is further configured to assign a unique request identifier to the cloud mirroring operation request; extracting a machine room identifier and a cloud virtual machine identifier from the cloud mirror image operation request; and storing the extracted machine room identifier and the extracted cloud virtual machine identifier in association with the allocated request identifier.
10. The apparatus according to claim 7, wherein the abnormal request queue management module is further configured to record an operation failure result corresponding to the retrieved request identifier when the cloud mirroring operation fails and the number of operation failure retries corresponding to the retrieved request identifier reaches a preset number; and when the cloud mirror image operation fails and the operation failure retry frequency corresponding to the taken-out request identifier does not reach the preset frequency, adding the taken-out request identifier into the abnormal request queue.
11. The apparatus of claim 7, wherein the timed task module is further configured to enable at least one of the request receive queue, the exception request queue, the first timed task, and the second timed task of the distributed deployment to continue to run if at least one of the request receive queue, the exception request queue, the first timed task, and the second timed task is interrupted.
12. The apparatus according to claim 7, wherein the timing task module is further configured to, when the cloud mirroring operation request corresponding to the retrieved request identifier is for mirroring operation on the private cloud, invoke a mirroring operation interface provided by the private cloud and perform mirroring operation on the private cloud according to the request parameter associated with the retrieved request identifier; and when the cloud mirror operation request corresponding to the extracted request identifier aims at mirror operation on the public cloud, calling a mirror operation interface provided by the public cloud and carrying out mirror operation on the public cloud according to the request parameter associated with the extracted request identifier.
13. A server comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 6 when executing the computer program.
14. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201611116992.XA 2016-11-24 2016-12-07 Cloud mirror image operation method and device Active CN108173892B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201611116992.XA CN108173892B (en) 2016-12-07 2016-12-07 Cloud mirror image operation method and device
PCT/CN2017/112906 WO2018095416A1 (en) 2016-11-24 2017-11-24 Information processing method, device and system
US16/279,606 US11088903B2 (en) 2016-11-24 2019-02-19 Hybrid cloud network configuration management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611116992.XA CN108173892B (en) 2016-12-07 2016-12-07 Cloud mirror image operation method and device

Publications (2)

Publication Number Publication Date
CN108173892A CN108173892A (en) 2018-06-15
CN108173892B true CN108173892B (en) 2020-11-13

Family

ID=62526753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611116992.XA Active CN108173892B (en) 2016-11-24 2016-12-07 Cloud mirror image operation method and device

Country Status (1)

Country Link
CN (1) CN108173892B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109254765B (en) * 2018-08-22 2023-08-25 平安科技(深圳)有限公司 Timing task management method, device, computer equipment and storage medium
CN114547744A (en) * 2022-02-24 2022-05-27 清华大学 Model derivation method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777018A (en) * 2010-02-08 2010-07-14 北京同有飞骥科技有限公司 Copying and snapshot combined Windows system protection method
CN103049317A (en) * 2013-01-10 2013-04-17 中国南方电网有限责任公司超高压输电公司 Highly-concurrent data fast write system and method based on queues in cloud environment
CN103294533A (en) * 2012-10-30 2013-09-11 北京安天电子设备有限公司 Task flow control method and task flow control system
CN103390041A (en) * 2013-07-18 2013-11-13 杭州东信北邮信息技术有限公司 Method and system for providing data service based on middleware
CN104714835A (en) * 2013-12-16 2015-06-17 中国移动通信集团公司 Data access processing method and device
CN104753817A (en) * 2013-12-25 2015-07-01 中国移动通信集团公司 Local analogy method and local analogy system for cloud computing message queue service
CN105138471A (en) * 2015-09-01 2015-12-09 浪潮(北京)电子信息产业有限公司 Mirroring process treatment method and device
CN105205175A (en) * 2015-10-15 2015-12-30 北京农信互联科技有限公司 Data operation method and system for distributed database cluster
CN105242915A (en) * 2015-09-07 2016-01-13 无锡天脉聚源传媒科技有限公司 Data operation processing method and apparatus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090307523A1 (en) * 2008-06-06 2009-12-10 Allison Brian D System Performance Through Invalidation of Speculative Memory Scrub Commands
JP4966404B2 (en) * 2010-10-21 2012-07-04 株式会社東芝 MEMORY CONTROL DEVICE, STORAGE DEVICE, AND MEMORY CONTROL METHOD

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777018A (en) * 2010-02-08 2010-07-14 北京同有飞骥科技有限公司 Copying and snapshot combined Windows system protection method
CN103294533A (en) * 2012-10-30 2013-09-11 北京安天电子设备有限公司 Task flow control method and task flow control system
CN103049317A (en) * 2013-01-10 2013-04-17 中国南方电网有限责任公司超高压输电公司 Highly-concurrent data fast write system and method based on queues in cloud environment
CN103390041A (en) * 2013-07-18 2013-11-13 杭州东信北邮信息技术有限公司 Method and system for providing data service based on middleware
CN104714835A (en) * 2013-12-16 2015-06-17 中国移动通信集团公司 Data access processing method and device
CN104753817A (en) * 2013-12-25 2015-07-01 中国移动通信集团公司 Local analogy method and local analogy system for cloud computing message queue service
CN105138471A (en) * 2015-09-01 2015-12-09 浪潮(北京)电子信息产业有限公司 Mirroring process treatment method and device
CN105242915A (en) * 2015-09-07 2016-01-13 无锡天脉聚源传媒科技有限公司 Data operation processing method and apparatus
CN105205175A (en) * 2015-10-15 2015-12-30 北京农信互联科技有限公司 Data operation method and system for distributed database cluster

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《一种云环境下的镜像文件存储系统》;王洪发;《电信科学》;20140228;第82-87页 *

Also Published As

Publication number Publication date
CN108173892A (en) 2018-06-15

Similar Documents

Publication Publication Date Title
US9560165B2 (en) BT offline data download system and method, and computer storage medium
WO2019075978A1 (en) Data transmission method and apparatus, computer device, and storage medium
CN109040227B (en) Service request response method and device based on block chain and computer equipment
CN108683668B (en) Resource checking method, device, storage medium and equipment in content distribution network
CN107656695B (en) Data storage and deletion method and device and distributed storage system
CN112153170B (en) Method, device and equipment for accessing server and storage medium
CN109669822B (en) Electronic device, method for creating backup storage pool, and computer-readable storage medium
CN112052230B (en) Multi-machine room data synchronization method, computing device and storage medium
CN110427386B (en) Data processing method, device and computer storage medium
CN111767347A (en) Switching method and device of consensus algorithm, node equipment and storage medium
US20160259812A1 (en) Method and system for accessing a distributed file system
CN110019873B (en) Face data processing method, device and equipment
CN111541762A (en) Data processing method, management server, device and storage medium
CN108965450B (en) Service request response method, device, computer equipment and storage medium
CN111158959A (en) Virtual machine backup method and device and virtual machine recovery method and device
US20190114178A1 (en) Installing of operating system
CN108173892B (en) Cloud mirror image operation method and device
CN107566470B (en) Method and device for managing virtual machine in cloud data system
CN107689984B (en) Message pushing method and device, computer equipment and storage medium
CN109445988B (en) Heterogeneous disaster recovery method, device, system, server and disaster recovery platform
CN110113217B (en) Micro-service management method, device, management platform and storage medium
CN111431951B (en) Data processing method, node equipment, system and storage medium
CN109324931B (en) Method for realizing vmware mount recovery in data de-duplication system
CN111586438A (en) Method, device and system for processing service data
CN105939278B (en) Traffic processing method and device

Legal Events

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