Physical machine determination method, apparatus and device, and storage medium
By monitoring physical machine indicators and using Skyline algorithm and TOPSIS evaluation methods, the problem of unbalanced physical machine load in cloud computing is solved and the resource scheduling efficiency of cloud platform is improved.
Patent Information
- Application Number
- CN202310630212.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2024-12-03
AI Technical Summary
In cloud computing scenarios, it is impossible to reasonably select the target host based on the real-time load of the physical machine, resulting in unbalanced load of the physical host and low cloud service quality.
By monitoring the indicators of the physical machine, using the Skyline algorithm and TOPSIS evaluation method, combined with the weight percentage specified by the user, the target physical machine that is most suitable for virtual machine creation is selected.
It improves the efficiency of physical machine screening, saves computing resources, ensures that the physical machine created by the virtual machine meets actual needs, and improves the resource scheduling efficiency of the cloud platform.
Smart Images

Figure CN119065778A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a method, device, equipment and storage medium for determining a physical machine. Background Art
[0002] With the development of cloud computing technology, cloud platforms have been widely used in cloud computing scenarios to manage and schedule the resources of multiple physical machines by creating or migrating virtual machines. If the destination host cannot be reasonably selected according to the real-time load of the physical machine, it will lead to unbalanced load on the physical hosts of the cloud platform and low cloud service quality.
[0003] Therefore, how to fully consider the relevant indicator information of each physical machine and select a suitable physical machine from multiple physical machines to create a virtual machine is a problem that needs to be solved urgently. Summary of the invention
[0004] The present invention provides a method, device, equipment and storage medium for determining a physical machine, which can determine the optimal physical machine for creating a virtual machine.
[0005] According to one aspect of the present invention, a method for determining a physical machine is provided, comprising:
[0006] In response to the virtual machine creation request, determine monitoring indicators for the candidate physical machine and actual values corresponding to the monitoring indicators of the candidate physical machine;
[0007] According to the actual value, the candidate physical machines are screened to determine the primary screening physical machines;
[0008] The weight percentage corresponding to each monitoring indicator is determined, and based on the weight percentage, a target physical machine for virtual machine creation is determined from the preliminarily screened physical machines.
[0009] Optionally, screening the candidate physical machines according to the actual value to determine the primary screening physical machines includes:
[0010] Based on the dominance principle of the Skyline algorithm, determining the dominance relationship between the candidate physical machines according to the actual value;
[0011] According to the dominance relationship, a candidate physical machine that is not dominated by other candidate physical machines is determined as a preliminary screening physical machine.
[0012] The above technical solution can judge the dominance relationship between physical machines by combining the actual values of each indicator of each candidate physical machine based on the dominance principle of the Skyline algorithm, so that the physical machine that is not dominated by other physical machines can be determined from the candidate physical machines according to the determined dominance relationship. It provides a method for preliminary screening of candidate physical machines, which can eliminate physical machines that do not meet the requirements in advance, helping to improve the efficiency of subsequent physical machine screening and save computer resources.
[0013] Optionally, according to the dominance relationship, determining a candidate physical machine that is not dominated by other candidate physical machines as a preliminary screening physical machine includes:
[0014] According to the dominance relationship, determine a set of physical machines dominated by each candidate physical machine;
[0015] The candidate physical machines that do not appear in the set of physical machines controlled by each candidate physical machine are determined as preliminary screening physical machines.
[0016] The above technical solution determines the set of physical machines that can be dominated by each candidate physical machine based on the domination relationship between them, thereby determining the physical machines that do not belong to the domination set of any other physical machines as the initial screening physical machines. It provides an implementable method for determining the initial screening physical machines, which can better utilize the domination relationship to perform preliminary screening of candidate physical machines, thereby pre-eliminating physical machines that do not meet the requirements, helping to improve the efficiency of subsequent physical machine screening and save computer resources.
[0017] Optionally, determine the weight percentage corresponding to each monitoring indicator, including:
[0018] Based on the preset front-end interactive interface, the monitoring indicators are displayed and the weight percentage of the monitoring indicators specified by the user is obtained; and / or,
[0019] According to the business scenario corresponding to the virtual machine creation request, set the corresponding weight percentage for each monitoring indicator.
[0020] The above technical solution can determine the weight percentage of each monitoring indicator through user specification, or determine the weight percentage of each monitoring indicator through analysis of business scenarios, or combine the above two determination methods to conduct a comprehensive analysis to determine the weight percentage of each monitoring indicator. By providing three feasible implementation methods for determining the weight percentage of each monitoring indicator, the determined weight percentage can be made more comprehensive and more in line with actual needs, which is helpful for the subsequent screening of target physical machines.
[0021] Optionally, determining a target physical machine for virtual machine creation from the preliminarily screened physical machines according to the weight percentage includes:
[0022] Based on the preset hierarchical analysis algorithm, an assignment matrix is generated according to the weight percentage corresponding to each monitoring indicator;
[0023] Based on the TOPSIS evaluation method and according to the assignment matrix, a target physical machine for virtual machine creation is determined from the preliminarily screened physical machines.
[0024] The above technical solution generates an assignment matrix corresponding to the weight percentage of each monitoring indicator by utilizing the hierarchical analysis algorithm, and further screens the initially screened physical machines according to the assignment matrix based on the TOPSIS evaluation method, so as to determine the target physical machine that is most suitable for virtual machine creation. The weight percentage corresponding to each monitoring indicator is given, and the initially screened physical machines are screened again, thereby achieving a comprehensive analysis and ensuring the effectiveness of the determined physical machines.
[0025] Optionally, based on the TOPSIS evaluation method and according to the assignment matrix, determining a target physical machine for virtual machine creation from the preliminarily screened physical machines includes:
[0026] Based on the TOPSIS evaluation method, according to the assignment matrix, the closeness between each preliminary screening physical machine and the ideal physical machine is determined respectively;
[0027] The preliminarily screened physical machines are sorted according to the closeness, and a target physical machine for virtual machine creation is determined from the preliminarily screened physical machines according to the sorting result.
[0028] The above technical solution first determines the closeness between each initially screened physical machine and the ideal physical machine by using the TOPSIS evaluation method and the assignment matrix, and further sorts the initially screened physical machines according to the closeness, so as to screen out the target physical machine according to the sorting results. An implementable method for secondary screening of the initially screened physical machines based on the TOPSIS evaluation method is provided, which can better evaluate the performance of each initially screened physical machine, thereby determining a more comprehensive physical machine that better meets actual needs. After the subsequent cloud platform creates a virtual machine based on the target physical machine, more efficient resource scheduling can be achieved.
[0029] Optionally, determining monitoring indicators for the candidate physical machine and actual values corresponding to the monitoring indicators of the candidate physical machine includes:
[0030] Determine the monitoring indicators for the candidate physical machines according to the indicator list in the preset configuration file;
[0031] The preset data collection platform is controlled to call the application programming interface corresponding to the monitoring index, and collect the actual value corresponding to each monitoring index of the candidate physical machine.
[0032] The above technical solution determines the monitoring indicators of the candidate physical machines according to the indicator list in the preset configuration file. The user can pre-specify the monitoring indicators according to the configuration file, thereby determining the monitoring indicators that better meet the actual needs. Based on the corresponding interface of the preset data acquisition platform, the actual values of the corresponding monitoring indicators of each candidate physical machine are collected. An implementable method for determining the monitoring indicators and the corresponding actual values is provided, which is helpful for the subsequent determination of the physical machine that meets the actual needs.
[0033] According to another aspect of the present invention, a device for determining a physical machine is provided, comprising:
[0034] A first determination module, configured to determine, in response to a request to create a virtual machine, a monitoring indicator for a candidate physical machine and an actual value corresponding to the monitoring indicator of the candidate physical machine;
[0035] A preliminary screening module, used to screen the candidate physical machines according to the actual value to determine the preliminary screening physical machines;
[0036] The second determination module is used to determine the weight percentage corresponding to each monitoring indicator, and determine the target physical machine for virtual machine creation from the preliminarily screened physical machines according to the weight percentage.
[0037] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0038] at least one processor; and
[0039] a memory communicatively connected to the at least one processor; wherein,
[0040] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method for determining a physical machine described in any embodiment of the present invention.
[0041] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining a physical machine described in any embodiment of the present invention when executed.
[0042] The technical solution of the embodiment of the present invention, in response to a request to create a virtual machine, determines the monitoring indicators of the candidate physical machine and the actual values corresponding to the monitoring indicators of the candidate physical machine, screens the candidate physical machines according to the actual values, determines the preliminary screening physical machines, determines the weight percentage corresponding to each monitoring indicator, and determines the target physical machine for virtual machine creation from the preliminary screening physical machines according to the weight percentage. In this way, the cloud platform can conduct a more comprehensive analysis of the candidate physical machines according to the pre-specified monitoring indicators of the physical machine and the weight percentage of each monitoring indicator, and conducts two screenings in succession, thereby screening out the target physical machine that better meets the actual business needs and is more suitable for virtual machine creation, thereby improving the resource scheduling efficiency of the cloud platform.
[0043] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1A is a flow chart of a method for determining a physical machine provided according to Embodiment 1 of the present invention;
[0046] Figure 1B is a schematic diagram showing a front-end interactive interface provided according to the first embodiment of the present invention;
[0047] Figure 1C Schematic diagram of the hierarchical analysis algorithm assignment rules according to the first embodiment of the present invention;
[0048] Figure 2 is a flow chart of a method for determining a physical machine provided according to Embodiment 2 of the present invention;
[0049] Figure 3 is a flowchart of a method for determining a physical machine provided according to Embodiment 3 of the present invention;
[0050] Figure 4 is a structural schematic diagram of a device for determining a physical machine provided according to a fourth embodiment of the present invention;
[0051] Figure 5 It is a structural schematic diagram of an electronic device for implementing the method for determining a physical machine according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0053] It should be noted that the terms "first", "second", "target", "candidate", "alternative", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0054] Embodiment 1
[0055] Figure 1A is a flow chart of a method for determining a physical machine provided according to Embodiment 1 of the present invention; Figure 1B is a schematic diagram showing a front-end interactive interface provided according to the first embodiment of the present invention; Figure 1C This is a schematic diagram of the hierarchical analysis algorithm assignment rule provided according to the first embodiment of the present invention; this embodiment can be applied to the case where a physical machine for virtual machine creation and migration is determined from candidate physical machines according to a virtual machine creation request. The method can be executed by a physical machine determination device, which can be implemented in the form of hardware and / or software. The physical machine determination device can be configured in an electronic device and executed by a cloud platform. Figure 1A As shown, the method for determining the physical machine includes:
[0056] S101 . In response to a request to create a virtual machine, determine monitoring indicators for a candidate physical machine and actual values corresponding to the monitoring indicators of the candidate physical machine.
[0057] Among them, the request to create a virtual machine is a request to determine the target physical machine from the candidate physical machines for virtual machine creation. The candidate physical machines can be all physical machines under the management of the cloud platform. The monitoring indicator can represent the monitoring dimension of the physical machine. The monitoring indicator can be, for example, the CPU (Central Processing Unit) percentage, memory percentage, disk usage, and socket connection. The actual value refers to the actual value of the candidate physical machine under the corresponding monitoring indicator. For example, if the monitoring indicator is the CPU percentage, the corresponding actual value can be 20%.
[0058] Optionally, if the cloud platform detects a request to create a virtual machine, it can analyze the creation request, determine the monitoring indicators for the candidate physical machines, and further interact with each candidate physical machine through a preset interactive method to collect the actual values corresponding to the monitoring indicators of the candidate physical machine, that is, determine the monitoring indicators for the candidate physical machine, and the actual values corresponding to the monitoring indicators of the candidate physical machine.
[0059] Optionally, determine the monitoring indicators for the candidate physical machine and the actual values corresponding to the monitoring indicators of the candidate physical machine, including: determining the monitoring indicators for the candidate physical machine according to the indicator list in a preset configuration file; controlling the preset data acquisition platform to call the application programming interface corresponding to the monitoring indicators, and collect the actual values corresponding to each monitoring indicator of the candidate physical machine.
[0060] Among them, the preset configuration file can be a file pre-configured by relevant personnel and stored in the cloud platform. The preset configuration file can be in the form of an indicator list, storing the indicators that the cloud platform pays attention to when monitoring the physical machine, that is, the monitoring indicators. The data collection platform refers to a preset platform that can collect data from physical machines. The data collection platform can be, for example, a Prometheus platform. The application programming interface (Application Programming Interface, API) refers to the interactive interface between the preset data collection platform and each physical machine.
[0061] Exemplarily, based on the preset code, the attribute value of the indicator class in the configuration file can be obtained through the reflection mechanism of Java and the @Configuration annotation, and the corresponding indicator name is determined according to the attribute value, that is, the monitoring indicator for the candidate physical machine is determined.
[0062] Optionally, after determining the monitoring indicators for the candidate physical machines, corresponding data collection instructions can be sent to the preset data collection platform to control the preset data collection platform to call the interface (such as HttpAPI interface) between each candidate physical machine to collect the actual values corresponding to each monitoring indicator of the candidate physical machine.
[0063] The above technical solution determines the monitoring indicators of the candidate physical machines according to the indicator list in the preset configuration file. The user can pre-specify the monitoring indicators according to the configuration file, thereby determining the monitoring indicators that better meet the actual needs. Based on the corresponding interface of the preset data acquisition platform, the actual values of the corresponding monitoring indicators of each candidate physical machine are collected. An implementable method for determining the monitoring indicators and the corresponding actual values is provided, which is helpful for the subsequent determination of the physical machine that meets the actual needs.
[0064] S102: Screen candidate physical machines according to actual values to determine initial screening physical machines.
[0065] The initially screened physical machine refers to a physical machine obtained after preliminary rough screening of candidate physical machines according to actual values.
[0066] Optionally, based on preset rules, the actual values corresponding to the monitoring indicators of each candidate physical machine can be analyzed to determine the number of monitoring indicators in the actual values of each candidate physical machine that do not fall within the preset indicator range, and the candidate physical machines can be sorted according to the number of monitoring indicators, and a preset number of physical machines with a high ranking can be discarded to determine the initial screening physical machines; or the actual values of each candidate physical machine can be compared based on a preset screening algorithm to determine the matching relationship between the candidate physical machines, and the candidate physical machines can be screened based on the matching relationship to determine the initial screening physical machines.
[0067] S103: Determine the weight percentage corresponding to each monitoring indicator, and determine the target physical machine for virtual machine creation from the preliminarily screened physical machines according to the weight percentage.
[0068] The weight percentage refers to the percentage representing the weight of the corresponding monitoring indicator, and the weight percentage can represent the degree of attention paid to the monitoring indicator in the business scenario. The target physical machine refers to the physical machine determined after the primary screening physical machine is screened again according to the weight percentage.
[0069] Optionally, determine the weight percentage corresponding to each monitoring indicator, including: displaying the monitoring indicators based on a preset front-end interactive interface, and obtaining the weight percentage of the monitoring indicators specified by the user; and / or setting a corresponding weight percentage for each monitoring indicator according to the business scenario corresponding to the virtual machine creation request.
[0070] For example, see Figure 1B Based on a preset front-end interactive interface, the monitoring indicators and their corresponding numerical axes, such as indicator 1, indicator 2, indicator 3, and indicator 4, can be displayed to the user to instruct the user to specify the weight percentage of each monitoring indicator by dragging it to the numerical axis.
[0071] Optionally, the business scenario of the current cloud platform can be analyzed and determined based on the relevant parameters in the virtual machine creation request, and the weight percentage corresponding to each monitoring indicator can be determined based on the business scenario. For example, when it is determined based on the relevant parameters that a CPU-intensive business with more Bitmap conversion and Gson conversion is in progress, more attention is paid to the CPU performance indicators of the destination host during resource scheduling, and a higher weight percentage can be set for the monitoring indicator CPU percentage; when it is determined based on the relevant parameters that an I / O-intensive business with more file reading and writing, DB reading and writing, and network requests is in progress, more attention will be paid to the I / O-related indicators of the physical machine, and a higher weight percentage can be set for the I / O rate.
[0072] The above technical solution can determine the weight percentage of each monitoring indicator through user specification, or determine the weight percentage of each monitoring indicator through analysis of business scenarios, or combine the above two determination methods to conduct a comprehensive analysis to determine the weight percentage of each monitoring indicator. By providing three feasible implementation methods for determining the weight percentage of each monitoring indicator, the determined weight percentage can be made more comprehensive and more in line with actual needs, which is helpful for the subsequent screening of target physical machines.
[0073] Optionally, after determining the weight percentage of each monitoring indicator, the comprehensive performance of each candidate physical machine in each monitoring indicator can be analyzed based on a preset evaluation algorithm and the weight percentage of each monitoring indicator. Based on the analysis results, the target physical machine for virtual machine creation can be determined from the initially screened physical machines.
[0074] Optionally, a target physical machine for creating a virtual machine is determined from the pre-screened physical machines according to the weight percentage, including: based on a preset hierarchical analysis algorithm, an assignment matrix is generated according to the weight percentage corresponding to each monitoring indicator; based on a TOPSIS evaluation method, a target physical machine for creating a virtual machine is determined from the pre-screened physical machines according to the assignment matrix.
[0075] The preset hierarchical analysis algorithm may be, for example, an AHP (Analytic Hierarchy Process) hierarchical analysis method. The assignment matrix may be, for example, an AHP matrix. The TOPSIS (Technique for Order Preference by Similarity to an Ideal Solution) evaluation method is a preset method that can evaluate by measuring the closeness of each candidate physical machine to an ideal physical machine.
[0076] Optionally, based on a preset hierarchical analysis algorithm, the importance relationship between the monitoring indicators can be determined according to the weight percentage corresponding to each monitoring indicator, and an assignment matrix can be generated according to the importance relationship between the monitoring indicators.
[0077] For example, see Figure 1C Based on the hierarchical analysis algorithm, the important relationship between each monitoring indicator can be determined according to the preset rules and the corresponding weight percentage of each monitoring indicator, and the corresponding value of the important relationship between each monitoring indicator can be determined according to the following rules: if indicator 1 is as important as indicator 2, the value is 1; if indicator 1 is a little more important than indicator 2, the value is 3; if indicator 1 is more important than indicator 2, the value is 5; if indicator 1 is much more important than indicator 2, the value is 7; if indicator 1 is extremely important than indicator 2, the value is 9; if the importance difference cannot be confirmed, the intermediate value can be assigned, that is, 2, 4, 6 or 8. Among them, when indicator 2 is compared with indicator 1, the corresponding value is the inverse of the value assigned when indicator 1 is compared with indicator 2.
[0078] For example, {indicator i, indicator j} can be used to represent the importance of indicator i relative to indicator j, such as {indicator 2, indicator 1}=3 means that indicator 2 is slightly more important than indicator 1, and the scale is 3. Specifically, the corresponding scale can be calculated based on the geometric mean method or the normalized column mean method according to the weight percentage of each monitoring indicator.
[0079] For example, if the monitoring indicators include indicator 1, indicator 2, indicator 3 and indicator 4, then according to the important relationship between the monitoring indicators, the generated assignment matrix may be as shown in the following Table 1:
[0080] Table 1: Schematic diagram of the assignment matrix
[0081] index Indicator 1 Indicator 2 Indicator 3 Indicator 4 Indicator 1 1 1 / 3 1 / 2 1 / 6 Indicator 2 3 1 1 / 2 1 / 3 Indicator 3 2 2 1 1 / 5 Indicator 4 6 3 5 1
[0082] The above technical solution generates an assignment matrix corresponding to the weight percentage of each monitoring indicator by utilizing the hierarchical analysis algorithm, and further screens the initially screened physical machines according to the assignment matrix based on the TOPSIS evaluation method, so as to determine the target physical machine that is most suitable for virtual machine creation. The weight percentage corresponding to each monitoring indicator is given, and the initially screened physical machines are screened again, thereby achieving a comprehensive analysis and ensuring the effectiveness of the determined physical machines.
[0083] Optionally, based on the TOPSIS evaluation method, according to the assignment matrix, a target physical machine for virtual machine creation is determined from the preliminarily screened physical machines, including: based on the TOPSIS evaluation method, according to the assignment matrix, respectively determining the closeness between each preliminarily screened physical machine and the ideal physical machine; according to the closeness, sorting the preliminarily screened physical machines, and according to the sorting results, determining the target physical machine for virtual machine creation from the preliminarily screened physical machines.
[0084] The ideal physical machine refers to a virtual physical machine whose actual values of each monitoring indicator meet the expectations, and can be a virtual physical machine determined based on the optimal value among the actual values of each candidate physical machine. Closeness refers to an indicator that characterizes the similarity between the initial screening physical machine and the ideal physical machine.
[0085] Optionally, based on the TOPSIS evaluation method, the maximum value of each candidate physical machine under the monitoring index can be determined according to the actual value, and the positive ideal point, that is, the actual value of the ideal physical machine, can be determined according to the maximum value matrix and the assignment matrix composed of the maximum values under each monitoring index. The minimum value of each candidate physical machine under the monitoring index can be further determined, and the negative ideal point, that is, the actual value of the undesirable physical machine, can be determined according to the minimum value matrix and the assignment matrix composed of the minimum values under each monitoring index. Specifically, the actual value of the ideal physical machine and the actual value of the undesirable physical machine can be determined by the following formula:
[0086] S + =ω 1×m ﹒ A T
[0087] S - =ρ 1×m ﹒ A T
[0088] Among them, ω 1×m is the maximum value matrix, ρ 1×m refers to the minimum value matrix, A refers to the assignment matrix, for example, the AHP matrix determined based on the AHP hierarchical analysis method, S + refers to the actual value of an ideal physical machine, S - It refers to the actual value of the undesirable physical machine. m is the number of candidate physical machines.
[0089] Exemplarily, the maximum value matrix and the minimum value matrix can be determined by the following formula:
[0090] ω 1,m =max{v ij |1≤i≤n}
[0091] ρ 1,m =min{v ij |1≤i≤n}
[0092] Among them, ω 1×m is the maximum value matrix, ρ 1×m is the minimum matrix, v ij is the actual value of the i-th monitoring indicator corresponding to the j-th candidate physical machine, j = 1, 2, ..., m. m is the number of candidate physical machines. n is the number of monitoring indicators.
[0093] For example, the actual value S of an ideal physical machine +Through S + ={S1 + ,S2 + ,...,S n +} indicates that, among them, S1 + 、S2 + and S n + Indicates the actual values of the 1st, 2nd, and nth monitoring indicators of an ideal physical machine. The actual value S of an undesirable physical machine - Through S - ={S1 - ,S2 - ,...,S n -} indicates that, among them, S1 - 、S2 - and S n - Indicates the actual values of the 1st, 2nd, and nth monitoring indicators of the undesirable physical machine.
[0094] Exemplarily, after determining the actual value of the ideal physical machine and the actual value of the undesirable physical machine, the following formula can be used to calculate the distance between each candidate physical machine and the ideal physical machine and the undesirable physical machine, that is, D i + and D i - , determine the closeness Cd between each candidate physical machine and the ideal physical machine i :
[0095]
[0096] Among them, the distance D between the candidate physical machine and the ideal physical machine can be determined by the following formula: i + , and the distance D between the candidate physical machine and the undesirable physical machine i - :
[0097]
[0098]
[0099] Where i = 1, 2, ..., n. j = 1, 2, ..., m. v ij is the actual value of the i-th monitoring indicator corresponding to the j-th candidate physical machine, n is the number of monitoring indicators, m is the number of candidate physical machines, S j + It refers to the actual value corresponding to the jth monitoring indicator of the ideal physical machine, S j -It refers to the actual value corresponding to the jth monitoring indicator of the undesirable physical machine.
[0100] Optionally, after the initially screened physical machines are sorted according to the proximity, the candidate physical machine with the highest sorting can be determined as the target physical machine, so as to use the target physical machine to create a virtual machine.
[0101] It should be noted that the cloud platform can also respond to the hot migration or cold migration request of the virtual machine and execute the method for determining the target physical machine after responding to the creation request of the virtual machine described in the embodiment of the present invention to determine the target physical machine for virtual machine migration. The present invention is not limited to this.
[0102] The above technical solution first determines the closeness between each initially screened physical machine and the ideal physical machine by using the TOPSIS evaluation method and the assignment matrix, and further sorts the initially screened physical machines according to the closeness, so as to screen out the target physical machine according to the sorting results. An implementable method for secondary screening of the initially screened physical machines based on the TOPSIS evaluation method is provided, which can better evaluate the performance of each initially screened physical machine, thereby determining a more comprehensive physical machine that better meets actual needs. After the subsequent cloud platform creates a virtual machine based on the target physical machine, more efficient resource scheduling can be achieved.
[0103] It should be noted that when the cloud platform manages multiple physical machines, it will select a target physical machine from the multiple physical machines to create a virtual machine to achieve resource scheduling of the cloud platform. The solution provided by the present invention can more comprehensively consider the monitoring indicators and corresponding weights of the physical machines, so as to determine the target physical machine that is most suitable for creating or migrating virtual machines.
[0104] The technical solution of the embodiment of the present invention, in response to a request to create a virtual machine, determines the monitoring indicators of the candidate physical machine and the actual values corresponding to the monitoring indicators of the candidate physical machine, screens the candidate physical machines according to the actual values, determines the preliminary screening physical machines, determines the weight percentage corresponding to each monitoring indicator, and determines the target physical machine for virtual machine creation from the preliminary screening physical machines according to the weight percentage. In this way, the cloud platform can conduct a more comprehensive analysis of the candidate physical machines according to the pre-specified monitoring indicators of the physical machine and the weight percentage of each monitoring indicator, and conducts two screenings in succession, thereby screening out the target physical machine that better meets the actual business needs and is more suitable for virtual machine creation, thereby improving the resource scheduling efficiency of the cloud platform.
[0105] Embodiment 2
[0106] Figure 2 It is a flow chart of a method for determining a physical machine provided according to the second embodiment of the present invention; this embodiment is optimized and improved on the basis of the above-mentioned technical solutions.
[0107] Furthermore, "screening the candidate physical machines according to the actual values to determine the initial screening physical machines" is refined into "based on the dominance principle of the Skyline algorithm, determining the dominance relationship between the candidate physical machines according to the actual values; based on the dominance relationship, determining the candidate physical machines that are not dominated by other candidate physical machines as the initial screening physical machines" to improve the specific method of screening according to the actual values.
[0108] Furthermore, "based on the domination relationship, determine the candidate physical machines that are not dominated by other candidate physical machines as the initial screening physical machines" is refined into "based on the domination relationship, determine the set of physical machines dominated by each candidate physical machine; determine the candidate physical machines that do not appear in the set of physical machines dominated by each candidate physical machine as the initial screening physical machine" to improve the method of determining the initial screening physical machine from the candidate physical machines based on the matching relationship.
[0109] like Figure 2 As shown, the method comprises the following specific steps:
[0110] S201 . In response to a request to create a virtual machine, determine monitoring indicators for a candidate physical machine and actual values corresponding to the monitoring indicators of the candidate physical machine.
[0111] S202 . Based on the dominance principle of the Skyline algorithm and according to actual values, determine the dominance relationship between the candidate physical machines.
[0112] The dominant principle of the Skyline algorithm may be a preset principle that characterizes the relationship between the actual values of monitoring indicators between physical machines. For example, the dominant principle may be: if candidate physical machine 1 is obviously better than physical machine 2 in every performance, then candidate physical machine 1 may be determined to dominate candidate physical machine 2.
[0113] Optionally, based on the dominance principle of the Skyline algorithm, according to actual values and preset comparison rules, if the actual values of the first candidate physical machine under each monitoring indicator are better than those of the second candidate physical machine, then it is determined that the first candidate physical machine dominates the second candidate physical machine, thereby determining the dominance relationship between the candidate physical machines.
[0114] S203 . According to the dominance relationship, determine the candidate physical machines that are not dominated by other candidate physical machines as the primary screening physical machines.
[0115] Optionally, based on the domination relationship, a candidate physical machine that is not dominated by other candidate physical machines is determined as a preliminary screening physical machine, including: determining the set of physical machines dominated by each candidate physical machine based on the domination relationship; and determining a candidate physical machine that does not appear in the set of physical machines dominated by each candidate physical machine as a preliminary screening physical machine.
[0116] For example, if the comparison rule is that the physical machine with a larger idle CPU ratio has better performance, the physical machine with a larger available memory has better performance, and the physical machine with a larger network bandwidth has better performance, the idle CPU of candidate physical machine 1 is 80%, the available memory is 80%, and the network bandwidth is 1000M, and the idle CPU of candidate physical machine 2 is 60%, the available memory is 50%, and the network bandwidth is 100M, then it can be determined that the actual value of candidate physical machine 1 under each monitoring indicator is better than candidate physical machine 2, and at this time it can be determined that the dominance relationship is that candidate physical machine 1 dominates candidate physical machine 2. At this time, it is determined that the set of physical machines dominated by physical machine 1 includes physical machine 2.
[0117] Exemplarily, the set of physical machines dominated by a candidate physical machine may or may not include the candidate physical machine. Specifically, when the set of physical machines dominated by a candidate physical machine includes the candidate physical machine, it may include at least one physical machine.
[0118] The above technical solution determines the set of physical machines that can be dominated by each candidate physical machine based on the domination relationship between them, thereby determining the physical machines that do not belong to the domination set of any other physical machines as the initial screening physical machines. It provides an implementable method for determining the initial screening physical machines, which can better utilize the domination relationship to perform preliminary screening of candidate physical machines, thereby pre-eliminating physical machines that do not meet the requirements, helping to improve the efficiency of subsequent physical machine screening and save computer resources.
[0119] S204 , determining the weight percentage corresponding to each monitoring indicator, and determining the target physical machine for virtual machine creation from the preliminarily screened physical machines according to the weight percentage.
[0120] The technical solution of the present invention can judge the dominance relationship between physical machines based on the dominance principle of the Skyline algorithm in combination with the actual values of each indicator of each candidate physical machine, so that the physical machine that is not dominated by other physical machines can be determined from the candidate physical machines according to the determined dominance relationship. A method for preliminary screening of candidate physical machines is provided, which can pre-eliminate physical machines that do not meet the requirements, thereby helping to improve the efficiency of subsequent physical machine screening and save computer resources.
[0121] Embodiment 3
[0122] Figure 3 It is a flow chart of a method for determining a physical machine provided according to Embodiment 3 of the present invention; this embodiment provides a preferred example based on the above embodiments.
[0123] like Figure 3 As shown, the method comprises the following specific steps:
[0124] S301 . In response to a request to create a virtual machine, determine monitoring indicators for a candidate physical machine according to an indicator list in a preset configuration file.
[0125] S302: Control the preset data collection platform to call the application programming interface corresponding to the monitoring indicator, and collect the actual value corresponding to each monitoring indicator of the candidate physical machine.
[0126] S303 . Based on the dominance principle of the Skyline algorithm and according to actual values, determine the dominance relationship between the candidate physical machines.
[0127] S304: Determine the set of physical machines dominated by each candidate physical machine according to the domination relationship.
[0128] S305 : Determine the candidate physical machines that are not in the set of physical machines controlled by each candidate physical machine as the primary screening physical machines.
[0129] S306: Determine the weight percentage corresponding to each monitoring indicator.
[0130] S307: Based on the preset hierarchical analysis algorithm, generate an assignment matrix according to the weight percentage corresponding to each monitoring indicator.
[0131] S308. Based on the TOPSIS evaluation method and according to the assignment matrix, the closeness between each initially screened physical machine and the ideal physical machine is determined respectively.
[0132] S309: Sort the preliminarily screened physical machines according to the proximity, and determine the target physical machine for virtual machine creation from the preliminarily screened physical machines according to the sorting result.
[0133] It should be noted that the technical solution of the present invention, by obtaining the physical machine screening index and index weight percentage specified by the user, performs two physical machine screenings in succession, and can determine the target physical machine that better meets the business needs, thereby improving the resource scheduling efficiency of the cloud platform.
[0134] Embodiment 4
[0135] Figure 4 This is a schematic diagram of the structure of a physical machine determination device provided in accordance with Embodiment 4 of the present invention; the physical machine determination device provided in accordance with the embodiment of the present invention can be applied to determine the physical machine for virtual machine creation and migration from candidate physical machines according to a virtual machine creation request, and the physical machine determination device can be implemented in the form of hardware and / or software, and the physical machine determination device can be configured in an electronic device and executed by a cloud platform. Figure 4 As shown, the device specifically includes: a first determination module 401, a preliminary screening module 402 and a second determination module 403.
[0136] The first determination module 401 is used to determine the monitoring index of the candidate physical machine and the actual value corresponding to the monitoring index of the candidate physical machine in response to the creation request of the virtual machine;
[0137] A preliminary screening module 402 is used to screen the candidate physical machines according to the actual values to determine the preliminary screening physical machines;
[0138] The second determination module 403 is used to determine the weight percentage corresponding to each monitoring indicator, and determine the target physical machine for virtual machine creation from the preliminarily screened physical machines according to the weight percentage.
[0139] The technical solution of the embodiment of the present invention, in response to a request to create a virtual machine, determines the monitoring indicators of the candidate physical machine and the actual values corresponding to the monitoring indicators of the candidate physical machine, screens the candidate physical machines according to the actual values, determines the preliminary screening physical machines, determines the weight percentage corresponding to each monitoring indicator, and determines the target physical machine for virtual machine creation from the preliminary screening physical machines according to the weight percentage. In this way, the cloud platform can conduct a more comprehensive analysis of the candidate physical machines according to the pre-specified monitoring indicators of the physical machine and the weight percentage of each monitoring indicator, and conducts two screenings in succession, thereby screening out the target physical machine that better meets the actual business needs and is more suitable for virtual machine creation, thereby improving the resource scheduling efficiency of the cloud platform.
[0140] Furthermore, the initial screening module 402 includes:
[0141] A relationship determination unit, configured to determine the dominance relationship between the candidate physical machines according to the actual value based on the dominance principle of the Skyline algorithm;
[0142] The primary screening unit is used to determine the candidate physical machines that are not dominated by other candidate physical machines as the primary screening physical machines according to the dominance relationship.
[0143] Furthermore, the primary screening unit is specifically used for:
[0144] According to the dominance relationship, determine a set of physical machines dominated by each candidate physical machine;
[0145] The candidate physical machines that do not appear in the set of physical machines controlled by each candidate physical machine are determined as preliminary screening physical machines.
[0146] Furthermore, the second determining module 403 is specifically configured to:
[0147] Based on the preset front-end interactive interface, the monitoring indicators are displayed and the weight percentage of the monitoring indicators specified by the user is obtained; and / or,
[0148] According to the business scenario corresponding to the virtual machine creation request, set the corresponding weight percentage for each monitoring indicator.
[0149] Further, the second determining module 403 may include:
[0150] A generating unit, for generating a value assignment matrix based on a preset hierarchical analysis algorithm and according to the weight percentage corresponding to each monitoring indicator;
[0151] The determination unit is used to determine the target physical machine for virtual machine creation from the preliminarily screened physical machines based on the TOPSIS evaluation method and the assignment matrix.
[0152] Furthermore, the determination unit is specifically used for:
[0153] Based on the TOPSIS evaluation method, according to the assignment matrix, the closeness between each preliminary screening physical machine and the ideal physical machine is determined respectively;
[0154] The preliminarily screened physical machines are sorted according to the closeness, and a target physical machine for virtual machine creation is determined from the preliminarily screened physical machines according to the sorting result.
[0155] Furthermore, the first determining module is specifically used for:
[0156] Determine the monitoring indicators for the candidate physical machines according to the indicator list in the preset configuration file;
[0157] The preset data collection platform is controlled to call the application programming interface corresponding to the monitoring index, and collect the actual value corresponding to each monitoring index of the candidate physical machine.
[0158] Embodiment 5
[0159] Figure 5 is a schematic structural diagram of an electronic device for implementing the method for determining a physical machine according to an embodiment of the present invention; Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention 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 (such as helmets, glasses, watches, etc.) 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 invention described and / or required herein.
[0160] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0161] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0162] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for determining a physical machine.
[0163] In some embodiments, the method for determining a physical machine may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for determining a physical machine described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for determining a physical machine in any other appropriate manner (e.g., by means of firmware).
[0164] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can 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.
[0165] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program 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.
[0166] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0167] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device 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 a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0168] 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: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0169] A computing 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 client and server relationship 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.
[0170] 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 described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0171] The above specific implementations do not constitute a limitation on the protection scope of the present invention. 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 invention should be included in the protection scope of the present invention.
Claims
1. A method for determining a physical machine, characterized in that: include: In response to the virtual machine creation request, determine monitoring indicators for the candidate physical machine and actual values corresponding to the monitoring indicators of the candidate physical machine; According to the actual value, the candidate physical machines are screened to determine the primary screening physical machines; The weight percentage corresponding to each monitoring indicator is determined, and based on the weight percentage, a target physical machine for virtual machine creation is determined from the preliminarily screened physical machines.
2. The method according to claim 1, characterized in that Screening the candidate physical machines according to the actual value to determine the primary screening physical machines includes: Based on the dominance principle of the Skyline algorithm, determining the dominance relationship between the candidate physical machines according to the actual value; According to the dominance relationship, a candidate physical machine that is not dominated by other candidate physical machines is determined as a preliminary screening physical machine.
3. The method according to claim 2, characterized in that According to the dominance relationship, a candidate physical machine that is not dominated by other candidate physical machines is determined as a preliminary screening physical machine, including: According to the dominance relationship, determine a set of physical machines dominated by each candidate physical machine; The candidate physical machines that do not appear in the set of physical machines controlled by each candidate physical machine are determined as preliminary screening physical machines.
4. The method according to claim 1, characterized in that Determine the weight percentage corresponding to each monitoring indicator, including: Based on the preset front-end interactive interface, the monitoring indicators are displayed and the weight percentage of the monitoring indicators specified by the user is obtained; and / or, According to the business scenario corresponding to the virtual machine creation request, set the corresponding weight percentage for each monitoring indicator.
5. The method according to claim 1, characterized in that According to the weight percentage, a target physical machine for virtual machine creation is determined from the preliminarily screened physical machines, including: Based on the preset hierarchical analysis algorithm, an assignment matrix is generated according to the weight percentage corresponding to each monitoring indicator; Based on the TOPSIS evaluation method and according to the assignment matrix, a target physical machine for virtual machine creation is determined from the preliminarily screened physical machines.
6. The method according to claim 5, characterized in that Based on the TOPSIS evaluation method and according to the assignment matrix, a target physical machine for virtual machine creation is determined from the preliminarily screened physical machines, including: Based on the TOPSIS evaluation method, according to the assignment matrix, the closeness between each preliminary screening physical machine and the ideal physical machine is determined respectively; The preliminarily screened physical machines are sorted according to the closeness, and a target physical machine for virtual machine creation is determined from the preliminarily screened physical machines according to the sorting result.
7. The method according to claim 1, characterized in that Determine the monitoring indicators for the candidate physical machines and the actual values corresponding to the monitoring indicators of the candidate physical machines, including: Determine the monitoring indicators for the candidate physical machines according to the indicator list in the preset configuration file; The preset data collection platform is controlled to call the application programming interface corresponding to the monitoring index, and collect the actual value corresponding to each monitoring index of the candidate physical machine.
8. A device for determining a physical machine, characterized in that: include: A first determination module, configured to determine, in response to a request to create a virtual machine, a monitoring indicator for a candidate physical machine and an actual value corresponding to the monitoring indicator of the candidate physical machine; A preliminary screening module, used to screen the candidate physical machines according to the actual value to determine the preliminary screening physical machines; The second determination module is used to determine the weight percentage corresponding to each monitoring indicator, and determine the target physical machine for virtual machine creation from the preliminarily screened physical machines according to the weight percentage.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method for determining a physical machine according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining a physical machine according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Cloud service platform selection method based on fuzzy ideal target analysis
CN103473437A
Dynamic deployment mechanism of virtual machine under cloud environment
CN105607943A
Virtual machine management method and device, and storage medium
CN107038064A
Physical machine scheduling method and device
CN116126512A
