The method, device and electronic equipment for regulating the example, the method for reducing the capacity of the example
Patent Information
- Application Number
- CN202510458072.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2026-10-20
AI Technical Summary
[0024]本实施例提供的实例的调控方法、实例的缩容方法、装置及电子设备,响应于所获得的实例扩容请求之后,通过确定与所述实例扩容请求相对应的扩容策略;而后基于所述扩容策略来确定至少一个类型的可用资源,并基于所述扩容策略和所述至少一个类型的可用资源进行实例的扩容操作,由于可用资源的类型包括以下至少之一:指定私有池中的第一类私有资源、未指定私有池中的第二类私有资源、公有池中的公有资源,而进行实例的扩容操作所对应的实际使用资源可以基于实例扩容操作的状态在至少一个类型的可用资源所限定的范围内进行灵活调整,有效地实现了能够根据具体的实际场景所对应的云上资源进行灵活、可靠的弹性扩容操作,这样不仅能够在一定程度上保证对实例进行扩容操作的质量和效果,并且还有利于提高云资源的利用率,进一步保证了该方法的实用性。
Smart Images

Figure HDA0005356228620000011 
Figure HDA0005356228620000012 
Figure HDA0005356228620000021
Abstract
Description
Technical Field
[0001] This application relates to the field of resource processing, and more particularly to a method for controlling an instance, a method for reducing the size of an instance, an apparatus, and an electronic device. Background Technology
[0002] Elastic scaling refers to a strategy that automatically adjusts the number of resources (e.g., the number of instances required for a given scenario) according to user-defined policies. This helps users cope with traffic fluctuations while improving resource utilization and effectively reducing costs. Currently, how to formulate appropriate elastic scaling strategies for cloud resources to ensure their utilization is a pressing issue that needs to be addressed. Summary of the Invention
[0003] This application provides a method for regulating an instance, a method for shrinking an instance, an apparatus, and an electronic device, which can, to a certain extent, ensure the quality and effectiveness of instance expansion operations and help improve the utilization rate of cloud resources.
[0004] This invention provides a method for regulating an instance, comprising:
[0005] In response to the obtained instance expansion request, determine the expansion strategy corresponding to the instance expansion request;
[0006] Based on the expansion strategy, at least one type of available resource is determined, and the type of available resource includes at least one of the following: a first type of private resource in a designated private pool, a second type of private resource in an undesignated private pool, and a public resource in a public pool;
[0007] The instance expansion operation is performed based on the expansion strategy and the available resources of at least one type.
[0008] This invention provides a method for scaling down an example, comprising:
[0009] In response to the obtained instance scaling-down request, determine the scaling-down strategy corresponding to the instance scaling-down request;
[0010] Based on the scaling-down strategy, at least one type of available scaling-down resources is determined, and the type of available scaling-down resources includes at least one of the following: private resources in a private pool, and public resources in a public pool;
[0011] The instance is scaled down based on the scaling-down strategy and at least one type of available scaling-down resources.
[0012] This invention provides an example of a control device, comprising:
[0013] The first acquisition module is used to determine the expansion strategy corresponding to the acquired instance expansion request in response to the acquired instance expansion request.
[0014] The first determining module is used to determine at least one type of available resource based on the expansion strategy. The type of available resource includes at least one of the following: a first type of private resource in a designated private pool, a second type of private resource in an undesignated private pool, and a public resource in a public pool.
[0015] The first processing module is used to perform instance expansion operations based on the expansion strategy and the available resources of the at least one type.
[0016] This invention provides an example of a volume reduction device, comprising:
[0017] The second acquisition module is used to determine a scaling-down strategy corresponding to the acquired instance scaling-down request in response to the acquired instance scaling-down request.
[0018] The second determining module is used to determine at least one type of scaling-down resource based on the scaling-down strategy, wherein the type of scaling-down resource includes at least one of the following: private resources in a private pool, and public resources in a public pool;
[0019] The second processing module is used to perform instance scaling operations based on the scaling-down strategy and at least one type of scaling-down resource.
[0020] This invention provides an electronic device, including: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method of any one of the first to second aspects described above.
[0021] This invention provides a computer storage medium for storing a computer program, which, when executed by a computer, implements the method described in any one of the first to second aspects above.
[0022] This invention provides a computer program product, comprising: a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the method in any one of the first to second aspects described above.
[0023] This invention provides a computing platform, including: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method of any one of the first to second aspects described above.
[0024] The instance scaling method, instance shrinking method, apparatus, and electronic device provided in this embodiment, in response to a received instance scaling request, determine a scaling strategy corresponding to the instance scaling request; then, based on the scaling strategy, determine at least one type of available resources, and perform instance scaling operation based on the scaling strategy and the at least one type of available resources. Since the types of available resources include at least one of the following: a first type of private resource in a designated private pool, a second type of private resource in an undesignated private pool, and public resources in a public pool, the actual resources used for the instance scaling operation can be flexibly adjusted within the range defined by at least one type of available resources based on the state of the instance scaling operation. This effectively realizes flexible and reliable elastic scaling operation of cloud resources according to specific actual scenarios. This not only ensures the quality and effect of instance scaling operation to a certain extent, but also helps to improve the utilization rate of cloud resources, further ensuring the practicality of the method. Attached Figure Description
[0025] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0026] Figure 1 A schematic diagram of a scenario for an example control method provided in this application, which is an exemplary embodiment of the present application;
[0027] Figure 2 A flowchart illustrating an example control method provided in an exemplary embodiment of this application;
[0028] Figure 3 A flowchart illustrating an exemplary embodiment of this application for performing instance scaling operations based on the scaling strategy and the available resources of at least one type. Figure 1 ;
[0029] Figure 4 A flowchart illustrating an exemplary embodiment of this application for performing instance scaling operations based on the scaling strategy and the available resources of at least one type. Figure 2 ;
[0030] Figure 4a A schematic diagram illustrating the principle of instance expansion operation based on the expansion strategy and the available resources of at least one type, provided for an exemplary embodiment of this application;
[0031] Figure 5 A flowchart illustrating a control method for another example provided in an exemplary embodiment of this application;
[0032] Figure 6 A flowchart illustrating a method for scaling down an example of an exemplary embodiment of this application;
[0033] Figure 7 A flowchart illustrating a method for scaling down an example of another exemplary embodiment of this application;
[0034] Figure 8 A flowchart illustrating an exemplary embodiment of this application for performing instance scaling operations based on the scaling-down strategy and at least one type of available scaling-down resources. Figure 1 ;
[0035] Figure 8a A schematic diagram illustrating the principle of instance scaling operation based on the scaling-down strategy and at least one type of available scaling-down resources, provided for an exemplary embodiment of this application;
[0036] Figure 9 A flowchart illustrating an exemplary embodiment of this application for performing instance scaling operations based on the scaling-down strategy and at least one type of available scaling-down resources. Figure 2 ;
[0037] Figure 9a A schematic diagram illustrating the principle of instance scaling operation based on the scaling-down strategy and at least one type of available scaling-down resources, provided for an exemplary embodiment of this application;
[0038] Figure 10 A schematic diagram of the structure of a control device provided for an exemplary embodiment of this application;
[0039] Figure 11 A schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application;
[0040] Figure 12 A schematic diagram of the structure of a reduction device provided as an exemplary application embodiment of this application;
[0041] Figure 13 A schematic diagram of the structure of an electronic device provided for an exemplary embodiment of this application. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0043] It should be noted that, in the cases involving user information in the embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) comply with relevant laws and standards.
[0044] Additionally, it should be noted that when user interaction operations or triggering operations are involved in the embodiments of this application, these operations include, but are not limited to, various interaction methods such as touch operations, gesture operations, voice operations, head movement operations, and eye movement operations. Touch operations include, but are not limited to, click operations, double-click operations, long-press operations, swipe operations, pinch operations, or mouse hover operations. Swipe operations include, but are not limited to, straight-line swipes and curved-line swipes.
[0045] Terminology definition:
[0046] Private pools: These include dedicated resources (including computing resources, storage resources, etc.) used to provide cloud services to a specific organization, team, or user. These resources are not shared with the outside world, ensuring higher security and privacy protection. Private pools are suitable for scenarios with high requirements for data confidentiality and compliance.
[0047] Public pool: This includes resources that are open to the public for any customer to rent on demand. Because public pools allow users to pay based on the amount of resources actually used, they offer greater flexibility and cost-effectiveness.
[0048] Elastic Scaling Service (ESS) can automatically adjust the number of computing resources (i.e., the number of instances required for a scenario) according to user-defined strategies, helping users cope with traffic fluctuations while improving resource utilization and effectively reducing costs.
[0049] To facilitate understanding of the control method, scaling method, apparatus, and electronic device provided in the embodiments of this application, the relevant technologies are briefly described below:
[0050] After a user purchases Elastic Assurance (EA) and Capacity Reservation (CR) services through the system, the system can reserve resources with consistent attributes in a private pool. Specifically, the instance created through the preset interface (Runnstances API) can specify a private pool of a specific type and ID. That is, the private pool corresponding to the reservation service is usually designed to reserve resources in a single availability zone and a single specification, and the number of reserved resources is usually limited. This cannot guarantee the stable operation of the reservation service.
[0051] Furthermore, when customers need to use multiple types of resources for elastic scaling during peak data periods, there is currently no feasible solution for combining multiple private pools and public pools to deliver overall capacity; similarly, when customers need to use multiple types of resources for elastic scaling down during off-peak data periods, there is currently no feasible solution for combining multiple private pools and public pools to reduce capacity.
[0052] Furthermore, in elastic scaling scenarios, users often configure multiple availability zones and various specifications, and set instance delivery strategies such as prioritization, cost minimization, and availability zone balancing. This means that resources need to be planned according to these strategies before instance creation. However, due to the real-time changes in public pool inventory, and the possibility that resources in private pools may be used by other applications under the same account, there is currently no feasible solution to ensure that if resource delivery fails during the planning phase of public and private pools, alternative resources are automatically found and created according to the preset priority order of different pools.
[0053] To address the aforementioned technical problems, embodiments of this application provide a method for regulating an instance, a method for reducing the size of an instance, an apparatus, and an electronic device, as detailed in the appendix. Figure 1As shown, the execution entity of the instance control method can be the instance control device 200, which can be implemented as a local server, a cloud server, or an information retrieval product. Specifically, if the instance control device 200 is implemented as a cloud server, the instance control method can be executed in the cloud. Several computing nodes (cloud servers) can be deployed in the cloud, each with computing, storage, and other processing resources. In the cloud, multiple computing nodes can be organized to provide a certain service; conversely, a single computing node can provide one or more services. The cloud can provide this service by providing an external service interface, which users can call to use the corresponding service. Service interfaces include Software Development Kits (SDKs), Application Programming Interfaces (APIs), and other forms.
[0054] The control device 200 of this instance is communicatively connected to the client 100. The client 100 is used by users to trigger instance expansion operations. The client 100 can be any computing device with certain information interaction capabilities. Specifically, the client 100 can be a mobile phone, a personal computer (PC), a tablet computer, a configuration application, etc. Furthermore, the basic structure of the client 100 may include at least one processor. The number of processors depends on the client's configuration and type. The client 100 may also include memory, which can be volatile, such as Random Access Memory (RAM), or non-volatile, such as Read-Only Memory (ROM), flash memory, etc., or both types. The memory typically stores the operating system (OS), one or more applications, and may also store program data. In addition to the processing unit and memory, the client 100 also includes some basic configurations, such as a network card chip, an I / O bus, a display component, and some peripheral devices. Optionally, some peripheral devices may include, for example, a keyboard, a mouse, a stylus, a printer, etc. Other peripheral devices are well known in the art and will not be described in detail here.
[0055] The instance control device 200 refers to a device that can perform instance expansion operations in a network virtual environment. It typically refers to a device that utilizes the network for information planning and instance expansion operations. Specifically, the instance control device 200 can be implemented as an instance expansion model for performing instance expansion operations. Physically, the instance control device 200 can be any device capable of providing computing services and performing corresponding instance expansion operations, such as a processor, server, etc. The instance control device 200 mainly consists of a processor, hard disk, memory, system bus, etc., similar to a general computer architecture.
[0056] In the above embodiment, the control device 200 and the client 100 are connected via a network, which can be a wireless or wired network connection. If the control device 200 and the client 100 are connected via a communication connection, the network standard of the mobile network can be any one of 2G (Global System for Mobile Communications GSM), 2.5G (General Packet Radio Service GPRS), 3G (Wideband Code Division Multiple Access (WCDMA), Time Division Synchronous Code Division Multiple Access (TD-SCDMA), 4G (Long Term Evolution LTE), 4G+ (Enhanced Long Term Evolution LTE+), Global Microwave Access Interoperability (WiMax), 5G, 6G, etc.
[0057] In this embodiment of the application, the client 100 is used by a user to generate or obtain an instance expansion request for instance expansion operation. In some instances, the client 100 may display an interactive interface for interacting with the instance control device 200. The user can input an operation in the interactive interface, which can be an interactive operation in natural language, thereby generating and obtaining an instance expansion request. In order to realize the instance expansion operation, the client 100 can send the obtained instance expansion request to the instance control device 200.
[0058] The instance control device 200 is used to obtain the instance expansion request sent by the client 100. In response to the obtained instance expansion request, it can determine the expansion strategy corresponding to the instance expansion request. The expansion strategy can include any one of the following: private pool priority strategy, private pool strategy, public pool priority strategy, and public pool strategy. The above expansion strategy can be determined based on the user's configuration information, or the expansion strategy can be flexibly determined based on the needs or characteristics of the application scenario.
[0059] Since different scaling strategies correspond to different types of available resources, in order to ensure the stability and reliability of instance scaling operations, after obtaining the scaling strategy, at least one type of available resource can be determined based on the scaling strategy. The determined type of available resource can include at least one of the following: a first type of private resource in a specified private pool, a second type of private resource in an unspecified private pool, or a public resource in a public pool. After obtaining the scaling strategy and at least one type of available resource, instance scaling operations can be performed based on the scaling strategy and at least one type of available resource, thus effectively achieving the stability and reliability of instance scaling operations.
[0060] In this embodiment, after obtaining an instance expansion request, an expansion strategy corresponding to the instance expansion request can be determined based on the instance expansion request. Then, at least one type of available resource can be determined based on the expansion strategy. Since the type of available resource can include at least one of the following: a first type of private resource in a specified private pool, a second type of private resource in an unspecified private pool, or a public resource in a public pool, the instance expansion operation based on the expansion strategy and at least one type of available resource effectively ensures the quality and effect of the instance expansion operation, thereby improving resource utilization and further ensuring the practicality of the method.
[0061] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0062] Figure 2 A flowchart illustrating an example control method provided in this application, as an exemplary embodiment; see attached diagram. Figure 2 As shown, this embodiment provides a method for controlling instances. The execution subject of this method is an instance control device, which can be implemented as software or a combination of software and hardware. When the instance control device is implemented as hardware, it can be various electronic devices capable of performing instance scaling operations, including but not limited to personal computers, servers, etc. In some instances, the instance control device can be implemented as an elastic scaling server capable of performing instance scaling operations. This elastic scaling server can detect resource usage and dynamically adjust the scale of computing resources based on usage to match changes in data processing needs. When the instance control device is implemented as software, it can be installed in the electronic devices exemplified above.
[0063] Specifically, the control method provided in this embodiment may include:
[0064] Step S201: In response to the obtained instance expansion request, determine the expansion strategy corresponding to the instance expansion request.
[0065] Step S202: Based on the expansion strategy, determine at least one type of available resource. The type of available resource includes at least one of the following: a first type of private resource in a designated private pool, a second type of private resource in an undesignated private pool, or a public resource in a public pool.
[0066] Step S203: Perform instance scaling operations based on the scaling strategy and at least one type of available resources.
[0067] The specific implementation methods and principles of each of the above steps are explained in detail below:
[0068] Step S201: In response to the obtained instance expansion request, determine the expansion strategy corresponding to the instance expansion request.
[0069] When there is a need to expand the instance, the instance control device can obtain the instance expansion request. In some instances, the instance expansion request can be determined by the client. In this case, before determining the expansion strategy corresponding to the instance expansion request, the method in this embodiment may include: determining the client that is connected to the instance control device, and obtaining the instance expansion request actively or passively through the client. The instance expansion request can be generated based on human-computer interaction.
[0070] In other instances, instance expansion requests can be automatically generated based on the system's running status. In this case, before determining the expansion strategy corresponding to the instance expansion request, the method in this embodiment may include: obtaining the system's running status parameters, wherein the running status parameters may include at least one of the following: CPU processor resource utilization, memory resource utilization, storage resource occupancy, etc.; when the running status parameters reach a preset expansion threshold, an instance expansion request is actively generated to ensure the stability and reliability of the system operation.
[0071] In some instances, instance expansion requests can be generated not only automatically based on the system's running status but also based on expansion task information pre-input by the user. In this case, before determining the expansion strategy corresponding to the instance expansion request, the method in this embodiment may include: obtaining pre-configured expansion task information from the user, which may include at least the time period for which expansion operations are required or the application scenario for which expansion operations are required; and flexibly performing instance expansion operations based on the expansion task information, i.e., allowing instance expansion operations when the scenario or conditions defined by the expansion task information are met; and not requiring instance expansion operations when the scenario or conditions defined by the expansion task information are not met. This achieves flexible and reliable instance expansion operations.
[0072] After receiving an instance expansion request, since different expansion strategies can be used to implement instance expansion operations in different application scenarios, in order to ensure the quality and effectiveness of the instance expansion operation, the expansion strategy corresponding to the instance expansion request can be determined first. Specifically, the expansion strategy can be determined based on pre-set expansion configuration information. In this case, determining the expansion strategy corresponding to the instance expansion request may include: obtaining the expansion configuration information corresponding to the instance expansion request. The expansion configuration information can be obtained through human-computer interaction, or it can be information pre-configured by the user and stored in a preset area or preset device. In this case, the expansion configuration information can be obtained by accessing the preset area or preset device. Then, the expansion strategy corresponding to the instance expansion request can be determined based on the expansion configuration information.
[0073] In addition, the scaling strategy can include at least one of the following: private pool priority strategy, private pool strategy, public pool priority strategy, and public pool strategy. The private pool priority strategy mentioned above can refer to the strategy of using the private resources of a specified private pool to perform instance scaling operations in the application scenario of instance scaling. When the scaling requirements are not met, the private resources in the private pool can be used to perform instance scaling operations. When the scaling requirements are not met again, the public resources in the public pool can be used to perform instance scaling operations.
[0074] Similarly, the public pool priority strategy can refer to a strategy that prioritizes the use of public resources in the public pool for instance expansion in application scenarios. When the expansion needs are not met, private resources in a designated private pool can be used for instance expansion. When the expansion needs are not met again, private resources in the private pool can be used for instance expansion.
[0075] The aforementioned private pool strategy refers to a strategy that uses only the private resources of a specified private pool to perform instance expansion operations in application scenarios where instance expansion is performed; the aforementioned public pool strategy refers to a strategy that uses only the public resources of a specified public pool to perform instance expansion operations in application scenarios where instance expansion is performed.
[0076] It's important to note that the scaling strategy can be determined through scaling configuration information. This configuration information is determined by configuring parameters in the scaling configuration interface used to implement instance scaling operations. Specifically, two parameters can be added to the scaling configuration interface:
[0077] ResourcePoolOptions.Strategy: Used to identify the scaling strategy for jointly using resources in a public pool, multiple unspecified private pools, or at least one specified private pool.
[0078] ResourcePoolOptions.PrivatePoollds: Specifies a list of private pool IDs to identify at least one specific private pool.
[0079] For expansion strategies, they can include not only the strategy information related to available resource types (i.e., the private pool priority strategy, private pool strategy, public pool priority strategy, and public pool strategy included in the above description), but also other expansion configuration information, such as: the priority set by the user for different availability zones (which may refer to the specified private pool, unspecified private pool, and public pool included in the above description), the priority set by the user for resources of different specifications (specification 1 resources, specification 2 resources, specification 3 resources, etc.), cost minimization strategies, and instance delivery strategies such as balancing between availability zones. Those skilled in the art can flexibly configure and adjust expansion strategies according to application scenarios or application requirements. Among them, specification 1 resources may include: a 1-core processor (Central Processing Unit, abbreviated as CPU), 1GB of random-access memory (RAM); specification 2 resources may include: a 2-core CPU, 8GB of RAM; specification 3 resources may include: a 4-core CPU, 8GB of RAM, etc.
[0080] Step S202: Based on the expansion strategy, determine at least one type of available resource. The type of available resource includes at least one of the following: a first type of private resource in a designated private pool, a second type of private resource in an undesignated private pool, or a public resource in a public pool.
[0081] Since different scaling strategies correspond to different types of available resources, after determining the scaling strategy corresponding to the instance scaling request, at least one type of available resource can be determined based on the scaling strategy. The type of available resource can include at least one of the following: a first type of private resource in a specified private pool, a second type of private resource in an unspecified private pool, or public resources in a public pool. Here, available resources refer to the resources that can be utilized when performing a scaling operation based on the scaling strategy, which is different from the actual resources used when performing a scaling operation based on the scaling strategy. The aforementioned actual resources used are at least a portion of the available resources.
[0082] In this case, at least one type of available resource can be determined by analyzing and processing the expansion strategy based on a pre-trained neural network model. In this case, determining at least one type of available resource based on the expansion strategy may include: obtaining a pre-trained neural network model; inputting the expansion strategy into the neural network model to obtain at least one type of available resource output by the neural network model that corresponds to the expansion strategy.
[0083] Furthermore, when the expansion strategy corresponds to multiple types of available resources, these multiple types of available resources may not have corresponding priorities for identifying resource usage. In this case, when performing an expansion operation based on the expansion strategy and multiple types of available resources, any one type of available resource can be randomly used for the expansion operation first; or, the expansion operation can be performed first according to a preset order of available resources of one type. Alternatively, the multiple types of available resources corresponding to the expansion strategy may have corresponding priorities. In this case, when performing an expansion operation based on the expansion strategy and multiple types of available resources, the expansion operation can be performed first based on the type of available resources specified by the priority. This effectively ensures the flexibility and reliability of the method.
[0084] In other instances, when available resources correspond to priority information, at least one type of available resource can be determined not only by analyzing and processing the scaling strategy based on a pre-trained neural network, but also through a pre-trained mapping relationship. In this case, determining at least one type of available resource based on the scaling strategy can include: when the scaling strategy is a private pool priority strategy, determining at least one type of available resource includes a first type of private resource, a second type of private resource, and public resources, wherein the priority of the first type of private resource is higher than the priority of the second type of private resource, and the priority of the second type of private resource is higher than the priority of public resources; or, when the scaling strategy is a private pool strategy, determining at least one type of available resource includes the first type of private resource; or, when the scaling strategy is a public pool priority strategy, determining at least one type of available resource includes a first type of private resource, a second type of private resource, and public resources, wherein the priority of public resources is higher than the priority of the first type of private resource, and the priority of the first type of private resource is higher than the priority of the second type of private resource; or, when the scaling strategy is a public pool strategy, determining at least one type of available resource includes public resources.
[0085] Example 1: When the expansion strategy is a private pool priority strategy, the available resources corresponding to the private pool priority strategy can include first-class private resources, second-class private resources, and public resources. When the priority of first-class private resources is higher than that of second-class private resources, and the priority of second-class private resources is higher than that of public resources, the actual resources used for expansion operations based on the private pool priority strategy can be first-class private resources; or, the actual resources used can be first-class private resources and second-class private resources; or, the actual resources used can be first-class private resources, second-class private resources, and public resources.
[0086] For the first type of private resources, the second type of private resources, and public resources, the priority of the first type of private resources, the second type of private resources, and public resources can not only be implemented in the priority order mentioned above, but can also be configured to other priority orders. For example, the priority of the second type of private resources is higher than the priority of the first type of private resources, and the priority of the first type of private resources is higher than the priority of public resources. In this case, the actual resources used for the expansion operation based on the private pool priority strategy can be the second type of private resources; or, the actual resources used can be the first type of private resources and the second type of private resources; or, the actual resources used can be the first type of private resources, the second type of private resources, and public resources.
[0087] Example 2: When the expansion strategy is a private pool strategy, since the available resources of at least one type corresponding to the private pool strategy can only include the first type of private resources, the actual resources used for expansion based on the private pool strategy can be the first type of private resources.
[0088] It should be noted that when the expansion strategy is a private pool strategy, the available resources of at least one type corresponding to the private pool strategy can include a first type of private resource and a second type of private resource. The priority of the first type of private resource can be higher than that of the second type of private resource. The actual resources used for the expansion operation based on the private pool strategy can be the first type of private resource, or the actual resources used can be the first type of private resource and the second type of private resource.
[0089] Correspondingly, the available resources of at least one type corresponding to the private pool strategy may include a first type of private resource and a second type of private resource, and the priority of the second type of private resource may be higher than that of the first type of private resource. The actual resources used for the expansion operation based on the private pool strategy may be the second type of private resource, or the actual resources used may be the first type of private resource and the second type of private resource.
[0090] Example 3: When the expansion strategy is a public pool priority strategy, it can be determined that at least one type of available resources includes first-class private resources, second-class private resources, and public resources. When the priority of public resources is higher than that of first-class private resources, and the priority of first-class private resources is higher than that of second-class private resources, the actual resources used for expansion operations based on the public pool priority strategy can be public resources; or, the actual resources used can be public resources and first-class private resources; or, the actual resources used can be first-class private resources, second-class private resources, and public resources.
[0091] For the first type of private resources, the second type of private resources, and public resources, the priority of the first type of private resources, the second type of private resources, and public resources can not only be implemented in the priority order mentioned above, but can also be configured to other priority orders. For example, the priority of public resources is higher than the priority of the second type of private resources, and the priority of the second type of private resources is higher than the priority of the first type of private resources. In this case, the actual resources used for the expansion operation based on the public pool priority strategy can be public resources; or, the actual resources used can be public resources and the second type of private resources; or, the actual resources used can be the first type of private resources, the second type of private resources, and public resources.
[0092] Example 4: When the expansion strategy is a public pool strategy, since the available resources of at least one type corresponding to the public pool strategy at this time only include public resources, the actual resources used for expansion operations based on the public pool strategy can be public pool resources.
[0093] Step S203: Perform instance scaling operations based on the scaling strategy and at least one type of available resources.
[0094] After obtaining the scaling strategy and at least one type of available resources, instance scaling operations can be performed based on the scaling strategy and at least one type of available resources. In some instances, instance scaling operations can be implemented through a preset controller. In this case, scaling operations based on the scaling strategy and at least one type of available resources can include: inputting the scaling strategy and at least one type of available resources into the preset controller, so that the preset controller can perform instance scaling operations based on the scaling strategy and at least one type of available resources, and can obtain the scaling operation results output by the preset controller. The actual resources used for instance scaling operations can be flexibly adjusted within the range defined by at least one type of available resources based on the state of the instance scaling operation, thereby ensuring the stability and reliability of instance scaling operations to a certain extent.
[0095] In some instances, after scaling up an instance based on a scaling strategy and at least one type of available resources, the type of the actual resources used by the scaled-up instance can be identified. In this case, the method in this embodiment can also include: obtaining the scaled-up instance after the scaling up operation; determining the type of the actual resources used by the scaled-up instance; and associating the scaled-up instance with the type of the actual resources used.
[0096] After scaling up an instance based on a scaling strategy and at least one type of available resource, the scaled-up instance can be obtained. The scaled-up instance can be built based on different types of available resources. In order to distinguish between different scaled-up instances created by different types of available resources, the type of actual resource used by the scaled-up instance can be determined after obtaining the scaled-up instance. In some instances, the type of actual resource used by the scaled-up instance can be determined by the creation configuration information or creation log information corresponding to the scaled-up instance. The type of actual resource used by the scaled-up instance can include any one of the following: a first type of private resource in a specified private pool, a second type of private resource in an unspecified private pool, or a public resource in a public pool.
[0097] After obtaining the expanded instance and the type of actual resources used by the expanded instance, the expanded instance and the type of actual resources used can be associated and stored. In some instances, the identification information corresponding to the type of available resources can be determined first, and then the identification information can be added to the preset field corresponding to the expanded instance. In this way, by reading the preset field corresponding to the expanded instance, the type of actual resources used by the expanded instance can be quickly identified, and it is convenient to manage, control or shrink the expanded instance based on the type of actual resources used by the expanded instance, thereby effectively improving the practicality of the method.
[0098] The instance scaling method provided in this embodiment, in response to an obtained instance scaling request, determines a scaling strategy corresponding to the instance scaling request; then, based on the scaling strategy, it determines at least one type of available resources, and performs instance scaling operation based on the scaling strategy and at least one type of available resources. Since the types of available resources include at least one of the following: a first type of private resource in a specified private pool, a second type of private resource in an unspecified private pool, and public resources in a public pool, and the scaling strategy can specifically include a private pool priority strategy, a private pool strategy, a public pool priority strategy, and a public pool strategy, and then performs instance scaling operation based on multiple scaling strategies, the actual resources used corresponding to the instance scaling operation can be flexibly adjusted within the range limited by at least one type of available resources based on the state of the instance scaling operation. This effectively realizes flexible and reliable elastic scaling operation for cloud resources according to specific actual scenarios. This not only ensures the quality and effect of instance scaling operation to a certain extent, but also helps to improve resource utilization, further ensuring the practicality of the method.
[0099] Figure 3 A flowchart illustrating an exemplary embodiment of this application for performing instance scaling operations based on a scaling strategy and at least one type of available resources. Figure 1 Based on the above embodiments, refer to the appendix. Figure 3 As shown, the scaling strategy can include any one of the following: private pool priority strategy, private pool strategy, public pool priority strategy, and public pool strategy. This embodiment provides an implementation method for instance scaling operation based on private pool priority strategy. In this case, the instance scaling operation based on the scaling strategy and at least one type of available resources can include:
[0100] Step S301: If the expansion strategy is a private pool priority strategy, identify whether there is a specified private pool corresponding to the instance expansion request.
[0101] When the expansion strategy is a private pool priority strategy, since the available resources corresponding to the private pool priority strategy include at least one type of private resources, a second type of private resources and public resources, the first type of private resources are resources in a designated private pool. Compared with the private pool, the designated private pool can be a pre-configured private pool with an identity identifier, which can be determined by the pre-configured identity identifier.
[0102] Specifically, when the scaling strategy is a private pool priority strategy, since the priority of the first type of private resources included in the available resources is higher than the priority of other types of resources, theoretically, subsequent instance scaling operations can be performed based on the private pool priority strategy and utilizing the first type of private resources. However, for the private pool priority strategy, there may be a designated private pool with a pre-configured identity identifier, or there may be no designated private pool with a pre-configured identity identifier.
[0103] Therefore, in order to accurately perform instance scaling operations based on the private pool priority strategy, when the scaling strategy is private pool priority, it is necessary to first identify whether there is a command private pool corresponding to the instance scaling request. In some instances, the specified private pool can be determined by the private pool configuration information adapted to the instance scaling request. In this case, identifying whether there is a command private pool corresponding to the instance scaling request may include: obtaining the private pool configuration information corresponding to the instance scaling request; detecting whether there is an identity identifier corresponding to the specified private pool in the private pool configuration information; if there is an identity identifier corresponding to the specified private pool, determining that there is a specified private pool corresponding to the instance scaling request, wherein the number of specified private pools can be one or more; if there is no identity identifier corresponding to the specified private pool, determining that there is no specified private pool corresponding to the instance scaling request. This effectively achieves the accurate identification of whether there is a specified private pool corresponding to the instance scaling request.
[0104] Step S302: If a specified private pool corresponding to the instance expansion request exists, the instance expansion operation is performed using the first type of private resources to obtain the first expanded instance.
[0105] If the identification result indicates that there is a specified private pool corresponding to the instance expansion request, it means that the available resources of at least one type corresponding to the private pool priority strategy at this time include the available first type of private resources. Since the priority of the first type of private resources is higher than the priority of other types of resources, the first type of private resources can be used to perform the instance expansion operation, thereby obtaining the first expanded instance after the expansion operation.
[0106] For example, after obtaining the first expansion instance, it is possible to identify whether the expansion effect meets the requirements corresponding to the instance expansion request based on the obtained first expansion instance. At this time, the method in this embodiment may further include: if the first expansion instance meets the instance expansion request, it indicates that the instance expansion operation has been completed, and expansion completion prompt information corresponding to the instance expansion request can be generated. Furthermore, it is also possible to prohibit the use of other types of available resources for instance expansion operation; or, if the first expansion instance does not meet the instance expansion request, it indicates that the resource capacity in the specified private pool is insufficient, and the second type of private resources can be used to perform instance expansion operation to obtain a second expansion instance.
[0107] Specifically, after obtaining the first expansion instance, the first expansion instance and the expansion request can be analyzed and processed to determine whether the first expansion instance meets the expansion request. In some instances, determining whether the first expansion instance meets the expansion request can be done through a pre-trained instance performance evaluation model. In this case, determining whether the first expansion instance meets the expansion request can include: inputting the first expansion instance and the expansion request into the instance performance evaluation model for analysis and processing, and obtaining the identification result output by the instance performance evaluation model to indicate whether the first expansion instance meets the expansion request. If the identification result is the first result, it can be determined that the obtained first expansion instance meets the expansion request; if the identification result is the second result, it can be determined that the obtained second expansion instance does not meet the expansion request.
[0108] If the obtained first expanded instance satisfies the instance expansion request, it indicates that the instance expansion operation corresponding to the request has been completed, and no further instance expansion is needed. A completion notification message corresponding to the instance expansion request can be generated, and the use of other types of available resources for instance expansion can be prohibited. Conversely, if the obtained first expanded instance does not satisfy the instance expansion request, it indicates that the instance expansion operation corresponding to the request has not been completed, and further instance expansion is required. Since the priority of the first type of private resources is higher than that of the second type of private resources, and the priority of the second type of private resources is higher than that of public resources, if the first type of private resources has already been used for instance expansion, and the obtained first expanded instance does not satisfy the request, the second type of private resources can be used to perform instance expansion again, thereby obtaining a second expanded instance.
[0109] The instance performance evaluation model involved in this application embodiment can be an artificial intelligence-based language model (LM) or multimodal model (MM), etc. This application embodiment does not limit the number of model parameters supported by the model, aiming to meet actual needs. If the model has relatively more parameters, the model size will be relatively larger, and the model performance will be relatively better. Of course, more time and resources will be consumed during inference or training. If the model has relatively fewer parameters, the model size will be relatively smaller. While meeting performance requirements, the model is more lightweight, and consumes relatively less time and resources during inference or training. This instance performance evaluation model can be a deep learning model used to process and generate natural language text or multimodal data. It can be implemented based on a neural network architecture and can be pre-trained on large amounts of data. In an optional implementation, the instance performance evaluation model can include an encoder, a decoder, a self-attention layer, and a feed-forward neural network, etc. The encoder is mainly used to convert input data (usually in sequence form) into vector representation. This process can capture the semantic features of the input data. The decoder is responsible for converting the intermediate representation generated by the encoder into output data (usually in sequence form). The self-attention layer is a mechanism that allows the model to pay attention to other positions in the sequence to better encode the current position information. The feedforward neural network can perform nonlinear transformations on the output of the self-attention layer to enhance the model's expressive power. All parts work together, enabling the model built on them to perform well in various complex processing tasks, such as natural language processing, computer vision, speech recognition, machine translation, text summarization, and intelligent question answering.
[0110] For example, after obtaining the second expansion instance, the first expansion instance, the second expansion instance, and the instance expansion request can be analyzed and processed to identify whether the sum of the first and second expansion instances satisfies the instance expansion request. At this time, the method in this embodiment may further include: identifying whether the sum of the first and second expansion instances satisfies the instance expansion request; if the sum of the first instances satisfies the instance expansion request, an expansion completion prompt message corresponding to the instance expansion request is generated, and the use of other types of available resources for expansion operations may be prohibited; or, if the sum of the first instances does not satisfy the instance expansion request, public resources are used to perform instance expansion operations to obtain a third expansion instance.
[0111] After obtaining the second expansion instance, since the second expansion instance is obtained by performing instance expansion operations based on the second type of private resources, while the first expansion instance is obtained by performing instance expansion operations based on the first type of private resources, in order to accurately identify whether the current expansion effect meets the requirements corresponding to the instance expansion request, we can first obtain the first instance sum consisting of the first expansion instance and the second expansion instance, and then analyze and process the first instance sum and the instance expansion request. Specifically, we can analyze and process the first instance sum and the instance expansion request based on a pre-trained instance effect evaluation model to identify whether the first instance sum meets the requirements corresponding to the instance expansion request.
[0112] If the total number of instances obtained in the first instance expansion operation satisfies the instance expansion request, it indicates that the instance expansion operation corresponding to the request has been completed. No further instance expansion is needed, and a completion notification message corresponding to the expansion request is generated. Furthermore, the use of other types of available resources for instance expansion can be prohibited. Conversely, if the total number of instances obtained in the first instance expansion operation does not satisfy the request, it indicates that the instance expansion operation corresponding to the request has not been completed. Therefore, another instance expansion operation is required. Since the priority of the first type of private resources is higher than that of the second type of private resources, and the priority of the second type of private resources is higher than that of public resources, if instance expansion has already been performed using the first and second types of private resources, and the total number of instances obtained in the first instance expansion operation does not satisfy the request, public resources can be used to perform another instance expansion operation, thereby obtaining a third expanded instance.
[0113] For example, after obtaining the third expansion instance, the first expansion instance, the second expansion instance, the third expansion instance, and the instance expansion request can be analyzed and processed to identify whether the sum of the second instances constituted by the first expansion instance, the second expansion instance, and the third expansion instance satisfies the instance expansion request. At this time, the method in this embodiment may further include: identifying whether the sum of the second instances constituted by the first expansion instance, the second expansion instance, and the third expansion instance satisfies the instance expansion request; if the sum of the second instances does not satisfy the instance expansion request, an expansion failure prompt message corresponding to the instance expansion request is generated.
[0114] After obtaining the third expansion instance, since the third expansion instance is obtained by expanding the instance based on public resources, while the first expansion instance is obtained by expanding the instance based on the first type of private resources, and the second expansion instance is obtained by expanding the instance based on the second type of private resources, in order to accurately identify whether the current expansion effect meets the requirements corresponding to the instance expansion request, we can first obtain the second instance sum consisting of the first expansion instance, the second expansion instance, and the third expansion instance, and then analyze and process the second instance sum and the instance expansion request. Specifically, we can analyze and process the second instance sum and the instance expansion request based on a pre-trained instance effect evaluation model to identify whether the second instance sum meets the requirements corresponding to the instance expansion request.
[0115] If the obtained second total number of instances satisfies the instance expansion request, it indicates that the instance expansion operation corresponding to the request has been completed, and no further instance expansion is needed. Conversely, if the obtained second total number of instances does not satisfy the instance expansion request, it indicates that the instance expansion operation corresponding to the request has not been completed, and there are no available resources for the instance expansion operation. This signifies that the instance expansion operation has failed, and a corresponding expansion failure message can be generated. Furthermore, after generating the expansion failure message, it can be displayed so that users can quickly and promptly learn the result of the current instance expansion operation. This facilitates users in performing corresponding maintenance or adjustment operations based on the expansion failure message, thereby improving the practicality of the method.
[0116] Correspondingly, after identifying whether there is a designated private pool corresponding to the instance expansion request, the method in this embodiment further includes: if there is no designated private pool corresponding to the instance expansion request, using the second type of private resources to perform the instance expansion operation to obtain the first expansion instance.
[0117] Specifically, if the identification result indicates that there is no specified private pool corresponding to the instance expansion request, it means that at least one type of available resources corresponding to the private pool priority strategy at this time does not include available first-type private resources. Furthermore, since the priority of first-type private resources is higher than that of second-type private resources, and the priority of second-type private resources is higher than that of public resources, the second-type private resources can be used to perform instance expansion operations. At this time, the first expanded instance after the expansion operation can also be obtained.
[0118] In some instances, after obtaining the first expansion instance, the method in this embodiment may further include: if the first expansion instance satisfies the instance expansion request, then generating an expansion completion prompt message corresponding to the instance expansion request; or, if the first expansion instance does not satisfy the instance expansion request, then using public resources to perform instance expansion operations to obtain a second expansion instance.
[0119] In some other instances, after obtaining the second expansion instance, the first expansion instance, the second expansion instance, and the instance expansion request can be analyzed and processed to identify whether the sum of the first instances formed by the first expansion instance and the second expansion instance satisfies the instance expansion request. In this case, the method in this embodiment may further include: identifying whether the sum of the first instances formed by the first expansion instance and the second expansion instance satisfies the instance expansion request; if the sum of the first instances does not satisfy the instance expansion request, then generating an expansion failure prompt message corresponding to the instance expansion request.
[0120] In this embodiment, when the expansion strategy is a private pool priority strategy, by identifying whether there is a designated private pool corresponding to the instance expansion request, if there is a designated private pool corresponding to the instance expansion request, the first type of private resources can be used to perform the instance expansion operation, so as to reliably obtain the first expanded instance. This effectively ensures that for different types of resources in the designated private pool, the undesignated private pool and the public pool, the private pool priority strategy is combined to perform flexible and stable instance expansion operations, thereby ensuring the quality and effect of the instance expansion operation.
[0121] Figure 4 A flowchart illustrating an exemplary embodiment of this application for performing instance scaling operations based on a scaling strategy and at least one type of available resources. Figure 2 ; Figure 4a A schematic diagram illustrating the principle of instance expansion operation based on the expansion strategy and the at least one type of available resources, provided as an exemplary embodiment of this application; based on the above embodiment, refer to the appendix. Figure 4 , Figure 4a As shown, the scaling strategy can include any one of the following: private pool priority strategy, private pool strategy, public pool priority strategy, and public pool strategy. This embodiment provides an implementation method for instance scaling operation based on a private pool strategy. In this case, the instance scaling operation based on the scaling strategy and at least one type of available resources can include:
[0122] Step S401: If the scaling strategy is a private pool strategy, identify whether there is a specified private pool corresponding to the instance scaling request.
[0123] When the scaling strategy is a private pool strategy, since at least one type of available resource corresponding to the private pool strategy includes a first type of private resource, where the first type of private resource is a resource in a designated private pool. For the private pool strategy, there may be a designated private pool with a pre-configured identity identifier, or there may not be a designated private pool with a pre-configured identity identifier. Therefore, in order to accurately perform instance scaling operations based on the private pool strategy, when the scaling strategy is a private pool strategy, it is necessary to first identify whether there is a command private pool corresponding to the instance scaling request. Specifically, the method for identifying whether there is a designated private pool corresponding to the instance scaling request can be referred to the specific implementation method of "identifying whether there is a designated private pool corresponding to the instance scaling request" in the above embodiment, which will not be repeated here.
[0124] Step S402: If a specified private pool corresponding to the instance expansion request exists, the instance expansion operation is performed using the first type of private resources to obtain the first expanded instance.
[0125] If the identification result indicates that there is a specified private pool corresponding to the instance expansion request, it means that the available resources of at least one type corresponding to the private pool strategy at this time include the available first type of private resources. Therefore, the first type of private resources can be used to perform the instance expansion operation, thereby obtaining the first expanded instance after the expansion operation.
[0126] Step S403: If there is no specified private pool corresponding to the instance expansion request, generate an expansion failure message corresponding to the instance expansion request.
[0127] If the identification result indicates that there is no specified private pool corresponding to the instance expansion request, and the private pool policy is used to limit the instance expansion operation to using only the first type of private resources, then it means that the instance expansion operation cannot be performed at this time, and thus an expansion failure prompt message corresponding to the instance expansion request can be generated.
[0128] Furthermore, after obtaining the first expansion instance, the method in this embodiment may further include: identifying whether the first expansion instance satisfies the instance expansion request; if the first expansion instance does not satisfy the instance expansion request, then generating an expansion failure message corresponding to the instance expansion request. The specific implementation method and effect of the above steps in this embodiment are similar to the generation method and effect of the "expansion failure message" in the above embodiment, and can be referred to the above description for details, which will not be repeated here.
[0129] In other instances, the private pool strategy can not only restrict the use of only the first type of private resources for instance expansion operations, but also restrict the use of both the first and second types of private resources for instance expansion operations. In this case, the available resources corresponding to the private pool strategy can include both the first and second types of private resources, wherein the priority of the first type of private resources can be higher than that of the second type of private resources.
[0130] At this point, the instance scaling operation based on the scaling strategy and at least one type of available resources may include: if the scaling strategy is a private pool strategy, identifying whether a specified private pool corresponding to the instance scaling request exists; if a specified private pool corresponding to the instance scaling request exists, using a first type of private resource to perform the instance scaling operation to obtain a first scaling instance. After obtaining the first scaling instance, it is possible to identify whether the scaling effect meets the requirements corresponding to the instance scaling request based on the obtained first scaling instance. At this point, the method in this embodiment may further include: if the first scaling instance meets the instance scaling request, generating a scaling completion prompt message corresponding to the instance scaling request; or, if the first scaling instance does not meet the instance scaling request, using a second type of private resource to perform the instance scaling operation to obtain a second scaling instance.
[0131] Correspondingly, if the identification result indicates that there is no designated private pool corresponding to the instance expansion request, the second type of private resources can be used to perform the instance expansion operation to obtain the first expansion instance. Furthermore, after obtaining the first expansion instance, it is possible to identify whether the expansion effect meets the requirements corresponding to the instance expansion request. In this case, the method in this embodiment may further include: if the first expansion instance meets the instance expansion request, it indicates that the instance expansion operation has been completed; or, if the first expansion instance does not meet the instance expansion request, an expansion failure message corresponding to the instance expansion request can be generated.
[0132] In this embodiment, when the expansion strategy is a private pool strategy, by identifying whether a designated private pool corresponding to the instance expansion request exists, if a designated private pool corresponding to the instance expansion request exists, the first type of private resources are used to perform the instance expansion operation, thereby obtaining the first expanded instance; if no designated private pool corresponding to the instance expansion request exists, expansion failure prompt information corresponding to the instance expansion request is generated. This effectively ensures that stable instance expansion operations can be performed using the first type of private resources provided by the designated private pool in combination with the private pool strategy, thereby ensuring the quality and effect of the instance expansion operation.
[0133] Based on the above embodiments, the scaling strategy can include any one of the following: private pool priority strategy, private pool strategy, public pool priority strategy, and public pool strategy. This embodiment provides an implementation method for instance scaling operation based on public pool priority strategy. In this case, the instance scaling operation based on the scaling strategy and at least one type of available resources can include: when the scaling strategy is public pool priority strategy, using public resources to perform instance scaling operation to obtain a first scaling instance.
[0134] When the expansion strategy is a public pool priority strategy, since the available resources corresponding to the public pool priority strategy include at least one type of private resources, a second type of private resources, and public resources, and since the priority of public resources included in the available resources is higher than the priority of other types of resources, the public resources can be used to expand the instance. Specifically, idle and unoccupied public resources can be used to expand the instance, thereby obtaining the first expanded instance.
[0135] Furthermore, after obtaining the first expansion instance, the method in this embodiment may further include: identifying whether the first expansion instance satisfies the instance expansion request; if the first expansion instance satisfies the instance expansion request, generating an expansion completion prompt message corresponding to the instance expansion request; or, if the first expansion instance does not satisfy the instance expansion request, using the first type of private resources to perform instance expansion operation to obtain a second expansion instance.
[0136] Specifically, the implementation method and effect of the above steps in this embodiment are similar to the implementation method and effect of the method steps executed "after obtaining the first expansion instance" in the above embodiment. For details, please refer to the above description, which will not be repeated here.
[0137] Furthermore, after obtaining the second expansion instance, the method in this embodiment may further include: identifying whether the sum of the first and second expansion instances satisfies the instance expansion request; if the sum of the first instances satisfies the instance expansion request, generating an expansion completion prompt message corresponding to the instance expansion request; or, if the sum of the first instances does not satisfy the instance expansion request, using the second type of resources to perform instance expansion operations to obtain a third expansion instance.
[0138] Specifically, the implementation method and effect of the above steps in this embodiment are similar to the implementation method and effect of the method steps executed "after obtaining the second expansion instance" in the above embodiment. For details, please refer to the above description, which will not be repeated here.
[0139] In this embodiment, when the expansion strategy is a public pool priority strategy, public resources can be used first to expand the instance and obtain the first expanded instance. This effectively ensures that stable instance expansion operations can be performed for different types of resources in the specified private pool, the unspecified private pool, and the public pool, combined with the public pool priority strategy, thereby ensuring the quality and effect of the instance expansion operation.
[0140] Based on the above embodiments, the scaling strategy can include any one of the following: private pool priority strategy, private pool strategy, public pool priority strategy, and public pool strategy. This embodiment provides an implementation method for instance scaling operation based on public pool strategy. In this case, the instance scaling operation based on the scaling strategy and at least one type of available resources can include: when the scaling strategy is public pool strategy, using public resources to perform instance scaling operation to obtain a first scaling instance.
[0141] When the expansion strategy is a public pool strategy, since the available resources of at least one type corresponding to the public pool strategy include public resources, the instance expansion operation can be performed directly using public resources. Specifically, idle public resources or unoccupied public resources can be used to expand the instance, thus obtaining the first expanded instance.
[0142] Furthermore, after obtaining the first expansion instance, the method in this embodiment may further include: identifying whether the first expansion instance satisfies the instance expansion request; if the first expansion instance does not satisfy the instance expansion request, then generating expansion failure prompt information corresponding to the instance expansion request.
[0143] Specifically, the implementation method and effect of the above steps in this embodiment are similar to the implementation method and effect of the method steps to be executed after "expansion strategy is private pool strategy" in the above embodiment. For details, please refer to the above statement, and it will not be repeated here.
[0144] In this embodiment, when the expansion strategy is a public pool strategy, the instance expansion operation is performed using public resources to obtain the first expanded instance. This effectively ensures that stable instance expansion operations can be performed using resources in the public pool in combination with the public pool strategy, thereby ensuring the quality and effect of the instance expansion operation.
[0145] Figure 5 A flowchart illustrating a control method for another example provided in an exemplary embodiment of this application; based on any of the above embodiments, refer to the appendix. Figure 5 As shown, after generating the expansion failure message corresponding to the instance expansion request, the method in this embodiment can also retry the instance expansion operation after the instance expansion fails. In this case, the method can further include:
[0146] Step S501: Based on the expansion strategy, determine at least one type of unplanned resource corresponding to the instance expansion request, wherein the type of unplanned resource includes at least one of the following: a first type of unplanned resource in a designated private pool, a second type of unplanned resource in an undesignated private pool, or an unplanned public resource in a public pool.
[0147] When generating a scaling failure message corresponding to an instance scaling request, it indicates that the instance scaling operation has failed. In order to ensure the stability and reliability of the system operation, the instance scaling operation can be attempted again based on the instance scaling request. At this time, at least one type of unplanned resource corresponding to the instance scaling request can be identified based on the scaling strategy. Unplanned resources can refer to other available resources that are not within the resource range defined by at least one type of available type and are capable of performing instance scaling operations.
[0148] Different expansion strategies can correspond to different types of unplanned resources. Specifically, the types of unplanned resources can include at least one of the following: first-type unplanned resources in a designated private pool, second-type unplanned resources in an unspecified private pool, and unplanned public resources in a public pool. The first-type unplanned resources can be available or idle private resources in a designated private pool that have not participated in instance expansion operations. The second-type unplanned resources can be available or idle private resources in a private pool that have not participated in instance expansion operations. The unplanned public resources can be available or idle public resources in a public pool that have not participated in instance expansion operations.
[0149] Example 1: Based on the scaling strategy, determining at least one type of unplanned resource corresponding to the instance scaling request may include: when the scaling strategy is a private pool priority strategy, determining at least one type of unplanned resource corresponding to the instance scaling request may include a first type of unplanned resource, a second type of unplanned resource, and unplanned public resources, wherein the first type of unplanned resource has a higher priority than the second type of unplanned resource, and the second type of unplanned resource has a higher priority than the unplanned public resource.
[0150] Example 2: Based on the scaling strategy, determining at least one type of unplanned resource corresponding to the instance scaling request may include: when the scaling strategy is a private pool strategy, determining at least one type of unplanned resource corresponding to the instance scaling request may include the first type of unplanned resource.
[0151] Example 3: Based on the expansion strategy, determining at least one type of unplanned resource corresponding to the instance expansion request may include: when the expansion strategy is a public pool priority strategy, determining at least one type of available resource includes a first type of unplanned resource, a second type of unplanned resource, and unplanned public resources, wherein the priority of public resources is higher than the priority of the first type of private resources, and the priority of the first type of private resources is higher than the priority of the second type of private resources.
[0152] Example 4: Based on the expansion strategy, determining at least one type of unplanned resource corresponding to the instance expansion request may include: when the expansion strategy is a public pool strategy, determining at least one type of available resource includes unplanned public resources. This effectively achieves flexible and reliable determination of at least one type of unplanned resource corresponding to the real-time expansion request.
[0153] Step S502: Perform a resizing operation on the instance based on the scaling strategy and at least one type of unplanned resources.
[0154] After acquiring at least one type of unplanned resource, the instance can be scaled up again based on the scaling strategy and at least one type of unplanned resource. This improves the success rate of instance scaling up to a certain extent, thereby ensuring the stability and reliability of the system operation.
[0155] In some instances, the rescaling operation of an instance based on a scaling strategy and at least one type of unplanned resources may include: if the scaling strategy is a private pool priority strategy, then the first type of unplanned resources can be used first to rescale the instance and obtain a first rescaling instance.
[0156] Then it can be identified whether the first resizing instance satisfies the instance expansion request. If the first resizing instance satisfies the instance expansion request, there is no need to use other types of unplanned resources to perform the instance resizing operation. If the first resizing instance does not satisfy the instance expansion request, the second unplanned resources can be used to perform the instance resizing operation to obtain the second resizing instance.
[0157] Then, it can be determined whether the sum of the first and second resizing instances satisfies the instance expansion request. If the sum of the resizing instances satisfies the instance expansion request, there is no need to use other types of unplanned resources to perform instance expansion operations. If the sum of the resizing instances does not satisfy the instance expansion request, unplanned public resources can be used to perform instance expansion operations to obtain a third resizing instance.
[0158] Then, it can be identified whether the total number of resizing instances consisting of the first, second, and third resizing instances satisfies the instance expansion request. If the total number of resizing instances satisfies the instance expansion request, it means that the instance expansion operation has been completed; if the total number of resizing instances does not satisfy the instance expansion request, an expansion failure message corresponding to the instance expansion request is generated.
[0159] In other instances, the resizing operation of an instance based on a scaling strategy and at least one type of unplanned resources may include: if the scaling strategy is a private pool strategy, then the first type of unplanned resources can be used to rescale the instance to obtain a first rescaled instance.
[0160] Then it can be identified whether the first instance to be scaled up satisfies the instance scaling request. If the first instance to be scaled up satisfies the instance scaling request, it means that the instance scaling up operation has been completed; if the first instance to be scaled up does not satisfy the instance scaling request, a scaling up failure message corresponding to the instance scaling request is generated.
[0161] In other instances, the rescaling operation of an instance based on a scaling strategy and at least one type of unplanned resources may include: if the scaling strategy is a public pool priority strategy, then unplanned public resources can be used first to perform the rescaling operation of the instance to obtain the first rescaling instance.
[0162] Then it can be identified whether the first resizing instance satisfies the instance expansion request. If the first resizing instance satisfies the instance expansion request, there is no need to use other types of unplanned resources to perform the instance resizing operation. If the first resizing instance does not satisfy the instance expansion request, the first unplanned resources can be used to perform the instance resizing operation to obtain the second resizing instance.
[0163] Then, it can be determined whether the sum of the first and second resizing instances satisfies the instance expansion request. If the sum of the resizing instances satisfies the instance expansion request, there is no need to use other types of unplanned resources to perform instance expansion operations. If the sum of the resizing instances does not satisfy the instance expansion request, the second unplanned resources can be used to perform instance expansion operations to obtain a third resizing instance.
[0164] Then, it can be identified whether the total number of resizing instances consisting of the first, second, and third resizing instances satisfies the instance expansion request. If the total number of resizing instances satisfies the instance expansion request, it means that the instance expansion operation has been completed; if the total number of resizing instances does not satisfy the instance expansion request, an expansion failure message corresponding to the instance expansion request is generated.
[0165] In other instances, the rescaling operation of an instance based on a scaling strategy and at least one type of unplanned resources may include: if the scaling strategy is a public pool strategy, then unplanned public resources can be used to rescale the instance to obtain a first rescaled instance.
[0166] Then it can be identified whether the first instance to be scaled up satisfies the instance scaling request. If the first instance to be scaled up satisfies the instance scaling request, it means that the instance scaling up operation has been completed; if the first instance to be scaled up does not satisfy the instance scaling request, a scaling up failure message corresponding to the instance scaling request is generated.
[0167] In this embodiment, after generating the expansion failure prompt information corresponding to the instance expansion request, at least one type of unplanned resources corresponding to the instance expansion request are determined based on the expansion strategy. Specifically, the instance can be re-expanded based on different expansion strategies and at least one type of unplanned resources corresponding to the expansion strategy. This ensures the quality and effect of the instance re-expansion operation to a certain extent and improves the success rate of the instance re-expansion operation. After obtaining the expanded instance, corresponding data processing operations can be performed based on the expanded instance, further improving the stability and reliability of the system operation.
[0168] Figure 6 This is a flowchart illustrating an exemplary embodiment of the present application for a method of scaling down an instance; based on any of the above embodiments, the instance control method provided in this application can not only realize instance expansion operations but also instance scaling down operations. In this case, the method in this embodiment may further include:
[0169] Step S601: In response to the obtained instance scaling-down request, determine the scaling-down strategy corresponding to the instance scaling-down request.
[0170] When there is a need to scale down an instance, the instance's scaling-down device can obtain the instance scaling-down request. In some instances, the instance scaling-down request can be determined by the client. In this case, before determining the scaling-down strategy corresponding to the instance scaling-down request, the method in this embodiment may include: determining the client that is connected to the instance's scaling-down device, and obtaining the instance scaling-down request actively or passively through the client. The instance scaling-down request can be generated based on human-computer interaction.
[0171] In other instances, instance scaling-down requests can be automatically generated based on the system's running status. In this case, before determining the scaling-down strategy corresponding to the instance scaling-down request, the method in this embodiment may include: obtaining the system's running status parameters, wherein the running status parameters may include at least one of the following: CPU processor resource utilization, memory resource utilization, storage resource occupancy, etc.; when the running status parameters meet a preset scaling-down threshold, an instance scaling-down request is actively generated to ensure the stability and reliability of the system operation.
[0172] In some instances, instance scaling-down requests can be generated not only automatically based on the system's running status but also based on user-inputted scaling-down task information. In this case, before determining the scaling-down strategy corresponding to the instance scaling-down request, the method in this embodiment may include: obtaining user-configured scaling-down task information, which may include at least the time period for which scaling-down operations are required or the application scenario for which scaling-down operations are required; and flexibly performing instance scaling-down operations based on the scaling-down task information, i.e., allowing instance scaling-down operations when the scenario or conditions defined by the scaling-down task information are met; and not requiring instance scaling-down operations when the scenario or conditions defined by the scaling-down task information are not met. This achieves flexible and reliable instance scaling-down operations.
[0173] After receiving an instance scaling-down request, since different scaling-down strategies can be used to implement instance scaling-down operations in different application scenarios, in order to ensure the quality and effectiveness of the instance scaling-down operation, the scaling-down strategy corresponding to the instance scaling-down request can be determined first. Specifically, the scaling-down strategy can be determined based on pre-set scaling-down configuration information. In this case, determining the scaling-down strategy corresponding to the instance scaling-down request may include: obtaining the scaling-down configuration information corresponding to the instance scaling-down request. The scaling-down configuration information can be obtained through human-computer interaction, or it can be information pre-configured by the user and stored in a preset area or preset device. In this case, the scaling-down configuration information can be obtained by accessing the preset area or preset device. Then, the scaling-down strategy corresponding to the instance scaling-down request can be determined based on the scaling-down configuration information.
[0174] In addition, the scaling-down strategy can include at least one of the following: private pool priority strategy and public pool priority strategy. The private pool priority strategy mentioned above can refer to the strategy of using the private resources of a specified private pool to perform instance scaling-down operations in the application scenario of instance scaling-down. When the scaling-down requirements are not met, the private resources in the private pool can be used to perform instance scaling-down operations. When the scaling-down requirements are not met again, the public resources in the public pool can be used to perform instance scaling-down operations.
[0175] Similarly, the public pool priority strategy can refer to a strategy that prioritizes using public resources in the public pool to perform instance scaling down in application scenarios. If the scaling down requirement is not met, private resources in a designated private pool can then be used to perform instance scaling down. If the scaling down requirement is not met again, private resources in the private pool can then be used to perform instance scaling down.
[0176] It's important to note that the scaling-down strategy can be determined through scaling-down configuration information. This configuration information is determined by configuring parameters in the scaling configuration interface used to implement instance scaling operations. Specifically, two parameters can be added to the scaling configuration interface:
[0177] PrivatePoolFirst: This is used to identify the private pool priority strategy, which specifically prioritizes removing instances belonging to the private pool.
[0178] PublicPoolFirst: Used to identify the priority strategy for public pool resources, specifically, instances belonging to the public pool can be removed first.
[0179] For scaling down strategies, they can include not only the strategy information related to the type of available resources (i.e., the private pool priority strategy and public pool priority strategy included in the above description), but also other scaling down configuration information. For example, users can also configure priorities for different availability zones (which may refer to the specified private pool, unspecified private pool, and public pool included in the above description). Furthermore, users can also set priorities for resources of different specifications and configure instance delivery strategies such as cost minimization strategies and balancing between availability zones. Those skilled in the art can flexibly configure and adjust scaling down strategies according to application scenarios or application requirements.
[0180] Step S602: Based on the scaling-down strategy, determine at least one type of available scaling-down resources. The types of available scaling-down resources include at least one of the following: private resources in a private pool and public resources in a public pool.
[0181] Since different scaling-down strategies correspond to different types of available scaling-down resources, after determining the scaling-down strategy corresponding to the instance scaling-down request, at least one type of available scaling-down resources can be determined based on the scaling-down strategy. The types of available scaling-down resources can include at least one of the following: a first type of private resource in a specified private pool, a second type of private resource in an unspecified private pool, or public resources in a public pool. It is important to note that available scaling-down resources refer to the resources that can be utilized when performing a scaling-down operation based on a scaling-down strategy. This is different from the actual resources used when performing a scaling-down operation based on a scaling-down strategy, where the actual resources used are at least a portion of the available scaling-down resources.
[0182] In this context, at least one type of available scaling resources can be determined by analyzing and processing the scaling strategy based on a pre-trained neural network model. In this case, determining at least one type of available scaling resources based on the scaling strategy may include: obtaining a pre-trained neural network model; inputting the scaling strategy into the neural network model to obtain at least one type of available scaling resources corresponding to the scaling strategy output by the neural network model.
[0183] In other instances, at least one type of available scaling resources can be determined not only by analyzing and processing the scaling strategy based on a pre-trained neural network, but also through a pre-trained mapping relationship. In this case, determining at least one type of available scaling resources based on the scaling strategy can include: when the scaling strategy is a private pool priority strategy, determining at least one type of available scaling resources includes: private resources and public resources, wherein the priority of private resources is higher than that of public resources; or, when the scaling strategy is a public pool priority strategy, determining at least one type of available scaling resources includes: private resources and public resources, wherein the priority of public resources is higher than that of private resources.
[0184] Example 1: When the scaling down strategy is a private pool priority strategy, it can be determined that the available resources for scaling down corresponding to the private pool priority strategy can include both private resources and public resources. When the priority of private resources is higher than that of public resources, the actual resources used for scaling down based on the private pool priority strategy can be private resources first; or, the actual resources used can be both private resources and public resources.
[0185] Example 2: When the scaling down strategy is a public pool priority strategy, it can be determined that at least one type of available scaling down resources includes private resources and public resources, with public resources having a higher priority than private resources. The actual resources used for scaling down based on the public pool priority strategy can be public resources first; or, the actual resources used can be both public and private resources.
[0186] Step S603: Perform a scaling-down operation on the instance based on the scaling-down strategy and at least one type of available scaling-down resources.
[0187] After obtaining the scaling-down strategy and at least one type of available scaling-down resources, instance scaling-down operations can be performed based on the scaling-down strategy and at least one type of available scaling-down resources. In some instances, instance scaling-down operations can be implemented through a preset controller. In this case, performing instance scaling-down operations based on the scaling-down strategy and at least one type of available scaling-down resources can include: inputting the scaling-down strategy and at least one type of available scaling-down resources into the preset controller, so that the preset controller can perform instance scaling-down operations based on the scaling-down strategy and at least one type of available scaling-down resources, and can obtain the scaling-down operation results output by the preset controller. The actual resources used for the instance scaling-down operation can be flexibly adjusted within the range defined by at least one type of available scaling-down resources based on the state of the instance scaling-down operation, thereby ensuring the stability and reliability of the instance scaling-down operation to a certain extent.
[0188] It should be noted that the instance scaling method implemented in the embodiments of this application is capable of the above-mentioned Figure 2 This method is implemented based on the instance scaling-up method in the corresponding embodiments, meaning that the instance scaling-down method implemented in this application embodiment can be compared with the above-mentioned... Figure 2 The instance scaling method implemented in the corresponding embodiment can be deployed together in an application scenario. Specifically, the instance scaling method and the instance shrinking method can be run separately, or they can be run in combination. This achieves an elastic scaling solution for instances. Those skilled in the art can flexibly configure and adjust the technical solutions of the instance shrinking method and the instance scaling method according to the specific application scenario or application requirements.
[0189] In this embodiment, in response to the obtained instance scaling-down request, a scaling-down strategy corresponding to the instance scaling-down request is determined. Then, based on the scaling-down strategy, at least one type of available scaling-down resources is determined, and the instance scaling-down operation is performed based on the scaling-down strategy and at least one type of available scaling-down resources. Since the types of available scaling-down resources include at least one of the following: private resources in a private pool and public resources in a public pool, the actual resources used for the instance scaling-down operation can be flexibly adjusted within the range defined by at least one type of available scaling-down resources based on the state of the instance scaling-down operation. This effectively realizes flexible and reliable elastic scaling operations for cloud resources according to specific actual scenarios. This not only ensures the quality and effect of instance scaling-down operations to a certain extent, but also helps to improve resource utilization, further ensuring the practicality of the method.
[0190] Figure 7 A flowchart illustrating a method for scaling down an example of another exemplary embodiment of this application; see attached diagram. Figure 7As shown, this embodiment provides a method for scaling down an instance. The execution subject of this method is an instance scaling down device, which can be implemented as software or a combination of software and hardware. When the instance scaling down device is implemented as hardware, it can be various electronic devices capable of performing instance scaling down operations, including but not limited to personal computers, servers, etc. When the instance scaling down device is implemented as software, it can be installed in the electronic devices listed above. Specifically, the instance scaling down method provided in this embodiment may include:
[0191] Step S701: In response to the obtained instance scaling-down request, determine the scaling-down strategy corresponding to the instance scaling-down request.
[0192] Step S702: Based on the scaling-down strategy, determine at least one type of available scaling-down resources. The types of available scaling-down resources include at least one of the following: private resources in a private pool and public resources in a public pool.
[0193] Step S703: Perform a scaling-down operation on the instance based on the scaling-down strategy and at least one type of available scaling-down resources.
[0194] Specifically, the implementation method and effect of the above steps in this embodiment are the same as those described above. Figure 6 The specific implementation methods and effects of the corresponding embodiments are similar, and can be referred to the above description for details, which will not be repeated here.
[0195] The instance scaling-down method provided in this embodiment, in response to a received instance scaling-down request, determines a scaling-down strategy corresponding to the instance scaling-down request; then, based on the scaling-down strategy, it determines at least one type of available scaling-down resources, and performs instance scaling-down operations based on the scaling-down strategy and at least one type of available scaling-down resources. Since the types of available scaling-down resources include at least one of the following: private resources in a private pool and public resources in a public pool, the actual resources used for the instance scaling-down operation can be flexibly adjusted within the range defined by at least one type of available scaling-down resources based on the state of the instance scaling-down operation. This effectively realizes flexible and reliable elastic scaling operations for cloud resources according to specific actual scenarios. This not only ensures the quality and effect of instance scaling-down operations to a certain extent, but also helps to improve resource utilization, further ensuring the practicality of the method.
[0196] Figure 8 A schematic diagram illustrating the process of performing instance scaling operations based on a scaling strategy and at least one type of available scaling resources, as provided in an exemplary embodiment of this application; Figure 8aA schematic diagram illustrating an exemplary embodiment of this application, showing the principle of instance scaling operation based on the scaling-down strategy and at least one type of available scaling-down resources; based on the above embodiment, refer to the appendix. Figure 8 , Figure 8a As shown, instance scaling down can be implemented not only through a preset controller, but also by identifying the resource information type corresponding to the created instance. In this case, instance scaling down based on the scaling down strategy and at least one type of available scaling resources can include:
[0197] Step S801: Obtain the resource information type corresponding to the created instance.
[0198] Since created instances can be generated based on different types of resources, these different types of resources can include at least one of the following: a first type of private resource in a specified private pool, a second type of private resource in an unspecified private pool, or a public resource in a public pool. To stably perform instance scaling-down operations based on different scaling-down strategies, the resource information type corresponding to the created instance can be obtained. This resource information type can be identified by analyzing preset fields corresponding to the created instance. Obtaining the resource information type can include: determining the preset fields that identify the resource information type corresponding to the created instance; and determining the resource information type based on the preset fields. For example, if the preset field is the first field, the resource information type is determined to be a private resource; if the preset field is the second field, the resource information type is determined to be a public resource. This ensures the accuracy and reliability of obtaining the resource information type corresponding to the created instance.
[0199] Step S802: Perform a scaling-down operation on the instance based on the scaling-down strategy, resource information type, and at least one type of available scaling-down resources.
[0200] After obtaining the scaling-down strategy, resource information type, and at least one type of available scaling-down resources, the instance can be scaled down based on the scaling-down strategy, resource information type, and at least one type of available scaling-down resources, thereby obtaining the scaled-down instance.
[0201] In some instances, instance scaling down can be achieved using a pre-trained instance scaling down model. In this case, the instance scaling down operation based on the scaling down strategy, resource information type, and at least one type of available scaling down resource may include: obtaining the pre-trained instance scaling down model, inputting the scaling down strategy, resource information type, and at least one type of available scaling down resource into the instance scaling down model to perform the instance scaling down operation, and obtaining the scaled-down instance output by the instance scaling down model. The scaled-down instance may refer to the remaining created instances obtained after the instance scaling down operation.
[0202] In other instances, instance scaling down can be achieved not only through a pre-trained instance scaling down model, but also based on the priority of available scaling down resources corresponding to the scaling down strategy. In this case, instance scaling down based on the scaling down strategy, resource information type, and at least one type of available scaling down resource can include: when the scaling down strategy is a private pool priority strategy, determining the first type of instance to be scaled down from the created instances based on the resource information type; and performing scaling down operation on the first type of instance to be scaled down based on the scaling down strategy.
[0203] In the case of a private pool priority strategy, since the private pool priority strategy corresponds to at least one type of available resources for scaling up, including both private and public resources, and since the priority of private resources among the available resources for scaling up is higher than that of public resources, the scaling up operation of instances can be prioritized based on private resources. Specifically, the first type of instance to be scaled up can be determined from the created instances based on the resource information type corresponding to the created instances. Then, the scaling up operation of the first type of instance to be scaled up can be performed based on the scaling up strategy. This achieves the goal of prioritizing the scaling up operation of instances created by private resources based on the private pool priority strategy.
[0204] For example, the created instances include created instance 1, created instance 2, created instance 3, created instance 4, and created instance 5, etc. Created instance 1, created instance 2, and created instance 5 were created using private resources, while created instance 3 and created instance 4 were created using public resources. When the scaling-down strategy is a private pool priority strategy, since private resources have a higher priority than public resources, it is necessary to first determine the first type of instances to be scaled down, created using private resources. This first type of instances to be scaled down can include: created instance 1, created instance 2, and created instance 5.
[0205] After identifying the first type of instances to be scaled down created by private resources, the scaling-down operation can be performed on these instances. Specifically, a subset of the instances to be scaled down can be removed, for example, instances 1 and 5 can be removed; or, all instances in the first type can be removed, for example, instances 1, 2, and 5 can be removed. This achieves a stable and flexible implementation of instance scaling-down.
[0206] Furthermore, after performing a scaling-down operation on the first type of instances to be scaled down based on the scaling-down strategy, the method in this embodiment may further include: obtaining the scaled-down instances; if the scaled-down instances do not meet the instance scaling-down request, then determining the second type of instances to be scaled down from the created instances based on the resource information type; and performing a scaling-down operation on the second type of instances to be scaled down based on the scaling-down strategy.
[0207] Specifically, after performing a scaling-down operation on the first type of instances to be scaled down based on the scaling-down strategy, the scaled-down instances can be obtained first. The scaled-down instances refer to the remaining created instances obtained after performing the scaling-down operation on the first type of instances to be scaled down. Specifically, they can be determined by counting the number of instances created before performing the scaling-down operation on the first type of instances to be scaled down and the number of the first type of instances to be scaled down corresponding to the scaling-down operation.
[0208] After obtaining the scaled-down instance, the scaled-down instance and the instance scaling-down request can be analyzed and processed to determine whether the scaled-down instance meets the instance scaling-down request. In some instances, determining whether the scaled-down instance meets the instance scaling-down request can be determined by a pre-trained instance performance evaluation model. In this case, determining whether the scaled-down instance meets the instance scaling-down request can include: inputting the scaled-down instance and the instance scaling-down request into the instance performance evaluation model for analysis and processing, and obtaining the identification result output by the instance performance evaluation model to identify whether the scaled-down instance meets the instance scaling-down request. If the identification result is the first result, it can be determined that the obtained scaled-down instance meets the instance scaling-down request; if the identification result is the second result, it can be determined that the obtained scaled-down instance does not meet the instance scaling-down request.
[0209] If the obtained scaled-down instance satisfies the instance scaling-down request, it indicates that the instance scaling-down operation corresponding to the request has been completed, and no further instance scaling-down operation is needed. A scaling-down completion notification message corresponding to the request can be generated, and scaling-down operations on other types of available resources can be prohibited. Conversely, if the obtained scaled-down instance does not satisfy the request, it indicates that the instance scaling-down operation corresponding to the request has not been completed, and further scaling-down operation is required. Since private resources have higher priority than public resources, if scaling-down operations have already been performed on all first-type instances corresponding to private resources, and the obtained scaled-down instance does not satisfy the request, second-type instances created by public resources can be identified from the created instances based on resource information type. Then, scaling-down operations can be performed on these second-type instances based on the scaling-down strategy, thus stably implementing the re-scaling-down operation.
[0210] Furthermore, after performing the instance scaling-down operation on the second type of instances to be scaled down based on the scaling-down strategy, the method in this embodiment may further include: obtaining the scaled-down instance; if the scaled-down instance does not meet the instance scaling-down request, generating a scaling-down failure message corresponding to the instance scaling-down request, and then displaying the scaling-down failure message so that users can quickly and directly know that the instance scaling-down operation has failed, thereby facilitating users to correct or control the instance scaling-down operation process, which effectively ensures the practicality of the method.
[0211] In this embodiment, by obtaining the resource information type corresponding to the created instance, and then performing the instance scaling-down operation based on the scaling-down strategy, the resource information type, and at least one type of available scaling-down resources, the instance scaling-down operation is effectively guaranteed. When the scaling-down strategy is a private pool priority strategy, the first type of instance to be scaled down with private resources can be scaled down first. If the scaling-down effect does not meet the instance scaling-down request, the second type of instance to be scaled down with public resources can be scaled down subsequently. This effectively realizes flexible and stable instance scaling-down operation based on the private pool priority strategy, thereby ensuring the quality and effect of the instance scaling-down operation.
[0212] Figure 9 A flowchart illustrating an exemplary embodiment of this application for performing instance scaling operations based on a scaling strategy and at least one type of available scaling resources. Figure 2 ; Figure 9aA schematic diagram illustrating an exemplary embodiment of this application, showing the principle of instance scaling operation based on the scaling-down strategy and at least one type of available scaling-down resources; based on the above embodiment, refer to the appendix. Figure 9 , Figure 9a As shown, when the scaling-down strategy is a public pool priority strategy, this embodiment provides a technical solution to prioritize scaling-down operations on instances created from public resources based on the public pool priority strategy. In this case, the scaling-down operation of instances based on the scaling-down strategy, resource information type, and at least one type of available scaling-down resources in this embodiment may include:
[0213] Step S901: When the scaling-down strategy is a public pool priority strategy, determine the first type of instance to be scaled down from the created instances based on the resource information type.
[0214] Step S902: Perform a scaling-down operation on the first type of instances to be scaled down based on the scaling-down strategy.
[0215] Furthermore, after performing a scaling-down operation on the first type of instances to be scaled down based on the scaling-down strategy, the method in this embodiment may include: obtaining the scaled-down instances; if the scaled-down instances do not meet the instance scaling-down request, then determining the second type of instances to be scaled down based on the resource information type from the created instances; and performing a scaling-down operation on the second type of instances to be scaled down based on the scaling-down strategy.
[0216] Specifically, the implementation method and effect of the above steps in this embodiment are the same as those described above. Figure 7 The specific implementation methods and effects of the corresponding embodiments are similar, and can be referred to the above description for details, which will not be repeated here.
[0217] It should be noted that the instance scaling method implemented in the embodiments of this application is capable of the above-mentioned Figure 2 This method is implemented based on the instance scaling-up method in the corresponding embodiments, meaning that the instance scaling-down method implemented in this application embodiment can be compared with the above-mentioned... Figure 2 The instance scaling method implemented in the corresponding embodiment can be deployed together in an application scenario. Specifically, the instance scaling method and the instance shrinking method can be run separately, or they can be run in combination. This achieves an elastic scaling solution for instances. Those skilled in the art can flexibly configure and adjust the technical solutions of the instance shrinking method and the instance scaling method according to the specific application scenario or application requirements.
[0218] In this embodiment, when the scaling-down strategy is a public pool priority strategy, the first type of instances to be scaled down, created from public resources, are identified from the existing instances based on resource information type. Then, the scaling-down operation is performed on the first type of instances to be scaled down based on the scaling-down strategy. This effectively ensures that, when the scaling-down strategy is a public pool priority strategy, the first type of instances to be scaled down from public resources can be scaled down first. If the scaling-down effect does not meet the instance scaling-down request, the second type of instances to be scaled down from private resources can be scaled down subsequently. This effectively realizes flexible and stable instance scaling-down operations based on the public pool priority strategy, thereby ensuring the quality and effect of instance scaling-down operations.
[0219] Figure 10 A schematic diagram of the structure of a control device for an exemplary embodiment of this application; see attached drawing. Figure 10 As shown, this embodiment provides a control device for an instance, which is used to perform the above-described... Figure 2 The control method for the example shown may include:
[0220] The first acquisition module 11 is used to determine the expansion strategy corresponding to the acquired instance expansion request in response to the acquired instance expansion request.
[0221] The first determining module 12 is used to determine at least one type of available resources based on the expansion strategy. The types of available resources include at least one of the following: a first type of private resource in a specified private pool, a second type of private resource in an unspecified private pool, and a public resource in a public pool.
[0222] The first processing module 13 is used to perform instance expansion operations based on the expansion strategy and at least one type of available resources.
[0223] The control device for the example in this embodiment can also perform the above-described actions. Figures 1-6 The description of the embodiments shown is for reference only, and will not be elaborated upon here.
[0224] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 11, 12, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0225] Figure 11 A schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application; as shown Figure 11 As shown, this embodiment provides an electronic device for performing the above-described... Figure 2 The control method of the example shown, wherein the electronic device may include: memory 24 and processor 25.
[0226] Memory 24 is used to store computer programs and can be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device, data structures, contact data, phone book data, messages, pictures, videos, etc.
[0227] The processor 25, coupled to the memory 24, is configured to execute a computer program in the memory 24 for: in response to a received instance expansion request, determining an expansion strategy corresponding to the instance expansion request; based on the expansion strategy, determining at least one type of available resource, the type of available resource including at least one of the following: a first type of private resource in a specified private pool, a second type of private resource in an unspecified private pool, and a public resource in a public pool; and performing an instance expansion operation based on the expansion strategy and at least one type of available resource.
[0228] In some instances, when processor 25 determines at least one type of available resource based on an expansion strategy, processor 25 performs the following: If the expansion strategy is a private pool priority strategy, determine that at least one type of available resource includes a first type of private resource, a second type of private resource, and public resources, wherein the priority of the first type of private resource is higher than the priority of the second type of private resource, and the priority of the second type of private resource is higher than the priority of public resources; or, if the expansion strategy is a private pool strategy, determine that at least one type of available resource includes the first type of private resource; or, if the expansion strategy is a public pool priority strategy, determine that at least one type of available resource includes the first type of private resource, a second type of private resource, and public resources, wherein the priority of public resources is higher than the priority of the first type of private resource, and the priority of the first type of private resource is higher than the priority of the second type of private resource; or, if the expansion strategy is a public pool strategy, determine that at least one type of available resource includes public resources.
[0229] In some instances, when processor 25 performs an instance scaling operation based on a scaling strategy and at least one type of available resources, processor 25 is configured to: if the scaling strategy is a private pool priority strategy, identify whether there is a specified private pool corresponding to the instance scaling request; if there is a specified private pool corresponding to the instance scaling request, perform the instance scaling operation using the first type of private resources to obtain a first scaled instance.
[0230] In some instances, after obtaining the first expansion instance, the processor 25 in this embodiment is used to perform the following: if the first expansion instance satisfies the instance expansion request, then generate an expansion completion prompt message corresponding to the instance expansion request; or, if the first expansion instance does not satisfy the instance expansion request, then use the second type of private resources to perform the instance expansion operation to obtain the second expansion instance.
[0231] In some instances, after obtaining the second expansion instance, the processor 25 in this embodiment is used to perform: identifying whether the sum of the first and second expansion instances satisfies the instance expansion request; if the sum of the first instances satisfies the instance expansion request, generating an expansion completion prompt message corresponding to the instance expansion request; or, if the sum of the first instances does not satisfy the instance expansion request, using public resources to perform instance expansion operations to obtain a third expansion instance.
[0232] In some instances, after obtaining the third expansion instance, the processor 25 in this embodiment is used to perform: identifying whether the sum of the second instances consisting of the first expansion instance, the second expansion instance, and the third expansion instance satisfies the instance expansion request; if the sum of the second instances does not satisfy the instance expansion request, then generating an expansion failure prompt message corresponding to the instance expansion request.
[0233] In some instances, when processor 25 performs an instance scaling operation based on a scaling strategy and at least one type of available resources, processor 25 is configured to: if the scaling strategy is a private pool strategy, identify whether a specified private pool corresponding to the instance scaling request exists; if a specified private pool corresponding to the instance scaling request exists, perform the instance scaling operation using a first type of private resources to obtain a first scaling instance; if no specified private pool corresponding to the instance scaling request exists, generate a scaling failure message corresponding to the instance scaling request.
[0234] In some instances, after obtaining the first expansion instance, the processor 25 in this embodiment is used to perform: identifying whether the first expansion instance satisfies the instance expansion request; if the first expansion instance does not satisfy the instance expansion request, then generating expansion failure prompt information corresponding to the instance expansion request.
[0235] In some instances, when processor 25 performs an instance scaling operation based on a scaling strategy and at least one type of available resources, processor 25 is configured to perform the following: if the scaling strategy is a public pool priority strategy, perform the instance scaling operation using public resources to obtain a first scaled instance.
[0236] In some instances, after obtaining the first expansion instance, the processor 25 in this embodiment is used to perform: identifying whether the first expansion instance satisfies the instance expansion request; if the first expansion instance satisfies the instance expansion request, then generating an expansion completion prompt message corresponding to the instance expansion request; or, if the first expansion instance does not satisfy the instance expansion request, then using the first type of private resources to perform the instance expansion operation to obtain the second expansion instance.
[0237] In some instances, after obtaining the second expansion instance, the processor 25 in this embodiment is used to perform: identifying whether the sum of the first and second expansion instances satisfies the instance expansion request; if the sum of the first instances satisfies the instance expansion request, generating an expansion completion prompt message corresponding to the instance expansion request; or, if the sum of the first instances does not satisfy the instance expansion request, using the second type of resources to perform instance expansion operations to obtain the third expansion instance.
[0238] In some instances, when processor 25 performs an instance scaling operation based on a scaling strategy and at least one type of available resources, processor 25 is configured to perform the following: if the scaling strategy is a public pool strategy, perform the instance scaling operation using public resources to obtain a first scaled instance.
[0239] In some instances, after obtaining the first expansion instance, the processor 25 in this embodiment is used to perform: identifying whether the first expansion instance satisfies the instance expansion request; if the first expansion instance does not satisfy the instance expansion request, then generating expansion failure prompt information corresponding to the instance expansion request.
[0240] In some instances, after generating a scaling failure message corresponding to the instance scaling request, the processor 25 in this embodiment is used to perform: based on the scaling strategy, determining at least one type of unplanned resources corresponding to the instance scaling request, wherein the type of unplanned resources includes at least one of the following: a first type of unplanned resources in a designated private pool, a second type of unplanned resources in an undesignated private pool, and unplanned public resources in a public pool; and performing a rescaling operation on the instance based on the scaling strategy and at least one type of unplanned resources.
[0241] In some instances, after an instance is scaled up based on a scaling strategy and at least one type of available resources, the processor 25 in this embodiment is configured to perform the following: obtain the scaled-up instance after the instance scaling up operation; determine the type of actual resources used by the scaled-up instance; and associate the scaled-up instance with the type of actual resources used.
[0242] In some instances, the processor 25 in this embodiment is further configured to perform: in response to an acquired instance scaling-down request, determine a scaling-down strategy corresponding to the instance scaling-down request; based on the scaling-down strategy, determine at least one type of available scaling-down resources, the type of available scaling-down resources including at least one of the following: private resources in a private pool, public resources in a public pool; and perform instance scaling-down operation based on the scaling-down strategy and at least one type of available scaling-down resources.
[0243] Furthermore, such as Figure 11 As shown, the electronic device also includes other components such as a communication component 26, a display 27, a power supply component 28, and an audio component 29. Figure 11 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 11 The components shown. Additionally... Figure 11 The components within the center frame are optional, not mandatory, and their specific requirements depend on the product form of the work node. In this embodiment, the work node can be a terminal device such as a desktop computer, laptop computer, smartphone, or IoT device, or a server-side device such as a conventional server, cloud server, or server array. If the work node in this embodiment is implemented as a terminal device such as a desktop computer, laptop computer, or smartphone, it may include... Figure 11 The components within the center frame; if the working node in this embodiment is implemented as a server-side device such as a conventional server, cloud server, or server array, it may not include... Figure 11 The component within the center frame.
[0244] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0245] The aforementioned communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.
[0246] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.
[0247] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0248] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0249] Figure 12 A schematic diagram of the structure of a reduction device provided in an exemplary application embodiment of this application; see attached drawing. Figure 12 As shown, this embodiment provides an example of a shrinkage device, which is used to perform the above-described... Figure 7 The scaling-down method shown in the example may include:
[0250] The second acquisition module 31 is used to determine the scaling-down strategy corresponding to the acquired instance scaling-down request in response to the instance scaling-down request.
[0251] The second determining module 32 is used to determine at least one type of shrinking resource based on the shrinking strategy. The type of shrinking resource includes at least one of the following: private resources in a private pool and public resources in a public pool.
[0252] The second processing module 33 is used to perform instance scaling operations based on a scaling strategy and at least one type of scaling resource.
[0253] The shrinkage device in the example of this embodiment may also include the above-described components. Figures 7-9 The description of the embodiments shown is for reference only, and will not be elaborated upon here.
[0254] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 11, 12, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0255] Figure 13 A schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application; as shown Figure 13 As shown, this embodiment provides an electronic device for performing the above-described... Figure 7 The illustrated example of a scaling method, wherein the electronic device may include: memory 44 and processor 45.
[0256] Memory 44 is used to store computer programs and can be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device, data structures, contact data, phone book data, messages, pictures, videos, etc.
[0257] The processor 45, coupled to the memory 44, is configured to execute a computer program in the memory 44 for: in response to a received instance scaling-down request, determining a scaling-down strategy corresponding to the instance scaling-down request; based on the scaling-down strategy, determining at least one type of available scaling-down resources, the type of available scaling-down resources including at least one of the following: private resources in a private pool, public resources in a public pool; and performing an instance scaling-down operation based on the scaling-down strategy and at least one type of available scaling-down resources.
[0258] Regarding the processor 45 in the electronic device of this embodiment, it can also perform the above-described functions. Figures 7-9 The description of the embodiments shown is for reference only, and will not be elaborated upon here.
[0259] In some instances, when processor 45 determines at least one type of available shrinkable resources based on a shrinkage strategy, processor 45 is configured to perform the following: if the shrinkage strategy is a private pool priority strategy, determine that at least one type of available shrinkable resources includes: private resources and public resources, wherein the priority of private resources is higher than the priority of public resources; or, if the shrinkage strategy is a public pool priority strategy, determine that at least one type of available shrinkable resources includes: private resources and public resources, wherein the priority of public resources is higher than the priority of private resources.
[0260] In some instances, when processor 45 performs a scaling-down operation on an instance based on a scaling-down strategy and at least one type of available scaling-down resources, processor 45 is configured to: obtain the resource information type corresponding to the created instance; and perform a scaling-down operation on the instance based on the scaling-down strategy, the resource information type, and at least one type of available scaling-down resources.
[0261] In some instances, when processor 45 performs a scaling-up operation on an instance based on a scaling-up strategy, resource information type, and at least one type of available scaling-up resource, processor 45 is configured to perform: in the case of a private pool priority strategy, determine a first type of instance to be scaled up from the created instances based on the resource information type; and perform a scaling-up operation on the first type of instance to be scaled up based on the scaling-up strategy.
[0262] In some instances, after scaling down the first type of instance to be scaled down based on the scaling down strategy, the processor 45 in this embodiment is used to perform: obtaining the scaled-down instance; if the scaled-down instance does not meet the instance scaling down request, then determining the second type of instance to be scaled down based on the resource information type among the created instances, which is created by public resources; and performing the scaling down operation on the second type of instance to be scaled down based on the scaling down strategy.
[0263] In some instances, when processor 45 performs a scaling-up operation on an instance based on a scaling-up strategy, resource information type, and at least one type of available scaling-up resource, processor 45 is configured to perform: when the scaling-up strategy is a public pool priority strategy, determine a first type of instance to be scaled up from the created instances based on the resource information type; and perform a scaling-up operation on the first type of instance to be scaled up based on the scaling-up strategy.
[0264] In some instances, after scaling down the first type of instance to be scaled down based on the scaling down strategy, the processor 45 is used to perform: obtain the scaled-down instance; if the scaled-down instance does not meet the instance scaling down request, determine the second type of instance to be scaled down based on the resource information type among the created instances; and perform the scaling down operation on the second type of instance to be scaled down based on the scaling down strategy.
[0265] Furthermore, such as Figure 13 As shown, the electronic device also includes other components such as a communication component 46, a display 47, a power supply component 48, and an audio component 49. Figure 13 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 13 The components shown. Additionally... Figure 13 The components within the center frame are optional, not mandatory, and their specific requirements depend on the product form of the work node. In this embodiment, the work node can be a terminal device such as a desktop computer, laptop computer, smartphone, or IoT device, or a server-side device such as a conventional server, cloud server, or server array. If the work node in this embodiment is implemented as a terminal device such as a desktop computer, laptop computer, or smartphone, it may include... Figure 13 The components within the center frame; if the working node in this embodiment is implemented as a server-side device such as a conventional server, cloud server, or server array, it may not include... Figure 13 The component within the center frame.
[0266] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0267] The aforementioned communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.
[0268] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.
[0269] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0270] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0271] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the above-described method embodiments. The computer-readable storage medium includes volatile or non-volatile components, or a combination thereof, and can be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium.
[0272] Correspondingly, this application provides a computing platform, which can be specifically implemented as an instance elastic scaling service platform. This elastic scaling service platform may include: a memory and a processor; wherein the memory is used to store one or more computer instructions, and when the one or more computer instructions are executed by the processor, they implement the aforementioned instance control method and / or instance scaling method. Specifically, the elastic service platform can perform elastic scaling operations on instances by executing the steps of the instance control method in the above embodiments; the elastic service platform can perform elastic scaling operations on instances by executing the steps of the instance scaling method in the above embodiments.
[0273] Accordingly, this application also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor is able to implement the steps in the above method embodiments. It should be understood that each step or combination of steps in the above method flow can be implemented by the computer program or instructions. In addition, these computer programs or instructions can be applied to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device, so that the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device can be implemented as a means to implement the corresponding functions in the above method embodiments.
[0274] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0275] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for controlling an instance, characterized in that, include: In response to the obtained instance expansion request, determine the expansion strategy corresponding to the instance expansion request; Based on the expansion strategy, at least one type of available resource is determined, and the available resource includes at least one of the following: a first type of private resource in a designated private pool, a second type of private resource in an undesignated private pool, and a public resource in a public pool; The instance expansion operation is performed based on the expansion strategy and the available resources of the at least one type.
2. The method according to claim 1, characterized in that, Based on the expansion strategy, at least one type of available resource is determined, including: When the expansion strategy is a private pool priority strategy, the available resources of at least one type are determined to include a first type of private resource, a second type of private resource, and public resources, wherein the priority of the first type of private resource is higher than the priority of the second type of private resource, and the priority of the second type of private resource is higher than the priority of the public resource; or, When the expansion strategy is a private pool strategy, it is determined that the at least one type of available resources includes the first type of private resources; or, When the expansion strategy is a public pool priority strategy, the available resources of at least one type are determined to include a first type of private resource, a second type of private resource, and public resources, wherein the priority of public resources is higher than the priority of the first type of private resources, and the priority of the first type of private resources is higher than the priority of the second type of private resources; or, When the expansion strategy is a public pool strategy, it is determined that the available resources of the at least one type include the public resources.
3. The method according to claim 2, characterized in that, The instance scaling operation based on the scaling strategy and the available resources of at least one type includes: When the expansion strategy is a private pool priority strategy, identify whether there is a designated private pool corresponding to the instance expansion request; If a designated private pool exists corresponding to the instance expansion request, the instance expansion operation is performed using the first type of private resources to obtain the first expanded instance.
4. The method according to claim 3, characterized in that, After obtaining the first expansion instance, the method further includes: If the first expansion instance satisfies the instance expansion request, then an expansion completion notification message corresponding to the instance expansion request is generated; or, If the first expansion instance does not meet the instance expansion request, the second type of private resources are used to perform the instance expansion operation to obtain a second expansion instance.
5. The method according to claim 4, characterized in that, After obtaining the second expansion instance, the method further includes: Identify whether the sum of the first instance and the second instance constitutes the first instance and satisfies the instance expansion request; If the sum of the first instances satisfies the instance expansion request, then an expansion completion notification message corresponding to the instance expansion request is generated; or, If the sum of the first instances does not meet the instance expansion request, then the public resources are used to perform an instance expansion operation to obtain a third expanded instance.
6. The method according to claim 5, characterized in that, After obtaining the third expansion instance, the method further includes: Identify whether the sum of the second instances formed by the first expansion instance, the second expansion instance, and the third expansion instance satisfies the instance expansion request; If the sum of the second instance does not meet the instance expansion request, an expansion failure message corresponding to the instance expansion request will be generated.
7. The method according to claim 2, characterized in that, The instance scaling operation based on the scaling strategy and the available resources of at least one type includes: When the expansion strategy is a private pool strategy, identify whether there is a specified private pool corresponding to the instance expansion request; If a designated private pool exists corresponding to the instance expansion request, the first type of private resources are used to perform the instance expansion operation to obtain the first expanded instance; If no designated private pool exists corresponding to the instance expansion request, an expansion failure message corresponding to the instance expansion request will be generated.
8. The method according to claim 7, characterized in that, After obtaining the first expansion instance, the method further includes: Identify whether the first expansion instance satisfies the instance expansion request; If the first expansion instance does not meet the instance expansion request, an expansion failure message corresponding to the instance expansion request is generated.
9. The method according to claim 2, characterized in that, The instance scaling operation based on the scaling strategy and the available resources of at least one type includes: When the expansion strategy is a public pool priority strategy, the public resources are used to expand the instance and obtain the first expanded instance.
10. The method according to claim 9, characterized in that, After obtaining the first expansion instance, the method further includes: Identify whether the first expansion instance satisfies the instance expansion request; If the first expansion instance satisfies the instance expansion request, then an expansion completion notification message corresponding to the instance expansion request is generated; or, If the first expansion instance does not meet the instance expansion request, then the first type of private resources are used to perform the instance expansion operation to obtain a second expansion instance.
11. The method according to claim 10, characterized in that, After obtaining the second expansion instance, the method further includes: Identify whether the sum of the first instance and the second instance constitutes the first instance and satisfies the instance expansion request; If the sum of the first instances satisfies the instance expansion request, then an expansion completion notification message corresponding to the instance expansion request is generated; or, If the total number of the first instances does not meet the instance expansion request, then the second type of resources is used to expand the instances and obtain a third expanded instance.
12. The method according to claim 2, characterized in that, The instance scaling operation based on the scaling strategy and the available resources of at least one type includes: When the expansion strategy is a public pool strategy, the public resources are used to expand the instance and obtain the first expanded instance.
13. The method according to claim 12, characterized in that, After obtaining the first expansion instance, the method further includes: Identify whether the first expansion instance satisfies the instance expansion request; If the first expansion instance does not meet the instance expansion request, an expansion failure message corresponding to the instance expansion request is generated.
14. The method according to any one of claims 1-8, 13, characterized in that, After generating the expansion failure message corresponding to the instance expansion request, the method further includes: Based on the expansion strategy, at least one type of unplanned resource corresponding to the instance expansion request is determined, wherein the type of unplanned resource includes at least one of the following: a first type of unplanned resource in a designated private pool, a second type of unplanned resource in an undesignated private pool, or an unplanned public resource in a public pool; The instance is rescaled based on the expansion strategy and the at least one type of unplanned resources.
15. The method according to any one of claims 1-13, characterized in that, After performing instance scaling operations based on the scaling strategy and the at least one type of available resources, the method further includes: Get the expanded instance after the instance expansion operation; Determine the type of actual resources used by the expanded instance; The expanded instance is associated with the type of actual resource used for storage.
16. The method according to any one of claims 1-13, characterized in that, The method further includes: In response to the obtained instance scaling-down request, determine the scaling-down strategy corresponding to the instance scaling-down request; Based on the scaling-down strategy, at least one type of available scaling-down resources is determined, and the type of available scaling-down resources includes at least one of the following: private resources in a private pool, and public resources in a public pool; The instance is scaled down based on the scaling-down strategy and at least one type of available scaling-down resources.
17. A method for reducing the size of an instance, characterized in that, include: In response to the obtained instance scaling-down request, determine the scaling-down strategy corresponding to the instance scaling-down request; Based on the scaling-down strategy, at least one type of available scaling-down resources is determined, and the type of available scaling-down resources includes at least one of the following: private resources in a private pool, and public resources in a public pool; The instance is scaled down based on the scaling-down strategy and at least one type of available scaling-down resources.
18. The method according to claim 17, characterized in that, Based on the scaling-down strategy, at least one type of available scaling-down resources is determined, including: When the scaling-down strategy is a private pool priority strategy, the available scaling-down resources of at least one type are determined to include: private resources and public resources, wherein the priority of the private resources is higher than the priority of the public resources; or, When the scaling-down strategy is a public pool priority strategy, at least one type of available scaling-down resources is determined, including: private resources and public resources, wherein the priority of the public resources is higher than the priority of the private resources.
19. The method according to claim 17, characterized in that, Based on the scaling-down strategy and at least one type of available scaling-down resources, the instance scaling-down operation includes: Get the resource information type corresponding to the created instance; The instance is scaled down based on the scaling-down strategy, the resource information type, and at least one type of available scaling-down resources.
20. The method according to claim 19, characterized in that, Based on the scaling-down strategy, the resource information type, and at least one type of available scaling-down resources, the instance scaling-down operation includes: When the scaling-down strategy is a private pool priority strategy, the first type of instance to be scaled down is determined from the created instances based on the resource information type; Based on the shrinkage strategy, the first type of instances to be shrunk are shrunk.
21. The method according to claim 20, characterized in that, After performing a scaling-down operation on the first type of instances to be scaled down based on the scaling-down strategy, the method further includes: Get the scaled-down instance; If the instance after scaling down does not meet the instance scaling down request, then based on the resource information type, a second type of instance to be scaled down, created from public resources, is determined from the already created instances. Based on the aforementioned scaling-down strategy, the second type of instances to be scaled down are subjected to scaling-down operations.
22. The method according to claim 19, characterized in that, Based on the scaling-down strategy, the resource information type, and at least one type of available scaling-down resources, the instance scaling-down operation includes: When the scaling-down strategy is a public pool priority strategy, the first type of instance to be scaled down is determined from the created instances based on the resource information type; Based on the shrinkage strategy, the first type of instances to be shrunk are shrunk.
23. The method according to claim 22, characterized in that, After performing a scaling-down operation on the first type of instances to be scaled down based on the scaling-down strategy, the method further includes: Get the scaled-down instance; If the instance after scaling down does not meet the instance scaling down request, then based on the resource information type, a second type of instance to be scaled down, created by private resources, is determined from the created instances. Based on the aforementioned scaling-down strategy, the second type of instances to be scaled down are subjected to scaling-down operations.
24. A control device for an example, characterized in that, include: The first acquisition module is used to determine the expansion strategy corresponding to the acquired instance expansion request in response to the acquired instance expansion request. The first determining module is used to determine at least one type of available resource based on the expansion strategy. The type of available resource includes at least one of the following: a first type of private resource in a designated private pool, a second type of private resource in an undesignated private pool, and a public resource in a public pool. The first processing module is used to perform instance expansion operations based on the expansion strategy and the available resources of the at least one type.
25. A reduction device of an example, characterized in that, include: The second acquisition module is used to determine a scaling-down strategy corresponding to the acquired instance scaling-down request in response to the acquired instance scaling-down request. The second determining module is used to determine at least one type of scaling-down resource based on the scaling-down strategy, wherein the type of scaling-down resource includes at least one of the following: private resources in a private pool, and public resources in a public pool; The second processing module is used to perform instance scaling operations based on the scaling-down strategy and at least one type of scaling-down resource.
26. An electronic device, characterized in that, include: A memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method of any one of claims 1-23.
27. A computing platform, characterized in that, include: A memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method of any one of claims 1-23.
28. A computer storage medium, characterized in that, Used to store a computer program that, when executed by a computer, implements the method of any one of claims 1-23.
29. A computer program product, characterized in that, include: A computer program, when executed by a processor of an electronic device, causes the processor to perform the steps of the method of any one of claims 1-23.