Cloud server resource scheduling method and device and cloud server
By releasing Huawei Cloud Elastic Cloud Server resources with one click after the virtual event, the problem of not being able to release resources after the virtual event is over, and efficient utilization of resources and avoiding waste is achieved.
Patent Information
- Application Number
- CN202311322357.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2025-04-15
AI Technical Summary
After the virtual event is over, the existing technology cannot effectively release Huawei Cloud Elastic Cloud Server resources, resulting in waste of resources.
Provide a cloud server resource scheduling method. By initiating a request to create a first service, if the request is successful, a request to create the next service is sent. If the request fails, a service request is deleted, thereby releasing the server resource with one click after the virtual activity is over.
It realizes the release of server resources in one click after the virtual event is over, avoiding resource waste, and meeting business needs while reducing resource investment.
Smart Images

Figure CN119829261A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud servers, and in particular to a method, device and cloud server for scheduling cloud server resources. Background Art
[0002] The deployment of the immersive digital platform relay, signaling, audio and video services, and virtual engines based on cloud rendering uses Huawei Cloud Elastic Cloud Servers. You can define elastic scaling strategies based on business needs, configure scheduled or periodic monitoring strategies through the visual console, and dynamically adjust elastic cloud server instances to meet business needs while reducing resource investment.
[0003] Elastic Cloud Server (ECS) is a self-service, elastically scalable computing service on the cloud that can be obtained at any time. The use of cloud service resources from third-party cloud service providers such as Huawei cannot release server resources in time after the virtual event ends, resulting in a waste of resources. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device and cloud server for cloud server resource scheduling to address the above technical problems, which can release server resources with one click after the virtual activity ends to avoid resource waste.
[0005] In a first aspect, an embodiment of the present application provides a method for cloud server resource scheduling, the method comprising:
[0006] Initiate a request to create a first service;
[0007] If the request is successful, a request to create the next service is sent;
[0008] If the request fails, the service request is deleted.
[0009] In some embodiments, before initiating the request to create the first service, the method further includes:
[0010] Pre-configure data and request parameters.
[0011] In some embodiments, the first service is a virtual private cloud, and the next service includes a subnet, a security group, a security group rule, an elastic public network, and an elastic cloud server.
[0012] In some embodiments, if the request is successful, sending a request to create a next service includes:
[0013] If the request to create the virtual private cloud is successful, sending a request to create the subnet;
[0014] If the request to create the subnet is successful, a request to create the security group is sent;
[0015] If the request to create the security group is successful, a request to create the security group rules is sent;
[0016] If the request to create the security group rule is successful, a request to create the elastic public network is sent;
[0017] If the request to create the elastic public network is successful, a request to create the elastic server is sent;
[0018] If the request to create the elastic server is successful, the process ends.
[0019] In some embodiments, the request failure includes a request failure to create a virtual private cloud, or a request failure to create a subnet, or a request failure to create a security group, or a request failure to create an installation group rule, or a request failure to create an elastic public network, or a request failure to create an elastic server.
[0020] In some embodiments, if the request fails, deleting the service request includes:
[0021] If the request fails, checking whether the elastic server exists;
[0022] If the elastic server exists, deleting the elastic server;
[0023] If the elastic server is deleted, check whether the elastic public network exists;
[0024] If the elastic public network exists, deleting the elastic public network;
[0025] If the elastic public network is deleted, check whether the security group exists;
[0026] If the security group exists, delete the security group;
[0027] If the security group is deleted, check whether the subnet exists;
[0028] If the subnet exists, deleting the subnet;
[0029] If the subnet is deleted, checking whether the virtual private cloud exists;
[0030] If the virtual private cloud exists, the virtual private cloud is deleted.
[0031] In a second aspect, an embodiment of the present application further provides a cloud server resource scheduling device, including:
[0032] A first request module, used to initiate a request to create a first service;
[0033] The second request module is used to send a request to create the next service if the request is successful;
[0034] The delete module is used to delete the service request if the request fails.
[0035] In some embodiments, the apparatus further comprises:
[0036] Configuration module, used to pre-configure data and request parameters.
[0037] In a third aspect, an embodiment of the present application further provides a cloud server, including:
[0038] at least one processor; and,
[0039] a memory communicatively connected to the at least one processor; wherein,
[0040] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.
[0041] In a fourth aspect, an embodiment of the present application further provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes the method described in the first aspect.
[0042] Compared with the prior art, the beneficial effect of the present application is: different from the prior art, the method of cloud server resource scheduling provided in the embodiment of the present application sends a request to create a first service. If the request is successful, a request to create the next service is sent. If the request fails, the service request is deleted. This can release server resources with one click after the virtual activity ends, thereby avoiding resource waste. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0044] Figure 1 It is a flowchart of a method for cloud server resource scheduling provided by an embodiment of the present application;
[0045] Figure 2 It is a structural diagram of a cloud server resource scheduling device provided by an embodiment of the present application;
[0046] Figure 3 It is a schematic diagram of the hardware structure of a server provided in one embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0048] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.
[0049] like Figure 1 As shown, an embodiment of the present application provides a method for cloud server resource scheduling, the method comprising:
[0050] Step 110: Initiate a request to create a first service.
[0051] In the embodiment of the present application, the first service is a virtual private cloud, and a request to create a virtual private cloud is initiated. Before initiating a request to create the first service, data and request parameters need to be pre-configured. Specifically, a general parameter configuration table and business request parameters are defined, and then one-click creation / deletion logic is implemented through coding, so that one-click creation of the corresponding server is completed in one request, and the exception capture mechanism is used to implement the rollback operation after the request fails. After the virtual activity ends, the server resources can be released with one click.
[0052] Step 120: If the request is successful, a request to create the next service is sent.
[0053] In the embodiment of the present application, the next service includes a subnet, a security group, a security group rule, an elastic public network, and an elastic cloud server. Specifically, if the request to create the virtual private cloud is successful, a request to create the subnet is sent; if the request to create the subnet is successful, a request to create the security group is sent; if the request to create the security group is successful, a request to create the security group rule is sent; if the request to create the security group rule is successful, a request to create the elastic public network is sent; if the request to create the elastic public network is successful, a request to create the elastic server is sent; if the request to create the elastic server is successful, the process ends.
[0054] Step 130: If the request fails, the service request is deleted.
[0055] In an embodiment of the present application, the request failure includes a request failure to create a virtual private cloud, or a request failure to create a subnet, or a request failure to create a security group, or a request failure to create an installation group rule, or a request failure to create an elastic public network, or a request failure to create an elastic server. Specifically, if the request fails, check whether the elastic server exists; if the elastic server exists, delete the elastic server; if the elastic server is deleted, check whether the elastic public network exists; if the elastic public network exists, delete the elastic public network; if the elastic public network is deleted, check whether the security group exists; if the security group exists, delete the security group; if the security group is deleted, check whether the subnet exists; if the subnet exists, delete the subnet; if the subnet is deleted, check whether the virtual private cloud exists; if the virtual private cloud exists, delete the virtual private cloud.
[0056] In an embodiment of the present application, a request to create a first service is sent. If the request is successful, a request to create the next service is sent. If the request fails, the service request is deleted. This allows server resources to be released with one click after the virtual activity ends, thus avoiding resource waste.
[0057] Accordingly, the embodiment of the present application also provides a cloud server resource scheduling device 200, such as Figure 2 As shown, including:
[0058] A first request module 210, configured to initiate a request to create a first service;
[0059] The second request module 220 is used to send a request to create a next service if the request is successful;
[0060] The deletion module 230 is used to delete the service request if the request fails.
[0061] The cloud server resource scheduling device provided in the embodiment of the present application initiates a request to create a first service through a first request module. If the request is successful, a request to create a next service is sent through a second request module. If the request fails, the service request is deleted through a deletion module. This allows the server resources to be released with one click after the virtual activity ends, thereby avoiding waste of resources.
[0062] Optionally, in other embodiments of the device, such as Figure 2 As shown, the device 200 also includes:
[0063] The configuration module 240 is used to pre-configure data and request parameters.
[0064] It should be noted that the above-mentioned cloud server resource scheduling device can execute the cloud server resource scheduling method provided in the embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not fully described in the embodiment of the cloud server resource scheduling device, refer to the cloud server resource scheduling method provided in the embodiment of the present application.
[0065] Figure 3 Schematic diagram of the hardware structure of the server provided in the embodiment of the present application. Figure 3 As shown, the server 300 includes:
[0066] One or more processors 310 and memory 320, Figure 3 A processor is taken as an example.
[0067] The processor 310 and the memory 320 may be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.
[0068] The memory 320 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the cloud server resource scheduling method in the embodiment of the present application. The processor 310 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 320, that is, the cloud server resource scheduling method of the above method embodiment is implemented.
[0069] The memory 320 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the device for cloud server resource scheduling, etc. In addition, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 320 may optionally include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the device for cloud server resource scheduling via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0070] An embodiment of the present application also provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors can execute the cloud server resource scheduling method in any of the above method embodiments.
[0071] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0072] Through the description of the above implementation methods, ordinary technicians in this field can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Ordinary technicians in this field can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for cloud server resource scheduling, characterized in that: The method comprises: Initiate a request to create a first service; If the request is successful, a request to create the next service is sent; If the request fails, the service request is deleted.
2. The method according to claim 1, characterized in that: Before initiating the request to create the first service, the method further includes: Pre-configure data and request parameters.
3. The method according to claim 1, characterized in that The first service is a virtual private cloud, and the next service includes a subnet, a security group, a security group rule, an elastic public network, and an elastic cloud server.
4. The method according to claim 3, characterized in that If the request is successful, a request to create the next service is sent, including: If the request to create the virtual private cloud is successful, sending a request to create the subnet; If the request to create the subnet is successful, a request to create the security group is sent; If the request to create the security group is successful, a request to create the security group rules is sent; If the request to create the security group rule is successful, a request to create the elastic public network is sent; If the request to create the elastic public network is successful, a request to create the elastic server is sent; If the request to create the elastic server is successful, the process ends.
5. The method according to claim 4, characterized in that The request failure includes a request failure to create a virtual private cloud, or a request failure to create a subnet, or a request failure to create a security group, or a request failure to create an installation group rule, or a request failure to create an elastic public network, or a request failure to create an elastic server.
6. The method according to claim 5, characterized in that If the request fails, the service request is deleted, including: If the request fails, checking whether the elastic server exists; If the elastic server exists, deleting the elastic server; If the elastic server is deleted, check whether the elastic public network exists; If the elastic public network exists, deleting the elastic public network; If the elastic public network is deleted, check whether the security group exists; If the security group exists, delete the security group; If the security group is deleted, check whether the subnet exists; If the subnet exists, deleting the subnet; If the subnet is deleted, checking whether the virtual private cloud exists; If the virtual private cloud exists, the virtual private cloud is deleted.
7. A cloud server resource scheduling device, characterized in that: include: A first request module, used to initiate a request to create a first service; A second request module, used for sending a request to create a next service if the request is successful; The delete module is used to delete the service request if the request fails.
8. The device according to claim 7, characterized in that The device also includes: Configuration module, used to pre-configure data and request parameters.
9. A cloud server, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
10. A non-volatile computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 6.