






技术领域technical field
本申请实施例涉及计算机技术领域,具体涉及设置虚拟私有云的方法和装置。The embodiments of the present application relate to the field of computer technologies, and in particular, to a method and an apparatus for setting up a virtual private cloud.
背景技术Background technique
随着信息科技的发展,云计算逐步成为业界的发展热点,国内外各大厂商的云管理平台也开始纷纷投入到科学、教育、文化、卫生、政府、高性能计算、电子商务、物联网等多个领域进行使用。合理有效地部署、管理网络资源,不仅是当前云计算产业的核心环节,也将成为未来几十年内云计算产业发展的瓶颈环节。虚拟私有云(Virtual private Cloud,VPC)是一个用户能够自定义的虚拟网络,灵活设置网络地址空间,实现私有网络隔离。With the development of information technology, cloud computing has gradually become a hot spot in the industry, and the cloud management platforms of major domestic and foreign manufacturers have also begun to invest in science, education, culture, health, government, high-performance computing, e-commerce, Internet of Things, etc. used in multiple fields. Reasonable and effective deployment and management of network resources is not only the core link of the current cloud computing industry, but will also become a bottleneck link in the development of the cloud computing industry in the next few decades. A virtual private cloud (Virtual private cloud, VPC) is a user-defined virtual network, flexibly set the network address space, and achieve private network isolation.
发明内容SUMMARY OF THE INVENTION
本申请实施例提出了设置虚拟私有云的方法和装置。The embodiments of the present application provide a method and apparatus for setting up a virtual private cloud.
第一方面,本申请实施例提供了一种设置虚拟私有云的方法,包括:接收针对虚拟私有云的更新请求,上述虚拟私有云包括主网段和辅助网段,上述更新请求包括辅助网段的更新参数;获取主网段的当前参数和辅助网段的当前参数;响应于根据上述更新参数、主网段的当前参数以及辅助网段的当前参数,确定预设条件满足,根据更新参数更新辅助网段的当前参数。In a first aspect, an embodiment of the present application provides a method for setting a virtual private cloud, including: receiving an update request for a virtual private cloud, the virtual private cloud includes a main network segment and an auxiliary network segment, and the update request includes the auxiliary network segment obtain the current parameters of the main network segment and the current parameters of the auxiliary network segment; in response to determining that the preset conditions are satisfied according to the above-mentioned update parameters, the current parameters of the main network segment and the current parameters of the auxiliary network segment, update the parameters according to the update parameters The current parameters of the auxiliary network segment.
在一些实施例中,上述更新参数包括IP地址段,上述当前参数包括IP地址段;以及上述方法包括:若上述更新参数中包括的IP地址段与上述当前参数中包括的IP地址段重合,则确定上述预设条件不满足。In some embodiments, the update parameter includes an IP address segment, and the current parameter includes an IP address segment; and the method includes: if the IP address segment included in the update parameter coincides with the IP address segment included in the current parameter, then It is determined that the above preset conditions are not satisfied.
在一些实施例中,上述方法包括:若根据上述辅助网段的当前参数,确定上述辅助网络中包括子网,则确定上述预设条件不满足。In some embodiments, the method includes: if it is determined that the auxiliary network includes a subnet according to the current parameters of the auxiliary network segment, determining that the preset condition is not satisfied.
在一些实施例中,上述获取主网段的当前参数和辅助网段的当前参数,包括:通过更新的虚拟私有云接口获取主网段的当前参数和辅助网段的当前参数。In some embodiments, obtaining the current parameters of the main network segment and the current parameters of the auxiliary network segment includes: obtaining the current parameters of the main network segment and the current parameters of the auxiliary network segment through the updated virtual private cloud interface.
在一些实施例中,上述方法还包括:响应于上述预设条件不满足,输出错误信息。In some embodiments, the above-mentioned method further includes: in response to the above-mentioned preset condition not being satisfied, outputting an error message.
在一些实施例中,上述方法还包括:将上述更新参数存储在数据库中。In some embodiments, the above-mentioned method further includes: storing the above-mentioned update parameter in a database.
第二方面,本申请实施例提供了一种设置虚拟私有云的装置,包括:接收单元,被配置成接收针对虚拟私有云的更新请求,上述虚拟私有云包括主网段和辅助网段,上述更新请求包括辅助网段的更新参数;获取单元,被配置成获取主网段的当前参数和辅助网段的当前参数;更新单元,被配置成响应于根据上述更新参数、上述主网段的当前参数以及上述辅助网段的当前参数,确定上述预设条件满足,根据上述更新参数更新上述辅助网段的当前参数。In a second aspect, an embodiment of the present application provides an apparatus for setting a virtual private cloud, including: a receiving unit configured to receive an update request for a virtual private cloud, where the virtual private cloud includes a main network segment and an auxiliary network segment, and the above The update request includes the update parameters of the auxiliary network segment; the obtaining unit is configured to obtain the current parameters of the main network segment and the current parameters of the auxiliary network segment; The parameters and the current parameters of the auxiliary network segment are determined to satisfy the preset conditions, and the current parameters of the auxiliary network segment are updated according to the update parameters.
在一些实施例中,上述更新参数包括IP地址段,上述当前参数包括IP地址段;上述装置还包括确定单元,上述确定单元被配置成:若上述更新参数中包括的IP地址段与上述当前参数中包括的IP地址段重合,则确定上述预设条件不满足。In some embodiments, the above-mentioned update parameter includes an IP address segment, and the above-mentioned current parameter includes an IP address segment; the above-mentioned apparatus further includes a determination unit, and the above-mentioned determination unit is configured to: if the IP address segment included in the above-mentioned update parameter is the same as the above-mentioned current parameter If the IP address segments included in the IP address overlap, it is determined that the above preset conditions are not satisfied.
在一些实施例中,上述装置还包括确定单元,上述确定单元被配置成:若根据上述辅助网段的当前参数,确定上述辅助网络中包括子网,则确定上述预设条件不满足。In some embodiments, the above-mentioned apparatus further includes a determination unit, and the above-mentioned determination unit is configured to: determine that the above-mentioned preset condition is not satisfied if it is determined that the above-mentioned auxiliary network includes a subnet according to the current parameters of the above-mentioned auxiliary network segment.
在一些实施例中,上述获取单元进一步被配置成:通过更新的虚拟私有云接口获取主网段的当前参数和辅助网段的当前参数。In some embodiments, the above obtaining unit is further configured to: obtain the current parameters of the primary network segment and the current parameters of the auxiliary network segment through the updated virtual private cloud interface.
在一些实施例中,上述装置还包括:输出单元,被配置成响应于上述预设条件不满足,输出错误信息。In some embodiments, the above-mentioned apparatus further includes: an output unit configured to output an error message in response to the above-mentioned preset condition not being satisfied.
在一些实施例中,上述装置还包括:存储单元,被配置成将上述更新参数存储在数据库中。In some embodiments, the above-mentioned apparatus further includes: a storage unit configured to store the above-mentioned update parameter in a database.
第三方面,本申请实施例提供了一种服务器,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当上述一个或多个程序被上述一个或多个处理器执行,使得上述一个或多个处理器实现如第一方面任一实施例所描述的方法。In a third aspect, an embodiment of the present application provides a server, including: one or more processors; a storage device on which one or more programs are stored, when the one or more programs are processed by the one or more programs The processor executes such that the above-mentioned one or more processors implement the method as described in any embodiment of the first aspect.
第四方面,本申请实施例提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面任一实施例所描述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, implements the method described in any embodiment of the first aspect.
本申请的上述实施例提供的设置虚拟私有云的方法和装置,在接收到针对虚拟私有云的更新请求后,可以获取虚拟私有云中主网段的当前参数和辅助网段的当前参数。如果根据更新参数和当前参数,确定预设条件满足,则根据更新参数更新辅助网段的当前参数。本实施例的方法,通过在虚拟私有云中设置辅助网段,不仅能够实现虚拟私有云的扩容,还能够实现对虚拟私有云的灵活管理。The method and device for setting a virtual private cloud provided by the above embodiments of the present application can obtain the current parameters of the main network segment and the current parameters of the auxiliary network segment in the virtual private cloud after receiving the update request for the virtual private cloud. If it is determined that the preset condition is satisfied according to the update parameter and the current parameter, the current parameter of the auxiliary network segment is updated according to the update parameter. In the method of this embodiment, by setting an auxiliary network segment in the virtual private cloud, not only the expansion of the virtual private cloud can be realized, but also the flexible management of the virtual private cloud can be realized.
附图说明Description of drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
图1是本申请的一个实施例可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram to which an embodiment of the present application may be applied;
图2是根据本申请的设置虚拟私有云的方法的一个实施例的流程图;2 is a flowchart of an embodiment of a method for setting up a virtual private cloud according to the present application;
图3是根据本申请的设置虚拟私有云的方法的一个应用场景的示意图;3 is a schematic diagram of an application scenario of the method for setting a virtual private cloud according to the present application;
图4是根据本申请的设置虚拟私有云的方法的另一个实施例的流程图;4 is a flowchart of another embodiment of a method for setting up a virtual private cloud according to the present application;
图5是根据本申请的设置虚拟私有云的方法的又一个实施例的流程图;5 is a flow chart of still another embodiment of a method for setting up a virtual private cloud according to the present application;
图6是根据本申请的设置虚拟私有云的装置的一个实施例的结构示意图;6 is a schematic structural diagram of an embodiment of an apparatus for setting a virtual private cloud according to the present application;
图7是适于用来实现本申请实施例的服务器的计算机系统的结构示意图。FIG. 7 is a schematic structural diagram of a computer system suitable for implementing the server of the embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the related invention, but not to limit the invention. In addition, it should be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
图1示出了可以应用本申请的设置虚拟私有云的方法或设置虚拟私有云的装置的实施例的示例性系统架构100。FIG. 1 illustrates an
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如网页浏览器应用、购物类应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。The user can use the
终端设备101、102、103可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务),也可以实现成单个软件或软件模块。在此不做具体限定。The
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103发送的更新请求提供支持的后台服务器。后台服务器可以对接收到的更新请求等数据进行分析等处理,并将处理结果(例如更新后的虚拟私有云的参数)反馈给终端设备101、102、103。The
需要说明的是,服务器105可以是硬件,也可以是软件。当服务器105为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。当服务器105为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务),也可以实现成单个软件或软件模块。在此不做具体限定。It should be noted that the
需要说明的是,本申请实施例所提供的设置虚拟私有云的方法一般由服务器105执行。相应地,设置虚拟私有云的装置一般设置于服务器105中。It should be noted that, the method for setting a virtual private cloud provided by the embodiment of the present application is generally executed by the
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
继续参考图2,示出了根据本申请的设置虚拟私有云的方法的一个实施例的流程200。本实施例的设置虚拟私有云的方法,包括以下步骤:Continuing to refer to FIG. 2, a
步骤201,接收针对虚拟私有云的更新请求。Step 201: Receive an update request for the virtual private cloud.
在本实施例中,设置虚拟私有云的方法的执行主体(例如图1所示的服务器105)可以通过有线连接方式或者无线连接方式接收用户通过终端设备(例如图1所示的终端设备101、102、103)发送的针对虚拟私有云的更新请求。虚拟私有云可以包括主网段和辅助网段。主网段是指用户申请虚拟私有云时所设置的网段,即在对虚拟私有云扩容之前的网段。辅助网段是指在对虚拟私有云扩容之后的网段。可以理解的是,如果虚拟私有云未被扩容过,则其中不包括辅助网段,或者辅助网段为空。辅助网段的地址段与主网段的地址段不能重合,且与主网段不同的是,用户可以对辅助网段的地址段进行修改,以保证两个虚拟私有云打通时不会因为辅助网段的地址段重合造成地址冲突问题。上述更新请求中可以包括辅助网段的更新参数。更新参数可以包括辅助网段涉及的IP地址段,还包括用于指示对辅助网段进行操作的参数。上述操作包括创建(create)、更新(update)、删除(delete)等等。In this embodiment, the execution body of the method for setting a virtual private cloud (for example, the
步骤202,获取主网段的当前参数和辅助网段的当前参数。Step 202: Obtain the current parameters of the main network segment and the current parameters of the auxiliary network segment.
执行主体在接收到上述更新请求后,可以获取主网段的当前参数和辅助网段的当前参数。执行主体可以通过虚拟私有云的接口访问存储设备(如数据库)获取主网段的当前参数和辅助网段的当前参数。上述接口可以不同于现有的私有云与数据库的接口。上述当前参数可以包括主网段当前的地址段、辅助网段当前的地址段、辅助网段中是否包括子网、子网的CIDR(无类别域间路由,Classless Inter-Domain Routing)等信息。After receiving the above update request, the execution body can obtain the current parameters of the main network segment and the current parameters of the auxiliary network segment. The execution subject can access the storage device (such as a database) through the interface of the virtual private cloud to obtain the current parameters of the main network segment and the current parameters of the auxiliary network segment. The above interface may be different from the existing interface between the private cloud and the database. The above current parameters may include the current address segment of the main network segment, the current address segment of the auxiliary network segment, whether the auxiliary network segment includes a subnet, and information such as CIDR (Classless Inter-Domain Routing) of the subnet.
步骤203,响应于根据更新参数、主网段的当前参数以及辅助网段的当前参数,确定预设条件满足,根据更新参数更新辅助网段的当前参数。
执行主体在获取到主网段的当前参数和辅助网段的当前参数以及辅助网段的更新参数后,可以判断当前是否满足预设条件。上述预设条件可以是用户预先设置的,也可以是虚拟私有云的提供方预先设置的。预设条件可以包括更新参数中包括的地址段与当前参数中的地址段不重合、辅助网段中不包括子网等等。After acquiring the current parameters of the main network segment, the current parameters of the auxiliary network segment, and the updated parameters of the auxiliary network segment, the execution body may determine whether the preset condition is currently satisfied. The above preset conditions may be preset by the user, or may be preset by the provider of the virtual private cloud. The preset conditions may include that the address segment included in the update parameter does not overlap with the address segment included in the current parameter, the auxiliary network segment does not include a subnet, and the like.
如果预设条件满足,则说明用户对虚拟私有云当前的操作合理,则执行主体可以根据更新参数来更新辅助网段的当前参数。例如,对辅助网段进行创建、更新、删除等。If the preset condition is satisfied, it means that the user's current operation on the virtual private cloud is reasonable, and the execution subject can update the current parameter of the auxiliary network segment according to the update parameter. For example, create, update, delete, etc. on the auxiliary network segment.
举例来说,更新参数为updated_alias_cidrs,当前参数为original_alias_cidrs。当执行主体识别出操作参数为创建(create)或更新(update)时,则在确定预设条件满足时,可以直接利用updated_alias_cidrs替换original_alias_cidrs,实现辅助网段的更新。当执行主体识别出操作参数为删除(delete)时,可以对比updated_alias_cidrs和original_alias_cidrs,确定待删除的部分。如果待删除的部分满足预设条件,则可以将上述待删除的部分删除。继续参见图3,图3是根据本实施例的设置虚拟私有云的方法的一个应用场景的示意图。在图3的应用场景中,用户通过终端301向服务器302发送针对虚拟私有云的更新请求,服务器302通过更新的数据库接口从数据库303处获取虚拟私有云的主网段的当前参数和辅助网段的当前参数。服务器302根据更新参数和当前参数,确定预设条件满足,则对辅助网段进行更新。For example, the updated parameter is updated_alias_cidrs, and the current parameter is original_alias_cidrs. When the execution body recognizes that the operation parameter is create (create) or update (update), when it is determined that the preset condition is satisfied, it can directly replace original_alias_cidrs with updated_alias_cidrs to realize the update of the auxiliary network segment. When the execution subject recognizes that the operation parameter is delete, it can compare updated_alias_cidrs and original_alias_cidrs to determine the part to be deleted. If the part to be deleted satisfies the preset condition, the above part to be deleted can be deleted. Continue to refer to FIG. 3 , which is a schematic diagram of an application scenario of the method for setting up a virtual private cloud according to this embodiment. In the application scenario of FIG. 3, the user sends an update request for the virtual private cloud to the
本申请的上述实施例提供的设置虚拟私有云的方法,在接收到针对虚拟私有云的更新请求后,可以获取虚拟私有云中主网段的当前参数和辅助网段的当前参数。如果根据更新参数和当前参数,确定预设条件满足,则根据更新参数更新辅助网段的当前参数。本实施例的方法,通过在虚拟私有云中设置辅助网段,不仅能够实现虚拟私有云的扩容,还能够实现对虚拟私有云的灵活管理。In the method for setting a virtual private cloud provided by the above embodiments of the present application, after receiving an update request for the virtual private cloud, the current parameters of the main network segment and the current parameters of the auxiliary network segment in the virtual private cloud can be obtained. If it is determined that the preset condition is satisfied according to the update parameter and the current parameter, the current parameter of the auxiliary network segment is updated according to the update parameter. In the method of this embodiment, by setting an auxiliary network segment in the virtual private cloud, not only the expansion of the virtual private cloud can be realized, but also the flexible management of the virtual private cloud can be realized.
继续参见图4,其示出了根据本申请的设置虚拟私有云的方法的另一个实施例的流程400。如图4所示,本实施例的设置虚拟私有云的方法,可以包括以下步骤:Continuing to refer to FIG. 4 , a
步骤401,接收针对虚拟私有云的更新请求。
步骤402,通过更新的虚拟私有云接口获取主网段的当前参数和辅助网段的当前参数。Step 402: Obtain the current parameters of the main network segment and the current parameters of the auxiliary network segment through the updated virtual private cloud interface.
本实施例中,上述当前参数可以存储在数据库中,在对虚拟私有云的主网段扩容之前,执行主体可以通过虚拟私有云与数据库之间的接口来获取主网段的参数。在对虚拟私有云的主网段扩容之后,执行主体可以对上述接口进行更新。然后通过更新的虚拟私有云接口获取主网段的当前参数和辅助网段的当前参数。这样可以减少由于虚拟私有云的扩容带来的改动,并且上述更新的接口还可以应用于其它虚拟私有云,提高改动的利用率。In this embodiment, the above-mentioned current parameters may be stored in the database, and before expanding the main network segment of the virtual private cloud, the execution subject may obtain the parameters of the main network segment through the interface between the virtual private cloud and the database. After the main network segment of the virtual private cloud is expanded, the execution body can update the above interface. Then obtain the current parameters of the main network segment and the current parameters of the auxiliary network segment through the updated virtual private cloud interface. In this way, the changes caused by the expansion of the virtual private cloud can be reduced, and the above-mentioned updated interface can also be applied to other virtual private clouds to improve the utilization rate of the changes.
步骤403,若更新参数中包括的IP地址段与当前参数中包括的IP地址段重合,则确定预设条件不满足。Step 403: If the IP address segment included in the update parameter coincides with the IP address segment included in the current parameter, it is determined that the preset condition is not satisfied.
本实施例中,执行主体可以对比更新参数中包括的IP地址段与当前参数中包括的IP地址段。可以理解的是,此处的对比包括更新参数中包括的IP地址段与主网段的IP地址段之间的对比,以及更新参数中包括的IP地址段与辅助网段的IP地址段之间的对比。经过对比,如果发现更新参数中包括的IP地址段与主网段的IP地址段之间没有重合,并且更新参数中包括的IP地址段与辅助网段的IP地址段之间也没有重合,则认为当前满足预设条件。如果更新参数中的IP地址段与主网段或辅助网段中的IP地址段重合,则会导致地址冲突。In this embodiment, the execution subject may compare the IP address segment included in the update parameter with the IP address segment included in the current parameter. It can be understood that the comparison here includes the comparison between the IP address segment included in the update parameters and the IP address segment of the main network segment, as well as the comparison between the IP address segment included in the update parameter and the IP address segment of the auxiliary network segment. comparison. After comparison, if it is found that there is no overlap between the IP address segment included in the update parameters and the IP address segment of the main network segment, and there is no overlap between the IP address segment included in the update parameter and the IP address segment of the auxiliary network segment, then It is considered that the preset conditions are currently met. If the IP address segment in the update parameter coincides with the IP address segment in the primary network segment or the secondary network segment, an address conflict will result.
步骤404,响应于预设条件不满足,输出错误信息。
本实施例中,如果执行主体确定预设条件满足,则输出错误信息,上述错误信息用于提示用户当前不能对辅助网段进行更新。In this embodiment, if the execution body determines that the preset condition is satisfied, an error message is output, and the above error message is used to prompt the user that the auxiliary network segment cannot be updated currently.
本申请的上述实施例提供的设置虚拟私有云的方法,可以灵活管理虚拟私有云,并且可以在不满足预设条件时提示用户。The method for setting a virtual private cloud provided by the above embodiments of the present application can flexibly manage the virtual private cloud, and can prompt the user when the preset conditions are not met.
继续参见图5,其示出了根据本申请的设置虚拟私有云的方法的另一个实施例的流程500。如图5所示,本实施例的设置虚拟私有云的方法,可以包括以下步骤:Continuing to refer to FIG. 5 , a
步骤501,接收针对虚拟私有云的更新请求。
步骤502,通过更新的虚拟私有云接口获取主网段的当前参数和辅助网段的当前参数。Step 502: Obtain the current parameters of the main network segment and the current parameters of the auxiliary network segment through the updated virtual private cloud interface.
本实施例中,上述当前参数可以存储在数据库中,在对虚拟私有云的主网段扩容之前,执行主体可以通过虚拟私有云与数据库之间的接口来获取主网段的参数。在对虚拟私有云的主网段扩容之后,执行主体可以对上述接口进行更新。然后通过更新的虚拟私有云接口获取主网段的当前参数和辅助网段的当前参数。这样可以减少由于虚拟私有云的扩容带来的改动,并且上述更新的接口还可以应用于其它虚拟私有云,提高改动的利用率。In this embodiment, the above-mentioned current parameters may be stored in the database, and before expanding the main network segment of the virtual private cloud, the execution subject may obtain the parameters of the main network segment through the interface between the virtual private cloud and the database. After the main network segment of the virtual private cloud is expanded, the execution body can update the above interface. Then obtain the current parameters of the main network segment and the current parameters of the auxiliary network segment through the updated virtual private cloud interface. In this way, the changes caused by the expansion of the virtual private cloud can be reduced, and the above-mentioned updated interface can also be applied to other virtual private clouds to improve the utilization rate of the changes.
步骤503,若根据辅助网段的当前参数,确定辅助网络中包括子网,则确定预设条件不满足。
本实施例中,执行主体可以根据辅助网段的当前参数,判断辅助网络中是否包括子网。如果包括子网,则认为当前不满足预设条件。虚拟私有云中的子网是一个独立的虚拟网络,其中可以包括云服务器、负载均衡服务器、云数据、NoSql数据库等资源。这种情况下,执行主体认为子网的更新是非常复杂的工作。因此,如果辅助网段中包括子网时,执行主体不予直接处理,直接认定当前不满足预设条件。这样,一方面可以避免由于用户的误操作,导致虚拟私有云的重大更新;另一方面可以避免在执行上述更新时由于情况复杂导致的失误。In this embodiment, the executive body may determine whether the auxiliary network includes a subnet according to the current parameters of the auxiliary network segment. If the subnet is included, it is considered that the preset condition is not currently met. A subnet in a virtual private cloud is an independent virtual network, which can include resources such as cloud servers, load balancing servers, cloud data, and NoSql databases. In this case, the executive thinks that the update of the subnet is a very complicated task. Therefore, if the auxiliary network segment includes a subnet, the execution body does not directly process it, and directly determines that the preset condition is not currently satisfied. In this way, on the one hand, major updates of the virtual private cloud due to user's misoperation can be avoided;
步骤504,响应于预设条件不满足,输出错误信息。
本实施例中,如果执行主体确定预设条件满足,则输出错误信息,上述错误信息用于提示用户当前不能对辅助网段进行更新。In this embodiment, if the execution body determines that the preset condition is satisfied, an error message is output, and the above error message is used to prompt the user that the auxiliary network segment cannot be updated currently.
步骤505,将更新参数存储在数据库中。
本实施例中,执行主体还可以更新参数存储在数据库中,这样不仅可以保存用户对辅助网段的更新记录,还可以在下次对辅助网段进行设置时,将最新存储的更新参数作为当前参数。In this embodiment, the execution body can also store the updated parameters in the database, so that not only the user's update record of the auxiliary network segment can be saved, but also the newly stored update parameter can be used as the current parameter when the auxiliary network segment is set next time. .
本申请的上述实施例提供的设置虚拟私有云的方法,可以灵活管理虚拟私有云,并且可以在不满足预设条件时提示用户。进一步参考图6,作为对上述各图所示方法的实现,本申请提供了一种设置虚拟私有云的装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。The method for setting a virtual private cloud provided by the above embodiments of the present application can flexibly manage the virtual private cloud, and can prompt the user when the preset conditions are not met. With further reference to FIG. 6 , as an implementation of the methods shown in the above figures, the present application provides an embodiment of an apparatus for setting up a virtual private cloud. The apparatus embodiment corresponds to the method embodiment shown in FIG. 2 . The device can be specifically applied to various electronic devices.
如图6所示,本实施例的设置虚拟私有云的装置600包括:接收单元601、获取单元602和更新单元603。As shown in FIG. 6 , the
接收单元601,被配置成接收针对虚拟私有云的更新请求。虚拟私有云包括主网段和辅助网段,更新请求包括辅助网段的更新参数。The receiving
获取单元602,被配置成获取主网段的当前参数和辅助网段的当前参数。The obtaining
更新单元603,被配置成响应于根据更新参数、主网段的当前参数以及辅助网段的当前参数,确定预设条件满足,根据更新参数更新辅助网段的当前参数。The updating
在本实施例的一些可选的实现方式中,更新参数包括IP地址段,当前参数包括IP地址段。装置600还可以包括图6中未示出的确定单元,确定单元被配置成:若更新参数中包括的IP地址段与当前参数中包括的IP地址段重合,则确定预设条件不满足。In some optional implementations of this embodiment, the update parameter includes an IP address segment, and the current parameter includes an IP address segment. The
在本实施例的一些可选的实现方式中,装置600还可以包括图6中未示出的确定单元,确定单元被配置成:若根据所述辅助网段的当前参数,确定所述辅助网络中包括子网,则确定所述预设条件不满足。In some optional implementations of this embodiment, the
在本实施例的一些可选的实现方式中,获取单元602可以进一步被配置成:通过更新的虚拟私有云接口获取主网段的当前参数和辅助网段的当前参数。In some optional implementations of this embodiment, the obtaining
在本实施例的一些可选的实现方式中,所述装置还可以进一步包括图6中未示出的输出单元,被配置成响应于预设条件不满足,输出错误信息。In some optional implementations of this embodiment, the apparatus may further include an output unit not shown in FIG. 6 , configured to output error information in response to a preset condition not being satisfied.
在本实施例的一些可选的实现方式中,所述装置还可以进一步包括图6中未示出的存储单元,被配置成将更新参数存储在数据库中。In some optional implementations of this embodiment, the apparatus may further include a storage unit not shown in FIG. 6 , configured to store the update parameters in a database.
应当理解,设置虚拟私有云的装置600中记载的单元601至单元603分别与参考图2中描述的方法中的各个步骤相对应。由此,上文针对设置虚拟私有云的方法描述的操作和特征同样适用于装置600及其中包含的单元,在此不再赘述。It should be understood that the
下面参考图7,其示出了适于用来实现本公开的实施例的电子设备(例如图1中的服务器)700的结构示意图。图7示出的服务器仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。Referring next to FIG. 7 , it shows a schematic structural diagram of an electronic device (eg, the server in FIG. 1 ) 700 suitable for implementing embodiments of the present disclosure. The server shown in FIG. 7 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
如图7所示,电子设备700可以包括处理装置(例如中央处理器、图形处理器等)701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储装置708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。在RAM 703中,还存储有电子设备700操作所需的各种程序和数据。处理装置701、ROM 702以及RAM703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。As shown in FIG. 7 , an
通常,以下装置可以连接至I/O接口705:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置706;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置707;包括例如磁带、硬盘等的存储装置708;以及通信装置709。通信装置709可以允许电子设备700与其他设备进行无线或有线通信以交换数据。虽然图7示出了具有各种装置的电子设备700,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。图7中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。Typically, the following devices can be connected to the I/O interface 705:
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置709从网络上被下载和安装,或者从存储装置708被安装,或者从ROM 702被安装。在该计算机程序被处理装置701执行时,执行本公开的实施例的方法中限定的上述功能。需要说明的是,本公开的实施例所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开的实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:接收针对虚拟私有云的更新请求,虚拟私有云包括主网段和辅助网段,更新请求包括辅助网段的更新参数;获取主网段的当前参数和辅助网段的当前参数;响应于根据更新参数、主网段的当前参数以及辅助网段的当前参数,确定预设条件满足,根据更新参数更新辅助网段的当前参数。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: receives an update request for a virtual private cloud, and the virtual private cloud includes a main network segment and an auxiliary network segment. The network segment, the update request includes the update parameters of the auxiliary network segment; obtain the current parameters of the main network segment and the current parameters of the auxiliary network segment; If the conditions are met, the current parameters of the auxiliary network segment are updated according to the updated parameters.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的实施例的操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, or a combination thereof, Also included are conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
描述于本公开的实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括接收单元、获取单元、判断单元和更新单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,接收单元还可以被描述为“接收针对虚拟私有云的更新请求的单元”。The units involved in the embodiments of the present disclosure may be implemented in software or hardware. The described unit can also be set in the processor, for example, it can be described as: a processor includes a receiving unit, an acquiring unit, a judging unit and an updating unit. Wherein, the names of these units do not constitute a limitation of the unit itself in some cases, for example, the receiving unit may also be described as "a unit that receives an update request for a virtual private cloud".
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开的实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开的实施例中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, and should also cover, without departing from the above-mentioned inventive concept, the above-mentioned Other technical solutions formed by any combination of technical features or their equivalent features. For example, a technical solution is formed by replacing the above-mentioned features with the technical features disclosed in the embodiments of the present disclosure (but not limited to) with similar functions.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010089795.3ACN111314457B (en) | 2020-02-13 | 2020-02-13 | Method and apparatus for setting up virtual private cloud |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010089795.3ACN111314457B (en) | 2020-02-13 | 2020-02-13 | Method and apparatus for setting up virtual private cloud |
| Publication Number | Publication Date |
|---|---|
| CN111314457A CN111314457A (en) | 2020-06-19 |
| CN111314457Btrue CN111314457B (en) | 2022-04-29 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010089795.3AActiveCN111314457B (en) | 2020-02-13 | 2020-02-13 | Method and apparatus for setting up virtual private cloud |
| Country | Link |
|---|---|
| CN (1) | CN111314457B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9992058B2 (en)* | 2013-11-11 | 2018-06-05 | Softnas Operating Inc. | Redundant storage solution |
| CA2937922C (en)* | 2014-02-07 | 2024-06-25 | Kik Interactive Inc. | Method and system for replicating a communication application on an auxiliary computing device |
| EP3262815B1 (en)* | 2015-02-24 | 2020-10-14 | Cisco Technology, Inc. | System and method for securing an enterprise computing environment |
| US20160373405A1 (en)* | 2015-06-16 | 2016-12-22 | Amazon Technologies, Inc. | Managing dynamic ip address assignments |
| CN106331210B (en)* | 2016-08-19 | 2019-08-13 | 中国银联股份有限公司 | IP address distribution method and device in a kind of system for cloud computing |
| EP3536038B1 (en)* | 2016-11-07 | 2021-06-16 | A9.com, Inc. | Systems and methods for enhanced mesh networking |
| WO2018095416A1 (en)* | 2016-11-24 | 2018-05-31 | 腾讯科技(深圳)有限公司 | Information processing method, device and system |
| CN109302302B (en)* | 2017-07-25 | 2022-08-12 | 中兴通讯股份有限公司 | Method, system and computer readable storage medium for scaling service network element |
| CN109995816B (en)* | 2017-12-29 | 2022-04-08 | 中移(苏州)软件技术有限公司 | Information importing method and device based on cloud computing platform and communication equipment |
| CN110289982B (en)* | 2019-05-17 | 2022-08-23 | 平安科技(深圳)有限公司 | Container application capacity expansion method and device, computer equipment and storage medium |
| CN110347509B (en)* | 2019-07-08 | 2021-12-10 | 北京字节跳动网络技术有限公司 | Service framework access system, service request processing method, device and medium |
| CN110753112A (en)* | 2019-10-23 | 2020-02-04 | 北京百度网讯科技有限公司 | Elastic scaling method and device for cloud service |
| Title |
|---|
| Chaining your Virtual Private Clouds with Segment Routing;Francesco Spinelli等;《IEEE INFOCOM 2019 - IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS)》;20190923;全文* |
| IaaS云资源池中VLAN划分及IP池管理分析;杨峰等;《电子设计工程》;20200918(第18期);全文* |
| 基于运营商容器云平台的研究;姚严峰;《中国新通信》;20180720(第14期);全文* |
| 电视台私有云的建设;粟迎南;《现代电视技术》;20170915(第09期);全文* |
| Publication number | Publication date |
|---|---|
| CN111314457A (en) | 2020-06-19 |
| Publication | Publication Date | Title |
|---|---|---|
| CN111679990B (en) | Test data generation method and device, readable medium and electronic equipment | |
| CN110909521A (en) | Synchronous processing method and device for online document information and electronic equipment | |
| CN111309304B (en) | Method, device, medium and electronic equipment for generating IDL file | |
| CN112965761B (en) | Data processing method, system, electronic equipment and storage medium | |
| CN114035879B (en) | Page theme color replacement method, device, electronic equipment and computer readable medium | |
| CN114428925A (en) | Page rendering method and device, electronic equipment and computer readable medium | |
| CN113010405A (en) | Application program testing method and device | |
| CN111278085B (en) | Method and device for acquiring target network | |
| CN116599846A (en) | Inter-tenant network connection method, apparatus, electronic device and computer readable medium | |
| CN111324470A (en) | Method and apparatus for generating information | |
| CN112507676B (en) | Method and device for generating energy report, electronic equipment and computer readable medium | |
| CN110633324B (en) | Method, apparatus, electronic device and computer readable medium for synchronizing data | |
| CN112988738B (en) | Data slicing method and device for block chain | |
| CN111580890A (en) | Method, apparatus, electronic device, and computer-readable medium for processing features | |
| CN111314457B (en) | Method and apparatus for setting up virtual private cloud | |
| CN113971195A (en) | Data synchronization method, device, electronic equipment and medium | |
| CN110750424A (en) | Resource inspection method and device | |
| CN113553206B (en) | Data event execution method and device, electronic equipment and computer readable medium | |
| CN114785770A (en) | Mirror layer file sending method and device, electronic equipment and computer readable medium | |
| CN112311833B (en) | Data updating method and device | |
| CN116975012A (en) | File synchronization method, file updating method, device, electronic equipment and medium | |
| CN109933432A (en) | Method and apparatus for sending data | |
| CN113761548B (en) | Data transmission method and device for Shuffle process | |
| CN114398098B (en) | Application script execution method, device, electronic equipment and computer readable medium | |
| CN113472565B (en) | Method, apparatus, device and computer readable medium for expanding server function |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |