Cloud instance model selection method and device, storage medium and electronic equipment

By identifying a set of candidate cloud instance models, deploying instances, and calculating cost-effectiveness information, the problem of high costs caused by inaccurate cloud instance model selection is solved, achieving efficient and accurate cloud instance selection and reducing the operating costs of applications.

CN121008983APending Publication Date: 2025-11-25HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510718819.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

In existing technologies, inaccurate selection of cloud instance models leads to high application operating costs.

Method used

By determining a set of candidate device models based on the characteristics of the target application, deploying instances of the candidate device models, ensuring that the traffic resources received by the instances are the same, calculating cost-effectiveness information, and selecting the device model with the highest cost-effectiveness.

Benefits of technology

It enables accurate selection of cloud instance models, reduces application operating costs, and improves resource utilization efficiency and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121008983A_ABST
    Figure CN121008983A_ABST
Patent Text Reader

Abstract

The invention discloses a cloud instance model selection method and device, a storage medium and electronic equipment. The method comprises the following steps: determining a candidate model set according to feature information of a target application program; deploying respective corresponding instances for a plurality of candidate machine types in the candidate machine type set according to the mirror image of the target application program; instances corresponding to the multiple candidate models in the candidate model set are determined, and a program running result of the target application program is determined according to a target running condition which is used for controlling traffic resources received by the instances matched with the multiple candidate models to be the same; according to the program running result, determining cost performance information matched with the candidate machine types, and according to the cost performance information, determining at least one target machine type from the candidate machine type set. According to the method and the device, the technical problem of high running cost of the application program caused by inaccurate selection of the cloud instance model in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud computing, in particular to a cloud instance model selection method and device, a storage medium and an electronic device. BACKGROUND

[0002] At present, enterprises increasingly rely on cloud computing platforms to deploy and run their applications to cope with rapidly changing market demands and large-scale business challenges. Cloud computing provides flexible resource expansion capabilities for applications, allowing users to select different specifications of cloud instances (including but not limited to CPU core number, memory size, disk type, and network bandwidth) according to actual needs. However, the instance specifications on the cloud platform are extremely diverse, ranging from lightweight configurations of 1C1G (1 core CPU, 1G memory) to high-performance options of up to 256C1024G (256 core CPU, 1024G memory) or even larger specifications, with significant price differences. Selecting the appropriate cloud instance model becomes one of the key factors affecting application performance and cost.

[0003] The prior art usually determines the use model of the current application program by technical experience or some simple rules, which cannot quantitatively measure the cost performance of deploying the application program on the same or different cloud platforms, different specifications, and different instance models, resulting in the application program being easily selected with high-cost configurations during deployment. That is, there is an inaccurate selection of cloud instance models in the prior art, resulting in the technical problem of high running cost of the application program.

[0004] In view of the above problems, no effective solution has been proposed so far. SUMMARY

[0005] The embodiments of the present application provide a cloud instance model selection method and device, a storage medium and an electronic device to at least solve the technical problem of inaccurate selection of cloud instance models in the prior art, resulting in high running cost of the application program.

[0006] According to an aspect of an embodiment of the present application, a cloud instance model selection method is provided, comprising: determining a candidate model set according to characteristic information of a target application program, wherein the characteristic information is used to indicate the running specification information of the target application program; deploying respective instances corresponding to a plurality of candidate models in the candidate model set according to the image of the target application program; determining the program running result of the target application program according to the respective instances corresponding to the plurality of candidate models in the candidate model set according to target running conditions, wherein the target running conditions are used to control the same traffic resources received by the instances respectively matched with the plurality of candidate models; determining the cost performance information respectively matched with the plurality of candidate models according to the program running result, and determining at least one target model from the candidate model set according to the cost performance information.

[0007] According to another aspect of the embodiments of the present application, a cloud instance model selection apparatus is also provided, which comprises: a management module configured to determine a candidate model set according to characteristic information of a target application program, wherein the characteristic information is used to indicate running specification information of the target application program; a deployment module configured to deploy respective instances corresponding to a plurality of candidate models in the candidate model set according to an image of the target application program; a monitoring module configured to determine program running results of the target application program according to respective instances corresponding to the plurality of candidate models in the candidate model set according to target running conditions, wherein the target running conditions are used to control the same traffic resources received by the respective instances corresponding to the plurality of candidate models; and a calculation module configured to determine performance-price ratio information corresponding to the plurality of candidate models according to the program running results, and determine at least one target model from the candidate model set according to the performance-price ratio information.

[0008] Optionally, the calculation module comprises a first obtaining unit configured to obtain resource utilization information indicated by the program running results corresponding to each candidate model; and determine performance-price ratio information corresponding to each candidate model in the plurality of candidate models according to the resource utilization information corresponding to each candidate model and the running specification information of the target application program.

[0009] Optionally, the monitoring module comprises a second obtaining unit configured to obtain resource utilization rates indicated by the resource utilization information corresponding to each candidate model in each statistical period within a test period, and request processing rates of each candidate model in each statistical period; and determine performance scores of each candidate model according to the resource utilization rates, the request processing rates and the running specification information corresponding to each candidate model, wherein the performance scores are used to indicate the sustained processing capabilities of the candidate models on resources within the test period.

[0010] Optionally, the second obtaining unit comprises: a first determining unit configured to determine model utilization rate scores of each candidate model according to the performance scores of each candidate model; and determine performance-price ratio information of each candidate model according to the model utilization rate scores of each candidate model.

[0011] Optionally, the management module is further configured to obtain application performance information and data security information indicated by the characteristic information corresponding to the target application program; and determine the candidate model set corresponding to the target application program according to the application performance information and the data security information.

