Operating system deployment method and apparatus, device, storage medium, and program product
Patent Information
- Application Number
- PCT/CN2026/071162
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-03-28
- Filing Date
- 2026-01-07
- Publication Date
- 2026-10-01
Smart Images

Figure CN2026071162_01102026_PF_FP_ABST
Abstract
Description
Operating system deployment methods, devices, equipment, storage media, and program products
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510378436.2, filed on March 28, 2025, entitled “Operating System Deployment Method, Apparatus, Device, Storage Medium and Program Product”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of cloud computing, specifically to an operating system deployment method, apparatus, device, non-volatile readable storage medium, and program product. Background Technology
[0004] As server hardware technology continues to advance, hardware environments are becoming increasingly complex. When selecting a suitable operating system for a server, a tailored recommendation is typically needed based on the server's hardware information. During deployment, the operating system's resources are manually partitioned according to the server's business needs to complete the deployment.
[0005] In realizing the concept of this application, the inventors discovered at least the following problems in the related technology: when facing complex hardware environments and diverse business scenarios, the recommended operating system is prone to mismatch with the business scenario. Furthermore, manual partitioning may result in a low degree of compatibility between the operating system deployment and the server hardware configuration, requiring repeated adjustments and leading to low system deployment efficiency. Summary of the Invention
[0006] In view of the problem, this application provides an operating system deployment method, apparatus, device, non-volatile readable storage medium, and program product.
[0007] According to the first aspect of this application, an operating system deployment method is provided, comprising: inputting attribute information of a target server in a target environment into a system recommendation model running in a system deployment engine to obtain a system recommendation type, wherein the target environment is an environment for deploying an operating system on a server, the system recommendation model is trained using attribute information of servers with already deployed operating systems in the target environment as reference samples, and the target server is connected to a computer with a system deployment engine deployed thereon; determining a target partitioning result corresponding to the system recommendation type based on historical deployment information of the system deployment engine, wherein the target partitioning result is dynamically generated based on the server's system operating information using a partitioning algorithm called by the system deployment engine, and the target partitioning result is used to partition the server's storage resources; and generating a system deployment scheme based on the system recommendation type and the target partitioning result, so that the target server completes the installation of the operating system and the initialization of partition configuration based on the system deployment scheme.
[0008] The second aspect of this application provides an operating system deployment apparatus, comprising: a system recommendation module, configured to input the attribute information of a target server in a target environment into a system recommendation model running in a system deployment engine to obtain a system recommendation type, wherein the target environment is an environment for deploying an operating system on a server, the system recommendation model is trained using the attribute information of servers with already deployed operating systems in the target environment as reference samples, and the target server is connected to a computer with a system deployment engine deployed thereon; a partition determination module, configured to determine a target partition result corresponding to the system recommendation type based on the historical deployment information of the system deployment engine, wherein the target partition result is dynamically generated based on the system operation information of the server using a partitioning algorithm called by the system deployment engine, and the target partition result is used to partition the storage resources of the server; and a system deployment module, configured to generate a system deployment scheme based on the system recommendation type and the target partition result, so that the target server completes the installation of the operating system and the initialization of partition configuration based on the system deployment scheme.
[0009] A third aspect of this application provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method.
[0010] A fourth aspect of this application also provides a non-volatile readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions, when executed by a processor, implement the steps of a method.
[0011] The fifth aspect of this application also provides a computer program product, including a computer program or instructions, wherein the steps of implementing a method are executed by a processor.
[0012] According to embodiments of this application, a system recommendation model running in the system deployment engine is used to analyze the attribute information of the target server to determine the appropriate system recommendation type. During the recommendation process, since the system recommendation model is trained based on the server attribute information of the operating system already deployed in the target environment, the recommendation results can better coordinate with the configurations of other servers in the target environment, achieving personalized recommendations. After determining the system recommendation type, the target partitioning results corresponding to that recommendation type are extracted from historical deployment information. Since the target partitioning results are dynamically generated based on the server's system operation information, resource allocation based on the target partitioning results during deployment ensures that the operating system deployment is more closely matched to the server's attribute information. Simultaneously, pre-determining the target partitioning results effectively reduces repeated adjustments to the initial partitions, significantly improving the efficiency and accuracy of system deployment. Attached Figure Description
[0013] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments of this application with reference to the accompanying drawings.
[0014] Figure 1 illustrates an application scenario diagram of an operating system deployment method, apparatus, device, non-volatile readable storage medium, and program product according to embodiments of this application.
[0015] Figure 2 shows a flowchart of an operating system deployment method according to an embodiment of this application.
[0016] Figure 3 shows a schematic diagram of a decision tree in an operating system deployment method according to an embodiment of this application.
[0017] Figure 4 shows a flowchart of model training and verification in the operating system deployment method according to an embodiment of this application.
[0018] Figure 5 shows a data flow diagram of the interaction between the target server and the computer in the operating system deployment method according to an embodiment of this application.
[0019] Figure 6 shows a flowchart of an operating system deployment method according to another embodiment of this application.
[0020] Figure 7 shows a structural block diagram of an operating system deployment apparatus according to an embodiment of this application.
[0021] Figure 8 shows a block diagram of an electronic device suitable for implementing an operating system deployment method according to an embodiment of this application. Detailed Implementation
[0022] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0023] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0024] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0025] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).
[0026] In the technical solution of this application, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.
[0027] This application provides an operating system deployment method, which includes: inputting the attribute information of a target server in a target environment into a system recommendation model running in a system deployment engine to obtain a system recommendation type, wherein the target environment is the environment for deploying an operating system on a server, the system recommendation model is trained using the attribute information of servers with already deployed operating systems in the target environment as reference samples, and the target server is connected to a computer with a system deployment engine deployed thereon; determining a target partitioning result corresponding to the system recommendation type based on the historical deployment information of the system deployment engine, wherein the target partitioning result is dynamically generated based on the server's system operation information using a partitioning algorithm called by the system deployment engine, and the target partitioning result is used to divide the server's storage resources; and generating a system deployment scheme based on the system recommendation type and the target partitioning result, so that the target server completes the installation of the operating system and the initialization of partition configuration based on the system deployment scheme.
[0028] Figure 1 illustrates an application scenario diagram of an operating system deployment method, apparatus, device, non-volatile readable storage medium, and program product according to embodiments of this application.
[0029] As shown in Figure 1, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0030] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0031] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0032] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0033] It should be noted that the operating system deployment method provided in this application embodiment can generally be executed by server 105. Correspondingly, the operating system deployment apparatus provided in this application embodiment can generally be located in server 105. The operating system deployment method provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the operating system deployment apparatus provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0034] It should be understood that the number of terminal devices, networks, and servers shown in Figure 1 is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0035] The operating system deployment method of this application embodiment will be described in detail below based on the scenario described in Figure 1, with reference to Figures 2 to 6.
[0036] Figure 2 shows a flowchart of an operating system deployment method according to an embodiment of this application.
[0037] As shown in Figure 2, this embodiment includes operations S210 to S230.
[0038] In operation S210, the attribute information of the target server in the target environment is obtained and input into the system recommendation model running in the system deployment engine to obtain the system recommendation type. The target environment is the environment in which the operating system is deployed on the server. The system recommendation model is trained using the attribute information of the server with the operating system already deployed in the target environment as a reference sample. The target server is connected to the computer with the system deployment engine deployed.
[0039] In operation S220, based on the historical deployment information of the system deployment engine, the target partition result corresponding to the system recommendation type is determined. The target partition result is dynamically generated based on the server's system operation information using the partitioning algorithm called by the system deployment engine. The target partition result is used to divide the server's storage resources.
[0040] When operating S230, a system deployment plan is generated based on the system's recommended type and the target partition results, so that the target server can complete the installation of the operating system and the initialization of partition configuration based on the system deployment plan.
[0041] According to embodiments of this application, when deploying an operating system on servers in a target environment, the hardware configurations of multiple servers in that environment vary significantly, and the servers with deployed operating systems are all selected manually rather than through a system deployment engine. Therefore, to ensure that the operating system recommended for the target server is more compatible with other servers in the environment, it is necessary to refer to the attribute information of the deployed servers in order to select the most suitable operating system for the target server.
[0042] According to embodiments of this application, the training of the system recommendation model not only references server attribute information of the operating system deployed in the target environment, but also integrates historical data accumulated during previous system recommendations using the system deployment engine, thereby ensuring the accuracy and adaptability of the recommendation results. Specifically, the attribute information obtained during training differs from the attribute information obtained during system deployment; the attribute information during training also includes operating system type, version, and partition information. This additional information provides the model with a more comprehensive context, enabling it to more accurately understand the relationship between server configuration and operating system, thereby improving the reliability and adaptability of the recommendation results.
[0043] According to embodiments of this application, the acquisition of server attribute information in the target environment is accomplished through a data collection tool within the system deployment engine. Hardware information is collected using the server's IPMI (Intelligent Platform Management Interface) and Redfish protocol, while the operating system type, version, and partition information of the installed server are collected via the SSH protocol (Secure Shell). The collected information is stored in a local database for training and optimization of the system's recommendation model, thereby improving the model's recommendation accuracy and adaptability.
[0044] According to embodiments of this application, the training of the system recommendation model not only references the server attribute information of the operating system deployed in the target environment, but also integrates historical data accumulated during previous system recommendations using the system deployment engine, thereby ensuring the accuracy and adaptability of the recommendation results. Specifically, the attribute information obtained during training differs from the attribute information obtained during system deployment; the attribute information obtained during training also includes operating system type, version, and partition information. The acquisition of server attribute information in the target environment is performed using the collection tool in the system deployment engine. The server's IPMI (Intelligent Platform Management Interface) and Redfish protocol are used to collect server hardware information, and the SSH protocol (Secure Shell) is used to collect the system type, version, and partition information of the installed server. This collected information is then stored in the device's collection library for model training.
[0045] According to embodiments of this application, storage resources need to be initialized and partitioned during operating system deployment. Therefore, after obtaining the system's recommended partition type, the target partition result corresponding to that recommended type can be retrieved from the historical deployment information of the system deployment engine. These partition results in the historical deployment information are dynamically generated by the system deployment engine based on the server's system operating information by calling a partitioning algorithm. The final determined target partition result is a dynamically optimized partitioning scheme that better meets the server's storage needs and performance optimization goals.
[0046] According to embodiments of this application, the operating system version and configuration requirements are determined based on system recommendations, and a storage resource allocation strategy is planned in conjunction with the target partitioning results, including partition size, file system type, and mount points, thereby generating a system deployment plan. Based on this deployment plan, the target server automatically completes the installation of the operating system and initializes partition configuration, ensuring the efficiency and accuracy of the deployment process.
[0047] According to embodiments of this application, a system recommendation model running in the system deployment engine is used to analyze the attribute information of the target server to determine the appropriate system recommendation type. During the recommendation process, since the system recommendation model is trained based on the server attribute information of the operating system already deployed in the target environment, the recommendation results can better coordinate with the configurations of other servers in the target environment, achieving personalized recommendations. After determining the system recommendation type, the target partitioning results corresponding to that recommendation type are extracted from historical deployment information. Since the target partitioning results are dynamically generated based on the server's system operation information, resource allocation based on the target partitioning results during deployment ensures that the operating system deployment is more closely matched to the server's attribute information. Simultaneously, pre-determining the target partitioning results effectively reduces repeated adjustments to the initial partitions, significantly improving the efficiency and accuracy of system deployment.
[0048] According to an embodiment of this application, the system recommendation model includes a decision layer and an output layer. The system recommendation model, running in the system deployment engine, inputs the acquired attribute information of the target server in the target environment into the system recommendation model to obtain the system recommendation type. This includes: inputting the attribute information of the target server into the decision layer for analysis to determine the matching degree between sub-attributes in the attribute information and decision nodes in the decision layer; traversing multiple decision nodes in the decision layer based on the matching degree to determine the decision result corresponding to the attribute information; and outputting the system recommendation type corresponding to the decision result through the output layer.
[0049] According to embodiments of this application, the attribute information of the target server is input into the decision layer. Through the tree structure of the decision tree in the decision layer, the attribute information is sequentially matched with multiple decision nodes. During the matching process, the system calculates the matching degree between the attribute information and each decision node, progressively traversing the nodes in the decision tree. Furthermore, since each decision node in the decision tree corresponds to a value range of a sub-attribute, the system can determine the value range to which each sub-attribute belongs based on its specific value, thereby selecting the corresponding decision node for matching. This approach not only achieves accurate traversal of decision nodes but also ensures the logic and efficiency of the matching process, providing a reliable foundation for subsequent decisions.
[0050] According to an embodiment of this application, after traversing the decision tree based on attribute information, the corresponding leaf node in the decision tree is determined, and this leaf node is used as the final decision result. By determining the system recommendation type corresponding to the leaf node and outputting the system recommendation type using the output layer of the system recommendation model, the recommendation of the target server's operating system is completed. The system visually displays to the user the recommended operating system type and version for each server in the target environment that does not have an operating system installed, allowing the user to select and confirm. This process ensures the accuracy and logic of the system recommendation type, provides a reliable basis for the selection of the target server's operating system, and improves user experience and deployment efficiency.
[0051] According to an embodiment of this application, the system recommendation model is trained as follows: When the attribute information of external servers, which differ from the target environment and are obtained from the system deployment engine, meets predetermined conditions, the attribute information of the reference samples and the external servers is proportionally divided to obtain multiple sample datasets; the following operations are repeated until all multiple sample datasets are selected as validation sets: one of the multiple sample datasets is selected as the validation set, and the rest are used as the training set; the initial system recommendation model is trained using the training set to obtain a first prediction model; the prediction accuracy of the first prediction model is verified using the validation set to obtain a verification result; when it is determined that all multiple sample datasets are selected as validation sets, the first prediction model whose prediction accuracy reaches a preset value among the multiple verification results is determined as the system recommendation model.
[0052] According to embodiments of this application, it is determined whether the attribute information of external servers obtained from the system deployment engine meets predetermined conditions. If the preset conditions are met, it indicates that the user agrees to use the current data for decision tree training. The attribute information of the reference samples and external servers is divided into multiple sample datasets in an equal proportion. For example, if there are 80 external server samples and 20 server samples in the target environment, the samples are divided into 5 datasets at a ratio of 1:4, with each dataset containing 20 samples. Each sample dataset randomly selects 16 samples from the external server samples and 4 samples from the target environment server samples, ultimately generating 5 disjoint sample datasets D1, D2, D3, D4, and D5. This division method ensures the balance of data distribution and provides diverse data support for model training.
[0053] According to an embodiment of this application, after dividing the sample dataset, one dataset is selected as the validation set, and the remaining datasets are used as the training sets to train the initial system recommendation model. For example, D1 is selected as the validation set, and D2, D3, D4, and D5 are used as the training sets to train the model, generating four decision trees, i.e., the first prediction model. Subsequently, the generated first prediction model is used to make predictions using the D1 sample dataset, and its prediction accuracy is calculated. For example, if 15 out of 20 samples in D1 are correctly predicted, the prediction accuracy of the first prediction model is 0.75. This process evaluates the model's performance through cross-validation, providing a reliable basis for subsequent model optimization.
[0054] According to an embodiment of this application, multiple sample datasets are iteratively trained. D2 is used as the validation set, and the remaining datasets (D1, D3, D4, D5) are used as the training set. The above steps are repeated to generate a second first prediction model and calculate its prediction accuracy. Similarly, D3, D4, and D5 are used as validation sets, and the remaining datasets are used as training sets to generate a third, fourth, and fifth first prediction model, and their prediction accuracies are calculated for each. Finally, from the five generated first prediction models, the model with a prediction accuracy of 1 is selected as the system recommendation model. If no model has a prediction accuracy of 1, the first prediction model with the highest prediction accuracy can be selected as the system recommendation model. This iterative training and selection process ensures the robustness of the model and the reliability of the recommendation results.
[0055] According to an embodiment of this application, the operating system deployment method further includes: displaying attribute information of an external server, which is different from the target environment, obtained from a system deployment engine on a computer's interactive interface; determining that the attribute information of the external server meets predetermined conditions in response to a determination instruction for the attribute information of the external server; and re-obtaining the attribute information of the external server from the system deployment engine based on modification information input on the interactive interface in response to a modification instruction for the attribute information of the external server, until the obtained attribute information of the external server meets the predetermined conditions.
[0056] According to an embodiment of this application, the acquired attribute information of the external server is displayed on the interactive interface of a computer deployed with a system deployment engine. Users can view all selected samples through the interactive interface. If the system receives a confirmation command from the user through the interactive interface, it indicates that the user approves of the current sample and considers it to meet the requirements of the target environment. At this time, the system determines that the attribute information of the external server meets predetermined conditions and performs subsequent model training based on this information. This interactive mechanism ensures the accuracy of the training data and the user's participation in data selection, thereby improving the reliability and practicality of model training.
[0057] According to an embodiment of this application, if a modification instruction is received from a user via the interactive interface, it indicates that the user wishes to make targeted adjustments to the current sample. Based on the user's input via the interactive interface, the system re-searches for samples that meet the criteria from the system deployment engine and displays the newly acquired external server attribute information on the interactive interface for further user confirmation. This process will be repeated until the user sends a confirmation instruction. After receiving the user's final confirmation, the system will begin training the model based on the adjusted sample data. This interactive mechanism ensures that users can flexibly adjust the sample data, thereby improving the accuracy and applicability of model training.
[0058] According to an embodiment of this application, an initial system recommendation model is trained using a training set to obtain a first prediction model, including: determining the information gain of the training set based on the type of sub-attributes of each attribute information in the training set to obtain the gain value of the sub-attributes; sorting multiple gain values to determine the splitting attribute of the root node in the initial decision tree; dividing the training set into multiple subsets based on the multiple attribute value ranges of the splitting attribute, wherein the child nodes in the decision tree represent subsets; for each child node, repeating the following operations until multiple sub-attributes are traversed: determining the gain value of the remaining sub-attributes; and redetermining the splitting attribute; further dividing the subsets based on the redetermined splitting attribute; when it is determined that multiple sub-attributes have been traversed, using the obtained target decision tree as the decision layer; and connecting the decision layer to the output layer to obtain the first prediction model.
[0059] According to an embodiment of this application, during the training of the initial system recommendation model, the information gain of each training set is calculated based on the operating system type of each attribute information in the training set. Specifically, the calculation method of the training set information gain is defined as shown in formula (1):
[0060] Where, p i Let H(D) represent the proportion of samples of class i (i.e., different operating system types) in the training set D, where j represents the total number of operating system types, and H(D) represents the information gain. For example, suppose the training set D contains 200 samples, of which 80 samples are of operating system type a and 120 samples are of operating system type b, then the information gain H(D) of the training set D is: By calculating information gain, the distribution of different operating system types in the training set can be quantified, providing data support for subsequent model training.
[0061] According to embodiments of this application, the gain value of each sub-attribute in the attribute information is calculated based on the information gain of the training set. The calculated gain values are then sorted, and the sub-attribute with the largest gain value is selected as the splitting attribute of the root node. For example, assuming the graph processing unit (GPU) memory has the largest gain value, the GPU memory is used as the splitting attribute of the root node, i.e., the first-level node. In this way, the decision tree can preferentially select the attribute that contributes the most to the classification result for splitting, thereby improving the model's classification performance and efficiency.
[0062] According to embodiments of this application, the training set is divided into multiple subsets based on the different value ranges of the splitting attribute, generating corresponding child nodes. For example, using graph processor memory as the splitting attribute, two child nodes are formed: "less than 16G" and "greater than or equal to 16G," and the training set is divided into subsets corresponding to these child nodes. At each child node, the gain values of the remaining sub-attributes are recalculated based on the subset, and the sub-attribute with the largest gain value is selected as the new splitting attribute to construct the next layer of child nodes. This process is recursively performed until a stopping condition is met. Through this recursive partitioning method, a complete decision tree structure is gradually constructed, providing efficient decision logic for the system's recommendation model.
[0063] As shown in Figure 3, the target decision tree uses graph processor memory as the splitting attribute of the root node 301. Its value range is divided into three categories: graph processor memory less than 16G, graph processor memory 16G-32G, and graph processor memory greater than 32G, corresponding to the three first child nodes 302 under the root node. In each child node, the number of graph processor cores is determined as the splitting attribute of the next layer by calculating the sub-attribute gain value of the subset data.
[0064] The number of graph processor cores ranges from less than 8, 8-16, to more than 16, corresponding to three second child nodes 303. After further calculating the sub-attribute gain value, the split attribute is determined to be a Central Processing Unit (CPU) architecture.
[0065] The CPU architecture value range is divided into CPU architecture A and CPU architecture B, corresponding to two third child nodes 304 respectively. After continuing to calculate the sub-attribute gain value, the split attribute is determined to be the number of CPU cores, with value ranges of less than 8 CPU cores, 8-16 CPU cores, and more than 16 CPU cores, corresponding to three fourth child nodes 305 respectively. Through this recursive partitioning method, the target decision tree is finally constructed. As shown in Figure 3, the three leaf nodes 306 of the target decision tree represent recommender system a, recommender system b, and recommender system c respectively.
[0066] According to an embodiment of this application, when constructing the target decision tree, the recursive termination condition is that all sub-attributes have been traversed, or the gain value is 0 (i.e., further partitioning is not possible). Through this recursive partitioning method, the target decision tree is ultimately generated and used as the decision layer in the system recommendation model's decision-making process. Finally, the generated decision layer is connected to the output layer to construct the first prediction model, thereby completing the training of the initial system recommendation model. This process ensures the model's logicality and accuracy, providing reliable support for operating system recommendations for the target server.
[0067] According to an embodiment of this application, the information gain of the training set is determined based on the type of the sub-attributes of each attribute information in the training set to obtain the gain value of the sub-attributes. This includes: dividing the training set according to the operating system type of each attribute information in the training set to obtain multiple sample sets; determining the intermediate gain value of multiple sub-attributes in the attribute information for each sample set; and summing the intermediate gain values of the same sub-attribute in the multiple sample sets to obtain the gain value of the sub-attribute.
[0068] According to the embodiments of this application, when calculating the gain value of each sub-attribute, it is necessary to perform calculations for different operating system types. The training set is divided into multiple sample sets based on the operating system type of each attribute information in the training set. For each sample set, the intermediate gain value of multiple sub-attributes in the attribute information is calculated. The intermediate gain value includes the gain value of the same sub-attribute under different operating system types and different attribute value ranges. The intermediate gain values of the same sub-attribute in multiple sample sets are summed to obtain the final gain value of the sub-attribute. The calculation method of the sub-attribute gain value is shown in formula (2):
[0069] Where n represents the range of values for the nth attribute corresponding to sub-attribute A in the sample set, and v represents the total number of attribute value ranges corresponding to sub-attribute A. IG(D,A) represents the intermediate gain value of sub-attribute A.
[0070] For example, the number of CPU cores (sub-attribute A) has three value ranges: less than 8, 8-16, and greater than 16. Taking 200 samples as an example, there are 50 samples with less than 8 cores, of which 20 are recommender system a and 30 are recommender system b. There are 100 samples with 8-16 cores, of which 40 are recommender system a and 60 are recommender system b. There are 50 samples with more than 16 cores, of which 20 are recommender system a and 30 are recommender system b.
[0071] According to an embodiment of this application, the gain value for a number of cores less than 8 is calculated based on the above formula (1): The gain value for 8-16 cores The gain value for more than 16 cores is Based on the above formula (2), the gain value of the sub-attribute of the number of CPU cores is calculated as follows:
[0072] According to an embodiment of this application, the gain value of the graph processor memory is calculated using the same method. Assume that the graph processor memory (sub-attribute A) has two values: less than 16G and greater than or equal to 16G. There are 80 samples with values less than 16G, including 30 recommender system a and 50 recommender system b. There are 120 samples with values greater than or equal to 16G, including 50 recommender system a and 70 recommender system b. Based on the above formula (1), the information entropy of the memory less than 16G is calculated. Information entropy greater than or equal to 16G Based on the above formula (2), the information gain IG(D,A) of the graph processor memory sub-attribute is calculated as follows: By calculating the gain value of each sub-attribute, its contribution to the classification result can be quantified, thus providing a basis for the model to select the optimal splitting attribute.
[0073] According to an embodiment of this application, the operating system deployment method further includes: when it is determined that the prediction accuracy of multiple first prediction models is less than a preset value, re-dividing the attribute information of the reference sample and the external server proportionally to obtain multiple updated datasets; using the multiple updated datasets to train and validate the initial system recommendation model until the number of validations reaches a preset number, or the prediction accuracy of the trained second prediction model reaches a preset value; when it is determined that the number of validations reaches a preset number, and the prediction accuracy of the trained multiple second prediction models is less than a preset value, sorting the prediction accuracy of the multiple second prediction models, so as to determine the system recommendation model from the multiple second prediction models according to the sorting result.
[0074] According to an embodiment of this application, after checking the prediction accuracy of multiple first prediction models, if it is found that the prediction accuracy of all first prediction models is less than a preset value of 1, the attribute information of the reference sample and the external server is re-divided proportionally to generate multiple updated datasets. Specifically, the sample data is randomly shuffled and re-divided into five updated datasets: D1, D2, D3, D4, and D5. Based on these updated datasets, the decision tree with the highest prediction accuracy is trained and calculated to construct the second prediction model.
[0075] According to an embodiment of this application, if the prediction accuracy of the generated multiple second prediction models reaches 1 after verification, the prediction accuracies of the multiple second prediction models are sorted, and the system-recommended model is determined from the sorting results. If the prediction accuracy of multiple second prediction models is less than 1, iterative training continues. After a preset number of verifications, if the prediction accuracy still does not reach 1, the preset number of verifications needs to be adjusted to further optimize the iteration process. Since the model training uses a k-fold cross-validation algorithm, the preset number of verifications can be updated by adjusting the k value to 9, thereby increasing the diversity of data partitioning and the generalization ability of the model, ultimately improving the prediction accuracy.
[0076] According to an embodiment of this application, after updating the preset number of iterations, the cross-validation process is repeated until the number of validations reaches the updated preset number. Since in the k-fold cross-validation algorithm, when k is 9, the choice of decision tree will no longer be significant after 9 iterations. If a second prediction model with a prediction accuracy of 1 is still not found during this process, the second prediction model with the highest prediction accuracy from the historically trained second prediction models is selected as the system recommendation model. This method ensures that even if the ideal accuracy is not achieved after multiple iterations, the optimal model can still be selected for system recommendation, thereby guaranteeing the reliability and practicality of the recommendation results.
[0077] As shown in Figure 4, the model training and verification process in this embodiment includes operations S411 to S424.
[0078] In step S411, obtain attribute information of the reference sample and an external server distinct from the target environment. In step S412, proportionally divide the attribute information of the reference sample and the external server to obtain multiple sample datasets. In step S413, select one dataset from the multiple sample datasets as the validation set, and the rest as the training set. In step S414, determine the gain value of each sub-attribute in the training set. In step S415, select the sub-attribute with the largest gain value as the splitting attribute. In step S416, determine whether all sub-attributes have been traversed. In step S417, further divide the training set according to the value ranges of the multiple attributes of the splitting attribute. In step S418, generate the first prediction model.
[0079] In operation S419, the prediction accuracy of the first prediction model is calculated using the validation set. In operation S420, it is determined whether the prediction accuracy equals 1. In operation S421, it is determined whether the number of validations has reached the preset number. In operation S422, it is determined whether the preset number of validations is the target value. In operation S423, the preset number of validations is updated. In operation S424, the system recommendation model is output.
[0080] According to embodiments of this application, attribute information from reference samples and external servers is obtained, and multiple sample datasets are generated by proportionally dividing the data to ensure the diversity and representativeness of the training data. By calculating the gain values of sub-attributes and selecting the optimal splitting attribute, a decision tree model is progressively constructed to generate the first prediction model. The prediction accuracy of the model is evaluated using a validation set, and iterative optimization ensures the model's precision and stability. Finally, a system recommendation model is output, providing a reliable basis for recommending operating systems for target servers. This process not only improves the accuracy and adaptability of system recommendations but also reduces human intervention through automation, significantly improving the efficiency and reliability of system deployment.
[0081] According to an embodiment of this application, the operating system deployment method further includes: detecting the prediction accuracy of multiple second prediction models based on a preset standard value to obtain a detection result; and outputting a prompt message when the detection result indicates that the prediction accuracy of multiple second prediction models is less than the preset standard value, wherein the prompt message is used to prompt the target object to check the reference sample.
[0082] According to an embodiment of this application, the prediction accuracy of multiple second prediction models is tested based on a preset standard value, where the preset standard value can be set to 0.9. If the prediction accuracy of multiple second prediction models is lower than the preset standard value, it indicates that the data collected by the user in the target environment may be unreasonable. At this time, the system will output a prompt message, prompting the user to check and improve the reference sample to ensure the accuracy and rationality of the data, thereby providing a more reliable basis for subsequent model training and optimization.
[0083] According to an embodiment of this application, the target partition result corresponding to the system recommendation type is determined based on the historical deployment information of the system deployment engine, including: determining multiple candidate partition results corresponding to the system recommendation type based on the mapping relationship between operating system type and partition results in the historical deployment information; analyzing the partition information of servers with deployed operating systems in the target environment to determine the partition matching degree between the partition information and each candidate partition result; and determining the target partition result from the multiple candidate partition results based on the size relationship between the multiple partition matching degrees.
[0084] According to embodiments of this application, after determining the recommended system type for the target server, the mapping relationship between the operating system type and the partitioning results is extracted from historical deployment information. Specifically, a dictionary or hash table can be used to store this mapping relationship, where the key is the operating system type and the value is the corresponding partitioning result. Based on the recommended operating system type, the corresponding partitioning result is searched from the mapping table. If the recommended operating system type corresponds to multiple possible partitioning results, these results will be used as candidate partitioning results for further filtering and optimization. This method ensures the accuracy and flexibility of the partitioning results, providing reliable support for operating system deployment.
[0085] According to embodiments of this application, partition information of servers with deployed operating systems in the target environment is obtained, and this partition information is analyzed to extract key attributes such as partition name, size, and type. For each candidate partition result, its matching degree with the partition information of the deployed servers is calculated. The matching degree can be calculated by comparing attributes such as partition name, size, and type, using either simple string matching methods or more complex similarity algorithms (such as cosine similarity or edit distance). In this way, the degree of fit between the candidate partition results and the target environment can be quantified, thereby providing data support for selecting the optimal partitioning scheme.
[0086] According to embodiments of this application, the candidate partition with the highest matching degree is selected as the target partition based on the degree of matching. If multiple candidate partitions have the same matching degree, further filtering can be performed based on other factors (such as partition size, type, etc.). If higher accuracy is required in calculating the partition matching degree, a machine learning model can be used to predict the partition matching degree. Furthermore, if there is a large amount of partition information in the target environment, parallel computing techniques can be used to accelerate the matching degree calculation process. Through the above methods, the system can automatically combine historical data and the partition information of the target environment to determine the most suitable target partition, thereby improving deployment efficiency and the adaptability of the partitioning scheme.
[0087] According to an embodiment of this application, the partition information of a server with an operating system deployed in the target environment is analyzed to determine the partition matching degree between the partition information and each candidate partition result, including: obtaining the business operation requirements of multiple servers in the target environment, wherein the business operation requirements include at least one of resource requirements, performance requirements and fault tolerance requirements; and determining the partition matching degree based on the business matching degree between the multiple candidate partition results and the business operation requirements and the similarity between the partition information and each candidate partition result.
[0088] According to embodiments of this application, the operational requirements of each server in the target environment are collected, including at least one of resource requirements, performance requirements, and fault tolerance requirements. Specifically, resource requirements cover CPU, memory, disk space, etc.; performance requirements include throughput, latency, etc.; and fault tolerance requirements involve backup strategies, high availability requirements, etc. Rules for calculating the business matching degree are defined, and the matching degree for each dimension is calculated based on resource requirements, performance requirements, and fault tolerance requirements, respectively. Finally, the matching degrees for each dimension are weighted and summed to obtain the total business matching degree. This method can comprehensively evaluate the degree of fit between the server and business requirements, providing a more accurate basis for system recommendation and deployment.
[0089] According to embodiments of this application, a rule for calculating partition similarity is defined, quantifying the degree of matching by comparing the similarity between the partition information of the target server and the candidate partition results. Specifically, string matching, set similarity, or other similarity algorithms (such as cosine similarity) can be used. The business matching degree and partition similarity are weighted and summed to obtain the final partition matching degree. The weights can be adjusted according to actual needs; for example, business matching degree accounts for 70%, and partition similarity accounts for 30%. Finally, the candidate partition result with the highest partition matching degree is selected as the target partition result. This method comprehensively considers the degree of matching between business requirements and partition features, ensuring that the selected partitioning scheme not only meets business operation requirements but also highly matches the partition configuration of the target environment.
[0090] According to an embodiment of this application, the operating system deployment method further includes: distributing a generated system installation package corresponding to the system deployment scheme to a target server, wherein the target server has a system management component installed for information acquisition and processing; sending an operating system installation instruction to the system management component so that the target server installs an operating system corresponding to the recommended system type according to the system installation package; when it is determined that the operating system installation is complete, setting the target partition result in the system deployment scheme as the initial partition scheme of the operating system; and sending a partition configuration instruction to the system management component so that the target server performs an initial partition configuration operation on the installed operating system based on the initial partition scheme.
[0091] As shown in Figure 5, the address information of the target server 510 is determined, and the system installation package is transferred from the computer 520, which has the system deployment engine deployed, to the target server using a file transfer protocol. After ensuring that the system management component of the target server 510 successfully receives and stores the system installation package, the computer 520 sends operating system installation instructions through the system management component's API (Application Programming Interface) or command-line interface. The system installation instructions should include the path to the system installation package and installation parameters (such as installation directory, language settings, etc.). Subsequently, the status interface of the system management component is periodically polled to check the progress and status of the operating system installation. Specifically, the success of the installation can be determined based on the returned status code or log information. This process ensures the automation and controllability of the operating system installation, while improving deployment efficiency and reliability.
[0092] According to an embodiment of this application, after the operating system is installed, the computer 520 sends a partition configuration command to the target server 510 through the API or command-line interface of the system management component. The partition configuration command includes instructions to set the target partition result as the operating system's initial partition scheme, and contains the path or specific content of the initial partition scheme. By sending the partition configuration command, the target partition result is written to the target server's configuration file or passed to the system management component, ensuring that the target partition scheme can be correctly recognized and applied by the operating system. This process ensures the accuracy and automation of partition configuration, providing reliable support for the allocation of storage resources on the target server.
[0093] According to an embodiment of this application, the operating system deployment method further includes: after determining that the target server system has been deployed, repeatedly performing the following operations until the gain change of the added value reaches a preset threshold, or the number of partition adjustments reaches a preset number of partitions, and outputting dynamic partitioning results: performing a ratio adjustment operation on each partition according to the preset adjustment ratio of each of the multiple partitions in the operating system to obtain dynamic partitioning results, wherein the ratio adjustment operation includes an increase operation, a maintenance operation, or a decrease operation; determining the added value corresponding to the ratio adjustment operation based on the target operating information of the target server using a partitioning algorithm; and determining the gain change of the added value relative to the partition before the partition adjustment under the ratio adjustment operation.
[0094] According to an embodiment of this application, after the operating system of the target server is installed, the storage resources are divided into a system partition, a data storage partition, a web (network) service partition, and a file storage partition according to the initial partitioning scheme. After partitioning is completed, the system is allowed to run stably, and the target server's operating information, including resource usage, performance indicators, and system status, is obtained.
[0095] According to an embodiment of this application, a ratio adjustment operation is performed on each partition based on preset adjustment ratios for multiple partitions in the operating system, generating a dynamic partitioning result. Specifically, the preset adjustment ratio for the system partition is 5%, for the database partition it is 3%, for the web service partition it is 2%, and for the file storage partition it is 1%. This dynamic adjustment method optimizes the allocation of storage resources based on actual needs and operational conditions, thereby improving system performance and resource utilization.
[0096] According to embodiments of this application, the preset adjustment ratio for each type of partition has a fixed value. These ratios are set based on experience and a comprehensive consideration of the sensitivity to server resource adjustments. If the adjustment step size is set too large, for example, to 0.1 (i.e., 10%), each adjustment will result in a drastic change in server resource allocation, potentially leading to excessive system state fluctuations and hindering the search for a stable optimal solution. Especially for storage partitions, excessively large adjustment steps may cause serious problems such as system crashes. Therefore, using a smaller adjustment ratio can gradually optimize resource allocation while ensuring system stability, avoiding unnecessary interference with system operation.
[0097] According to embodiments of this application, if the step size is set too small, such as 0.01 (i.e., 1%), although the adjustment process is more refined, it will significantly increase the time and computational cost of exploring all possible combinations. Through practice and trade-offs, the preset adjustment ratio set for each type of partition can explore more weight combinations within a reasonable time, while avoiding excessive impact on the system with each adjustment. This setting enables the system to explore the optimal partitioning result relatively efficiently and stably. Furthermore, the preset adjustment ratio for each type of partition can be adjusted through the client page, allowing modification within the range of -0.1 to 0.1, thus providing users with flexibility and controllability to meet different business needs and system operating environments.
[0098] According to an embodiment of this application, when performing a ratio adjustment operation on each partition, the current value and its proportion of the current partition are first obtained. For example, the system partition weight is: W sys The file partition is W file The Web section is W web The database partition is W db And satisfy W sys +W file +W web +W db =1. Define a series of operations to adjust the weights of each partition, operation A = [ΔW sys ,ΔW file ,ΔW web ,ΔW sys ,…), where each ΔWi The value range is [-0.1, 0.1], indicating that the maximum adjustment range for each weight is 10%. In this way, the system can gradually optimize the partition weights while ensuring that the adjustment range is reasonable, thereby improving the efficiency and stability of resource allocation.
[0099] According to embodiments of this application, after performing a proportional adjustment operation, target operating information of the target server is obtained, and an additional value corresponding to the proportional adjustment operation is determined using a partitioning algorithm. The additional value has three dimensions: the first dimension is a resource balancing reward, used to evaluate the balance of resource allocation; the second dimension is system response time, used to measure system performance; and the third dimension is a partition usage rationality reward, used to evaluate the rationality of partition configuration. By calculating the change in gain of the additional value relative to the value before the adjustment under the proportional adjustment operation, the impact of the adjustment operation on the system operating state is quantified. This method can provide data support for optimizing partition weights, ensuring that the adjusted partition configuration achieves optimal performance in terms of resource balancing, system performance, and partition rationality.
[0100] According to an embodiment of this application, the above-described proportional adjustment operation is repeated while observing the operating status of the target server. Since each action requires a certain amount of time to execute, the system records the added value gain change after each adjustment. If the gain change exceeds a preset threshold of 10%, the exploration stops, and the current partitioning result is taken as the optimal dynamic partitioning result. If the gain change does not exceed the preset threshold, all possible actions are explored until the number of partition adjustments reaches a preset maximum. Finally, the system selects the action with the largest added value as the action to be executed, thereby determining the optimal dynamic partitioning result. This method, through dynamic adjustment and real-time monitoring, ensures that the partitioning configuration achieves optimal performance in terms of resource balance, system response time, and the rationality of partition usage, while avoiding the impact of excessive adjustments on system stability.
[0101] According to an embodiment of this application, a dynamic partitioning result is obtained by performing a ratio adjustment operation on each of the multiple partitions in the operating system according to their respective preset adjustment ratios. This includes: randomly combining the preset adjustment ratios of the multiple partitions with preset adjustment types to generate an operation vector, wherein the preset adjustment types include an increase type, a maintain type, or a decrease type; and performing a corresponding ratio adjustment operation on each partition based on the operation vector to obtain the dynamic partitioning result.
[0102] According to an embodiment of this application, when performing a scaling operation on each partition, there are currently four partitions W. sys +W file +W web +W dbEach partition has three preset adjustment types: increase, remain unchanged, or decrease. Since increasing one partition requires decreasing another, there are a total of 3 possible adjustments in the case of four partitions. 4 =81 possible action combinations. The preset adjustment ratios and types for each of the multiple partitions are randomly combined to generate an operation vector, for example, [0.05, -0.03, 0.02, 0]. Based on the generated operation vector, the corresponding ratio adjustment operation is performed on each partition to obtain the dynamic partitioning result. This method explores multiple possible adjustment combinations to ensure that the partitioning configuration achieves optimal performance in terms of resource balance, system performance, and partition rationality.
[0103] As shown in Figure 6, another embodiment includes operations S601 to S609.
[0104] In operation S601, attribute information of multiple servers in the target environment is collected. In operation S602, a list of servers to be installed is generated based on the target servers without an operating system installed. In operation S603, the system recommendation model running in the system deployment engine is used to determine the system recommendation type for each target server. In operation S604, based on the system recommendation type, the target partitioning result for each target server is determined.
[0105] In operation S605, the operating system is installed according to the system's recommended type, and the initial partition configuration is completed based on the target partition result. In operation S606, the current partition result is dynamically adjusted. In operation S607, the additional value of the current partition result is calculated. In operation S608, it is determined whether the gain change of the additional value reaches a preset threshold, or whether the number of partition adjustments has reached a preset maximum. In operation S609, the dynamic partition result is output.
[0106] According to embodiments of this application, attribute information of servers in the target environment is collected and a list of servers to be installed is generated, ensuring that the hardware configuration and business requirements of the target servers are accurately identified. A system recommendation model is used to recommend suitable operating system types for the target servers, and the installation of the operating system and initialization of partition configuration are completed in conjunction with the target partitioning results, ensuring the efficiency and accuracy of system deployment. By dynamically adjusting partition configuration and calculating added values, the system can optimize resource allocation, improve resource balance, system response time, and the rationality of partition usage. The system determines the optimal dynamic partitioning result based on the gain change or adjustment number of the added values, thereby ensuring that the target servers achieve optimal resource utilization and performance. This process not only improves the automation level of system deployment but also enhances the stability and adaptability of the system, providing reliable support for business operations.
[0107] According to an embodiment of this application, based on target operating information, an additional value corresponding to a proportional adjustment operation is determined using a partitioning algorithm, including: performing multi-dimensional analysis on the utilization rate of system resources in the target operating information to generate a system operating vector; determining a first additional value based on the standard deviation of multiple component values in the system operating vector; analyzing the component values representing response time in the system operating vector to determine a second additional value; determining a third additional value corresponding to the component value representing partition resource utilization in the system operating vector based on a preset mapping relationship between partition resource utilization and a third additional value; and performing a weighted summation of the first, second, and third additional values to obtain the additional value corresponding to the proportional adjustment operation.
[0108] According to an embodiment of this application, after the system is running stably, the CPU utilization, memory utilization, hard disk load, network bandwidth utilization, and the usage of each partition of the target server are collected. Specifically, the CPU utilization U... CPU = Number of CPU cores used / Total number of CPU cores, Memory utilization (U) mem =Used memory / Total memory size, Disk load D iops = Current hard drive read / write speed / Maximum hard drive read / write speed, network bandwidth utilization U net =Used network bandwidth / Total network bandwidth, usage status of each partition S parti = Partition used space / Total partition space. Based on these metrics, generate a vector S = [U CPU U mem D iops U net ,S part1 ,S part2 ,...,S partn ], and use the vector to calculate the additional value corresponding to the current scaling operation.
[0109] According to the embodiments of this application, the first dimension is a resource balance reward, the purpose of which is to reward the balanced utilization of each resource and avoid the overuse of one resource while other resources are idle. Resource balance is measured by calculating the reciprocal of the standard deviation of the utilization rate of each resource. The smaller the standard deviation, the more balanced the resource utilization and the higher the reward value. The calculation method is shown in formula (3):
[0110] Where m represents the number of component values (i.e., CPU, memory, disk I / O (Input / Output), network), U q U represents the q-th component value. p R represents the average value of each component. b This indicates the first additional value.
[0111] According to the embodiments of this application, the second dimension is the system response time, which is used to calculate the response time of a certain logic segment. The maximum acceptable response time is 500 milliseconds. The shorter the system response time, the better the system performance and the higher the response efficiency. The calculation method is shown in formula (4):
[0112] Among them, R r Indicates the second additional value, T max T represents the maximum acceptable response time. now This represents the component value that characterizes the response time.
[0113] According to embodiments of this application, the third dimension is a reward for the reasonable use of partitions, designed to ensure that the use of each partition is within a reasonable range and to avoid insufficient or wasted partition space. For each partition S parti The reasonable range for partition resource utilization is set as [min, max], where min = 0.1 and max = 0.85. If the current partition resource utilization is within this range, the third additional value is determined as R according to the preset mapping relationship. p =1; if it exceeds this range, the third additional value is determined to be R according to the preset mapping relationship. p =-1. Through batch data analysis, it was found that when the partition utilization rate reaches 0.85, the system performance will significantly decrease. Therefore, by using reward and penalty mechanisms, it is possible to effectively guide the optimization of partition resource utilization, thereby improving the overall system performance and resource utilization efficiency.
[0114] According to an embodiment of this application, after calculating the added value in the three dimensions, the added value corresponding to the scaling operation is calculated. The calculation method is shown in formula (5): R = P b *R b +P r *R r +P p *R p (5)
[0115] Among them, P b P r P p P represents the weights of the three dimensions of added value. b +P r +P p =1. By using weighted summation, the impact of proportional adjustment operations on system resource balance, response time, and the rationality of partition usage can be comprehensively evaluated, thus providing a quantitative basis for optimizing partition configuration.
[0116] According to embodiments of this application, the weights of the first additional value, the second additional value, and the third additional value are dynamically adjusted as follows: When it is determined that multiple component values in the system operating vector are all greater than their respective preset performance standards, the weight of the first additional value is set to the average of the multiple component values, and the weights of the second and third additional values are the average of the target total weight minus the weight of the first additional value; When it is determined that only multiple component values representing computational resource utilization in the system operating vector are greater than their corresponding preset performance standards, the weight of the second additional value is set to the average of the multiple component values representing computational resource utilization, and the weights of the first and third additional values are the average of the target total weight minus the weight of the second additional value; When it is determined that the difference between multiple component values representing partition resource utilization in the system operating vector is less than a preset difference, the weight of the third additional value is set to the target weight, and the weights of the first and second additional values are the average of the target total weight minus the weight of the third additional value; When it is determined that the system operating vector meets the target conditions, the weights of the first, second, and third additional values are all set to the average of the first, second, and third additional values.
[0117] According to embodiments of this application, the weights of the first, second, and third additional values are dynamically adjusted, continuously optimized and adjusted based on the real-time operating status of the target server, dynamic changes in business load, and long-term performance monitoring data. If the target server primarily runs big data analytics services, involving a large number of data read, calculation, and storage operations, resulting in consistently high demands on CPU, memory, and disk I / O resources, and multiple component values in the system operating vector exceed their respective preset performance standards, then the weight of the first additional value will be dynamically adjusted based on the average values of CPU utilization, memory utilization, disk load, and network bandwidth utilization. Specifically, the average value of multiple component values is taken as the weight of the first additional value, while the weights of the other two additional values are half of this weight.
[0118] According to an embodiment of this application, if the utilization rates of the server's central processing unit (CPU) and graph processor (Graph Processor) remain at a high level, and multiple component values representing the utilization rate of computing resources exceed the corresponding preset performance standards, indicating that the server has high requirements for computing response time, then the weight of the second additional value is increased. Specifically, the weight of the second additional value is set to the average value of the CPU and graph processor utilization rates, while the weights of the other two additional values are half of this weight value.
[0119] According to an embodiment of this application, if the utilization rate of each type of server partition is very balanced, and the difference between multiple component values representing partition resource utilization is less than a preset difference, and different partitions store different types of data, then the weight of the third additional value is increased and set to 0.4. This adjustment ensures that the rationality of partition usage has a higher priority in resource allocation, thereby optimizing the utilization efficiency of storage resources and avoiding wasted or insufficient partition space. Meanwhile, the weights of the other two additional values are half of this weight value.
[0120] According to an embodiment of this application, if none of the above conditions are met, it indicates that the system has met the target conditions, and the weights of the first, second, and third additional values are all set to the average of the three. This dynamic weight adjustment mechanism ensures that the system can flexibly balance resource balance, response time, and partition usage rationality under different operating scenarios, thereby adapting to constantly changing business needs and system load, and further improving the overall performance and resource utilization efficiency of the system.
[0121] According to an embodiment of this application, the operating system deployment method further includes: responding to a weight adjustment request sent by a target object, performing a preset range detection on the weight adjustment value in the weight adjustment request; if it is determined that the weight adjustment value meets the preset range, updating the currently dynamically adjusted weight using the weight adjustment value; and ending the dynamic weight adjustment operation.
[0122] According to embodiments of this application, the system supports manual maintenance of weight values by the customer, with the customer-set weight value taking precedence. In response to a weight adjustment request sent by a target object, the system performs a preset range check on the weight adjustment value in the request. The weight percentage for each category must not be lower than 0.1 and not higher than 0.8 to ensure the rationality of weight allocation and system stability. If the weight adjustment value meets the preset range, the system updates the currently dynamically adjusted weights using the weight adjustment value and terminates the dynamic weight adjustment operation. This mechanism ensures both the flexibility of automatic adjustment and provides customers with room for manual optimization, while avoiding overly extreme weight allocation, thus ensuring the system remains efficient and stable under different operating scenarios.
[0123] Based on the above-described operating system deployment method, this application also provides an operating system deployment apparatus. The apparatus will be described in detail below with reference to Figure 7.
[0124] Figure 7 shows a structural block diagram of an operating system deployment apparatus according to an embodiment of this application.
[0125] As shown in Figure 7, the operating system deployment device 700 of this embodiment includes a system recommendation module 710, a partition determination module 720, and a system deployment module 730.
[0126] The system recommendation module 710 is used to input the attribute information of the target server in the target environment into the system recommendation model running in the system deployment engine to obtain the system recommendation type. The target environment is the environment in which the operating system is deployed on the server. The system recommendation model is trained using the attribute information of servers with deployed operating systems in the target environment as reference samples. The target server is connected to the computer on which the system deployment engine is deployed. In one embodiment, the system recommendation module 710 can be used to perform the operation S210 described above, which will not be repeated here.
[0127] The partition determination module 720 is used to determine the target partition result corresponding to the system's recommended type based on the historical deployment information of the system deployment engine. The target partition result is dynamically generated based on the server's system operation information using a partitioning algorithm invoked by the system deployment engine, and is used to divide the server's storage resources. In one embodiment, the partition determination module 720 can be used to perform the operation S220 described above, which will not be repeated here.
[0128] The system deployment module 730 generates a system deployment plan based on the system recommendation type and the target partition result, enabling the target server to complete the installation of the operating system and the initialization of partition configuration based on the system deployment plan. In one embodiment, the system deployment module 730 can be used to perform the operation S230 described above, which will not be repeated here.
[0129] According to embodiments of this application, any multiple modules among the system recommendation module 710, partition determination module 720, and system deployment module 730 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this application, at least one of the system recommendation module 710, partition determination module 720, and system deployment module 730 can be at least partially implemented as hardware circuitry, such as a Field-Programmable Gate Array (FPGA), Programmable Logic Array (PLA), System-on-Chip, System-on-Substrate, System-on-Package, Application-Specific Integrated Circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in a suitable combination of any one or more of these three implementation methods. Alternatively, at least one of the system recommendation module 710, the partition determination module 720, and the system deployment module 730 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0130] It should be noted that the operating system deployment device part in the embodiments of this application corresponds to the operating system deployment method part in the embodiments of this application. The description of the operating system deployment device part is specifically referred to in the operating system deployment method part, and will not be repeated here.
[0131] Figure 8 shows a block diagram of an electronic device suitable for implementing an operating system deployment method according to an embodiment of this application.
[0132] As shown in FIG8, an electronic device 800 according to an embodiment of the present application includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random-access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a central processing unit), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present application.
[0133] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 802 and / or RAM 803. It should be noted that programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in one or more memories.
[0134] According to embodiments of this application, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0135] This application also provides a non-volatile readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The aforementioned non-volatile readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0136] According to embodiments of this application, a non-volatile readable storage medium can be a non-volatile readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a non-volatile readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, a non-volatile readable storage medium can include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0137] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the operating system deployment method provided in the embodiments of this application.
[0138] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0139] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0140] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0141] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0142] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0143] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
[0144] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this application, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.
Claims
1. An operating system deployment method, characterized in that, The method includes: The attribute information of the target server in the target environment is obtained and input into the system recommendation model running in the system deployment engine to obtain the system recommendation type. The target environment is the environment in which the operating system is deployed on the server. The system recommendation model is trained using the attribute information of the server with the operating system deployed in the target environment as a reference sample. The target server is connected to the computer with the system deployment engine deployed. Based on the historical deployment information of the system deployment engine, a target partition result corresponding to the system recommendation type is determined. The target partition result is dynamically generated based on the server's system operation information using the partitioning algorithm called by the system deployment engine. The target partition result is configured to divide the server's storage resources. Based on the system's recommended type and the target partition result, a system deployment plan is generated so that the target server can complete the installation of the operating system and the initialization of partition configuration based on the system deployment plan.
2. The method according to claim 1, characterized in that, The system recommendation model includes a decision layer and an output layer; the attribute information of the target server in the acquired target environment is input into the system recommendation model running in the system deployment engine to obtain the system recommendation type, including: The attribute information of the target server is input into the decision layer for analysis to determine the matching degree between the sub-attributes in the attribute information and the decision nodes in the decision layer. Based on the matching degree, multiple decision nodes are traversed in the decision layer to determine the decision result corresponding to the attribute information; The output layer outputs the system recommendation type corresponding to the decision result.
3. The method according to claim 2, characterized in that, The system recommendation model is trained in the following manner: If the attribute information of the external server obtained from the system deployment engine, which is different from the target environment, meets the predetermined conditions, the attribute information of the reference sample and the external server are divided proportionally to obtain multiple sample datasets. Repeat the following steps until all of the aforementioned sample datasets have been selected as the validation set: One of the multiple sample datasets is selected as the validation set, and the rest are used as the training set; The initial system recommendation model is trained using the training set to obtain the first prediction model; The prediction accuracy of the first prediction model is verified using the validation set to obtain the verification results; If multiple sample datasets are selected as validation sets, the first prediction model whose prediction accuracy reaches a preset value among the multiple validation results is determined as the system recommendation model.
4. The method according to claim 3, characterized in that, The method further includes: The computer's interactive interface displays attribute information of external servers, which are distinct from the target environment and obtained from the system deployment engine; In response to a determination instruction for the attribute information of the external server, it is determined that the attribute information of the external server satisfies the predetermined conditions; In response to a modification instruction for the attribute information of the external server, the system retrieves the attribute information of the external server from the system deployment engine based on the modification information input through the interactive interface, until the retrieved attribute information of the external server meets the predetermined conditions.
5. The method according to claim 3, characterized in that, The step of training the initial system recommendation model using the training set to obtain the first prediction model includes: Based on the type of each sub-attribute of the attribute information in the training set, information gain is determined for the training set to obtain the gain value of the sub-attribute; The multiple gain values are sorted to determine the splitting attribute of the root node in the initial decision tree; The training set is divided into multiple subsets based on the range of values of the multiple attributes of the splitting attribute, wherein the child nodes in the decision tree represent the subsets. For each of the child nodes, repeat the following operations until all the child attributes have been traversed: Determine the gain value of the remaining sub-attributes; redetermine the splitting attributes; and further divide the subset of data based on the redetermined splitting attributes. If it is determined that multiple sub-attributes have been traversed, the resulting target decision tree is used as the decision layer; The decision layer is connected to the output layer to obtain the first prediction model.
6. The method according to claim 5, characterized in that, The step of determining the information gain of the training set based on the type of each sub-attribute of the attribute information in the training set to obtain the gain value of the sub-attribute includes: The training set is divided into multiple sample sets based on the operating system type of each attribute information in the training set. For each of the aforementioned sample sets, the intermediate gain values of multiple sub-attributes in the attribute information are determined respectively; The intermediate gain values of the same sub-attribute in multiple sample sets are summed to obtain the gain value of the sub-attribute.
7. The method according to claim 3, characterized in that, The method further includes: If the prediction accuracy of multiple first prediction models is found to be less than the preset value, the attribute information of the reference sample and the external server is re-divided proportionally to obtain multiple updated datasets. The initial system recommendation model is trained and validated using the multiple updated datasets until the number of validations reaches a preset number, or the prediction accuracy of the trained second prediction model reaches the preset value. If the number of verifications reaches the preset number and the prediction accuracy of the trained second prediction models is less than the preset value, the prediction accuracy of the multiple second prediction models is sorted, and the system recommendation model is determined from the multiple second prediction models according to the sorting results.
8. The method according to claim 7, characterized in that, The method further includes: The prediction accuracy of multiple second prediction models is tested based on preset standard values to obtain the test results; If the detection results indicate that the prediction accuracy of multiple second prediction models is less than the preset standard value, a prompt message is output, wherein the prompt message is configured to prompt the target object to check the reference sample.
9. The method according to claim 1, characterized in that, The step of determining the target partition result corresponding to the system recommendation type based on the historical deployment information of the system deployment engine includes: Based on the mapping relationship between operating system type and partitioning results in the historical deployment information, multiple candidate partitioning results corresponding to the system recommendation type are determined; The partition information of the server with the operating system deployed in the target environment is analyzed to determine the partition matching degree between the partition information and each of the candidate partition results; The target partition result is determined from the candidate partition results based on the size relationship between the multiple partition matching degrees.
10. The method according to claim 9, characterized in that, The step of analyzing the partition information of the server with the operating system deployed in the target environment to determine the partition matching degree between the partition information and each of the candidate partition results includes: Obtain the business operation requirements of multiple servers in the target environment, wherein the business operation requirements include at least one of resource requirements, performance requirements, and fault tolerance requirements; The partition matching degree is determined based on the business matching degree between the multiple candidate partition results and the business operation requirements, and the similarity between the partition information and each candidate partition result.
11. The method according to claim 1, characterized in that, The method further includes: The generated system installation package corresponding to the system deployment scheme is sent to the target server, wherein the target server has a system management component configured to perform information acquisition and information processing installed. Send an operating system installation command to the system management component so that the target server installs an operating system corresponding to the system's recommended type according to the system installation package; Once it is confirmed that the operating system installation is complete, the target partition result in the system deployment scheme is set as the initial partition scheme of the operating system; Send a partition configuration command to the system management component so that the target server performs an initial partition configuration operation on the installed operating system based on the initial partition scheme.
12. The method according to claim 1, characterized in that, The method further includes: Once the deployment of the target server system is confirmed to be complete, repeat the following operations until the gain change of the added value reaches a preset threshold, or the number of partition adjustments reaches a preset number of partitions, and output the dynamic partitioning result: According to the preset adjustment ratio of each of the multiple partitions in the operating system, the ratio adjustment operation is performed on each of the partitions to obtain a dynamic partition result. The ratio adjustment operation includes an increase operation, a maintain operation, or a decrease operation. Based on the target operating information of the target server, the additional value corresponding to the ratio adjustment operation is determined using the partitioning algorithm; Determine the change in the added value relative to the gain before the partition adjustment under the stated scaling operation.
13. The method according to claim 12, characterized in that, The step of performing a ratio adjustment operation on each of the multiple partitions in the operating system according to their respective preset adjustment ratios to obtain a dynamic partitioning result includes: The preset adjustment ratios and preset adjustment types of multiple partitions are randomly combined to generate an operation vector, wherein the preset adjustment types include increase type, maintain type or decrease type; Based on the operation vector, corresponding proportional adjustment operations are performed on each of the partitions to obtain the dynamic partitioning result.
14. The method according to claim 12, characterized in that, The step of determining the additional value corresponding to the ratio adjustment operation based on the target operating information and using the partitioning algorithm includes: A multi-dimensional analysis of the system resource utilization rate in the target operation information is performed to generate a system operation vector; The first additional value is determined based on the standard deviation of multiple component values in the system operation vector; The component values representing response time in the system operation vector are analyzed to determine the second additional value; Based on the preset mapping relationship between partition resource utilization and third additional value, the third additional value corresponding to the component value representing partition resource utilization in the system operation vector is determined; The first, second, and third additional values are weighted and summed to obtain the additional value corresponding to the ratio adjustment operation.
15. The method according to claim 14, characterized in that, The weights of the first additional value, the second additional value, and the third additional value are dynamically adjusted in the following manner: When it is determined that multiple component values in the system operation vector are all greater than their respective preset performance standards, the weight of the first additional value is set as the average of the multiple component values, and the weights of the second additional value and the third additional value are the average values after subtracting the weight of the first additional value from the target total weight. If it is determined that only multiple component values representing the utilization rate of computing resources in the system operation vector are greater than the corresponding preset performance standard, the weight of the second additional value is set as the average value of the multiple component values representing the utilization rate of computing resources, and the weights of the first additional value and the third additional value are the average value after subtracting the weight of the second additional value from the target total weight. If the difference between multiple component values representing the partition resource utilization rate in the system operation vector is less than a preset difference, the weight of the third additional value is set as the target weight, and the weights of the first additional value and the second additional value are the average value after subtracting the weight of the third additional value from the target total weight. If the system operation vector is determined to meet the target conditions, the weights of the first additional value, the second additional value, and the third additional value are all set to the average of the first additional value, the second additional value, and the third additional value.
16. The method according to claim 15, characterized in that, Also includes: In response to a weight adjustment request sent by the target object, a preset range detection is performed on the weight adjustment value in the weight adjustment request; If it is determined that the weight adjustment value meets the preset range, the weight currently being dynamically adjusted is updated using the weight adjustment value; and the dynamic adjustment operation of the weight is terminated.
17. An operating system deployment apparatus, characterized in that, The device includes: The system recommendation module is configured to input the attribute information of the target server in the target environment into the system recommendation model running in the system deployment engine to obtain the system recommendation type. The target environment is the environment in which the operating system is deployed on the server. The system recommendation model is trained using the attribute information of the server with the operating system deployed in the target environment as a reference sample. The target server is connected to the computer on which the system deployment engine is deployed. The partition determination module is configured to determine a target partition result corresponding to the system's recommended type based on the historical deployment information of the system deployment engine. The target partition result is dynamically generated based on the server's system operating information using a partitioning algorithm invoked by the system deployment engine. The target partition result is configured to partition the server's storage resources. The system deployment module is configured to generate a system deployment scheme based on the system recommendation type and the target partition result, so that the target server can complete the installation of the operating system and the initialization of partition configuration based on the system deployment scheme.
18. An electronic device comprising: One or more processors; Memory, configured to store one or more computer programs, The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 16.
19. A non-volatile readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 16.
20. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 16.