Method, device, equipment, medium and program product for cloud-based resource migration

Through a standardized cloud resource planning model, virtual numbers and network segment information are generated, private networks and subnets are created, routing and security groups are configured, and the problems of low cloud efficiency and high error rate are solved, achieving efficient and reusable Resource cloud access process.

CN114253931BActive Publication Date: 2024-12-20CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111576574.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2024-12-20
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

During the project cloud-based process, the cloud-based resource efficiency is low, resulting in cumbersome operations, high error rates, and the underlying resources cannot be used normally.

Method used

By generating virtual numbers and network segment information based on preset cloud resource planning, creating private networks and subnets, configuring routing, setting file storage resources and security groups, establishing cloud servers, and forming a standardized, concise and universal cloud access process.

Benefits of technology

It improves the efficiency and reusability of resources to go to the cloud, reduces the error rate, and ensures the normal use of basic resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114253931B_ABST
    Figure CN114253931B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for cloud-based resources. The method for cloud-based resources includes: generating a virtual number and network segment information based on a preset cloud resource plan; creating a private network and a subnet corresponding to the private network based on the virtual number and network segment information, and obtaining private network mapping information and subnet mapping information; creating a route based on the private network mapping information and the subnet mapping information; creating a file storage resource based on the private network mapping information, the subnet mapping information and the preset file storage resource specification, and obtaining file storage mapping information; setting a security group based on the file storage mapping information through a preset security group rule, and obtaining security group mapping information; establishing a cloud server based on the private network mapping information, the subnet mapping information and the security group mapping information, and obtaining cloud server information to complete cloud-based resources. The present disclosure also provides a device, equipment, medium and program product for cloud-based resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of distributed computing, specifically the field of cloud computing, and more specifically to a method, apparatus, device, medium, and program product for cloud-based resource migration. Background Art

[0002] When migrating a project to the cloud, resources must first be moved to the cloud to provide an environment in which the application can run. However, in this process, there is often an inefficient problem of moving resources to the cloud.

[0003] Therefore, relevant operational resources with reasonable specifications are needed, and the implementation process needs to be as simple and universal as possible, so that the cloud migration process can be efficient, reusable, and have a low error rate. Summary of the invention

[0004] In view of the above problems, the present disclosure provides a method, apparatus, device, medium and program product for improving the efficiency of resource migration to the cloud.

[0005] According to a first aspect of the present disclosure, a method for cloud-based resources is provided, comprising: generating a virtual number and network segment information based on a preset cloud resource plan; creating a private network and a subnet corresponding to the private network based on the virtual number and network segment information, and obtaining private network mapping information and subnet mapping information; creating a route based on the private network mapping information and the subnet mapping information; creating a file storage resource based on the private network mapping information, the subnet mapping information and a preset file storage resource specification, and obtaining file storage mapping information; setting a security group based on the file storage mapping information through a preset security group rule, and obtaining security group mapping information; establishing a cloud server based on the private network mapping information, the subnet mapping information and the security group mapping information, and obtaining cloud server information to complete cloud-based resources.

[0006] According to an embodiment of the present disclosure, creating a private network and a subnet corresponding to the private network based on the virtual number and the network segment information to obtain private network mapping information and subnet mapping information includes: configuring the private network based on the virtual number and the network segment information to obtain a private network identifier; and mapping the virtual number and the private network identifier to obtain the private network mapping information.

[0007] According to an embodiment of the present disclosure, a private network and a subnet corresponding to the private network are created based on the virtual number and the network segment information to obtain private network mapping information and subnet mapping information, wherein the subnet mapping information includes first subnet mapping information and second subnet mapping information. The method includes: creating a corresponding subnet based on the private network mapping information and the network segment information to obtain a subnet identifier; mapping the virtual number with the subnet identifier to obtain the first subnet mapping information; and mapping the virtual number with the network segment information corresponding to the subnet identifier to obtain the second subnet mapping information.

[0008] According to an embodiment of the present disclosure, the creation of routes based on the private network mapping information and the subnet mapping information includes: obtaining interconnection relationship parameters based on business logic, the interconnection relationship parameters including an incoming virtual number and an outgoing virtual number; and based on the incoming virtual number and the outgoing virtual number, obtaining the corresponding private network identifier, the subnet identifier and the network segment information through the private network mapping information, the first subnet mapping information and the second subnet mapping information, and completing the incoming and outgoing route configuration.

[0009] According to an embodiment of the present disclosure, the creating of file storage resources based on the private network mapping information, the subnet mapping information and the preset file storage resource specifications to obtain the file storage mapping information includes: obtaining the private network identifier and the subnet identifier respectively through the private network mapping information and the first subnet mapping information based on the virtual number; serializing the file storage resources based on the private network identifier, the subnet identifier and the preset file storage resource specifications to obtain the file storage identifier; and mapping the virtual number and the file storage identifier to obtain the file storage mapping information.

[0010] According to an embodiment of the present disclosure, the security group is set based on the file storage mapping information through preset security group rules to obtain security group mapping information, including: obtaining the virtual number to be input based on the preset cloud resource planning; when the outbound virtual number is consistent with the input virtual number, adding a new outbound rule to restrict the outbound visit permission; or when the inbound virtual number is consistent with the input virtual number, adding a new inbound rule to restrict the inbound visit permission.

[0011] A second aspect of the present disclosure provides a device for cloud-based resources, comprising: a parameter generation module, a network creation module, a routing creation module, a file storage resource creation module, a security group creation module and a cloud server creation module, wherein the parameter generation module is used to generate a virtual number and network segment information based on a preset cloud resource plan; the network creation module is used to create a private network and a subnet corresponding to the private network based on the virtual number and network segment information, and obtain private network mapping information and subnet mapping information; the routing creation module is used to create a route based on the private network mapping information and the subnet mapping information; the file storage resource creation module is used to create a file storage resource based on the private network mapping information, the subnet mapping information and a preset file storage resource specification, and obtain file storage mapping information; the security group creation module is used to set a security group based on the file storage mapping information through a preset security group rule, and obtain security group mapping information; the cloud server creation module is used to establish a cloud server based on the private network mapping information, the subnet mapping information and the security group mapping information, and obtain cloud server information to complete cloud-based resources.

[0012] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned resource cloud migration method.

[0013] The fourth aspect of the present disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned resource cloud migration method.

[0014] The fifth aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above-mentioned resource cloud migration method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0016] Figure 1 The application scenario diagram of the resource cloud migration method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.

[0017] Figure 2 The flowchart of the basic configuration method for cloud-based resources according to an embodiment of the present disclosure is schematically shown.

[0018] Figure 3 A logical grouping diagram of a preset cloud resource planning according to an embodiment of the present disclosure is schematically shown.

[0019] Figure 4 The structural block diagram of the resource cloud migration device according to an embodiment of the present disclosure is schematically shown.

[0020] Figure 5 A block diagram of an electronic device suitable for implementing a method for migrating resources to the cloud according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0021] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0022] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0023] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0024] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0025] In the work, a large number of different projects need to be deployed to the cloud. In the process of cloud migration, these projects need to create basic resources first, and then deploy the project's application to the basic resources for operation. Different projects may have different logical structures for cloud migration of basic resources and different cloud migration implementation processes. The present invention is to establish a set of widely reusable cloud resource planning models and cloud migration implementation processes to implement cloud migration of basic resources with the highest efficiency and the lowest error rate.

[0026] An embodiment of the present disclosure provides a method for cloud-based resources, including: generating a virtual number and network segment information based on a preset cloud resource plan; creating a private network and a subnet corresponding to the private network based on the virtual number and network segment information, and obtaining private network mapping information and subnet mapping information; creating a route based on the private network mapping information and the subnet mapping information; creating a file storage resource based on the private network mapping information, the subnet mapping information and a preset file storage resource specification, and obtaining file storage mapping information; setting a security group based on the file storage mapping information through a preset security group rule, and obtaining security group mapping information; establishing a cloud server based on the private network mapping information, the subnet mapping information and the security group mapping information, and obtaining cloud server information to complete cloud-based resources.

[0027] The embodiments of the present disclosure clarify the relationship between basic resources based on the standardized cloud resource planning model according to logical grouping. Based on this, a standardized, concise, and universal implementation process is formed according to the creation / configuration characteristics and the dependencies between different cloud resources. Based on this implementation process, the problem of the need to operate a single cloud resource sequentially and repeatedly during the process of clouding basic resources, or the problem that the basic resources cannot be used normally due to missing configuration or wrong configuration, is solved.

[0028] Figure 1 The following schematically shows an application scenario diagram of cloud-based resources according to an embodiment of the present disclosure.

[0029] like Figure 1 As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0030] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0031] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0032] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0033] It should be noted that the resource clouding method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the resource clouding device provided in the embodiment of the present disclosure can generally be set in the server 105. The resource clouding method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Correspondingly, the resource clouding device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0034] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0035] The following will be based on Figure 1 The scene described by Figure 2 to Figure 4 The method of migrating resources to the cloud in the disclosed embodiment is described in detail.

[0036] According to the embodiments of the present disclosure, the following operations S210 to S260 and S310 to S320 can be performed by an automation tool. The automation tool connects the cloud implementation personnel and the cloud platform, becoming a bridge between the two. It converts the manual direct operation of the cloud platform by the implementation personnel into an automated execution. The implementation personnel input the cloud parameters to the automation tool, and the automation tool operates the cloud platform to implement the basic resources on the cloud. The automation tool provides an interface and imports a template table to input structured parameters on the implementation personnel side; on the cloud platform side, it interacts with the cloud platform OpenAPI to execute cloud resource implementation. The automation tool parses the input parameters, organizes the parameters step by step, calls the OpenAPI of each cloud resource of the cloud platform, and collects the output parameters during the execution of each step, which are integrated with the input parameters provided by the implementation personnel to form the parameters of the subsequent steps.

[0037] Figure 2 The flowchart of the basic configuration method for cloud-based resources according to an embodiment of the present disclosure is schematically shown.

[0038] like Figure 2As shown, the method for cloud-based resources in this embodiment includes operations S210 to S260, and the transaction processing method can be executed by server 105.

[0039] In operation S210, a virtual number and network segment information are generated based on a preset cloud resource plan.

[0040] According to the embodiments of the present disclosure, the preset cloud resource planning has been planned and improved in advance to guide the migration of resources to the cloud.

[0041] In operation S220, a private network and a subnet corresponding to the private network are created based on the virtual number and the network segment information, and private network mapping information and subnet mapping information are obtained.

[0042] According to an embodiment of the present disclosure, the private network is configured based on the virtual number and the network segment information to obtain a private network identifier; and the virtual number and the private network identifier are mapped to obtain the private network mapping information.

[0043] According to an embodiment of the present disclosure, the private network mapping information is used to enable a virtual number or a private network identifier to obtain a corresponding private network identifier or a virtual number.

[0044] Specifically, N virtual numbers vpc_no and network parameters of network segment information cidr are generated on the user side, wherein vpc_no is used to distinguish cloud resource groups, and N private networks are created by calling the API of the cloud platform. At the same time, the cloud platform returns the private network identifier vpc_id of the private network to the user side, and the local side constructs a mapping relationship between the private network identifier vpc_id and the virtual number vpc_no to obtain the private network mapping information vpc_map. The private network mapping information vpc_map is used in subsequent steps to guide the corresponding resources to go to the cloud. Among them, the virtual number vpc_no is a name for the different private networks based on artificial rules, and is an input parameter received by the cloud platform, and the private network identifier vpc_id is obtained by corresponding to the virtual number vpc_no. The private network identifier vpc_id can be regarded as an identifiable identifier in the cloud platform. It should be noted that, under normal circumstances, the private network identifier vpc_id cannot be transmitted to the cloud platform as an input from the user end. The user end needs to send the virtual number vpc_no to the cloud platform to find the private network identifier vpc_id through the private network mapping information vpc_map.

[0045] For example, in operation S220, the specific steps for creating the private network are as follows:

[0046] Step S221, create a map type data structure private network mapping information vpc_map to store the virtual number vpc_no and the private network identifier vpc_id, wherein the private network identifier vpc_id includes a unique identifier corresponding to a private network resource returned by the cloud platform.

[0047] Step S222, repeat the following operations until N private networks are established: the user enters the virtual number vpc_no and the network segment information cidr; calls the cloud platform's http api interface for creating a private network, passing the network segment information cidr; the cloud platform http api interface returns the resource unique identifier of the created private network, i.e. vpc_id.

[0048] Step S223: The N virtual numbers vpc_no and the N private network identifiers vpc_id are matched one by one, and are put into the private network mapping information vpc_map as key-value pairs.

[0049] Specifically, the virtual number is information input by the user and is used to distinguish and group resources and express the grouping of resources. For example, the virtual number vpc_no can be a number such as vpc_1, vpc_2, etc. used to distinguish resources.

[0050] According to an embodiment of the present disclosure, the subnet mapping information includes first subnet mapping information and second subnet mapping information, the first subnet mapping information is used to map the virtual number and the subnet identifier, and the second subnet mapping information is used to map the virtual number and the network segment information.

[0051] According to an embodiment of the present disclosure, it also includes: creating a corresponding subnet based on the private network mapping information and the network segment information to obtain a subnet identifier; mapping the virtual number with the subnet identifier to obtain the first subnet mapping information; and mapping the virtual number with the network segment information corresponding to the subnet identifier to obtain the second subnet mapping information.

[0052] Specifically, by sending the virtual number vpc_no, the private network mapping information vpc_map and the network segment information cidr to the cloud platform, a subnet is created based on the cloud platform API, and then the cloud platform returns the subnet mapping information subnet id.

[0053] For example, in operation S220, the subnet creation includes the following steps:

[0054] Step S224, create a map type data structure of first subnet mapping information subnet_map, which is used to store the virtual number vpc_no and the subnet identifier subnet_id, wherein the subnet identifier subnet id includes a unique identifier corresponding to a subnet returned by the cloud platform.

[0055] Step S225, creating a map type data structure first subnet mapping information vpc_subnet_cidr_map, which is used to store the virtual number vpc_no and the network segment information cidr, wherein the network segment information includes the subnet segment.

[0056] Step S226, repeat the following operations until N subnets are established: the user inputs the virtual number vpc_no and the subnet segment cidr; the private network identifier vpc_id is obtained through the virtual number vpc_no in the private network mapping information vpc_map; the cloud platform's http api interface for creating a subnet is called, with the main parameters: private network identifier vpc_id and segment information cidr; the cloud platform http api interface returns the resource unique identifier of the created subnet, that is, the subnet identifier subnet id.

[0057] Step S227, putting the virtual number vpc_no and the subnet identifier subnet_id as a key-value pair into the created first subnet mapping information subnet_map, and putting the virtual number vpc_no and the subnet segment information cidr as a key-value pair into the created second subnet mapping information vpc_subnet_cidr_map.

[0058] In operation S230, a route is created based on the private network mapping information and the subnet mapping information.

[0059] According to an embodiment of the present disclosure, interconnection relationship parameters are obtained based on business logic, and the interconnection relationship parameters include an incoming virtual number and an outgoing virtual number; and based on the incoming virtual number and the outgoing virtual number, the corresponding private network identifier, the subnet identifier and the network segment information are obtained through the private network mapping information, the first subnet mapping information and the second subnet mapping information, and the routing configuration for incoming and outgoing visits is completed.

[0060] Specifically, the user inputs a virtual number vpc_no to obtain the corresponding subnet_id from the subnet mapping information subnet_map, sends the subnet identifier subnet_id and the network segment information cidr to the cloud platform, creates a route based on the cloud platform API, and returns the route identifier route id.

[0061] For example, in operation S230, the creation of a route includes the following steps:

[0062] Step S231, obtaining interconnection relationship parameters, wherein the interconnection relationship parameters include an outgoing virtual number vpc_no and an incoming virtual number vpc_no.

[0063] Step S232, obtaining the outgoing private network identifier vpc_id through the outgoing virtual number vpc_no, and obtaining the incoming private network identifier vpc_id through the incoming private network identifier vpc_no.

[0064] Step S233, obtain the outgoing subnet identifier subnet_id from the first subnet mapping information subnet_map according to the outgoing virtual number vpc_no, obtain the incoming subnet identifier subnet_id from the first subnet mapping information subnet_map according to the incoming private network information vpc_no; obtain the outgoing subnet network segment information cidr from the second subnet mapping information vpc_subnet_cidr_map according to the outgoing virtual number vpc_n0, and obtain the incoming subnet network segment cidr from the second subnet mapping information vpc_subnet_cidr_map according to the incoming virtual number vpc_no. Configure the outgoing end route and the incoming end route through the private network identifier vpc_id, subnet identifier subnet_id, and network segment information cidr corresponding to the outgoing end route and the incoming segment route, respectively, until all routes are configured.

[0065] In operation S240, a file storage resource is created based on the private network mapping information, the subnet mapping information, and a preset file storage resource specification to obtain file storage mapping information.

[0066] According to an embodiment of the present disclosure, the private network identifier and the subnet identifier are respectively obtained based on the virtual number through the private network mapping information and the first subnet mapping information; the file storage identifier is obtained by serializing the file storage resources based on the private network identifier, the subnet identifier and the preset file storage resource specification; and the virtual number and the file storage identifier are mapped to obtain the file storage mapping information.

[0067] According to an embodiment of the present disclosure, the file storage resource information includes a file storage resource identifier and a file storage resource address.

[0068] According to an embodiment of the present disclosure, the preset security group rules are used to store access rules.

[0069] Specifically, by sending the network information vpc_map and the preset file storage resource specifications to the cloud platform, a file storage resource is created based on the cloud platform API, and the file storage resource identifier is returned, the file storage resource identifier includes the file storage resource identifier nas_id and the file storage resource address nas_ip. Among them, the file storage resource specifications include the file storage resource capacity. In fact, the vpc_id in the vpc_map mainly participates in the creation of the file storage resource.

[0070] For example, in operation S240, the creation of the file storage resource includes the following steps:

[0071] Step S241, create a map type data structure nas_map to store the corresponding relationship between vpc_no and nas_ip, wherein the nas_ip includes a file storage resource corresponding to an ip.

[0072] Step S242, repeat the following operations until N file storage resources are created: obtain the vpc_no and specifications of the xth file storage resource parameters from the parameters input by the user; obtain the vpc_id through the vpc_no in the vpc_map; obtain the subnet_id from the created subnet_map according to the vpc_no; call the cloud platform's http api interface for creating file storage resources, with the main parameters: vpc_id, subnet_id, specifications; the cloud platform http api interface returns the ip of the created file storage resource, i.e., nas_ip;

[0073] Step S243: put the N vpc_no and N nas_ip into the created file storage mapping information nas_map in a one-to-one correspondence as a key-value pair.

[0074] In operation S250, a security group is set based on the file storage mapping information by using a preset security group rule to obtain security group mapping information.

[0075] For example, in operation S250, creating a security group includes the following steps:

[0076] Step S251, creating security group mapping information sg_map of a map type data structure to store vpc_no and sg_id, wherein the sg_id includes a unique identifier corresponding to a security group.

[0077] Step S252, repeat the following operations until N sg_ids are created: create an array type data structure rule array sg_rule arr to store the preset security group rules that need to be added to a virtual private cloud vpc, the preset security group rules include access direction (outbound / inbound), the network segment information cidr / ip of the peer subnet; the virtual number vpc_no entered by the user; based on the private network mapping information vpc_map, the private network identifier vpc_id is obtained through the virtual number vpc_no; call the cloud platform's http api interface for creating a security group, using the private network identifier vpc_id and the rule array sg_rule_arr; the cloud platform http api interface returns the unique identifier of the created security group resource, that is, sg_id.

[0078] Step S253: put the virtual number vpc_no and the security group identifier sg_id into the created security group mapping information sg_map in a one-to-one correspondence as a key-value pair.

[0079] According to an embodiment of the present disclosure, the virtual number to be input is obtained based on the preset cloud resource planning; when the virtual number of the outbound visit is consistent with the input virtual number, a new outbound visit rule is added to restrict the outbound visit authority; or when the virtual number of the inbound visit is consistent with the input virtual number, a new inbound visit rule is added to restrict the inbound visit authority.

[0080] For example, the specific implementation steps for adding access rules are as follows:

[0081] Step 51, obtaining interconnection relationship parameters from the parameters input by the user: the outgoing virtual number vpc_no and the incoming virtual number vpc_no.

[0082] Step 52, if the virtual number vpc_no of the outbound visit is consistent with the vpc_no in step S252, a new outbound visit rule is added to the created rule array sg_rule arr, and the parameters include the access direction (outbound visit), the network segment information cidr of the peer subnet / the virtual number vpc_no of the inbound IP, and the inbound subnet network segment information cidr is obtained from the second subnet mapping information vpc_subnet_cidr_map;

[0083] Step 53, if the incoming virtual number vpc_no is consistent with the vpc_no in step S252, a new incoming rule is added to the created preset security group rule sg_rule_arr, and the parameters include the access direction (incoming), the network segment information cidr / ip of the peer subnet, and the virtual number vpc_no of the outgoing subnet, and the outgoing subnet network segment information cidr is obtained from the second subnet mapping information vpc_subnet_cidr_map.

[0084] Step 54, the preset security group rules involved in the interconnection relationship between subnets have been put into the created rule array sg_rule_arr.

[0085] In operation S260, a cloud server is established based on the private network mapping information, the subnet mapping information, and the security group mapping information, and cloud server information is obtained to complete the cloud migration of resources.

[0086] Specifically, the cloud server information includes a cloud server identifier vm_id and a cloud server address vm_ip.

[0087] For example, in operation S260, the creation of the cloud server includes the following steps:

[0088] Step S261, obtain the preset cloud server specifications and virtual number vpc_no, and based on the virtual number vpc_no, obtain the corresponding private network identifier vpc_id through the private network mapping information vpc_map, obtain the corresponding subnet identifier subnet_id through the subnet mapping information subnet_map, and obtain the corresponding security group identifier sg_id through the security group mapping information sg_map.

[0089] Step S262, repeat the following operations until M cloud servers are created: call the cloud platform's http api interface for creating a cloud server, and create a cloud server using the preset cloud server specifications, private network identifier vpc_id, subnet identifier subnet_id, and security group identifier sg_id.

[0090] Step S263, the cloud platform http api interface returns the cloud server identifier vm_id and the cloud server address vm_ip of the created cloud server resource.

[0091] The embodiments of the present disclosure clarify the relationship between basic resources based on logical grouping. Based on this, a standardized, concise, and universal implementation process is formed according to the creation / configuration characteristics and dependencies of different cloud resources. Based on this implementation process, the problem of the need to operate a single cloud resource sequentially and repeatedly during the process of clouding basic resources, or the problem that the basic resources cannot be used normally due to missing configuration or wrong configuration, is solved.

[0092] Figure 3 A logical grouping diagram of a preset cloud resource planning according to an embodiment of the present disclosure is schematically shown.

[0093] The above operations S210 to S260 are based on Figure 3 The operation is performed according to the guidance of the preset cloud resource planning.

[0094] like Figure 3As shown, in one cloud resource group, there is a private network, in the private network, there is a subnet, and one subnet mounts a route. In the subnet in one cloud resource group, there are multiple cloud servers for business processing. The embodiment of the present disclosure takes the project system as a unit, therefore, only considers the situation where one cloud resource group corresponds to one private network. Of course, based on the actual situation, one cloud resource group can also correspond to multiple private networks. This is not limited here.

[0095] The cloud resource groups in the same private network are interconnected. Whether the network access relationship between cloud resource groups is enabled depends on the logical relationship between the subsystems, that is, whether the subsystems need to access each other. The access relationship of each cloud-based project is different. For example, for Project A, a network access relationship needs to be enabled between "Cloud Resource Group 1" and "Cloud Resource Group 3"; for Project B, a network access relationship needs to be enabled between "Cloud Resource Group 2" and "Cloud Resource Group 4". The network access relationship is enabled mainly by establishing peer-to-peer connections between private networks, establishing routing rules, and configuring security groups. The network security relationship is enabled to ensure the necessary communication between subsystems under the principle of least privilege, in compliance with the security principle.

[0096] In the embodiment of the present disclosure, cloud resources are grouped according to the logical grouping of project subsystems, and the cloud resources of each logical grouping are in the same private network. Each logical grouping includes cloud resources such as cloud servers, subnets, security groups, and file storage resources, so that resources are interconnected while ensuring security.

[0097] Based on the above-mentioned method for cloud-based resources, the present disclosure also provides a device for cloud-based resources. Figure 4 The device is described in detail.

[0098] Figure 4 The structural block diagram of the device for migrating resources to the cloud according to an embodiment of the present disclosure is schematically shown.

[0099] like Figure 4 As shown, the resource cloud-based device 400 of this embodiment includes a parameter generation module 410 , a network creation module 420 , a routing creation module 430 , a file storage resource creation module 440 , a security group creation module 450 and a cloud server creation module 460 .

[0100] The parameter generation module 410 is used to generate virtual numbers and network segment information based on a preset cloud resource plan. In one embodiment, the parameter generation module 410 can be used to perform the operation S210 described above, which will not be described in detail here.

[0101] The network creation module 420 is used to create a private network and a subnet corresponding to the private network based on the virtual number and network segment information, and obtain private network mapping information and subnet mapping information. In one embodiment, the network creation module 420 can be used to perform the operation S220 described above, which will not be repeated here.

[0102] The route creation module 430 is used to create a route based on the private network mapping information and the subnet mapping information. In one embodiment, the route creation module 430 can be used to perform the operation S230 described above, which will not be described in detail here.

[0103] The file storage resource creation module 440 is used to create a file storage resource based on the private network mapping information, the subnet mapping information and the preset file storage resource specification, and obtain the file storage mapping information and the security group mapping information. In one embodiment, the file storage resource creation module 440 can be used to perform the operation S240 described above, which will not be repeated here.

[0104] The security group creation module 450 is used to set a security group based on the file storage mapping information through a preset security group rule to obtain security group mapping information. In one embodiment, the security group creation module 450 can be used to perform the operation S240 described above, which will not be repeated here.

[0105] The cloud server creation module 460 is used to establish a cloud server based on the private network mapping information, the subnet mapping information and the security group mapping information, and obtain cloud server information to complete the cloud migration of resources. In one embodiment, the cloud server creation module 460 can be used to perform the operation S260 described above, which will not be repeated here.

[0106] According to an embodiment of the present disclosure, any multiple modules among the parameter generation module 410, the network creation module 420, the route creation module 430, the file storage resource creation module 440, the security group creation module 450 and the cloud server creation module 460 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the parameter generation module 410, the network creation module 420, the routing creation module 430, the file storage resource creation module 440, the security group creation module 450 and the cloud server creation module 460 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by an appropriate combination of any of them. Alternatively, at least one of the parameter generation module 410, the network creation module 420, the routing creation module 430, the file storage resource creation module 440, the security group creation module 450 and the cloud server creation module 460 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.

[0107] Figure 5 A block diagram of an electronic device suitable for implementing a method for migrating resources to the cloud according to an embodiment of the present disclosure is schematically shown.

[0108] like Figure 5 As shown, the electronic device 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include an onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0109] In RAM 503, various programs and data required for the operation of electronic device 500 are stored. Processor 501, ROM 502 and RAM 503 are connected to each other via bus 504. Processor 501 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 502 and / or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0110] According to an embodiment of the present disclosure, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to the bus 504. The electronic device 500 may further include one or more of the following components connected to the I / O interface 505: an input portion 506 including a keyboard, a mouse, etc.; an output portion 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 508 including a hard disk, etc.; and a communication portion 509 including a network interface card such as a LAN card, a modem, etc. The communication portion 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage portion 508 as needed.

[0111] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0112] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.

