Initialization methods, devices, terminal equipment, and storage media for cloud servers

By acquiring existing host data and using association algorithms to calculate frequent itemsets and association rules, the optimal parameter set for cloud host initialization is determined, which solves the strong coupling between cloud host creation and initialization, improves the applicability and flexibility of initialization operations, and reduces the maintenance cost of image templates.

CN113326073BActive Publication Date: 2026-04-21WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WEBANK (CHINA)
Filing Date
2021-06-23
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

There is a strong coupling between the creation and initialization of cloud servers, making it difficult to support the diverse and personalized needs of users, resulting in increased operational risks and insufficient applicability of initialization operations.

Method used

By acquiring existing host data, the association algorithm is used to calculate the frequent itemsets and association rules of application deployment information and initialization parameters, determine the optimal initialization parameter set, and execute the initialization operations in sequence.

Benefits of technology

It improves the applicability and flexibility of cloud server initialization, reduces the maintenance cost of image templates, and supports diverse and personalized user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113326073B_ABST
    Figure CN113326073B_ABST
Patent Text Reader

Abstract

This invention relates to the field of financial technology, and discloses a method, apparatus, terminal device, and storage medium for initializing a cloud server. The method includes: acquiring existing server data, which includes a set of initialization parameters and application deployment information for currently running online servers; calculating the existing server data using an association algorithm to obtain frequent itemsets and association rules between the application deployment information and the initialization parameter set; acquiring the configuration information of the target cloud server to be initialized, matching the configuration information with the frequent itemsets according to the association rules to determine the optimal parameter set for initializing the target cloud server; and executing the initialization operation on the target cloud server in sequence according to the parameter order in the optimal parameter set. By solving the strong coupling between cloud server creation and initialization, the applicability of cloud server initialization operations is improved, meeting the diverse and personalized needs of users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of financial technology (Fintech), and more particularly to a cloud host initialization method, apparatus, terminal device, and storage medium. Background Technology

[0002] With the development of computer technology, more and more technologies are being applied in the financial field, and the traditional financial industry is gradually transforming into financial technology. However, due to the requirements of security, real-time performance and stability in the financial industry, higher demands are being placed on cloud computing platform technology.

[0003] Currently, in IaaS (Infrastructure as a Service) architectures based on cloud computing platforms, when a user's resource request is received, a corresponding cloud server needs to be created to deploy applications that meet the user's needs. It is known that before creating a cloud server, an operating system image is required, and different image templates need to be selected based on the user's requirements when creating the image information. The created cloud server also needs to have its purpose, operating system version, and other configuration parameters determined according to the user's needs. Then, the created cloud server is initialized based on these configuration parameters. The purpose of initialization is to configure the relevant parameters of the created cloud server so that it can meet the user's requirements.

[0004] The initialization of cloud servers requires manual intervention after creation, involving repetitive operations and numerous steps, resulting in high maintenance difficulty. Therefore, to reduce manual operations while meeting diverse user needs, image templates need to be created based on different user requirements and different processor architectures. With many image templates, frequent changes increase maintenance risks. To mitigate these risks, the initialization parameters are typically determined directly based on the selected image template during cloud server initialization. This results in a strong coupling between cloud server creation and initialization, limiting the initialization operation to a single scenario and hindering support for complex and ever-changing personalized user needs. Summary of the Invention

[0005] The main objective of this invention is to provide a cloud host initialization method, apparatus, terminal device, and storage medium, aiming to solve the strong coupling between cloud host creation and initialization parameters, improve the applicability of cloud host initialization operations, and meet the diverse and personalized needs of users.

[0006] To achieve the above objectives, the present invention provides a cloud server initialization method, which includes the following steps:

[0007] Obtain existing host data, which includes the initialization parameter set and application deployment information of currently running online hosts;

[0008] The existing host data is calculated using an association algorithm to obtain frequent itemsets and association rules between the application deployment information and the initialization parameter set;

[0009] Obtain the configuration information of the target cloud host to be initialized, and match the configuration information with the frequent itemset according to the association rule to determine the optimal parameter set for initializing the target cloud host;

[0010] The initialization operation of the target cloud host is executed in sequence according to the parameter order in the optimal parameter set.

[0011] Optionally, the step of using an association algorithm to calculate the existing host data to obtain the frequent itemsets and association rules of the application deployment information and the initialization parameter set includes:

[0012] Obtain the preset support threshold and confidence threshold, and construct a basic dataset based on the application deployment information;

[0013] Select target parameters without replacement from the initialization parameter set, and construct a data candidate set using the values ​​of each target parameter and the base dataset;

[0014] The support of each candidate data item in the candidate data set is calculated by traversing the existing host data, and the first item set whose support is greater than the support threshold is determined.

[0015] Calculate the confidence level of the first itemset and determine the second itemset whose confidence level is greater than the confidence level threshold;

[0016] Using the second itemset as the base dataset, return and execute the steps of selecting a target parameter without replacement from the initialization parameter set and constructing a data candidate set using the values ​​of each target parameter and the base dataset, until the target parameter is the last parameter in the initialization parameter set. The resulting second itemset is a frequent itemset of the application deployment information and the initialization parameter set.

[0017] The association rules between the application deployment information and the initialization parameter set are determined based on the frequent itemsets.

[0018] Optionally, the step of traversing the existing host data to calculate the support of each candidate data item in the candidate data set includes:

[0019] The existing host data is divided into multiple transaction sets based on the application deployment information, wherein each transaction set includes multiple transactions, and the multiple transactions have the same application deployment information;

[0020] Based on the application deployment information, determine the target transaction set corresponding to each candidate data item in the data candidate set, traverse the target transaction set, count the number of transactions in the target transaction set, and the frequency of occurrence of each candidate data item in the data candidate set;

[0021] The support level of each candidate data item in the data candidate set is determined based on the ratio of the frequency of occurrence to the number of transactions.

[0022] Optionally, the step of performing the initialization operation on the target cloud host in sequence according to the parameter order in the optimal parameter set includes:

[0023] The first parameter in the optimal parameter set is used as the current parameter. The initialization operation corresponding to the current parameter is executed on the target cloud host, and the execution status of the initialization operation is detected. The execution status includes execution completion and execution failure.

[0024] If the execution status is execution failure, a rollback operation is performed and the number of rollbacks is counted. The rollback operation is to return and execute the initialization operation corresponding to the current parameters on the target cloud host and obtain the execution status of the initialization operation until the execution status is execution completion or the number of rollbacks is greater than a preset threshold, and an alarm prompt is output.

[0025] If the execution status is "execution completed", then the next parameter in the optimal parameter set is taken as the current parameter, and the process of performing the initialization operation corresponding to the current parameter on the target cloud host and detecting the execution status of the initialization operation is repeated until the current parameter is the last parameter in the optimal parameter set.

[0026] Optionally, before the step of obtaining the configuration information of the target cloud host to be initialized, the method further includes:

[0027] Create an image template and receive the user's application instructions, wherein the application instructions contain application information to be deployed;

[0028] Select a target template from the image templates according to the application information to be deployed in the application instructions;

[0029] Image information is generated based on the target template, and a target cloud host is created based on the image information.

[0030] Optionally, the step of creating a mirror template includes:

[0031] Obtain the preset system image file and create a virtual disk;

[0032] Determine the attribute information of the image template based on the system image file;

[0033] An image template is created based on the attribute information and the virtual disk, wherein the attribute information includes at least one of format, name, and data size.

[0034] Optionally, after the step of obtaining the configuration information of the target cloud host to be initialized, the method further includes:

[0035] When a configuration command is detected, the initialization configuration parameters input by the user are obtained;

[0036] Determine whether the number of parameters in the initialization configuration parameters is the same as the preset parameter threshold;

[0037] If they are the same, then the initialization configuration parameters are set to the optimal set of parameters for initializing the target cloud host;

[0038] If they are not the same, the initialization configuration parameters are matched with the frequent itemsets according to the association rules to determine the optimal parameter set for initializing the target cloud host, wherein the number of parameters in the initialization configuration parameters is less than the preset parameter threshold.

[0039] Furthermore, to achieve the above objectives, the present invention also provides a cloud server initialization device, the cloud server initialization device comprising:

[0040] The data acquisition module is used to acquire existing host data, which includes the initialization parameter set and application deployment information of currently running online hosts;

[0041] The data mining module is used to calculate the existing host data using association algorithms to obtain the frequent itemsets and association rules between the application deployment information and the initialization parameter set;

[0042] The parameter matching module is used to obtain the configuration information of the target cloud host to be initialized, and match the configuration information with the frequent itemset according to the association rule to determine the optimal parameter set for initializing the target cloud host.

[0043] An initialization module is used to perform initialization operations on the target cloud host in a series according to the parameter order in the optimal parameter set.

[0044] In this invention, each module of the cloud host initialization device can implement the steps of the cloud host initialization method described above during operation.

[0045] In addition, to achieve the above objectives, the present invention also provides a terminal device, the terminal device comprising: a memory, a processor, and an initialization program for a cloud host stored in the memory and executable on the processor, wherein the initialization program for the cloud host, when executed by the processor, implements the steps of the cloud host initialization method as described above.

[0046] In addition, to achieve the above objectives, the present invention also provides a computer storage medium storing an initialization program for a cloud host, wherein when the initialization program for the cloud host is executed by a processor, the initialization program for the cloud host implements the steps of the cloud host initialization method described above.

[0047] In addition, to achieve the above objectives, the present invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the cloud host initialization method as described above.

[0048] This invention provides a cloud host initialization method, apparatus, terminal device, computer storage medium, and computer program product. The method involves acquiring existing host data, including a set of initialization parameters and application deployment information for currently running online hosts; using an association algorithm to calculate the existing host data to obtain frequent itemsets and association rules between the application deployment information and the initialization parameter set; acquiring the configuration information of the target cloud host to be initialized; matching the configuration information with the frequent itemsets according to the association rules to determine the optimal parameter set for initializing the target cloud host; and executing the initialization operation on the target cloud host sequentially according to the parameter order in the optimal parameter set.

[0049] This invention, during the initialization process of a created cloud host, determines frequent itemsets and association rules between application deployment information and initialization parameters on the cloud host through existing host data. This allows for the discovery of the correlation between user needs and the cloud host's initialization parameters. The initialization parameters of the cloud host can be determined based on the application information that the user needs to deploy, thus solving the strong coupling between the creation and initialization of the cloud host, improving the applicability of the cloud host initialization operation, and enabling the initialized cloud host to support the diverse and personalized needs of users.

[0050] Compared to traditional cloud server initialization methods, this invention does not require creating multiple image templates based on user needs across different processor architectures. Instead, it only requires creating image templates based on the processor architecture, reducing the number of image templates created and effectively lowering maintenance costs. At the same time, it improves the efficiency of cloud server creation.

[0051] Furthermore, when initializing a cloud host, this invention sets the initialization parameters to be user-configurable and verifies the completeness of the user-configured initialization parameters. When the user inputs all the parameters required for initialization, the user-configured initialization parameters are used as the optimal parameter set to meet the user's personalized needs. When the user configures only some initialization parameters, based on the user's needs for those parameters, the user-configured initialization parameters are matched with frequent itemsets according to the calculated association rules to obtain the optimal parameter set that meets some of the user's personalized needs, thereby improving the flexibility and availability of cloud host initialization. Attached Figure Description

[0052] Figure 1 This is a schematic diagram of the device structure of the terminal device hardware operating environment involved in the embodiments of the present invention;

[0053] Figure 2 This is a flowchart illustrating the first embodiment of the cloud server initialization method of the present invention;

[0054] Figure 3 This is a schematic diagram illustrating the cloud server creation process according to an embodiment of the cloud server initialization method of the present invention.

[0055] Figure 4 This is a schematic diagram illustrating the creation process of another cloud host involved in one embodiment of the cloud host initialization method of the present invention;

[0056] Figure 5 This is a schematic diagram showing the relationship between the subsystems and initialization parameters involved in the second embodiment of the cloud host initialization method of the present invention;

[0057] Figures 6 to 8 This is a schematic diagram illustrating the calculation process of frequent itemsets involved in the second embodiment of the cloud host initialization method of the present invention;

[0058] Figure 9 This is a schematic diagram of the functional modules of an embodiment of the cloud host initialization system of the present invention.

[0059] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0060] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0061] Reference Figure 1 , Figure 1 This is a schematic diagram of the hardware operating environment of the terminal device involved in the embodiments of the present invention.

[0062] In this embodiment of the invention, the terminal device can be a client device configured to perform customer service scheduling in a scheduling system. The terminal device can be a smartphone, PC (Personal Computer), tablet computer, portable computer, etc.

[0063] like Figure 1 As shown, the terminal device may include: a processor 1001, such as a CPU; a communication bus 1002; a user interface 1003; a network interface 1004; and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0064] Those skilled in the art will understand that Figure 1 The terminal device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0065] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an initialization program for a cloud host.

[0066] exist Figure 1 In the terminal shown, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the user interface 1003 is mainly used to connect to the client and communicate with the client; and the processor 1001 can be used to call the cloud host initialization program stored in the memory 1005 and execute the operations described in the following embodiments of the cloud host initialization method of the present invention.

[0067] Based on the above hardware structure, various embodiments of the cloud host initialization method of the present invention are proposed.

[0068] The key terms used in the embodiments of this invention mainly include:

[0069] KVM: Kernel-based Virtual Machine. KVM is an open-source, Linux-native, full virtualization solution based on x86 hardware with virtualization extensions (Intel VT or AMD-V). In KVM, virtual machines are implemented as regular Linux processes, scheduled by the standard Linux scheduler. Each virtual CPU of a virtual machine is implemented as a regular Linux process, enabling KVM to utilize existing Linux kernel functionalities.

[0070] Image: A file format that requires a specific application to open. Multiple files can be combined into an image file and stored on the same disk as the specific application that can open the image file. When the image file is opened by the specific application, it is restored to multiple files. Image is a type of redundancy. Data on one disk has an exact copy on another disk.

[0071] ARM: Advanced RISC Machine. The ARM architecture, formerly known as the Advanced Reduced Instruction Set Machine (or earlier, Acorn RISC Machine), is a 32-bit Reduced Instruction Set Computing (RISC) processor architecture widely used in many embedded system designs. Due to its energy-efficient characteristics, ARM processors are well-suited for mobile communications, aligning with its primary design goal of low power consumption.

[0072] x86: The x86 architecture, a processor architecture. The x86 architecture refers to the computer language instruction set executed by the microprocessor; it is a standard abbreviation for a series of general-purpose Intel computers and also identifies a set of common computer instructions.

[0073] OS stands for Operation System. An operating system is a computer program that manages computer hardware and software resources.

[0074] It's important to note that in the IaaS architecture, when a user's resource request is received, a corresponding cloud server needs to be created to deploy the application that meets the user's needs. Before creating the cloud server, an operating system image is essential. Currently, this requires creating image templates based on different processor architectures, such as x86 and ARM, using the processor architecture as a baseline. Even within the same processor architecture, image templates are created based on the cloud server's purpose (determined by user requirements). This diversification of user needs leads to an increasing number of image templates, resulting in higher maintenance costs. To reduce frequent changes to image templates and mitigate operational risks, initialization parameters for the cloud server need to be pre-set based on the created image template, thus determining the corresponding initialization parameters based on the image template used when creating the cloud server. However, this initialization method only supports scenarios with a single user requirement, limiting its applicability. User needs are complex and varied, including personalized customization requirements. When users have multiple or personalized needs, the existing initialization method requires additional manual intervention to manually execute the initialization operation according to the user's specific requirements.

