CN113326073A - Cloud host initialization method and device, terminal device and storage medium - Google Patents

Cloud host initialization method and device, terminal device and storage medium Download PDF

Info

Publication number
CN113326073A
CN113326073A CN202110699548.XA CN202110699548A CN113326073A CN 113326073 A CN113326073 A CN 113326073A CN 202110699548 A CN202110699548 A CN 202110699548A CN 113326073 A CN113326073 A CN 113326073A
Authority
CN
China
Prior art keywords
initialization
data
cloud host
parameter
host
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110699548.XA
Other languages
Chinese (zh)
Inventor
刘生庆
卢道和
饶俊明
龚洵峰
魏江鑫
陈扬东
杨耿丹
谢倩倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202110699548.XA priority Critical patent/CN113326073A/en
Publication of CN113326073A publication Critical patent/CN113326073A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4403Processor initialisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Abstract

The invention relates to the technical field of financial science and technology, and discloses an initialization method and device of a cloud host, terminal equipment and a storage medium. The method comprises the following steps: acquiring stock host data, wherein the stock host data comprises an initialization parameter set and application deployment information of a currently running online host; calculating the stock host data by using an association algorithm to obtain a frequent item set and an association rule of the application deployment information and the initialization parameter set; acquiring configuration information of a target cloud host to be initialized, matching the configuration information with the frequent item set according to the association rule, and determining an optimal parameter set for initializing the target cloud host; and serially executing initialization operation on the target cloud host according to the parameter sequence in the optimal parameter set. By solving the strong coupling of the creation and the initialization of the cloud host, the applicability of the initialization operation of the cloud host is improved, and the diversified and personalized requirements of users can be met.

Description

Cloud host initialization method and device, terminal device and storage medium
Technical Field
The present invention relates to the field of financial technology (Fintech), and in particular, to a method and an apparatus for initializing a cloud host, a terminal device, and a storage medium.
Background
With the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changing to financial technology, but higher requirements are also provided for the cloud computing platform technology due to the requirements of the financial industry on safety, instantaneity, stability and the like.
Currently, in an IAAS (Infrastructure As a Service) architecture based on a cloud computing platform, when a resource demand application of a user is received, a corresponding cloud host needs to be created for deploying an application program meeting the demand of the user. It can be known that the cloud host uses the operating system image before creating, and when creating the image information, different image templates need to be selected according to user requirements. Configuration parameters such as host usage and host operating system version also need to be determined for the created cloud host according to user requirements, and then the created cloud host is initialized according to the configuration parameters, wherein the purpose of initialization is to configure relevant parameters for the created cloud host, so that the created cloud host can meet the user requirements.
The initialization of the cloud host needs manual intervention after the cloud host is established, so that repetitive operation is involved, the steps are multiple, and the operation and maintenance difficulty is high. Therefore, in order to reduce manual operation and meet diversified requirements of users, mirror image templates need to be manufactured according to different requirements of users and different processor architectures, when the number of mirror image templates is large, operation and maintenance risks are increased by frequently changing the mirror image templates, and in order to reduce the operation and maintenance risks, when a created cloud host is initialized, corresponding initialization parameters are generally directly determined according to the selected mirror image templates, so that strong coupling exists between creation and initialization of the cloud host, and the strong coupling causes that initialization operation of the cloud host only supports a single requirement scene, and the complicated and diversified requirements of the users are difficult to support.
Disclosure of Invention
The invention mainly aims to provide an initialization method, an initialization device, terminal equipment and a storage medium of a cloud host, and aims to solve the problem of strong coupling between the creation of the cloud host and initialization parameters, improve the applicability of initialization operation on the cloud host and meet the requirements of diversification and individuation of users.
In order to achieve the above object, the present invention provides an initialization method of a cloud host, including the following steps:
acquiring stock host data, wherein the stock host data comprises an initialization parameter set and application deployment information of a currently running online host;
calculating the stock host data by using an association algorithm to obtain a frequent item set and an association rule of the application deployment information and the initialization parameter set;
acquiring configuration information of a target cloud host to be initialized, matching the configuration information with the frequent item set according to the association rule, and determining an optimal parameter set for initializing the target cloud host;
and serially executing initialization operation on the target cloud host according to the parameter sequence in the optimal parameter set.
Optionally, the step of calculating the stock host data by using an association algorithm to obtain a frequent item set and an association rule of the application deployment information and the initialization parameter set includes:
acquiring a preset support degree threshold value and a preset confidence degree threshold value, and constructing a basic data set based on the application deployment information;
selecting target parameters from the initialization parameter set without putting back, and constructing a data candidate set by using each parameter value of the target parameters and the basic data set;
traversing the stock host data to calculate the support degree of each candidate data item in the data candidate set, and determining a first item set of which the support degree is greater than the support degree threshold;
calculating a confidence level of the first term set, and determining a second term set with the confidence level larger than the confidence level threshold value;
taking the second item set as a basic data set, returning and executing the step of selecting target parameters from the initialization parameter set without putting back, and constructing a data candidate set by using each parameter value of the target parameters and the basic data set until the target parameters are the last parameters in the initialization parameter set, wherein the obtained second item set is a frequent item set of the application deployment information and the initialization parameter set;
and determining the association rule of the application deployment information and the initialization parameter set according to the frequent item set.
Optionally, the step of traversing the inventory host data to calculate the support degree of each candidate data item in the data candidate set includes:
dividing the stock host data into a plurality of transaction sets according to the application deployment information, wherein the transaction sets comprise a plurality of transactions, and the transactions have the same application deployment information;
determining a target transaction set corresponding to each candidate data item in the data candidate set according to the application deployment information, traversing the target transaction set, and counting the number of transactions in the target transaction set and the occurrence frequency of each candidate data item in the data candidate set;
and determining the support degree of each candidate data item in the data candidate set according to the ratio of the occurrence frequency to the number of the transactions.
Optionally, the step of serially executing the initialization operation on the target cloud host according to the parameter sequence in the optimal parameter set includes:
taking a first parameter in the optimal parameter set as a current parameter, executing initialization operation corresponding to the current parameter on the target cloud host, and detecting an execution state of the initialization operation, wherein the execution state comprises execution completion and execution failure;
if the execution state is execution failure, executing rollback operation and counting rollback times, wherein the rollback operation is a step of returning and executing the initialization operation corresponding to the current parameters executed on the target cloud host and acquiring the execution state of the initialization operation until the execution state is execution completion or the rollback times are greater than a preset threshold value, and outputting an alarm prompt;
and if the execution state is the execution completion, taking the next parameter in the optimal parameter set as the current parameter, returning and executing the initialization operation corresponding to the current parameter executed on the target cloud host, and detecting the execution state of the initialization operation until the current parameter is the last parameter in the optimal parameter set.
Optionally, before the step of obtaining the configuration information of the target cloud host to be initialized, the method further includes:
creating a mirror image template and receiving an application instruction of a user, wherein the application instruction comprises application information to be deployed;
selecting a target template from the mirror image templates according to the application information to be deployed in the application instruction;
and generating mirror image information according to the target template, and creating a target cloud host according to the mirror image information.
Optionally, the step of creating a mirror template includes:
acquiring a preset system image file and creating a virtual disk;
determining attribute information of a mirror image template according to the system mirror image file;
and creating a mirror image template according to the attribute information and the virtual disk, wherein the attribute information comprises at least one of format, name and data size.
Optionally, after the step of obtaining the configuration information of the target cloud host to be initialized, the method further includes:
when a configuration instruction is detected, acquiring an initial configuration parameter input by a user;
determining whether the parameter quantity of the initialization configuration parameters is the same as a preset parameter threshold value;
if the initialization configuration parameters are the same as the initialization configuration parameters, setting the initialization configuration parameters as an optimal parameter set for initializing the target cloud host;
and if the initialization configuration parameters are not the same as the frequent item sets, matching the initialization configuration parameters with the frequent item sets according to the association rule, and determining an optimal parameter set for initializing the target cloud host, wherein the parameter quantity of the initialization configuration parameters is smaller than the preset parameter threshold.
In addition, to achieve the above object, the present invention provides an initialization apparatus for a cloud host, including:
the system comprises a data acquisition module, a data processing module and a data processing module, wherein the data acquisition module is used for acquiring stock host data, and the stock host data comprises an initialization parameter set and application deployment information of a currently running online host;
the data mining module is used for calculating the stock host data by using an association algorithm to obtain the frequent item set and the association rule of the application deployment information and the initialization parameter set;
the parameter matching module is used for acquiring configuration information of a target cloud host to be initialized, matching the configuration information with the frequent item set according to the association rule and determining an optimal parameter set for initializing the target cloud host;
and the initialization module is used for serially executing the initialization operation of the target cloud host according to the parameter sequence in the optimal parameter set.
The initialization method of the cloud host according to the present invention may be implemented when the modules of the initialization apparatus of the cloud host are operated.
In addition, to achieve the above object, the present invention also provides a terminal device, including: the initialization method comprises the steps of a memory, a processor and an initialization program of the cloud host, wherein the initialization program of the cloud host is stored on the memory and can run on the processor, and when the initialization program of the cloud host is executed by the processor, the steps of the initialization method of the cloud host are realized.
In addition, to achieve the above object, the present invention further provides a computer storage medium having an initialization program of a cloud host stored thereon, wherein the initialization program of the cloud host, when executed by a processor, implements the steps of the initialization method of the cloud host as described above.
Furthermore, to achieve the above object, the present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the initialization method of the cloud host as described above.
The invention provides an initialization method and device of a cloud host, terminal equipment, a computer storage medium and a computer program product, wherein stock host data are obtained, and the stock host data comprise an initialization parameter set and application deployment information of a currently running online host; calculating the stock host data by using an association algorithm to obtain a frequent item set and an association rule of the application deployment information and the initialization parameter set; acquiring configuration information of a target cloud host to be initialized, matching the configuration information with the frequent item set according to the association rule, and determining an optimal parameter set for initializing the target cloud host; and serially executing initialization operation on the target cloud host according to the parameter sequence in the optimal parameter set.
In the process of initializing the created cloud host, the frequent item set and the association rule between the application deployment information and the initialization parameters on the cloud host are determined through stock host data, so that the correlation between the user requirements and the initialization parameters of the cloud host is mined, the initialization parameters of the cloud host can be determined according to the application information which needs to be deployed by the user, the strong coupling between the creation and the initialization of the cloud host is solved, the applicability of the initialization operation on the cloud host is improved, and the initialized cloud host can support the diversified and personalized requirements of the user.
Compared with the traditional initialization mode of the cloud host, the mode that a plurality of mirror image templates are respectively manufactured in different processor architectures by taking the user requirement as a base line is not needed, the number of the manufactured mirror image templates is reduced by only taking the processor architecture as the base line, the maintenance cost of the mirror image templates can be effectively reduced, and meanwhile, the creation efficiency of the cloud host is improved.
In addition, when the cloud host is initialized, the initialization parameters are set to be configurable by a user, the integrity of the initialization parameters configured by the user is verified, and when the user inputs all the parameters required by initialization, the initialization parameters configured by the user are used as the optimal parameter set so as to meet the personalized requirements of the user; when the user configures partial initialization parameters, the initialization parameters configured by the user are matched with the frequent item sets according to the calculated association rule based on the requirements of the user on the partial initialization parameters, so that an optimal parameter set meeting partial personalized requirements of the user is obtained, and the flexibility and the usability of the initialization of the cloud host are improved.
Drawings
Fig. 1 is a schematic device structure diagram of a hardware operating environment of a terminal device according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an initialization method of a cloud host according to a first embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a process of creating a cloud host according to an embodiment of the cloud host initialization method of the present invention;
fig. 4 is a schematic diagram illustrating a process of creating another cloud host according to an embodiment of the cloud host initialization method of the present invention;
fig. 5 is a diagram illustrating an association relationship map between a subsystem and initialization parameters according to a second embodiment of the initialization method for a cloud host according to the present invention;
fig. 6 to 8 are schematic diagrams illustrating a computing process of a frequent item set according to a second embodiment of the initialization method of a cloud host of the present invention;
fig. 9 is a functional module diagram of an initialization system of a cloud host according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic device structure diagram of a terminal device hardware operating environment according to an embodiment of the present invention.
The terminal device according to the embodiment of the present invention may be a client device configured as a scheduling system for scheduling a client service, and the terminal device may be a smart phone, a PC (Personal Computer), a tablet Computer, a portable Computer, or the like.
As shown in fig. 1, 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. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal device configuration shown in fig. 1 is not intended to be limiting of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an initialization program of a cloud host.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client and performing data communication with the client; and the processor 1001 may be configured to call an initialization program of the cloud host stored in the memory 1005 and perform the following operations according to various embodiments of the initialization method of the cloud host of the present invention.
Based on the hardware structure, embodiments of the initialization method of the cloud host are provided.
The key terms used in the embodiments of the present invention mainly include:
KVM: kernel-based Virtual Machine. KVM is an open-source Linux-native full virtualization solution based on the X86 hardware of the virtualization extensions (Intel VT or AMD-V). In KVM, the virtual machine is implemented as a conventional Linux process, scheduled by a standard Linux scheduler, and each virtual CPU of the virtual machine is implemented as a conventional Linux process, enabling KVM to use the existing functionality of the Linux kernel.
Image: the mirror image is a redundant type, and a duplicate of data on one disk existing on another disk is the mirror image.
ARM: advanced RISC Machine, ARM architecture, formerly known as Advanced reduced instruction set Machine (Acorn RISC Machine), is a 32-bit Reduced Instruction Set (RISC) processor architecture that is widely used in many embedded system designs. Due to the characteristic of energy saving, the ARM processor is very suitable for the field of mobile communication and meets the characteristic that the main design target is low power consumption.
X86: the X86 architecture, a processor architecture. The X86 architecture is a set of computer language instructions executed by a microprocessor, referred to as the standard numbered acronym for the intel general computer column, which also identifies a common set of computer instructions.
And OS: operation system, OS for short, generally refers to an operating system. An operating system is a computer program that manages the hardware and software resources of a computer.
It should be noted that, in the IAAS architecture, when a resource demand application of a user is received, a corresponding cloud host needs to be created for deploying an application program that meets the demand of the user. Before a cloud host is created, an operating system mirror image is inevitably used, at present, mirror image templates are respectively manufactured by taking a processor architecture as a base line based on different processor architectures such as X86 and ARM, mirror image templates are respectively manufactured based on the same processor architecture and the use of the cloud host as a base line (the use of the cloud host is determined by user requirements), mirror image templates are respectively manufactured based on different uses of the cloud host, the manufactured mirror image templates are gradually increased due to diversification of the user requirements, and the operation and maintenance cost of the mirror image templates is also gradually increased. In order to reduce frequent changes to the mirror image template to reduce operation and maintenance risks, initialization parameters for the cloud host need to be preset in advance according to the manufactured mirror image template, so that corresponding initialization parameters are determined according to the mirror image template used when the cloud host is created. However, the initialization operation in this mode only supports a single scenario required by the user, and limits the applicability of the initialization operation. However, the user's needs are complicated and varied, and there is a personalized customization need, when there are multiple needs or personalized needs of the user, additional manual intervention is required based on the initialization operation in the existing mode, and the initialization operation is manually performed according to the needs of the user.
In view of the above phenomena, the present invention provides an initialization method for a cloud host. Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a first embodiment of an initialization method for a cloud host according to the present invention, in this embodiment, the initialization method for the cloud host is applied to an initialization device of the cloud host, where the device may be a personal computer or a server, and the initialization method for the cloud host includes:
step S10, obtaining stock host data, wherein the stock host data comprises an initialization parameter set and application deployment information of the current running online host;
in the present embodiment, the initialization parameters for initializing the cloud host are determined not from the mirror template used when the cloud host is created, but by mining the stock host data. Specifically, stock host data of the cloud hosts is obtained first, and the stock host data is stock data of online cloud hosts operated in an existing network, that is, operation data of the cloud hosts operated online cumulatively, wherein the operation data includes application deployment information on each cloud host operated online currently and initialization data of each cloud host. The initialized history records and initialized parameter values of the cloud hosts can be determined through the initialized data of the cloud hosts, the application deployment information on the cloud hosts is the application information (or called subsystem) deployed on the cloud hosts according to the requirements of users, and the subsystems required to be deployed on the cloud hosts can be determined according to the requirements of the users.
It should be noted that, for the same host, due to adjustment of user requirements, or the initialized cloud host does not meet the use requirements of the user, the created cloud host may be initialized again or partially initialized, and when obtaining stock host data, the current operation data of the online cloud host, that is, the operation data of the cloud host after the last initialization, is obtained.
Step S20, calculating the stock host data by using an association algorithm to obtain the frequent item set and association rules of the application deployment information and the initialization parameter set;
it should be noted that, in this embodiment, based on stock host data of a cloud host running in the existing network, the correlation between the cloud host and a subsystem deployed on the cloud host is mined, and a frequent item set and association rules of the subsystem and an initialization parameter are calculated in the obtained stock host data through an association algorithm.
In this embodiment, the initialization parameter set when performing an initialization operation on the cloud host mainly includes parameters such as an operating environment (env) of the cloud host, an IDC (Internet Data Center), a logic area, a CPU architecture, an OS version, and a host usage, where each parameter may have a plurality of parameter values, for example, the host usage of the cloud host mainly includes an APP (application), a DB (Data base), a BDP (Business Data Platform), a DOCKER (application container engine), and the like; the CPU architecture mainly includes the conventional X86 architecture and ARM architecture.
And calculating a frequent item set and association rules between different types of subsystems and each initialization parameter based on the acquired stock host data by using an association algorithm. Therefore, based on the acquired stock host data, frequent item sets and association rules between subsystems to be deployed on the host and each dimension parameter need to be mined.
Step S30, acquiring configuration information of a target cloud host to be initialized, matching the configuration information with the frequent item set according to the association rule, and determining an optimal parameter set for initializing the target cloud host;
the method comprises the steps of calculating a frequent item set and an association rule based on acquired stock host data, acquiring configuration information of a target cloud host to be initialized, wherein the configuration information is the subsystem information to be deployed on the target cloud host determined based on user requirements, and parameters which need to be configured based on the subsystem information to be deployed and are configured by executing initialization operation on the target cloud host. Therefore, the subsystem information to be deployed on the target cloud host can be determined according to the configuration information of the target cloud host to be initialized, and the subsystem information is matched with the frequent item set according to the calculated association rule based on the subsystem information to be deployed, so that the optimal parameter set for initializing the target cloud host is determined.
Specifically, a candidate data set is constructed based on subsystem information and an initialization parameter set in stock host data, the acquired stock host data is traversed, and therefore the support degree and the confidence degree of the constructed candidate data set are calculated, the candidate data set meeting the minimum support degree and the minimum confidence degree is used as a frequent item set, a strong association rule is generated by the frequent item set, and then an association rule between a subsystem to be deployed and the initialization parameter is determined, wherein the minimum support degree and the minimum confidence degree are configurable thresholds and can be set by a user in a self-defined mode. When the subsystem information to be deployed is determined according to the requirements of a user, the subsystem information to be deployed is matched with the frequent item set based on the association rule, so that an optimal parameter set for initializing the target cloud host is obtained, and in the optimal parameter set, the support degree and the confidence degree of a data candidate set formed by each parameter value and the subsystem information to be deployed are the highest in various possible combinations.
Further, before obtaining the configuration information of the target cloud host to be initialized, the steps of creating the target cloud host to be initialized and creating the target cloud host to be initialized include:
step S304, creating a mirror image template and receiving an application instruction of a user, wherein the application instruction comprises application information to be deployed;
step S305, selecting a target template from the mirror image templates according to the application information to be deployed in the application instruction;
and S306, generating mirror image information according to the target template, and creating a target cloud host according to the mirror image information.
Firstly, a mirror image template is manufactured, when a resource application instruction of a user is received, a target template is selected from the manufactured mirror image templates according to application information (namely subsystem information to be deployed) to generate mirror image information according to the application information and application information to be deployed contained in the application instruction, and a target cloud host is created according to the generated mirror image information.
Specifically, in this embodiment, for example, the mirror image template is created in the KVM and the target cloud host is created, the KVM is an open-source system virtualization module, and after the mirror image template is created, the mirror image template is uploaded to the KVM platform for unified management. When an application instruction of a user is received, a CPU framework of an operating system of a target cloud host to be created is determined according to subsystem information to be deployed, a corresponding mirror image template is selected according to the CPU framework, mirror image information is generated, the operating system is installed, and after the operating system is installed, basic configuration is conducted on the operating system, such as virtual network card configuration, file partitioning and the like. After the basic configuration of the operating system is completed, the mirror image information is cloned into a host of the virtualization platform, and the creation of the target cloud host can be completed by pulling up the mirror image information.
Further, referring to fig. 3 and 4, fig. 3 is a schematic diagram illustrating a conventional process for creating a cloud host, and fig. 4 is a schematic diagram illustrating a process for creating a cloud host according to an embodiment of the present invention, wherein a CentOS6, a CentOS7, a suse (Linux operating system), a kylin (kylin), an ubuntu (superbank diagram), and the like in the mirror template are operating system files required for creating a cloud host, and the mirror templates required for creating a cloud host in fig. 3 and 4 are all managed uniformly in a KVM. What is different, in fig. 3, the manufactured mirror image templates are based on different baselines, and in fig. 4, only the processor architecture is used as the manufacturing baseline of the mirror image templates, so that the number of the mirror image templates needing operation and maintenance is greatly reduced, the operation and maintenance cost of the mirror image templates is effectively reduced, and meanwhile, the mirror image templates do not need to be frequently changed according to the diversified requirements or personalized requirements of users, so that the operation and maintenance risk caused by frequently changing the mirror image templates is also reduced.
Further, in step S304, before creating the cloud host, a mirror image template needs to be created, and the step of "creating a mirror image template" includes:
step S301, acquiring a preset system image file and creating a virtual disk;
step S302, determining attribute information of a mirror image template according to the system mirror image file;
step S303, creating a mirror image template according to the attribute information and the virtual disk, wherein the attribute information comprises at least one of format, name and data size.
In this embodiment, before obtaining the configuration information of the target cloud host to be initialized, a mirror image template needs to be manufactured, and the target cloud host is created according to the manufactured mirror image template. Specifically, when an image template is manufactured, a system image file needs to be acquired from a third-party server, image information is checked according to the acquired system image file, a virtual disk is created, and attribute information of an image is determined, wherein the attribute information at least comprises one of the following items: the method comprises the steps of creating a mirror image template according to mirror image attribute information and a created virtual disk, wherein the mirror image format, mirror image name, mirror image data size and the like are adopted, common mirror image formats comprise ISO, BIN, IMG, TAO, DAO, CIF, FCD and the like, and the mirror image template is created according to mirror image attribute information and the created virtual disk.
The system image file is similar to the compressed package in nature, and a specific series of files are made into a single file according to a certain format so as to be convenient for a user to download and use, such as a test version of an operating system, games and the like. The image file not only has the function of 'synthesizing' of the compressed packet, but also has the most important characteristic that the image file can be identified by specific software and can be directly recorded on an optical disc. Compared with the image file in the general sense, the image file can contain more information, such as system files, boot files, partition table information, and the like, and therefore, the image file can contain all information of one partition or even one hard disk. The image template in this embodiment includes an operating system file, a boot file, and the like required for creating the cloud host.
Further, after the step of "acquiring the configuration information of the target cloud host to be initialized" in the step S30, the method further includes:
step S31, when a configuration instruction is detected, acquiring an initialization configuration parameter input by a user;
in this embodiment, besides automatically matching the initialized optimal parameter set according to the calculated frequent item set and association rule according to the user requirement, user-defined initialization parameters are also supported. Specifically, after a resource application instruction of a user is received, when a configuration instruction of the user is detected, an initialization configuration parameter input by the user is obtained. Further, the initialization configuration parameters input by the user may be all parameters required for performing the initialization operation on the created target cloud host, or may be a part of the parameters, so that the integrity of the initialization configuration parameters input by the user needs to be checked.
Step S32, determining whether the parameter quantity of the initialization configuration parameters is the same as a preset parameter threshold value;
step S33, if the configuration parameters are the same, setting the initialization configuration parameters as an optimal parameter set for initializing the target cloud host;
specifically, when the integrity of the initialized configuration parameters input by the user is checked, the parameter number of the initialized configuration parameters input by the user is compared with a preset parameter threshold, if the parameter number of the initialized configuration parameters input by the user is the same as the preset parameter threshold, it is proved that the user configures all parameters required for initializing the target cloud host, the initialized parameters configured by the user are used as an optimal parameter set, and the created target cloud host is initialized according to the optimal parameter set, so that the personalized requirements of the user are met.
Step S34, if the initialization configuration parameters are different from the frequent item sets, matching the initialization configuration parameters with the frequent item sets according to the association rule, and determining an optimal parameter set for initializing the target cloud host, where the parameter number of the initialization configuration parameters is smaller than the preset parameter threshold.
Further, if the number of the initialization parameters configured by the user is different from the preset parameter threshold, it indicates that the initialization parameters are partially configured by the user, and it should be noted that, when the initialization parameters are configured by the user, the number of the initialization parameters required for initializing the created target cloud host may be different based on different requirements of the user, but the number of the initialization parameters configurable by the user is limited, and is not allowed to exceed the number of all the parameters required for initializing the cloud host, so the number of the initialization parameters configurable by the user generally does not exceed the total number of the parameters required for initializing. And when the quantity of the initialization parameters configured by the user is less than the total quantity of all the parameters required by initialization, matching the initialization parameters configured by the user with the frequent item set according to the calculated association rule so as to obtain an optimal parameter set, and initializing the target cloud host according to the optimal parameter set.
In this embodiment, the initialization parameters are set to be user-configurable, so that personalized requirements of a user for customizing the cloud host can be met, meanwhile, an optimal parameter set meeting requirements of the user for part of the initialization parameters can be automatically matched according to part of the parameters configured by the user, and flexibility and usability of initializing the cloud host are improved.
And step S40, serially executing initialization operation on the target cloud host according to the parameter sequence in the optimal parameter set.
Further, when the created target cloud host is initialized, the initialization operations corresponding to the parameters are executed in series in sequence according to the parameter sequence in the optimal parameter set. Specifically, the initialization operation performed on the target cloud host according to the parameter type in the optimal parameter set mainly includes an initialization operation based on a baseline (i.e., CPU architecture) specification, an initialization based on a host usage, and an individualized initialization based on a subsystem to be deployed. According to the parameter sequence in the optimal parameter set, initialization operations based on different dimensions corresponding to the parameters are executed in series in sequence, and the flexibility of the initialization operations of the cloud host is improved.
The embodiment of the invention provides an initialization method of a cloud host, which comprises the steps of obtaining stock host data, wherein the stock host data are stock data of a currently running online host, and the stock host data comprise an initialization parameter set and application deployment information of the online host; calculating the stock host data by using an association algorithm to obtain a frequent item set and an association rule of the application deployment information and the initialization parameter set; acquiring configuration information of a target cloud host to be initialized, matching the configuration information with the frequent item set according to the association rule, and determining an optimal parameter set for initializing the target cloud host; and serially executing initialization operation on the target cloud host according to the parameter sequence in the optimal parameter set.
In the process of initializing the created cloud host, the frequent item set and the association rule between the application deployment information and the initialization parameters on the cloud host are determined through stock host data, so that the correlation between the user requirements and the initialization parameters of the cloud host is mined, the initialization parameters of the cloud host can be determined according to the application information which needs to be deployed by the user, the strong coupling between the creation and the initialization of the cloud host is solved, the applicability of the initialization operation on the cloud host is improved, and the initialized cloud host can support the diversified and personalized requirements of the user.
Compared with the traditional initialization mode of the cloud host, the mode that a plurality of mirror image templates are respectively manufactured in different processor architectures by taking the user requirement as a base line is not needed, the number of the manufactured mirror image templates is reduced by only taking the processor architecture as the base line, the maintenance cost of the mirror image templates can be effectively reduced, and meanwhile, the creation efficiency of the cloud host is improved.
In addition, when the cloud host is initialized, the initialization parameters are set to be configurable by a user, the integrity of the initialization parameters configured by the user is verified, and when the user inputs all the parameters required by initialization, the initialization parameters configured by the user are used as the optimal parameter set so as to meet the personalized requirements of the user; when the user configures partial initialization parameters, the initialization parameters configured by the user are matched with the frequent item sets according to the calculated association rule based on the requirements of the user on the partial initialization parameters, so that an optimal parameter set meeting partial personalized requirements of the user is obtained, and the flexibility and the usability of the initialization of the cloud host are improved.
Further, based on the first embodiment, a second embodiment of the initialization method of the cloud host according to the present invention is provided. It should be noted that the present embodiment is a refinement of the step S20, and may include:
step S201, acquiring a preset support degree threshold value and a preset confidence degree threshold value, and constructing a basic data set based on the application deployment information;
based on the above embodiment, in this embodiment, when calculating the acquired inventory host data by using the association algorithm, a preset support threshold and a preset confidence threshold, that is, a minimum support and a minimum confidence, are acquired first, and in this embodiment, the association algorithm is described by taking Apriori algorithm as an example. As can be appreciated, the Apriori algorithm is a classical data mining algorithm that mines a frequent set of items and associated rules. Apriori refers to "from before" in latin. A priori knowledge or assumption is typically used when defining the problem, which is referred to as "a priori" (a priori). The name Apriori algorithm is based on the fact that: the algorithm uses the a priori nature of the frequent item set nature, i.e., all non-empty subsets of the frequent item set must also be frequent. The Apriori algorithm uses an iterative approach called layer-by-layer search, where a set of k terms is used to explore a set of (k +1) terms. First, by scanning the database, the counts for each item are accumulated, and the items that meet the minimum support are collected, finding the set of frequent 1-item sets. This set is denoted as L1. Then, L1 is used to find the set of frequent 2-term sets, L2, L2 is used to find L3, and so on until no more frequent k-term sets can be found. A complete scan of the database is required each time an Lk is found. The Apriori algorithm uses the a priori nature of the frequent item set to compress the search space. For Apriori algorithm, the following concept needs to be explained:
1. item and item set: let itemset be { item1, item _2, …, item _ m } be the set of all items, where item _ k (k is 1,2, …, m) is called an item. While the set of items is called an item set (itemset) and the item set containing k items is called a k item set (k-itemset).
2. Association rules: the association rule is an implication in the form of a ═ B, where A, B are subsets of itemset and are neither empty sets, and a crosses B are empty.
3. Transactions and transaction sets: a transaction T is a set of items that is a subset of itemset, each of which is associated with a unique identifier. Together, the different transactions constitute a transaction set D, which constitutes a database of transactions discovered by association rules.
Further, in this embodiment, in the stock host data, the subsystems deployed on the cloud hosts, the initialization parameters and their assignments may be regarded as items, and an item set formed by the subsystem information and the initialization parameters of each cloud host is an transaction. When a frequent item set and an association rule in stock host data are calculated by using an Apriori algorithm, a preset support threshold and a preset confidence threshold are obtained first, and then a basic data set is constructed based on subsystem information deployed on each cloud host.
Step S202, selecting target parameters from the initialization parameter set without putting back, and constructing a data candidate set by using each parameter value of the target parameters and the basic data set;
in the Apriori algorithm, since it is necessary to search the (k +1) term set from the k term set, it is necessary to construct a basic data set based on the subsystem information deployed on the cloud host from the stock host data based on this idea. And selecting target parameters from the corresponding initialization parameter set based on the constructed basic data set, and constructing a data candidate set. The initialization parameter sets are distinguished according to the cloud hosts, initialization parameters used when each cloud host executes initialization operation are used as one initialization parameter set, and subsystem information and the initialization parameter sets of the same cloud host are in one-to-one correspondence. When a data candidate set is constructed, according to a basic data set constructed by subsystem information, a target parameter for constructing the data candidate set, the subsystem information of a cloud host and an initialization parameter are selected from an initialization parameter set corresponding to the subsystem information to construct a candidate data item in the data candidate set. When constructing the data candidate, specifically, each parameter value of the selected target parameter is put into each data item of the basic data set, and the candidate data items in the constructed data candidate set may be a multidimensional array, for example, when selecting the first target parameter, a two-dimensional data set may be constructed to constitute the data candidate set. When the data candidate set is constructed, the selected target parameter may be any one parameter in the initialization parameter set, and thus, the two-dimensional data set in the constructed data candidate set includes any combination of parameter values of each parameter in each deployed subsystem and the corresponding initialization parameter set.
Step S203, traversing the stock host data to calculate the support degree of each candidate data item in the data candidate set, and determining a first item set of which the support degree is greater than the support degree threshold;
after the construction of the data candidate set is completed, traversing the acquired stock host data to acquire each candidate data item in the data candidate set, and counting the occurrence frequency of each candidate data item, thereby calculating the support degree of each data item in the data candidate set, wherein an item set formed by candidate data items with the support degree greater than a preset support degree threshold value is a first item set, and the first item set is a frequent item set.
Further, in step S203, the step of "calculating the support degree of each candidate data item in the data candidate set by traversing the stock host data" may further include:
step A1, dividing the stock host data into a plurality of transaction sets according to the application deployment information, wherein the transaction sets comprise a plurality of transactions, and the plurality of transactions have the same application deployment information;
step A2, determining a target transaction set corresponding to each candidate data item in the data candidate set according to the application deployment information, traversing the target transaction set, and counting the number of transactions in the target transaction set and the occurrence frequency of each candidate data item in the data candidate set;
step A3, determining the support degree of each candidate data item in the data candidate set according to the ratio of the occurrence frequency to the number of the transactions.
In this embodiment, the acquired stock host data is a data set formed by data sets in the form of [ subsystemma, initialization parameter 1, initialization parameter 2, initialization parameter 3,.... and initialization parameter n ], and in the stock host data, the subsystem information and the initialization parameter of each cloud host form a data set, and each data set is a transaction. And through traversing all the transactions, obtaining the ratio of the occurrence frequency of each candidate data item in the constructed data candidate set to the occurrence frequency of the subsystems in the candidate data items in the stock host data, namely the support of each candidate data item. After the support degree of each candidate data item is determined, the candidate data items with the support degree larger than a preset support degree threshold value form a frequent item set, namely a first item set.
A pruning strategy is adopted in the Apriori algorithm, and the basic idea of the pruning strategy is as follows: due to the presence of a priori properties: any infrequent (k-1) item set is not a subset of the frequent k item set. Therefore, if the (k-1) item subset of a candidate k item set Ck is not in Lk-1, the candidate is unlikely to be frequent, and can be deleted from Ck to obtain a compressed Ck. Based on the pruning strategy, a frequent item set and a non-frequent item set can be determined, and specifically, candidate data items which do not meet the minimum support degree are removed from the data candidate set according to a preset support degree threshold value, namely the minimum support degree, so that a first item set is obtained.
The specific process of solving the frequent item set by utilizing the pruning strategy comprises the following steps:
1. each data item is a member of a set C1 of candidate 1 item sets, all transactions are traversed, each data item is obtained to generate C1, then each data item is counted, and unsatisfied data items are deleted from C1 according to the minimum support, thereby obtaining a frequent 1 item set L1.
2. Performing a pruning strategy on the self-join generated set of L1 yields a set of candidate 2-item sets C2, and then, counting each data item in C2 across all transactions. Likewise, unsatisfied items are removed from C2 according to the minimum support, thus obtaining a frequent 2-item set L2.
3. Performing a pruning strategy on the self-join generated set of L2 yields a set of candidate 3 item sets C3, and then counting each data item of C3 across all transactions. Likewise, unsatisfied data items are deleted from C3 according to the minimum support, thereby obtaining a frequent 3-item set L3.
4. And in the same way, executing a pruning strategy on the set generated by the self connection of the Lk-1 to generate a candidate k item set Ck, and then traversing all the transactions to count each data item in the Ck. And deleting unsatisfied data items from the Ck according to the minimum support degree, so as to obtain a frequent k item set.
In a pruning strategy in a conventional Apriori algorithm, each data item is used as a basic data set, then frequent data sets obtained in each step are connected with one another to form a data candidate set, and the support degree of each candidate data item in the data candidate set is determined by traversing all transactions. The difference of the embodiment of the invention is that the embodiment of the invention takes the online running cloud host as the prior knowledge, and the current online running cloud host meets the diversified requirements of users, so that based on the prior knowledge, when the data candidate set is constructed, the target parameters are selected from the initialized parameter set to construct the data candidate set based on the frequent item set calculated in the last step, so as to increase the dimensionality of each candidate data item in the data candidate set, rather than connecting the frequent item set per se. And then determining the occurrence frequency of the same subsystem in the stock host data and the occurrence frequency of each candidate data item in the data candidate set in the stock host data by traversing all the transactions in the stock host data, and taking the ratio of the occurrence frequency of the candidate data items identical to the subsystem to the occurrence frequency of the subsystem as the support of the candidate data item.
Specifically, in this embodiment, the stock host data is divided into different transaction sets according to different subsystem information, each transaction set may include multiple transactions, but the transactions in the same transaction set have the same subsystem information. And then determining a target transaction set corresponding to each candidate data item in the data candidate set according to the subsystem information, wherein the target transaction set and the post-Sainta data item have the same subsystem information. Scanning the target transaction set to obtain the number of transactions in the target transaction set, wherein the number of transactions is the number of times of occurrence of the subsystem in the stock host data, then counting the number of times of occurrence of the candidate data item in the target transaction set, and taking the ratio of the number of times of occurrence of the candidate data item in the target transaction set to the number of transactions in the target transaction set as the support degree of the candidate data item. Compared with the conventional Apriori algorithm which needs to scan all transactions, in the embodiment, by dividing the host data of the stock, different candidate data items scan different transaction sets without scanning all transactions, so that the calculation amount is reduced. Meanwhile, for candidate data items with different subsystem information, different transaction sets can be scanned simultaneously in a parallel mode, so that the support degree of each candidate data item is calculated, and the calculation efficiency of data is improved.
Furthermore, different candidate data items scan different transaction sets, so that frequent item sets and association rules corresponding to different subsystems can be obtained, and different subsystems correspond to different frequent item sets and association rules, so that different requirements simultaneously applied by different users can be scanned simultaneously in a parallel mode, an optimal parameter set meeting requirements of different users is determined, and the processing efficiency of user requirements is improved.
Step S204, calculating the confidence of the first item set, and determining a second item set of which the confidence is greater than the confidence threshold;
calculating the confidence coefficient of each data item in the first item set based on the calculated first item set, wherein candidate data items with the confidence coefficients larger than a preset confidence coefficient threshold value form a frequent item set, namely a second item set. Further, for the calculation of the support degree and the confidence degree, the following formulas 1 to 2 can be referred to:
Figure BDA0003129237520000141
Figure BDA0003129237520000142
in formulas 1 to 2, X and Y represent subsystem information and initialization parameters, support (support) is a proportion of each data item in a frequent item set in all candidate data items in a data candidate set, and confidence (confidence) is a probability that one data appears and another data appears, or a conditional probability of the data. In formula 1, number (available) refers to the number of transactions in the transaction set in which the application deployment information is the same in the stock master data, not the number of transactions in the stock master data.
Step S205, taking the second item set as a basic data set, returning and executing the steps of selecting a target parameter from the initialization parameter set without returning, and constructing a data candidate set by using each parameter value of the target parameter and the basic data set until the target parameter is the last parameter in the initialization parameter set, wherein the obtained second item set is a frequent item set of the application deployment information and the initialization parameter set;
after determining the frequent item set of the second item set, taking the obtained second item set as a basic data set, in terms of calculation, reselecting a target parameter and a new basic data set from the initialization parameter set to construct a data candidate set, and increasing the dimensionality of candidate data items in the reconstructed data candidate set by one on the original basis, that is, if the candidate data items in the obtained second item set are two-dimensional data sets, the candidate data items in the data candidate set reconstructed on the basis of the second item set are three-dimensional data sets. On the basis of the reconstructed data candidate set, the support degree and the confidence degree of each candidate data item in the data candidate set are recalculated, so that a new frequent item set is obtained, until the initialization parameter of the data candidate set is the last parameter in the initialization parameter set, the data candidate set is constructed, and the second item set obtained through calculation is the final frequent item set.
Step S206, determining the association rule of the application deployment information and the initialization parameter set according to the frequent item set.
After the final frequent item set is obtained, the strong association rule between the subsystem information and the initialization parameter is determined according to the frequent item set, and once the frequent item set is found, the strong association rule can be directly generated by the frequent item set. For a frequent item set, all but not the empty subset is the frequent item set.
In one possible embodiment, assuming that the created subsystem to be deployed of the target cloud host is subsystemma, and the parameters to be initialized include an execution environment (env), a CPU architecture, a host usage, and an operating system, the initialization parameter set is combined as [ execution environment, CPU architecture, host usage, operating system ]. The env includes prd, adr, preprd and the like (different cloud host running environments such as production, test, development and the like), the CPU architecture includes x86 and arm, the host uses include APP, BDP, DOCKER, DB, AI and Ceph (distributed file system), and the operating systems include CentOS7 (enterprise operating system 0S7 version), CentOS6 (enterprise operating system 0S6 version), SUSE, kylin and Ubuntu.
When a frequent item set and an association rule corresponding to the subsystem of the system are calculated, firstly, a transaction set containing the subsystem of the system is mined based on inventory host data, and an association relationship map of various combinations existing among initialization parameters is constructed through the transaction set, so that the relationship map shown in fig. 5 is finally constructed. Further, in the present embodiment, based on the above-mentioned parameter to be initialized and the constructed association relationship map of the subsystem, a frequent item set and an association rule of the subsystem are calculated. Specifically, for example, if the user configures the partial initialization parameter, and the initialization parameter configured by the user is detected to be the operating system, and the operating system is designated as the CentOS7, the parameters to be initialized remain the operating environment (env), the CPU architecture, and the host application. When calculating a frequent item set, firstly, a basic data set [ subsystem ma ] is constructed based on the deployed subsystem ma, then a target parameter is selected from an initialization parameter set to construct a two-dimensional data candidate set, for example, the selected parameter is an operating environment env, and the constructed two-dimensional data candidate set is [ subsystem ma, env ], wherein env comprises prd, adr and preprd, and the two-dimensional data candidate set comprises three candidate data items [ subsystem ma, prd ], [ subsystem ma, adr ], [ subsystem ma and preprd ]. It should be noted that, since the user specifies one initialization parameter, the initialization parameter set is set to [ operating environment, CPU architecture, host usage ] when calculating the frequent item set based on the parameter to be initialized. And scanning a target transaction set corresponding to the selected subsystem mA system, and determining the occurrence frequency of each candidate data item in the target transaction set, so as to calculate the support degree and the confidence degree of a data candidate set formed by the subsystem mA and the operating environment env, and further determine a corresponding frequent item set. As shown in fig. 6, fig. 6 shows the calculated support degree and confidence degree of the two-bit data candidate set, and if the minimum support degree threshold and the minimum confidence degree threshold are both set to be 0.5, it can be determined that the two-dimensional frequent item set includes [ subsystemma, prd ], [ subsystemma, adr ]. Then, based on the obtained two-dimensional frequent item set, a target parameter, such as a CPU architecture, is reselected from the initialization parameter set, and then a three-dimensional data candidate set is constructed, as shown in fig. 7, as can be seen from fig. 6 and 7, the item set which does not satisfy the minimum support degree in fig. 6 does not satisfy the minimum support degree in fig. 7. Eliminating the item set which does not meet the minimum support degree, calculating the confidence degree of the item set which meets the minimum support degree, then determining a three-dimensional frequent item set according to the confidence degree of each candidate data item, selecting a target parameter from the initialization parameter set based on the determined three-dimensional frequent item set, constructing a four-dimensional data candidate set, and repeating the steps until the selected target parameter is the last parameter in the initialization parameter set, constructing the data candidate set shown in the figure 8, and obtaining the four-dimensional frequent item set which is obtained by calculating the support degree and the confidence degree as the final frequent item set.
Further, referring to the calculation process of the frequent item set in fig. 6 to 8, if the user specifies that the subsystem to be deployed is subsystem ma and the operating system in the initialization parameter set is CentOS7, the initialization parameter configured by the user is matched with the frequent item set according to the calculated association rule, and when matching, the [ subsystem ma, CentOS7] input by the user is used as configuration information and is matched with the frequent item set based on the association rule, so as to obtain the optimal parameter set [ subsystem ma, prd, x86, CentOS7, APP ].
When a user applies for a resource, the information of a subsystem to be deployed needs to be provided in an application instruction and a resource service request is triggered, when the resource application instruction triggered by the user is received, a corresponding cloud host is created, and after the creation of the cloud host is completed, initialization parameter information of the subsystem to be deployed, an external environment, IDC, a CPU architecture, an OS version, a logic area and the like of the cloud host is acquired. And matching the optimal parameter set which is more than the minimum support degree and the confidence degree in the frequent item set by combining the association rule of the parameter set to be initialized in the stock host data, thereby calculating the initialization parameter values suitable for the running environment, IDC, logic area, CPU architecture, OS version, host application and the like of the cloud host.
In this embodiment, stock host data is mined through an association algorithm, so that frequent item sets and association rules of different application deployment information in the stock host data are determined, then, based on different requirements of users, an optimal parameter set meeting the requirements of the users is quickly matched according to the calculated frequent item sets and association rules, and cloud hosts created according to the requirements of the users are initialized, so that the cloud hosts meeting diversified requirements of the users are created.
Further, the association algorithm in this embodiment is different from a conventional association algorithm in that a frequent item set is connected by itself to construct a data candidate set, and this embodiment is directed to user requirements, and a basic data set is constructed based on the user requirements, and then a data candidate set is constructed by using parameter values of initialization parameters in an initialization parameter set and the basic data set, so that the correlation between the frequent item set obtained by calculation and the user requirements is stronger, and thus, an optimal parameter set matched based on the user requirements is more accurate.
In addition, in order to improve the flexibility and efficiency of the initialization method of the cloud host, the step S20 may be implemented by:
acquiring a preset support degree threshold value and a preset confidence degree threshold value, and constructing a basic data set based on the application deployment information;
taking the preset parameters selected by the initialization parameters and the basic data set as data candidate sets;
traversing the stock host data to calculate the support degree of each candidate data item in the data candidate set, and determining a first item set of which the support degree is greater than the support degree threshold;
calculating a confidence level of the first term set, and determining a second term set with the confidence level larger than the confidence level threshold value;
taking the second item set as a frequent item set of the application deployment information and the initialization parameter set;
and determining the association rule of the application deployment information and the initialization parameter set according to the frequent item set.
In this embodiment, details of the implementation of the above steps are the same as those of the above embodiment, and are not described herein. In this embodiment, a basic data set is constructed by using the application deployment information, a data candidate set is constructed by using preset parameters (specifically, the selected number may be half of the total number, or 1/3) of the basic data set and the initialization parameter set, so as to obtain a second item set, and finally, an association rule between the application deployment information and the initialization parameter set is obtained by using the second item set. In the process, all target parameters do not need to be selected in the initialization parameter set without being replaced, the second item set can be quickly obtained, and the flexibility and the efficiency of the initialization method of the cloud host can be realized in a scene with low accuracy requirement.
Further, based on the first embodiment, a third embodiment of the cloud host initialization method according to the present invention is proposed, in this embodiment, in step S40, the performing the initialization operation on the created target cloud host in series according to the parameter sequence in the determined optimal parameter set may include:
step S401, taking a first parameter in the optimal parameter set as a current parameter, executing an initialization operation corresponding to the current parameter on the target cloud host, and detecting an execution state of the initialization operation, wherein the execution state includes execution completion and execution failure;
based on the first embodiment, the initialization operation for the cloud host is roughly divided into several different dimensions, which mainly include initialization based on baseline specifications, initialization based on host usage, and personalized initialization based on the subsystems to be deployed. When the initialization operation of the cloud host is executed in series, firstly, one parameter is selected from the optimal parameter set according to the sequence as the current parameter of the initialization, then the initialization operation corresponding to the parameter is executed, and the execution state of the initialization operation corresponding to the current parameter is detected, wherein the execution state of the initialization operation comprises the execution completion and the execution failure.
Step S402, if the execution state is execution failure, executing a rollback operation and counting rollback times, wherein the rollback operation is a step of returning and executing the initialization operation corresponding to the current parameters executed on the target cloud host and acquiring the execution state of the initialization operation until the execution state is execution completion or the rollback times is greater than a preset threshold value, and outputting an alarm prompt;
when the initialization operation corresponding to the current parameter is detected to be failed, a rollback operation is executed, the rollback operation is the initialization operation corresponding to the current parameter, meanwhile, the rollback frequency of the initialization operation of the current parameter is recorded, when the rollback frequency is larger than a preset threshold, an initialization abnormal mechanism is triggered, an alarm prompt is output, related workers are prompted to timely handle abnormal conditions, the preset threshold of the rollback frequency can be set in a self-defined mode, and different alarm thresholds can be set for different initialization parameters. Further, when the rollback operation is executed, the execution state of the initialization operation is also detected, and in a possible case, when the rollback frequency of the current parameter does not reach the preset threshold value, that is, the initialization operation on the current parameter is completed, it may be detected that the execution state of the initialization operation corresponding to the current parameter is not completed.
Step S403, if the execution state is execution completion, taking a next parameter in the optimal parameter set as a current parameter, returning to and executing the initialization operation corresponding to the current parameter executed by the target cloud host, and obtaining the execution state of the initialization operation until the current parameter is a last parameter in the optimal parameter set.
And when the execution state of the initialization operation corresponding to the current parameter is not completed, selecting the next parameter from the optimal parameter set as the current parameter, executing the initialization operation corresponding to the parameter, and detecting the execution state of the initialization operation corresponding to the parameter. And until the current parameter is the last parameter in the optimal parameter set, after the initialization operation corresponding to the last parameter in the optimal parameter set is executed, the initialization operation on the created target cloud host is completed, and the cloud host meeting the user requirements is obtained.
In this embodiment, by performing initialization operations on the parameters in the optimal parameter set in series in sequence and detecting the execution state of the initialization operation corresponding to each parameter, an abnormal condition in the initialization process of the cloud host can be found in time. Furthermore, by executing the rollback operation, only the initialization operation which fails to be executed is retried, instead of executing all initialization operations again, so that the initialization time of the cloud host can be effectively shortened, when the rollback frequency reaches a preset threshold value, an alarm prompt is output, and the monitoring effect on the initialization process is improved.
Further, the present invention also provides an initialization apparatus for a cloud host, please refer to fig. 9, and fig. 9 is a schematic diagram of functional modules of an embodiment of the initialization apparatus for a cloud host according to the present invention. As shown in fig. 9, the cloud host initialization apparatus according to the present invention includes:
the data acquisition module 10 is configured to acquire stock host data, where the stock host data includes an initialization parameter set and application deployment information of a currently running online host;
the data mining module 20 is configured to calculate the stock host data by using an association algorithm to obtain a frequent item set and an association rule of the application deployment information and the initialization parameter set;
the parameter matching module 30 is configured to acquire configuration information of a target cloud host to be initialized, match the configuration information with the frequent item set according to the association rule, and determine an optimal parameter set for initializing the target cloud host;
and the initialization module 40 is configured to serially execute initialization operations on the target cloud host according to the parameter sequence in the optimal parameter set.
Further, the data mining module 20 includes:
the basic set building unit is used for acquiring a preset support degree threshold value and a preset confidence degree threshold value and constructing a basic data set based on the application deployment information;
a candidate set construction unit, configured to select a target parameter from the initialization parameter set without being replaced, and construct a data candidate set using each parameter value of the target parameter and the basic data set;
the traversing unit is used for traversing the stock host data to calculate the support degree of each candidate data item in the data candidate set and determining a first item set of which the support degree is greater than the support degree threshold;
the calculating unit is used for calculating the confidence coefficient of the first term set and determining a second term set of which the confidence coefficient is greater than the confidence coefficient threshold value;
a circulation unit, configured to use the second item set as a basic data set, return to and execute the step of selecting a target parameter from the initialization parameter set without being returned, and construct a data candidate set by using each parameter value of the target parameter and the basic data set, until the target parameter is a last parameter in the initialization parameter set, where the obtained second item set is a frequent item set of the application deployment information and the initialization parameter set;
and the association rule mining unit is used for determining the association rule of the application deployment information and the initialization parameter set according to the frequent item set.
Further, the traversal unit includes:
the partitioning subunit is configured to partition the inventory host data into a plurality of transaction sets according to the application deployment information, where the transaction sets include a plurality of transactions, and the plurality of transactions have the same application deployment information;
the traversal subunit is configured to determine, according to the application deployment information, a target transaction set corresponding to each candidate data item in the data candidate set, traverse the target transaction set, and count the number of transactions in the target transaction set and the occurrence frequency of each candidate data item in the data candidate set;
and the calculating subunit is used for determining the support degree of each candidate data item in the data candidate set according to the ratio of the occurrence frequency to the number of the transactions.
Further, the initialization module 40 includes:
an execution detection unit, configured to take a first parameter in the optimal parameter set as a current parameter, execute an initialization operation corresponding to the current parameter on the target cloud host, and detect an execution state of the initialization operation, where the execution state includes completion of execution and failure of execution;
a rollback unit, configured to execute a rollback operation and count rollback times if the execution state is an execution failure, where the rollback operation is a step of returning and executing the initialization operation corresponding to the current parameter executed on the target cloud host, and acquiring an execution state of the initialization operation until the execution state is an execution completion, or the rollback times is greater than a preset threshold, and outputting an alarm prompt;
and if the execution state is the execution completion, taking the next parameter in the optimal parameter set as the current parameter, returning and executing the initialization operation corresponding to the current parameter executed by the target cloud host, and detecting the execution state of the initialization operation until the current parameter is the last parameter in the optimal parameter set.
Further, the initialization apparatus of the cloud host further includes a cloud host creation module, configured to:
creating a mirror image template and receiving an application instruction of a user, wherein the application instruction comprises application information to be deployed;
selecting a target template from the mirror image templates according to the application information to be deployed in the application instruction;
and generating mirror image information according to the target template, and creating a target cloud host according to the mirror image information.
Further, the initialization apparatus of the cloud host further includes a mirror image making module, configured to:
acquiring a preset system image file and creating a virtual disk;
determining attribute information of a mirror image template according to the system mirror image file;
and creating a mirror image template according to the attribute information and the virtual disk, wherein the attribute information comprises at least one of format, name and data size.
Further, the initialization apparatus of the cloud host further includes a parameter configuration module, configured to:
when a configuration instruction is detected, acquiring an initial configuration parameter input by a user;
determining whether the parameter quantity of the initialization configuration parameters is the same as a preset parameter threshold value;
if the initialization configuration parameters are the same as the initialization configuration parameters, setting the initialization configuration parameters as an optimal parameter set for initializing the target cloud host;
and if the initialization configuration parameters are not the same as the frequent item sets, matching the initialization configuration parameters with the frequent item sets according to the association rule, and determining an optimal parameter set for initializing the target cloud host, wherein the parameter quantity of the initialization configuration parameters is smaller than the preset parameter threshold.
The function implementation of each module in the initialization apparatus of the cloud host corresponds to each step in the initialization method embodiment of the cloud host, and the function and implementation process are not described in detail here.
The present invention also provides a computer storage medium, having an initialization program of a cloud host stored thereon, where the initialization program of the cloud host is executed by a processor to implement the steps of the initialization method of the cloud host according to any one of the above embodiments.
The specific embodiment of the computer storage medium of the present invention is basically the same as the embodiments of the initialization method of the cloud host, and is not described herein again.
The present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method for initializing a cloud host according to any of the embodiments described above.
The specific embodiment of the computer storage medium of the present invention is basically the same as the embodiments of the initialization method of the cloud host, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. The method for initializing the cloud host is characterized by comprising the following steps of:
acquiring stock host data, wherein the stock host data comprises an initialization parameter set and application deployment information of a currently running online host;
calculating the stock host data by using an association algorithm to obtain a frequent item set and an association rule of the application deployment information and the initialization parameter set;
acquiring configuration information of a target cloud host to be initialized, matching the configuration information with the frequent item set according to the association rule, and determining an optimal parameter set for initializing the target cloud host;
and serially executing initialization operation on the target cloud host according to the parameter sequence in the optimal parameter set.
2. The method for initializing a cloud host according to claim 1, wherein the step of calculating the host inventory data by using an association algorithm to obtain a frequent item set and association rules of the application deployment information and the initialization parameter set includes:
acquiring a preset support degree threshold value and a preset confidence degree threshold value, and constructing a basic data set based on the application deployment information;
selecting target parameters from the initialization parameter set without putting back, and constructing a data candidate set by using each parameter value of the target parameters and the basic data set;
traversing the stock host data to calculate the support degree of each candidate data item in the data candidate set, and determining a first item set of which the support degree is greater than the support degree threshold;
calculating a confidence level of the first term set, and determining a second term set with the confidence level larger than the confidence level threshold value;
taking the second item set as a basic data set, returning and executing the step of selecting target parameters from the initialization parameter set without putting back, and constructing a data candidate set by using each parameter value of the target parameters and the basic data set until the target parameters are the last parameters in the initialization parameter set, wherein the obtained second item set is a frequent item set of the application deployment information and the initialization parameter set;
and determining the association rule of the application deployment information and the initialization parameter set according to the frequent item set.
3. The method for initializing a cloud host according to claim 2, wherein the step of traversing the inventory host data to calculate the support degree of each candidate data item in the data candidate set comprises:
dividing the stock host data into a plurality of transaction sets according to the application deployment information, wherein the transaction sets comprise a plurality of transactions, and the transactions have the same application deployment information;
determining a target transaction set corresponding to each candidate data item in the data candidate set according to the application deployment information, traversing the target transaction set, and counting the number of transactions in the target transaction set and the occurrence frequency of each candidate data item in the data candidate set;
and determining the support degree of each candidate data item in the data candidate set according to the ratio of the occurrence frequency to the number of the transactions.
4. The method for initializing a cloud host according to claim 1, wherein the step of serially executing the initialization operation on the target cloud host according to the parameter sequence in the optimal parameter set includes:
taking a first parameter in the optimal parameter set as a current parameter, executing initialization operation corresponding to the current parameter on the target cloud host, and detecting an execution state of the initialization operation, wherein the execution state comprises execution completion and execution failure;
if the execution state is execution failure, executing rollback operation and counting rollback times, wherein the rollback operation is a step of returning and executing the initialization operation corresponding to the current parameters executed on the target cloud host and acquiring the execution state of the initialization operation until the execution state is execution completion or the rollback times are greater than a preset threshold value, and outputting an alarm prompt;
and if the execution state is the execution completion, taking the next parameter in the optimal parameter set as the current parameter, returning and executing the initialization operation corresponding to the current parameter executed on the target cloud host, and detecting the execution state of the initialization operation until the current parameter is the last parameter in the optimal parameter set.
5. The method for initializing a cloud host according to claim 1, wherein the step of obtaining the configuration information of the target cloud host to be initialized is preceded by the step of:
creating a mirror image template and receiving an application instruction of a user, wherein the application instruction comprises application information to be deployed;
selecting a target template from the mirror image templates according to the application information to be deployed in the application instruction;
and generating mirror image information according to the target template, and creating a target cloud host according to the mirror image information.
6. The method for initializing a cloud host according to claim 5, wherein the step of creating a mirror template includes:
acquiring a preset system image file and creating a virtual disk;
determining attribute information of a mirror image template according to the system mirror image file;
and creating a mirror image template according to the attribute information and the virtual disk, wherein the attribute information comprises at least one of format, name and data size.
7. The method for initializing a cloud host according to any one of claims 1 to 6, wherein after the step of obtaining the configuration information of the target cloud host to be initialized, the method further comprises:
when a configuration instruction is detected, acquiring an initial configuration parameter input by a user;
determining whether the parameter quantity of the initialization configuration parameters is the same as a preset parameter threshold value;
if the initialization configuration parameters are the same as the initialization configuration parameters, setting the initialization configuration parameters as an optimal parameter set for initializing the target cloud host;
and if the initialization configuration parameters are not the same as the frequent item sets, matching the initialization configuration parameters with the frequent item sets according to the association rule, and determining an optimal parameter set for initializing the target cloud host, wherein the parameter quantity of the initialization configuration parameters is smaller than the preset parameter threshold.
8. An initialization apparatus of a cloud host, the initialization apparatus of the cloud host comprising:
the system comprises a data acquisition module, a data processing module and a data processing module, wherein the data acquisition module is used for acquiring stock host data, and the stock host data comprises an initialization parameter set and application deployment information of a currently running online host;
the data mining module is used for calculating the stock host data by using an association algorithm to obtain the frequent item set and the association rule of the application deployment information and the initialization parameter set;
the parameter matching module is used for acquiring configuration information of a target cloud host to be initialized, matching the configuration information with the frequent item set according to the association rule and determining an optimal parameter set for initializing the target cloud host;
and the initialization module is used for serially executing the initialization operation of the target cloud host according to the parameter sequence in the optimal parameter set.
9. A terminal device, characterized in that the terminal device comprises: a memory, a processor, and an initialization program of a cloud host stored on the memory and operable on the processor, the initialization program of the cloud host implementing the steps of the initialization method of the cloud host according to any one of claims 1 to 7 when executed by the processor.
10. A computer storage medium, characterized in that the computer storage medium has stored thereon an initialization program of a cloud host, which when executed by a processor implements the steps of the initialization method of the cloud host according to any one of claims 1 to 7.
CN202110699548.XA 2021-06-23 2021-06-23 Cloud host initialization method and device, terminal device and storage medium Pending CN113326073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110699548.XA CN113326073A (en) 2021-06-23 2021-06-23 Cloud host initialization method and device, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110699548.XA CN113326073A (en) 2021-06-23 2021-06-23 Cloud host initialization method and device, terminal device and storage medium

Publications (1)

Publication Number Publication Date
CN113326073A true CN113326073A (en) 2021-08-31

Family

ID=77424394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110699548.XA Pending CN113326073A (en) 2021-06-23 2021-06-23 Cloud host initialization method and device, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN113326073A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113867824A (en) * 2021-11-30 2021-12-31 武汉迈异信息科技有限公司 Cloud host initialization method and device, electronic equipment and medium
CN117200407A (en) * 2023-11-08 2023-12-08 深圳和润达科技有限公司 Intelligent control method and device for equipment based on BMS

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113867824A (en) * 2021-11-30 2021-12-31 武汉迈异信息科技有限公司 Cloud host initialization method and device, electronic equipment and medium
CN117200407A (en) * 2023-11-08 2023-12-08 深圳和润达科技有限公司 Intelligent control method and device for equipment based on BMS
CN117200407B (en) * 2023-11-08 2024-03-08 深圳和润达科技有限公司 Intelligent control method and device for equipment based on BMS

Similar Documents

Publication Publication Date Title
US9778967B2 (en) Sophisticated run-time system for graph processing
US9501562B2 (en) Identification of complementary data objects
US9400700B2 (en) Optimized system for analytics (graphs and sparse matrices) operations
US9875265B2 (en) Database table format conversion based on user data access patterns in a networked computing environment
US9031548B2 (en) Method and system for obtaining a configuration profile
US11176187B2 (en) Data insight discovery using a clustering technique
CN113326073A (en) Cloud host initialization method and device, terminal device and storage medium
EP3519987B1 (en) Intents and locks with intent
US11836067B2 (en) Hyper-converged infrastructure (HCI) log system
JP2015508918A (en) Redundant consumer transaction rule filtering
US9213759B2 (en) System, apparatus, and method for executing a query including boolean and conditional expressions
US11237740B2 (en) Automatically determining sizing configurations for storage components using machine learning techniques
WO2021178084A1 (en) Automated runtime configuration for dataflows
US9298487B2 (en) Managing virtual machine images in a distributed computing environment
CN114816772B (en) Debugging method, debugging system and computing device for application running based on compatible layer
CN111158595A (en) Enterprise-level heterogeneous storage resource scheduling method and system
CN114650167B (en) Abnormality detection method, abnormality detection device, abnormality detection equipment and computer-readable storage medium
CN110321435B (en) Data source dividing method, device, equipment and storage medium
CN113434585A (en) Resource saving method and equipment
CN117369890B (en) Method, device, equipment and medium for starting server in guiding manner
JP6626804B2 (en) Computer, selection method and selection program
WO2024043898A1 (en) Entity discovery based on glossary data
CN113282760A (en) Method and device for realizing user requirements
CN115733787A (en) Network identification method, device, server and storage medium
CN116540934A (en) Data storage method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination