Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Optionally, as an optional implementation manner, as shown in fig. 1, the resource processing method includes the specific steps:
s102, in response to a first resource migration request, migrating a first resource from a first cloud account to a second cloud account;
S104, acquiring a first resource use request, wherein the first resource use request is used for requesting to acquire and use a second resource from a second cloud account, and the second resource is a resource in the first cloud account;
s106, triggering a second resource use request and a second resource migration request under the condition that a second resource does not exist in the second cloud account;
S108, responding to a second resource acquisition request, and acquiring and using a second resource from the first cloud account;
s110, responding to a second resource migration request, and migrating the second resource from the first cloud account to the second cloud account.
Alternatively, in this embodiment, the resource processing method may be, but not limited to, applied to a migration scenario of cloud resources. The cloud resource migration scenario may include, but is not limited to, migrating cloud resources from a current cloud platform/current cloud account to other cloud platforms/other cloud accounts to improve availability of cloud resources, and cleaning cloud resources under the current cloud platform/current cloud account after migration is completed to reduce use cost.
In the related art, cloud resource migration is usually performed manually by technicians. For example, a cloud account of the same cloud platform is migrated to another cloud account, and a cross-account and cross-region semi-automatic migration mode provided by some cloud platforms can be used in the case, for example, the ali cloud can initiate a migration task to realize migration of RDS and OSS. For another example, migration from one public cloud platform to another public cloud platform may result in lower migration efficiency than the migration capability of the same platform across account numbers, which may not directly use the migration capability provided by the original cloud platform. Both of these situations are not carried out manually by the technician.
It should be noted that, a unified precondition for cloud resource migration is that a migration party (such as an enterprise or a person) needs to know specific resources that need to be migrated, that is, can determine which cloud resources can be migrated, which is a high-cost matter. The main purpose of migration in this case is to provide higher infrastructure availability to the application or to employ lower cloud resource unit price to reduce the cost of cloud resource usage, so the high cost inefficiency of the migration process can be tolerated to some extent.
Another case is to do migration cleaning of cloud resources. In the prior art, manual migration is performed manually or by script writing. This migration approach is a more labor intensive approach. How does a TB-level or even PB-level storage resource exist under a cloud account identify how does a migration of which resources guarantee that the migration will not affect an existing service, how does a migration process have a long migration period, which are significant problems to be considered in the migration process, so that it is difficult for an enterprise to perform the migration on the account level in most cases. If a large number of resources need to be migrated, only the environment can be selected to be rebuilt, and the upgrade migration can be performed manually and slowly.
For the defects in the cloud resource migration scenario, by using the resource processing method provided by the embodiment, a preliminary effective resource (an effective resource which can be directly determined and cannot be deleted) in the first cloud account is migrated to the second cloud account, then in the resource use process of the second cloud account, under the condition that a first resource use request is received, the second resource requested by the first resource use request is firstly tried to be acquired and used from the second cloud account, if the second resource does not exist in the second cloud account, the second resource is not the preliminary effective resource which is initially requested to be migrated in the first resource migration request, and further the second resource is acquired, used and complementarily migrated to the second cloud account from the first cloud account. Therefore, along with the process of using the resources on the second account, other effective resources in the first cloud account can be gradually and automatically migrated to the second cloud account on the basis of the initial effective resources of the first cloud account, so that the effective resources of the original account can be ensured not to be lost, additional operation caused by the loss of the effective resources is avoided, and the cloud resource migration efficiency is greatly improved.
Optionally, in this embodiment, all resources included in the first cloud account include an effective resource and an ineffective resource, where the effective resource needs to be completely migrated to the new second cloud account in the resource migration process, and the ineffective resource does not need to be migrated.
Alternatively, some of the effective resources may be determined by a simple information verification method, for example, based on the version information, the resource whose version information is the latest version may be determined as the effective resource. It should be noted that, some resources still exist in the effective resources, which cannot be or are inconvenient to be directly determined by a simple information verification mode, and the effective resources can be determined by combining with actual use.
Alternatively, in this embodiment, the first resource may be, but is not limited to, an effective resource directly determined based on the version information.
It can be understood that, through the first resource migration request, the local resources (first resources) in the first cloud account are initially migrated to the second cloud account, and in this migration process, it can be determined that the migrated first resources must belong to effective resources.
Optionally, in this embodiment, for other effective resources in the first cloud account, the supplementary migration may be performed, but not limited to, by combining with the resource usage process of the second cloud account.
Optionally, in this embodiment, the first resource usage request may be, but is not limited to, used to indicate that the request obtains and uses a second resource from a second cloud account, where the second resource is a resource included in the original first cloud account.
Optionally, in this embodiment, in a case where the second resource exists in the second cloud account, it indicates that the second resource belongs to the resource in the first resource, and has been migrated from the first cloud account to the second cloud account, then the second resource is normally acquired and used.
Optionally, in this embodiment, in a case where the second resource does not exist in the second cloud account, it indicates that the second resource does not belong to the resource in the first resource, and is the resource requested by the first resource usage request, and the second resource is equivalent to the effective resource in the first cloud account.
Further, triggering a second resource use request, acquiring and using the second resource from the first cloud account, and responding to the first resource use request. Triggering a second resource migration request, and migrating the second resource supplement to the second cloud account as a migration supplement to the first resource migration request.
Alternatively, in the present embodiment, the second resource usage request may be, but is not limited to, a retry request understood as the first resource usage request. It can be understood that after the first resource use request is triggered, attempting to acquire the second resource in the second cloud account, if the second resource does not exist in the second cloud account, re-triggering the first resource use request, and determining the re-triggered first resource use request as the second resource use request.
According to the embodiment provided by the application, the preliminary effective resource (the effective resource which can be directly determined and cannot be deleted) in the first cloud account is firstly migrated to the second cloud account, then under the condition that the first resource use request is received in the resource use process of the second cloud account, the second resource requested by the first resource use request is firstly tried to be acquired and used from the second cloud account, if the second resource does not exist in the second cloud account, the second resource is not the preliminary effective resource which is initially requested to be migrated in the first resource migration request, and further the second resource is acquired, used and complementarily migrated to the second cloud account from the first cloud account. Therefore, along with the process of using the resources on the second account, other effective resources in the first cloud account can be gradually and automatically migrated to the second cloud account on the basis of the initial effective resources of the first cloud account, so that the effective resources of the original account can be ensured not to be lost, additional operation caused by the loss of the effective resources is avoided, the cloud resource migration efficiency is greatly improved, and the technical effect of improving the cloud resource migration efficiency is achieved.
As an alternative, after obtaining the first resource usage request, the method further includes:
Accessing a second cloud account through a main agent module, and verifying whether a second resource exists in the second cloud account, wherein the main agent module has a first association relationship corresponding to the second cloud account;
Under the condition that a second resource exists in the second cloud account, responding to the first resource use request, acquiring the second resource from the second cloud account and using the second resource;
Obtaining and using a second resource from the first cloud account includes:
The first cloud account is accessed from the proxy module, and second resources are acquired from the first cloud account and used, wherein the proxy module has a second association relationship corresponding to the first cloud account.
Optionally, in this embodiment, the cloud resource proxy module may, but is not limited to, include a request selector, a master proxy module, and a slave proxy module, where the cloud resource proxy module connects the client module and the cloud platform module, and is configured to receive a resource usage request triggered by the client module, request a cloud account number included in the cloud platform module to acquire a resource, and respond to the client module to return the resource.
Optionally, in this embodiment, the request selector first receives the first resource usage request and verifies the first resource usage request, where, if the first resource usage request is a first trigger, the first resource usage request is forwarded to the master agent module, and the second cloud account is accessed through the master agent module and verifies whether the second resource exists in the second cloud account.
Optionally, in the embodiment, the second resource is acquired and used when the second resource exists in the second cloud account, and the first resource use request is retried when the second resource does not exist in the second cloud account, that is, the second resource use request is triggered, and the second resource migration request is triggered.
Optionally, in this embodiment, when the result of the request selector verifying the first resource usage request indicates that the first resource usage request is triggered for the second time, (corresponding to the second resource usage request), the request is forwarded to the slave agent module, the second resource is acquired and used by accessing the first cloud account from the slave agent module, and the second resource is migrated to the second cloud account.
It should be noted that, the migration of the first resource and the second resource may be implemented by, but not limited to, a cloud resource management module, where the cloud resource management module may be implemented by, but not limited to, confirmation (resource synchronization of default latest version information) for the first resource, retry resource statistics from the proxy module, retry resource synchronization migration from the proxy module, and resource cleaning of the old account.
Further illustrated, as shown in fig. 2, cloud account a is an original cloud account before migration, including cloud resource a, cloud resource B, cloud resource c, and cloud resource d, and cloud account B is a new cloud account after migration, including cloud resource a and cloud resource B. It can be appreciated that, through the first resource migration request, the cloud resource a and the cloud resource B (i.e., the first resource) in the cloud account a have been migrated to the cloud account B.
Further, the cloud resource proxy module acquires a resource acquisition request triggered by a certain client in the client module (which is assumed to be used for requesting to acquire the cloud resource c, not shown in the figure), and the request selector determines that the request is forwarded to the master proxy module when the request is the first trigger, the master proxy module requests to access the cloud account B, but the cloud account B does not have the cloud resource c, and the cloud resource acquisition process triggered for the first time fails (corresponding to the failed link in fig. 2).
It should be noted that, the main proxy module has a first association relationship corresponding to the second cloud account, and is configured to instruct the main domain name corresponding to the main proxy module to point to the migrated second cloud account.
Further, the resource acquisition request is triggered again, after being judged by the request selector, the request is forwarded to the slave agent module, the slave agent module requests to access the cloud account A, the cloud resource c is acquired from the cloud account A, the return use is carried out, the cloud resource management module is informed, and the cloud resource c is migrated to the cloud account B.
It should be noted that, the slave agent module has a second association relationship corresponding to the first cloud account, and is used for indicating the slave domain name corresponding to the slave agent module to point to the first cloud account before migration.
It should be noted that, after the first resource migration request is completed, in a case that there is no need to access the cloud account a from the proxy module for a period of time, it indicates that all the effective resources (including the first resource and other resources that are subsequently replenished) in the cloud account a have been migrated to the cloud account B.
It can be understood that when the slave agent is triggered, the cloud resource management module migrates the cloud resource accessed by the slave agent in a retry manner, and the process is continuously performed along with the daily request of the client until the slave agent does not have the resource access in a retry manner, so that the preferential migration of the resource is completed.
Further, the cloud resource management module is informed to clean resources of the cloud account A, and only useful cloud resources of the new account are reserved finally, so that waste resources are removed.
According to the embodiment of the application, on the basis of preliminary migration, through the combined use of the master agent module and the slave agent module, as daily requests of the client are continuously carried out, the migrated cloud resources can be covered on all the effective resources to be migrated in the original cloud account, the condition of missing migration in the cloud resource migration process is avoided, and the technical effect of improving the cloud resource migration efficiency is realized.
As an alternative, the method further comprises:
And under the condition that the number of times of accessing the first cloud account is smaller than a preset threshold value in a second time period after the first time period, determining that the effective resources in the first cloud account are migrated to the second cloud account, wherein the effective resources comprise first resources and second resources.
Alternatively, in this embodiment, the first period may be, but not limited to, a preset migration period, the second period may be, but not limited to, a preset verification period, and the second period may be, but not limited to, one-nth of the first period, where N is a positive integer greater than 1.
Alternatively, in this embodiment, the preset threshold may be, but not limited to, 1, but may be, but not limited to, another value.
It can be appreciated that, after the first resource migration request is completed, in a case that there is no need to access the cloud account a from the proxy module for a period of time, it indicates that all the effective resources (including the first resource and other resources that are subsequently replenished) in the cloud account a have been migrated to the cloud account B.
According to the embodiment provided by the application, when the slave agent is triggered, the cloud resource management module is used for migrating the cloud resource accessed by the slave agent again, the process is continuously carried out along with the daily request of the client until the slave agent does not have the resource access again, and the preferential migration of the resource is completed. The client side does not care about which cloud account the resource is under in the whole process, and the client side does not feel, namely does not have risk.
As an optional solution, after determining that the migration of the effective resource in the first cloud account to the second cloud account is completed, the method further includes:
cleaning all resources included in the first cloud account;
and correcting the second association relation of the corresponding first cloud account number of the slave agent module into a third association relation of the corresponding second cloud account number of the slave agent module.
Optionally, in this embodiment, after determining that the migration of the effective resources in the first cloud account to the second cloud account is completed, the cloud resource management module is notified to perform resource cleaning on the first cloud account, and only the useful cloud resources of the second cloud account are finally reserved, so that removal of the waste resources is achieved.
It should be noted that, the second association relationship of the corresponding first cloud account number of the slave agent module is revised to be the third association relationship of the corresponding second cloud account number of the slave agent module, where the third association relationship of the corresponding second cloud account number of the slave agent module is used to indicate the second cloud account number after the slave domain name corresponding to the slave agent module is pointed to and migrated.
Further illustrating, a daily usage architecture after migration of an effective resource in a first cloud account to a second cloud account is completed is shown in fig. 3, where a cloud resource proxy module includes a request selector, a master proxy module, and a slave proxy module, the cloud resource proxy module connects a client module and a cloud platform module, the client module includes a plurality of clients, the cloud platform includes a cloud account a after migration, and the cloud account includes a cloud resource a, a cloud resource b, a cloud resource c, and a cloud resource d.
Further, as shown in fig. 3, the master domain name corresponding to the master agent module and the slave domain name corresponding to the slave agent module both point to the migrated cloud account a. Note that the broken line in fig. 3 indicates a request or response failure link, and the solid line indicates a request or response success link.
Further, as shown in fig. 3, in the daily use process, after receiving the resource use request of the client, the request selector firstly forwards the resource use request to the master agent module for proceeding, and accesses the cloud account a through the master agent module for proceeding resource acquisition and use. In the process, if the cloud resource information meeting the expectations is accessed, the response and the use are normally carried out, and the flow is ended. If the master agent module has the condition of network failure, determining that the response is abnormal (link failure), re-triggering the resource use request, forwarding the resource use request to the slave agent module by the request selector, and accessing the cloud account A through the slave agent module to acquire and use the resource.
According to the embodiment of the application, after the cloud resource is migrated, the slave domain name of the slave agent module is changed from the original account number to the new account number, and the slave domain name of the slave agent module is used as an alternative channel of the master agent module in the daily use process of the new account number, so that the use efficiency of the cloud resource can be improved.
As an alternative, before migrating the first resource from the first cloud account to the second cloud account, the method further includes:
determining a third resource with version information from all the resources included in the first cloud account;
and determining the resource, of which the version information is indicated as the latest version, in the third resource as the first resource.
Optionally, in the embodiment, a third resource with version information is determined from all the resources included in the first cloud account, and a resource with the version information indicated as the latest version in the third resource is determined as the first resource. The first resource is then migrated.
It is understood that storage-type resources in cloud resources generally include two types, a third resource having version information and a fourth resource having no version information. For the third resource, the resource with the version information indicating the latest version must be an effective resource in the first cloud account, so that the partial resource can be quickly migrated first.
It should be noted that, for the resource whose version information indicates that the version information is not the latest version and the fourth resource does not have version information, the version information may also be an effective resource in the first cloud account, so that for this part of the resources, a subsequent supplement is performed in the resource usage request of the second cloud account by a subsequent client (if the second cloud account does not include a corresponding resource).
Further illustrated, as shown in fig. 4, the cloud account a before migration includes cloud resources a of v1 version, v2 version and v3 version, cloud resources B of v1 version and v2 version, and cloud resources c of v1 version, and further it may be determined that the cloud resources of the latest version are cloud resources a of v3 version, cloud resources B of v2 version and cloud resources c of v1 version, and cloud resource migration is performed, so as to obtain cloud account B after migration, where cloud account B includes cloud resources a of v3 version, cloud resources B of v2 version and cloud resources c of v1 version. The cloud resource screening and migration are realized by a cloud resource management module.
According to the embodiment of the application, the purpose of rapidly screening and determining the effective resources to be migrated from the old cloud account is realized, the new cloud account can have most of the effective cloud resources after the process is completed, and the cloud resources are subsequently supplemented on the basis, so that the effect of improving the migration efficiency of the cloud resources is realized.
The cloud resource proxy module is used for screening out first resources from the resources of the first cloud account and migrating the first resources to the second cloud account, the request manager is used for managing received first resource use requests after the migration of the first resources is completed, the first resource use requests are forwarded to the master proxy module under the condition that the first resource use requests are triggered for the first time, the second cloud account is accessed through the master proxy module to acquire second resources, the first resource use requests are used for indicating the client module to request to acquire and use the second resources from the second cloud account, the second resources are resources included in the first cloud account, the request manager is also used for triggering the first resource use requests for the first time and migrating the first resources to the second cloud account, the request manager is used for managing the received first resource use requests when the first resource use requests are triggered for the first time, the first resource use requests are not triggered for the second cloud account, and the second cloud account is not used for acquiring the second resources are required for the second cloud account, and the second cloud account is not used for acquiring the second resources when the second cloud account is triggered for the second cloud account, and the request is not triggered for the second cloud account.
Optionally, in this embodiment, the client module includes an application client, configured to acquire data from the pan-tilt module to perform an application operation. For the client module, the cloud resource is not directly accessed any more, but the cloud resource proxy module is accessed.
Optionally, in this embodiment, the client module may, but is not limited to, initiate a request to the cloud resource proxy module, request to the request selector of the cloud resource proxy module, and request the master proxy module to access by default for the first time.
If the response of the master agent module is normal, the cloud resource information meeting the expectations is obtained and returned to the client module, and the process is terminated. If the response of the main agent module is abnormal, the cloud resource information is requested to be acquired from the agent module, and the flow is terminated after the request meets the expectations.
Optionally, in this embodiment, the cloud resource proxy module is configured to receive a client module request, access the cloud platform module, and respond to the client module.
Optionally, in this embodiment, the cloud resource proxy module provides a request selector, and provides a master-slave mode, that is, a master node-slave node proxy mode, where the request selector needs to receive the request information of the client module, and forwards the request to the cloud platform module through the master-slave mode to obtain the cloud resource information, and finally responds to the client module.
In the daily case, the master node and the slave node point to cloud account numbers under the same cloud platform. When cloud resource migration is performed, the master node points to the migrated new cloud account, and the slave node points to the old cloud account.
The client initiates a request, when resources needed by the client do not exist under the new cloud account, the request selector retries to access the slave node, and at the moment, the client accesses the old cloud account to acquire a normal response. And the slave node proxy module records the cloud resource information accessed to the re-domain name and provides the cloud resource information to the cloud resource management module.
When the client side stably requests the master agent and all services are normal, the slave agent in the agent module hardly receives the request, and the migration is considered to be completed. And finally, directing the master agent and the slave agent to the migrated newly-added account to provide daily service.
Optionally, in this embodiment, the cloud resource management module is used for cloud resource migration implementation.
And when cloud resource migration starts, the cloud resource migration is in a screening rapid migration stage. Firstly, cloud resources with version information are screened, and the resources of the latest version of the same application are quickly copied to a new account by means of cross-account resource sharing mainly aiming at storage type resources.
After the screening quick migration stage is completed, a main agent module in the agent module is pointed to a new account, and a slave agent module is kept still.
When the proxy module triggers the slave proxy module, the cloud resources accessed by the slave proxy module are migrated, and the process is continuously carried out until the slave proxy module does not have the resources accessed again, so that the preferential migration of the resources is completed.
Finally, cloud resources of the old account are cleaned, recovery of the resources is achieved, and only useful cloud resources of the new account are reserved finally, so that removal of waste resources is achieved.
When the resource migration is needed, the cloud account specified by the master-slave mode of the round-robin proxy module points to the new cloud account, and the slave proxy module keeps pointing to the current cloud account, so that the next round of migration can be started.
Optionally, in this embodiment, the cloud platform module is configured to provide access and operation capabilities of cloud resources. It should be noted that, the request initiated by the client module is received originally, and the request initiated by the cloud resource proxy module is received now without any processing. And receiving a rapid migration request initiated by the cloud resource management module to realize the cross-account sharing of resources, which belongs to the capability of the cloud platform.
The following summary illustrates the beneficial effects that can be achieved by the embodiments of the present application:
(1) And (5) effectively migrating the precision. The existing migration modes basically use batch processing, have lower precision and are very easy to migrate the resources needing to be recovered. In the embodiment of the application, only useful cloud resources are stored under the migrated cloud account, and the abandoned expired resources are cleaned, so that the aim of thoroughly recycling the abandoned resources is fulfilled.
(2) High efficiency migration. Related art requires technicians to manually sort resources to be migrated, the workload is proportional to the size of the migrated resources, and the difficulty is great. The embodiment of the application can be fully automated, and is higher than the prior art in terms of operation time and operation quality.
(3) No risk of migration. In the related art, the migration process is easy to cause the condition of missing, and the client cannot accept the loss of the request cloud resource at all, so that the client cannot access the correct resource, which is a great risk. The embodiment of the application solves the problem through a master-slave mode, and realizes migration without any risk.
It will be appreciated that in the specific embodiments of the present application, related data such as user information is involved, and when the above embodiments of the present application are applied to specific products or technologies, user permissions or consents need to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
According to another aspect of the embodiment of the present application, there is also provided a resource processing device for implementing the above-mentioned resource processing method. As shown in fig. 5, the apparatus includes:
the first migration unit 502 is configured to migrate, in response to a first resource migration request, a first resource from a first cloud account to a second cloud account;
A first obtaining unit 504, configured to obtain a first resource usage request, where the first resource usage request is used to request that a second resource be obtained from a second cloud account be used, and the second resource is a resource in the first cloud account;
a triggering unit 506, configured to trigger a second resource usage request and a second resource migration request when the second resource does not exist in the second cloud account;
a second obtaining unit 508, configured to obtain, in response to the second resource obtaining request, a second resource from the first cloud account and use the second resource;
The second migration unit 510 is configured to migrate, in response to the second resource migration request, the second resource from the first cloud account to the second cloud account.
As an alternative, the apparatus further includes:
The first access module is used for accessing the second cloud account through the main agent module after the first resource use request is acquired, and verifying whether the second resource exists in the second cloud account, wherein the main agent module has a first association relationship corresponding to the second cloud account;
The obtaining module is used for responding to the first resource use request under the condition that the second resource exists in the second cloud account, and obtaining and using the second resource from the second cloud account.
As an alternative, the second obtaining unit 508 includes:
The second access module is used for accessing the first cloud account through the proxy module, acquiring second resources from the first cloud account and using the second resources, wherein the proxy module has a second association relationship corresponding to the first cloud account.
As an alternative, the apparatus further includes:
The first determining module is configured to determine that an effective resource in the first cloud account completes migration to the second cloud account when the number of times of accessing the first cloud account from the proxy module in a second time period after the first time period is smaller than a preset threshold, where the effective resource includes a first resource and a second resource.
As an alternative, the apparatus further includes:
The cleaning module is used for cleaning all resources included in the first cloud account after determining that the effective resources in the first cloud account are migrated to the second cloud account;
and the correction module is used for correcting the second association relationship of the corresponding first cloud account number of the slave agent module into the third association relationship of the corresponding second cloud account number of the slave agent module after determining that the effective resource in the first cloud account number is migrated to the second cloud account number.
As an alternative, the apparatus further includes:
The second determining module is used for determining a third resource with version information from all resources included in the first cloud account before the first resource is migrated from the first cloud account to the second cloud account;
And the third determining module is used for determining the resource, of which the version information is indicated as the latest version, in the third resource as the first resource before the first resource is migrated from the first cloud account to the second cloud account.
According to a further aspect of embodiments of the present application there is also provided an electronic device for implementing the above-described resource processing method, further as shown in fig. 6, the electronic device comprising a memory 602 and a processor 604, the memory 602 having stored therein a computer program, the processor 604 being arranged to perform the steps of any of the method embodiments described above by means of the computer program.
Alternatively, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of the computer network.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S1, responding to a first resource migration request, and migrating a first resource from a first cloud account to a second cloud account;
s2, acquiring a first resource use request, wherein the first resource use request is used for requesting to acquire and use a second resource from a second cloud account, and the second resource is a resource in the first cloud account;
S3, triggering a second resource use request and a second resource migration request under the condition that a second resource does not exist in the second cloud account;
S4, responding to a second resource acquisition request, and acquiring and using a second resource from the first cloud account;
and S5, responding to a second resource migration request, and migrating the second resource from the first cloud account to the second cloud account.
Alternatively, it will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 6 is merely illustrative, and that fig. 6 is not intended to limit the configuration of the electronic device described above. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
The memory 602 may be used to store software programs and modules, such as program instructions/modules corresponding to the resource processing methods and apparatuses in the embodiments of the present application, and the processor 604 executes the software programs and modules stored in the memory 602, thereby performing various functional applications and data processing, that is, implementing the resource processing methods described above. The memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 602 may further include memory located remotely from processor 604, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 602 may be used to store, but is not limited to, information of a first resource, a second resource, and the like. As an example, as shown in fig. 6, the memory 602 may include, but is not limited to, the first migration unit 502, the first obtaining unit 504, the trigger unit 506, the second obtaining unit 508, and the second migration unit 510 in the resource processing apparatus. In addition, other module units in the above-mentioned resource processing device may be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 606 is used to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 606 includes a Network adapter (Network I NTERFACE Contro l l er, NIC) that may connect to other Network devices and routers via a Network cable to communicate with the Internet or a local area Network. In one example, the transmission device 606 is a Radio Frequency (RF) module for wirelessly communicating with the internet.
The electronic device further includes a display 608 for displaying information of the first resource, the second resource, and the like, and a connection bus 610 for connecting respective module components in the electronic device.
In other embodiments, the client or server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the plurality of nodes through a network communication. The nodes may form a peer-to-peer network, and any type of computing device, such as a server, a client, etc., may become a node in the blockchain system by joining the peer-to-peer network.
According to one aspect of the present application, there is provided a computer program product comprising a computer program/instruction containing program code for executing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via a communication portion, and/or installed from a removable medium. When executed by a central processing unit, performs various functions provided by embodiments of the present application.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
It should be noted that the computer system of the electronic device is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
The computer system includes a central processing unit (Centra l Process i ng Un it, CPU) that can perform various appropriate actions and processes according to a program stored in a Read-On-y Memory (ROM) or a program loaded from a storage section into a random access Memory (Random Access Memory, RAM). In the random access memory, various programs and data required for the system operation are also stored. The CPU, the ROM and the RAM are connected to each other by bus. An input/Output interface (I nput/Output interface, i.e., I/O interface) is also connected to the bus.
The following components are connected to input/output interfaces including an input section including a keyboard, a mouse, etc., an output section including a Cathode Ray Tube (CRT), a liquid crystal display (liqu I D CRYSTA L D I SP L AY, LCD), etc., and a speaker, etc., a storage section including a hard disk, etc., and a communication section including a network interface card such as a local area network card, a modem, etc. The communication section performs communication processing via a network such as the internet. The drive is also connected to the input/output interface as needed. Removable media such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, and the like are mounted on the drive as needed so that a computer program read therefrom is mounted into the storage section as needed.
In particular, the processes described in the various method flowcharts may be implemented as computer software programs according to embodiments of the application. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via a communication portion, and/or installed from a removable medium. The computer program, when executed by a central processing unit, performs the various functions defined in the system of the application.
According to one aspect of the present application, there is provided a computer-readable storage medium, from which a processor of a computer device reads the computer instructions, the processor executing the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the steps of:
S1, responding to a first resource migration request, and migrating a first resource from a first cloud account to a second cloud account;
s2, acquiring a first resource use request, wherein the first resource use request is used for requesting to acquire and use a second resource from a second cloud account, and the second resource is a resource in the first cloud account;
S3, triggering a second resource use request and a second resource migration request under the condition that a second resource does not exist in the second cloud account;
S4, responding to a second resource acquisition request, and acquiring and using a second resource from the first cloud account;
and S5, responding to a second resource migration request, and migrating the second resource from the first cloud account to the second cloud account.
Alternatively, in this embodiment, all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing the electronic device related hardware, and the program may be stored in a computer readable storage medium, where the storage medium may include a flash disk, a Read-On-y Memory (ROM), a random access device (Random Access Memory, RAM), a magnetic disk, or an optical disk.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method of the various embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the recorded clients may be implemented in other ways. The above-described embodiments of the apparatus are merely exemplary, and are merely a logical functional division, and there may be other manners of dividing the apparatus in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.