[0075] To address the above issues, this invention provides a cloud server initialization method. Please refer to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the cloud server initialization method of the present invention. In this embodiment, the cloud server initialization method is applied to an initialization device for the cloud server, which can be a personal computer or a server. The cloud server initialization method of the present invention includes:

[0076] Step S10: Obtain existing host data, which includes the initialization parameter set and application deployment information of currently running online hosts;

[0077] In this embodiment, the initialization parameters for initializing the cloud server are not determined based on the image template used when creating the cloud server, but rather by mining existing server data. Specifically, the existing server data is first obtained. This existing server data refers to the data of online cloud servers currently running on the network, i.e., the cumulative running data of online cloud servers. This includes application deployment information on each currently running cloud server, as well as the initialization data of each cloud server. The initialization data of each cloud server allows us to determine the historical initialization history and parameter values ​​during initialization. The application deployment information on the cloud server refers to the application information (or subsystems) deployed on the cloud server according to user requirements. The subsystems that need to be deployed on the cloud server can be determined based on user needs.

[0078] It should be noted that for the same host, due to adjustments in user needs, or because the initialized cloud host no longer meets the user's needs, the created cloud host may be re-initialized or partially initialized. When retrieving data from existing hosts, the current running data of the online cloud host is retrieved, that is, the running data of the cloud host after its most recent initialization.

[0079] Step S20: Calculate the existing host data using an association algorithm to obtain the frequent itemsets and association rules between the application deployment information and the initialization parameter set;

[0080] It should be noted that, in this embodiment, based on the existing host data of cloud hosts running on the current network, the correlation between cloud hosts and subsystems deployed on cloud hosts is mined, and through association algorithms, frequent itemsets and association rules of subsystems and initialization parameters are calculated from the acquired existing host data.

[0081] In this embodiment, the initialization parameter set when initializing the cloud host mainly includes parameters such as the cloud host's operating environment (env), IDC (Internet Data Center), logical region, CPU architecture, OS version, and host purpose. Each parameter can have multiple values. For example, the host purpose of the cloud host mainly includes APP (application), DB (database), BDP (Business Data Platform), DOCKER (application container engine), etc.; the CPU architecture mainly includes the commonly used x86 architecture and ARM architecture, etc.

[0082] By utilizing association algorithms based on acquired existing host data, frequent itemsets and association rules between different types of subsystems and various initialization parameters are calculated. It is known that user needs are diverse or personalized, and different needs place varying degrees of emphasis on parameters across different dimensions. Therefore, based on the acquired existing host data, it is necessary to mine frequent itemsets and association rules between the subsystems to be deployed on the host and the parameters across various dimensions.

[0083] Step S30: Obtain the configuration information of the target cloud host to be initialized, and match the configuration information with the frequent itemset according to the association rule to determine the optimal parameter set for initializing the target cloud host;

[0084] After calculating frequent itemsets and association rules based on the acquired existing host data, the configuration information of the target cloud host to be initialized is obtained. This configuration information, based on user requirements, determines the subsystem information to be deployed on the target cloud host, as well as the parameters that the target cloud host needs to be configured based on the subsystem information to be deployed. These parameters are configured by performing an initialization operation on the target cloud host. Therefore, based on the configuration information of the target cloud host to be initialized, the subsystem information to be deployed on the target cloud host can be determined. Based on the subsystem information to be deployed, the calculated association rules are used to match the subsystem information with frequent itemsets, thereby determining the optimal parameter set for initializing the target cloud host.

[0085] Specifically, based on the subsystem information and initialization parameter set in the existing host data, a candidate dataset is constructed. The acquired existing host data is traversed to calculate the support and confidence of the constructed candidate datasets. Candidate datasets that meet the minimum support and minimum confidence are designated as frequent itemsets. Strong association rules are generated from these frequent itemsets, thereby determining the association rules between the subsystem to be deployed and the initialization parameters. The minimum support and minimum confidence are configurable thresholds that can be customized by the user. When the subsystem information to be deployed is determined according to the user's needs, this information is matched with frequent itemsets based on association rules to obtain the optimal parameter set for initializing the target cloud host. In this optimal parameter set, the support and confidence of the candidate data set composed of each parameter value and the subsystem information to be deployed are the highest among all possible combinations.

[0086] Furthermore, before obtaining the configuration information of the target cloud host to be initialized, it is necessary to create the target cloud host to be initialized. The steps for creating the target cloud host to be initialized include:

[0087] Step S304: Create an image template and receive the user's application instruction, wherein the application instruction contains application information to be deployed;

[0088] Step S305: Select a target template from the image templates according to the application information to be deployed in the application instruction;

[0089] Step S306: Generate image information based on the target template, and create a target cloud host based on the image information.

[0090] First, an image template is created. When a user's resource request instruction is received, the application information to be deployed (i.e., the subsystem information to be deployed) contained in the request instruction is used to select a target template from the created image templates to generate image information. The target cloud host is then created based on the generated image information.

[0091] Specifically, in this embodiment, taking the creation of an image template and the creation of a target cloud host in KVM as an example, KVM is an open-source system virtualization module. After the image template is created, it is uploaded to the KVM platform for unified management. When a user's application instruction is received, the CPU architecture of the operating system of the target cloud host to be created is determined based on the information of the subsystem to be deployed. A corresponding image template is selected based on this CPU architecture, image information is generated, and the operating system is installed. After the operating system installation is completed, basic configurations are performed, such as configuring virtual network cards and file partitions. After the basic configuration of the operating system is completed, the image information is cloned to the host machine of the virtualization platform, and the creation of the target cloud host is completed by launching the image information.

[0092] Furthermore, referring to Figure 3 and Figure 4 , Figure 3 This is a diagram illustrating the traditional process of creating a cloud server, while Figure 4 This diagram illustrates the process of creating a cloud host according to an embodiment of the present invention. The CentOS6, CentOS7, SUSE (Linux operating system), Kylin, and Ubuntu files in the image template are the operating system files required for creating the cloud host. Figure 3 and Figure 4 The image templates needed to create cloud servers are all centrally managed within KVM. The difference is that... Figure 3 In the process, the mirrored templates created are based on different baselines, while Figure 4 In this approach, only the processor architecture is used as the baseline for creating image templates. Therefore, the number of image templates that need to be maintained is greatly reduced, effectively reducing the maintenance costs of image templates. At the same time, there is no need to frequently change image templates according to the diverse or personalized needs of users, thus reducing the maintenance risks caused by frequent changes to image templates.

[0093] Furthermore, in step S304 above, before creating a cloud server, it is necessary to first create an image template. The steps for "creating an image template" include:

[0094] Step S301: Obtain the preset system image file and create a virtual disk;

[0095] Step S302: Determine the attribute information of the image template based on the system image file;

[0096] Step S303: Create an image template based on the attribute information and the virtual disk, wherein the attribute information includes at least one of format, name and data size.

[0097] In this embodiment, before obtaining the configuration information of the target cloud host to be initialized, it is necessary to create an image template and then create the target cloud host based on the created image template. Specifically, when creating an image template, it is first necessary to obtain a system image file from a third-party server, view the image information based on the obtained system image file, create a virtual disk, and determine the image's attribute information. This attribute information includes at least one of the following: image format, image name, image data size, etc. Common image formats include ISO, BIN, IMG, TAO, DAO, CIF, FCD, etc. An image template is then created based on the image attribute information and the created virtual disk.

[0098] A system image file is similar to a compressed file; it combines a specific series of files into a single file according to a certain format for easy download and use by users, such as a beta version of an operating system or game. Image files not only have the "combination" function of compressed files, but their most important feature is that they can be recognized by specific software and directly burned to a CD. Compared to a typical image file, an image file can contain more information, such as system files, boot files, and partition table information. Therefore, an image file can contain all the information of a partition or even an entire hard drive. The image template in this embodiment contains the operating system files, boot files, and other necessary components for creating a cloud server.

[0099] Furthermore, in step S30 above, after the step of "obtaining the configuration information of the target cloud host to be initialized", the following is also included:

[0100] Step S31: When a configuration command is detected, obtain the initialization configuration parameters input by the user;

[0101] In this embodiment, in addition to automatically matching the optimal initialization parameter set according to user needs based on the calculated frequent itemsets and association rules, user-defined initialization parameters are also supported. Specifically, upon receiving a user's resource request instruction, the system obtains the user-inputted initialization configuration parameters when the user's configuration instruction is detected. Furthermore, the user-inputted initialization configuration parameters can be all the parameters required for initializing the target cloud host, or only a portion of them. Therefore, the completeness of the user-inputted initialization configuration parameters needs to be verified.

[0102] Step S32: Determine whether the number of parameters in the initialization configuration parameters is the same as the preset parameter threshold;

[0103] If step S33 is the same, then the initialization configuration parameters are set to the optimal set of parameters for initializing the target cloud host;

[0104] Specifically, when verifying the completeness of the user-input initialization configuration parameters, the number of parameters entered by the user is compared with a preset parameter threshold. If the two are the same, it proves that the user has configured all the parameters required to initialize the target cloud host. The user-configured initialization parameters are then used as the optimal parameter set, and the target cloud host is initialized according to this optimal parameter set to meet the user's personalized needs.

[0105] Step S34: If they are not the same, the initialization configuration parameters are matched with the frequent itemsets according to the association rules to determine the optimal parameter set for initializing the target cloud host, wherein the number of parameters in the initialization configuration parameters is less than the preset parameter threshold.

[0106] Furthermore, if the number of initialization parameters configured by the user differs from the preset parameter threshold, it indicates that the user has only partially configured the initialization parameters. It should be noted that when configuring initialization parameters, the number of initialization parameters required to initialize the target cloud host may vary depending on the user's specific needs. However, the number of initialization parameters that a user can configure is limited and cannot exceed the total number of parameters required for cloud host initialization. Therefore, the number of initialization parameters that a user can configure generally will not exceed the total number of parameters required for initialization. When the number of initialization parameters configured by the user is less than the total number of parameters required for initialization, the user-configured initialization parameters are matched with frequent itemsets according to the calculated association rules to obtain the optimal parameter set. The target cloud host is then initialized based on this optimal parameter set.

[0107] In this embodiment, the initialization parameters are set to be user-configurable, which can meet the personalized needs of users to customize cloud servers. At the same time, based on some of the parameters configured by the user, the optimal parameter set that meets the user's needs for some initialization parameters can be automatically matched, which improves the flexibility and availability of cloud server initialization.

[0108] Step S40: Perform the initialization operation on the target cloud host in sequence according to the parameter order in the optimal parameter set.

[0109] Furthermore, when initializing the created target cloud host, the initialization operations corresponding to each parameter are executed sequentially and in series according to the parameter order in the optimal parameter set. Specifically, the initialization operations performed on the target cloud host according to the parameter types in the optimal parameter set mainly include initialization operations based on the baseline (i.e., CPU architecture) specification, initialization based on the host's purpose, and personalized initialization based on the subsystem to be deployed. Executing the initialization operations corresponding to each parameter in series according to the parameter order in the optimal parameter set, based on different dimensions, improves the flexibility of initializing the cloud host.

[0110] This invention provides a method for initializing a cloud host. The method involves acquiring existing host data, which is the existing data of currently running online hosts, including initialization parameter sets and application deployment information for those online hosts; using an association algorithm to calculate the existing host data to obtain frequent itemsets and association rules between the application deployment information and the initialization parameter sets; acquiring the configuration information of the target cloud host to be initialized; matching the configuration information with the frequent itemsets according to the association rules to determine the optimal parameter set for initializing the target cloud host; and executing the initialization operation on the target cloud host sequentially according to the parameter order in the optimal parameter set.

[0111] This invention, during the initialization process of a created cloud host, determines frequent itemsets and association rules between application deployment information and initialization parameters on the cloud host through existing host data. This allows for the discovery of the correlation between user needs and the cloud host's initialization parameters. The initialization parameters of the cloud host can be determined based on the application information that the user needs to deploy, thus solving the strong coupling between the creation and initialization of the cloud host, improving the applicability of the cloud host initialization operation, and enabling the initialized cloud host to support the diverse and personalized needs of users.

[0112] Compared to traditional cloud server initialization methods, this invention does not require creating multiple image templates based on user needs across different processor architectures. Instead, it only requires creating image templates based on the processor architecture, reducing the number of image templates created and effectively lowering maintenance costs. At the same time, it improves the efficiency of cloud server creation.

[0113] Furthermore, when initializing a cloud host, this invention sets the initialization parameters to be user-configurable and verifies the completeness of the user-configured initialization parameters. When the user inputs all the parameters required for initialization, the user-configured initialization parameters are used as the optimal parameter set to meet the user's personalized needs. When the user configures only some initialization parameters, based on the user's needs for those parameters, the user-configured initialization parameters are matched with frequent itemsets according to the calculated association rules to obtain the optimal parameter set that meets some of the user's personalized needs, thereby improving the flexibility and availability of cloud host initialization.

[0114] Furthermore, based on the first embodiment described above, a second embodiment of the cloud host initialization method of the present invention is proposed. It should be noted that this embodiment is a refinement of step S20 described above, and may include:

[0115] Step S201: Obtain the preset support threshold and confidence threshold, and construct a basic dataset based on the application deployment information;

[0116] Based on the above embodiments, in this embodiment, when using the association algorithm to calculate the acquired existing host data, the first step is to obtain the preset support threshold and confidence threshold, i.e., the minimum support and minimum confidence. In this embodiment, the association algorithm is illustrated using the Apriori algorithm as an example. It is known that the Apriori algorithm is a classic data mining algorithm for mining frequent itemsets and association rules. Apriori means "from the past" in Latin. When defining a problem, prior knowledge or assumptions are usually used, which is called "a priori". The name of the Apriori algorithm is based on the fact that the algorithm uses the prior property of frequent itemsets, i.e., all non-empty subsets of frequent itemsets are also frequent. The Apriori algorithm uses an iterative method called level-by-level search, where k-itemsets are used to explore (k+1) itemsets. First, by scanning the database, the count of each item is accumulated, and items that satisfy the minimum support are collected to find the set of frequent 1-itemsets. This set is denoted as L1. Then, L1 is used to find the set L2 of frequent 2-itemsets, L2 is used to find L3, and so on, until no more frequent k-itemsets can be found. Finding each Lk requires a complete scan of the database. The Apriori algorithm uses the prior property of frequent itemsets to compress the search space. For the Apriori algorithm, the following concepts need to be explained:

[0117] 1. Items and Itemsets: Let itemset = {item1, item_2, ..., item_m} be the set of all items, where item_k (k = 1, 2, ..., m) is called an item. The set of items is called an itemset, and an itemset containing k items is called a k-itemset.

[0118] 2. Association rules: Association rules are implications of the form A => B, where A and B are both subsets of itemset and neither is empty, and the intersection of A and B is empty.

[0119] 3. Transactions and Transaction Sets: A transaction T is an itemset, which is a subset of the itemset. Each transaction is associated with a unique identifier. Different transactions together form a transaction set D, which constitutes the transaction database for association rule discovery.

[0120] Furthermore, in this embodiment, in the existing host data, the subsystems deployed on each cloud host, each initialization parameter, and their assigned values ​​can be regarded as items, and the itemset composed of the subsystem information and initialization parameters of each cloud host constitutes a transaction. When using the Apriori algorithm to calculate frequent itemsets and association rules in the existing host data, the preset support threshold and confidence threshold are first obtained, and then a basic dataset is constructed based on the subsystem information deployed on each cloud host.

[0121] Step S202: Select target parameters without replacement from the initialization parameter set, and construct a data candidate set using the values ​​of each target parameter and the basic dataset;

[0122] In the Apriori algorithm, it is necessary to explore (k+1) itemsets based on k itemsets. Therefore, based on this idea, a basic dataset needs to be constructed from existing host data, using information about subsystems deployed on cloud hosts. Based on this basic dataset, target parameters are selected from the corresponding initialization parameter sets to construct a data candidate set. The initialization parameter sets are differentiated based on the cloud host; the initialization parameters used during initialization operations on each cloud host constitute one initialization parameter set, and there is a one-to-one correspondence between the subsystem information and the initialization parameter set for the same cloud host. When constructing the data candidate set, the target parameters for constructing the data candidate set are selected from the initialization parameter set corresponding to the subsystem information in the basic dataset. The subsystem information and initialization parameters of a cloud host constitute a candidate data item in the data candidate set. Specifically, when constructing the data candidate, the values ​​of each selected target parameter are placed into the data items of the basic dataset. The candidate data items in the constructed data candidate set can be multi-dimensional arrays; for example, when selecting the first target parameter, a two-dimensional dataset can be constructed to form the data candidate set. When constructing the data candidate set, the target parameter can be any parameter in the initialization parameter set. Therefore, the two-dimensional dataset in the constructed data candidate set includes any combination of the parameter values ​​of each deployed subsystem and the corresponding initialization parameter set.

[0123] Step S203: Traverse the existing host data to calculate the support of each candidate data item in the data candidate set, and determine the first itemset whose support is greater than the support threshold;

[0124] After the data candidate set is constructed, the existing host data is traversed to obtain each candidate data item in the data candidate set, and the frequency of each candidate data item is counted to calculate the support of each data item in the data candidate set. The itemset composed of candidate data items with a support greater than the preset support threshold is the first itemset, which is a frequent itemset.

[0125] Furthermore, in step S203 above, the step of "traversing the existing host data to calculate the support degree of each candidate data item in the data candidate set" may also include:

[0126] Step A1: Divide the existing host data into multiple transaction sets according to the application deployment information, wherein each transaction set includes multiple transactions, and the multiple transactions have the same application deployment information;

[0127] Step A2: Determine the target transaction set corresponding to each candidate data item in the data candidate set based on the application deployment information; traverse the target transaction set; count the number of transactions in the target transaction set; and count the frequency of occurrence of each candidate data item in the data candidate set.

[0128] Step A3: Determine the support of each candidate data item in the data candidate set based on the ratio of the occurrence frequency to the number of transactions.

[0129] In this embodiment, the acquired existing host data uses cloud hosts as a reference, ensuring a one-to-one correspondence between the subsystem information and initialization parameters of each cloud host. The existing host data is a dataset composed of data sets in the form of [subsystemA, initialization parameter 1, initialization parameter 2, initialization parameter 3, ..., initialization parameter n]. Within the existing host data, the subsystem information and initialization parameters of each cloud host constitute a data set, and each data set represents a transaction. By traversing all transactions, the frequency of each candidate data item in the constructed candidate data set is obtained, and the ratio of this frequency to the frequency of the subsystem within the candidate data item in the existing host data is calculated; this ratio represents the support of each candidate data item. After determining the support of each candidate data item, candidate data items with a support greater than a preset support threshold are grouped into a frequent itemset, i.e., the first itemset.

[0130] The Apriori algorithm employs a pruning strategy. The basic idea of ​​this strategy is based on the prior property that any infrequent (k-1) itemset is not a subset of a frequent k-itemset. Therefore, if a candidate k-itemset Ck has a (k-1)-item subset that is not in Lk-1, then the candidate cannot be frequent and can be removed from Ck to obtain a compressed Ck. Based on this pruning strategy, frequent and infrequent itemsets can be determined. Specifically, according to a preset support threshold, i.e., minimum support, candidate data items that do not meet the minimum support are removed from the candidate data set to obtain the first itemset.

[0131] The specific process of finding frequent itemsets using pruning strategies is as follows:

[0132] 1. Each data item is a member of the set C1 of candidate 1-itemsets. Traverse all transactions, obtain each data item to generate C1, then count each data item, and delete data items that do not meet the minimum support from C1, thereby obtaining the frequent 1-itemset L1.

[0133] 2. Perform a pruning strategy on the set generated by the self-join of L1 to produce a set C2 of candidate 2-itemsets. Then, traverse all transactions and count each data item in C2. Similarly, remove items that do not meet the minimum support requirement from C2 to obtain the frequent 2-itemsets L2.

[0134] 3. Perform a pruning strategy on the set generated by the self-join of L2 to produce a set C3 of candidate 3-itemsets. Then, traverse all transactions and count each data item in C3. Similarly, remove data items that do not meet the minimum support requirement from C3 to obtain the frequent 3-itemsets L3.

[0135] 4. Following this pattern, a pruning strategy is applied to the set generated by the self-join of Lk-1 to produce candidate k-itemsets Ck. Then, all transactions are traversed, and each data item in Ck is counted. Data items that do not meet the minimum support requirement are then removed from Ck, thus obtaining frequent k-itemsets.

[0136] The conventional Apriori algorithm's pruning strategy treats each data item as a base dataset, then concatenates the frequent itemsets obtained in each step to form a candidate data set. By traversing all transactions, the support of each candidate data item in the candidate data set is determined. The difference in this embodiment is that it uses online cloud servers as prior knowledge. These online cloud servers meet diverse user needs. Therefore, based on this prior knowledge, when constructing the candidate data set, it selects target parameters from the initialization parameter set based on the frequent itemsets calculated in the previous step to increase the dimensionality of each candidate data item in the candidate data set, rather than simply concatenating the frequent itemsets themselves. Then, by traversing all transactions in the existing host data, the frequency of occurrence of the same subsystem in the existing host data, as well as the frequency of occurrence of each candidate data item in the candidate data set, are determined. The ratio of the frequency of occurrence of candidate data items with the same subsystem to the frequency of occurrence of the subsystem itself is used as the support of that candidate data item.

[0137] Specifically, in this embodiment, the existing host data is divided into different transaction sets based on different subsystem information. Each transaction set can include multiple transactions, but transactions within the same transaction set share the same subsystem information. Then, based on the subsystem information, a target transaction set corresponding to each candidate data item in the candidate data set is determined. This target transaction set shares the same subsystem information as the subsequent candidate data items. The target transaction set is scanned to obtain the number of transactions in the target transaction set, which represents the number of times the subsystem appears in the existing host data. The number of times each candidate data item appears in the target transaction set is then counted, and the ratio of the number of times a candidate data item appears in the target transaction set to the number of transactions in the target transaction set is used as the support of the candidate data item. Compared to the traditional Apriori algorithm, which requires scanning all transactions, this embodiment divides the existing host data, allowing different candidate data items to scan different transaction sets instead of all transactions, thus reducing computational load. Furthermore, for candidate data items with different subsystem information, different transaction sets can be scanned simultaneously in parallel to calculate the support of each candidate data item, improving computational efficiency.

[0138] Furthermore, different candidate data items scan different transaction sets, which in turn yields frequent itemsets and association rules corresponding to different subsystems. Since different subsystems correspond to different frequent itemsets and association rules, different users can simultaneously apply for different needs, which can be scanned in parallel to determine the optimal parameter set that satisfies the needs of different users, thereby improving the efficiency of processing user needs.

[0139] Step S204: Calculate the confidence level of the first itemset and determine the second itemset whose confidence level is greater than the confidence level threshold;

[0140] Based on the calculated first itemset, the confidence score of each data item in the first itemset is calculated. Candidate data items with a confidence score greater than a preset confidence threshold constitute frequent itemsets, i.e., the second itemset. Further, the support and confidence scores can be calculated using the following formulas 1 and 2:

[0141]

[0142]

[0143] In Equations 1 and 2, X and Y represent subsystem information and initialization parameters, support is the proportion of each data item in the frequent itemset among all candidate data items in the candidate data set, and confidence is the probability that one data item will appear after the first data item appears, or the conditional probability of the data. In Equation 1, number(allsample) refers to the number of transactions in the transaction set that apply the same deployment information to the existing host data, not the number of transactions in the existing host data.

[0144] Step S205: Using the second itemset as the base dataset, return and execute the step of selecting a target parameter without replacement from the initialization parameter set and constructing a data candidate set using the values ​​of each target parameter and the base dataset, until the target parameter is the last parameter in the initialization parameter set. The resulting second itemset is a frequent itemset of the application deployment information and the initialization parameter set.

[0145] After determining the frequent itemsets of the second itemset, this second itemset is used as the base dataset. Based on this, a new target parameter is selected from the initialization parameter set, and a new base dataset is used to construct a data candidate set. The dimension of the candidate data items in the reconstructed data candidate set is increased by one. That is, if the candidate data items in the obtained second itemset are a two-dimensional dataset, then the candidate data items in the reconstructed data candidate set are a three-dimensional dataset. Based on the reconstructed data candidate set, the support and confidence of each candidate data item are recalculated to obtain a new frequent itemset. This process continues until the initialization parameter for constructing the data candidate set is the last parameter in the initialization parameter set. The second itemset obtained after constructing and calculating the data candidate set is the final frequent itemset. Due to the existence of the subsystem to be deployed, the candidate data items in this frequent itemset should have one more dimension than the initialization parameter set.

[0146] Step S206: Determine the association rules between the application deployment information and the initialization parameter set based on the frequent itemsets.

[0147] After obtaining the final frequent itemsets, strong association rules between subsystem information and initialization parameters are determined based on the frequent itemsets. Once the frequent itemsets are identified, strong association rules can be directly generated from them. For a frequent itemset, all its non-empty subsets are also frequent itemsets.

[0148] In one possible embodiment, assuming the target cloud host to be deployed is subsystemA, the parameters to be initialized include the runtime environment (env), CPU architecture, host purpose, and operating system. The initialization parameter set is then [runtime environment, CPU architecture, host purpose, operating system]. Here, env includes prd, adr, preprd, etc. (different cloud host runtime environments for production, testing, development, etc.), CPU architecture includes x86 and arm, host purpose includes APP, BDP, DOCKER, DB, AI, Ceph (distributed file system), and operating system includes CentOS 7 (enterprise operating system OS 7 version), CentOS 6 (enterprise operating system OS 6 version), SUSE, Kylin, and Ubuntu.

[0149] When calculating the frequent itemsets and association rules corresponding to subsystem A, we first mine the transaction set containing subsystem A based on the existing host data, and then construct an association graph of various combinations of initialization parameters through this transaction set, ultimately constructing a graph such as... Figure 5The relationship graph is shown. Further, in this embodiment, based on the parameters to be initialized and the constructed relationship graph of subsystem A, the frequent itemsets and association rules of subsystem A are calculated. Specifically, taking the user-configured partial initialization parameters as an example, assuming that the user has configured partial initialization parameters, and the user-configured initialization parameter is the operating system, specifying the operating system as CentOS7, then the parameters to be initialized include the remaining runtime environment (env), CPU architecture, and host purpose. When calculating frequent itemsets, firstly, a basic dataset [subsystemA] is constructed based on the deployed subsystem A, and then a target parameter is selected from the initialization parameter set to construct a two-dimensional data candidate set. For example, if the selected parameter is the runtime environment env, then the constructed two-dimensional data candidate set is [subsystemA, env], where env includes prd, adr, and preprd. Therefore, the two-dimensional data candidate set includes three candidate data items: [subsystemA, prd], [subsystemA, adr], and [subsystemA, preprd]. It should be noted that since the user specifies an initialization parameter, the initialization parameter set when calculating frequent itemsets is [running environment, CPU architecture, host purpose], based on the parameters that need to be initialized mentioned above. The target transaction set corresponding to the selected subsystem A is scanned to determine the frequency of each candidate data item in the target transaction set. This allows the calculation of the support and confidence of the data candidate set composed of subsystem A and the running environment env, thereby determining the corresponding frequent itemsets. For example... Figure 6 As shown, Figure 6 To calculate the support and confidence of the two-dimensional data candidate set, if both the minimum support threshold and the minimum confidence threshold are set to 0.5, it can be determined that the obtained two-dimensional frequent itemset includes [subsystemA, prd] and [subsystemA, adr]. Then, based on the obtained two-dimensional frequent itemset, a new target parameter, such as CPU architecture, is selected from the initial parameter set, and a three-dimensional data candidate set is constructed, such as... Figure 7 As shown, from Figure 6 and 7 It can be seen that, Figure 6 Itemsets that do not meet the minimum support requirement are in Figure 7 The support in the data also does not meet the minimum support requirement. Itemsets that do not meet the minimum support are removed, and the confidence scores of the itemsets that do meet the minimum support are calculated. Then, based on the confidence scores of each candidate data item, three-dimensional frequent itemsets are determined. Based on the determined three-dimensional frequent itemsets, a target parameter is selected from the initialization parameter set, and a four-dimensional data candidate set is constructed. The above steps are repeated until the selected target parameter is the last parameter in the initialization parameter set, thus constructing a four-dimensional data candidate set. Figure 8 The data candidate set shown, after calculating support and confidence, yields a four-dimensional frequent itemset, which is the final frequent itemset.

[0150] Furthermore, referring to Figures 6 to 8 The calculation process of frequent itemsets is as follows: if the user specifies the subsystem to be deployed as subsystemA and specifies the operating system in the initialization parameter set as CentOS7, then the user-configured initialization parameters are matched with frequent itemsets according to the calculated association rules. During the matching, the user input [subsystemA, CentOS7] is used as configuration information and matched with frequent itemsets based on association rules to obtain the optimal parameter set [subsystemA, prd, x86, CentOS7, APP].

[0151] When a user requests resources, they need to provide information about the subsystem to be deployed in the request instruction and trigger a resource service request. Upon receiving the resource request instruction triggered by the user, a corresponding cloud host is created. After the cloud host is created, the initialization parameter information of the subsystem to be deployed, external environment, data center (IDC), CPU architecture, OS version, logical region, etc., is obtained. Combining the association rules of the set of parameters to be initialized in the existing host data, the optimal parameter set with greater than the minimum support and confidence in the frequent itemset is matched, thereby calculating the initialization parameter values ​​suitable for the cloud host's operating environment, IDC, logical region, CPU architecture, OS version, host purpose, etc.

[0152] In this embodiment, an association algorithm is used to mine existing host data to determine the frequent itemsets and association rules of different application deployment information in the existing host data. Then, based on different user needs, the optimal parameter set that meets the user needs is quickly matched according to the calculated frequent itemsets and association rules. The cloud host created according to the user needs is initialized, thereby creating a cloud host that meets the diverse needs of the user.

[0153] Furthermore, the association algorithm in this embodiment differs from traditional association algorithms that utilize the self-connection of frequent itemsets to construct a data candidate set. This embodiment is user-demand oriented, constructs a basic dataset based on user needs, and then uses the parameter values ​​of each initialization parameter in the initialization parameter set and the basic dataset to construct a data candidate set. This makes the correlation between the calculated frequent itemsets and user needs stronger, thereby making the optimal parameter set matched based on user needs more accurate.

[0154] In addition, to improve the flexibility and efficiency of the cloud server initialization method, step S20 can also be implemented in the following manner:

[0155] Obtain the preset support threshold and confidence threshold, and construct a basic dataset based on the application deployment information;

[0156] The preset number of parameters selected by the initialization parameters and the basic dataset are used as a data candidate set;

[0157] The support of each candidate data item in the candidate data set is calculated by traversing the existing host data, and the first item set whose support is greater than the support threshold is determined.

[0158] Calculate the confidence level of the first itemset and determine the second itemset whose confidence level is greater than the confidence level threshold;

[0159] The second itemset is used as a frequent itemset between the application deployment information and the initialization parameter set;

[0160] The association rules between the application deployment information and the initialization parameter set are determined based on the frequent itemsets.

[0161] In this embodiment, the specific implementation details of each step are consistent with those in the previous embodiment, and will not be repeated here. This embodiment constructs a basic dataset using application deployment information, and then constructs a data candidate set by pre-setting several parameters (the specific selection quantity can be half or 1 / 3 of the total) using the basic dataset and the initialization parameter set, thereby obtaining the second itemset. Finally, the association rule between the application deployment information and the initialization parameter set is obtained through the second itemset. This process does not require selecting all target parameters without replacement from the initialization parameter set, enabling rapid acquisition of the second itemset. In scenarios where accuracy requirements are not high, this method achieves flexibility and efficiency in the initialization of cloud servers.

[0162] Furthermore, based on the first embodiment described above, a third embodiment of the cloud host initialization method of the present invention is proposed. In this embodiment, step S40, which involves executing the initialization operation of the created target cloud host in series according to the parameter order in the determined optimal parameter set, may include:

[0163] Step S401: Take the first parameter in the optimal parameter set as the current parameter, perform the initialization operation corresponding to the current parameter on the target cloud host, and detect the execution status of the initialization operation, wherein the execution status includes execution completion and execution failure;

[0164] Based on the first embodiment described above, the initialization operation of the cloud host is roughly divided into several different dimensions, mainly including initialization based on baseline specifications, initialization based on the host's purpose, and personalized initialization based on the subsystem to be deployed. When executing the initialization operation of the cloud host in sequence, a parameter is first selected sequentially from the optimal parameter set as the current parameter for initialization. Then, the initialization operation corresponding to that parameter is executed, and the execution status of the initialization operation corresponding to the current parameter is detected. The execution status of the initialization operation includes execution completion and execution failure.

[0165] Step S402: If the execution status is execution failure, then perform a rollback operation and count the number of rollbacks. The rollback operation is to return and execute the step of performing the initialization operation corresponding to the current parameters on the target cloud host and obtaining the execution status of the initialization operation until the execution status is execution completion or the number of rollbacks is greater than a preset threshold, and output an alarm prompt.

[0166] When a failure is detected in the initialization operation corresponding to the current parameter, a rollback operation is performed. This rollback operation involves re-executing the initialization operation corresponding to the current parameter. Simultaneously, the number of rollbacks for the initialization operation of the current parameter is recorded. When the number of rollbacks exceeds a preset threshold, an initialization exception mechanism is triggered, and an alarm is output to prompt relevant personnel to handle the abnormal situation promptly. The preset threshold for the number of rollbacks can be customized, and different initialization parameters can have different alarm thresholds. Furthermore, during the rollback operation, the execution status of the initialization operation is also monitored. In one possible scenario, if the number of rollbacks for the current parameter has not reached the preset threshold, the initialization operation for the current parameter may be completed, and in this case, the execution status of the initialization operation corresponding to the current parameter may be detected as incomplete.

[0167] Step S403: If the execution status is "execution completed", then take the next parameter in the optimal parameter set as the current parameter, return and execute the initialization operation corresponding to the current parameter on the target cloud host, and obtain the execution status of the initialization operation, until the current parameter is the last parameter in the optimal parameter set.

[0168] If the execution status of the initialization operation corresponding to the current parameter is not completed, the next parameter is selected from the optimal parameter set as the current parameter, and the initialization operation corresponding to that parameter is executed. The execution status of the initialization operation corresponding to that parameter is then checked. This process continues until the current parameter is the last parameter in the optimal parameter set. After executing the initialization operation corresponding to the last parameter in the optimal parameter set, the initialization operation of the target cloud host is completed, and a cloud host that meets the user's needs is obtained.

[0169] In this embodiment, by sequentially executing initialization operations on the parameters in the optimal parameter set and monitoring the execution status of the initialization operations corresponding to each parameter, abnormal situations during the initialization process of the cloud host can be detected in a timely manner. Furthermore, by performing rollback operations, only failed initialization operations are retried, rather than re-executing all initialization operations, effectively reducing the initialization time of the cloud host. When the number of rollbacks reaches a preset threshold, an alarm is output, improving the monitoring effect of the initialization process.

[0170] Furthermore, the present invention also provides an initialization device for a cloud host, please refer to... Figure 9 , Figure 9 This is a functional module diagram of an embodiment of the cloud host initialization device of the present invention. For example... Figure 9 As shown, the cloud host initialization device of the present invention includes:

[0171] The data acquisition module 10 is used to acquire existing host data, which includes the initialization parameter set and application deployment information of currently running online hosts;

[0172] Data mining module 20 is used to calculate the existing host data using association algorithms to obtain frequent itemsets and association rules between the application deployment information and the initialization parameter set;

[0173] The parameter matching module 30 is used to obtain the configuration information of the target cloud host to be initialized, and match the configuration information with the frequent itemset according to the association rule to determine the optimal parameter set for initializing the target cloud host.

[0174] The initialization module 40 is used to perform initialization operations on the target cloud host in a series according to the parameter order in the optimal parameter set.

[0175] Furthermore, the data mining module 20 includes:

[0176] The basic set construction unit is used to obtain preset support thresholds and confidence thresholds, and construct a basic dataset based on the application deployment information;

[0177] A candidate set construction unit is used to select target parameters without replacement from the initialization parameter set, and construct a data candidate set using the parameter values ​​of the target parameters and the basic dataset;

[0178] The traversal unit is used to traverse the existing host data, calculate the support of each candidate data item in the data candidate set, and determine the first itemset whose support is greater than the support threshold.

[0179] A calculation unit is used to calculate the confidence level of the first itemset and determine a second itemset whose confidence level is greater than the confidence level threshold.

[0180] The loop unit is used to take the second itemset as the base dataset, return and execute the step of selecting a target parameter without replacement from the initialization parameter set, and constructing a data candidate set using the parameter values ​​of the target parameter and the base dataset, until the target parameter is the last parameter in the initialization parameter set, and the resulting second itemset is a frequent itemset of the application deployment information and the initialization parameter set;

[0181] The association rule mining unit is used to determine the association rules between the application deployment information and the initialization parameter set based on the frequent itemsets.

[0182] Furthermore, the traversal unit includes:

[0183] The sub-unit is used to divide the existing host data into multiple transaction sets according to the application deployment information, wherein the transaction set includes multiple transactions, and the multiple transactions have the same application deployment information;

[0184] The traversal subunit is used to determine the target transaction set corresponding to each candidate data item in the data candidate set based on the application deployment information, traverse the target transaction set, count the number of transactions in the target transaction set, and the frequency of occurrence of each candidate data item in the data candidate set.

[0185] The calculation subunit is used to determine the support of each candidate data item in the data candidate set based on the ratio of the occurrence frequency to the number of transactions.

[0186] Furthermore, the initialization module 40 includes:

[0187] An execution detection unit is used to take the first parameter in the optimal parameter set as the current parameter, perform the initialization operation corresponding to the current parameter on the target cloud host, and detect the execution status of the initialization operation, wherein the execution status includes execution completion and execution failure;

[0188] The rollback unit is used to perform a rollback operation and count the number of rollbacks if the execution status is execution failure. The rollback operation is to return and execute the initialization operation corresponding to the current parameters on the target cloud host and obtain the execution status of the initialization operation until the execution status is execution completion or the number of rollbacks is greater than a preset threshold, and then output an alarm prompt.

[0189] The serial initialization unit is used to, if the execution status is execution completed, take the next parameter in the optimal parameter set as the current parameter, return and execute the initialization operation corresponding to the current parameter on the target cloud host, and detect the execution status of the initialization operation, until the current parameter is the last parameter in the optimal parameter set.

[0190] Furthermore, the cloud server initialization device also includes a cloud server creation module, used for:

[0191] Create an image template and receive the user's application instructions, wherein the application instructions contain application information to be deployed;

[0192] Select a target template from the image templates according to the application information to be deployed in the application instructions;

[0193] Image information is generated based on the target template, and a target cloud host is created based on the image information.

