Application running environment migration method and device, equipment, medium and product

By automatically creating migration container images and deployment configuration files through application dependency identification models and resource assessment models, the problem of application migration and deployment in existing technologies that cannot guarantee consistency and security is solved, and the automation and security of application migration are achieved.

CN120704878APending Publication Date: 2025-09-26MIGU CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510804464.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing application migration and deployment are mainly done manually, which cannot guarantee consistency and security.

Method used

By obtaining the application resources to be migrated, pre-processing them, and then using the application dependency identification model and resource evaluation and analysis model, the migration container image and deployment configuration file are automatically created to achieve automated migration and deployment of the application.

Benefits of technology

It automates the application migration process, ensures the consistency and security of migration, and reduces the need for manual operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704878A_ABST
    Figure CN120704878A_ABST
Patent Text Reader

Abstract

The invention provides an application running environment migration method and device, equipment, a medium and a product. The method comprises the steps that to-be-migrated application resources are acquired; preprocessing the to-be-migrated application resources to obtain target configuration features and target system resource use data features; analyzing the target configuration feature by adopting an application dependency identification model to obtain a target application dependency relationship, and analyzing the target system resource use data feature by adopting a resource evaluation and analysis model to obtain a target system resource demand; and creating and testing a migration container mirror image and a deployment configuration file according to the target application dependency relationship and the target system resource demand to obtain a deployment test result, and completing application migration according to the deployment test result. According to the method, the configuration information and the required resource information of the to-be-migrated application are obtained through prediction of the pre-training model, and migration and deployment work of the application is automatically completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a method, apparatus, device, medium, and product for migrating an application runtime environment. Background Art

[0002] For the migration and deployment of applications in cloud computing environments, related technologies mainly rely on manual operations, manually obtaining application relationships and deployment configuration files, and then manually migrating and deploying them. These technical solutions are labor-intensive, and manual operations cannot guarantee consistency and security. Summary of the Invention

[0003] Embodiments of the present invention provide a method, apparatus, device, medium, and product for migrating an application runtime environment to solve the problem that existing application migration and deployment are mainly performed manually and cannot guarantee consistency and security.

[0004] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:

[0005] In a first aspect, an embodiment of the present invention provides a method for migrating an application runtime environment, comprising:

[0006] Obtain application resources to be migrated;

[0007] Preprocessing the application resources to be migrated to obtain target configuration characteristics and target system resource usage data characteristics;

[0008] Using an application dependency identification model to analyze the target configuration characteristics to obtain target application dependencies, and using a resource assessment and analysis model to analyze the target system resource usage data characteristics to obtain target system resource requirements;

[0009] Create and test a migration container image and a deployment configuration file according to the target application dependency and the target system resource requirements, obtain a deployment test result, and complete the application migration according to the deployment test result.

[0010] Optionally, also include:

[0011] Training the application dependency identification model specifically includes:

[0012] Obtain sample configuration information from at least one application resource as a first sample application resource to be migrated; the sample configuration information includes at least one of the following: a commonly running process name, a listening port number, a configuration file path, configuration file content characteristics, a log file path, and log content characteristics;

[0013] Preprocessing the sample configuration information to obtain a sample configuration feature, wherein the sample configuration feature includes at least one of the following: a port number, a process name, a configuration file path, a key configuration item, and a log entry;

[0014] defining a first target label for the sample configuration feature based on the actual application dependency;

[0015] Analyzing the sample configuration features using the application dependency identification model to be trained, wherein the application dependency identification model analyzes the sample configuration features using a random forest classification model to identify application dependencies of the sample configuration features, and obtains a first prediction result, where the first prediction result is a predicted application dependency;

[0016] The first prediction result is compared with the first target label to obtain a first comparison result, and the application dependency recognition model to be trained is optimized according to the first comparison result to obtain a trained application dependency recognition model.

[0017] Optionally, also include:

[0018] Training the resource assessment and analysis model includes:

[0019] Obtaining sample system resource usage data of at least one application resource as a second sample application resource to be migrated; the sample system resource usage data includes at least one of the following: CPU usage, memory usage, disk IO, and network traffic;

[0020] Preprocessing the sample system resource usage data to obtain sample system resource usage data features, wherein the sample system resource usage data features include at least one of the following: application name, CPU usage, memory usage, disk I / O, and network traffic;

[0021] defining a second target tag for the sample system resource usage data characteristics based on actual resource requirements of the application;

