Cross-hardware platform AI algorithm model automatic matching migration method and system using low code development
Through the low-code development of cross-hardware platform AI algorithm model automatic matching and migration method, the complexity of cross-hardware platform model matching and migration in the existing technology is solved, and the efficient automatic adaptation and optimization of the model on different hardware platforms is realized, the model performance and efficiency are improved, and the wide application of AI technology is promoted.
Patent Information
- Application Number
- CN202510386771.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-03-31
AI Technical Summary
The existing technology has problems such as strong professionalism, complex operation, insufficient visualization, high migration difficulty and redundancy in the matching and migration of AI algorithm models across hardware platforms, resulting in time-consuming and labor-intensive model conversion and degradation of performance.
The AI algorithm model of cross-hardware platform developed with low code is adopted. By receiving the model uploaded by users, the target hardware platform information is obtained, and the model analysis, parameter quantization, conversion and deployment are carried out. It also provides a unified interface to achieve automatic cross-platform matching and migration by using Docker containerization.
The model deployment process is simplified, the performance and versatility of the model on different hardware platforms is improved, the technical threshold is reduced, the manual intervention and testing cycle is reduced, the model conversion and debugging efficiency is improved, and the wide application of AI technology on embedded devices is promoted.
Smart Images

Figure CN120371384A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and specifically to an automatic matching and migration method for AI algorithm models across hardware platforms developed with low-code. Background Art
[0002] With the rapid development of the field of artificial intelligence, as the core of artificial intelligence, the AI algorithm model can identify and predict the characteristics and trends of things after being trained with a large model. Although in theory, AI technology can achieve numerous functions, its implementation still depends on the hardware platform. As a platform for implementing the AI algorithm model, the main function of the embedded device is to have an environment for running the algorithm model and relevant matching parameters. The core of the platform mainly uses an embedded chip as the main controller or for partial operations, and provides AI computing power by means of a graphics processing unit (GPU), a neural network processing unit (NPU), or digital signal processing technology (DSP).
[0003] Moreover, with the increasing implementation of AI-related industries, higher requirements are put forward for the matching and migration of AI algorithm models on the embedded side. Especially for different types of AI algorithm models trained on the PC side, similar functional indicators need to be achieved on different hardware platforms, which requires users to match and migrate for the AI chips on different embedded devices. Since the processors of different embedded device hardware platforms have different architectures and performances, the performance of the same AI model varies on different hardwares, and targeted optimization and adaptation are required. However, the common method is to manually adjust and optimize the model parameters for specific hardware devices, but this method is time-consuming and laborious, the model conversion is complex, and there may be problems such as inaccurate matching and decreased algorithm performance in practice.
[0004] Although there have been some automated optimization tools and frameworks in the prior art for automatic model adaptation and optimization on different embedded platforms. But these methods require users to first prepare the model conversion tools and the dependent library files required by the AI computing power chips in the embedded device hardware platform, and then convert them according to the tools and rules provided by the model chip manufacturers. After configuring the quantization parameters, export the model file, develop the model for inference, and finally package and deploy the model to the corresponding embedded platform, and optimize the model according to the running results. Although the matching and migration of the algorithm model on the embedded device hardware platform can be completed through the prior art, there are the following problems:
[0005] 1. It is highly professional and requires users to master skills such as the development of algorithm models, model conversion tools of different chip manufacturers, and inference verification, etc., and the migration of the algorithm can be completed only under full command operations;
[0006] 2. The visualization level is not high. It is necessary to convert and match the model files based on different computing chip manufacturers. However, due to the different model conversion software interfaces and development levels among different AI computing chip manufacturers, the developed visualization interface has a single function or too little prompt information, resulting in complex and diverse functional areas, cumbersome operations, and easy confusion.
[0007] 3. Difficulty in migration. Different embedded device hardware platforms use different AI computing chips, and their processor architectures (such as GPU, TPU, NPU, etc.) and hardware parameters are different, resulting in different ways of deploying software middleware, operating environment, and algorithm conversion. As a result, when migrating AI algorithm models, it is necessary to focus on the characteristics of the hardware architecture, computing power indicators, and compatibility indicators. It is necessary to use the model conversion tools and software development rules provided by the manufacturer for specific hardware platforms to convert, migrate, and optimize the AI algorithm model, resulting in large workload and long cycle for algorithm migration.
[0008] 4. The work of algorithm migration is highly redundant. Different embedded device hardware platforms need to match different AI computing chips separately, and lack unified scheduling and management. As a result, a lot of repetitive work is performed in operations such as environmental parameter configuration, model development and reasoning, and model conversion deployment. There are problems such as untimely model response and cumbersome operations. Summary of the invention
[0009] In response to the current problems in the field of artificial intelligence (AI) of automatic conversion, matching, and migration of AI models across hardware platforms, the present invention proposes a method and system for automatic matching and migration of AI algorithm models across hardware platforms developed using low-code. This method can overcome the defects of traditional matching methods, improve model performance and versatility, and provide a unified adaptation solution for different hardware platforms. It provides an innovative solution for automatic matching of AI models across hardware platforms, and promotes the application and development of artificial intelligence technology on various embedded devices.
[0010] The technical solution of the present invention is:
[0011] A method for automatically matching and migrating AI algorithm models across hardware platforms using low-code development includes the following steps:
[0012] Step 1: Receive the AI algorithm model uploaded by the user, and obtain the target hardware platform information to which the AI algorithm model needs to be migrated;
[0013] The way to obtain hardware platform information is:
[0014] By interacting with the target hardware platform, obtain the static attributes of the target hardware platform, including chip model, computing power metrics, instruction set architecture, and memory capacity; match the static attributes of the target hardware platform with the hardware platform database. If the static attributes of the target hardware platform exist in the hardware platform database, call the corresponding hardware platform information in the hardware platform database; otherwise, prompt the user to upload the static attributes and hardware platform information of the target hardware platform.
[0015] Step 2: According to the target hardware platform information obtained in Step 1, optimize and adjust the AI algorithm model uploaded by the user to make the AI algorithm model have the best performance and efficiency on the target hardware platform:
[0016] The optimization and adjustment process is as follows: Analyze the AI algorithm model uploaded by the user, select the corresponding model type according to the function of the algorithm model, and according to the model type, perform parameter quantization, model conversion, model deployment, and evaluation on the AI algorithm model uploaded by the user, and classify and download the converted model to obtain the optimized AI algorithm model.
[0017] Step 3: Deploy the AI algorithm model obtained in Step 2 to the target hardware platform.
[0018] Furthermore, the hardware platform information includes hardware chip architecture, computing power metrics, and supported platform parameters.
[0019] Furthermore, in Step 2, the specific process of optimization and adjustment is as follows:
[0020] Step 2.1: Analyze the AI algorithm model uploaded by the user to determine the model type of the AI algorithm model; the model type is classified according to the function, including classification model, regression model, clustering model, time series model, generation model, and reinforcement model.
[0021] Step 2.2: According to the model type determined in Step 2.1, perform model selection, parameter quantization, model conversion, model deployment, and model evaluation on the AI algorithm model to obtain the model evaluation results. The model evaluation results include confidence, accuracy, memory occupancy, model volume, throughput, and hardware utilization; if the evaluation results meet the requirements, classify and download the converted model file. If the evaluation results deviate from the expectation, retrain the AI algorithm model, and perform parameter quantization, model conversion, model deployment, and evaluation on the AI algorithm model after retraining until the best deployment result is achieved.
[0022] Step 2.3: According to the target hardware platform information, compress and prune the optimized AI algorithm model to make it adapt to the resource limitations of the target hardware platform.
[0023] Step 2.4: Adopt the Docker containerization method to provide a unified interface and toolset, encapsulate all dependencies and environment settings in the finally obtained AI algorithm model, and enable the stable operation of the AI algorithm model on different hardware platforms.
[0024] Further, in Step 2, if the target hardware platform can match the existing hardware platforms in the hardware platform database, the AI algorithm model uploaded by the user is optimized and adjusted according to the hardware platform information; if the target hardware platform does not match the existing hardware platforms in the hardware platform database, an adaptation solution is developed according to the target hardware platform information uploaded by the user, and then the AI algorithm model uploaded by the user is optimized and adjusted according to the target hardware platform information.
[0025] Further, the specific process of developing the adaptation solution is as follows: Using dynamic code generation technology, according to the target hardware platform information, call the pre-set Verilog / HLS code template to generate synthesizable logic, combine the numerical formats supported by the hardware, dynamically adjust the bit-width allocation of the quantization-sensitive layer, establish a global virtual address space, then achieve zero-copy data transmission between the NPU and the GPU through RDMA, and finally define a unified accelerator interface to automatically map the underlying layer to different chip instructions for optimization and verification to build the adaptation solution.
[0026] Further, the specific process of Step 2.2 is as follows:
[0027] Parse the architecture of the AI algorithm model uploaded by the user to determine the model type of the AI algorithm model; according to the model type, select an AI algorithm model with the same type in the model library; and perform parameter quantization on the selected AI algorithm model, where the quantization strategy is selected according to the model parameter order of magnitude to quantize the model; then use the conversion tool to convert the AI algorithm model into a format supported by the target hardware platform, and finally call the TFLite Micro Interpreter to deploy the converted model to the target hardware platform; after the deployment is completed, evaluate the AI algorithm model according to the results of real-time inference.
[0028] Further, the AI algorithm model is a source algorithm model file from the PC side, including a.pt model file for saving and loading model weights and structures under the Pytorch framework, a SavedModel of the model generated under the TensorFlow framework, or a.mindir model file generated under the MindSpore framework.
[0029] The present invention also proposes an AI algorithm model automatic matching and migration system, including a visual interface management module, a model analysis module, a model automatic matching and migration module, a model evaluation module, and a model management module;
[0030] The visualization interface management module is used for function management. Users can select the corresponding function area in the interface according to their needs, and generate an automatic matching and migration process of model files by means of dragging and dropping.
[0031] The model analysis module is used to determine the model type of the AI algorithm model imported by the user.
[0032] The model automatic matching and migration module automatically selects the corresponding model conversion rule according to the target hardware device platform information, converts and packages the AI algorithm model imported by the user, and obtains the installation package file of the backend model file.
[0033] The model evaluation module uses the test data set to test the deployed AI algorithm model, and obtains the evaluation report on the algorithm accuracy and performance of the backend model.
[0034] The model management module is used to classify and manage different AI algorithm models and data sets according to user needs, so as to adapt to different embedded devices.
[0035] Furthermore, the system operation process is as follows: Based on the visualization interface management module, the user imports the AI algorithm model file to be converted into the model management module; selects the model analysis module in the visualization interface, selects the corresponding model type according to the analysis result, and uses the method of dragging and dropping to perform operations such as parameter quantization, model conversion, model deployment and evaluation on the algorithm through the model automatic matching and migration module and the model evaluation module. Finally, perform operations such as classification and downloading on the algorithm model, so as to generate the corresponding AI model file for automatic matching and migration on the embedded device, and realize the function of the algorithm on the terminal device.
[0036] Furthermore, in the model automatic matching and migration module, operations such as compressing and pruning the model are also performed according to the model training results and the parameters of the hardware platform, reducing the size and calculation amount of the model, adapting to the storage and computing resources of the hardware device, and selecting the framework and deployment tool suitable for running on the embedded device from the Docker container, converting the AI algorithm model into a device-executable format and then integrating and deploying it into the application program of the target embedded device; in the model evaluation module, the AI algorithm model deployed on the device is tested and verified to ensure that the AI algorithm model deployed on the embedded device can reach the expected performance indicators and be displayed on the visualization interface.
[0037] Beneficial effects
[0038] The present invention has the following technical effects:
[0039] 1. The present invention realizes the visual operation of users through low-code development. When matching and migrating models, users can directly operate on the visual interface. According to different task requirements, they can select parameters such as algorithm models, data sets, and target hardware platforms by means of drag-and-drop operations, and construct a flow chart for automatically generating algorithm model files adapted to the target platform. At the same time, real-time feedback and visual display are provided, enabling users to understand the performance and optimization of the model in real time, effectively solving the problems in the prior art such as complex interface operations, high professional requirements, and insufficient visualization for AI model transplantation, reducing the technical threshold for model deployment and adaptation, and achieving simple model conversion operations and improving the intelligent level of the system.
[0040] 2. The present invention adopts automatic identification and matching based on the hardware platform, effectively solving the problem in the prior art that model conversion requires converting and adapting algorithm models according to different chip platforms. The present invention can automatically identify the type of the currently used hardware platform (such as different embedded chips, processor architectures, etc.). Once the identification is completed, the system can automatically adjust and optimize the calculation method of the model according to the hardware characteristics, make full use of the hardware resources, and the user does not need to manually adjust the models for each hardware platform, greatly reducing the cumbersome work and potential errors in the migration process, reducing the development cost, and reducing the manual adjustment and optimization work for different hardware platforms. It realizes the automatic matching and migration of AI models under different hardware platforms, improves the versatility and performance of the software, brings more efficient and intelligent AI functions to embedded devices, and promotes the wide application of AI in different fields.
[0041] 3. Through the present invention, automatic cross-platform AI model automatic matching and migration can be realized on embedded devices, the characteristics of the target hardware platform can be identified in real time, and the model parameters and calculation methods can be automatically adjusted to ensure optimal performance on different platforms. This greatly reduces manual intervention and the testing cycle, and accelerates the product development process. It can automatically adapt to hardware differences, whether it is different processor architectures, memory resources, or computing capabilities. By dynamically adjusting the model structure (such as quantization, pruning, fusion, etc.), the efficiency can be improved and resource consumption can be reduced while ensuring the model accuracy. Developers can optimize and verify the model more quickly to ensure that it can achieve the expected effect on the target platform. It effectively solves the real-time problem of model matching and optimization, realizes the migration, testing, and optimization of AI models on multiple hardware platforms, effectively improves the efficiency and resource utilization rate of model conversion and debugging, and further promotes the application and popularization of AI technology on different hardware platforms.
[0042] The additional aspects and advantages of the present invention will be partially given in the following description, partially become apparent from the following description, or be understood through the practice of the present invention. Brief Description of the Drawings
[0043] The above and / or additional aspects and advantages of the present invention will become apparent and be readily understood from the description of the embodiments in conjunction with the following drawings, where:
[0044] Figure 1 : Flow chart of algorithm model deployment across hardware platforms;
[0045] Figure 2 : Flow chart of algorithm model conversion;
[0046] Figure 3 : Flow chart of algorithm model operation in the system;
[0047] Figure 4 : Automatic matching and migration process of algorithm model;
[0048] Figure 5 : System functional block diagram. Detailed implementation manners
[0049] The embodiments of the present invention will be described in detail below. The embodiments are exemplary and are intended to explain the present invention, but should not be construed as limiting the present invention.
[0050] Embodiment 1:
[0051] This embodiment proposes an automatic matching and migration method for AI algorithm models across hardware platforms developed with low-code, effectively solving the problem of differences in the matching, migration, and optimization methods of AI algorithms on different embedded device hardware platforms. By providing a visual operation interface, this method enables AI algorithm model files to be automatically adapted and optimized according to different hardware platforms, thus significantly improving the performance and operation efficiency of AI algorithm models. At the same time, it reduces the technical threshold for the deployment and matching of AI algorithm models, further promoting the wide application and deployment of AI technology.
[0052] As Figure 1 shown is the flow chart of the automatic matching and migration method for AI algorithm models across hardware platforms developed with low-code proposed in this embodiment, which mainly includes the following steps:
[0053] Step 1: Receive the AI algorithm model file uploaded by the user and obtain the target hardware platform information required for the migration of the AI algorithm model.
[0054] The AI algorithm model file is a source algorithm model file from the PC side, such as a.pt model file used to save and load model weights and structures under the Pytorch framework, a SavedModel of a model generated by training under the TensorFlow framework, or a.mindir model file generated by training under the MindSpore framework, etc. The corresponding algorithms can be object detection algorithms, graphic classification algorithms, object localization algorithms, machine learning algorithms, action recognition algorithms, feature estimation algorithms, reinforcement learning algorithms, and custom algorithms, etc., which can achieve matching migration based on different deep learning frameworks such as Pytorch, TensorFlow, and MindSpace.
[0055] The hardware platform information includes the hardware chip architecture, computing power metrics, and supported platform parameters.
[0056] The method for obtaining the hardware platform information is as follows:
[0057] Interact with the target hardware platform through the API interface to obtain the static attributes of the target hardware platform, including core parameters such as chip model, computing power metrics, instruction set architecture, and memory capacity, and use the static attributes of the target hardware platform to match with the hardware platform database stored in the system background. The hardware platform database stores information on multiple hardware platforms, including hardware chip architecture, computing power metrics, and supported platform parameters, etc. This hardware platform database uses static attributes as indexes to ensure correct matching of the hardware platform. If the static attributes of the target hardware platform exist in the hardware platform database, then call the corresponding hardware platform information in the hardware platform database, including hardware chip architecture, computing power metrics, supported platforms, etc. If the static attributes of the target hardware platform are not stored in the hardware platform database, then prompt the user to upload information such as the chip model, hardware chip architecture, instruction set architecture, computing power metrics, memory capacity, and supported platforms of the target hardware platform.
[0058] Step 2: According to the target hardware platform information obtained in Step 1, optimize and adjust the AI algorithm model uploaded by the user, so that the AI algorithm model has the best performance and efficiency on the target hardware platform.
[0059] After comparing the static attributes of the target hardware platform, if the target hardware platform can match the existing hardware platforms in the hardware platform database, then optimize and adjust the AI algorithm model uploaded by the user according to the hardware platform information; if the target hardware platform does not match the existing hardware platforms in the hardware platform database, then develop an adaptation plan according to the target hardware platform information uploaded by the user to make full use of the hardware acceleration advantage and improve the operation efficiency and performance of the AI algorithm model. The specific process is as follows:
[0060] Using dynamic code generation technology, according to the target hardware platform information, call the pre-set Verilog / HLS code template to generate synthesizable logic, combine the numerical formats supported by the hardware (such as FP16 / BF16 of NPU), dynamically adjust the bit-width allocation of the quantization-sensitive layer, establish a global virtual address space, then achieve zero-copy data transfer between the NPU and the GPU through RDMA, and finally define a unified accelerator interface (inference_engine.run()), and automatically map the underlying layer to different chip instruction optimization and verification to build an adaptation solution, so as to make full use of the hardware acceleration advantage and improve the running efficiency and performance of the AI algorithm model.
[0061] Then, according to the target hardware platform information, optimize and adjust the AI algorithm model uploaded by the user, such as Figure 2 As shown, analyze the AI algorithm model uploaded by the user, select the corresponding model type according to the function of the algorithm model, and according to the model type, perform parameter quantization, model conversion, model deployment and evaluation on the AI algorithm model uploaded by the user, and classify and download the converted model to obtain the optimized AI algorithm model.
[0062] The specific process is as follows:
[0063] Step 2.1: Analyze the AI algorithm model uploaded by the user to determine the model type of the AI algorithm model; the model type is classified according to the function, including classification models, regression models, clustering models, time series models, generative models, reinforcement models, etc.;
[0064] Step 2.2: According to the model type determined in Step 2.1, perform model selection, parameter quantization, model conversion, model deployment and model evaluation on the AI algorithm model to obtain a model evaluation result, and the model evaluation result includes indicators such as confidence, accuracy, memory occupancy, model volume, throughput and hardware utilization.
[0065] For example, in this embodiment, by analyzing the AI algorithm model uploaded by the user, that is, parsing the model architecture, the model type of the AI algorithm model is determined; then, according to the model type, we select an AI algorithm model of the same type from the model library storing a large number of existing models; and perform parameter quantization on the selected AI algorithm model, that is, based on the numerical format supported by the hardware, select a quantization strategy (INT8 / FP16 / mixed precision) according to the model parameter order of magnitude (<10M / 10 - 100M / 100M+), and perform quantization on the model (such as methods like dynamic quantization, mixed quantization, static quantization, and quantization awareness); then use a conversion tool (such as the ATC tool, TensorRT) to convert the AI algorithm model into a format supported by the target hardware platform, and finally call the TFLite Micro Interpreter to deploy the converted model to the target hardware platform. After the deployment is completed, the model is evaluated according to the results of real-time inference.
[0066] If the evaluation result meets the requirements, the converted model file is classified and downloaded. If the evaluation result deviates from the expectation, the AI algorithm model is retrained, and the retrained AI algorithm model is subjected to parameter quantization, model conversion, model deployment, and evaluation until the best deployment result is achieved.
[0067] Step 2.3: According to the target hardware platform information, compress and prune the optimized AI algorithm model to reduce the model complexity and make it adapt to the resource limitations of the target hardware platform;
[0068] Specifically, it includes:
[0069] Aiming at the characteristics of hardware such as GPUs, TPUs, and FPGAs, according to the computing power index of the chip, adapt the parameters and quantization methods of the optimized AI algorithm model to achieve the maximum computing power and the minimum latency inference ability, and optimize the computing task into an execution path suitable for the hardware to improve the computing performance and maximize the computing efficiency;
[0070] Step 2.4: Adopt the Docker containerization method to provide a unified interface and toolset, encapsulate all dependencies and environment settings in the finally obtained AI algorithm model, so as to ensure the stable operation of the AI algorithm model on different hardware platforms. Through containerization, users can quickly deploy the same model on different embedded devices, reduce configuration and environment setup problems, and improve deployment efficiency. It helps users perform operations such as model debugging, monitoring, and log management on different hardware platforms, which can greatly reduce the operation complexity of users and improve efficiency.
[0071] Through the above adaptation and adjustment measures, the AI algorithm model uploaded by the user can be optimized for the target hardware platform, improving the running efficiency and overall performance of the AI algorithm model. For example, it can make full use of the acceleration capabilities of the hardware platform (such as a model optimized for GPU will be automatically adjusted to leverage the parallel computing advantages of the GPU, and a model for TPU will be adjusted to adapt to its tensor processing capabilities), and dynamically adjust the AI algorithm according to the hardware characteristics to achieve cross-platform performance optimization. This not only improves the running efficiency of the model but also enables the AI algorithm to better adapt to different types of hardware platforms, enhancing the computing power of the overall system.
[0072] Step 3: Deploy the AI algorithm model obtained in Step 2 to the target hardware platform.
[0073] Through the above automatic matching and migration method of the AI algorithm model across hardware platforms, requirements such as automatic matching, migration, and optimization of the AI algorithm model can be achieved. It can automate hardware information recognition, model migration and optimization, as well as Docker container-based deployment methods, thereby simplifying the deployment and running processes of the AI algorithm model on different hardware platforms, ensuring the maximization of model performance, enhancing cross-platform compatibility and stability, realizing automatic adaptation and optimization of the model on different hardware platforms, thus improving model performance and efficiency, and enabling broader applications and deployments.
[0074] Example 2:
[0075] This example proposes an automatic matching and migration system for AI algorithm models across hardware platforms to solve problems such as complex operation and insufficient visualization in the matching and migration of existing AI algorithm models.
[0076] The system includes a visualization interface management module, a model analysis module, a model automatic matching and migration module, a model evaluation module, and a model management module.
[0077] The system first uses the visualization technology of the low-code platform to develop a simple and user-friendly operation interface for users. In this interface, users can, by operating the corresponding function modules, select algorithm models, target hardware platforms, etc. as needed in a drag-and-drop manner, and construct a flowchart for automatically generating model files.
[0078] The specific functions of each module are as follows:
[0079] Visualization interface management module: Used for function management. Users select the corresponding function area in the interface and generate the automatic matching and migration process of model files in a drag-and-drop manner.
[0080] Model Analysis Module: The user imports the corresponding AI algorithm model information according to the requirements. The system needs to determine the AI algorithm model data to identify the model type of the AI algorithm model. If the corresponding model data exists, there is no need to import it.
[0081] Model Automatic Matching and Migration Module: Automatically select the corresponding model conversion rules based on the target hardware device platform information, convert and package the AI algorithm model imported by the user to obtain the installation package file of the backend model file.
[0082] Model Evaluation Module: The user tests the deployed AI algorithm model using the test dataset according to the functional requirements to obtain the evaluation report on the algorithm accuracy and performance of the backend model, so as to evaluate the algorithm model.
[0083] Model Management Module: The user classifies and manages different AI algorithm models and datasets according to the requirements to facilitate adaptation to different embedded devices.
[0084] Based on the above system, the running process of the algorithm model in the system is as follows: First, the user logs in to the visualization platform. Based on the visualization interface management module, the user imports the AI algorithm model file to be converted into the model management module. Select the model analysis module in the visualization interface, select the corresponding model type according to the analysis result, and use the drag-and-drop method to perform operations such as parameter quantization, model conversion, model deployment, and evaluation on the algorithm through the model automatic matching and migration module and the model evaluation module. Finally, perform operations such as classifying and downloading the algorithm model to generate the corresponding AI model file for automatic matching and migration on the embedded device, realizing the function of the algorithm on the terminal device. In addition, for the model training results and the parameters of the hardware platform, perform operations such as compressing and pruning the model to reduce the size and computational amount of the model to adapt to the storage and computing resources of the hardware device, and select the framework and deployment tool suitable for running on the embedded device from the Docker container, convert the AI algorithm model into an executable format for the device and then integrate and deploy it into the application of the target embedded device. Finally, test and verify the AI algorithm model deployed on the device to ensure that the AI algorithm model deployed on the embedded device can meet the expected performance indicators and display them on the visualization interface. The corresponding hardware parameters can be selected for matching and optimization according to the results of system analysis, the optimized model is packaged, and finally the model file is migrated to the embedded device.
[0085] Based on this system, users can identify and integrate tools for AI algorithm models in a drag-and-drop manner, enabling them to shield the differences between different hardware platforms (such as chips like CPU, NPU, GPU, etc.), different algorithm models (such as machine learning algorithms, reinforcement learning algorithms, etc.), and different integration frameworks (such as Pytorch, TensorFlow, etc.), and perform operations of automatic matching and migration of different AI algorithm models on different hardware platforms.
[0086] The system provides an algorithm migration and integration interface on the visual interface developed by the low-code platform. Users can operate the entire process of AI algorithm matching and migration on the interface, integrate and uniformly manage the algorithm conversion tools for different hardware platforms, and can also integrate middleware and inference engines, and provide inference interfaces externally in a containerized manner for users to directly download and use. It mainly generates an evaluation report for different algorithm models, which can be run on different hardware devices through conversion tools, and can intuitively evaluate the accuracy and performance of AI algorithm models. In addition, the system can also manage the versions of algorithm models and hardware data, achieve the reuse of resources, and reduce the work of repeated conversion and data upload. Users can shield the differences of different hardware platforms and do not need to pay attention to the types of algorithm models. Using this system can achieve the goal of automatic matching and migration of different AI algorithm models on different hardware devices.
[0087] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limitations of the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention without departing from the principles and purposes of the present invention.
Claims
1. An automatic matching and migration method for AI algorithm models across hardware platforms developed using low-code, characterized in that: It includes the following steps: Step 1: Receive the AI algorithm model uploaded by the user and obtain the target hardware platform information that the AI algorithm model needs to be migrated to; The method for obtaining the hardware platform information is as follows: Interact with the target hardware platform to obtain the static attributes of the target hardware platform, including chip model, computing power metrics, instruction set architecture, and memory capacity; match the static attributes of the target hardware platform with the hardware platform database. If the static attributes of the target hardware platform exist in the hardware platform database, then call the corresponding hardware platform information in the hardware platform database; otherwise, prompt the user to upload the static attributes and hardware platform information of the target hardware platform. Step 2: Optimize and adjust the AI algorithm model uploaded by the user according to the target hardware platform information obtained in Step 1, so that the AI algorithm model has the best performance and efficiency on the target hardware platform: The optimization and adjustment process is as follows: Analyze the AI algorithm model uploaded by the user, select the corresponding model type according to the function of the algorithm model, and according to the model type, perform parameter quantization, model conversion, model deployment, and evaluation on the AI algorithm model uploaded by the user, and classify and download the converted model to obtain the optimized AI algorithm model; Step 3: Deploy the AI algorithm model obtained in Step 2 to the target hardware platform.
2. The automatic matching and migration method of an AI algorithm model across hardware platforms developed using low-code according to claim 1, characterized in that: The hardware platform information includes hardware chip architecture, computing power metrics, and supported platform parameters.
3. The automatic matching and migration method of an AI algorithm model across hardware platforms developed using low-code according to claim 2, characterized in that: In Step 2, the specific process of optimization and adjustment is as follows: Step 2.1: Analyze the AI algorithm model uploaded by the user to determine the model type of the AI algorithm model; the model type is classified according to the function, including classification model, regression model, clustering model, time series model, generative model, and reinforcement model; Step 2.2: According to the model type determined in Step 2.1, perform model selection, parameter quantization, model conversion, model deployment, and model evaluation on the AI algorithm model to obtain the model evaluation results. The model evaluation results include confidence level, accuracy, memory occupancy, model volume, throughput, and hardware utilization; if the evaluation results meet the requirements, then classify and download the converted model file. If the evaluation results deviate from the expectation, then retrain the AI algorithm model, and perform parameter quantization, model conversion, model deployment, and evaluation on the AI algorithm model after retraining until the best deployment result is achieved; Step 2.3: According to the target hardware platform information, compress and prune the optimized AI algorithm model to make it adapt to the resource limitations of the target hardware platform; Step 2.4: Adopt the Docker containerization method to provide a unified interface and toolset, encapsulate all dependencies and environment settings in the finally obtained AI algorithm model, and enable the stable operation of the AI algorithm model on different hardware platforms.
4. The automatic matching and migration method of an AI algorithm model across hardware platforms developed using low-code according to claim 1, characterized in that: In step 2, if the target hardware platform can match the existing hardware platforms in the hardware platform database, the AI algorithm model uploaded by the user is optimized and adjusted according to the hardware platform information; if the target hardware platform does not match the existing hardware platforms in the hardware platform database, an adaptation solution is developed according to the target hardware platform information uploaded by the user, and then the AI algorithm model uploaded by the user is optimized and adjusted according to the target hardware platform information.
5. The automatic matching and migration method of an AI algorithm model across hardware platforms developed using low-code according to claim 4, characterized in that: The specific process of developing the adaptation solution is as follows: Using dynamic code generation technology, according to the target hardware platform information, call the preset Verilog / HLS code template to generate synthesizable logic, combine the numerical formats supported by the hardware, dynamically adjust the bit-width allocation of the quantization-sensitive layer, establish a global virtual address space, then achieve zero-copy data transfer between the NPU and the GPU through RDMA, and finally define a unified accelerator interface to automatically map the underlying layer to different chip instruction optimizations and validations to build the adaptation solution.
6. The automatic matching and migration method of an AI algorithm model across hardware platforms developed using low-code according to claim 3, characterized in that: The specific process of step 2.2 is as follows: Parse the AI algorithm model architecture uploaded by the user to determine the model type of the AI algorithm model; according to the model type, select an AI algorithm model with the same type in the model library; and perform parameter quantization on the selected AI algorithm model, where the quantization strategy is selected according to the model parameter magnitude to quantize the model; then use a conversion tool to convert the AI algorithm model into a format supported by the target hardware platform, and finally call the TFLite Micro Interpreter to deploy the converted model to the target hardware platform; After the deployment is completed, evaluate the AI algorithm model according to the results of real-time inference.
7. The automatic matching and migration method of an AI algorithm model across hardware platforms developed using low-code according to claim 1, characterized in that: The AI algorithm model is a source algorithm model file from the PC side, including a.pt model file for saving and loading model weights and structures under the Pytorch framework, a SavedModel of the model generated under the TensorFlow framework, or a.mindir model file generated under the MindSpore framework.
8. An AI algorithm model automatic matching and migration system based on the method according to any one of claims 1 to 7, characterized in that: It includes a visual interface management module, a model analysis module, a model automatic matching and migration module, a model evaluation module, and a model management module; The visual interface management module is used for function management. The user selects the corresponding function area in the interface according to the requirements and generates the automatic matching and migration process of the model file by dragging and dropping. The model analysis module is used to determine the model type of the AI algorithm model imported by the user. The model automatic matching and migration module automatically selects the corresponding model conversion rule according to the target hardware device platform information, converts and packages the AI algorithm model imported by the user to obtain the installation package file of the backend model file. The model evaluation module uses the test data set to test the deployed AI algorithm model to obtain the evaluation report on the algorithm accuracy and performance of the backend model. The model management module is used to classify and manage different AI algorithm models and data sets according to the user's needs to facilitate adaptation to different embedded devices.
9. The AI algorithm model automatic matching and migration system according to claim 8, characterized in that: The system operation process is as follows: Based on the visualization interface management module, the user imports the AI algorithm model file to be converted into the model management module; selects the model analysis module in the visualization interface, selects the corresponding model type according to the analysis results, and uses the drag-and-drop method to perform operations such as parameter quantization, model conversion, model deployment, and evaluation on the algorithm through the model automatic matching and migration module and the model evaluation module. Finally, perform operations such as classifying and downloading the algorithm model, so as to generate the corresponding AI model file for automatic matching and migration on the embedded device, and realize the function of the algorithm on the terminal device.
10. The AI algorithm model automatic matching and migration system according to claim 9, wherein: In the model automatic matching and migration module, operations such as compressing and pruning the model are also performed according to the model training results and the parameters of the hardware platform, reducing the size and computational amount of the model, adapting to the storage and computing resources of the hardware device, and selecting a framework and deployment tool suitable for running on the embedded device from the Docker container. After converting the AI algorithm model into an executable format for the device, it is integrated and deployed into the application of the target embedded device; in the model evaluation module, the AI algorithm model deployed on the device is tested and verified to ensure that the AI algorithm model deployed on the embedded device can meet the expected performance indicators and be displayed on the visualization interface.
Citation Information
Patent Citations
Neural network algorithm cross-platform migration deployment optimization method
CN117422133A
Cross-platform model migration framework structure based on federated learning
CN118798325A
Cited By
Cross-platform model migration method and device
CN121092213A
A cross-platform model migration method and device
CN121092213B
AI model configuration driving quantization conversion optimization method and system oriented to special SOC chip
CN121235123A
An AI model configuration driving quantization conversion optimization method and system for a special SOC chip
CN121235123B
Cross-platform software component lightweight migration method
CN121255379A