[0194] Furthermore, the cloud host initialization device also includes an image creation module, used for:

[0195] Obtain the preset system image file and create a virtual disk;

[0196] Determine the attribute information of the image template based on the system image file;

[0197] An image template is created based on the attribute information and the virtual disk, wherein the attribute information includes at least one of format, name, and data size.

[0198] Furthermore, the initialization device for the cloud host also includes a parameter configuration module, used for:

[0199] When a configuration command is detected, the initialization configuration parameters input by the user are obtained;

[0200] Determine whether the number of parameters in the initialization configuration parameters is the same as the preset parameter threshold;

[0201] If they are the same, then the initialization configuration parameters are set to the optimal set of parameters for initializing the target cloud host;

[0202] If they are not the same, the initialization configuration parameters are matched with the frequent itemsets according to the association rules to determine the optimal parameter set for initializing the target cloud host, wherein the number of parameters in the initialization configuration parameters is less than the preset parameter threshold.

[0203] The functions of each module in the cloud host initialization device correspond to the steps in the cloud host initialization method embodiment, and their functions and implementation processes will not be described in detail here.

[0204] The present invention also provides a computer storage medium storing an initialization program for a cloud host, wherein when the initialization program for the cloud host is executed by a processor, the initialization program for the cloud host implements the steps of the initialization method for the cloud host as described in any of the above embodiments.

[0205] The specific embodiments of the computer storage medium of the present invention are basically the same as the embodiments of the cloud host initialization method described above, and will not be repeated here.

[0206] The present invention also provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, implements the steps of the cloud host initialization method as described in any of the above embodiments.

[0207] The specific embodiments of the computer storage medium of the present invention are basically the same as the embodiments of the cloud host initialization method described above, and will not be repeated here.

[0208] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0209] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0210] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0211] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for initializing a cloud server, characterized in that, The initialization method for the cloud server includes the following steps: Obtain existing host data, which includes the initialization parameter set and application deployment information of currently running online hosts; Obtain the preset support threshold and confidence threshold, and construct a basic dataset based on the application deployment information; Select target parameters without replacement from the initialization parameter set, and construct a data candidate set using the values ​​of each target parameter and the base dataset; The support of each candidate data item in the candidate data set is calculated by traversing the existing host data, and the first item set whose support is greater than the support threshold is determined. Calculate the confidence level of the first itemset and determine the second itemset whose confidence level is greater than the confidence level threshold; Using the second itemset as the base dataset, return and execute the steps of selecting a target parameter without replacement from the initialization parameter set and constructing a data candidate set using the values ​​of each target parameter and the base dataset, until the target parameter is the last parameter in the initialization parameter set. The resulting second itemset is a frequent itemset of the application deployment information and the initialization parameter set. The association rules between the application deployment information and the initialization parameter set are determined based on the frequent itemsets; Create an image template and receive the user's application instructions, wherein the application instructions contain application information to be deployed; Select a target template from the image templates according to the application information to be deployed in the application instructions; Image information is generated based on the target template, and a target cloud host is created based on the image information; Obtain the configuration information of the target cloud host to be initialized, and match the configuration information with the frequent itemset according to the association rule to determine the optimal parameter set for initializing the target cloud host; The initialization operation of the target cloud host is executed in sequence according to the parameter order in the optimal parameter set.

2. The cloud server initialization method as described in claim 1, characterized in that, The step of traversing the existing host data to calculate the support of each candidate data item in the candidate data set includes: The existing host data is divided into multiple transaction sets based on the application deployment information, wherein each transaction set includes multiple transactions, and the multiple transactions have the same application deployment information; Based on the application deployment information, determine the target transaction set corresponding to each candidate data item in the data candidate set, traverse the target transaction set, count the number of transactions in the target transaction set, and the frequency of occurrence of each candidate data item in the data candidate set; The support level of each candidate data item in the data candidate set is determined based on the ratio of the occurrence frequency to the number of transactions.

3. The cloud server initialization method as described in claim 1, characterized in that, The step of performing the initialization operation on the target cloud host in sequence according to the parameter order of the optimal parameter set includes: The first parameter in the optimal parameter set is used as the current parameter. The initialization operation corresponding to the current parameter is executed on the target cloud host, and the execution status of the initialization operation is detected. The execution status includes execution completion and execution failure. If the execution status is execution failure, a rollback operation is performed and the number of rollbacks is counted. The rollback operation is to return and execute the initialization operation corresponding to the current parameters on the target cloud host and obtain the execution status of the initialization operation until the execution status is execution completion or the number of rollbacks is greater than a preset threshold, and an alarm prompt is output. If the execution status is "execution completed", then the next parameter in the optimal parameter set is taken as the current parameter, and the process of performing the initialization operation corresponding to the current parameter on the target cloud host and detecting the execution status of the initialization operation is repeated until the current parameter is the last parameter in the optimal parameter set.

4. The cloud server initialization method as described in claim 1, characterized in that, The steps for creating the mirror template include: Obtain the preset system image file and create a virtual disk; Determine the attribute information of the image template based on the system image file; An image template is created based on the attribute information and the virtual disk, wherein the attribute information includes at least one of format, name, and data size.

5. The cloud host initialization method according to any one of claims 1-4, characterized in that, Following the step of obtaining the configuration information of the target cloud host to be initialized, the method further includes: When a configuration command is detected, the initialization configuration parameters input by the user are obtained; Determine whether the number of parameters in the initialization configuration parameters is the same as the preset parameter threshold; If they are the same, then the initialization configuration parameters are set to the optimal set of parameters for initializing the target cloud host; If they are not the same, the initialization configuration parameters are matched with the frequent itemsets according to the association rules to determine the optimal parameter set for initializing the target cloud host, wherein the number of parameters in the initialization configuration parameters is less than the preset parameter threshold.

6. An initialization device for a cloud server, characterized in that, The cloud host initialization device includes: The data acquisition module is used to acquire existing host data, which includes the initialization parameter set and application deployment information of currently running online hosts; A data mining module is used to obtain preset support and confidence thresholds, and construct a basic dataset based on the application deployment information; select target parameters without replacement from the initialization parameter set, and construct a data candidate set using the parameter values ​​of the target parameters and the basic dataset; traverse the existing host data to calculate the support of each candidate data item in the data candidate set, and determine a first itemset whose support is greater than the support threshold; calculate the confidence of the first itemset, and determine a second itemset whose confidence is greater than the confidence threshold; use the second itemset as the basic dataset, return and execute the steps of selecting target parameters without replacement from the initialization parameter set, and constructing a data candidate set using the parameter values ​​of the target parameters and the basic dataset, until the target parameter is the last parameter in the initialization parameter set, the resulting second itemset is the frequent itemset of the application deployment information and the initialization parameter set; determine the association rules between the application deployment information and the initialization parameter set based on the frequent itemset; The cloud server creation module is used to create image templates and receive user application instructions, wherein the application instructions contain application information to be deployed; select a target template from the image templates according to the application information to be deployed in the application instructions; generate image information according to the target template; and create a target cloud server according to the image information. The parameter matching module is used to obtain the configuration information of the target cloud host to be initialized, and match the configuration information with the frequent itemset according to the association rule to determine the optimal parameter set for initializing the target cloud host. An initialization module is used to perform initialization operations on the target cloud host in a series according to the parameter order in the optimal parameter set.

7. A terminal device, characterized in that, The terminal device includes: a memory, a processor, and an initialization program for a cloud host stored in the memory and executable on the processor. When the initialization program for the cloud host is executed by the processor, it implements the steps of the initialization method for a cloud host as described in any one of claims 1 to 5.

8. A computer storage medium, characterized in that, The computer storage medium stores an initialization program for the cloud host, which, when executed by the processor, implements the steps of the cloud host initialization method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Cloud host metadata service management method, system and device and storage medium

    CN110149409A

  • Cloud host deployment method and device, and computer readable storage medium

    CN110851144A