[0022] Analyzing the sample application resources to be migrated using the resource evaluation and analysis model to be trained, wherein the resource evaluation and analysis model analyzes the sample application resources to be migrated using a random forest regression model to predict system resource requirements to obtain a second prediction result, where the second prediction result is the predicted system resource requirements;

[0023] The second prediction result is compared with the second target label to obtain a second comparison result, and the resource evaluation and analysis model is optimized according to the second comparison result to obtain a trained resource evaluation and analysis model.

[0024] Optionally, creating and testing a migration container image and a deployment configuration file according to the target system resource requirements, obtaining a deployment test result, and completing the application migration according to the deployment test result includes:

[0025] generating an application deployment table according to the target application dependency, the application deployment table including: the application resources to be migrated and their corresponding configuration files and configuration items; building and testing an adapted migration container image according to the target application dependency and the application deployment table, to obtain a first deployment test result;

[0026] Generate a deployment configuration file according to the target application dependency and the target system resource requirements, and perform a stress test by running the deployment configuration file in the migration container image to obtain a second deployment test result;

[0027] The first deployment test result and the second deployment test result are used as deployment test results, and application migration is completed according to the deployment test results.

[0028] Optionally, also include:

[0029] The migration indicators of the application resources to be migrated during the migration process are monitored in real time, where the migration indicators include at least one of the following: resource usage, application performance, and network traffic, and the migration strategy and configuration are dynamically adjusted according to the migration indicators.

[0030] Optionally, after completing the application migration according to the deployment test result, the method further includes:

[0031] Verifying the operating indicators of the application to be migrated to obtain an indicator verification result, wherein the operating indicators include at least one of the following: performance indicators, dependency, and resource usage;

[0032] According to the indicator verification results, the parameters of the application dependency identification model and the resource evaluation and analysis model are optimized.

[0033] In a second aspect, an embodiment of the present invention provides a device for migrating an application runtime environment, comprising:

[0034] The acquisition module is used to obtain application resources to be migrated;

[0035] A preprocessing module, configured to preprocess the application resources to be migrated to obtain target configuration characteristics and target system resource usage data characteristics;

[0036] A first processing module is configured to analyze the target configuration characteristics using an application dependency identification model to obtain target application dependencies, and to analyze the target system resource usage data characteristics using a resource assessment and analysis model to obtain target system resource requirements;

[0037] The second processing module is used to create and test the migration container image and deployment configuration file according to the target application dependency and the target system resource requirements, obtain the deployment test result, and complete the application migration according to the deployment test result.

[0038] Optionally, also include:

[0039] The first model training module is used to train the application dependency identification model, specifically including:

[0040] Obtain sample configuration information from at least one application resource as a first sample application resource to be migrated; the sample configuration information includes at least one of the following: a commonly running process name, a listening port number, a configuration file path, configuration file content characteristics, a log file path, and log content characteristics;

[0041] Preprocessing the sample configuration information to obtain a sample configuration feature, wherein the sample configuration feature includes at least one of the following: a port number, a process name, a configuration file path, a key configuration item, and a log entry;

[0042] defining a first target label for the sample configuration feature based on the actual application dependency;

[0043] Analyzing the sample configuration features using the application dependency identification model to be trained, wherein the application dependency identification model analyzes the sample configuration features using a random forest classification model to identify application dependencies of the sample configuration features, and obtains a first prediction result, where the first prediction result is a predicted application dependency;

[0044] The first prediction result is compared with the first target label to obtain a first comparison result, and the application dependency recognition model to be trained is optimized according to the first comparison result to obtain a trained application dependency recognition model.

[0045] Optionally, also include:

[0046] The second model training module is used to train the resource assessment and analysis model, specifically including:

[0047] Obtaining sample system resource usage data of at least one application resource as a second sample application resource to be migrated; the sample system resource usage data includes at least one of the following: CPU usage, memory usage, disk IO, and network traffic;

[0048] Preprocessing the sample system resource usage data to obtain sample system resource usage data features, wherein the sample system resource usage data features include at least one of the following: application name, CPU usage, memory usage, disk I / O, and network traffic;

[0049] defining a second target tag for the sample system resource usage data characteristics based on actual resource requirements of the application;

[0050] Analyzing the sample application resources to be migrated using the resource evaluation and analysis model to be trained, wherein the resource evaluation and analysis model analyzes the sample application resources to be migrated using a random forest regression model to predict system resource requirements to obtain a second prediction result, where the second prediction result is the predicted system resource requirements;

[0051] The second prediction result is compared with the second target label to obtain a second comparison result, and the resource evaluation and analysis model is optimized according to the second comparison result to obtain a trained resource evaluation and analysis model.

[0052] Optionally, the second processing module includes:

[0053] a first processing submodule, configured to generate an application deployment table based on the target application dependency relationship, the application deployment table including: the application resources to be migrated and their corresponding configuration files and configuration items; and to construct and test an adapted migration container image based on the target application dependency relationship and the application deployment table to obtain a first deployment test result;

[0054] A second processing submodule is configured to generate a deployment configuration file according to the target application dependency and the target system resource requirements, and perform a stress test by running the deployment configuration file in the migration container image to obtain a second deployment test result;

[0055] The third processing submodule is configured to use the first deployment test result and the second deployment test result as deployment test results, and complete application migration according to the deployment test results.

[0056] Optionally, also include:

[0057] The monitoring module is used to monitor the migration indicators of the application resources to be migrated in real time during the migration process. The migration indicators include at least one of the following: resource usage, application performance and network traffic, and dynamically adjust the migration strategy and configuration according to the migration indicators.

[0058] Optionally, after completing the application migration according to the deployment test result, the method further includes:

[0059] An optimization module is used to verify the operating indicators of the application to be migrated and obtain indicator verification results, wherein the operating indicators include at least one of the following: performance indicators, dependencies and resource usage; based on the indicator verification results, the parameters of the application dependency identification model and the resource evaluation and analysis model are optimized.

[0060] In a third aspect, an embodiment of the present invention provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps in the method for migrating an application runtime environment as described in any one of the first aspects.

[0061] In a fourth aspect, an embodiment of the present invention provides a readable storage medium storing a program or instruction, which, when executed by a processor, implements the steps in the method for migrating an application runtime environment as described in any one of the first aspects.

[0062] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps in the method for migrating an application runtime environment as described in any one of the first aspects.

[0063] In the present invention, application resources to be migrated are obtained; the application resources to be migrated are preprocessed to obtain target configuration characteristics and target system resource usage data characteristics; the target configuration characteristics are analyzed using an application dependency identification model to obtain target application dependencies; the target system resource usage data characteristics are analyzed using a resource assessment and analysis model to obtain target system resource requirements; a migration container image and deployment configuration file are created and tested based on the target application dependencies and the target system resource requirements to obtain deployment test results, and application migration is completed based on the deployment test results. In the present invention, the configuration information and required resource information of the application to be migrated are predicted by a pre-trained model, and the migration and deployment of the application are completed automatically, solving the problem that the migration and deployment of existing applications are mainly done manually and cannot guarantee consistency and security. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0065] Figure 1 This is a flow chart of a method for migrating an application runtime environment provided by an embodiment of the present invention;

[0066] Figure 2 This is an overall flow chart of a method for migrating an application runtime environment provided by an embodiment of the present invention;

[0067] Figure 3 This is a schematic structural diagram of a device for migrating an application runtime environment provided by an embodiment of the present invention;

[0068] Figure 4 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort shall fall within the scope of protection of the present invention.

[0070] Please refer to Figure 1 , an embodiment of the present invention provides a method for migrating an application runtime environment, comprising:

[0071] Step 11: Obtain the application resources to be migrated;

[0072] In the embodiment of the present invention, the application runtime environment migration specifically involves migrating from different platforms (such as OpenStack virtual machines, VMware virtual machines, Xen virtual machines or physical machines) to the Kubernetes container management platform; please refer to Figure 2 The application resources to be migrated include at least one of the following: the name of the commonly running process, the listening port number, the path of the configuration file, file content characteristics (such as the value of the key configuration item), the log file path and log content characteristics (such as specific log entries, error information, etc.), CPU usage, memory usage, disk IO, network traffic and other system resource usage data; through detailed evaluation and planning of the application resources to be migrated, ensure that the application can be smoothly run and managed in the Kubernetes environment.

[0073] Step 12: Preprocess the application resources to be migrated to obtain target configuration characteristics and target system resource usage data characteristics;

[0074] In an embodiment of the present invention, the application resources to be migrated are preprocessed, specifically including: removing irrelevant information and outliers, such as invalid ports and abnormal process information, from the configuration information of the application resources to be migrated to ensure the accuracy of subsequent analysis and modeling; extracting features from the configuration information, that is, extracting useful features from the collected data, such as port numbers, process names, configuration file paths, key configuration items, log entries, etc., and by extracting important configuration features, reducing data dimensions, reducing model complexity, and improving model training efficiency and prediction performance; normalizing the configuration information, that is, normalizing the numerical features to make them meet the input requirements of the machine learning algorithm, eliminating the dimensional differences between different features, making the model easier to converge, improving the training effect, and ultimately obtaining the target configuration features; and cleaning the system resource usage data in the application resources to be migrated, that is, removing invalid data and outliers to ensure the accuracy and consistency of the data, and ensuring the accuracy of subsequent analysis and modeling; normalizing the sample system resource usage data to make it meet the input requirements of the machine learning algorithm, eliminating the dimensional differences between different features, making the model easier to converge, improving the training effect, and ultimately obtaining the target system resource usage data features.

