Resource scheduling method and device, storage medium, electronic equipment and program product

By generating and computing the resource matrix of the cloud platform, identifying the maximum value elements to determine the computing nodes for priority scheduling, the problem of large-scale creation of cloud host scheduling time is solved, and efficient cloud computing resource scheduling is achieved.

CN119759597AInactive Publication Date: 2025-04-04JINAN INSPUR DATA TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510275973.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-04-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In large-scale scenarios, the scheduling time of batch creation of cloud hosts is relatively expensive, and the existing technology has not effectively solved this problem.

Method used

By obtaining resource data of the cloud platform, a computing node resource matrix and a cloud host resource consumption matrix are generated, and resource consumption operations are performed based on these matrices, and the maximum value element in the target matrix is ​​identified to determine the priority scheduling computing node.

Benefits of technology

It significantly reduces the scheduling time, improves the creation efficiency of cloud hosts, optimizes the scheduling efficiency of cloud computing resources, and avoids the resource screening process of traversing all computing nodes in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759597A_ABST
    Figure CN119759597A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource scheduling method and device, a storage medium, electronic equipment and a program product, and the method comprises the steps: obtaining resource data of a cloud platform, and generating a calculation node resource matrix according to the resource data; generating a cloud host resource consumption matrix corresponding to resource requirements under the condition that the resource requirements of the cloud hosts created in batches are determined; each column in N columns in the cloud host resource consumption matrix corresponds to resource specification information of a resource demand, the cloud host resource consumption matrix is a homotype matrix of a computing node resource matrix, and N and M are positive integers greater than or equal to 2; performing resource consumption operation based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix; and identifying a maximum value element in the target matrix, and determining a target computing node corresponding to the maximum value element as a node used for preferentially scheduling cloud computing resources on the cloud platform in the N computing nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of cloud computing technology, and more specifically, to a resource scheduling method and device, a storage medium, an electronic device, and a program product. Background Art

[0002] Cloud computing technology is a computing method that obtains required resources (such as networks, servers, storage, applications, services, etc.) through the network in an on-demand and easily scalable manner. It has the advantages of flexible resource allocation, rapid deployment, and pay-as-you-go. In a cloud computing environment, users can flexibly use computing resources on demand and create, run, migrate, and delete cloud hosts according to different business needs. However, in a cloud computing environment, how to efficiently schedule and allocate resources for building cloud hosts to meet user needs and optimize resource utilization efficiency is a challenge. At present, in large-scale resource scheduling systems, due to the large variety and quantity of resources, the scheduling process is more complicated and time-consuming, which greatly reduces the startup efficiency of batch creation of cloud hosts and cannot meet customer business needs.

[0003] In the related technologies, there is no effective solution to the problem that the scheduling time of batch creation of cloud hosts in large-scale scenarios is long. Summary of the invention

[0004] The embodiments of the present application provide a resource scheduling method and device, storage medium, electronic device, and program product to at least solve the problem of long scheduling time consumption in batch creation of cloud hosts in large-scale scenarios in the related art.

[0005] According to one embodiment of the present application, a resource scheduling method includes: obtaining resource data of a cloud platform, and generating a computing node resource matrix based on the resource data; wherein the resource data includes N computing nodes and M types of resource information corresponding to each computing node, the N computing nodes respectively correspond to N columns in the computing node resource matrix, and the computing node resource matrix contains N rows and M columns; when determining the resource requirements of cloud hosts created in batches, generating a cloud host resource consumption matrix corresponding to the resource requirements; wherein each of the N columns in the cloud host resource consumption matrix corresponds to resource specification information of the resource requirements, the cloud host resource consumption matrix is ​​a homogeneous matrix of the computing node resource matrix, and N and M are positive integers greater than or equal to 2; performing resource consumption operations based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix; identifying the maximum value element in the target matrix, and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for prioritizing scheduling of cloud computing resources on the cloud platform.

[0006] In an exemplary embodiment, after identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for prioritizing scheduling of cloud computing resources on the cloud platform, the method further includes: allocating the target computing node to a target cloud host in the batch-created cloud hosts that has no associated computing nodes, and updating the remaining number of the target cloud hosts to obtain a first number; and controlling the number of loop operations of the resource consumption operation according to the first number.

[0007] In an exemplary embodiment, a resource consumption operation is performed based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix, including: performing a matrix subtraction operation with the cloud host resource consumption matrix based on the computing node resource matrix, wherein the matrix subtraction operation is used to use a first sequence of M numerical values ​​corresponding to each column in the computing node resource matrix minus a second sequence of M numerical values ​​corresponding to each column in the cloud host resource consumption matrix to obtain a target sequence; determining N target sequences based on the calculation result of the matrix subtraction operation; combining the resource surplus matrix based on the N target sequences; and optimizing the resource surplus matrix to obtain the target matrix.

[0008] In an exemplary embodiment, the resource surplus matrix is ​​optimized to obtain the target matrix, including: determining a preset optimization processing flow set in the current cloud system, identifying processing content corresponding to the preset optimization processing flow, wherein the processing content at least includes: matrix normalization processing and matrix weighting processing; performing matrix normalization processing on the resource surplus matrix according to the processing content to obtain a normalized resource matrix; performing matrix weighting processing on the normalized resource matrix to obtain a target matrix.

[0009] In an exemplary embodiment, matrix normalization processing is performed on the resource surplus matrix according to the processing content to obtain a normalized resource matrix, including: identifying the row maximum value in each row of the resource surplus matrix; using the row maximum value as a divisor and performing a division operation on each column element in the target row corresponding to the current row maximum value to obtain a sub-normalized result for each row; and summing up M sub-normalized results to obtain a normalized resource matrix.

[0010] In an exemplary embodiment, matrix weighting processing is performed on the normalized resource matrix to obtain a target matrix, including: obtaining M weight values ​​corresponding to M types of resources; determining a column matrix according to the M weight values; performing matrix multiplication operations on the column matrix and the normalized resource matrix to obtain the target matrix, wherein the target matrix is ​​a row matrix.

[0011] In an exemplary embodiment, resource data of a cloud platform is obtained, and before a computing node resource matrix is ​​generated based on the resource data, the method further includes: determining Q types of resources on the cloud platform, wherein each type of resource corresponds to a configuration parameter of a cloud host; screening out M types of resources that meet the computing node configuration from the Q types of resources; counting the amount of unused remaining resources corresponding to each type of resource in the cloud platform, and determining a target number of computing nodes allowed to be used based on the distribution of the remaining resources.

[0012] In an exemplary embodiment, after identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for prioritizing scheduling of cloud computing resources on the cloud platform, the method further includes: counting the number of nodes determined as the target computing node; and when determining the number of cloud hosts created in batches through the cloud platform, comparing the size relationship between the number of nodes and the number of hosts to determine whether to end the process of determining the target computing node.

[0013] In an exemplary embodiment, the size relationship between the number of nodes and the number of hosts is compared to determine whether to end the determination process of the target computing node, including: when the number of nodes is greater than or equal to the number of hosts, determining to end the current determination process of the target computing node; when the number of nodes is less than the number of hosts, determining to continue the current determination process of the target computing node.

[0014] In an exemplary embodiment, before identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform, the method also includes: evaluating the load balancing status of cloud computing resources corresponding to different elements in the target matrix; when the load balancing status does not satisfy the preset balancing status, identifying the computing node corresponding to the current element as an alternative scheduling node; when the load balancing status satisfies the preset balancing status, identifying the computing node corresponding to the current element as a normal scheduling node.

[0015] In an exemplary embodiment, after identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for prioritizing scheduling of cloud computing resources on the cloud platform, the method further includes: obtaining multiple environmental information corresponding to the target computing node; wherein the environmental information includes at least location information corresponding to the target computing node and network delay information corresponding to the target computing node; and regulating the usage time point of the target computing node based on the multiple environmental information.

[0016] In an exemplary embodiment, the M-type resource information includes at least two of the following: size information of computing resources corresponding to the central processing unit configured by the cloud host, size information of memory configured by the cloud host, and size information of network bandwidth configured by the cloud host.

[0017] According to another embodiment of the present application, a resource scheduling device is also provided, including: a first generation module, used to obtain resource data of a cloud platform, and generate a computing node resource matrix according to the resource data; wherein the resource data includes N computing nodes, and M types of resource information corresponding to each computing node, the N computing nodes correspond to N columns in the computing node resource matrix respectively, and the computing node resource matrix contains N rows and M columns; a second generation module, used to generate a cloud host resource consumption matrix corresponding to the resource demand when determining the resource demand of cloud hosts created in batches; wherein each of the N columns in the cloud host resource consumption matrix corresponds to resource specification information of the resource demand, the cloud host resource consumption matrix is ​​a homogeneous matrix of the computing node resource matrix, and N and M are positive integers greater than or equal to 2; an operation module, used to perform resource consumption operations based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix; a determination module, used to identify the maximum value element in the target matrix, and determine the target computing node corresponding to the maximum value element as the node among the N computing nodes used to prioritize scheduling of cloud computing resources on the cloud platform.

[0018] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0019] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0020] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiment are implemented.

[0021] Through this application, the resource data of the cloud platform is obtained, and a computing node resource matrix is ​​generated according to the resource data; wherein the resource data includes N computing nodes and M types of resource information corresponding to each computing node, and the N computing nodes correspond to N columns in the computing node resource matrix respectively, and the computing node resource matrix contains N rows and M columns; in the case of determining the resource requirements of the cloud hosts created in batches, a cloud host resource consumption matrix corresponding to the resource requirements is generated; wherein each of the N columns in the cloud host resource consumption matrix corresponds to the resource specification information of the resource requirements, and the cloud host resource consumption matrix is ​​a homogeneous matrix of the computing node resource matrix, and N and M are positive integers greater than or equal to 2; based on the computing node resource matrix and the cloud host resource consumption matrix, a resource consumption operation is performed to obtain a target matrix; the maximum value element in the target matrix is ​​identified, and the target computing node corresponding to the maximum value element is determined as the node in the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform. The above technical solution solves the problem of large scheduling time consumption for batch creation of cloud hosts in large-scale scenarios. Furthermore, the efficiency of cloud computing resource scheduling is optimized through matrix operations, avoiding the resource screening of all computing nodes when creating each cloud host in the traditional method, thereby significantly reducing the scheduling time and improving the efficiency of cloud host creation. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 It is a hardware structure block diagram of a computer terminal according to a resource scheduling method of an embodiment of the present application;

[0024] Figure 2 is a flow chart of a resource scheduling method according to an embodiment of the present application;

[0025] Figure 3 This is a flow chart of a batch creation cloud host scheduling solution in a cloud platform according to an embodiment of the present application;

[0026] Figure 4 It is a flow chart of a method for implementing cloud host computing node screening based on a matrix operation method according to an embodiment of the present application;

[0027] Figure 5 It is a structural block diagram of a resource scheduling device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0030] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 1 is a hardware structure block diagram of a computer terminal according to a resource scheduling method of an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the upgrade method of the card in the visible area in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the scheduling method of the above-mentioned resources is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the card in the visible area through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0032] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0033] In this embodiment, a resource scheduling method is provided, which is applied to the above-mentioned computer terminal. Figure 2 is a flow chart of a resource scheduling method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0034] Step S202, obtaining resource data of the cloud platform, and generating a computing node resource matrix according to the resource data; wherein the resource data includes N computing nodes and M types of resource information corresponding to each computing node, the N computing nodes respectively correspond to N columns in the computing node resource matrix, and the computing node resource matrix includes N rows and M columns;

[0035] Step S204, in the case of determining the resource requirements of the cloud hosts to be created in batches, generating a cloud host resource consumption matrix corresponding to the resource requirements; wherein each of the N columns in the cloud host resource consumption matrix corresponds to resource specification information of the resource requirements, the cloud host resource consumption matrix is ​​a matrix of the same type as the computing node resource matrix, and N and M are positive integers greater than or equal to 2;

[0036] Step S206, performing resource consumption calculation based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix;

[0037] Step S208, identifying the maximum value element in the target matrix, and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform.

[0038] Through the above steps, the resource data of the cloud platform is obtained, and a computing node resource matrix is ​​generated according to the resource data; wherein the resource data includes N computing nodes and M types of resource information corresponding to each computing node, and the N computing nodes correspond to N columns in the computing node resource matrix respectively, and the computing node resource matrix contains N rows and M columns; in the case of determining the resource requirements of the cloud hosts created in batches, a cloud host resource consumption matrix corresponding to the resource requirements is generated; wherein each of the N columns in the cloud host resource consumption matrix corresponds to the resource specification information of the resource requirements, and the cloud host resource consumption matrix is ​​a homogeneous matrix of the computing node resource matrix, and N and M are positive integers greater than or equal to 2; based on the computing node resource matrix and the cloud host resource consumption matrix, a resource consumption operation is performed to obtain a target matrix; the maximum value element in the target matrix is ​​identified, and the target computing node corresponding to the maximum value element is determined as the node in the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform. The above technical solution solves the problem of large scheduling time consumption for batch creation of cloud hosts in large-scale scenarios. Furthermore, the efficiency of cloud computing resource scheduling is optimized through matrix operations, avoiding the resource screening of all computing nodes when creating each cloud host in the traditional method, thereby significantly reducing the scheduling time and improving the efficiency of cloud host creation.

[0039] In an exemplary embodiment, after identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for prioritizing scheduling of cloud computing resources on the cloud platform, the method further includes: allocating the target computing node to a target cloud host in the batch-created cloud hosts that has no associated computing nodes, and updating the remaining number of the target cloud hosts to obtain a first number; and controlling the number of loop operations of the resource consumption operation according to the first number.

[0040] Optionally, there is a large-scale computing task that needs to be run on the cloud platform, and a large number of cloud hosts are required to complete the calculation. First, a batch of cloud hosts are created in batches, and then the target computing nodes are allocated to the target cloud hosts that do not have associated computing nodes among these cloud hosts. The remaining number of these target cloud hosts is updated to obtain the first number, that is, how many cloud hosts are currently needed to complete the task. The number of cycles of resource consumption calculations is controlled according to the first number to ensure full utilization of resources and smooth completion of tasks. For example, if there are 10 cloud hosts, and there are 3 target computing nodes at this time, the system will allocate these 3 target computing nodes to 3 of the 10 cloud hosts, leaving 7 hosts without target computing nodes, and the system will update the remaining number of target cloud hosts to 7. Then the number of cycles of resource consumption calculations is controlled according to the remaining number (equivalent to the above-mentioned first number) 7 to ensure maximum resource utilization.

