Software deployment compatibility prediction method and system based on LightGBM algorithm

By employing a two-stage classification architecture based on the LightGBM algorithm and sample balancing, the imbalance and fuzzy boundary problems in the compatibility prediction of industrial software deployment in the printing machinery industry are solved, improving the deployment success rate and prediction accuracy, reducing operation and maintenance costs, and promoting the intelligentization process of the printing industry.

CN121501299APending Publication Date: 2026-02-10XIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511628089.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

In the printing machinery industry, the deployment compatibility prediction of industrial software suffers from problems such as extremely unbalanced category distribution, strong ambiguity of sample boundaries, and high-dimensional heterogeneity of environmental parameters, leading to deployment failures and increased debugging costs. There is a lack of systematic and automated prediction mechanisms.

Method used

A two-stage classification architecture based on the LightGBM algorithm is adopted. Through sample balancing and weight allocation, a full training set with sample weights is constructed. The first classifier is trained to learn the global mapping relationship, and a sample set with ambiguous boundaries is selected. Then, the second classifier is trained for fine discrimination. The reasons for identification failure are analyzed in combination with feature importance analysis.

Benefits of technology

It significantly improved deployment success rate and prediction accuracy, reduced operation and maintenance costs, and realized the transformation from relying on human experience to data-driven intelligent prediction, thereby improving the efficiency and stability of industrial software deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121501299A_ABST
    Figure CN121501299A_ABST
Patent Text Reader

Abstract

The invention discloses a software deployment compatibility prediction method and system based on a LightGBM algorithm, and belongs to the technical field of data analysis. The method comprises the following steps: acquiring environmental parameters of a historical deployment task and a dichotomy deployment result; performing sample balance and weight distribution processing on the data to construct a full-amount training set; based on the training set, a two-stage LightGBM architecture is adopted to train a prediction model, a first classifier learns a global mapping relation and outputs an initial prediction probability, and after a boundary fuzzy sample set is screened out according to the initial prediction probability, a second classifier learns fine feature differences of the boundary fuzzy sample set so as to determine a final prediction result. According to the method, the problem of unbalanced category distribution is solved through cooperation of SMOTE oversampling and sample weight adjustment, the discrimination capability of boundary fuzzy samples is enhanced by using a two-stage classification mechanism, and the defect of low prediction accuracy of a traditional method in a complex heterogeneous industrial environment is effectively overcome; and the compatibility evaluation automation level and the prediction reliability before the printing industry software deployment are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data analysis technology, specifically to a software deployment compatibility prediction method and system based on the LightGBM algorithm. Background Technology

[0002] As a crucial component of advanced manufacturing, the printing machinery industry is undergoing a critical transformation from traditional production models to a deep integration with intelligent manufacturing systems. Industrial software plays a core role in this transformation, encompassing intelligent control, process optimization, equipment collaboration, and data-driven decision-making. Its deployment efficiency and stability directly impact a company's production continuity, customization capabilities, and system integration efficiency. However, in practical industrial applications, due to the complex production environment of printing equipment and significant differences in operating systems and hardware platforms, the deployment compatibility of industrial software in different target environments is difficult to guarantee, often resulting in deployment failures, functional anomalies, and dependency conflicts. This not only prolongs deployment cycles and increases debugging costs but also severely restricts the rapid delivery and large-scale application of industrial software. Currently, deployment compatibility assessments largely rely on expert experience or static configuration rules, lacking systematic and automated predictive mechanisms, making it difficult to cope with the increasingly complex and heterogeneous deployment environments in industrial settings. With the development of data-driven technologies, machine learning-based methods are gradually becoming an important means to improve the intelligence level of software deployment. However, several problems still exist in the actual scenarios of the printing industry: (1) Extremely imbalanced class distribution: Due to the significantly larger number of successful deployment samples than failed samples in actual deployment tasks, the training data exhibits a severe imbalanced distribution, which can easily lead to bias in traditional classification models and affect prediction accuracy. (2) Strong ambiguity of sample boundaries: The boundaries between different deployment results are unclear, and some failed deployment samples may be highly similar to successful samples in some environmental parameters, resulting in poor sample separability and a decrease in the model's discriminative ability. (3) High-dimensional heterogeneity of environmental parameters: Deployment environment parameters come from a wide range of sources, covering multiple dimensions such as operating system, hardware resources, and dependent component versions. They have high-dimensionality, strong heterogeneity, and dynamic change characteristics, which increases the difficulty of modeling.

[0003] Therefore, there is an urgent need to develop an intelligent prediction method that can effectively handle class imbalance, boundary ambiguity, and feature complexity, so as to achieve accurate modeling and automated evaluation of industrial software deployment compatibility, thereby improving deployment success rate, reducing operation and maintenance costs, and promoting the sustainable development of intelligentization in the printing industry. Summary of the Invention

[0004] To address the problems of low accuracy in predicting the deployment compatibility of industrial software in complex and ever-changing printing manufacturing environments, insufficient learning of minority class failure samples, and strong ambiguity in sample boundaries in existing technologies, this invention provides a software deployment compatibility prediction method based on the LightGBM algorithm. This method enables accurate modeling and automated evaluation of the deployment compatibility of industrial software, thereby improving the deployment success rate, reducing operation and maintenance costs, and promoting the sustainable development of the intelligent process in the printing industry.

[0005] This invention is achieved through the following technical solution: A software deployment compatibility prediction method based on the LightGBM algorithm includes the following steps: Step 1: Obtain historical deployment task data of the software. The historical deployment task data includes a set of environmental parameters and deployment results. The deployment results are labels indicating whether the deployment was successful or failed. Step 2: Perform sample balancing and weight allocation on the historical deployment task data to construct a full training set with sample weights; Step 3: Based on the full training set, train a deployment compatibility prediction model based on the two-stage LightGBM architecture. The training process is as follows: A loss function is constructed based on sample weights, and the first classifier is trained to learn the global mapping relationship between environmental parameters and deployment results, and outputs the initial prediction probability. Based on the initial predicted probabilities, a set of samples with fuzzy boundaries is selected to form a fine classification training set; Using the same loss function, a second classifier is trained on the fine classification training set to learn the subtle feature differences of samples with blurred boundaries, and the final prediction result is determined accordingly.

[0006] Preferably, in step 2, the sample balancing and weight allocation process includes: Expand the minority class samples in the historical deployment task data to balance the distribution of sample classes; Based on a weighting strategy that is inversely proportional to the number of samples in each category, different training weights are assigned to each sample in different categories in the expanded historical deployment task data to obtain the full training set.

[0007] Preferably, the expansion of minority class samples in the historical deployment task data includes: For each minority class sample, a sample is randomly selected from its k nearest neighbors in the feature space of that class. A new synthetic sample is generated by performing random linear interpolation on the connection between the sample and its selected neighbors, and the synthetic sample is assigned the same minority class label as its source sample. The generated synthetic samples are added to the historical deployment task data until the predetermined category balance target is reached.

[0008] Preferably, in step 3, the construction of the objective function based on sample weights specifically includes: A weighted logarithmic loss function is constructed as the loss function, and the expression of the loss function is:

[0009] in, w i It is the training weight of each sample. y i It is the first i Individual sample labels It is the first stage. m Trees To predict the probability of successful deployment, Ω(.) is a regularization term for each tree structure.

[0010] Preferably, in step 3, the step of selecting the boundary fuzzy sample set based on the initial predicted probability specifically involves: A probability boundary interval is defined, and samples whose initial predicted probabilities fall within the probability boundary interval are selected as a boundary-fuzzy sample set.

[0011] Preferably, in step 3, determining the final prediction result specifically includes: For a sample to be predicted, obtain the first predicted probability output by the first classifier; If the first predicted probability does not fall within the probability boundary interval, it is taken as the final prediction result; If the first predicted probability falls within the probability boundary interval, then the second predicted probability output by the second classifier is obtained and used as the final prediction result.

[0012] Preferably, after step 3, the method further includes: When the prediction result indicates deployment failure, feature importance analysis is performed based on the trained LightGBM model to identify the key environmental parameters that led to the prediction failure, and the top K features in terms of importance are output as risk warning parameters.

[0013] Preferably, prior to step 1, a step of preprocessing the historical deployment task data is included, wherein the preprocessing includes at least one of the following operations: Impute missing values ​​in the data; Numerical encoding of categorical features; Normalize the numerical features.

[0014] A software deployment compatibility prediction system based on the LightGBM algorithm includes: The data acquisition module is used to acquire historical deployment task data of the software. The historical deployment task data includes a set of environmental parameters and deployment results. The deployment results are tags indicating whether the deployment was successful or failed. The data balancing and weight allocation module is used to balance and weight the historical deployment task data to build a full training set with sample weights. The training module is used to train a deployment compatibility prediction model based on the two-stage LightGBM architecture using the full training set. The training process is as follows: A loss function is constructed based on sample weights, and the first classifier is trained to learn the global mapping relationship between environmental parameters and deployment results, and outputs the initial prediction probability. Based on the initial predicted probabilities, a set of samples with fuzzy boundaries is selected to form a fine classification training set; Using the same loss function, a second classifier is trained on the fine classification training set to learn the subtle feature differences of samples with blurred boundaries, and the final prediction result is determined accordingly.

[0015] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the software deployment compatibility prediction method based on the LightGBM algorithm.

[0016] Compared with the prior art, the present invention has the following beneficial technical effects: The software deployment compatibility prediction method based on the LightGBM algorithm provided in this application firstly addresses the severe imbalance in class distribution caused by the prevalent phenomenon of "far more successful deployment samples than failed samples" in industrial field data through sample balancing and weight allocation. This dual approach, from both the data level and the loss function level, ensures the model's learning ability for minority class (deployment failure) samples, avoiding bias in model prediction. More importantly, a two-stage LightGBM classification architecture is designed. A first classifier performs preliminary learning and filtering of global mapping relationships, and then a second classifier is specifically trained for fine-tuning the discrimination of ambiguous samples identified as falling within the classification probability boundary. This mechanism, combining "coarse screening" and "fine-tuning," significantly improves the model's ability to distinguish between "ambiguous boundary" samples with similar parameters but vastly different results in the deployment environment. The entire solution closely addresses the practical challenges of complex software deployment environments and high-dimensional, heterogeneous parameters. It not only achieves a shift from relying on human experience to data-driven intelligent prediction, but also effectively improves the accuracy and practicality of predictions within a general machine learning framework through targeted model structure design, providing reliable technical support for improving the success rate and efficiency of industrial software deployment.

[0017] This application also proposes a software deployment compatibility prediction system based on the LightGBM algorithm, an electronic device, and a computer storage medium, which possess all the advantages of the aforementioned software deployment compatibility prediction method based on the LightGBM algorithm. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This invention provides a framework for the software deployment compatibility prediction method. Figure 2 This is a simplified structural diagram of the industrial software deployment compatibility prediction model of the present invention. Figure 3 Diagram of the software deployment compatibility prediction system of this invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0021] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0022] Example 1 See Figures 1 to 2 This embodiment uses the deployment of printing industry software as an example for illustration. The method for predicting the compatibility of printing industry software deployment includes the following steps: Step 1: Obtain historical deployment task data of the printing industry software. The historical deployment task data includes environmental parameter sets and deployment results.

[0023] Specifically, historical deployment task data of printing industry software is obtained through at least one of the following methods: system logs, deployment tool output logs, database records, and manual records; the data includes: environmental parameters and deployment results.

[0024] Environment parameters characterize the configuration and status of the target deployment environment, including: operating system type, operating system version, CPU model, CPU architecture, number of CPU cores, memory size, disk type, available disk space, GPU model, GPU memory size, network connection status, database type, database version, installed dependent software names, installed dependent software versions, middleware type, middleware version, deployment method, running container name, running container version, glibc component version, main programming language names, .NET version, main programming language versions, environment variables, system package manager type, key dependency package names and their version information, and deployment task execution time.

[0025] The deployment result serves as a label for supervised learning, representing binary data indicating whether the corresponding historical deployment task ultimately succeeded or failed. The deployment result is either successful or failed.

[0026] Step 2: Preprocess historical deployment task data to build a compatibility dataset for printing industry software deployment; The preprocessing of the historical deployment task data includes at least one of data cleaning, feature encoding and transformation, and data standardization.

[0027] The preprocessing described in this embodiment includes the following steps: 1) Data cleaning: Filling in missing values ​​in the data and identifying and handling outliers; Missing values ​​in the collected environmental parameters and deployment results are filled in. Numerical fields are filled with the default value "0", categorical fields are filled with the mode, and if there is no mode, "Unknown" is used as the default value. Numerical data that deviates significantly from the normal range are identified as outliers according to the set threshold and deleted.

[0028] 2) Feature encoding and transformation: Numerical encoding of categorical features and normalization or standardization of numerical features; Categorical data is uniformly digitized using one-hot encoding; numerical data is scaled using a min-max normalization method; and time fields are uniformly converted to the standard timestamp format "year / month / day / hour". The minimum-maximum normalization formula is as follows:

[0029] in, These are normalized eigenvalues. It is the minimum value of this feature. It is the maximum value of this feature. These are the original feature values.

[0030] 3) Data standardization: unify data format, units, and field naming to form a feature vector with a consistent structure; All field names, data formats, and units are standardized to ensure consistency in field meaning and form across different samples; historical deployment task data is sorted and aligned according to task number. 4) Dataset construction: Associate the processed feature vectors with the corresponding deployment result labels to construct a structured dataset for supervised learning.

[0031] The processed data is organized into a structured dataset for subsequent model training and compatibility prediction.

[0032] Step 3: Expand the minority class samples in the compatibility dataset to balance the distribution of sample classes and solve the problem of extreme imbalance in the distribution of training data classes. The purpose is to increase the number and proportion of minority class samples in the training set by artificially synthesizing minority class samples (e.g., samples that failed to be deployed, which can also be understood as negative class samples), thereby avoiding the classification model from being overly biased towards the majority class (samples that were successfully deployed) and improving the model's ability to identify minority class samples.

[0033] This embodiment uses the SMOTE data augmentation method to augment minority class samples, as detailed below: 1) Let the preprocessed training dataset be:

[0034] in, D orig It is the original training set. It is the first i Feature vector of each deployment task sample y i It is the first i Each sample label (1 represents successful deployment as a positive class, and 0 represents failed deployment as a negative class). d It is a dimensional feature. N This represents the total number of samples after cleaning.

[0035] 2) Set the hyperparameters of the SMOTE process, including the number of nearest neighbors. k And the desired oversampling factor.

[0036] First, from the original training set D orig All minority class samples were identified, forming a minority class sample set. S min .

[0037] Secondly, for any negative class sample in the minority class sample set x∈R d In the feature space, calculate the sample x With minority class sample set S min Find the Euclidean distance of all other minority class samples in the sample. k Given the nearest neighbors, randomly select a neighbor from its k-neighborhood. x i NN The new negative class samples are generated as follows:

[0038] in, λ The random sampling coefficients in the interval [0,1] It is a newly synthesized negative class sample. d It is the sample dimension.

[0039] Then, the new negative class samples are assigned the same labels as the original minority class samples.

[0040] Finally, repeat the above process until a sufficient number of synthetic samples are generated for each minority class sample, so that the number of minority class samples and majority class samples reach a predetermined ratio (e.g., close to 1:1). Add the new negative class samples to the original training set to obtain the enhanced training set.

[0041] The enhanced training set is as follows:

[0042] in, D aug It is an enhanced training set. D orig It is the original training set. It represents a synthetic sample and its corresponding label.

[0043] By introducing the aforementioned SMOTE data augmentation technique, the inherent class imbalance problem in software deployment data in the printing industry can be effectively alleviated at the data level. This method not only simply increases the number of minority class samples, but more importantly, it expands the density of minority class samples near the decision boundary by "creating" new samples in the feature space that are reasonably located within the original minority class sample distribution area. This lays a solid data foundation for subsequently training an unbiased, high-precision LightGBM classification model.

[0044] Step 4: Based on the weight allocation strategy of inverse proportion of the number of samples in each category, assign different training weights to each sample of different categories in the augmented training set to obtain the full training set.

[0045] By incorporating training weights into the loss function of the LightGBM model, the model is guided to pay more attention to minority class samples (deployment failure samples) during training, thereby further correcting any potential classification biases in the model.

[0046] definition To enhance the training set of positive class samples (deployment successful, label y) i The number of (=1).

[0047] definition To enhance the training set of negative class samples (deployment failed, label y) i The number of (=0).

[0048] After SMOTE enhancement While the importance of class weights has increased significantly, to ensure the model fully learns the complex patterns of the minority classes, they still need to be given higher importance in the loss function. LightGBM introduces class weights, defined as follows:

[0049] in, wi It is the training weight of each sample. N 0 represents the number of negative class samples. N 1 represents the number of positive class samples. y i It is the first i Each sample label (a sample is considered positive if it equals 1, and positive if it equals 0).