[0075] Step 13: Analyze the target configuration characteristics using an application dependency identification model to obtain target application dependencies, and analyze the target system resource usage data characteristics using a resource assessment and analysis model to obtain target system resource requirements;

[0076] In the embodiment of the present invention, please refer to Figure 2 The application dependency identification model analyzes the target configuration features through a random forest classification model to obtain the target application dependency, i.e., the application / configuration list; the resource assessment and analysis model analyzes the target system resource usage data features through a random forest regression model to obtain the target system resource requirements, i.e., resource prediction; the configuration information and required resource information of the application to be migrated are predicted by using a pre-trained model, so as to subsequently automatically complete the application migration and deployment work.

[0077] Step 14: Create and test a migration container image and deployment configuration file based on the target application dependencies and the target system resource requirements, obtain a deployment test result, and complete the application migration based on the deployment test result.

[0078] In an embodiment of the present invention, optionally, creating and testing a migration container image and a deployment configuration file according to the target system resource requirements, obtaining a deployment test result, and completing the application migration according to the deployment test result includes:

[0079] generating an application deployment table according to the target application dependency, the application deployment table including: the application resources to be migrated and their corresponding configuration files and configuration items; building and testing an adapted migration container image according to the target application dependency and the application deployment table, to obtain a first deployment test result;

[0080] Generate a deployment configuration file according to the target application dependency and the target system resource requirements, and perform a stress test by running the deployment configuration file in the migration container image to obtain a second deployment test result;

[0081] The first deployment test result and the second deployment test result are used as deployment test results, and application migration is completed according to the deployment test results.

[0082] In the embodiment of the present invention, please refer to Figure 2 , interpret according to the target application dependency and convert it into an actual application deployment table, in which the application to be migrated and the corresponding configuration files and configuration items are clearly defined; and based on the target application dependency, the application to be migrated and the corresponding configuration are obtained, and the Dockerfile and the obtained application information and configuration files are used to automatically generate an adapted Dockerfile based on the analysis of the application's operating environment and dependency results; build and test the Docker image locally or in a CI / CD environment to ensure that the application in the container can run normally. Create a migration container image that adapts to the application, so that the migration container image can be built and tested in a local environment, and deployment test results are obtained to ensure that it can run normally in the container. At the same time, according to the deployment test results, the application dependency identification model can be manually or automatically corrected and fed back, and the corrected data is fed back to the application dependency identification model for retraining, thereby forming a closed-loop system and continuously optimizing resource evaluation and analysis.

[0083] In an embodiment of the present invention, the target system resource requirements are interpreted and converted into actual resource requirement indicators, such as the number of CPU cores and memory size required; and resources are dynamically allocated on platforms such as Kubernetes based on the target system resource requirements to ensure stable operation of the application, wherein the Horizontal Pod Autoscaler (HPA) or Vertical Pod Autoscaler (VPA) of Kubernetes can be used for automatic resource adjustment, but is not limited to running the generated Kubernetes configuration in a simulation environment, performing stress testing, recording resource usage and performance indicators, and dynamically adjusting resource requests and restriction parameters to ensure optimal performance of the container under different loads; at the same time, the model can be regularly retrained and updated with new data to maintain the accuracy and adaptability of the model. The new data may include new application scenarios, different load patterns, etc.; and the errors in the model prediction are corrected through manual or automated correction and feedback mechanisms, and the corrected data is fed back to the model for retraining, thereby forming a closed-loop system to continuously optimize resource evaluation and analysis.

[0084] In an embodiment of the present invention, application resources to be migrated are obtained; the application resources to be migrated are preprocessed to obtain target configuration characteristics and target system resource usage data characteristics; an application dependency identification model is used to analyze the target configuration characteristics to obtain target application dependencies; a resource assessment and analysis model is used to analyze the target system resource usage data characteristics to obtain target system resource requirements; a migration container image and deployment configuration file are created and tested based on the target application dependencies and the target system resource requirements to obtain deployment test results, and application migration is completed based on the deployment test results. In the present invention, the configuration information and required resource information of the application to be migrated are predicted by a pre-trained model, and the migration and deployment of the application are completed automatically, solving the problem that the migration and deployment of existing applications are mainly done manually and cannot guarantee consistency and security.

[0085] In the embodiment of the present invention, optionally, the method further includes:

[0086] Training the application dependency identification model specifically includes:

[0087] Obtain sample configuration information from at least one application resource as a first sample application resource to be migrated; the sample configuration information includes at least one of the following: a commonly running process name, a listening port number, a configuration file path, configuration file content characteristics, a log file path, and log content characteristics;

[0088] Preprocessing the sample configuration information to obtain a sample configuration feature, wherein the sample configuration feature includes at least one of the following: a port number, a process name, a configuration file path, a key configuration item, and a log entry;

[0089] defining a first target label for the sample configuration feature based on the actual application dependency;

[0090] Analyzing the sample configuration features using the application dependency identification model to be trained, wherein the application dependency identification model analyzes the sample configuration features using a random forest classification model to identify application dependencies of the sample configuration features, and obtains a first prediction result, where the first prediction result is a predicted application dependency;

[0091] The first prediction result is compared with the first target label to obtain a first comparison result, and the application dependency recognition model to be trained is optimized according to the first comparison result to obtain a trained application dependency recognition model.

[0092] In an embodiment of the present invention, the sample configuration information is preprocessed, specifically including: removing irrelevant information and outliers, such as invalid ports, abnormal process information, etc., to ensure the accuracy of subsequent analysis and modeling; performing feature extraction on the sample configuration information, that is, extracting useful features from the collected data, such as port numbers, process names, configuration file paths, key configuration items, log entries, etc., and by extracting important configuration features, reducing data dimensions, reducing model complexity, and improving model training efficiency and prediction performance; performing data standardization on the sample configuration information, that is, standardizing the numerical features to make them meet the input requirements of the machine learning algorithm, eliminating the dimensional differences between different features, making the model easier to converge, and improving the training effect.

[0093] A first target label is defined for the sample configuration feature based on the actual application dependency. For example, application A depends on application B, which can be represented as a binary relationship pair (A, B). By considering the actual application dependency, the target label is defined more accurately, enabling the model to better capture the potential patterns in the data, thereby improving the accuracy of the prediction.

[0094] The application dependency identification model analyzes the sample configuration features through a random forest classification model, specifically including: the random forest classification model is composed of multiple decision trees, and the prediction of the random forest classification model is a majority vote of the prediction results of all trees, wherein the prediction formula of a single decision tree is given an input feature vector x, and the prediction result of decision tree T is T(x); the prediction formula of the random forest is: y=mode({T1(x),T2(x),…,T n (x)}); where T i(x) represents the prediction result of the i-th tree for input x, and mode represents the majority vote. The random forest classification model, by constructing multiple decision trees and performing voting, can effectively prevent overfitting and improve the model's generalization ability. It also provides feature importance scores, which can help identify which configuration features have the greatest impact on application dependencies, thereby providing a basis for subsequent feature selection and optimization. Furthermore, because the random forest decision trees are constructed independently, they can be easily computed in parallel, thereby speeding up model training. Finally, the trained application dependency identification model is saved as the dependency_analysis_model.joblib file and loaded from the dependency_analysis_model.joblib file.

[0095] In the embodiment of the present invention, optionally, the method further includes:

[0096] Training the resource assessment and analysis model includes:

[0097] Obtaining sample system resource usage data of at least one application resource as a second sample application resource to be migrated; the sample system resource usage data includes at least one of the following: CPU usage, memory usage, disk IO, and network traffic;

[0098] Preprocessing the sample system resource usage data to obtain sample system resource usage data features, wherein the sample system resource usage data features include at least one of the following: application name, CPU usage, memory usage, disk I / O, and network traffic;

[0099] defining a second target tag for the sample system resource usage data characteristics based on actual resource requirements of the application;

[0100] Analyzing the sample application resources to be migrated using the resource evaluation and analysis model to be trained, wherein the resource evaluation and analysis model analyzes the sample application resources to be migrated using a random forest regression model to predict system resource requirements to obtain a second prediction result, where the second prediction result is the predicted system resource requirements;

[0101] The second prediction result is compared with the second target label to obtain a second comparison result, and the resource evaluation and analysis model is optimized according to the second comparison result to obtain a trained resource evaluation and analysis model.

[0102] In the embodiment of the present invention, the sample system resource usage data is preprocessed, specifically including: data cleaning of the sample system resource usage data, i.e., removing invalid data and outliers to ensure the accuracy and consistency of the data and the accuracy of subsequent analysis and modeling; data standardization of the sample system resource usage data, i.e., Where x is the original data, μ is the mean, and σ is the standard deviation. By standardizing the numerical features to meet the input requirements of the machine learning algorithm, the dimensional differences between different features are eliminated, making the model easier to converge and improving the training effect.

