Application deployment method and device
Through pre-trained orchestration classification models and orchestration rules, the application is automatically and rationally deployed, solving the problems of low resource utilization and poor system performance in the existing technology, and achieving efficient resource utilization and improvement of system performance.
Patent Information
- Application Number
- CN202111011306.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2041-08-31
AI Technical Summary
The existing application deployment methods lead to low system resource utilization and poor system performance.
The application's resource usage is classified through the pre-trained orchestration classification model, and the application is orchestrated in combination with the set orchestration rules to achieve automatic and reasonable deployment.
Improve resource utilization and overall system performance to ensure the rational deployment of applications and efficient utilization of resources.
Smart Images

Figure CN113656046B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an application deployment method and device. Background Art
[0002] Currently, application deployment is usually done through application orchestration, which deploys applications to shared physical host nodes or cloud host nodes. The existing application orchestration method is to randomly balance applications to existing host nodes. For example, Kubernetes will mechanically deploy applications to host nodes according to the above orchestration method. Among them, Kubernetes is used to manage containerized applications on multiple hosts in the cloud platform.
[0003] In the process of implementing the present invention, there are at least the following problems in the prior art:
[0004] The existing application deployment method has low utilization of system resources and poor system performance. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides an application deployment method and device. The method classifies the resource usage of applications through a pre-trained orchestration classification model, and then orchestrates the applications in combination with the set orchestration rules and the resource usage categories output by the model, thereby achieving automatic and reasonable deployment of applications, thereby improving resource utilization and overall system performance.
[0006] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for deploying an application is provided.
[0007] An application deployment method according to an embodiment of the present invention comprises: obtaining resource usage characteristic data of applications deployed on a plurality of host nodes, inputting the resource usage characteristic data into a pre-trained orchestration classification model, and outputting a resource usage category of the application; wherein the resource usage category comprises an indicator level for setting a resource indicator; according to the orchestration rules set for the host nodes and the indicator level, orchestrating the plurality of applications to generate an orchestration deployment file; wherein the orchestration rules are used to combine the plurality of resource indicators; according to the orchestration deployment file, deploying the application to be deployed to the corresponding target host node to complete the application deployment.
[0008] Optionally, the orchestration rule indicates an expected level of a plurality of the resource indicators that are combined; the orchestration of the plurality of the applications to generate an orchestration deployment file includes: comparing the indicator level of the same resource indicator with the expected level to filter out applications that meet the orchestration rule of the host node from the plurality of the applications, and constructing a corresponding application group; using the host node as a target host node to which applications of the application group are to be deployed, and writing application information of the application group and the address of the target host node into the orchestration deployment file.
[0009] Optionally, the method further includes: collecting resource usage data of multiple applications on multiple host nodes, performing feature extraction on the resource usage data, and obtaining corresponding resource usage feature data as training data; and using a machine learning algorithm to train the training data to obtain the orchestration classification model.
[0010] Optionally, the collecting of resource usage data of multiple applications on multiple host nodes includes: counting the number of requests received by the multiple applications within a set time period, and collecting index values of performance indicators of the multiple applications when running on their respective host nodes; wherein the performance indicators include any one or more of CPU usage, memory usage and disk usage; and generating resource usage data based on the number of requests and the index values of the performance indicators.
[0011] Optionally, extracting features from the resource usage data to obtain corresponding resource usage feature data includes: processing the resource usage data according to pre-selected feature parameters to obtain corresponding resource usage feature data; wherein the feature parameters include the proportion of requests in different time periods and the performance indicators.
[0012] Optionally, the resource indicator includes any combination of a usage rate in a set time period, a CPU usage rate, a memory usage rate, and a disk usage rate.
[0013] Optionally, the method further includes: obtaining resource usage characteristic data of the application deployed on the target host node to output a new resource usage category of the application using the orchestration classification model; again executing the step of orchestrating the application to generate a new orchestration deployment file, and redeploying the application according to the new orchestration deployment file.
[0014] To achieve the above objective, according to another aspect of an embodiment of the present invention, an application deployment device is provided.
[0015] An application deployment device according to an embodiment of the present invention includes: an application classification module, which is used to obtain resource usage feature data of applications deployed on multiple host nodes, input the resource usage feature data into a pre-trained orchestration classification model, and output the resource usage category of the application; wherein the resource usage category includes an indicator level for setting resource indicators; an application orchestration module, which is used to orchestrate the multiple applications according to the orchestration rules set for the host nodes and the indicator level, and generate an orchestration deployment file; wherein the orchestration rules are used to combine the multiple resource indicators; and an application deployment module, which is used to deploy the application to be deployed to the corresponding target host node according to the orchestration deployment file, and complete the application deployment.
[0016] Optionally, the orchestration rule indicates an expected level of a plurality of the resource indicators that are combined; the application orchestration module is further used to compare the indicator level of the same resource indicator with the expected level to filter out applications that meet the orchestration rule of the host node from the plurality of applications and construct a corresponding application group; the host node is used as the target host node to which the applications of the application group are to be deployed, and the application information of the application group and the address of the target host node are written into the orchestration deployment file.
[0017] Optionally, the device also includes: a model training module, used to collect resource usage data of multiple applications on multiple host nodes, perform feature extraction on the resource usage data, and obtain corresponding resource usage feature data as training data; use a machine learning algorithm to train the training data to obtain the orchestration classification model.
[0018] Optionally, the model training module is also used to count the number of requests received by multiple applications within a set time period, and collect index values of performance indicators of multiple applications when running on their respective host nodes; wherein the performance indicators include any one or more of CPU utilization, memory utilization, and disk utilization; and generate resource usage data based on the number of requests and the index values of the performance indicators.
[0019] Optionally, the model training module is also used to process the resource usage data according to pre-selected characteristic parameters to obtain corresponding resource usage characteristic data; wherein the characteristic parameters include the proportion of request volume in different time periods and the performance indicators.
[0020] Optionally, the resource indicator includes any combination of a usage rate in a set time period, a CPU usage rate, a memory usage rate, and a disk usage rate.
[0021] Optionally, the device also includes: a redeployment module, used to obtain resource usage characteristic data of the application deployed on the target host node, so as to output a new resource usage category of the application using the orchestration classification model; re-execute the step of orchestrating the application to generate a new orchestration deployment file, and redeploy the application according to the new orchestration deployment file.
[0022] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device is provided.
[0023] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement an application deployment method according to an embodiment of the present invention.
[0024] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer readable medium is provided.
[0025] A computer-readable medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, an application deployment method according to an embodiment of the present invention is implemented.
[0026] An embodiment of the above invention has the following advantages or beneficial effects: the resource usage of applications is classified through a pre-trained orchestration classification model, and then the applications are orchestrated in combination with the set orchestration rules and the resource usage categories output by the model, thereby achieving automatic and reasonable deployment of applications, thereby improving resource utilization and overall system performance.
[0027] By setting the resource indicator combination and the expected level of each resource indicator in the resource indicator combination in the orchestration rules of the host node, the indicator level of each resource indicator in the resource usage category can be compared with the corresponding expected level to screen out applications that meet the orchestration rules, thereby accurately determining the deployment location of the screened applications. The orchestration classification model is trained using machine learning algorithms to facilitate the prediction of the resource usage category to which the application belongs, while ensuring the accuracy of the prediction results.
[0028] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0030] Figure 1 is a schematic diagram of the main steps of the application deployment method according to an embodiment of the present invention;
[0031] Figure 2 is a schematic diagram of the main process of an application deployment method according to another embodiment of the present invention;
[0032] Figure 3 is a schematic diagram of the main process of an application deployment method according to yet another embodiment of the present invention;
[0033] Figure 4 is a schematic diagram of main modules of an application deployment device according to an embodiment of the present invention;
[0034] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0035] Figure 6 It is a schematic diagram of the structure of a computer device suitable for implementing an electronic device of an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0037] Figure 1 FIG. 1 is a schematic diagram of the main steps of an application deployment method according to an embodiment of the present invention. Figure 1 As shown, the application deployment method of the embodiment of the present invention mainly includes the following steps:
[0038] Step S101: Obtain resource usage feature data of applications deployed on multiple host nodes, input the resource usage feature data into a pre-trained orchestration classification model, and output the resource usage category of the application. This step first collects resource usage data of applications deployed on multiple host nodes, extracts features from the resource usage data, and obtains corresponding resource usage feature data. The host node here can be a physical host node or a cloud host node.
[0039] The resource usage feature data is then input into a pre-trained orchestration classification model, which is used to predict the resource usage category of each application. The resource usage category includes the indicator level of the set resource indicator. Resource indicators are indicators used to measure resource utilization and system performance, such as usage rate in a set time period, CPU (Central Processing Unit) usage rate, memory usage rate, disk usage rate, etc.; indicator levels are high, low, and medium. Therefore, the orchestration classification model is used to predict the indicator level of each application under each resource indicator.
[0040] Step S102: orchestrate the plurality of applications according to the orchestration rules and the indicator levels set for the host node, and generate an orchestration deployment file. The orchestration rules are used to combine a plurality of resource indicators, such as combining CPU usage and disk usage (forming a resource indicator combination), or combining memory usage and disk usage (forming another resource indicator combination). In an embodiment, the orchestration rules may indicate the expected levels of the combined plurality of resource indicators, and thus the orchestration rules may include a resource indicator combination, and the expected level of each resource indicator in the resource indicator combination.
[0041] In an embodiment, respective orchestration rules may be set for multiple host nodes. This step is based on the orchestration rules set for the host node and the resource usage categories of each application predicted by the orchestration classification model, and then the application that meets the orchestration rules of the host node is screened out from the multiple applications, and the screened application is added to the application group, and then the host node is used as the deployment location of the application of the application group to generate an orchestration deployment file, which records the deployment location corresponding to the application of each application group.
[0042] Step S103: According to the orchestration deployment file, the application to be deployed is deployed to the corresponding target host node to complete the application deployment. The application to be deployed can be an application that has been deployed to the host node or an application that has not been deployed to the host node. For an application that has been deployed to the host node, since its deployment location is recorded in the orchestration deployment file, the application can be directly deployed to the corresponding deployment location (i.e., the target host node); for an application that has not been deployed to the host node, the target host node can be selected from multiple host nodes according to the application information and the orchestration deployment file, and the application can be deployed.
[0043] This embodiment classifies the resource usage of applications through a pre-trained orchestration classification model, and then orchestrates the applications in combination with the set orchestration rules and the resource usage categories output by the model, thereby achieving automatic and reasonable deployment of applications, thereby improving resource utilization and overall system performance.
[0044] Figure 2 FIG. 1 is a schematic diagram of the main process of an application deployment method according to another embodiment of the present invention. Figure 2 As shown, the application deployment method of the embodiment of the present invention mainly includes the following steps:
[0045] Step S201: Acquire training data, use a machine learning algorithm to train the training data, and obtain an orchestration classification model. This step is used to train the orchestration classification model using a machine learning algorithm. Specifically, resource usage data of multiple applications on multiple host nodes is collected, and feature extraction is performed on the resource usage data to obtain corresponding resource usage feature data as training data; then, the training data is trained using a machine learning algorithm to obtain an orchestration classification model.
[0046] It is understandable that the resource usage data collected here is data generated during the operation of applications that have been deployed on the host node. In an embodiment, the resource usage data can be collected in the following manner: counting the number of requests received by multiple applications within a set time period, and collecting the index values of the performance indicators of the multiple applications when they are running on their respective host nodes; and then generating the resource usage data based on the number of requests and the index values of the performance indicators.
[0047] Among them, the performance indicators are used to measure system performance, including any one or more of CPU usage, memory usage and disk usage. In the embodiment, the resource usage data may include the amount of requests (including the number of incoming requests and the number of outgoing requests) of the application in one or several time periods, and may also include the CPU usage, CPU load, memory usage, and disk usage of the application in the time period. These data can be obtained from the process of project deployment test, and the specific data content is shown in Table 1. The above resource usage data can measure the impact of the current deployment on system resources and system performance from multiple dimensions.
[0048] Table 1
[0049]
[0050] In one embodiment, feature extraction is performed on the resource usage data, that is, data processing is performed on the resource usage data according to pre-selected feature parameters to obtain corresponding resource usage feature data. The feature parameters include the proportion of requests and performance indicators in different time periods. The selection of the feature parameters can remove redundant data in the resource usage data, reduce data dimensions, and increase machine learning efficiency and effect. The proportion of requests in different time periods is the ratio of the requests in two time periods, such as the ratio of requests during the day to requests at night. Table 2 is an example of the data content of resource usage feature data.
[0051] Table 2
[0052]
[0053] After the resource usage feature data is extracted, a machine learning algorithm can be used for training to obtain an orchestration classification model. In an embodiment, the machine learning algorithm can be a decision tree, a logistic regression algorithm, a support vector machine, etc. Taking a decision tree as an example, the feature parameter can be compared with a set threshold to obtain an indicator level of a set resource indicator.
[0054] Among them, the resource indicator can be any combination of usage in a set time period (such as daytime usage, nighttime usage), CPU usage, memory usage and disk usage. The setting of the resource indicator can achieve the goal of improving resource utilization and enhancing the overall system performance from multiple dimensions.
[0055] For example, compare the proportion of requests during the day and at night with the threshold value 1. If it is greater than 1, it means that the indicator level of the resource indicator daytime utilization rate is high; if it is equal to 1, it means that the indicator level of the resource indicator daytime utilization rate is medium; if it is less than 1, it means that the indicator level of the resource indicator daytime utilization rate is low.
[0056] For example, if the resource indicator (CPU usage, memory usage or disk usage) is less than the threshold of 30%, it means that the indicator level of the corresponding resource indicator is low; if it is between 30% and 60%, it means that the indicator level of the corresponding resource indicator is medium; if it is greater than 60%, it means that the indicator level of the corresponding resource indicator is high. Table 3 is an example of the results obtained after the machine learning algorithm processes the data in Table 2.
[0057] Table 3
[0058] application Daytime usage Night usage CPU usage Memory usage Disk usage A Low high high high high B Low high middle middle middle E high Low high high Low F middle middle middle middle middle
[0059] Step S202: Obtain resource usage feature data of applications deployed on multiple host nodes, input the resource usage feature data into the orchestration classification model, and output the resource usage category of the application. In the embodiment, the resource usage data of applications deployed on multiple host nodes are collected, including the request volume, CPU usage, memory usage, and disk usage in multiple time periods, and then feature extraction is performed on the resource usage data according to the feature extraction process of step S201 to obtain corresponding resource usage feature data. The host nodes here can be the same or different for the host nodes used to obtain training data in step S201.
[0060] In this embodiment, the resource usage characteristic data is the classification result of the application, for example, application 1 has high daytime usage, high CPU usage, high memory usage, and low disk usage; application 2 has high nighttime usage, low CPU usage, low memory usage, and high disk usage.
[0061] Step S203: According to the orchestration rules set for the host node and the indicator level of the resource usage category, multiple applications are orchestrated to generate an orchestration deployment file. The orchestration rules may include a resource indicator combination and the expected level of each resource indicator in the resource indicator combination. Therefore, this step can compare the indicator level of the same resource indicator with the corresponding expected level to filter out applications that meet the orchestration rules of the host node from multiple applications, build an application group, and then use the host node as the target host node for the application of the application group to be deployed, and write the application information of the application group and the address of the target host node into the orchestration deployment file.
[0062] In the embodiment, the resource indicator combination can be a combination of daytime usage and nighttime usage, a combination of CPU usage and disk usage, and a combination of memory usage and disk usage. Taking the deployment of host node 1 as an example, the orchestration rule is that some applications have high daytime usage, and some applications have high nighttime usage. Assuming that application 1 is used for scheduled synchronization tasks and has high nighttime usage; application 2 is a specific business and has high daytime usage, then application 1 and application 2 can be deployed to host node 1, so that the applications can use the CPU, memory, disk and other resources of host node 1 to the maximum extent.
[0063] Step S204: Deploy the application to be deployed to the corresponding target host node according to the orchestration deployment file to complete the application deployment. When the user deploys the application, the address of the target host node to be deployed for each application in the orchestration deployment file can be read to reasonably plan and deploy the application to be deployed.
[0064] Figure 3 FIG. 1 is a schematic diagram of the main flow of an application deployment method according to another embodiment of the present invention. Figure 3 As shown, the application deployment method of the embodiment of the present invention mainly includes the following steps:
[0065] Step S301: Acquire training data, use a machine learning algorithm to train the training data, and obtain an arrangement classification model.
[0066] Step S302: Obtain resource usage characteristic data of applications deployed on multiple host nodes, input the resource usage characteristic data into an orchestration classification model, and output the resource usage category of the application.
[0067] Step S303: orchestrate multiple applications according to the orchestration rules set for the host node and the indicator level of the resource usage category, and generate an orchestration deployment file.
[0068] Step S304: deploy the application to be deployed to the corresponding target host node according to the orchestration deployment file to complete the application deployment.
[0069] Step S305: Determine whether the current deployment is the first deployment. If it is the first deployment, execute step S302; if it is not the first deployment, end this process. It is understandable that it is also possible to further determine whether the current deployment is a specified deployment. If not, the steps S302 to S305 can be looped again. The specified times here are greater than or equal to 2 times.
[0070] The specific implementation of steps S301 to S304 corresponds to steps S201 to S204, which will not be described here. Step S305 is used to collect resource usage feature data of the application deployed on the target host node through step S302 after the first deployment is completed, and then use the orchestration classification model to output the new resource usage category of the application, and execute step S303 again to generate a new orchestration deployment file, so as to redeploy the application according to the new orchestration deployment file, complete the fine-tuning of the application deployment, and further ensure the rationality of the deployment.
[0071] In the above embodiment, after a deployment is completed, the resource usage data generated by the deployment is re-acquired and classified using the orchestration classification model, and then the application is re-orchestrated and deployed to complete fine-tuning of the application deployment, further ensuring the rationality of the deployment, and further improving resource utilization and overall system performance.
[0072] In a preferred embodiment, the above step S305 can be performed in idle time. When deploying and upgrading, a rolling upgrade method can be adopted, that is, first upgrading some applications and then upgrading the remaining applications, to avoid full upgrade deployment resulting in large resource occupation and affecting normal business.
[0073] Figure 4 4 is a schematic diagram of main modules of an application deployment device according to an embodiment of the present invention.
[0074] like Figure 4 As shown, the application deployment device 400 of the embodiment of the present invention mainly includes:
[0075] The application classification module 401 is used to obtain resource usage feature data of applications deployed on multiple host nodes, input the resource usage feature data into a pre-trained orchestration classification model, and output the resource usage category of the application. This module first collects resource usage data of applications deployed on multiple host nodes, extracts features from the resource usage data, and obtains corresponding resource usage feature data. The host node here can be a physical host node or a cloud host node.
[0076] The resource usage feature data is then input into a pre-trained orchestration classification model, which is used to predict the resource usage category of each application. The resource usage category includes the indicator level of the set resource indicator. Resource indicators are indicators used to measure resource utilization and system performance, such as usage rate in a set time period, CPU usage rate, memory usage rate, disk usage rate, etc.; indicator levels are high, low, and medium. Therefore, the orchestration classification model is used to predict the indicator level of each application under each resource indicator.
[0077] The application orchestration module 402 is used to orchestrate the multiple applications according to the orchestration rules and the indicator levels set for the host node, and generate an orchestration deployment file. The orchestration rules are used to combine multiple resource indicators, such as combining CPU usage and disk usage (constituting a resource indicator combination), and for example combining memory usage and disk usage (constituting another resource indicator combination). In an embodiment, the orchestration rules can indicate the expected levels of the combined multiple resource indicators, so the orchestration rules can include a resource indicator combination and the expected level of each resource indicator in the resource indicator combination.
[0078] In an embodiment, respective orchestration rules may be set for multiple host nodes. The module then screens out applications that meet the orchestration rules of the host node from multiple applications based on the orchestration rules set for the host node and the resource usage categories of each application predicted by the orchestration classification model, and adds the screened applications to the application group, and then uses the host node as the deployment location of the application of the application group to generate an orchestration deployment file, which records the deployment locations corresponding to the applications of each application group.
[0079] The application deployment module 403 is used to deploy the application to be deployed to the corresponding target host node according to the orchestration deployment file to complete the application deployment. The application to be deployed can be an application that has been deployed to the host node or an application that has not been deployed to the host node. For applications that have been deployed to the host node, since their deployment location is recorded in the orchestration deployment file, the application can be directly deployed to the corresponding deployment location (i.e., the target host node); for applications that have not been deployed to the host node, the target host node can be selected from multiple host nodes according to the application information and the orchestration deployment file, and the application can be deployed.
[0080] In addition, the application deployment device 400 of the embodiment of the present invention may also include: a model training module and a redeployment module ( Figure 4The model training module is used to collect resource usage data of multiple applications on multiple host nodes, perform feature extraction on the resource usage data, and obtain corresponding resource usage feature data as training data; and use a machine learning algorithm to train the training data to obtain the orchestration classification model.
[0081] A redeployment module is used to obtain resource usage feature data of the application deployed on the target host node to output a new resource usage category of the application using the orchestration classification model; perform the step of orchestrating the application again to generate a new orchestration deployment file, and redeploy the application according to the new orchestration deployment file.
[0082] From the above description, it can be seen that the resource usage of applications is classified through the pre-trained orchestration classification model, and then the applications are orchestrated according to the set orchestration rules and the resource usage categories output by the model, thereby achieving reasonable deployment of applications and improving resource utilization and overall system performance.
[0083] Figure 5 An exemplary system architecture 500 is shown to which the application deployment method or application deployment apparatus according to the embodiment of the present invention can be applied.
[0084] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0085] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0086] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0087] The server 505 may be a server that provides various services, such as a background management server that processes application deployment requests sent by administrators using terminal devices 501, 502, and 503. The background management server may obtain resource feature data, determine the resource usage category of the application, generate an orchestration deployment file, complete application deployment, and feed back the processing result (e.g., application deployment result) to the terminal device.
[0088] It should be noted that the application deployment method provided in the embodiment of the present application is generally executed by the server 505 , and accordingly, the application deployment device is generally set in the server 505 .
[0089] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0090] According to an embodiment of the present invention, the present invention also provides an electronic device and a computer-readable medium.
[0091] The electronic device of the present invention comprises: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement an application deployment method of an embodiment of the present invention.
[0092] The computer-readable medium of the present invention stores a computer program thereon, and when the program is executed by a processor, an application deployment method of an embodiment of the present invention is implemented.
[0093] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 suitable for implementing an electronic device of an embodiment of the present invention. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0094] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0095] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0096] In particular, according to the embodiments disclosed in the present invention, the process described in the main step diagram above can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the main step diagram. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0097] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0098] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0099] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor. For example, they may be described as follows: a processor includes an application classification module, an application orchestration module, and an application deployment module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the application classification module may also be described as a module that "obtains resource usage feature data of applications deployed on multiple host nodes, inputs the resource usage feature data into a pre-trained orchestration classification model, and outputs the resource usage category of the application."
[0100] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device includes: obtaining resource usage characteristic data of applications deployed on multiple host nodes, inputting the resource usage characteristic data into a pre-trained orchestration classification model, and outputting the resource usage category of the application; wherein the resource usage category includes setting the indicator level of the resource indicator; according to the orchestration rules set for the host node and the indicator level, orchestrating the multiple applications to generate an orchestration deployment file; wherein the orchestration rules are used to combine the multiple resource indicators; according to the orchestration deployment file, deploying the application to be deployed to the corresponding target host node to complete the application deployment.
[0101] According to the technical solution of the embodiment of the present invention, the resource usage of the application is classified through a pre-trained orchestration classification model, and then the application is orchestrated in combination with the set orchestration rules and the resource usage category output by the model, thereby achieving reasonable deployment of the application and improving resource utilization and overall system performance.
[0102] The above product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0103] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An application deployment method, characterized in that: include: Obtain resource usage feature data of applications deployed on multiple host nodes, input the resource usage feature data into a pre-trained orchestration classification model, and output a resource usage category of the application; wherein the resource usage category includes an indicator level for setting a resource indicator; According to the orchestration rules and the indicator levels set for the host node, the plurality of applications are orchestrated to generate an orchestration deployment file; wherein the orchestration rules are used to combine the plurality of resource indicators; Deploy the application to be deployed to the corresponding target host node according to the orchestration deployment file to complete the application deployment; The orchestration rule indicates a desired level of a plurality of the resource indicators combined; The orchestrating of the plurality of applications to generate an orchestration deployment file includes: Comparing the indicator level of the same resource indicator with the expected level, so as to filter out applications that meet the orchestration rule of the host node from the plurality of applications, and construct a corresponding application group; The host node is used as a target host node for deploying the application of the application group, and the application information of the application group and the address of the target host node are written into an orchestration deployment file.
2. The method according to claim 1, characterized in that The method further comprises: Collecting resource usage data of multiple applications on multiple host nodes, performing feature extraction on the resource usage data, and obtaining corresponding resource usage feature data as training data; The training data is trained using a machine learning algorithm to obtain the arrangement classification model.
3. The method according to claim 2, characterized in that The collecting of resource usage data of multiple applications on multiple host nodes includes: Counting the number of requests received by multiple applications within a set time period, and collecting the index values of performance indicators of multiple applications when they are running on their respective host nodes; wherein the performance indicators include any one or more of CPU usage, memory usage, and disk usage; Resource usage data is generated according to the request amount and the indicator value of the performance indicator.
4. The method according to claim 3, characterized in that The extracting features of the resource usage data to obtain corresponding resource usage feature data includes: The resource usage data is processed according to pre-selected characteristic parameters to obtain corresponding resource usage characteristic data; wherein the characteristic parameters include the proportion of request volumes in different time periods and the performance indicators.
5. The method according to any one of claims 1 to 4, characterized in that: The resource indicator includes any combination of a usage rate in a set time period, a CPU usage rate, a memory usage rate, and a disk usage rate.
6. The method according to claim 5, characterized in that The method further comprises: Acquire resource usage characteristic data of the application deployed on the target host node to output a new resource usage category of the application using the orchestration classification model; The step of orchestrating the application is performed again to generate a new orchestration deployment file, and the application is redeployed according to the new orchestration deployment file.
7. An application deployment device, characterized in that: include: An application classification module, used to obtain resource usage characteristic data of applications deployed on multiple host nodes, input the resource usage characteristic data into a pre-trained orchestration classification model, and output a resource usage category of the application; wherein the resource usage category includes an indicator level for setting a resource indicator; An application orchestration module, configured to orchestrate the plurality of applications according to the orchestration rules and the indicator levels set for the host node, and generate an orchestration deployment file; wherein the orchestration rules are used to combine the plurality of resource indicators; An application deployment module is used to deploy the application to be deployed to the corresponding target host node according to the orchestration deployment file to complete the application deployment; The orchestration rule indicates the expected level of the combined multiple resource indicators; the application orchestration module is further used to compare the indicator level of the same resource indicator with the expected level to filter out applications that meet the orchestration rule of the host node from the multiple applications and build a corresponding application group; the host node is used as the target host node to deploy the applications of the application group, and the application information of the application group and the address of the target host node are written into the orchestration deployment file.
8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Service choreography method, system and device, and computer readable storage medium
CN108809694A
Resource scheduling method, device, electronic equipment and computer readable medium
CN112363813A