[0041] In the above embodiment, by allocating the target computing node to the target cloud host that does not have the associated computing node in the batch created cloud hosts, the cloud host resources can be better utilized to avoid resource waste. At the same time, the remaining number of target cloud hosts is automatically updated and the number of loop operations of the resource consumption operation is controlled according to the first number, so that automated management can be achieved, manual intervention can be reduced, and efficiency can be improved.

[0042] In an exemplary embodiment, a resource consumption operation is performed based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix, including: performing a matrix subtraction operation with the cloud host resource consumption matrix based on the computing node resource matrix, wherein the matrix subtraction operation is used to use a first sequence of M numerical values ​​corresponding to each column in the computing node resource matrix minus a second sequence of M numerical values ​​corresponding to each column in the cloud host resource consumption matrix to obtain a target sequence; determining N target sequences based on the calculation result of the matrix subtraction operation; combining the resource surplus matrix based on the N target sequences; and optimizing the resource surplus matrix to obtain the target matrix.

[0043] Optionally, the computing nodes and resources are combined into a two-dimensional node resource matrix A, wherein the matrix columns are computing nodes, and the rows are the CPU (Central Processing Unit, CPU for short), memory, and disk resource remaining of the computing nodes; according to the resource specifications required for the cloud hosts created in batches, the cloud host resource consumption matrix B can be obtained, and a matrix subtraction operation is performed between the computing node resource matrix and the cloud host resource consumption matrix to obtain a post-scheduling resource remaining matrix C, and the matrix C can be optimized to obtain a target matrix.

[0044] For example, assume that the two-dimensional node resource matrix A and the cloud host resource consumption matrix B are respectively:

[0045] ;

[0046] Then the resource remaining matrix C after scheduling is:

[0047] ;

[0048] In the above embodiment, by performing matrix subtraction operation on the node resource matrix and the cloud host resource consumption matrix, the complex resource consumption calculation problem can be simplified into a numerical subtraction process, thereby reducing the complexity of the calculation. At the same time, the target sequence obtained by the matrix subtraction operation can accurately reflect the difference between the node resources and the cloud host resources, thereby more accurately determining the remaining resources and optimizing the resource consumption.

[0049] In an exemplary embodiment, the resource surplus matrix is ​​optimized to obtain the target matrix, including: determining a preset optimization processing flow set in the current cloud system, identifying processing content corresponding to the preset optimization processing flow, wherein the processing content at least includes: matrix normalization processing and matrix weighting processing; performing matrix normalization processing on the resource surplus matrix according to the processing content to obtain a normalized resource matrix; performing matrix weighting processing on the normalized resource matrix to obtain a target matrix.

[0050] Optionally, due to the inconsistency of the CPU, memory, and disk orders of magnitude, the CPU, memory, and disk need to be normalized and then weighted, that is, a matrix normalization operation is performed on the above resource surplus matrix C to obtain a normalized resource matrix D, and a weighted process is performed on the normalized resource matrix D to obtain a matrix E. At this time, matrix E is the target matrix.

[0051] In the above embodiment, by normalizing the data in the resource surplus matrix and then performing weighted processing on the data in the normalized resource matrix, the resource surplus matrix can be optimized to obtain a more accurate and reliable target matrix, thereby providing strong support for the optimization of the cloud system.

[0052] In an exemplary embodiment, matrix normalization processing is performed on the resource surplus matrix according to the processing content to obtain a normalized resource matrix, including: identifying the row maximum value in each row of the resource surplus matrix; using the row maximum value as a divisor and performing a division operation on each column element in the target row corresponding to the current row maximum value to obtain a sub-normalized result for each row; and summing up M sub-normalized results to obtain a normalized resource matrix.

[0053] Optionally, perform a matrix normalization operation on the resource surplus matrix C, using the row maximum value in each row of the resource surplus matrix as the divisor. The maximum value of the first row is 64, the maximum value of the second row is 92, and the maximum value of the third row is 2900; then, perform a division operation on each column element in the target row corresponding to the current row maximum value, and obtain the sub-normalization results of each row respectively:

[0054] The first row of sub-normalization results: [44 / 64, 48 / 64, 64 / 64];

[0055] The second row of sub-normalization results: [52 / 92, 72 / 92, 92 / 92];

[0056] The third row of sub-normalization results: [1900 / 2900, 2900 / 2900, 900 / 2900];

[0057] Finally, the M sub-normalization results are summarized to obtain the normalized resource matrix D as follows:

[0058] ;

[0059] In the above embodiment, by finding the maximum value in each row and using the maximum value as a divisor for calculation, the resource surplus matrix can be quickly normalized, which is simple and intuitive. By normalizing each row, it can be ensured that the resource value of each row is on the same scale, avoiding the influence of differences between data.

[0060] In an exemplary embodiment, matrix weighting processing is performed on the normalized resource matrix to obtain a target matrix, including: obtaining M weight values ​​corresponding to M types of resources; determining a column matrix according to the M weight values; performing matrix multiplication operations on the column matrix and the normalized resource matrix to obtain the target matrix, wherein the target matrix is ​​a row matrix.

[0061] Optionally, the normalized resource matrix D is weighted. Assuming that the weights of the three types of resources, CPU, memory, and disk, are all 1, that is, the corresponding column matrix is ​​[1, 1, 1]', a matrix multiplication operation is performed on the column matrix and the normalized resource matrix D to obtain the target matrix E as follows:

[0062] ;

[0063] In the above embodiment, by obtaining the weight values ​​corresponding to the M types of resources, the importance of each resource to the target can be more accurately reflected, which helps to improve the accuracy and effect of decision-making. By converting the weight values ​​into the form of a column matrix, it is convenient to perform matrix multiplication operations with the normalized resource matrix, which simplifies the calculation process. Through matrix multiplication operations, the resource matrix and the weight values ​​can be effectively combined to obtain the target matrix, thereby achieving better guidance on the optimal allocation of resources and decision-making.

[0064] In an exemplary embodiment, resource data of a cloud platform is obtained, and before a computing node resource matrix is ​​generated based on the resource data, the method further includes: determining Q types of resources on the cloud platform, wherein each type of resource corresponds to a configuration parameter of a cloud host; screening out M types of resources that meet the computing node configuration from the Q types of resources; counting the amount of unused remaining resources corresponding to each type of resource in the cloud platform, and determining a target number of computing nodes allowed to be used based on the distribution of the remaining resources.

[0065] Optionally, if there are three types of resources, CPU, memory, and storage, on the cloud platform, each resource corresponds to different cloud host configuration parameters. According to the configuration requirements of the computing nodes, select the CPU and memory resource types that meet the configuration, count the remaining resources of each resource type in the cloud platform, and determine the target number of computing nodes allowed to be used based on the distribution of the remaining resources. Through the above steps, it can be ensured that the generated computing node resource matrix matches the actual resource configuration, fully utilize the resources of the cloud platform, and improve resource utilization and performance.

[0066] In the above embodiment, by determining the various resource types on the cloud platform and the corresponding cloud host configuration parameters, it is possible to ensure that the generated computing node resource matrix matches the actual resource configuration, thereby improving resource utilization and performance. By screening out M types of resources that meet the computing node configuration, it is possible to avoid using unnecessary resource types, save resource overhead, and improve the efficiency of computing node configuration. Counting the amount of unused remaining resources corresponding to each type of resource in the cloud platform can help determine the target number of computing nodes allowed to be used, make full use of unused resources, and improve resource utilization.

[0067] In an exemplary embodiment, after identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for prioritizing scheduling of cloud computing resources on the cloud platform, the method further includes: counting the number of nodes determined as the target computing node; and when determining the number of cloud hosts created in batches through the cloud platform, comparing the size relationship between the number of nodes and the number of hosts to determine whether to end the process of determining the target computing node.

[0068] Optionally, in the above embodiment, first, the functions and specification requirements of the target computing nodes required are determined, and the number of nodes of the target computing nodes determined by matrix calculation is counted. Then, the number of existing cloud hosts is counted and compared with the total number of nodes required. If the number of existing cloud hosts is greater than or equal to the total number of nodes required, the determination process is terminated; if the number of existing cloud hosts is less than the total number of nodes required, the determination process is continued. Compare the size relationship between the number of nodes and the number of hosts, assuming that the total number of target computing nodes required is 10 and the number of existing cloud hosts is 8. If the number of existing cloud hosts is less than the total number of nodes required, the determination process is continued. If the number of existing cloud hosts is greater than or equal to the total number of nodes required, the determination process is terminated. Through the above steps, it can be determined whether it is necessary to continue to add cloud hosts to meet the needs of the target computing nodes according to the actual situation. This step-by-step determination method can effectively avoid waste of resources and ensure the stability and reliability of system deployment.

[0069] In the above embodiment, by counting the number of target computing nodes determined, the scale and demand of the system can be better understood, providing a reference for subsequent work. Comparing the determined number of nodes with the number of cloud hosts created in batches through the cloud platform can help determine whether enough computing nodes have been found or whether the target computing nodes need to be further determined.

[0070] In an exemplary embodiment, the size relationship between the number of nodes and the number of hosts is compared to determine whether to end the determination process of the target computing node, including: when the number of nodes is greater than or equal to the number of hosts, determining to end the current determination process of the target computing node; when the number of nodes is less than the number of hosts, determining to continue the current determination process of the target computing node.

[0071] Optionally, in the above implementation example, by comparing the size relationship between the number of nodes and the number of hosts, it is determined whether to end the process of determining the target computing node. If the number of nodes is greater than or equal to the number of hosts, the determination process can be ended; if the number of nodes is less than the number of hosts, the determination process can continue. For example, if the goal is to run tasks on 10 hosts and there are already 15 available computing nodes, then it can be determined to end the process of determining the target computing node. If the goal is to run tasks on 10 hosts, but there are only 5 available computing nodes, then it is necessary to continue to add nodes to meet the goal.

[0072] In the above embodiment, the number of target computing nodes can be determined according to actual conditions to ensure that the system can meet performance and reliability requirements. At the same time, it can also be determined whether to continue the determination process according to the size relationship between the number of nodes and the number of hosts to maximize resource utilization and improve system efficiency.

[0073] In an exemplary embodiment, before identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform, the method also includes: evaluating the load balancing status of cloud computing resources corresponding to different elements in the target matrix; when the load balancing status does not satisfy the preset balancing status, identifying the computing node corresponding to the current element as an alternative scheduling node; when the load balancing status satisfies the preset balancing status, identifying the computing node corresponding to the current element as a normal scheduling node.

[0074] Optionally, there are multiple computing nodes in a cloud computing system. By evaluating the target matrix, it is found that the computing node corresponding to a certain element has a high load and does not meet the preset balanced state. At this time, according to the scheduling strategy, the computing node corresponding to the element is identified as a candidate scheduling node, and the computing nodes corresponding to other elements are identified as normal scheduling nodes. The system will reallocate resources based on these identifications to ensure that the load of each computing node is balanced and improve the overall performance and efficiency of the system.

[0075] In the above embodiment, by evaluating the load balancing status of cloud computing resources corresponding to different elements in the target matrix, the imbalanced resource allocation can be discovered in time, which is conducive to improving the performance and efficiency of the system. The computing nodes corresponding to the elements that do not meet the preset balanced status are identified as candidate scheduling nodes and normal scheduling nodes, which can implement targeted scheduling strategies and effectively solve the problem of resource load imbalance. By dynamically identifying the candidate scheduling nodes and the normal scheduling nodes, the allocation of resources can be flexibly adjusted according to the actual situation, thereby improving the fault tolerance and flexibility of the system.

[0076] In an exemplary embodiment, after identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for prioritizing scheduling of cloud computing resources on the cloud platform, the method further includes: obtaining multiple environmental information corresponding to the target computing node; wherein the environmental information includes at least location information corresponding to the target computing node and network delay information corresponding to the target computing node; and regulating the usage time point of the target computing node based on the multiple environmental information.

[0077] Optionally, there are 10 computing nodes on a cloud platform, and it is necessary to identify the maximum value element in the target matrix and determine the corresponding computing node as the priority scheduling node. In the target matrix, the maximum value element is 20, and the corresponding computing node is node 7. The location information corresponding to node 7 is obtained as location A, and the network delay information is 50ms. Based on this information, the use time point of node 7 is regulated, and the node use time is flexibly adjusted according to the network delay and node load to improve computing efficiency and resource utilization.

[0078] In the above embodiment, by obtaining the environment information corresponding to the target computing node, the operation status of the node can be better understood, providing a strong basis for subsequent node regulation. The use time point of the target computing node can be flexibly adjusted according to the actual situation based on multiple environmental information, thereby improving resource utilization and efficiency.

[0079] In an exemplary embodiment, the M-type resource information includes at least two of the following: size information of computing resources corresponding to the central processing unit configured by the cloud host, size information of memory configured by the cloud host, and size information of network bandwidth configured by the cloud host.

[0080] In an exemplary embodiment, when determining the number of cloud hosts created in batches through the cloud platform, before comparing the size relationship between the number of nodes and the number of hosts, the method also includes: determining the total scheduling time to complete the creation of the cloud hosts with the number of hosts; when the total scheduling time is greater than the target scheduling time corresponding to the number of hosts, determining that there is an abnormality in the current scheduling; when the total scheduling time is less than or equal to the target scheduling time corresponding to the number of hosts, determining that there is no abnormality in the current scheduling.

[0081] In an exemplary embodiment, after determining that there is an abnormality in the current scheduling, the method also includes: determining object information of the target object to which the resource demand is sent; constructing an alarm message according to the object information and a preset prompt message format; and sending the alarm message to the target object.

[0082] In an exemplary embodiment, after identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes used to prioritize scheduling of cloud computing resources on the cloud platform, the method further includes: identifying a first remaining resource amount of the M-type resources currently corresponding to the target computing node; subtracting the used resource amount of the M-type resources scheduled corresponding to the resource demand from the first remaining resource amount of the M-type resources to obtain a second remaining resource amount of the M-type resources; and using the second remaining resource amount of the M-type resources to update the M-type resource information corresponding to the target computing node.

[0083] In an exemplary embodiment, after identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for prioritizing scheduling of cloud computing resources on the cloud platform, the method further includes: counting the number of schedulings of each of the N computing nodes; determining the high-frequency computing node with the most scheduling times, and using the M types of target resource information corresponding to the high-frequency computing node as a resource reference for setting up a new computing node in the cloud platform.

[0084] Obviously, the embodiments described above are only some embodiments of the present application, not all embodiments. In order to better understand the above method, the above process is described below in conjunction with the embodiments, but it is not intended to limit the technical solutions of the embodiments of the present application, specifically:

[0085] The optional embodiment of the present application provides a method for cloud host computing node screening based on matrix operation to solve the problem of long scheduling time for batch creation of cloud hosts in large-scale scenarios. The characteristic of this method is that when scheduling a cloud host to screen computing nodes, it is not necessary to loop through all the computing nodes and select an optimal node from M computing nodes. Instead, the computing nodes and resources are combined into a two-dimensional matrix, and the matrix is ​​transformed N times, which includes resource consumption calculation, normalization processing, and weighted calculation. After performing N matrix operations, N computing nodes are finally screened out and correspond to N cloud hosts to complete the scheduling process of batch creation of cloud hosts. This optimization scheme can reduce the scheduling time of batch creation of N cloud hosts and M computing nodes by 100-200 times compared with the community native logic, greatly reducing the scheduling time for batch creation of cloud hosts and improving the efficiency of cloud host creation.

[0086] Optionally, resource consumption is the CPU, memory, and disk of all compute nodes minus the corresponding CPU, memory, and disk configuration of the cloud host.

[0087] Optionally, normalization processing is to process the remaining values ​​of CPU, memory, and disk resources to between [0, 1], and adjust the magnitudes of CPU, memory, and disk to the same level for weighted calculation.

[0088] Optionally, weighted computing is to sum the weights of CPU, memory, and disk resources, and finally select the computing node with the largest weight.

[0089] Optional, in the current OpenStack cloud platform, there is a scheduling scheme for batch creation of cloud hosts. During the process of batch creation of cloud hosts, the nova-scheduler scheduler needs to traverse all computing nodes for each cloud host to filter out the computing nodes with the largest CPU, memory, and disk to create the cloud host. First, each computing node needs to go through the CPUFilter, MemFilter, and DiskFilter resource screening to select a set of computing nodes with sufficient resources. In the set of computing nodes that meet the resource requirements, a series of weight calculations such as CPUWeight, MemWeight, and DiskWeight are performed, and finally an optimal computing node is selected to create the cloud host. In the scenario of batch creation of N cloud hosts and M computing nodes, the time complexity of completing a batch creation of cloud hosts is O (N*M). In large-scale scenarios, the scheduling time is relatively large, which greatly reduces the startup efficiency of batch creation of cloud hosts and cannot meet the business needs of customers. For example Figure 3 As shown, Figure 3 This is a flow chart of a batch creation of cloud host scheduling scheme in a cloud platform according to an embodiment of the present application. It includes the following steps:

[0090] Step 31: Create N cloud hosts in batches.

[0091] Step 32: Call placement to obtain M candidate hosts.

[0092] Step 33: Traverse N cloud hosts to select computing nodes.

[0093] Step 34: Traverse the M computing nodes to select the best node.

[0094] Step 35: After confirming that the computing node traversal is complete, enter the main cloud machine traversal confirmation.

[0095] Step 36: When it is determined that the traversal of the computing nodes is completed, end all traversal processes.

[0096] It can be seen that in Figure 3 In the process, it is necessary to traverse N cloud hosts to select computing nodes, and select the best node from M computing nodes. The node determination process will not end until all nodes have participated in the traversal. Therefore, the overall amount of calculation is too large, the execution time is long, and the efficiency is low. Then, when there are thousands of nodes to be determined, the effectiveness and accuracy of node determination may not be effectively guaranteed.

[0097] Optionally, OpenStack is a cloud computing management platform project based on the OpenStack open source, which is a combination of a series of software open source projects.

[0098] Optionally, a large-scale scenario refers to a cloud platform with many computing nodes, in the order of thousands of nodes.

[0099] As an optional implementation, Figure 4 is a flow chart of a method for implementing cloud host computing node screening based on a matrix operation method according to an embodiment of the present application, and Figure 3 Compared with the traditional method, this method combines the computing nodes and resource data into a two-dimensional matrix, transforms the matrix N times, and uses matrix operations instead of looping through all computing nodes. The specific steps are as follows:

[0100] Step 401: Create N cloud hosts in batches.

[0101] Step 402: Call placement to obtain M candidate hosts.

[0102] Step 403: Traverse N cloud hosts to select computing nodes.

[0103] Step 404: Calculate the node resource matrix transformation. This transformation includes resource consumption calculation, normalization processing, and weighted calculation, specifically including steps 4.1 to 4.7:

[0104] Step 4.1: Make a two-dimensional matrix of computing nodes and resource combinations. Combine computing nodes and resources into a two-dimensional matrix with 3 rows and m columns. The columns of the matrix are computing nodes, and the rows are the remaining CPU, memory, and disk resources of the computing nodes. Take three computing nodes node1, node2, and node3 as examples. For example, the remaining CPU of computing node node1 is 56, the remaining memory is 100G, and the remaining disk is 2000G; the remaining CPU of node2 is 64, the remaining memory is 80G, and the remaining disk is 3000G; the remaining CPU of node3 is 48, the remaining memory is 120G, and the remaining disk is 2000G. The two-dimensional matrix A with 3 rows and 3 columns composed of node1, node2, and node3 is as follows:

[0105] ;

[0106] Step 4.2: Schedule M computing nodes. Assume that the resource specifications required for the batch-created cloud hosts are 4C-8G-100G, that is, each cloud host requires 4 CPUs, 8G memory, and 100G disk. The corresponding cloud host resource consumption matrix B is as follows:

[0107] ;

[0108] Scheduling is to perform a difference operation between the computing node resource matrix and the cloud host resource consumption matrix, that is, to perform a matrix subtraction on A and B to obtain the resource surplus matrix C after scheduling as follows:

[0109] ;

[0110] Step 4.3: Normalize the matrix of the scheduled computing nodes. To select a node with the most sufficient resources from node1, node2, and node3, you need to weight the CPU, memory, and disk resources of the nodes and select the node with the largest weight to create the virtual machine for this scheduling. Since the CPU, memory, and disk are of different magnitudes, you need to normalize the CPU, memory, and disk and then perform weighted processing, that is, perform a matrix normalization operation on matrix C to obtain matrix D as follows:

[0111] ;

[0112] Step 4.4: Next, perform weighted processing on the computing node matrix D. By default, the weights of CPU, memory, and disk resources are all 1, which can be configured and adjusted according to actual conditions. The weighted matrix E is as follows:

[0113] ;

[0114] If the weights of CPU, memory, and disk resources are configured as w, i, and j respectively, the weighted matrix E' is as follows:

[0115] ;

[0116] Step 4.5: Get the optimal node from the weighted computing node matrix. Get the maximum value element from the elements of the weighted computing node matrix E. In the example, it can be seen that the weight value of the second element is the largest, and the corresponding computing node node2 is the optimal node for this scheduling. If the weights of CPU, memory, and disk resources are configured in the scheduling configuration file, the maximum value element is obtained from the matrix E', and the corresponding computing node is used as the optimal node for this scheduling. This scheduling ends here, and the next cloud host scheduling continues.

[0117] Step 4.6: Continue to schedule the next cloud host. Repeat steps 4.2 to 4.5 until the scheduling of N cloud hosts is completed. At this point, the resource matrix A1 of the computing node is as follows:

[0118] ;

[0119] The cloud host resource consumption matrix B1 is as follows:

[0120] ;

[0121] After this scheduling, the computing node resource matrix C1 is as follows:

[0122] ;

[0123] The normalized matrix D1 is as follows:

[0124] ;

[0125] The weighted matrix E1 is as follows:

[0126] ;

[0127] Continue to select the computing node corresponding to the largest element as the optimal node for this scheduling. And so on, after N cloud host scheduling, the optimal nodes corresponding to all cloud hosts created in batches are finally selected, completing the scheduling process of batch created cloud hosts.

[0128] Step 4.7: Test results. After testing, in the scenario where 3000 computing nodes randomly generate CPU, memory, and disk resources and batch create 10,000 virtual machines, it takes 1.0770001411437988 seconds to use numpy matrix operation scheduling, and it takes 123.14999985694885 seconds to use native for loop operation scheduling; in the scenario where 1000 virtual machines are batch created, it takes 0.10399985313415527 seconds to use numpy matrix operation scheduling, and it takes 13.950000047683716 seconds to use native for loop operation scheduling. The details are shown in Table 1.

[0129] Table 1

[0130]

[0131] In the scenario where 5000 computing nodes randomly generate CPU, memory, and disk resources and batch create 10,000 virtual machines, it takes 1.9470000267028809 seconds to use numpy matrix operation scheduling, and 269.34500002861023 seconds to use native for loop operation scheduling; in the scenario where 1000 virtual machines are batch created, it takes 0.1420001983642578 seconds to use numpy matrix operation scheduling, and 29.117999792099 seconds to use native for loop operation scheduling. The details are shown in Table 2.

[0132] Table 2

[0133]

[0134] The test results show that scheduling using numpy matrix operations takes more than 100 times longer than using the community's native logic using for loops. This greatly shortens the cloud host scheduling time in large-scale scenarios and improves the efficiency of batch creation of cloud hosts.

[0135] Step 405: The cloud host traversal is completed.

[0136] That is to say, the above-mentioned embodiment mainly produces a computing node resource matrix, which includes multiple computing nodes and their corresponding resource information; obtains a cloud host resource demand matrix, which includes the cloud host to be created and its resource demand information; performs resource consumption calculations on the computing node resource matrix and the cloud host resource demand matrix to obtain a post-scheduling resource surplus matrix; normalizes the post-scheduling resource surplus matrix to obtain a normalized computing node resource matrix; performs weighted processing on the normalized computing node resource matrix to obtain a weighted computing node resource matrix; selects the computing node corresponding to the maximum value element from the weighted computing node resource matrix as the optimal computing node for this scheduling; allocates the cloud host to be created to the optimal computing node, and repeats the above steps until the scheduling of all cloud hosts to be created is completed.

[0137] In summary, the optional embodiment of the present application can quickly select the optimal computing node from thousands of computing nodes by combining computing nodes and resource data into a two-dimensional matrix in a large-scale testing scenario, using matrix operations instead of looping through all computing nodes. It improves the scheduling efficiency of batch creation of cloud hosts in large-scale scenarios, shortens the creation time of the overall cloud host, improves the resource utilization efficiency and ease of use of the cloud platform, reduces the operating cost of the platform, and meets the large-scale testing scenarios of customers.

[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0139] In the present embodiment, a resource scheduling device is also provided, and the system is used to implement the above-mentioned embodiment and preferred implementation mode, and the descriptions that have been made are not repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0140] Figure 5 is a structural block diagram of a resource scheduling device according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:

[0141] A first generating module 52 is used to obtain resource data of the cloud platform and generate a computing node resource matrix according to the resource data; wherein the resource data includes N computing nodes and M types of resource information corresponding to each computing node, the N computing nodes correspond to N columns in the computing node resource matrix respectively, and the computing node resource matrix includes N rows and M columns;

[0142] A second generating module 54 is used to generate a cloud host resource consumption matrix corresponding to the resource demand when determining the resource demand of the cloud hosts to be created in batches; wherein each of the N columns in the cloud host resource consumption matrix corresponds to the resource specification information of the resource demand, the cloud host resource consumption matrix is ​​a matrix of the same type as the computing node resource matrix, and N and M are positive integers greater than or equal to 2;

[0143] A calculation module 56, configured to perform resource consumption calculation based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix;

[0144] The determination module 58 is used to identify the maximum value element in the target matrix, and determine the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform.

[0145] In an embodiment of the present application, the resource data of the cloud platform is obtained, and a computing node resource matrix is ​​generated according to the resource data; wherein the resource data includes N computing nodes and M types of resource information corresponding to each computing node, and the N computing nodes correspond to N columns in the computing node resource matrix respectively, and the computing node resource matrix contains N rows and M columns; when the resource requirements of the cloud hosts created in batches are determined, a cloud host resource consumption matrix corresponding to the resource requirements is generated; wherein each of the N columns in the cloud host resource consumption matrix corresponds to the resource specification information of the resource requirements, and the cloud host resource consumption matrix is ​​a homogeneous matrix of the computing node resource matrix, and N and M are positive integers greater than or equal to 2; resource consumption calculations are performed based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix; the maximum value element in the target matrix is ​​identified, and the target computing node corresponding to the maximum value element is determined as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform. The above technical solution solves the problem of large scheduling time consumption for batch creation of cloud hosts in large-scale scenarios. Furthermore, the efficiency of cloud computing resource scheduling is optimized through matrix operations, avoiding the resource screening of all computing nodes when creating each cloud host in the traditional method, thereby significantly reducing the scheduling time and improving the efficiency of cloud host creation.

[0146] In an exemplary embodiment, the above-mentioned device also includes: an allocation module, which is used to identify the maximum value element in the target matrix, determine the target computing node corresponding to the maximum value element as the node among the N computing nodes used to prioritize scheduling cloud computing resources on the cloud platform, and then allocate the target computing node to the target cloud host in the batch created cloud hosts that does not have an associated computing node, and update the remaining number of the target cloud hosts to obtain a first number; and control the number of loop operations of the resource consumption operation according to the first number.

[0147] In an exemplary embodiment, the above-mentioned operation module is also used to perform matrix subtraction operations with the cloud host resource consumption matrix based on the computing node resource matrix, wherein the matrix subtraction operation is used to use a first sequence of M numerical values ​​corresponding to each column in the computing node resource matrix to subtract a second sequence of M numerical values ​​corresponding to each column in the cloud host resource consumption matrix to obtain a target sequence; determine N target sequences based on the calculation results of the matrix subtraction operation; combine the resource surplus matrix based on the N target sequences; and optimize the resource surplus matrix to obtain the target matrix.

[0148] In an exemplary embodiment, the above-mentioned operation module is also used to determine the preset optimization processing flow set in the current cloud system, and identify the processing content corresponding to the preset optimization processing flow, wherein the processing content at least includes: matrix normalization processing, matrix weighting processing; performing matrix normalization processing on the resource surplus matrix according to the processing content to obtain a normalized resource matrix; performing matrix weighting processing on the normalized resource matrix to obtain a target matrix.

[0149] In an exemplary embodiment, the above-mentioned operation module is also used to identify the row maximum value in each row of the resource surplus matrix; use the row maximum value as a divisor, and perform division operation on each column element in the target row corresponding to the current row maximum value to obtain a sub-normalized result for each row; summarize M sub-normalized results to obtain a normalized resource matrix.

[0150] In an exemplary embodiment, the above-mentioned operation module is also used to obtain M weight values ​​corresponding to M types of resources; determine the column matrix according to the M weight values; perform matrix multiplication operation on the column matrix and the normalized resource matrix to obtain the target matrix, wherein the target matrix is ​​a row matrix.

[0151] In an exemplary embodiment, the above-mentioned device also includes: a screening module, which is used to obtain resource data of the cloud platform, and before generating a computing node resource matrix based on the resource data, determine Q types of resources on the cloud platform, wherein each resource corresponds to a configuration parameter of a cloud host; screen out M types of resources that meet the computing node configuration from the Q types of resources; count the amount of unused remaining resources corresponding to each type of resource in the cloud platform, and determine the target number of computing nodes allowed to be used based on the distribution of the remaining resources.

[0152] In an exemplary embodiment, the above-mentioned device also includes: a statistical module for identifying the maximum value element in the target matrix, and after determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for prioritizing scheduling of cloud computing resources on the cloud platform, the method also includes: counting the number of nodes of the target computing node determined; when determining the number of cloud hosts created in batches through the cloud platform, comparing the size relationship between the number of nodes and the number of hosts to determine whether to end the process of determining the target computing node.

[0153] In an exemplary embodiment, the above-mentioned statistical module is also used to determine to end the current determination process of the target computing node when the number of nodes is greater than or equal to the number of hosts; and to determine to continue the current determination process of the target computing node when the number of nodes is less than the number of hosts.

[0154] In an exemplary embodiment, the above-mentioned device also includes: an evaluation module, which is used to identify the maximum value element in the target matrix, and before determining the target computing node corresponding to the maximum value element as the node among the N computing nodes used to prioritize scheduling of cloud computing resources on the cloud platform, evaluate the load balancing status of cloud computing resources corresponding to different elements in the target matrix; when the load balancing status does not meet the preset balancing status, identify the computing node corresponding to the current element as an alternative scheduling node; when the load balancing status meets the preset balancing status, identify the computing node corresponding to the current element as a normal scheduling node.

[0155] In an exemplary embodiment, the above-mentioned device also includes: an acquisition module, which is used to identify the maximum value element in the target matrix, determine the target computing node corresponding to the maximum value element as the node among the N computing nodes used to prioritize scheduling cloud computing resources on the cloud platform, and then obtain multiple environmental information corresponding to the target computing node; wherein the environmental information at least includes location information corresponding to the target computing node and network delay information corresponding to the target computing node; and regulate the usage time point of the target computing node based on the multiple environmental information.

[0156] In an exemplary embodiment, the above-mentioned M-type resource information includes at least two of the following: size information of computing resources corresponding to the central processing unit configured by the cloud host, size information of memory configured by the cloud host, and size information of network bandwidth configured by the cloud host.

[0157] In an exemplary embodiment, the above-mentioned device also includes: a time module, which is used to determine the total scheduling time for completing the creation of cloud hosts of the number of hosts before comparing the size relationship between the number of nodes and the number of hosts when determining the number of cloud hosts created in batches through the cloud platform; when the total scheduling time is greater than the target scheduling time corresponding to the number of hosts, determine that there is an abnormality in the current scheduling; when the total scheduling time is less than or equal to the target scheduling time corresponding to the number of hosts, determine that there is no abnormality in the current scheduling.

[0158] In an exemplary embodiment, the above-mentioned time module also includes: a message unit, which is used to determine the object information of the target object to which the resource demand is sent after determining that there is an abnormality in the current scheduling; construct an alarm message according to the object information and a preset prompt message format; and send the alarm message to the target object.

[0159] In an exemplary embodiment, the above-mentioned device also includes: an updating module, which is used to identify the maximum value element in the target matrix, determine the target computing node corresponding to the maximum value element as the node among the N computing nodes used to prioritize scheduling cloud computing resources on the cloud platform, and then identify the first remaining resource amount of the M-type resources currently corresponding to the target computing node; subtract the used resource amount of the M-type resources scheduled corresponding to the resource demand from the first remaining resource amount of the M-type resources to obtain the second remaining resource amount of the M-type resources; and use the second remaining resource amount of the M-type resources to update the M-type resource information corresponding to the target computing node.

[0160] In an exemplary embodiment, the above-mentioned device also includes: a statistical module, which is used to identify the maximum value element in the target matrix, determine the target computing node corresponding to the maximum value element as the node among the N computing nodes used to prioritize scheduling of cloud computing resources on the cloud platform, and then count the scheduling times of each computing node among the N computing nodes; determine the high-frequency computing node with the most scheduling times, and use the M types of target resource information corresponding to the high-frequency computing node as a resource reference for setting up a new computing node in the cloud platform.

[0161] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0162] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0163] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0164] S1, obtaining resource data of the cloud platform, and generating a computing node resource matrix according to the resource data; wherein the resource data includes N computing nodes, and M types of resource information corresponding to each computing node, the N computing nodes respectively correspond to N columns in the computing node resource matrix, and the computing node resource matrix includes N rows and M columns;

[0165] S2, when determining the resource requirements of the cloud hosts to be created in batches, generating a cloud host resource consumption matrix corresponding to the resource requirements; wherein each of the N columns in the cloud host resource consumption matrix corresponds to resource specification information of the resource requirements, the cloud host resource consumption matrix is ​​a matrix of the same type as the computing node resource matrix, and N and M are positive integers greater than or equal to 2;

[0166] S3, performing resource consumption calculation based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix;

[0167] S4, identifying the maximum value element in the target matrix, and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform.

[0168] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0169] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0170] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0171] S1, obtaining resource data of the cloud platform, and generating a computing node resource matrix according to the resource data; wherein the resource data includes N computing nodes, and M types of resource information corresponding to each computing node, the N computing nodes respectively correspond to N columns in the computing node resource matrix, and the computing node resource matrix includes N rows and M columns;

[0172] S2, when determining the resource requirements of the cloud hosts to be created in batches, generating a cloud host resource consumption matrix corresponding to the resource requirements; wherein each of the N columns in the cloud host resource consumption matrix corresponds to resource specification information of the resource requirements, the cloud host resource consumption matrix is ​​a matrix of the same type as the computing node resource matrix, and N and M are positive integers greater than or equal to 2;

[0173] S3, performing resource consumption calculation based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix;

[0174] S4, identifying the maximum value element in the target matrix, and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform.

[0175] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0176] Optionally, in this embodiment, the computer program may be configured to perform the following steps by means of the computer program:

[0177] S1, obtaining resource data of the cloud platform, and generating a computing node resource matrix according to the resource data; wherein the resource data includes N computing nodes, and M types of resource information corresponding to each computing node, the N computing nodes respectively correspond to N columns in the computing node resource matrix, and the computing node resource matrix includes N rows and M columns;

[0178] S2, when determining the resource requirements of the cloud hosts to be created in batches, generating a cloud host resource consumption matrix corresponding to the resource requirements; wherein each of the N columns in the cloud host resource consumption matrix corresponds to resource specification information of the resource requirements, the cloud host resource consumption matrix is ​​a matrix of the same type as the computing node resource matrix, and N and M are positive integers greater than or equal to 2;

[0179] S3, performing resource consumption calculation based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix;

[0180] S4, identifying the maximum value element in the target matrix, and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform.

[0181] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0182] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0183] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A resource scheduling method, characterized in that: include: Obtain resource data of the cloud platform, and generate a computing node resource matrix according to the resource data; wherein the resource data includes N computing nodes and M types of resource information corresponding to each computing node, the N computing nodes correspond to N columns in the computing node resource matrix respectively, and the computing node resource matrix includes N rows and M columns; In the case of determining the resource requirements of the cloud hosts to be created in batches, a cloud host resource consumption matrix corresponding to the resource requirements is generated; wherein each of the N columns in the cloud host resource consumption matrix corresponds to resource specification information of the resource requirements, the cloud host resource consumption matrix is ​​a matrix of the same type as the computing node resource matrix, and N and M are positive integers greater than or equal to 2; Perform resource consumption calculation based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix; A maximum value element in the target matrix is ​​identified, and a target computing node corresponding to the maximum value element is determined as a node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform.