[0012] Optionally, the calculation module comprises a second determining unit configured to determine a target recommended model set from the candidate model set according to the performance-price ratio information; and determine at least one target model corresponding to the target application program according to weighted summation results of performance-price ratio scores of each model in the target recommended model set in a plurality of test periods.

[0013] Optionally, the computing module comprises a third determining unit configured to determine a set of eliminated machine types from the set of candidate machine types according to the cost performance information; determine at least one eliminated machine type matched with the target application program according to a weighted sum result of the cost performance score of each machine type in the set of eliminated machine types at the plurality of test time periods; and delete the eliminated machine types from the set of candidate machine types.

[0014] According to another aspect of the embodiments of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is configured to execute the cloud instance machine type selection method described above when running.

[0015] According to another aspect of the embodiments of the present application, an electronic device is provided, and the electronic device comprises a memory and a processor. The memory stores a computer program, and the processor is configured to execute the cloud instance machine type selection method described above by using the computer program.

[0016] In the embodiments of the present application, the set of candidate machine types is determined according to the characteristic information of the target application program, and a set of candidate machine types within a certain range that meets the requirements is preliminarily determined. The instances corresponding to the plurality of candidate machine types in the set of candidate machine types are deployed according to the image of the target application program, and the consistency of the test environment is ensured based on the unified test standard and condition. Then, the program running results of the target application program are determined according to the target running conditions of the instances corresponding to the plurality of candidate machine types, wherein the target running conditions are used to control the same traffic resources received by the instances corresponding to the plurality of candidate machine types. The cost performance information of the plurality of candidate machine types is determined according to the program running results, and at least one target machine type is determined from the set of candidate machine types according to the cost performance information, thereby solving the technical problem that the selection of the cloud instance machine type is inaccurate in the prior art, resulting in a high running cost of the application program. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, but do not constitute improper limitations on the present application. In the drawings:

[0018] Figure 1 FIG. 1 is a schematic diagram of an application environment of an optional cloud instance machine type selection method according to an embodiment of the present application;

[0019] Figure 2 FIG. 2 is a flowchart of an optional cloud instance machine type selection method according to an embodiment of the present application;

[0020] Figure 3 FIG. 3 is a schematic diagram of an optional cloud instance machine type selection method according to an embodiment of the present application;

[0021] Figure 4 is a schematic diagram of another optional cloud instance model selection method according to an embodiment of the present application;

[0022] Figure 5 is a schematic diagram of another optional cloud instance model selection method according to an embodiment of the present application;

[0023] Figure 6 is a schematic diagram of another optional cloud instance model selection method according to an embodiment of the present application;

[0024] Figure 7 is a structural schematic diagram of an optional cloud instance model selection device according to an embodiment of the present application;

[0025] Figure 8 is a structural schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative work should fall within the protection scope of the present application.

[0027] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to include only those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to the process, method, product or device.

[0028] According to an aspect of an embodiment of the present application, a cloud instance model selection method is provided. Optionally, as an optional implementation, the above-mentioned cloud instance model selection method can be applied in, but is not limited to, the environment as shown in Figure 1 .

[0029] The server 112 comprises a database 114 and a processing engine 116, and the terminal device 102 comprises a display 108, a processor 106 and a memory 104. The server and the terminal device can interact through the network 110.

[0030] The server 112 performs S102, and determines a candidate model set according to characteristic information of a target application program, wherein the characteristic information is used to indicate running specification information of the target application program.

[0031] S104, deploying respective instances for the plurality of candidate models in the candidate model set according to the image of the target application program;

[0032] S106, determining program running results of the target application program according to the respective instances of the plurality of candidate models determined according to target running conditions, wherein the target running conditions are used to control the same traffic resources received by the respective instances matched with the plurality of candidate models;

[0033] S108, determining performance-price ratio information respectively matched with the plurality of candidate models according to the program running results, and determining at least one target model from the candidate model set according to the performance-price ratio information.

[0034] Optionally, in the embodiment, the terminal device can be a terminal device configured with a target client, and can include but is not limited to at least one of the following: a mobile phone (such as an Android mobile phone, an iOS mobile phone, etc.), a notebook computer, a tablet computer, a palm computer, a MID (Mobile Internet Device), a PAD, a desktop computer, a smart television, etc. The target client can be a video client, an instant messaging client, a browser client, an education client, etc. The network can include but is not limited to a wired network and a wireless network, wherein the wired network includes a local area network, a metropolitan area network and a wide area network, and the wireless network includes Bluetooth, WIFI and other wireless communication networks. The server can be a single server, a server cluster composed of multiple servers, or a cloud server. The above is only an example, and the embodiment is not limited in this regard.

[0035] Optionally, as an optional implementation manner, as shown in Figure 2 the selection method of the cloud instance model comprises:

[0036] S202, determining a candidate model set according to characteristic information of a target application program, wherein the characteristic information is used to indicate running specification information of the target application program.

[0037] S204, deploying respective instances for the plurality of candidate models in the candidate model set according to the image of the target application program;

[0038] S206, determining program running results of the target application program by the instances corresponding to the plurality of candidate machine types respectively in the candidate machine type set according to target running conditions, wherein the target running conditions are used to control the same traffic resources received by the instances corresponding to the plurality of candidate machine types respectively;

[0039] S208, determining performance-price ratio information corresponding to the plurality of candidate machine types respectively according to the program running results, and determining at least one target machine type from the candidate machine type set according to the performance-price ratio information.

[0040] In step S202, a candidate machine type set is determined according to characteristic information of the target application program, wherein the characteristic information is used to indicate running specification information of the target application program.

[0041] As an optional implementation, the characteristic information of the target application program can include types of the application program (such as Web service, database, AI computing, etc.), technical stacks (such as programming languages and frameworks used), business characteristics (such as QPS and TPS requirements), etc., and then the rated specification range of the machine type (such as CPU core number, memory size, disk type, network bandwidth, etc.) can be determined according to the characteristic information.

[0042] It can be understood that the higher the core number is, the higher the memory value is, the stronger the service capability of the specification is, and the higher the price is. If the application program is deployed on two 2-core 4G cloud instances, the CPU utilization has reached 80%, at this time, two cloud instances of the same specification are selected to be added, or the cloud instance specification is upgraded to 4-core 8G, so that the CPU utilization is kept in a relatively safe interval.

[0043] In the above step S204, instances corresponding to the plurality of candidate machine types in the candidate machine type set are deployed according to the image of the target application program.

[0044] Optionally, the image is a template for creating a cloud instance, which contains all software environments and configurations required for running the target application program. Through the image, it is ensured that the application instances on different machine types have the same initial state, which facilitates further performance comparison.

[0045] Further in the above step S206, program running results of the target application program by the instances corresponding to the plurality of candidate machine types respectively in the candidate machine type set are determined according to target running conditions, wherein the target running conditions are used to control the same traffic resources received by the instances corresponding to the plurality of candidate machine types respectively.

[0046] Optionally, the above target running conditions can be to create the same running environment on all test instances, including traffic types, access modes, number of concurrent users, etc. Through traffic replication and playback technology, it is ensured that each instance receives the same traffic resources during the test to achieve fair performance testing. The above program running results can be the running data of the target application on each candidate model instance, such as CPU utilization, memory occupation, response time, throughput, etc. collected under the same running conditions, which are not limited here.

[0047] Optionally, in the above step S208, the performance-price ratio information matched with the plurality of candidate models is determined according to the program running results, and at least one target model is determined from the candidate model set according to the performance-price ratio information. For example, according to the ranking of the performance-cost ratio indicated by the performance-price ratio information, the candidate model with high ranking is selected as the target model, which is not limited here.

[0048] It should be noted that the algorithm design can also consider the nonlinear relationship between performance score and price, and introduce complex factors such as weight adjustment and price sensitivity analysis to more accurately evaluate the performance-price ratio of the model. For example, more stable models may obtain higher scores in the algorithm. The preferred process of model selection is a comprehensive evaluation of multiple test results, and needs to be adjusted and optimized regularly according to actual running data and business demand changes, such as periodically re-evaluating the rated specification range, updating the candidate model set, and adjusting the target model selection strategy, which can effectively reduce deployment costs, improve resource utilization efficiency, and ensure the performance and reliability of the application program.

[0049] The above process is described in a complete embodiment, as shown in the flowchart Figure 3

[0050] The cumulative score is divided into five modules, and the uppermost layer is the target application, such as application Y. The specific execution process is as follows: initially, S302-1 is executed to initialize the specification list; S302-2, all models are recommended by default.

[0051] Further, the deployment module executes S304 according to the specifications and models for deployment; specifically, the recommended model list is obtained from the model management module in combination with the application information, and then the cloud instance deployment of the application is performed in the cloud platform module, and finally the cloud instance resources are recycled after the optimization is completed. The cloud platform module receives the command transmitted by the deployment module, deploys the cloud instance of the application according to the rated model, and simultaneously provides monitoring information such as resource utilization rate to the monitoring module.

[0052] ​The deployment module can perform resource deployment of application multi-specification and multi-model, and a playback process of traffic. Specifically, S1, application information is acquired, mainly including an application rated specification range, which is confirmed by a technician in combination with an application level and service requirements and bound in the application information;

[0053] S2, after the application rated specification range is acquired, a recommended model list is acquired from the model management module through a specification parameter. The recommended model list not only has model information parameters, specifically including model name and model specification (core and G) information, but also includes cloud platform information to which the model belongs.

[0054] S3, based on the acquired information, for cloud instance models with different target specifications, multiple cloud instances for pay-per-use are deployed using an image of the current application, and a deployment process of the same application with different models is completed.

[0055] S4, after the deployment is completed, real traffic of an online application for a period of time is extracted, and traffic replication and traffic playback are performed on the opened cloud instances. If the application has no traffic in advance, a part of stress test traffic is extracted, or traffic replication and traffic playback are performed through stress testing, that is, the application is caused to provide a service state close to reality as much as possible. The playback period can be several days or several hours, and during the period, all the cloud instances are in a running state.

[0056] S5, there are multiple traffic replication and traffic playback technologies, and the application can select to use a message queue for implementation. For example, Kafka or RocketMQ is used. That is, the application or the proxy program subscribes to the Kafka message queue to ensure that the same traffic is received by each cloud instance of the current application on each cloud platform.

[0057] S6, after the cloud instance receives the playback traffic, the application provides a service, and resource utilization rate information is generated at this time, which is provided to the monitoring module in combination with the application information and the size (QPS, queries per second) of the playback traffic.

[0058] It should be noted that the cloud platform module is used to provide deployment of cloud resources for the application and query of various cloud resource information, for example, cloud instances of different resources, different specifications and different models can be provided, and the specific cloud instances include cloud hosts, load balancing, database instances, and the like, and further, the application decides to use which resource; the application deploys cloud instances using the model provided by the cloud platform; an API (application program interface) can be provided to enable the model management module to acquire related information of the instance model, mainly including model specification, model name and model price information; all model information can be provided to the model management module as a recommended model list after initialization by default.

[0059] The monitoring module performs S306 to provide application monitoring information (such as resource utilization) to the computing module. It can be understood that the monitoring module collects resource data of the cloud instance, provides information such as resource utilization of the cloud instance, and outputs the formatted information to the computing module. Specifically, application program information on different cloud platforms and different cloud instances can be collected, mainly including: instance specifications, instance models, and basic information such as instance names and tags; resource basic utilization rates can be collected at will, mainly including CPU utilization rates, and utilization rate information is provided to the computing module; the cloud instance can also be distinguished by tags, names, and other methods to belong to which application program, and resource and utilization rate information of all cloud instances under a certain application program can be obtained directly,

[0060] The computing module performs S308 to calculate the cost-performance score; specifically, based on the existing deployment model information and resource utilization rate information, the model corresponding cost-performance score is obtained by combining the model price and provided to the model management module.

[0061] The model management module performs S310 to provide recommended models; specifically, an initial model list is obtained from one or more cloud platforms as recommended models, model related information is provided to the computing module according to the rated specifications of the application program, and then the model cost-performance score information of the application program is obtained from the computing module and stored in the module. After that, the low-score models are added to the elimination model list (blacklist model list), and the models that meet the low-score times > N in the recommended list are removed, and only high-cost-performance models are recommended to the deployment module.

[0062] Finally, a model is selected from the preferred model list as the best model, and the subsequent online environment deployment and expansion of the application program use this best model.

[0063] Through the above embodiments of the present application, the candidate model set is determined according to the characteristic information of the target application program, and a candidate model set within a certain range that meets the requirements is preliminarily determined; the respective instances of the multiple candidate models in the candidate model set are deployed according to the image of the target application program, and the consistency of the test environment is ensured based on the unified test standard and conditions; and then the program running results of the target application program are determined according to the target running conditions of the respective instances of the multiple candidate models in the candidate model set, wherein the target running conditions are used to control the same traffic resources received by the instances matched with the multiple candidate models respectively; the cost-performance information matched with the multiple candidate models respectively is determined according to the program running results, and at least one target model is determined from the candidate model set according to the cost-performance information, thereby solving the technical problem that the program running cost is high due to the inability of the prior art to accurately and efficiently select a cloud instance model matched with the application program.

[0064] In an optional embodiment, the performance-price ratio information matched with each of the plurality of candidate machine types is determined according to the program running result, and the performance-price ratio information matched with each of the plurality of candidate machine types comprises:

[0065] S1, obtaining resource utilization information indicated by the program running result matched with each of the candidate machine types;

[0066] S2, determining performance-price ratio information matched with each of the plurality of candidate machine types according to the resource utilization information matched with each of the candidate machine types and the running specification information of the target application program.

[0067] In the above step S1, the program running result can indicate that the performance data collected after running the target application program on the candidate machine type reflects the consumption of resources on the cloud instance, and the resource utilization information can be CPU utilization.

[0068] Further in the above step S2, the running specification information of the target application program can be the number of CPU cores, and further determining the performance-price ratio information matched with each of the plurality of candidate machine types can be, but not limited to, through the following formula:

[0069] First, calculate the machine utilization rate score = ∑(traffic QPS (queries per second) / (CPU core number*CPU utilization rate)) / statistical period;

[0070] For example, the instance machine type is Y1, the instance specification is 2C4G, the playback period is one day, and the statistical period is one hour. Then, 24 hours are counted in a day, the first cycle counts QPS = 1000, the utilization rate is 10%, the second cycle counts QPS = 2000, and the utilization rate is 20%. Then, the current machine utilization rate score = (1000 / (2*10%)+2000 / (2*20%)+…) / 24.

[0071] Further calculate the performance-price ratio information, such as machine performance-price ratio score = machine utilization rate score / machine unit price. The above embodiment of the application calculates the performance-price ratio score of the machine, and further quickly, efficiently, automatically and accurately determines the preferred cloud instance machine type matched with the application program, thereby reducing the program running cost.

[0072] In an optional embodiment, after determining that the program running result of the target application program of the candidate machine type set corresponding to each of the plurality of candidate machine types is determined according to the target running condition, the method comprises:

[0073] S1, obtaining resource utilization rate indicated by resource utilization information matched with each of the candidate machine types in each statistical period in a test period, and request processing rate of each of the candidate machine types in each statistical period;

[0074] S2, determining a performance score of each candidate machine type according to the resource utilization rate, the request processing rate and the running specification information matched with each candidate machine type, wherein the performance score is used to indicate the sustained processing capacity of the candidate machine type to the resource in the test period.

[0075] In the step S1, the test period is a playback period, which is a length of time for traffic playback on the cloud instance. In the playback period, the cloud instance is affected by the pre-recorded or generated traffic data to simulate the load in the real application scenario. The traffic data can be copied from historical data, generated by stress testing or specific traffic patterns. It is assumed that the playback period is set to 24 hours, that is, all cloud instances will be affected by the same traffic playback in this day.

[0076] The statistical period is the frequency or interval of data collection and resource utilization rate calculation in the playback period. If the statistical period is set to 1 hour and the playback period is 24 hours, the entire playback process will be subdivided into 24 independent statistical periods. The average resource utilization rate (such as CPU, memory) in the period can be calculated at the end of each statistical period.

[0077] Further in the step S2, the request processing rate can be the number of queries per second (QPS), which indicates the number of requests that the program server can successfully process in one second, and the running specification information can be the number of CPU cores. The performance score can be calculated by the following formula, for example:

[0078] Performance score = ∑(Traffic QPS (Queries per second) / (CPU core number * CPU utilization rate));

[0079] In an optional embodiment, after determining the performance score of each candidate machine type according to the resource utilization rate, the request processing rate and the running specification information matched with each candidate machine type, the method further comprises:

[0080] S1, determining a machine type utilization rate score of each candidate machine type according to the performance score of each candidate machine type;

[0081] S2, determining the cost performance information of each candidate machine type according to the machine type utilization rate score of each candidate machine type.

[0082] The following is an example of the steps S1-S2: Figure 4 The process of the steps S1-S2 is described as follows:

[0083] First, the cloud instance on the cloud platform module generates monitoring information, which is collected by the monitored module. Further, the monitoring module provides the monitoring information (such as traffic QPS, CPU utilization rate) generated by the application program to the calculation module.

[0084] The computing module can obtain the model performance-to-price ratio score based on the following algorithm: optionally, the model utilization score can be the ratio of the performance score to the number of statistical periods in the test period, and the formula is as follows:

[0085] Model utilization score = ∑(flow QPS (queries per second) / (CPU core number*CPU utilization)) / statistical period number; further, model performance-to-price ratio score = model utilization score / model unit price;

[0086] After obtaining the model performance-to-price ratio score based on the above operation logic, all information can be provided to the model management module to screen out the preferred model that meets the requirements, solving the technical problem that the existing technology cannot accurately determine the cloud instance model running the application program, resulting in high running cost.

[0087] In an optional embodiment, the candidate model set is determined according to the characteristic information of the target application program, comprising:

[0088] S1, obtaining application program performance information and data security information indicated by characteristic information matched with the target application program;

[0089] S2, determining a candidate model set matched with the target application program according to the application program performance information and the data security information.

[0090] In the above step S1, the application program performance information can be performance data when running the target application program, including processing speed, resource utilization performance (CPU, memory, disk I / O, network I / O), delay, throughput (such as QPS), etc. The data security information can be security requirements and characteristics related to application program data processing and storage, such as data encryption, firewall settings, compliance requirements (such as GDPR, HIPAA), backup frequency, etc.

[0091] Further in the above step S2, the candidate model set matched with the target application program is determined according to the application program performance information and the data security information;

[0092] Optionally, assuming that the target application program is an online service for processing large-scale user data, which requires high concurrent processing capability and data encryption storage. The rated specification range determined by the technical personnel is 8C16G to 16C32G. The collected application program performance information is that the expected QPS is 5000 and the average delay target is 100 milliseconds; the data security information is that AES256-bit encryption is required during data transmission and storage.

[0093] Based on the collected information, those from multiple cloud platforms that can provide 8C16G to 16C32G configuration range, meet the 5000QPS processing capacity and AES256-bit data encryption requirements are screened out. For example, from cloud platform 1, cloud platform 2, respectively, select models A, B, C, etc. that meet the above specifications and security requirements to form a candidate model set.

[0094] As shown in Figure 5 The application program provides basic information (related information of application program deployment, such as image information, version information) and rated specification information to the deployment module, such as the received rated specification information: rated specification one: 2 cores 4G, rated specification two: 4 cores 8G.

[0095] The model management module obtains the recommended model list information, that is, the recommended models in the recommended model list information all meet the rated specification information, for example, in cloud platform one: recommended model one (2C4G), recommended model two (2C4G), recommended model three (4C8G); in cloud platform two: recommended model three (2C4G), recommended model four (4C8G), recommended model five (4C8G).

[0096] Based on the recommended model list, combined with the existing application program level information, the cloud instance is deployed on the cloud platform. Different models can deploy one or more cloud instances, such as using model one to deploy instance one, using model two to deploy instance two, and using model three to deploy instance three in cloud platform one, using model four to deploy instance four, and using model five to deploy instance five in cloud platform two, and using model six to deploy instance six.

[0097] After deployment, the traffic is played into the field, the cloud instance generates traffic QPS information and resource utilization information, and provides it to the monitoring module for monitoring. According to the monitoring information, the model cost performance score is calculated, which realizes accurate selection of the optimal model for the target application program and reduces the running cost of the program.

[0098] In an optional implementation, after determining the cost performance information matched with the multiple candidate models according to the program running result, the method comprises:

[0099] S1, determining a target recommended model set from the candidate model set according to the cost performance information;

[0100] S2, determining at least one target model matched with the target application program according to the weighted sum result of the cost performance score of each model in the target recommended model set in multiple test time periods.

[0101] In the steps S1-S2, the models with the cost performance scores greater than the preset threshold are selected as the target recommended models to obtain a target recommended model set. Further, the corresponding cost performance scores in multiple test time periods, such as low peak time period, average load time period and high peak time period, are weighted and averaged to determine that the target recommended model with a higher weighted average value ranking is an optimal model to be matched with the target application program.

[0102] As an optional implementation, initially, initialization specification list information provided by the cloud platform module is acquired, and all models are defaulted as recommended models. The model specification information and the model price information are provided to the computing module, and the cost performance score of the application program related model is obtained by the computing module.

[0103] The computer management module stores the cost performance score information of different models of the application program, and makes an application program cost performance list based on the cost performance score. The model at the top of the ranking is provided to the technical personnel as an optimal model of the application program for judgment, and a certain model is selected as the best model for deployment of the application program. By default, the model with the highest cost performance score is the best model, and whether certain rules limit the selection range of the model is considered, for example, the model can only adopt x86 architecture and cannot adopt AMD architecture.

[0104] In an optional implementation, after the cost performance information respectively matched with the multiple candidate models is determined according to the program running result, the following steps are further included:

[0105] S1, determining a eliminated model set from the candidate model set according to the cost performance information;

[0106] S2, determining at least one eliminated model matched with the target application program according to the weighted sum result of the cost performance score of each model in the eliminated model set in multiple test time periods;

[0107] S3, deleting the eliminated model in the candidate model set.

[0108] In the steps S1-S2, the models with the cost performance scores less than the preset threshold are selected as the models in the eliminated model set, and further, the corresponding cost performance scores in multiple test time periods, such as low peak time period, average load time period and high peak time period, are weighted and averaged to determine that the target recommended model with a lower weighted average value ranking is an optimal eliminated model to be matched with the target application program, and is deleted in the recommended list.

[0109] The following takes Figure 6The above steps S1-S3 are described: the model management module stores two parts of content, one part is the application program model cost performance list information obtained by the calculation module, and the other part is the recommended model list information obtained from the cloud platform module. When the application program is deployed in the deployment module, the rated specification parameters need to be provided, and the corresponding recommended model list is obtained through the model management module to recommend the model deployment. It should be noted that the application can also determine the model elimination ratio, for example, the ratio is 30%, and the models in the last 30% of the cost performance score list are pre-eliminated models. It can also be judged whether the number of models in the last 30% is greater than a threshold value, if less than the threshold value, it can be cancelled to join the blacklist, or updated into the recommended model list.

[0110] It can be understood that after the application program model cost performance score list is generated, the model management module will score the models of different lists, and the elimination mechanism will be initiated for the models that frequently appear at the end of the ranking and the number of times reaches a certain threshold (it can also be judged according to the number of times of participating in optimization and the proportion of the last ranking), and the models are added to the model elimination list. After that, the models in the model elimination list are removed from the recommended model list, and are no longer recommended in the application program optimization deployment. If in the extreme case, the recommended model list only has a limited number of high cost performance models, the elimination mechanism is not needed, and these models are the best models.

[0111] The instance model of the model in the model elimination list is removed from the recommended model list, and the next time the other application program model optimization process will not select the model in the model elimination list, and the process of unified cloud platform model resource screening and filtering is completed. Since only high cost performance model information is retained, the other application program model optimization process will be faster.

[0112] The application is described in a complete embodiment:

[0113] First, the 2C4G and 4C8G specification corresponding instance model list is obtained through the cloud platform module.

[0114] The model of the specification 2C4G in the Beijing region of the cloud platform 1 specifically includes: ecs.u1-c1m2.large (168 yuan / month), ecs.c7.large (196 yuan / month), ecs.c7a.large (140 yuan / month)..., and the model of the specification 4C8G specifically includes: ecs.c6.xlarge (374 yuan / month), ecs.e-c1m2.xlarge (216 yuan / month), ecs.c7a.xlarge (282 yuan / month)..., etc.

[0115] The Beijing region specifications of the machine type of 2C4G on the cloud platform 2 specifically include: SA5.MEDIUM4 (146 yuan / month), S6.MEDIUM4 (174 yuan / month), S8.MEDIUM4

[0116] (207 yuan / month) and the like, and the specifications of the machine type of 4C8G specifically include: SA5.LARGE8 (291 yuan / month), S6.LARGE8 (346 yuan / month), BF1.LARGE8 (145 yuan / month) and the like.

[0117] The application program obtains utilization information after deploying instances based on these machine types, and the preferred time is one day, and the preferred period is one hour. According to the algorithm: machine utilization score = ∑(traffic QPS (queries per second) / (CPU core number*CPU utilization rate)) / statistical period; machine performance score = machine utilization score / machine unit price.

[0118] Based on the collected utilization data, the performance score corresponding to the machine type can be easily obtained, for example, the utilization score V of the 2C4G machine type ecs.c7.large on the cloud platform 1 is (1000 / (2*20%)+…) / 24, and the corresponding performance score is V / (196 yuan / month). According to this algorithm, the utilization of the 2C4G machine may be higher than that of the 4C8G machine, or it may be lower. This score is an accurate measurement standard and is independent of the machine type specification.

[0119] Finally, the performance score list of the response can be obtained, and the score list is used to determine which machine type to use on each cloud platform. The default machine type is the machine type with the highest performance score, and the number of times the last machine type appears is counted. If the threshold is reached, it needs to be excluded from the recommended machine type.

[0120] After the optimization is completed, the target optimal machine type is obtained, and after the machine type is confirmed, the number of cloud hosts using the optimized machine type is allocated according to the rated resource data, and subsequent online deployment operations can be performed. Finally, the deployment module recycles the pay-per-use cloud instances created in the optimization process (generally billed by the hour, and the optimization process requires a certain cost, which is extremely low compared to the income).

[0121] The present application analyzes the performance of the application program itself to ensure that the application program can be optimized to the machine type suitable for the current program. The performance score algorithm can accurately measure the matching degree of the machine type for the current application program. At the same time, in the continuous optimization process of different application programs in the present technology, a recommended machine type list and a machine type elimination list are generated, which avoids the use of low-quality machine types or machine types with a price that is too high compared to the actual value on the cloud platform by other application programs. After the application program selects the best machine type, the subsequent resource expansion still uses the best machine type, solving the problem of excessive deployment costs generated by the original technology.

[0122] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the order of the described actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.

[0123] According to another aspect of the embodiments of the present application, a cloud instance model selection device for implementing the cloud instance model selection method described above is also provided. As shown in the figure, the device comprises: Figure 7 The management module 702 determines a candidate model set according to the characteristic information of the target application program, wherein the characteristic information is used to indicate the running specification information of the target application program.

[0124] The deployment module 704 deploys respective corresponding instances for the plurality of candidate models in the candidate model set according to the image of the target application program.

[0125] The monitoring module 706 determines the program running result of the target application program according to the respective corresponding instances of the plurality of candidate models according to the target running condition, wherein the target running condition is used to control the same traffic resource received by the instances respectively matched with the plurality of candidate models.

[0126] The calculation module 708 determines the performance-price ratio information respectively matched with the plurality of candidate models according to the program running result, and determines at least one target model from the candidate model set according to the performance-price ratio information.

[0127] Optionally, the calculation module comprises a first acquisition unit configured to acquire the resource utilization information indicated by the program running result matched with each candidate model, and determine the performance-price ratio information respectively matched with the plurality of candidate models according to the resource utilization information matched with each candidate model and the running specification information of the target application program.

[0128] Optionally, the monitoring module comprises a second acquisition unit configured to acquire the resource utilization rate indicated by the resource utilization information matched with each candidate model in each statistical period within a test period, and the request processing rate of each candidate model in each statistical period, and determine the performance score of each candidate model according to the resource utilization rate, the request processing rate and the running specification information matched with each candidate model, wherein the performance score is used to indicate the sustained processing capability of the candidate model to the resource within the test period.

[0129]

[0130] ​Optionally, the second obtaining unit comprises a first determining unit configured to determine a model utilization score of each candidate model according to the performance score of the candidate model, and determine the cost-performance information of each candidate model according to the model utilization score of the candidate model.

[0131] Optionally, the management module is further configured to obtain application performance information and data security information indicated by the feature information matched with the target application program, and determine a candidate model set matched with the target application program according to the application performance information and the data security information.

[0132] Optionally, the computing module comprises a second determining unit configured to determine a target recommended model set from the candidate model set according to the cost-performance information, and determine at least one target model matched with the target application program according to a weighted sum result of the cost-performance score of each model in the target recommended model set in the plurality of test time periods.

[0133] Optionally, the computing module comprises a third determining unit configured to determine an eliminated model set from the candidate model set according to the cost-performance information, determine at least one eliminated model matched with the target application program according to a weighted sum result of the cost-performance score of each model in the eliminated model set in the plurality of test time periods, and delete the eliminated model from the candidate model set.

[0134] According to another aspect of the embodiments of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is configured to execute the cloud instance model selection method when running.

[0135] According to another aspect of the embodiments of the present application, an electronic device for implementing the cloud instance model selection method is provided. The electronic device can be a terminal device or a server as shown in the drawings. Figure 1 The embodiments of the present application take a mobile phone and a computer as examples to illustrate the electronic device. As shown in the drawings, the electronic device comprises a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps of any of the method embodiments by using the computer program. Figure 8

[0136] Optionally, in the embodiments, the electronic device can be at least one of the plurality of network devices in the computer network.

[0137] Optionally, in the embodiments, the processor can be configured to execute the following steps by using the computer program:

[0138] ​S1, determining a candidate model set according to feature information of the target application program, wherein the feature information is used to indicate running specification information of the target application program;

[0139] S2, deploying respective instances of the candidate model set according to the mirror image of the target application program;

[0140] S3, determining program running results of the target application program according to the respective instances of the candidate model set according to target running conditions, wherein the target running conditions are used to control the same traffic resources received by the respective instances matched with the plurality of candidate models;

[0141] S4, determining performance-price ratio information respectively matched with the plurality of candidate models according to the program running results, and determining at least one target model from the candidate model set according to the performance-price ratio information.

[0142] Optionally, those skilled in the art can understand that, Figure 8 The structure shown is only schematic, and the electronic device can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, or the like. Figure 8 It does not limit the structure of the electronic device. For example, the electronic device can further include more or less components (such as a network interface, etc.) than those shown in the figure, or have a different configuration from that shown in the figure. Figure 8 Figure 8

[0143] The memory 802 can be used to store software programs and modules, such as program instructions / modules corresponding to the cloud instance model selection method and device in the embodiments of the present application. The processor 804 performs various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, implements the cloud instance model selection method described above. The memory 802 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 802 can further include a memory disposed remotely with respect to the processor 804, which can be connected to the terminal through a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. As an example, the network can include a wireless local area network (WLAN) based on a wireless communication technology such as Wi-Fi, a cellular network, or a combination thereof. Figure 8 ​​As shown, the memory 802 can include, but is not limited to, the management module 702, the deployment module 704, the monitoring module 706, and the computing module 708 in the cloud instance model selection apparatus. In addition, other module units in the cloud instance model selection apparatus can also be included, which will not be described herein.

[0144] Optionally, the transmission apparatus 806 is configured to receive or send data via a network. The network can include a wired network and a wireless network. In an example, the transmission apparatus 806 includes a network interface controller (NIC) which can be connected to other network devices and routers through a network cable to communicate with the Internet or a local area network. In an example, the transmission apparatus 806 is a radio frequency (RF) module which is configured to communicate with the Internet in a wireless manner.

[0145] In addition, the electronic device further includes a display 808 and a connection bus 810 which are configured to connect various module components in the electronic device.

[0146] In other embodiments, the terminal device or the server can be a node in a distributed system, and the distributed system can be a blockchain system. The blockchain system can be a distributed system formed by the plurality of nodes communicating through a network. The nodes can form a point-to-point network, and any computing device such as a server, a terminal, or other electronic device can become a node in the blockchain system by joining the point-to-point network.

[0147] According to an aspect of the present disclosure, a computer readable storage medium is provided. A processor of a computer device reads computer instructions from the computer readable storage medium. The processor executes the computer instructions to cause the computer device to perform the method provided in the various optional implementation manners.

[0148] Optionally, in the present embodiment, the computer readable storage medium can be configured to store a computer program for performing the following steps:

[0149] S1, determining a candidate model set according to characteristic information of a target application program, wherein the characteristic information is used to indicate running specification information of the target application program;

[0150] S2, deploying respective instances for a plurality of candidate models in the candidate model set according to an image of the target application program;

[0151] S3, determining program running results of the target application program by the instances corresponding to the plurality of candidate machine types respectively according to target running conditions, wherein the target running conditions are used to control the same traffic resources received by the instances corresponding to the plurality of candidate machine types respectively;

[0152] S4, determining performance-price ratio information corresponding to the plurality of candidate machine types respectively according to the program running results, and determining at least one target machine type from the candidate machine type set according to the performance-price ratio information.

[0153] Optionally, in the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory) or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an integral module or unit that includes the functions of the module or unit.

[0154] Optionally, in the embodiments, a person of ordinary skill in the art can understand that all or part of the steps in the above-mentioned embodiments of the various methods can be completed by instructing the hardware related to the terminal device by a program, and the program can be stored in a computer readable storage medium, and the storage medium can include a flash disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc.

[0155] The integrated units in the above-mentioned embodiments, if realized in the form of software function units and sold or used as independent products, can be stored in the above-mentioned computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

[0156] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0157] In several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other manners. Of course, the described apparatus embodiments are merely schematic, and the division of units is merely logical function division, and there can be other division manners in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, units or modules, and can be in electrical, mechanical or other forms.

[0158] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments of the present application.

[0159] In addition, each functional unit in the embodiments of the present application can be integrated in a processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware, or in the form of a software functional unit.

[0160] The above is merely the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, some improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should be considered as the protection scope of the present application.

Claims

1. A method for selecting cloud instance models, characterized in that, include: A set of candidate device models is determined based on the feature information of the target application, wherein the feature information is used to indicate the operating specifications of the target application; Deploy corresponding instances for multiple candidate models in the candidate model set based on the image of the target application; The instance corresponding to each of the candidate device models in the candidate device model set is determined to determine the program running result of the target application according to the target running conditions, wherein the target running conditions are used to control the traffic resources received by the instance that matches each of the candidate device models to be the same; Based on the program execution results, determine the cost-performance information that matches the multiple candidate models respectively, and determine at least one target model from the candidate model set based on the cost-performance information.

2. The method according to claim 1, characterized in that, The step of determining the cost-performance information that matches each of the multiple candidate models based on the program execution results includes: Obtain resource utilization information indicated by the program execution results that match each of the candidate models; Based on the resource utilization information matching each of the candidate device models and the runtime specification information of the target application, the cost-performance information matching each of the multiple candidate device models is determined.

3. The method according to claim 2, characterized in that, After determining the program execution result of the target application based on the target running conditions for each instance corresponding to one of the candidate device models in the candidate device set, the process includes: Obtain the resource utilization rate indicated by the resource utilization information matching each candidate model in each statistical period during the test period, and the request processing rate of each candidate model in each statistical period; A performance score for each candidate machine model is determined based on the resource utilization, request processing rate, and operating specification information matched with each candidate machine model, wherein the performance score is used to indicate the candidate machine model's continuous resource processing capability during the test period.

4. The method according to claim 3, characterized in that, After determining the performance score of each candidate machine model based on the resource utilization rate, request processing rate, and operating specification information matching each candidate machine model, the method further includes: A model utilization score is determined for each candidate model based on its performance score. The cost-performance information for each candidate model is determined based on the model utilization score of each candidate model.

5. The method according to claim 1, characterized in that, The step of determining the candidate device set based on the feature information of the target application includes: Obtain application performance information and data security information indicated by the feature information matching the target application; The candidate device set that matches the target application is determined based on the application performance information and the data security information.

6. The method according to claim 1, characterized in that, After determining the cost-performance information matching the multiple candidate models based on the program execution results, the process includes: Based on the cost-effectiveness information, a target recommended model set is determined from the candidate model set; Based on the weighted sum of the cost-performance scores of each model in the target recommended model set over multiple test periods, at least one target model that matches the target application is determined.

7. The method according to claim 1, characterized in that, After determining the cost-performance information matching the multiple candidate models based on the program execution results, the method further includes: The set of models to be phased out is determined from the set of candidate models based on the cost-effectiveness information. Based on the weighted sum of the cost-performance scores of each model in the set of eliminated models over multiple test periods, at least one eliminated model that matches the target application is determined. Remove the eliminated model from the candidate model set.

8. A cloud instance model selection device, characterized in that, include: The management module determines a set of candidate device models based on the characteristic information of the target application, wherein the characteristic information is used to indicate the operating specifications of the target application; The deployment module deploys instances corresponding to each of the multiple candidate models in the candidate model set based on the image of the target application. The monitoring module determines the program execution result of the target application based on the target running conditions of the instances corresponding to each of the multiple candidate device models in the candidate device model set. The target running conditions are used to control the traffic resources received by the instances that match each of the multiple candidate device models to be the same. The calculation module determines the cost-performance information that matches the multiple candidate models based on the program execution results, and determines at least one target model from the candidate model set based on the cost-performance information.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program is executed by a processor to perform the method described in any one of claims 1 to 7.

10. An electronic device, comprising: A memory and a processor, the memory being used to store a computer program, characterized in that the processor is used to perform the steps of the method according to any one of claims 1 to 7 when the computer program is invoked.