[0050] By introducing the aforementioned sample weight adjustment mechanism, the LightGBM model's learning orientation towards minority class (deployment failure) samples is strengthened from the root of loss function optimization. This synergizes effectively with the aforementioned SMOTE enhancement technique, which balances data at the data level: SMOTE broadens the decision boundary by increasing the "quantity" of minority class samples, while sample weight adjustment deepens the model's feature mining by assigning higher "importance" to minority class samples. Together, they ensure that the final trained prediction model maintains excellent discriminative ability and generalization performance when facing highly imbalanced industrial deployment data.

[0051] Step 5: Train the constructed LightGBM-based prediction model using the full training set. The trained model is then used to predict deployment results. The training method is as follows: Using the objective function as the target, a coarse classifier of the LightGBM classification model is trained using the full training set to learn the global mapping relationship between environmental parameters and deployment results, and to obtain the initial prediction probability for each training sample. Based on a preset probability boundary threshold, samples with blurred boundaries whose predicted probabilities fall within the probability boundary threshold range are selected from the training set to form a fine classification training set.

[0052] The fine classifier is trained using a fine-classification training set to learn how to make refined distinctions on this batch of high-difficulty samples, and outputs the positive class probability of the sample in the second stage. This refers to the probability of successful deployment.

[0053] S5.1 The LightGBM classification model uses the full training set to train the first-stage model, i.e., the coarse classifier, as shown in the following expression:

[0054] in, It is the first stage. m Trees M 1. Number of trees in the first stage σ (.) is the Sigmoid function. This represents the predicted probability of successful deployment.

[0055] Sample-based training weights w iConstruct a loss function for a coarse classifier, which is a weighted log loss, aiming to achieve optimal classification performance at the global level.

[0056]

[0057] in, w i It is the training weight of each sample. y i It is the first i Individual sample labels It is the first stage. m Trees To predict the probability of successful deployment, Ω(.) is a regularization term for each tree structure.

[0058] This coarse classifier learns a mapping function that maps a sample feature vector to the probability that it belongs to the positive class (successful deployment). The output deployment success probability is obtained by integrating multiple decision trees and transforming them using the Sigmoid function. The calculation formula is as follows:

[0059] S5.2 Compare the probability of successful deployment with the probability boundary threshold; When the probability of successful deployment exceeds the threshold range of this probability boundary, the probability of successful deployment is taken as the final prediction result; When the probability of successful deployment is within the set probability boundary threshold range, fuzzy boundary samples whose probability of successful deployment falls within the uncertainty interval are selected from the full training set to form a fine classification training set.

[0060] S5.3. Train the fine classifier using the fine classifier training set to learn how to make refined judgments on this batch of high-difficulty samples, and output the probability of successful deployment of the samples. .

[0061] During training, the fine classifier is also trained using a weighted log loss function, but its learning focus is entirely on the feature patterns of samples in the boundary region.

[0062] Specifically, Falling within the uncertain interval [ t - δ,t + δ The sample set U Feed into the fine classifier:

[0063] in, It is the second phase. m Trees M 2. Number of trees in the second stage σ (.) is the Sigmoid function. This represents the predicted probability of successful deployment.

[0064] The loss function for constructing the refined classifier based on the training weights of the samples is as follows:

[0065] in, w i It is the training weight of each sample. y i It is the first i Individual sample labels It is the second phase. m Trees To predict the probability of successful deployment, Ω(.) is a regularization term for each tree structure.

[0066] S5.4, Probability of successful deployment Perform binary classification to determine the final prediction result.

[0067] For each sample to be predicted x First, the predicted probability is given by the first-stage model. If it falls within the boundary interval, the second-stage model will make the final judgment, and the prediction probability is defined as follows:

[0068] in, It is the predicted probability of final deployment success. It is a coarse classifier for the samples x The predicted probability (rough assessment) It is a fine classifier for samples x Predicted probability (precise judgment) t This is the center threshold for probability judgment, usually set to 0.5. It is half the width of the gray area.

[0069] A binary classification decision is made based on a threshold (default 0.5), and the deployment compatibility prediction label is output:

[0070] in, It is the model on the sample x The final binary classification output label (equal to 1 predicts successful deployment, equal to 0 predicts failed deployment). This is the predicted probability of successful deployment.

[0071] Step 6: If the prediction result indicates deployment failure, perform feature importance analysis based on the trained LightGBM model to identify the key environmental parameters that led to the sample being judged as a failure. Through information gain calculation, select the top K features as risk warning parameters for the current deployment failure sample to assist users in analyzing the reasons for the failure. The specific calculation is as follows:

[0072] in, M all It is the total number of LightGBM decision trees used in the entire model. S m,i It is the first m In a tree, use features x i The set of all nodes to be split gain m,n It is the first m The first of the trees n The information gain that comes from splitting individual nodes.

[0073] Step 7: Preprocess the test samples according to the method in Step 2, and input the preprocessed test samples into the trained LightGBM model to obtain the deployment prediction results.

[0074] After receiving the target runtime environment parameters for the newly deployed task, data preprocessing is performed, including field standardization, missing value imputation, category encoding, and numerical normalization. The processed environment parameters are concatenated into a structured feature vector, which serves as the model input and can be represented as follows:

[0075] in, x It is to concatenate them into structured feature vectors. x (n) It is the nth parameter. softwareID It is the ID number of the corresponding software.

[0076] This prediction method effectively addresses the issues of reliance on manual experience and low automation levels in compatibility assessment during software deployment in the printing industry. It not only improves the ability to identify successfully deployed samples under conditions of extreme class imbalance, but also enhances the model's adaptability and generalization ability to high-dimensional heterogeneous features in complex deployment environments by refining the processing of samples with blurred boundaries. This allows for accurate assessment of software compatibility with the target operating environment before deployment, guiding customized packaging and script generation, thereby significantly improving deployment success rate and efficiency, and facilitating the intelligent and efficient implementation of industrial software in the printing machinery industry.

[0077] Correspondingly, see Figure 3This application also provides a software deployment compatibility prediction system based on the LightGBM algorithm, comprising: The data acquisition module is used to acquire historical deployment task data of the software. The historical deployment task data includes a set of environmental parameters and deployment results. The deployment results are tags indicating whether the deployment was successful or failed. The data balancing and weight allocation module is used to balance and weight the historical deployment task data to build a full training set with sample weights. The training module is used to train a deployment compatibility prediction model based on the two-stage LightGBM architecture using the full training set. The training process is as follows: A loss function is constructed based on sample weights, and the first classifier is trained to learn the global mapping relationship between environmental parameters and deployment results, and outputs the initial prediction probability. Based on the initial predicted probabilities, a set of samples with fuzzy boundaries is selected to form a fine classification training set; Using the same loss function, a second classifier is trained on the fine classification training set to learn the subtle feature differences of samples with blurred boundaries, and the final prediction result is determined accordingly.

[0078] It should be noted that, in the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another device, or some features may be ignored or not executed. The modules described as separate components may or may not be physically separated. The components shown as modules may be one or more physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs.

[0079] Furthermore, in the various embodiments of the present invention, the modules can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The integrated unit described above can be implemented in hardware or as a software functional unit.

[0080] An electronic device provided in this application includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the software deployment compatibility prediction method based on the LightGBM algorithm as described in any of the above embodiments.

[0081] Another electronic device provided in this application embodiment may further include: an input port connected to a processor for transmitting multimodal data collected by an external acquisition device to the processor; a display unit connected to the processor for displaying the processor's processing results to the outside world; and a communication module connected to the processor for enabling communication between the electronic device and the outside world. The display unit may be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module includes, but is not limited to, Mobile High Definition Link (HML), Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), and wireless connection (including Wi-Fi, Bluetooth, Bluetooth Low Energy, and IEEE 802.11s-based communication technology).

[0082] This application provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the steps of the software deployment compatibility prediction method based on the LightGBM algorithm described in any of the above embodiments.

[0083] For descriptions of relevant parts of the software deployment compatibility prediction system, electronic device, and computer-readable storage medium based on the LightGBM algorithm provided in this application, please refer to the detailed descriptions of the corresponding parts in the software deployment compatibility prediction method based on the LightGBM algorithm provided in this application, which will not be repeated here. Furthermore, parts of the technical solutions provided in this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.

[0084] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. A software deployment compatibility prediction method based on the LightGBM algorithm, characterized in that, Includes the following steps: Step 1: Obtain historical deployment task data of the software. The historical deployment task data includes a set of environmental parameters and deployment results. The deployment results are labels indicating whether the deployment was successful or failed. Step 2: Perform sample balancing and weight allocation on the historical deployment task data to construct a full training set with sample weights; Step 3: Based on the full training set, train a deployment compatibility prediction model based on the two-stage LightGBM architecture. The training process is as follows: A loss function is constructed based on sample weights, and the first classifier is trained to learn the global mapping relationship between environmental parameters and deployment results, and outputs the initial prediction probability. Based on the initial predicted probabilities, a set of samples with fuzzy boundaries is selected to form a fine classification training set; Using the same loss function, a second classifier is trained on the fine classification training set to learn the subtle feature differences of samples with blurred boundaries, and the final prediction result is determined accordingly.

2. The software deployment compatibility prediction method based on the LightGBM algorithm according to claim 1, characterized in that, Step 2, the sample balancing and weight allocation process includes: Expand the minority class samples in the historical deployment task data to balance the distribution of sample classes; Based on a weighting strategy that is inversely proportional to the number of samples in each category, different training weights are assigned to each sample in different categories in the expanded historical deployment task data to obtain the full training set.

3. The software deployment compatibility prediction method based on the LightGBM algorithm according to claim 2, characterized in that, The expansion of minority class samples in historical deployment task data includes: For each minority class sample, a sample is randomly selected from its k nearest neighbors in the feature space of that class. A new synthetic sample is generated by performing random linear interpolation on the connection between the sample and its selected neighbors, and the synthetic sample is assigned the same minority class label as its source sample. The generated synthetic samples are added to the historical deployment task data until the predetermined category balance target is reached.

4. The software deployment compatibility prediction method based on the LightGBM algorithm according to claim 1, characterized in that, In step 3, the construction of the objective function based on sample weights specifically involves: A weighted logarithmic loss function is constructed as the loss function, and the expression of the loss function is: in, w i It is the training weight of each sample. y i It is the first i Individual sample labels It is the first stage. m Trees To predict the probability of successful deployment, Ω(.) is a regularization term for each tree structure.

5. The software deployment compatibility prediction method based on the LightGBM algorithm according to claim 1, characterized in that, In step 3, the step of selecting the boundary fuzzy sample set based on the initial predicted probability specifically involves: A probability boundary interval is defined, and samples whose initial predicted probabilities fall within the probability boundary interval are selected as a boundary-fuzzy sample set.

6. The software deployment compatibility prediction method based on the LightGBM algorithm according to claim 5, characterized in that, Step 3, determining the final prediction result accordingly, specifically includes: For a sample to be predicted, obtain the first predicted probability output by the first classifier; If the first predicted probability does not fall within the probability boundary interval, it is taken as the final prediction result; If the first predicted probability falls within the probability boundary interval, then the second predicted probability output by the second classifier is obtained and used as the final prediction result.

7. The software deployment compatibility prediction method based on the LightGBM algorithm according to claim 5, characterized in that, Following step 3, the following is also included: When the prediction result indicates deployment failure, feature importance analysis is performed based on the trained LightGBM model to identify the key environmental parameters that led to the prediction failure, and the top K features in terms of importance are output as risk warning parameters.

8. The software deployment compatibility prediction method based on the LightGBM algorithm according to claim 1, characterized in that, Prior to step 1, a step of preprocessing the historical deployment task data is included, wherein the preprocessing includes at least one of the following operations: Impute missing values ​​in the data; Numerical encoding of categorical features; Normalize the numerical features.

9. A software deployment compatibility prediction system based on the LightGBM algorithm, characterized in that, include: The data acquisition module is used to acquire historical deployment task data of the software. The historical deployment task data includes a set of environmental parameters and deployment results. The deployment results are tags indicating whether the deployment was successful or failed. The data balancing and weight allocation module is used to balance and weight the historical deployment task data to build a full training set with sample weights. The training module is used to train a deployment compatibility prediction model based on the two-stage LightGBM architecture using the full training set. The training process is as follows: A loss function is constructed based on sample weights, and the first classifier is trained to learn the global mapping relationship between environmental parameters and deployment results, and outputs the initial prediction probability. Based on the initial predicted probabilities, a set of samples with fuzzy boundaries is selected to form a fine classification training set; Using the same loss function, a second classifier is trained on the fine classification training set to learn the subtle feature differences of samples with blurred boundaries, and the final prediction result is determined accordingly.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 8.