[0113] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the item recommendation method provided by the embodiment of the present disclosure.

[0114] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 501. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0115] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 509, and / or installed from the removable medium 511. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0116] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the processor 501, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0117] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0118] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0119] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0120] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for migrating resources to the cloud, characterized in that: include: Generate virtual number and network segment information based on preset cloud resource planning; Create a private network and a subnet corresponding to the private network based on the virtual number and network segment information, and obtain private network mapping information and subnet mapping information; Creating a route based on the private network mapping information and the subnet mapping information; Create a file storage resource based on the private network mapping information, the subnet mapping information and a preset file storage resource specification to obtain file storage mapping information; Based on the file storage mapping information, a security group is set according to a preset security group rule to obtain security group mapping information; A cloud server is established based on the private network mapping information, the subnet mapping information and the security group mapping information, and cloud server information is obtained to complete the cloud migration of resources.

2. The method according to claim 1, characterized in that The step of creating a private network and a subnet corresponding to the private network based on the virtual number and the network segment information, and obtaining private network mapping information and subnet mapping information, includes: Configure the private network based on the virtual number and the network segment information to obtain a private network identifier; and The virtual number and the private network identifier are mapped to obtain the private network mapping information.

3. The method according to claim 2, characterized in that The private network and the subnet corresponding to the private network are created based on the virtual number and the network segment information, and private network mapping information and subnet mapping information are obtained, wherein the subnet mapping information includes first subnet mapping information and second subnet mapping information, The method comprises: Create a corresponding subnet based on the private network mapping information and the network segment information, and obtain a subnet identifier; Mapping the virtual number with the subnet identifier to obtain the first subnet mapping information; and The virtual number is mapped to the network segment information corresponding to the subnet identifier to obtain the second subnet mapping information.

4. The method according to claim 3, characterized in that The creating a route based on the private network mapping information and the subnet mapping information includes: Acquire interconnection relationship parameters based on the business logic, wherein the interconnection relationship parameters include an incoming virtual number and an outgoing virtual number; and Based on the incoming virtual number and the outgoing virtual number, the corresponding private network identifier, the subnet identifier and the network segment information are obtained through the private network mapping information, the first subnet mapping information and the second subnet mapping information, and the incoming and outgoing routing configuration is completed.

5. The method according to claim 3, characterized in that: The step of creating a file storage resource based on the private network mapping information, the subnet mapping information and a preset file storage resource specification to obtain the file storage mapping information includes: Based on the virtual number, respectively obtain the private network identifier and the subnet identifier through the private network mapping information and the first subnet mapping information; Based on the private network identifier, the subnet identifier and the preset file storage resource specification, the file storage resource is linked to obtain a file storage identifier; and The virtual number and the file storage identifier are mapped to obtain the file storage mapping information.

6. The method according to claim 3, characterized in that The step of setting a security group based on the file storage mapping information by using a preset security group rule to obtain security group mapping information includes: Obtaining the virtual number to be input based on a preset cloud resource plan; When the virtual number of the outbound visit is consistent with the input virtual number, a new outbound visit rule is added to restrict the outbound visit authority; or When the virtual number of the visit is consistent with the input virtual number, a new visit rule is added to restrict the visit authority.

7. A device for cloud-based resources, characterized in that: include: Parameter generation module, network creation module, routing creation module, file storage resource creation module, security group creation module and cloud server creation module, in, The parameter generation module is used to generate virtual numbers and network segment information based on a preset cloud resource plan; The network creation module is used to create a private network and a subnet corresponding to the private network based on the virtual number and network segment information, and obtain private network mapping information and subnet mapping information; The route creation module is used to create a route based on the private network mapping information and the subnet mapping information; The file storage resource creation module is used to create a file storage resource based on the private network mapping information, the subnet mapping information and a preset file storage resource specification to obtain the file storage mapping information; The security group creation module is used to set a security group through preset security group rules based on the file storage mapping information to obtain security group mapping information; The cloud server creation module is used to establish a cloud server based on the private network mapping information, the subnet mapping information and the security group mapping information, and obtain cloud server information to complete the cloud migration of resources.

8. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.