Cloud host recommendation method and device, electronic equipment and storage medium
By calculating the historical cloud host performance data usage and correlation of the account, the accuracy of cloud host recommendations is improved, the problem of low cloud host recommendations is solved, the personalized needs of the account are met, and the cloud resource configuration is optimized.
Patent Information
- Application Number
- CN202410992006.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-29
AI Technical Summary
The recommendation accuracy of cloud hosts is low, mainly because different accounts have unbalanced usage rates for the same type of cloud host, resulting in the unsuitable usage rate of cloud hosts when recommending the order quantity, which cannot meet the actual needs of the account.
By obtaining the average usage and correlation of the historical cloud host performance data of each account, calculating the similarity and recommendation scores, determining the most suitable cloud host for recommendations, ensuring the accuracy of recommendations.
It improves the accuracy of cloud host recommendations, meets the personalized needs of accounts, and optimizes the configuration and usage efficiency of cloud resources.
Smart Images

Figure CN119045989A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a cloud host recommendation method and device, electronic equipment, and storage medium. Background Art
[0002] With the continuous development of cloud computing, there are more and more types of cloud hosts, and different types of cloud hosts have different functions. In order to meet the functional requirements of an account, it is necessary to recommend the most suitable cloud host to the account from among the many types of cloud hosts.
[0003] In the related technology of recommending cloud hosts, the cloud host with the largest number of subscriptions among the cloud hosts ordered by different accounts at the same time is usually recommended to the account. Since the usage rates of the same type of cloud hosts by different accounts may be different, if a certain type of cloud host is ordered by a large number of accounts at a certain moment, but most accounts have a low usage rate of the cloud host, and only a small number of accounts have a high usage rate of the cloud host, then the cloud host has an uneven usage rate problem and is not suitable for recommendation to the account. Therefore, recommending cloud hosts based on the number of subscriptions results in a low accuracy rate in recommending cloud hosts. Summary of the invention
[0004] The present invention provides a cloud host recommendation method and device, electronic device and storage medium, which are mainly intended to solve the problem of low accuracy of cloud host recommendation.
[0005] According to a first aspect of the present disclosure, a method for recommending a cloud host is provided, comprising:
[0006] Obtain an average usage rate of first performance data of all first historical cloud hosts of a first account, obtain an average usage rate of second performance data of all second historical cloud hosts of at least one second account associated with the first account, and respectively obtain a first degree of association between each first historical cloud host and the first account among all the first historical cloud hosts, and respectively obtain a second degree of association between each second historical cloud host and the second account among all the second historical cloud hosts;
[0007] Performing similarity calculation between the average usage rates of the first performance data of two different types of the first historical cloud hosts to obtain a first similarity, and performing similarity calculation between the average usage rates of the second performance data of two different types of the second historical cloud hosts to obtain a second similarity;
[0008] Calculating a recommendation value by using the first similarity and the first correlation to obtain a first recommendation score, and calculating a recommendation value by using the second similarity and the second correlation to obtain a second recommendation score;
[0009] The target second historical cloud host with the target second recommendation score corresponding to the minimum value of the difference between the first recommendation score and the second recommendation score is determined as the recommended cloud host for the first account; the target second historical cloud host is the cloud host with the highest average second performance data usage rate among all the second historical cloud hosts of the second account with the target second recommendation score.
[0010] Optionally, after obtaining the average second performance data usage rate of all second historical cloud hosts of at least one second account associated with the first account, the method further includes:
[0011] Obtaining the number of types of all second historical cloud hosts of the second account;
[0012] Eliminate the target second account from the second accounts to obtain the eliminated second accounts; the target second account is an account of the type in the second accounts whose number is less than a preset threshold;
[0013] The step of obtaining the average usage rate of the second performance data of all second historical cloud hosts of at least one second account associated with the first account includes:
[0014] The average usage rate of the second performance data of all the second historical cloud hosts of the eliminated second account is obtained.
[0015] Optionally, performing similarity calculation between the first performance data usage rate averages of two different types of the first historical cloud hosts to obtain the first similarity, and performing similarity calculation between the second performance data usage rate averages of two different types of the second historical cloud hosts to obtain the second similarity includes:
[0016] Obtaining a first CPU usage average, a first storage usage average, and a first memory usage average in the first performance data usage average, and obtaining a second CPU usage average, a second storage usage average, and a second memory usage average in the second performance data usage average;
[0017] The first similarity is calculated based on the first CPU usage average, the first storage usage average, and the first memory usage average, and the second similarity is calculated based on the second CPU usage average, the second storage usage average, and the second memory usage average.
[0018] Optionally, calculating the first similarity according to the first CPU usage average, the first storage usage average, and the first memory usage average includes:
[0019] Calculating the difference between the average values of the first central processing unit usage of the two different types of the first historical cloud hosts to obtain a first difference result;
[0020] Calculating the difference between the first storage usage rate averages of the two different types of the first historical cloud hosts to obtain a second difference result;
[0021] Calculate the difference between the first memory usage rate averages of the two different types of the first historical cloud hosts to obtain a third difference result;
[0022] The first difference result, the second difference result and the third difference result are added together to obtain the first similarity.
[0023] Optionally, calculating the second similarity according to the second CPU usage average, the second storage usage average, and the second memory usage average includes:
[0024] Calculating the difference between the average values of the second CPU usage of the two different types of the second historical cloud hosts to obtain a fourth difference result;
[0025] Calculating the difference between the second storage usage rate averages of the two different types of the second historical cloud hosts to obtain a fifth difference result;
[0026] Calculate the difference between the second memory usage rate averages of the two different types of the second historical cloud hosts to obtain a sixth difference result;
[0027] The fourth difference result, the fifth difference result and the sixth difference result are added together to obtain the second similarity.
[0028] Optionally, the calculating a recommendation value by performing a calculation on the first similarity and the first association degree to obtain a first recommendation score, and the calculating a recommendation value by performing a calculation on the second similarity and the second association degree to obtain a second recommendation score comprises:
[0029] Calculating a quotient of the first similarity and the first association degree to obtain the first recommendation score;
[0030] A quotient is calculated for the second similarity and the second association degree to obtain the second recommendation score.
[0031] According to a second aspect of the present disclosure, a cloud host recommendation device is provided, comprising:
[0032] an acquisition unit, configured to acquire an average usage rate of first performance data of all first historical cloud hosts of a first account, acquire an average usage rate of second performance data of all second historical cloud hosts of at least one second account associated with the first account, and respectively acquire a first degree of association between each first historical cloud host of all the first historical cloud hosts and the first account, and respectively acquire a second degree of association between each second historical cloud host of all the second historical cloud hosts and the second account;
[0033] a calculation unit, configured to perform similarity calculation between the average usage rates of the first performance data of two different types of the first historical cloud hosts to obtain a first similarity, and perform similarity calculation between the average usage rates of the second performance data of two different types of the second historical cloud hosts to obtain a second similarity;
[0034] The calculation unit is further configured to calculate a recommendation value by using the first similarity and the first correlation to obtain a first recommendation score, and to calculate a recommendation value by using the second similarity and the second correlation to obtain a second recommendation score;
[0035] A determination unit is used to determine the target second historical cloud host with a target second recommendation score corresponding to the minimum value of the difference between the first recommendation score and the second recommendation score as the recommended cloud host for the first account; the target second historical cloud host is the cloud host with the highest average second performance data usage rate among all the second historical cloud hosts of the second account with the target second recommendation score.
[0036] Optionally, the device further comprises:
[0037] The acquisition unit is further configured to, after acquiring the average second performance data usage rate of all second historical cloud hosts of at least one second account associated with the first account, acquire the number of types of all second historical cloud hosts of the second account;
[0038] a removing unit, configured to remove a target second account from the second accounts to obtain a removed second account; the target second account is an account of the type in the second accounts whose number is less than a preset threshold;
[0039] The acquisition unit is further used to acquire an average usage rate of the second performance data of all second historical cloud hosts of the eliminated second account.
[0040] Optionally, the computing unit includes:
[0041] an acquisition module, configured to acquire a first CPU usage average, a first storage usage average, and a first memory usage average in the first performance data usage average, and to acquire a second CPU usage average, a second storage usage average, and a second memory usage average in the second performance data usage average;
[0042] The first calculation module is used to calculate the first similarity according to the first average CPU usage, the first storage usage, and the first memory usage, and to calculate the second similarity according to the second average CPU usage, the second storage usage, and the second memory usage.
[0043] Optionally, the first calculation module is further used to:
[0044] Calculating the difference between the average values of the first central processing unit usage of the two different types of the first historical cloud hosts to obtain a first difference result;
[0045] Calculating the difference between the first storage usage rate averages of the two different types of the first historical cloud hosts to obtain a second difference result;
[0046] Calculate the difference between the first memory usage rate averages of the two different types of the first historical cloud hosts to obtain a third difference result;
[0047] The first difference result, the second difference result and the third difference result are added together to obtain the first similarity.
[0048] Optionally, the first calculation module is further used to:
[0049] Calculating the difference between the average values of the second CPU usage of the two different types of the second historical cloud hosts to obtain a fourth difference result;
[0050] Calculating the difference between the second storage usage rate averages of the two different types of the second historical cloud hosts to obtain a fifth difference result;
[0051] Calculate the difference between the second memory usage rate averages of the two different types of the second historical cloud hosts to obtain a sixth difference result;
[0052] The fourth difference result, the fifth difference result and the sixth difference result are added together to obtain the second similarity.
[0053] Optionally, the computing unit further includes:
[0054] A second calculation module, configured to calculate a quotient of the first similarity and the first association degree to obtain the first recommendation score;
[0055] The third calculation module is used to calculate the quotient of the second similarity and the second association degree to obtain the second recommendation score.
[0056] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0057] at least one processor; and
[0058] a memory communicatively connected to the at least one processor; wherein,
[0059] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.
[0060] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.
[0061] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.
[0062] The cloud host recommendation method and device, electronic device and storage medium provided by the present disclosure obtain an average usage rate of first performance data of all first historical cloud hosts of a first account, obtain an average usage rate of second performance data of all second historical cloud hosts of at least one second account associated with the first account, and respectively obtain a first correlation degree between each first historical cloud host and the first account in all the first historical cloud hosts, and respectively obtain a second correlation degree between each second historical cloud host and the second account in all the second historical cloud hosts; perform similarity calculation between the average usage rates of the first performance data of two different types of the first historical cloud hosts to obtain a first similarity, and calculate the first correlation degree between the average usage rates of the first performance data of two different types of the first historical cloud hosts, and calculate the first correlation degree between the average usage rates of the first historical cloud hosts of two different types of the first historical cloud hosts, and calculate the first correlation degree between the average usage rates of the first historical cloud hosts of two different types of the first historical cloud hosts, and calculate the first correlation degree between the average usage rates of the second ... first historical cloud hosts of two different types of the first historical cloud hosts, and calculate the first correlation degree between the first historical cloud hosts of two different types of the first historical cloud hosts, and calculate the first correlation degree between the first historical cloud hosts of The similarity calculation is performed between the average values of the second performance data usage of the second historical cloud hosts of the same type to obtain the second similarity; the recommendation value calculation is performed between the first similarity and the first correlation to obtain the first recommendation score, and the recommendation value calculation is performed between the second similarity and the second correlation to obtain the second recommendation score; the target second historical cloud host with the target second recommendation score corresponding to the minimum value of the difference between the first recommendation score and the second recommendation score is determined as the recommended cloud host of the first account; the target second historical cloud host is the cloud host with the highest average value of the second performance data usage among all the second historical cloud hosts of the second account of the target second recommendation score. Compared with the related art, the embodiment of the present disclosure calculates the similarity between the average values of the performance data usage of different types of historical cloud hosts of different accounts, and calculates the recommendation value of the correlation and similarity of the historical cloud host with the account to obtain the recommendation score. Based on the recommendation score, the recommended cloud host is determined from the historical cloud hosts, and the cloud host recommendation is realized by using the average value of the performance data usage of the historical cloud hosts of the account, thereby improving the accuracy of the recommendation of the cloud host.
[0063] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0065] Figure 1 A flowchart of a method for recommending a cloud host provided by an embodiment of the present disclosure;
[0066] Figure 2 A flowchart of a method for removing a second account provided by an embodiment of the present disclosure;
[0067] Figure 3 A schematic diagram of a structure of a recommended device of a cloud host provided by an embodiment of the present disclosure;
[0068] Figure 4 A schematic diagram of the structure of another recommended device of a cloud host provided by an embodiment of the present disclosure;
[0069] Figure 5 A schematic block diagram of an exemplary electronic device provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0070] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0071] The following describes a recommended method and apparatus for a cloud host, an electronic device, and a storage medium according to an embodiment of the present disclosure with reference to the accompanying drawings.
[0072] Figure 1 A flowchart of a method for recommending a cloud host provided by an embodiment of the present disclosure.
[0073] like Figure 1 As shown, the method is applied in a server, and the method comprises the following steps:
[0074] Step 101, obtaining an average usage rate of first performance data of all first historical cloud hosts of a first account, obtaining an average usage rate of second performance data of all second historical cloud hosts of at least one second account associated with the first account, and respectively obtaining a first degree of association between each first historical cloud host and the first account among all the first historical cloud hosts, and respectively obtaining a second degree of association between each second historical cloud host and the second account among all the second historical cloud hosts.
[0075] The first account is an account used to log in and control the first historical cloud host, the second account is an account used to log in and control the second historical cloud host, the first historical cloud host is a cloud host that the first account has used, the second historical cloud host is a cloud host that the second account has used, the first performance data usage average is the average value of the performance data of the first historical cloud host of the first account within a preset period, and the second performance data usage average is the average value of the performance data of the second historical cloud host of the second account within a preset period, wherein the preset period can be any value, for example, 7 days, and the performance data usage includes but is not limited to the CPU usage, storage usage, and memory usage. The first correlation degree is the correlation degree or closeness between each first historical cloud host and the first account, and the second correlation degree is the correlation degree or closeness between each second historical cloud host and the second account.
[0076] By calling an application programming interface, a database of a cloud computing platform is accessed to obtain a first performance data usage average, a second performance data usage average, a first correlation, and a second correlation.
[0077] By deeply analyzing the historical data and correlation of the account, we provide the account with personalized and accurate cloud host recommendation services, and optimize the configuration and utilization efficiency of cloud resources.
[0078] Step 102, performing similarity calculation between the first performance data usage rate averages of two different types of the first historical cloud hosts to obtain a first similarity, and performing similarity calculation between the second performance data usage rate averages of two different types of the second historical cloud hosts to obtain a second similarity.
[0079] By analyzing similarities, cloud service providers can better understand the performance requirements of accounts for different types of cloud hosts, thereby optimizing resource allocation and ensuring that users can obtain cloud services with the required performance level.
[0080] The calculation formula of similarity can be realized by formula (1):
[0081]
[0082] Among them, ΔC1 and ΔC2 are the average CPU usage rates of different types of historical cloud hosts of the same account, ΔM1 and ΔM2 are the average storage usage rates of different types of historical cloud hosts of the same account, and ΔD1 and ΔD2 are the average memory usage rates of different types of historical cloud hosts of the same account.
[0083] Step 103 , calculating a recommendation value by using the first similarity and the first correlation to obtain a first recommendation score, and calculating a recommendation value by using the second similarity and the second correlation to obtain a second recommendation score.
[0084] The recommendation score is a comprehensive evaluation indicator used to quantitatively evaluate the degree to which a cloud host recommends an account. By comprehensively considering factors in the two dimensions of similarity and correlation, it can reduce errors or biases caused by a single factor, thereby improving the accuracy of the recommendation.
[0085] The calculation formula of the recommendation degree can be realized by formula (2):
[0086]
[0087] Among them, S is the recommendation score, R is the relevance, and θ is the similarity.
[0088] Step 104: determine the target second historical cloud host with the target second recommendation score corresponding to the minimum value of the difference between the first recommendation score and the second recommendation score as the recommended cloud host for the first account; the target second historical cloud host is the cloud host with the highest average second performance data usage rate among all the second historical cloud hosts of the second account with the target second recommendation score.
[0089] By comprehensively considering information from multiple dimensions (such as similarity, correlation, and average performance data usage), we can provide personalized cloud host recommendations for accounts. Such recommendations not only take into account the actual needs and usage habits of the account, but also the performance and availability of the cloud host, thereby improving the accuracy and effectiveness of the recommendations.
[0090] To facilitate understanding, an example is provided. Suppose the first recommendation score is 5, and there are two second recommendation scores, 4 and 2 respectively. Among them, the second account corresponding to the second recommendation score of 4 is a, and the second account corresponding to the second recommendation score of 2 is b. The first account corresponding to the first recommendation score of 5 is layer. a has two second historical cloud hosts, A and B, respectively. The average second performance data usage rate of A is 80%, and the average second performance data usage rate of B is 30%. b has two second historical cloud hosts, C and D, respectively. The average second performance data usage rate of C is 60%, and the average second performance data usage rate of D is 40%. Then the recommended cloud host for c is A.
[0091] The cloud host recommendation method provided by the present disclosure obtains an average usage rate of first performance data of all first historical cloud hosts of a first account, obtains an average usage rate of second performance data of all second historical cloud hosts of at least one second account associated with the first account, and obtains a first correlation degree between each first historical cloud host and the first account in all the first historical cloud hosts, and obtains a second correlation degree between each second historical cloud host and the second account in all the second historical cloud hosts; performs similarity calculation between the average usage rates of the first performance data of two different types of the first historical cloud hosts to obtain a first similarity, and calculates the first similarity between the average usage rates of the first performance data of two different types of the first historical cloud hosts. The second historical cloud host and the second historical cloud host are used to calculate the similarity between the second performance data usage rate averages of the second historical cloud host to obtain the second similarity; the first similarity and the first correlation are used to calculate the recommendation value to obtain the first recommendation score, and the second similarity and the second correlation are used to calculate the recommendation value to obtain the second recommendation score; the target second historical cloud host with the target second recommendation score corresponding to the minimum value of the difference between the first recommendation score and the second recommendation score is determined as the recommended cloud host for the first account; the target second historical cloud host is the cloud host with the highest second performance data usage rate average among all the second historical cloud hosts of the second account with the target second recommendation score. Compared with the related art, the embodiment of the present disclosure calculates the similarity between the performance data usage rate averages of different types of historical cloud hosts of different accounts, and calculates the recommendation value of the correlation and similarity between the historical cloud host and the account to obtain the recommendation score. Based on the recommendation score, the recommended cloud host is determined from the historical cloud hosts, and the cloud host recommendation is realized by using the performance data usage rate average of the historical cloud hosts of the account, thereby improving the accuracy of the cloud host recommendation.
[0092] In actual applications, after obtaining the average second performance data usage rate of all second historical cloud hosts of at least one second account associated with the first account, the number of types of second historical cloud hosts of the second account may be too small, and the effect of recommending cloud hosts is poor, and they need to be eliminated, which can be achieved by but not limited to the following methods, such as Figure 2 As shown, Figure 2 A flowchart of a method for removing a second account provided in an embodiment of the present disclosure includes:
[0093] Step 201, obtaining the number of types of all the second historical cloud hosts of the second account.
[0094] The number of types refers to the number of cloud hosts of different types in all historical cloud hosts of the second account. The number of types is used to indicate the total number of second historical cloud host models or categories used by the second account. The type here refers to different specifications, configurations or models of cloud hosts, such as different computing power, storage capacity or network bandwidth.
[0095] The number of types can also be used as an indicator to evaluate data quality and reliability. If an account has only used one or a few types of cloud hosts, the analysis and recommendations based on these data may not be comprehensive and accurate. On the contrary, if an account has used multiple types of cloud hosts, the analysis and recommendations based on these data may be more representative and reliable.
[0096] Step 202: Eliminate target second accounts from the second accounts to obtain eliminated second accounts; the target second accounts are accounts of the type whose number in the second accounts is less than a preset threshold.
[0097] By removing accounts with a small number of types, we can ensure that the data set for subsequent analysis is more complete and representative. These accounts with a small number of types may lack diversity when using cloud hosts, and their data may not be sufficient to provide valuable reference or prediction information; the preset threshold can be any value, for example, 5, but it should be clear that this statement is not intended to limit the preset threshold to 5, it can also be other values.
[0098] To facilitate understanding, an example is provided. Assume that there are 5 second accounts, namely d, e, f, g, and h, and the preset threshold is 5. Among them, the number of types of second historical cloud hosts for d is 6, the number of types of second historical cloud hosts for e is 7, the number of types of second historical cloud hosts for f is 8, the number of types of second historical cloud hosts for g is 4, and the number of types of second historical cloud hosts for h is 3. Then g and h are the target second accounts and need to be eliminated.
[0099] Step 203, obtaining the average usage rate of the second performance data of all second historical cloud hosts of at least one second account associated with the first account includes:
[0100] The average usage rate of the second performance data of all the second historical cloud hosts of the eliminated second account is obtained.
[0101] In the subsequent recommendation process, these performance data usage averages will be used as an important reference. Since we have eliminated accounts with a small number of types, these averages can better represent the actual situation and needs of most users, making the final recommendation results more accurate and useful.
[0102] As a refinement of step 102, when performing the similarity calculation between the first performance data usage averages of two different types of the first historical cloud hosts to obtain the first similarity, and performing the similarity calculation between the second performance data usage averages of two different types of the second historical cloud hosts to obtain the second similarity, it can be implemented in but not limited to the following manner: obtaining the first central processing unit usage average, the first storage usage average, and the first memory usage average in the first performance data usage average, and obtaining the second central processing unit usage average, the second storage usage average, and the second memory usage average of the second performance data usage average; calculating the first similarity based on the first central processing unit usage average, the first storage usage average, and the first memory usage average, and calculating the second similarity based on the second central processing unit usage average, the second storage usage average, and the second memory usage average. By comparing the average CPU usage, storage usage, and memory usage of the first account and the second account, the similarity between them can be calculated. The similarity can help determine whether the cloud host usage behaviors are similar and whether they may have similar performance requirements and usage patterns.
[0103] As a refinement of the above embodiment, when executing the calculation of the first similarity based on the first CPU usage average, the first storage usage average, and the first memory usage average, it can be implemented in but not limited to the following manner: performing a difference calculation between the first CPU usage averages of the two different types of the first historical cloud hosts to obtain a first difference result; performing a difference calculation between the first storage usage averages of the two different types of the first historical cloud hosts to obtain a second difference result; performing a difference calculation between the first memory usage averages of the two different types of the first historical cloud hosts to obtain a third difference result; and adding the first difference result, the second difference result, and the third difference result to obtain the first similarity.
[0104] Specifically, the implementation process of this embodiment is a textual description of formula (1).
[0105] As a refinement of the above embodiment, when executing the calculation of the second similarity based on the second CPU usage average, the second storage usage average, and the second memory usage average, it can be implemented in but not limited to the following manner: performing a difference calculation between the second CPU usage averages of the two different types of the second historical cloud hosts to obtain a fourth difference result; performing a difference calculation between the second storage usage averages of the two different types of the second historical cloud hosts to obtain a fifth difference result; performing a difference calculation between the second memory usage averages of the two different types of the second historical cloud hosts to obtain a sixth difference result; and adding the fourth difference result, the fifth difference result, and the sixth difference result to obtain the second similarity.
[0106] Specifically, the implementation process of this embodiment is a textual description of formula (1).
[0107] As a refinement of step 103, when performing the steps of calculating the recommendation value of the first similarity and the first correlation to obtain the first recommendation score, and calculating the recommendation value of the second similarity and the second correlation to obtain the second recommendation score, it can be implemented in but not limited to the following manner: calculating the quotient of the first similarity and the first correlation to obtain the first recommendation score; and calculating the quotient of the second similarity and the second correlation to obtain the second recommendation score.
[0108] Specifically, the implementation process of this embodiment is a textual description of formula (2).
[0109] In summary, the embodiments of the present disclosure can achieve the following effects:
[0110] The disclosed embodiment calculates the similarity between the mean performance data usage rates of different types of historical cloud hosts of different accounts, and calculates the recommendation value based on the correlation and similarity between the historical cloud hosts and the accounts to obtain the recommendation score. Based on the recommendation score, the recommended cloud hosts are determined from the historical cloud hosts, thereby achieving the recommendation of cloud hosts by using the mean performance data usage rates of the historical cloud hosts of the accounts, thereby improving the accuracy of the recommendation of cloud hosts.
[0111] Corresponding to the above-mentioned cloud host recommendation method, the present invention also provides a cloud host recommendation device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.
[0112] Figure 3 A schematic diagram of a recommended device for a cloud host provided by an embodiment of the present disclosure, wherein the device is applied to a server, such as Figure 3 As shown, including:
[0113] The acquisition unit 31 is used to acquire an average usage rate of the first performance data of all first historical cloud hosts of the first account, acquire an average usage rate of the second performance data of all second historical cloud hosts of at least one second account associated with the first account, and respectively acquire a first degree of association between each first historical cloud host of all the first historical cloud hosts and the first account, and respectively acquire a second degree of association between each second historical cloud host of all the second historical cloud hosts and the second account;
[0114] A calculation unit 32 is used to perform similarity calculation between the average usage rates of the first performance data of two different types of the first historical cloud hosts to obtain a first similarity, and to perform similarity calculation between the average usage rates of the second performance data of two different types of the second historical cloud hosts to obtain a second similarity;
[0115] The calculation unit 32 is further configured to calculate a recommendation value by using the first similarity and the first correlation to obtain a first recommendation score, and to calculate a recommendation value by using the second similarity and the second correlation to obtain a second recommendation score;
[0116] The determination unit 33 is used to determine the target second historical cloud host with the target second recommendation score corresponding to the minimum value of the difference between the first recommendation score and the second recommendation score as the recommended cloud host for the first account; the target second historical cloud host is the cloud host with the highest average second performance data usage rate among all the second historical cloud hosts of the second account with the target second recommendation score.
[0117] The cloud host recommendation device provided by the present disclosure obtains an average usage rate of first performance data of all first historical cloud hosts of a first account, obtains an average usage rate of second performance data of all second historical cloud hosts of at least one second account associated with the first account, and respectively obtains a first correlation degree between each first historical cloud host and the first account in all the first historical cloud hosts, and respectively obtains a second correlation degree between each second historical cloud host and the second account in all the second historical cloud hosts; performs similarity calculation between the average usage rates of the first performance data of two different types of the first historical cloud hosts to obtain a first similarity, and calculates the first similarity between the average usage rates of the first performance data of two different types of the first historical cloud hosts. The second historical cloud host and the second historical cloud host are used to calculate the similarity between the second performance data usage rate averages of the second historical cloud host to obtain the second similarity; the first similarity and the first correlation are used to calculate the recommendation value to obtain the first recommendation score, and the second similarity and the second correlation are used to calculate the recommendation value to obtain the second recommendation score; the target second historical cloud host with the target second recommendation score corresponding to the minimum value of the difference between the first recommendation score and the second recommendation score is determined as the recommended cloud host for the first account; the target second historical cloud host is the cloud host with the highest second performance data usage rate average among all the second historical cloud hosts of the second account with the target second recommendation score. Compared with the related art, the embodiment of the present disclosure calculates the similarity between the performance data usage rate averages of different types of historical cloud hosts of different accounts, and calculates the recommendation value of the correlation and similarity between the historical cloud host and the account to obtain the recommendation score. Based on the recommendation score, the recommended cloud host is determined from the historical cloud hosts, and the cloud host recommendation is realized by using the performance data usage rate average of the historical cloud hosts of the account, thereby improving the accuracy of the cloud host recommendation.
[0118] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 4 As shown, the device also includes:
[0119] The acquisition unit 31 is further configured to, after acquiring the average second performance data usage rate of all second historical cloud hosts of at least one second account associated with the first account, acquire the number of types of all second historical cloud hosts of the second account;
[0120] A removal unit 34 is used to remove a target second account from the second accounts to obtain a removed second account; the target second account is an account of the type in the second accounts whose number is less than a preset threshold;
[0121] The acquisition unit 31 is further used to acquire an average usage rate of the second performance data of all second historical cloud hosts of the removed second account.
[0122] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 4 As shown, the calculation unit 32 includes:
[0123] An acquisition module 321 is used to acquire a first CPU usage average, a first storage usage average, and a first memory usage average in the first performance data usage average, and to acquire a second CPU usage average, a second storage usage average, and a second memory usage average in the second performance data usage average;
[0124] The first calculation module 322 is used to calculate the first similarity based on the first average CPU usage, the first average storage usage, and the first average memory usage, and to calculate the second similarity based on the second average CPU usage, the second average storage usage, and the second average memory usage.
[0125] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 4 As shown, the first calculation module 322 is also used for:
[0126] Calculating the difference between the average values of the first central processing unit usage of the two different types of the first historical cloud hosts to obtain a first difference result;
[0127] Calculating the difference between the first storage usage rate averages of the two different types of the first historical cloud hosts to obtain a second difference result;
[0128] Calculate the difference between the first memory usage rate averages of the two different types of the first historical cloud hosts to obtain a third difference result;
[0129] The first difference result, the second difference result and the third difference result are added together to obtain the first similarity.
[0130] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 4 As shown, the first calculation module 322 is also used for:
[0131] Calculating the difference between the average values of the second CPU usage of the two different types of the second historical cloud hosts to obtain a fourth difference result;
[0132] Calculating the difference between the second storage usage rate averages of the two different types of the second historical cloud hosts to obtain a fifth difference result;
[0133] Calculate the difference between the second memory usage rate averages of the two different types of the second historical cloud hosts to obtain a sixth difference result;
[0134] The fourth difference result, the fifth difference result and the sixth difference result are added together to obtain the second similarity.
[0135] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 4 As shown, the calculation unit 32 also includes:
[0136] A second calculation module 323, configured to calculate a quotient of the first similarity and the first association to obtain the first recommendation score;
[0137] The third calculation module 324 is used to calculate the quotient of the second similarity and the second association degree to obtain the second recommendation score.
[0138] It should be noted that the above explanation of the method embodiment is also applicable to the device of the embodiment of the present disclosure, and the principle is the same, which is no longer limited in the embodiment of the present disclosure.
[0139] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0140] Figure 5 A schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0141] like Figure 5As shown, the device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 402 or a computer program loaded from a storage unit 408 to a RAM (Random Access Memory) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An I / O (Input / Output) interface 405 is also connected to the bus 404.
[0142] A number of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0143] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as the recommendation method of the cloud host. For example, in some embodiments, the recommendation method of the cloud host may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to execute the aforementioned cloud host recommendation method in any other appropriate manner (eg, by means of firmware).
[0144] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0145] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0146] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory) or a flash memory, an optical fiber, a CD-ROM (Compact Dis sc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0147] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0148] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0149] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0150] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0151] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0152] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for recommending a cloud host, characterized in that: include: Obtain an average usage rate of first performance data of all first historical cloud hosts of a first account, obtain an average usage rate of second performance data of all second historical cloud hosts of at least one second account associated with the first account, and respectively obtain a first degree of association between each first historical cloud host and the first account among all the first historical cloud hosts, and respectively obtain a second degree of association between each second historical cloud host and the second account among all the second historical cloud hosts; Calculating the similarity between the average usage rates of the first performance data of two different types of the first historical cloud hosts to obtain a first similarity, and calculating the similarity between the average usage rates of the second performance data of two different types of the second historical cloud hosts to obtain a second similarity; Calculating a recommendation value by using the first similarity and the first correlation to obtain a first recommendation score, and calculating a recommendation value by using the second similarity and the second correlation to obtain a second recommendation score; Determine the target second historical cloud host with the target second recommendation score corresponding to the minimum value of the difference between the first recommendation score and the second recommendation score as the recommended cloud host for the first account; The target second historical cloud host is a cloud host having the highest average second performance data usage rate among all the second historical cloud hosts of the second account with the target second recommendation score.
2. The method according to claim 1, characterized in that After obtaining the average second performance data usage rate of all second historical cloud hosts of at least one second account associated with the first account, the method further includes: Obtaining the number of types of all second historical cloud hosts of the second account; Eliminate the target second account from the second accounts to obtain the eliminated second accounts; the target second account is an account of the type in the second accounts whose number is less than a preset threshold; The step of obtaining the average usage rate of the second performance data of all second historical cloud hosts of at least one second account associated with the first account includes: The average usage rate of the second performance data of all the second historical cloud hosts of the eliminated second account is obtained.
3. The method according to claim 1, characterized in that The step of calculating the similarity between the first performance data usage rate averages of two different types of the first historical cloud hosts to obtain the first similarity, and calculating the similarity between the second performance data usage rate averages of two different types of the second historical cloud hosts to obtain the second similarity includes: Obtaining a first CPU usage average, a first storage usage average, and a first memory usage average in the first performance data usage average, and obtaining a second CPU usage average, a second storage usage average, and a second memory usage average in the second performance data usage average; The first similarity is calculated based on the first CPU usage average, the first storage usage average, and the first memory usage average, and the second similarity is calculated based on the second CPU usage average, the second storage usage average, and the second memory usage average.
4. The method according to claim 3, characterized in that The calculating the first similarity according to the first CPU usage average, the first storage usage average, and the first memory usage average includes: Calculating the difference between the average values of the first central processing unit usage of the two different types of the first historical cloud hosts to obtain a first difference result; Calculating the difference between the first storage usage rate averages of the two different types of the first historical cloud hosts to obtain a second difference result; Calculate the difference between the first memory usage rate averages of the two different types of the first historical cloud hosts to obtain a third difference result; The first difference result, the second difference result and the third difference result are added together to obtain the first similarity.
5. The method according to claim 3, characterized in that: Calculating the second similarity according to the second CPU usage average, the second storage usage average, and the second memory usage average includes: Calculating the difference between the average values of the second CPU usage of the two different types of the second historical cloud hosts to obtain a fourth difference result; Calculating the difference between the second storage usage rate averages of the two different types of the second historical cloud hosts to obtain a fifth difference result; Calculate the difference between the second memory usage rate averages of the two different types of the second historical cloud hosts to obtain a sixth difference result; The fourth difference result, the fifth difference result and the sixth difference result are added together to obtain the second similarity.
6. The method according to claim 1, characterized in that The step of calculating a recommendation value by using the first similarity and the first correlation to obtain a first recommendation score, and calculating a recommendation value by using the second similarity and the second correlation to obtain a second recommendation score comprises: Calculating a quotient of the first similarity and the first association degree to obtain the first recommendation score; A quotient is calculated for the second similarity and the second association degree to obtain the second recommendation score.
7. A cloud host recommendation device, characterized in that: include: an acquisition unit, configured to acquire an average usage rate of first performance data of all first historical cloud hosts of a first account, acquire an average usage rate of second performance data of all second historical cloud hosts of at least one second account associated with the first account, and respectively acquire a first degree of association between each first historical cloud host of all the first historical cloud hosts and the first account, and respectively acquire a second degree of association between each second historical cloud host of all the second historical cloud hosts and the second account; a calculation unit, configured to perform similarity calculation between the average usage rates of the first performance data of two different types of the first historical cloud hosts to obtain a first similarity, and perform similarity calculation between the average usage rates of the second performance data of two different types of the second historical cloud hosts to obtain a second similarity; The calculation unit is further configured to calculate a recommendation value by using the first similarity and the first correlation to obtain a first recommendation score, and to calculate a recommendation value by using the second similarity and the second correlation to obtain a second recommendation score; a determining unit, configured to determine a target second historical cloud host having a target second recommendation score corresponding to a minimum value of a difference between the first recommendation score and the second recommendation score as a recommended cloud host for the first account; The target second historical cloud host is a cloud host having the highest average second performance data usage rate among all the second historical cloud hosts of the second account with the target second recommendation score.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.
10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