[0103] Define labels based on application resource requirements. For example, the amount of resources required by application A under high load. By considering application resource requirements and defining target labels more accurately, the model can better capture the potential patterns in the data, thereby improving prediction accuracy.

[0104] The resource assessment and analysis model analyzes the resource characteristics of the sample system through a random forest regression model. Specifically, the random forest regression model consists of multiple decision trees, and the model prediction is the average of the prediction results of all trees. The prediction formula of a single decision tree: Given an input feature vector x, the prediction result of decision tree T is T(x). The prediction formula of the random forest regression model is: Where Ti(x) represents the prediction result of the i-th tree for input x. The random forest regression model is highly robust to noise and outliers, maintaining good performance even in the presence of outliers in the data. It can also effectively process high-dimensional feature data and is suitable for situations with a large number of system resource features, from which important information can be extracted. Because the decision trees of the random forest are constructed independently, they can be easily parallelized, thereby accelerating model training. Finally, the trained resource assessment and analysis model is saved in the joblib library as resource_assessment_model.joblib and loaded from the file resource_assessment_model.joblib.

[0105] In the embodiment of the present invention, optionally, the method further includes:

[0106] The migration indicators of the application resources to be migrated during the migration process are monitored in real time, where the migration indicators include at least one of the following: resource usage, application performance, and network traffic, and the migration strategy and configuration are dynamically adjusted according to the migration indicators.

[0107] In the embodiment of the present invention, please refer to Figure 2, monitor various indicators in the migration process in real time, such as resource usage, application performance, network traffic, etc., so as to dynamically adjust the migration strategy and configuration to ensure the smooth progress of the migration process; and you can set up monitoring tools within Kubernetes, such as Prometheus and Grafana, to monitor application performance in real time, use artificial intelligence (AI) models to analyze monitoring data in real time, identify potential performance bottlenecks and abnormal resource usage, provide intelligent early warnings and solutions, and prevent possible problems in advance; and you can feed back monitoring data and optimization results to the AI ​​model for continuous learning and optimization, dynamically adjust resource configuration and application strategies, and ensure the long-term stability and efficient operation of the system.

[0108] In the embodiment of the present invention, optionally, after completing the application migration according to the deployment test result, the method further includes:

[0109] Verifying the operating indicators of the application to be migrated to obtain an indicator verification result, wherein the operating indicators include at least one of the following: performance indicators, dependency, and resource usage;

[0110] According to the indicator verification results, the parameters of the application dependency identification model and the resource evaluation and analysis model are optimized.

[0111] In an embodiment of the present invention, after the migration is completed, the operating status of the application is verified, including performance indicators, dependencies, resource usage and other aspects, so as to make necessary configuration adjustments and optimizations based on the verification results, and feed back to the application dependency identification model and the resource evaluation and analysis model, and continuously optimize the parameters of the application dependency identification model and the resource evaluation and analysis model to ensure stability and efficiency after migration.

[0112] Please refer to Figure 3 , an embodiment of the present invention provides a device for migrating an application runtime environment, comprising:

[0113] An acquisition module 31 is used to acquire application resources to be migrated;

[0114] A pre-processing module 32 is used to pre-process the application resources to be migrated to obtain target configuration characteristics and target system resource usage data characteristics;

[0115] A first processing module 33 is configured to analyze the target configuration characteristics using an application dependency identification model to obtain target application dependencies, and to analyze the target system resource usage data characteristics using a resource assessment and analysis model to obtain target system resource requirements;

[0116] The second processing module 34 is used to create and test the migration container image and deployment configuration file according to the target application dependency and the target system resource requirements, obtain a deployment test result, and complete the application migration according to the deployment test result.

[0117] In the embodiment of the present invention, optionally, the method further includes:

[0118] The first model training module is used to train the application dependency identification model, specifically including:

[0119] Obtain sample configuration information from at least one application resource as a first sample application resource to be migrated; the sample configuration information includes at least one of the following: a commonly running process name, a listening port number, a configuration file path, configuration file content characteristics, a log file path, and log content characteristics;

[0120] Preprocessing the sample configuration information to obtain a sample configuration feature, wherein the sample configuration feature includes at least one of the following: a port number, a process name, a configuration file path, a key configuration item, and a log entry;

[0121] defining a first target label for the sample configuration feature based on the actual application dependency;

[0122] Analyzing the sample configuration features using the application dependency identification model to be trained, wherein the application dependency identification model analyzes the sample configuration features using a random forest classification model to identify application dependencies of the sample configuration features, and obtains a first prediction result, where the first prediction result is a predicted application dependency;

[0123] The first prediction result is compared with the first target label to obtain a first comparison result, and the application dependency recognition model to be trained is optimized according to the first comparison result to obtain a trained application dependency recognition model.

[0124] In the embodiment of the present invention, optionally, the method further includes:

[0125] The second model training module is used to train the resource assessment and analysis model, specifically including:

[0126] Obtaining sample system resource usage data of at least one application resource as a second sample application resource to be migrated; the sample system resource usage data includes at least one of the following: CPU usage, memory usage, disk IO, and network traffic;

[0127] Preprocessing the sample system resource usage data to obtain sample system resource usage data features, wherein the sample system resource usage data features include at least one of the following: application name, CPU usage, memory usage, disk I / O, and network traffic;

[0128] defining a second target tag for the sample system resource usage data characteristics based on actual resource requirements of the application;

[0129] Analyzing the sample application resources to be migrated using the resource evaluation and analysis model to be trained, wherein the resource evaluation and analysis model analyzes the sample application resources to be migrated using a random forest regression model to predict system resource requirements to obtain a second prediction result, where the second prediction result is the predicted system resource requirements;

[0130] The second prediction result is compared with the second target label to obtain a second comparison result, and the resource evaluation and analysis model is optimized according to the second comparison result to obtain a trained resource evaluation and analysis model.

[0131] In the embodiment of the present invention, optionally, the second processing module includes:

[0132] a first processing submodule, configured to generate an application deployment table based on the target application dependency relationship, the application deployment table including: the application resources to be migrated and their corresponding configuration files and configuration items; and to construct and test an adapted migration container image based on the target application dependency relationship and the application deployment table to obtain a first deployment test result;

[0133] A second processing submodule is configured to generate a deployment configuration file according to the target application dependency and the target system resource requirements, and perform a stress test by running the deployment configuration file in the migration container image to obtain a second deployment test result;

[0134] The third processing submodule is configured to use the first deployment test result and the second deployment test result as deployment test results, and complete application migration according to the deployment test results.

[0135] In the embodiment of the present invention, optionally, the method further includes:

[0136] The monitoring module is used to monitor the migration indicators of the application resources to be migrated in real time during the migration process. The migration indicators include at least one of the following: resource usage, application performance and network traffic, and dynamically adjust the migration strategy and configuration according to the migration indicators.

[0137] In the embodiment of the present invention, optionally, after completing the application migration according to the deployment test result, the method further includes:

[0138] An optimization module is used to verify the operating indicators of the application to be migrated and obtain indicator verification results, wherein the operating indicators include at least one of the following: performance indicators, dependencies and resource usage; based on the indicator verification results, the parameters of the application dependency identification model and the resource evaluation and analysis model are optimized.

[0139] The device for migrating the application running environment provided by the embodiment of the present invention can realize Figure 1 The various processes implemented by the method embodiment achieve the same technical effect and are not described here again to avoid repetition.

[0140] An embodiment of the present invention provides an electronic device 40, see Figure 4 As shown, Figure 4 This is a principle block diagram of an electronic device 40 according to an embodiment of the present invention, including a processor 41, a memory 42, and a program or instruction stored in the memory 42 and executable on the processor 41. When the program or instruction is executed by the processor, the steps in the method for migrating any application runtime environment of the present invention are implemented.

[0141] An embodiment of the present invention provides a readable storage medium, which stores programs or instructions. When the programs or instructions are executed by a processor, the various processes of the embodiments of the method for migrating the application runtime environment such as any of the above-mentioned items are implemented, and the same technical effects can be achieved. To avoid repetition, they will not be described here.

[0142] The present application also provides a computer program product including computer instructions, which, when executed by a processor, implement the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and to avoid repetition, they will not be described here.

[0143] Computer-readable media includes both permanent and non-permanent, removable and non-removable media, and can be implemented using any method or technology for information storage. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0144] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solutions disclosed herein comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken with respect to user personal information to prevent unauthorized access to user personal information data and maintain the security of user personal information and network security.

[0145] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0146] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a service classification device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0148] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for migrating an application runtime environment, characterized in that: include: Obtain application resources to be migrated; Preprocessing the application resources to be migrated to obtain target configuration characteristics and target system resource usage data characteristics; Using an application dependency identification model to analyze the target configuration characteristics to obtain target application dependencies, and using a resource assessment and analysis model to analyze the target system resource usage data characteristics to obtain target system resource requirements; Create and test a migration container image and a deployment configuration file according to the target application dependency and the target system resource requirements, obtain a deployment test result, and complete the application migration according to the deployment test result.

2. The method for migrating an application runtime environment according to claim 1, wherein: Also includes: Training the application dependency identification model specifically includes: Obtaining sample configuration information from at least one application resource as a first sample application resource to be migrated; the sample configuration information includes at least one of the following: a commonly running process name, a listening port number, a configuration file path, configuration file content characteristics, a log file path, and log content characteristics; Preprocessing the sample configuration information to obtain a sample configuration feature, wherein the sample configuration feature includes at least one of the following: a port number, a process name, a configuration file path, a key configuration item, and a log entry; defining a first target label for the sample configuration feature based on the actual application dependency; Analyzing the sample configuration features using the application dependency identification model to be trained, wherein the application dependency identification model analyzes the sample configuration features using a random forest classification model to identify application dependencies of the sample configuration features, and obtains a first prediction result, where the first prediction result is a predicted application dependency; The first prediction result is compared with the first target label to obtain a first comparison result, and the application dependency recognition model to be trained is optimized according to the first comparison result to obtain a trained application dependency recognition model.

3. The method for migrating an application runtime environment according to claim 1, wherein: Also includes: Training the resource assessment and analysis model includes: Obtaining sample system resource usage data of at least one application resource as a second sample application resource to be migrated; the sample system resource usage data includes at least one of the following: CPU usage, memory usage, disk IO, and network traffic; Preprocessing the sample system resource usage data to obtain sample system resource usage data features, wherein the sample system resource usage data features include at least one of the following: application name, CPU usage, memory usage, disk I / O, and network traffic; defining a second target tag for the sample system resource usage data characteristics based on actual resource requirements of the application; Analyzing the sample application resources to be migrated using the resource evaluation and analysis model to be trained, wherein the resource evaluation and analysis model analyzes the sample application resources to be migrated using a random forest regression model to predict system resource requirements to obtain a second prediction result, where the second prediction result is the predicted system resource requirements; The second prediction result is compared with the second target label to obtain a second comparison result, and the resource evaluation and analysis model is optimized according to the second comparison result to obtain a trained resource evaluation and analysis model.

4. The method for migrating an application runtime environment according to claim 1, wherein: The step of creating and testing a migration container image and a deployment configuration file according to the target system resource requirements, obtaining a deployment test result, and completing the application migration according to the deployment test result includes: generating an application deployment table according to the target application dependency, the application deployment table including: the application resources to be migrated and their corresponding configuration files and configuration items; building and testing an adapted migration container image according to the target application dependency and the application deployment table, to obtain a first deployment test result; Generate a deployment configuration file according to the target application dependency and the target system resource requirements, and perform a stress test by running the deployment configuration file in the migration container image to obtain a second deployment test result; The first deployment test result and the second deployment test result are used as deployment test results, and application migration is completed according to the deployment test results.

5. The method for migrating an application runtime environment according to claim 1, wherein: Also includes: The migration indicators of the application resources to be migrated during the migration process are monitored in real time, where the migration indicators include at least one of the following: resource usage, application performance, and network traffic, and the migration strategy and configuration are dynamically adjusted according to the migration indicators.

6. The method for migrating an application runtime environment according to claim 1, wherein: After completing the application migration according to the deployment test result, the method further includes: Verifying the operating indicators of the application to be migrated to obtain an indicator verification result, wherein the operating indicators include at least one of the following: performance indicators, dependency, and resource usage; According to the indicator verification results, the parameters of the application dependency identification model and the resource evaluation and analysis model are optimized.

7. A device for migrating an application runtime environment, characterized in that: include: The acquisition module is used to obtain application resources to be migrated; A preprocessing module, configured to preprocess the application resources to be migrated to obtain target configuration characteristics and target system resource usage data characteristics; A first processing module is configured to analyze the target configuration characteristics using an application dependency identification model to obtain target application dependencies, and to analyze the target system resource usage data characteristics using a resource assessment and analysis model to obtain target system resource requirements; The second processing module is used to create and test the migration container image and deployment configuration file according to the target application dependency and the target system resource requirements, obtain the deployment test result, and complete the application migration according to the deployment test result.

8. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps in the method for migrating an application runtime environment as described in any one of claims 1 to 6.

9. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps in the method for migrating the application execution environment according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps in the method for migrating an application execution environment as claimed in any one of claims 1 to 6.