Heterogeneous environment prediction model training and deployment method and system

By building an integrated development environment and data service center based on distributed storage and microservice architecture, the problems of high development difficulty, low efficiency and inconsistent management in the model training and deployment process are solved, and efficient, secure and widespread model deployment and management for AI applications are realized.

CN121957827APending Publication Date: 2026-05-01DONGFANG ELECTRONICS CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202610424859.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-02
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing model training and deployment methods suffer from high development difficulty, low deployment efficiency, and lack of unified management of multiple versions. In particular, in power systems, the development environment for AI applications is complex to configure, the model and inference environment are strongly coupled, and the API service capabilities are weak, making it difficult to manage and call them in a unified manner.

Method used

An integrated development environment is built using a distributed storage and microservice architecture approach. It employs containerization technology and a multi-layered Docker image strategy, integrates machine learning and deep learning frameworks, supports visual drag-and-drop programming, unifies the storage and management of training models, and enables API service development and review through a data service center, thereby achieving customized model services and cross-regional deployment.

Benefits of technology

It reduces development difficulty, improves deployment efficiency, realizes unified management of multiple version models and secure and controllable end-to-end management, supports "train once, run anywhere", and promotes the transformation of AI applications from laboratory prototypes to large-scale industrial applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121957827A_ABST
    Figure CN121957827A_ABST
Patent Text Reader

Abstract

The invention discloses a heterogeneous environment prediction model training and deployment method and system, and relates to the field of prediction model training. In order to overcome the defects that an existing model training and deployment method is large in development difficulty, low in deployment efficiency and lack of unified management of multiple versions, an integrated development environment and an integrated development framework are used, and multiple pre-training models and operators are built in; carrying out data preprocessing and exclusive model building, obtaining training data to carry out model training, and generating a training model; all training models are arranged in a model center for unified management; aPI service development is carried out, a unified model algorithm reasoning framework is adopted, self-defined service development is carried out, and self-defined AI service is generated; the AI service is audited and published to be online, and the online AI service is used by an external application; based on distributed task scheduling and service arrangement, AI services are scheduled and run on a service running platform. The method is mainly used for establishing the prediction model for the heterogeneous environment.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for training and deploying a heterogeneous environment prediction model Technical Field

[0001] This invention relates to the field of predictive model training, and in particular to a method for training and deploying predictive models in heterogeneous environments based on distributed storage and microservice architecture. Background Technology

[0002] With the widespread application of artificial intelligence technology in power systems, more and more power R&D personnel are investing in the development and application of algorithm models. Algorithm models in power system AI applications mainly consist of two parts: model training and model inference. The training process requires setting up a development environment and using different machine learning frameworks to load different algorithms for model training. The inference process requires deploying the model and importing inference data into it for further prediction or inference. Currently, the following problems exist in the model training and deployment process: 1. R&D personnel need to spend a lot of time configuring the AI ​​application development environment and resolving dependency conflicts between various development frameworks or third-party libraries. Furthermore, the pure code mode increases the difficulty of development, is slow to learn, has a high development threshold, and is inefficient.

[0003] 2. The current model is tightly coupled with the inference environment. Different production environments use different architectures and dependency libraries, which makes it difficult to deploy AI applications on bare metal. In addition, there are many model versions and a lack of unified management.

[0004] 3. The API service capabilities are weak, the interfaces between different models are not uniform, it is difficult for callers to make calls, and there is a lack of unified scheduling and access control, making it impossible to carry out secure and controllable management of the entire AI service chain.

[0005] Therefore, there is a need for a method for training and deploying heterogeneous environment prediction models based on distributed storage and microservice architecture that can reduce development difficulty, improve deployment efficiency, and facilitate the management of multiple versions. Summary of the Invention

[0006] The purpose of this invention is to address the shortcomings of existing model training and deployment methods, such as high development difficulty, low deployment efficiency, and lack of unified management for multiple versions. It provides a heterogeneous environment prediction model training and deployment method based on distributed storage and microservice architecture that can reduce development difficulty, improve deployment efficiency, and facilitate the management of multiple versions.

[0007] The present invention discloses a method for training and deploying a predictive model in a heterogeneous environment, comprising the following steps: S1. Using an integrated development environment, a pre-built development framework integrating machine learning and deep learning is integrated into the development environment, with multiple pre-trained models and operators built in; S2. Data preprocessing and dedicated model building are performed in the integrated development environment, training data is obtained from distributed storage for model training, and a training model is generated after training is completed; S3. All training models are placed in a model center for unified management and stored in distributed storage, wherein the model center is used for version management and classification display of training models; S4. API service development is performed in a data service center, using a unified model algorithm inference framework, obtaining training models from distributed storage, developing custom services, and generating custom AI services; S5. The AI ​​services are reviewed and released online through the data service center, and the AI ​​services after being released are used by external applications; S6. Based on distributed task scheduling and service orchestration, the AI ​​services are scheduled and run on the service runtime platform.

[0008] Furthermore, in S1, the integrated development environment is built based on containerization technology and adopts a multi-layered Docker image strategy, including a basic environment layer, an AI framework layer, an operator layer, an extension layer, and a configuration layer. The basic environment layer includes an operating system base image and a runtime environment, providing underlying system support and resource scheduling capabilities to ensure the stable operation of the development environment. The AI ​​framework layer integrates machine learning and deep learning frameworks to provide diverse algorithm support for model development. The operator layer pre-configures basic operators and domain-specific operators, which can be used through drag-and-drop, thereby improving model building efficiency. The extension layer is used to dynamically load domain-specific operator packages and supports user-defined operators and third-party plugin integration. The configuration layer is used to set operator registry and environment variables to achieve automatic operator discovery and registration.

[0009] Further: In S1, the pre-configuration process of the integrated development environment includes: S11, basic environment construction stage; integrating the base image; creating an isolated dedicated environment and specifying the basic runtime environment version; S12, AI framework integration stage; installing the GPU technology stack, CUDA toolkit, and deep learning framework in an integrated manner; integrating the scientific computing ecosystem and installing the Python basic library package; S13, visual programming environment integration; installing the Jupyter Lab development environment; integrating the Visual Python visual programming plugin; S14, environment optimization and startup configuration; integrating the resource awareness module for environment optimization; setting the working directory and permissions, and generating and locking the environment configuration file.

[0010] Furthermore, S1 also includes a visual programming plugin, which is used to convert the user's drag-and-drop operations in the visual interface into executable code in real time, supports seamless switching between visual and code editing modes, and displays the operators to the user in the form of visual components based on the mapping relationship between operator IDs and code templates.

[0011] Furthermore: In S2, the training data used in the model training process is read from distributed storage, and the trained model is saved in a standard format and uploaded to distributed storage.

[0012] Furthermore, in S5, the specific process of reviewing and launching all services through the data service center includes: submitting a service release application, along with a service description, API service documentation, and test report; the data service center conducts a multi-dimensional review upon receiving the application; and after the review is passed, the service image is automatically deployed to the running cluster and registered with the unified service gateway.

[0013] The deployment system for implementing the heterogeneous environment prediction model training and deployment method of the present invention includes a development environment, a data processing module, a model center, distributed storage, a data service center, and a service operation platform; the development environment is used to provide an integrated Jupyter... The Lab containerized environment comes pre-installed with an AI development framework and basic and domain-specific operators, supporting both visual drag-and-drop programming and code editing modes. The data processing module cleans, transforms, and performs feature engineering on input data to improve data quality and model training effectiveness. The model center centrally manages trained models. The distributed storage adopts a distributed object storage architecture to uniformly store raw data, preprocessed data, training model files, and their metadata during model training. The data service center manages the entire lifecycle of AI services. During service development, based on a unified model algorithm inference framework, it supports pulling training models from distributed storage for custom service development, generating diverse AI services. In the service review phase, a multi-dimensional review mechanism is established to verify the completeness of service functions, interface standardization, performance indicators, and security. After approval, the service image is automatically deployed to a running cluster and registered with a unified service gateway, and routing rules, rate limiting policies, circuit breakers, and authentication measures are configured to ensure stable and secure service operation. The service operation platform supports the infrastructure environment for the actual operation of AI services and can automatically configure and optimize the service operation environment according to different hardware architectures and deployment scenarios.

[0014] Furthermore: the hardware resource comprehensive scoring formula for the resource awareness module of the environment optimization in the development environment is as follows: ;in, It is a comprehensive score of hardware resources. , , These are all weighting coefficients. This refers to the actual number of CPU cores on the server. This is the baseline number of cores for the server. It refers to the GPU's single-precision floating-point arithmetic capability. This is the GPU's benchmark floating-point computing power. It refers to the host machine's memory size. This is the base memory size.

[0015] Furthermore: In the resource-aware module for environment optimization, the dynamic calculation formula for Jupyter's maximum concurrency is as follows: ;in, It is the maximum number of concurrent sessions. This is the default concurrency level; It is the task type coefficient.

[0016] The beneficial effects of this invention are: This invention proposes a method for training and deploying a predictive model in a heterogeneous environment based on distributed storage and microservice architecture, which solves the dilemma of "difficult to develop, difficult to deploy, and difficult to manage" AI applications, promotes the efficient and stable transformation of AI from "laboratory prototypes" to "large-scale industrial applications", and realizes the management of the entire life cycle of AI applications from development to deployment.

[0017] This invention constructs an integrated Jupyter Lab development environment, pre-installed with mainstream AI development frameworks such as TensorFlow (an end-to-end open-source machine learning platform), PyTorch (an open-source deep learning framework for machine learning and deep learning), and Scikit-learn (a free software machine learning library for the Python programming language), and innovatively integrates a Visual Python plugin. The development environment is ready to use out of the box and supports both visual drag-and-drop programming and code development modes, significantly lowering the barrier to algorithm development and enabling simpler and faster model building.

[0018] This invention is based on a distributed object storage architecture to build a unified model algorithm inference framework, realize "cloud-edge collaboration" model lifecycle management, support cross-regional deployment of online training and offline inference, ensure consistent flow of model data through a unified storage interface, realize agile AI implementation of "train once, run anywhere", and make model deployment and use smoother and more widespread.

[0019] This invention is based on a standardized service governance system of a data middle platform, which builds intelligent scheduling and automated orchestration capabilities for predictive services. It realizes standardized service calls through a unified API gateway and ensures full-link security and controllability by relying on the access control mechanism of the service gateway, making model operation and management safer and more efficient. Attached Figure Description

[0020] Figure 1 is a logical framework diagram of the deployment system for the training and deployment method of heterogeneous environment prediction model; Figure 2 is a general flowchart of the deployment system for the training and deployment method of heterogeneous environment prediction model; Figure 3 is a comparison diagram of the predicted results and the actual results of meteorological data of a certain city. In Figure 3, the horizontal axis represents the sampling points (sampled according to the preset time period, so it is dimensionless), and the vertical axis represents the mapped value of the predicted load (the unit of the predicted load before mapping is KW, and this figure is dimensionless). Detailed Implementation

[0021] The following are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. The embodiments described below are only for explaining the present invention and should not be construed as limiting the present invention. The scope of protection of the present invention should be determined by the scope of the claims. The embodiments of the present invention are described in detail below. In order to facilitate the description of the present invention and simplify the description, the technical terms used in the specification of the present invention should be interpreted broadly, including but not limited to conventional alternatives not mentioned in this application, and including both direct and indirect implementation methods.

[0022] Example 1, in conjunction with Figures 1 and 2, illustrates this embodiment, which discloses a method for training and deploying a prediction model in a heterogeneous environment. The specific steps are as follows: S1, Using an integrated development environment, a pre-built machine learning and deep learning fusion development framework is integrated into the development environment, with multiple pre-trained models and operators built-in. In this step, the Jupyter Lab development environment built based on containerization technology is used. This environment integrates mainstream machine learning and deep learning development frameworks (such as TensorFlow, PyTorch, Scikit-learn, PaddlePaddle, etc.), with multiple pre-trained models and operators built-in (such as classification, clustering, regression, dimensionality reduction, prediction, etc.), and supports a visual drag-and-drop development mode. A unified, out-of-the-box containerized development environment (integrated Jupyter Lab) is adopted, with all frameworks and dependencies pre-built, eliminating "configuration hell" and providing the development environment as a ready-to-use service, greatly reducing the entry threshold and ensuring environment consistency.

[0023] An integrated development environment is built based on containerization technology, employing a multi-layered Docker image strategy, comprising a base environment layer, an AI framework layer, an operator layer, an extension layer, and a configuration layer. The base environment layer includes an operating system base image and a runtime environment, containing an operator runtime engine to provide underlying system support and resource scheduling capabilities, ensuring stable operation of the development environment. During the base environment layer construction phase: a pre-integrated scientific computing environment base image is selected, avoiding the complex process of installing Python and package managers from a bare operating system; isolated dedicated development environments are created to achieve environment isolation and avoid package conflicts. The AI ​​framework layer integrates machine learning and deep learning frameworks to provide diverse algorithmic support for model development; mainstream AI development frameworks such as TensorFlow, PyTorch, Scikit-learn, and PaddlePaddle are installed in the AI ​​framework layer. During the AI ​​framework layer integration phase: core AI frameworks and machine learning toolkits are installed, supplementing the current operator ecosystem packages and tools to handle complex binary computations. The system is designed to be dependency-free; the operator layer contains a rich set of basic operators and domain-specific operators. After installing the core operator library and its dependencies, they can be directly dragged and dropped to improve model building efficiency; it includes built-in machine learning and deep learning algorithm operators for classification, clustering, regression, dimensionality reduction, prediction, etc.; the built-in model operators include mainstream TensorFlow deep learning development framework, mainstream PyTorch deep learning development framework, Scikit-learn machine learning library; domestic PaddlePaddle deep learning development framework, machine learning-based classification algorithms such as neural networks, logistic algorithms, etc.; machine learning-based clustering algorithms such as k-Means, DBSCAN, etc.; machine learning-based regression algorithms such as linear regression, ridge regression, etc.; machine learning-based dimensionality reduction algorithms such as PCA dimensionality reduction, etc.; machine learning-based prediction algorithms such as neural networks, random forests, etc.; mainstream deep learning algorithms such as BERT, ELMO, GPT, etc.; and user-defined operators.

[0024] The extension layer is used to dynamically load domain-specific operator packages, supporting user-defined operators and third-party plugin access to meet personalized development needs; the configuration layer sets up the operator registry and environment variables to achieve automatic operator discovery and registration, and is responsible for the parameter configuration, dependency management and version control of the development environment, thereby enabling flexible customization and rapid deployment of the environment.

[0025] In S1, the pre-configuration process of the integrated development environment includes: S11, basic environment construction stage; integrating the base image; creating an isolated dedicated environment and specifying the basic runtime environment version; S12, AI framework integration stage; integrated installation of the GPU technology stack (such as installing the CUDA toolkit and deep learning framework); integration of the scientific computing ecosystem (such as installing Python basic library packages); S13, visual programming environment integration; installing the Jupyter Lab development environment; integrating the Visual Python visual programming plugin; realizing customized installation and configuration of the visual programming plugin, and one-stop development toolchain integration; S14, environment optimization and startup configuration; integrating the resource awareness module for environment optimization; setting the working directory and permissions, and generating and locking the environment configuration file.

[0026] S2. Data preprocessing and model building are performed in the development environment. Training data is retrieved from distributed storage for model training. After training, the trained model is generated, saved in a standard format (such as PKL format), and uploaded back to distributed storage. Low-code tools such as Visual Python are integrated to automatically generate code. This lowers the barrier to AI development, serving not only experienced algorithm engineers but also empowering domain experts (such as power industry experts) to build prototypes and improve development efficiency.

[0027] It also includes a visual programming plugin, which is used to convert the user's drag-and-drop operations in the visual interface into executable code in real time. It supports seamless switching between visual and code editing modes, and displays operators to the user in the form of visual components based on the mapping relationship between operator IDs and code templates.

[0028] S3. All training models are managed by a unified model center, with backend storage in distributed storage. The model center can manage and categorize the training models. The training models and their metadata (such as version, performance, and creator) are centrally stored, versioned, and categorized. This achieves centralized asset management and full lifecycle traceability of models, laying the foundation for "train once, run anywhere".

[0029] S4. API service development is conducted in the data service center, employing a unified model algorithm inference framework. Training models are retrieved from distributed storage, and custom services are developed to generate custom AI services, such as load prediction services, achieving separate deployment of training and inference. Through this unified framework, training models are stored in a central repository, and the inference service, as an independent microservice, pulls training models from the central repository to run. The training models, as independent assets, can be deployed to any environment supporting this inference framework, such as the cloud or edge, achieving physical separation of training and inference, thus completely decoupling them. Calls are made through a unified API service gateway, which is responsible for routing, authentication, rate limiting, monitoring, and access control. By providing a unified service entry point, fine-grained management and security protection of the AI ​​service call chain are achieved.

[0030] S5. The service is reviewed and released online through the data service center. After being launched, the service can be used by external applications. The specific process is as follows: First, the developers submit a service release application, which must include a detailed service description, complete API service documentation, and a comprehensive test report to ensure the completeness and accuracy of the service information. After receiving the application, the data service center organizes professional personnel to conduct a multi-dimensional review of the service, covering the completeness of service functions, the standardization of API interfaces, whether performance indicators meet standards, and security. After the review is approved, the system will automatically deploy the service image to the running cluster and complete the registration process on the unified service gateway. Subsequently, according to the actual application requirements, service routing rules are configured to achieve accurate request forwarding, reasonable rate limiting policies are set to prevent service overload, circuit breaking mechanisms are deployed to ensure system stability, and authentication measures are enabled to ensure the security of service access, finally completing the official launch of the service.

[0031] S6, based on distributed task scheduling and service orchestration, schedules AI services and runs them on the service runtime platform. This platform supports multi-environment adaptation and can flexibly deploy AI services to cloud servers, edge computing nodes, or local terminal devices according to different hardware resources and business needs, achieving dynamic allocation of computing resources and efficient task execution. Simultaneously, by monitoring the service's operational status in real time, including key indicators such as resource utilization, response time, and error rate, and combining this with preset elastic scaling strategies, it automatically expands capacity when the service load is too high to ensure service stability, and releases redundant resources to reduce costs when the load is low, thus forming a closed-loop service management mechanism.

[0032] When a user runs a load forecasting service, and the user or application needs to use existing indicator data for load forecasting, they can call a standardized access interface. Data access can be achieved through API service calls and access control via a service gateway, ultimately obtaining the load data after model inference.

[0033] Example 2 describes this example in conjunction with Example 1. This example provides a detailed explanation of the implementation logic of the resource perception module for environment optimization described in S14.

[0034] This module automatically identifies parameters such as the number of CPU cores, GPU model, and memory size through the server hardware information collection interface, and dynamically adjusts the environment configuration based on the comprehensive hardware resource score (such as automatically enabling CUDA compilation optimization and adjusting the maximum concurrency of Jupyter) to maximize resource utilization.

[0035] The resource awareness module for environment optimization in S14 is implemented as follows: A resource awareness optimization module is introduced, which automatically identifies parameters such as the number of CPU cores, GPU model, and memory size through the server hardware information collection interface, and dynamically adjusts the environment configuration: automatically enables CUDA compilation optimization and adjusts the maximum concurrency of Jupyter; the core of this module is to calculate the optimal environment configuration parameters based on hardware resource parameters to maximize resource utilization.

[0036] 1. Hardware resource comprehensive scoring formula ( This is used to quantify server hardware capabilities, serving as the core basis for subsequent configuration adjustments. ;in, It is a comprehensive score of hardware resources, dimensionless, with higher scores indicating stronger hardware performance.

[0037] The weighting coefficients can be dynamically adjusted according to the task type. Testing has shown that the optimal parameters are currently set during training. During reasoning ; This refers to the actual number of CPU cores on the server. This is the baseline number of cores for the server; currently, it's set to 64 cores. This is the GPU's single-precision floating-point performance, measured in TFLOPS. If there is no GPU, the value is 0. This is the GPU's benchmark floating-point computing power, currently set at 200 TFLOPS; This refers to the host machine's memory size, in GB. 1. Base memory size, currently set at 128GB; 2. Dynamic calculation of Jupyter's maximum concurrency ( Based on hardware rating and task type, automatically calculate the maximum number of concurrent sessions allowed by Jupyter (a web-based interactive computing platform); ;in, This is the maximum number of concurrent sessions, rounded down to ensure integer representation. This is the default concurrency level; This is the task type coefficient. The coefficient is 0.5 for training tasks (to reduce concurrency and ensure computing power per task) and 1.2 for inference tasks (to increase concurrency and improve efficiency).

[0038] Example 3, in conjunction with Example 1, describes a deployment system for a heterogeneous environment prediction model training and deployment method. This system includes a development environment, a data processing module, a model center, distributed storage, a data service center, and a service operation platform. The development environment provides an integrated Jupyter Lab containerized environment, pre-configured with mainstream AI development frameworks such as TensorFlow and PyTorch, as well as specialized operators for basic domains such as classification and regression. It supports both visual drag-and-drop programming and code editing modes. A multi-layered Docker image strategy is used to construct a basic environment layer, an AI framework layer, an operator layer, an extension layer, and a configuration layer, enabling the development environment to be used out of the box, flexibly customized, and rapidly deployed, thus lowering the barrier to AI application development and improving model building efficiency.

[0039] The data processing module is used to clean, transform, and perform feature engineering on the input data, including data format standardization, missing value imputation, outlier detection and processing, and data normalization or standardization, to improve data quality and model training performance. It also supports reading raw data from distributed storage and storing the processed data back to distributed storage, providing high-quality input data for model training.

[0040] The model center is used for centralized management of trained models, including model version control, metadata recording, categorized storage, and full lifecycle traceability. Its core functions cover model registration, version iteration tracking, performance metric recording, and model status management, supporting model querying, downloading, and deployment. The model center directly interfaces with distributed storage, uniformly storing model files and their corresponding metadata (such as training parameters, evaluation metrics, creation time, and developer information) to ensure the integrity and traceability of model assets. Simultaneously, through collaboration with the data service center, it achieves seamless integration from model completion to service deployment, providing a reliable model source for subsequent API service development and inference deployment.

[0041] The distributed storage adopts a distributed object storage architecture, featuring high scalability, high availability, and high throughput. It is used to uniformly store raw data, preprocessed data, training model files, and their metadata during model training. By dividing data into multiple objects and redundantly storing them across multiple nodes in the cluster, it ensures data security and reliability. Simultaneously, it supports cross-regional data access and synchronization, providing underlying data support for "cloud-edge collaboration" model lifecycle management, enabling efficient flow and sharing of training data and model assets across different environments. The distributed storage also provides a unified access interface, allowing modules such as the development environment, model center, and data service center to easily read and write data, ensuring data consistency and accessibility throughout the entire model training and deployment process.

[0042] The data service center is used for the full lifecycle management of AI services, covering core aspects such as service development, review, release, scheduling, and monitoring. During the service development phase, based on a unified model algorithm inference framework, it supports the development of custom services by pulling training models from distributed storage, generating diverse AI services such as load prediction and anomaly detection. In the service review phase, a multi-dimensional review mechanism is established to rigorously verify the completeness of service functions, interface standardization, performance indicators, and security. After approval, the service image is automatically deployed to a running cluster and registered with a unified service gateway, and routing rules, rate limiting policies, circuit breaker mechanisms, and authentication measures are configured to ensure stable and secure service operation. Through distributed task scheduling and service orchestration capabilities, AI services can be flexibly scheduled to different operating environments such as the cloud, edge, or local terminals, and key indicators such as service resource utilization, response time, and error rate are monitored in real time. Combined with elastic scaling strategies, dynamic resource allocation and cost optimization are achieved to ensure that services efficiently and stably meet various business needs.

[0043] The service operation platform is the infrastructure environment supporting the actual operation of AI services, possessing powerful multi-environment adaptability and resource management functions. It can automatically configure and optimize the service operation environment based on different hardware architectures (such as CPUs and GPUs) and deployment scenarios (cloud data centers, edge computing nodes, industrial field equipment, etc.), ensuring efficient execution of AI services in heterogeneous hardware environments. The platform has a built-in resource scheduling engine that dynamically allocates computing, storage, and network resources based on real-time service load and business priorities, maximizing resource utilization. Simultaneously, it integrates a comprehensive monitoring and alarm system, collecting various performance indicators during service operation (such as CPU utilization, memory usage, network throughput, inference latency, etc.). Furthermore, the platform provides service self-healing capabilities; when a service instance failure is detected, it can automatically trigger a restart or migration mechanism to ensure continuous service availability. Through deep collaboration with the data service center, the service operation platform achieves fully automated management of AI services from deployment and operation to maintenance, providing stable and reliable operational support for the large-scale deployment of AI applications.

[0044] Example 4, in conjunction with Examples 1-3, illustrates this embodiment. This embodiment discloses a method for using a heterogeneous environment prediction model training and deployment system. Taking meteorological data prediction in a certain city as an example, the specific steps include: A1. Running the Jupyter Lab development environment; the user logs into the Jupyter Lab development environment through a web interface. The containerized development environment is deployed with one click using the kai_denv startup command. After entering the container, hundreds of pre-installed development frameworks integrating deep learning and machine learning are visible. Users can perform visual drag-and-drop programming through the Visual Python plugin.

[0045] The model building and training process can be executed step-by-step in the development environment, with results available at any time. The workflow includes reading training data from distributed storage, data cleaning, model building, model training, model generation, and saving.

[0046] After logging into the corresponding node, you can deploy the containerized development environment with one click using the kai_denv startup command. After entering the container, you can see that the current kai environment has hundreds of development frameworks that integrate deep learning and machine learning installed.

[0047] The Visual Python plugin converts drag-and-drop operations into Python code that can be executed directly in Jupyter Lab in real time, supporting seamless switching between visual and code editing modes. This plugin is the core interactive interface and automated generator of the AI ​​development environment.

[0048] By adopting a multi-layered Docker image building strategy, the basic system environment, AI framework dependencies, and visual programming tools are encapsulated and integrated in a hierarchical manner, which solves the technical bottlenecks of complex configuration, version conflicts, and difficult migration of traditional AI development environments.

[0049] A2. Data Preprocessing and Model Training: First, load the raw meteorological data (including characteristic variables such as temperature, humidity, air pressure, and wind speed, as well as metadata such as country, province, and city) from the distributed storage, and remove metadata irrelevant to the prediction. At the same time, it is necessary to identify the input indicators in the file that actually affect the prediction. Separate the test data and the prediction data for cross-validation.

[0050] The raw meteorological data is then processed to obtain the processed meteorological data. In the visual programming interface, users drag and drop data cleaning operators to handle missing values ​​using the mean imputation method and identify and correct outliers using the IQR criterion. At the same time, the actual load values ​​are time-aligned with the meteorological data; for example, the load value at 13:07 is associated with the meteorological data at 13:00.

[0051] The actual load value needs to be correlated with meteorological data. For example, if the meteorological data file is one record every 15 minutes, then the load value at 13:07 needs to be correlated with the last meteorological data before that time point, i.e., the meteorological data at 13:00.

[0052] The appropriate prediction algorithm is selected based on the requirements and data characteristics. The specific selection criteria can be set as follows: (1) Based on the relationship between the feature quantity and the target value: A. Strong linear relationship between the feature quantity and the target value → linear regression, ridge regression; B. Complex relationship between the feature quantity and the target value → random forest algorithm, SVR, neural network; C. Need to reflect the importance of the feature quantity → random forest algorithm; (2) Based on the data scale: A. Sample size < 1000 → Naive Bayes, KNN, SVM (linear kernel); B. Sample size 1000-100,000 → random forest, gradient boosting tree, neural network; C. Sample size > 100,000 → XGBoost, LightGBM, neural network; D. Feature dimension > sample size → Lasso regression, principal component analysis (PCA); E. Feature dimension < 20 → model with strong interpretability (decision tree, logistic regression); Based on the above dimensions, combined with expert experience and the ranking of AI large models, random forest is selected as the prediction algorithm for subsequent verification work.

[0053] The model is trained using the Random Forest algorithm. Training data is obtained by dragging and dropping the Random Forest operators, setting the number of decision trees to 100 and the seed of the random number generator to 42 (i.e., setting RandomForestRegressor(n_estimators=100, random_state=42)). Processed meteorological data (e.g., data at 13:00) is then input for model training. The input value is meteorological data for a given period, and the output value is the load value corresponding to that period.

[0054] During training, the predicted data is compared with the real data for verification. When the deviation is less than the preset value, the built prediction model is saved in pkl format.

[0055] Finally, the trained model is uploaded to distributed storage, and the model version number V1.0, applicable scenario description, and performance evaluation report are filled in through the model center to complete the model version registration and classification archiving.

[0056] A3. Develop and deploy AI services.

[0057] At the data service center, a unified model inference framework is used to load the model trained in step A2 and package it into a service image. Developers then use this image to develop custom load forecasting API services.

[0058] Once service development is complete, a release application is submitted through the data service center. After approval, the system automatically deploys the service image to the service runtime platform and registers it with the unified service gateway. Subsequently, the corresponding routing, rate limiting, circuit breaking, and authentication policies are configured to complete the official service launch.

[0059] A4. Call AI services.

[0060] Once the service is set up, it can be tested. Service calls can be made through the unified service gateway using RESTful access mode. When external applications need to use the load prediction function, they access the unified service gateway through standard RESTful access mode and call the online load prediction API service. The service runtime platform schedules the service, loads the model for inference, and finally returns the predicted load data to the caller.

Claims

1. A method for training and deploying a heterogeneous environment prediction model, characterized in that, The process includes the following steps: S1. Using an integrated development environment, a pre-built development framework combining machine learning and deep learning is integrated into the development environment, with multiple pre-trained models and operators built-in; S2. Data preprocessing and dedicated model building are performed in the integrated development environment. Training data is obtained from distributed storage for model training. After training is completed, a training model is generated; S3. All training models are placed in a model center for unified management and stored in distributed storage. The model center is used for version management and categorized display of training models. S4. Develop API services in the data service center, using a unified model algorithm inference framework, obtain training models from distributed storage, develop custom services, and generate custom AI services; S5. Review and publish the AI ​​services through the data service center. The AI ​​services after going live are used by external applications; S6. Schedule AI services based on distributed task scheduling and service orchestration, and run them on the service runtime platform.

2. The method for training and deploying a heterogeneous environment prediction model according to claim 1, characterized in that, In S1, the integrated development environment is built on containerization technology and adopts a multi-layered Docker image strategy, including a basic environment layer, an AI framework layer, an operator layer, an extension layer, and a configuration layer. The basic environment layer includes an operating system base image and a runtime environment, providing underlying system support and resource scheduling capabilities to ensure the stable operation of the development environment. The AI ​​framework layer integrates machine learning and deep learning frameworks to provide diverse algorithm support for model development. The operator layer pre-configures basic operators and domain-specific operators, which can be used through drag-and-drop, thereby improving model building efficiency. The extension layer is used to dynamically load domain-specific operator packages and supports user-defined operators and third-party plugin integration. The configuration layer is used to set operator registry and environment variables to achieve automatic operator discovery and registration.

3. The method for training and deploying a heterogeneous environment prediction model according to claim 2, characterized in that, In S1, the pre-configuration process of the integrated development environment includes: S11, basic environment construction stage; integrating the base image; creating an isolated dedicated environment and specifying the basic runtime environment version; S12, AI framework integration stage; installing the GPU technology stack, CUDA toolkit, and deep learning framework in one go; integrating the scientific computing ecosystem and installing Python basic library packages; S13, visual programming environment integration; installing the Jupyter Lab development environment; integrating the Visual Python visual programming plugin; S14, environment optimization and startup configuration; integrating the resource awareness module for environment optimization; setting the working directory and permissions, and generating and locking the environment configuration file.

4. The method for training and deploying a heterogeneous environment prediction model according to claim 1, characterized in that, S1 also includes a visual programming plugin, which is used to convert the user's drag-and-drop operations in the visual interface into executable code in real time. It supports seamless switching between visual and code editing modes and displays operators to the user in the form of visual components based on the mapping relationship between operator IDs and code templates.

5. The method for training and deploying a heterogeneous environment prediction model according to claim 1, characterized in that, In S2, the training data used during the model training process is read from distributed storage, and the trained model is saved in a standard format and uploaded to distributed storage.

6. The method for training and deploying a heterogeneous environment prediction model according to claim 1, characterized in that, In S5, the specific process of reviewing and launching all services through the data service center includes: submitting a service launch application, along with a service description, API service documentation, and test report; the data service center conducts a multi-dimensional review after receiving the application; and after the review is passed, the service image is automatically deployed to the running cluster and registered with the unified service gateway.

7. A deployment system for implementing the heterogeneous environment prediction model training and deployment method as described in any one of claims 1-6, characterized in that, The system includes a development environment, a data processing module, a model center, distributed storage, a data service center, and a service operation platform. The development environment provides an integrated Jupyter Lab containerized environment, pre-configured with AI development frameworks and basic and domain-specific operators, supporting both visual drag-and-drop programming and code editing modes. The data processing module cleans, transforms, and performs feature engineering on input data to improve data quality and model training effectiveness. The model center centrally manages trained models. The distributed storage adopts a distributed object storage architecture to uniformly store raw data, preprocessed data, training model files, and their metadata during model training. The data service center manages the entire lifecycle of AI services. During the service development phase, based on a unified model algorithm inference framework, it supports the development of custom services by pulling training models from distributed storage, generating diverse AI services. In the service review phase, a multi-dimensional review mechanism is established to verify the completeness of service functions, interface standardization, performance indicators, and security. After the review is passed, the service image is automatically deployed in the running cluster and registered with the unified service gateway, and routing rules, rate limiting policies, circuit breaking mechanisms, and authentication measures are configured to ensure the stable and secure operation of the service. The service operation platform is used to support the infrastructure environment for the actual operation of AI services, and can automatically complete the configuration and optimization of the service operation environment according to different hardware architectures and deployment scenarios.

8. The deployment system for implementing the heterogeneous environment prediction model training and deployment method according to claim 7, characterized in that, The hardware resource comprehensive scoring formula for the resource awareness module in the development environment is as follows: ;in, It is a comprehensive score of hardware resources. , This refers to the actual number of CPU cores on the server. This is the baseline number of cores for the server. It refers to the GPU's single-precision floating-point arithmetic capability. This is the GPU's benchmark floating-point computing power. It refers to the host machine's memory size. This is the base memory size.

9. The deployment system for implementing the heterogeneous environment prediction model training and deployment method according to claim 8, characterized in that, In the resource awareness module for environment optimization, the dynamic calculation formula for Jupyter's maximum concurrency is as follows: ;in, It is the maximum number of concurrent sessions. This is the default concurrency level; It is the task type coefficient.

Citation Information

Patent Citations

  • Model management method and device and model management server

    CN114528186A

  • Data model integration system for public data development and utilization

    CN117519657A

  • Artificial intelligence visual modeling platform and method and electronic equipment

    CN118863024A

  • Artificial intelligence application service software development terminal

    CN120560613A

  • Virtual machine idle computing power-based distributed large model training method and system

    CN120704865A