2. The method according to claim 1, characterized in that After identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform, the method further includes: Allocating the target computing node to a target cloud host that has no associated computing node in the batch-created cloud hosts, and updating the remaining number of the target cloud hosts to obtain a first number; The number of loop operations of the resource consumption operation is controlled according to the first number.

3. The method according to claim 1, characterized in that Performing resource consumption calculation based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix includes: Performing a matrix subtraction operation on the computing node resource matrix and the cloud host resource consumption matrix based on the computing node resource matrix, wherein the matrix subtraction operation is used to subtract a second sequence of M values ​​corresponding to each column in the cloud host resource consumption matrix from a first sequence of M values ​​corresponding to each column in the computing node resource matrix to obtain a target sequence; According to the calculation results of the matrix subtraction operation, N target sequences are determined; Combining a resource remaining amount matrix based on the N target sequences; The resource surplus matrix is ​​optimized to obtain the target matrix.

4. The method according to claim 3, characterized in that: Optimizing the resource surplus matrix to obtain the target matrix includes: Determine a preset optimization processing flow set in the current cloud system, and identify processing content corresponding to the preset optimization processing flow, wherein the processing content at least includes: matrix normalization processing and matrix weighting processing; Performing matrix normalization processing on the resource surplus matrix according to the processing content to obtain a normalized resource matrix; Matrix weighting processing is performed on the normalized resource matrix to obtain a target matrix.

5. The method according to claim 4, characterized in that Performing matrix normalization processing on the resource surplus matrix according to the processing content to obtain a normalized resource matrix includes: Identifying a row maximum value in each row of the resource surplus matrix; Using the row maximum value as a divisor, performing a division operation on each column element in the target row corresponding to the current row maximum value, to obtain a sub-normalized result for each row; Sum up the M sub-normalization results to obtain a normalized resource matrix.

6. The method according to claim 4, characterized in that Performing matrix weighting processing on the normalized resource matrix to obtain a target matrix includes: Get M weight values ​​corresponding to M types of resources; Determine a column matrix according to the M weight values; A matrix multiplication operation is performed on the column matrix and the normalized resource matrix to obtain the target matrix, wherein the target matrix is ​​a row matrix.

7. The method according to claim 1, characterized in that Before obtaining resource data of the cloud platform and generating a computing node resource matrix according to the resource data, the method further includes: Determine Q resources on the cloud platform, where each resource corresponds to a configuration parameter of a cloud host; Filter out M types of resources that meet the configuration of the computing node from the Q types of resources, where Q is greater than M and Q is a positive integer; The amount of unused remaining resources corresponding to each type of resource in the cloud platform is counted, and the target number of computing nodes allowed to be used is determined according to the distribution of the remaining resources.

8. The method according to claim 1, characterized in that After identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform, the method further includes: Counting and determining the number of target computing nodes; When determining the number of cloud hosts created in batches through the cloud platform, the relationship between the number of nodes and the number of hosts is compared to determine whether to end the process of determining the target computing node.

9. The method according to claim 8, characterized in that Comparing the size relationship between the number of nodes and the number of hosts to determine whether to end the process of determining the target computing node includes: When the number of nodes is greater than or equal to the number of hosts, determining to end the current process of determining the target computing node; In a case where the number of nodes is less than the number of hosts, it is determined to continue the current process of determining the target computing node.

10. The method according to claim 1, characterized in that Before identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform, the method further includes: Evaluating the load balancing status of cloud computing resources corresponding to different elements in the target matrix; In the case where the load balancing state does not satisfy the preset balancing state, marking the computing node corresponding to the current element as a candidate scheduling node; When the load balancing state satisfies a preset balancing state, the computing node corresponding to the current element is identified as a normal scheduling node.

11. The method according to claim 1, characterized in that: After identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform, the method further includes: Acquire multiple pieces of environmental information corresponding to the target computing node; wherein the environmental information at least includes location information corresponding to the target computing node and network delay information corresponding to the target computing node; The use time point of the target computing node is regulated based on the multiple pieces of environmental information.

12. The method according to claim 1, characterized in that The M-type resource information includes at least two of the following: size information of computing resources corresponding to the central processing unit configured by the cloud host, size information of memory configured by the cloud host, and size information of network bandwidth configured by the cloud host.

13. The method according to claim 8, characterized in that In the case of determining the number of cloud hosts created in batches through the cloud platform, before comparing the size relationship between the number of nodes and the number of hosts, the method further includes: Determine the total scheduling time to complete the creation of the cloud hosts of the number of hosts; When the total scheduling time is greater than the target scheduling time corresponding to the number of hosts, determining that the current scheduling is abnormal; When the total scheduling time is less than or equal to the target scheduling time corresponding to the number of hosts, it is determined that there is no abnormality in the current scheduling.

14. The method according to claim 13, characterized in that After determining that the current scheduling is abnormal, the method further includes: Determine the object information of the target object to which the resource demand is sent; Constructing an alarm message according to the object information and a preset prompt message format; The warning message is sent to the target object.

15. The method according to claim 1, characterized in that After identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform, the method further includes: Identify a first remaining resource amount of the M-type resource currently corresponding to the target computing node; Subtracting the used resource amount of the M-type resources scheduled corresponding to the resource demand from the first remaining resource amount of the M-type resources to obtain a second remaining resource amount of the M-type resources; The second remaining resource amount of the M-type resources is used to update the M-type resource information corresponding to the target computing node.

16. The method according to claim 1, characterized in that After identifying the maximum value element in the target matrix and determining the target computing node corresponding to the maximum value element as the node among the N computing nodes for preferentially scheduling cloud computing resources on the cloud platform, the method further includes: Counting the number of scheduling times of each computing node in the N computing nodes; The high-frequency computing node with the most scheduling times is determined, and the M-type target resource information corresponding to the high-frequency computing node is used as a resource reference for setting a new computing node in the cloud platform.

17. A resource scheduling device, characterized in that: include: A first generating module is used to obtain resource data of the cloud platform and generate a computing node resource matrix according to the resource data; wherein the resource data includes N computing nodes and M types of resource information corresponding to each computing node, the N computing nodes correspond to N columns in the computing node resource matrix respectively, and the computing node resource matrix includes N rows and M columns; A second generation module is used to generate a cloud host resource consumption matrix corresponding to the resource demand when determining the resource demand of the cloud hosts to be created in batches; wherein each of the N columns in the cloud host resource consumption matrix corresponds to the resource specification information of the resource demand, the cloud host resource consumption matrix is ​​a matrix of the same type as the computing node resource matrix, and N and M are positive integers greater than or equal to 2; A calculation module, used for performing resource consumption calculation based on the computing node resource matrix and the cloud host resource consumption matrix to obtain a target matrix; A determination module is used to identify the maximum value element in the target matrix, and determine the target computing node corresponding to the maximum value element as the node among the N computing nodes used for preferentially scheduling cloud computing resources on the cloud platform.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 16 when executed by a processor.

19. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 16 are implemented.

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 16 are implemented.

Citation Information

Patent Citations

  • Cloud platform automatic deployment and operation method, electronic equipment and storage medium

    CN112596901A

  • Resource scheduling method and device, electronic equipment and storage medium

    CN116880984A

  • Resource scheduling method and device, equipment and storage medium

    CN117472548A

  • Cloud host scheduling method and device, electronic equipment and computer readable storage medium

    CN118519782A

  • Method, device and equipment for creating cloud host of cloud management platform

    CN118842799A