A method and system for automatic matching and migration of AI algorithm models across hardware platforms using low-code development
The low-code development of an automatic matching and migration method for AI algorithm models across hardware platforms solves the complexity of matching and migrating AI models across hardware platforms in existing technologies, achieves concise and efficient model conversion and optimization, and improves the performance and compatibility of the model on different hardware platforms.
Patent Information
- Application Number
- CN202510386771.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-03-31
AI Technical Summary
Existing technologies have problems in the automatic conversion, matching and migration of AI models across hardware platforms, such as high professionalism, complex operations, low visualization, difficulty in migration and redundant work, which leads to degraded algorithm performance and long development cycles.
A low-code-developed, cross-hardware platform AI algorithm model automatic matching and migration method is used. By receiving models uploaded by users, obtaining target hardware platform information, optimizing adjustments and model conversions, and utilizing dynamic code generation technology and Docker containerization methods, a unified interface and toolset is provided to achieve automatic matching and migration across platforms.
It simplifies the operation process, lowers the technical threshold, improves the performance and versatility of the model, reduces manual intervention and testing cycles, ensures that the model runs at optimal performance on different hardware platforms, and promotes the widespread application of AI technology on embedded devices.
Smart Images

Figure CN120371384B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and specifically to a method for automatically matching and migrating AI algorithm models across hardware platforms using low-code development. Background Art
[0002] With the rapid development of artificial intelligence (AI), AI algorithm models, as the core of AI, can identify and predict the characteristics and trends of objects after training using large models. Although AI technology can theoretically achieve numerous functions, its implementation still relies on hardware platforms. Embedded devices, as platforms for implementing AI algorithm models, primarily provide an environment for the algorithm models to run and match relevant parameters. The core of these platforms is to provide AI computing power, primarily through embedded chips as the main controller or partial operation, using graphics processing units (GPUs), neural network processing units (NPUs), or digital signal processing (DSPs).
[0003] Furthermore, with the increasing number of AI-related industries being implemented, higher requirements are being placed on the matching and migration of AI algorithm models on the embedded side. In particular, different types of AI algorithm models trained on the PC side need to achieve similar functional indicators on different hardware platforms. This requires users to match and migrate AI chips on different embedded devices. Since the processors of different embedded device hardware platforms have different architectures and performance, the performance of the same AI model on different hardware varies, requiring targeted optimization and adaptation. However, the commonly used method is to manually adjust and optimize model parameters for specific hardware devices, but this method is time-consuming and labor-intensive, the model conversion is complex, and in practice, there may be problems such as inaccurate matching, resulting in reduced algorithm performance.
[0004] Although some automated optimization tools and frameworks have emerged in the existing technology for automatic model adaptation and optimization on different embedded platforms, these methods require users to first prepare the model conversion tools and library files required by the AI computing chip in the embedded device hardware platform, and then convert them according to the tools and rules provided by the model chip manufacturer, export the model file after configuring the quantitative parameters, perform inference development on the model, and finally package and deploy the model to the corresponding embedded platform, and tune the model according to the running results. Although the existing technology can complete the matching and migration of algorithm models on the embedded device hardware platform, there are the following problems:
[0005] 1. It requires high professionalism, requiring users to master the development of algorithm models, model conversion tools for different chip manufacturers, and reasoning and verification skills. Only by operating under full command can the algorithm migration be completed;
[0006] 2. The level of visualization is low, requiring model file conversion and matching migration 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 interfaces have single functions or too little prompt information, resulting in complex and diverse functional areas, cumbersome operations, and easy confusion.
[0007] 3. Migration is difficult. Different embedded device hardware platforms use different AI computing chips, with different processor architectures (such as GPU, TPU, NPU, etc.) and hardware parameters. This results in different software middleware, operating environments, and algorithm conversion deployment methods. As a result, when migrating AI algorithm models, it is necessary to focus on hardware architecture characteristics, computing power indicators, and compatibility indicators. It is necessary to use the model conversion tools and software development rules provided by the manufacturer to convert, migrate, and tune the AI algorithm model for specific hardware platforms. This results in a large workload and a long cycle for algorithm migration.
[0008] 4. Algorithm migration is highly redundant. Different embedded device hardware platforms require separate matching of different AI computing chips, and there is a lack of unified scheduling and management. This results in a large amount of repetitive work in operations such as environmental parameter configuration, model development and reasoning, and model conversion and deployment. This leads to 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 such as 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 method to obtain hardware platform information is:
[0014] By interacting with the target hardware platform, the static properties of the target hardware platform are obtained, including chip model, computing power index, instruction set architecture and memory capacity; the static properties of the target hardware platform are matched with the hardware platform database. If the static properties of the target hardware platform exist in the hardware platform database, the corresponding hardware platform information in the hardware platform database is called; otherwise, the user is prompted to upload the static properties and hardware platform information of the target hardware platform;
[0015] Step 2: Based on the target hardware platform information obtained in step 1, optimize and adjust the AI algorithm model uploaded by the user to ensure that the AI algorithm model has the best performance and efficiency on the target hardware platform:
[0016] The optimization and adjustment process is as follows: analyzing the AI algorithm model uploaded by the user, selecting the corresponding model type according to the function of the algorithm model, performing parameter quantization, model conversion, model deployment and evaluation on the AI algorithm model uploaded by the user according to the model type, and classifying and downloading 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 indicators, 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 and determine the model type of the AI algorithm model; the model type is classified according to function, including classification model, regression model, clustering model, time series model, generation model and reinforcement model;
[0021] Step 2.2: Based on 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, which includes confidence, accuracy, memory usage, model size, throughput, and hardware utilization. If the evaluation result meets the requirements, the converted model file is classified and downloaded. If the evaluation result deviates from expectations, the AI algorithm model is retrained, and parameter quantization, model conversion, model deployment, and evaluation are performed on the retrained AI algorithm model until the optimal deployment result is achieved.
[0022] Step 2.3: Compress and prune the optimized AI algorithm model based on the target hardware platform information to adapt it to the resource constraints of the target hardware platform;
[0023] Step 2.4: Use the Docker containerization method to provide a unified interface and tool set to encapsulate all dependencies and environment settings in the final AI algorithm model, so that the AI algorithm model can run stably on different hardware platforms.
[0024] Furthermore, in step 2, if the target hardware platform matches the existing hardware platform in the hardware platform database, the AI algorithm model uploaded by the user is optimized and adjusted based on the hardware platform information; if the target hardware platform does not match the existing hardware platform in the hardware platform database, an adaptation plan is developed based on the target hardware platform information uploaded by the user, and then the AI algorithm model uploaded by the user is optimized and adjusted based on the target hardware platform information.
[0025] Furthermore, the specific process of developing the adaptation solution is as follows: using dynamic code generation technology, according to the target hardware platform information, calling the preset Verilog / HLS code template to generate synthesizable logic, combining the numerical format supported by the hardware, dynamically adjusting the bit width allocation of the quantization sensitive layer, establishing a global virtual address space, and then realizing zero-copy data transmission between the NPU and the GPU through RDMA, and finally defining a unified accelerator interface, automatically mapping the bottom layer to different chip instructions to optimize and verify the construction of the adaptation solution.
[0026] Furthermore, the specific process of step 2.2 is as follows:
[0027] Analyze the AI algorithm model architecture uploaded by the user to determine the model type of the AI algorithm model; select an AI algorithm model of the same type in the model library based on the model type; and quantize the parameters of the selected AI algorithm model, where a quantization strategy is selected based on the magnitude of the model parameters 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 TFLite Micro Interpreter to deploy the converted model to the target hardware platform; after deployment, evaluate the AI algorithm model based on the results of real-time inference.
[0028] Furthermore, the AI algorithm model is a source algorithm model file from the PC, including a .pt model file for saving and loading model weights and structures under the Pytorch framework, a SavedModel model generated by training under the TensorFlow framework, or a .mindir model file generated by training under the MindSpore framework.
[0029] The present invention also proposes an AI algorithm model automatic matching and migration system, which 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;
[0030] The visual interface management module is used for function management. Users select the corresponding function area in the interface according to their needs and generate the model file automatic matching and migration process by dragging and dropping;
[0031] The model analysis module is used to judge the AI algorithm model imported by the user and determine the model type of the AI algorithm model;
[0032] The model automatic matching and migration module automatically selects the corresponding model conversion rules 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 obtain an 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 visual interface management module, the user imports the AI algorithm model file that needs to be converted into the model management module; selects the model analysis module in the visual interface, selects the corresponding model type according to the analysis results, and uses the drag-and-drop method to perform parameter quantification, model conversion, model deployment and evaluation operations on the algorithm through the model automatic matching migration module and the model evaluation module. Finally, the algorithm model is classified, downloaded, and other operations are performed to generate the corresponding AI model file for automatic matching and migration on the embedded device, thereby realizing the function of the algorithm on the terminal device.
[0036] Furthermore, in the model automatic matching and migration module, the model is compressed and pruned based on the model training results and the parameters of the hardware platform to reduce the size and computational complexity of the model and adapt to the storage and computing resources of the hardware device. The framework and deployment tools suitable for running on embedded devices are selected from the Docker container, and the AI algorithm model is converted into a device executable format and then 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 achieve the expected performance indicators and is displayed on the visual interface.
[0037] Beneficial effects
[0038] The present invention has the following technical effects:
[0039] 1. The present invention adopts low-code development to realize user visualization operation. When matching and migrating the model, the user can perform direct operations on the visualization interface. According to different task requirements, the algorithm model, data set, target hardware platform and other parameters can be selected by dragging and dropping operations, and a flowchart of automatically generating algorithm model files adapted to the target platform is constructed. At the same time, real-time feedback and visualization display are provided, so that users can understand the performance and optimization of the model in real time. It effectively solves the problems of complex operation, high professional requirements, and insufficient visualization of the AI model transplantation interface in the existing technology, reduces the technical threshold of model deployment and adaptation, realizes the simplicity of model conversion operation, and improves the intelligence level of the system.
[0040] 2. The present invention adopts automatic identification and matching based on hardware platforms, which effectively solves the problem in the prior art that model conversion requires conversion and adaptation of algorithm models according to different chip platforms. The present invention can automatically identify the type of hardware platform currently in use (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, making full use of hardware resources, and users do not need to manually adjust the model of each hardware platform, which greatly reduces the tedious work and potential errors in the migration process, reduces development costs, and reduces 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 widespread application of AI in different fields.
[0041] 3. Through the present invention, it is possible to realize automatic cross-platform AI model automatic matching and migration on embedded devices, identify the characteristics of the target hardware platform in real time, and automatically adjust the model parameters and calculation methods to ensure that it can run with optimal performance on different platforms. This greatly reduces manual intervention and testing cycles, and accelerates the product development process. It can automatically adapt to hardware differences, whether it is different processor architectures, memory resources or computing power. By dynamically adjusting the model structure (such as quantization, pruning, fusion, etc.), it can improve efficiency and reduce resource consumption while ensuring model accuracy. Developers can tune and verify the model more quickly to ensure that it can achieve the expected results on the target platform. It effectively solves the real-time problem of model matching and optimization, realizes the migration, testing and tuning of AI models on multiple hardware platforms, effectively improves the efficiency and resource utilization of model conversion and debugging, and further promotes the application and popularization of AI technology on different hardware platforms.
[0042] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by 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 readily understood from the following description of the embodiments with reference to the accompanying drawings, in which:
[0044] Figure 1 :Flowchart of algorithm model deployment on cross-hardware platforms;
[0045] Figure 2 : Algorithm model conversion flow chart;
[0046] Figure 3 :Flowchart of algorithm model running in the system;
[0047] Figure 4 : Automatic matching and migration process of algorithm models;
[0048] Figure 5 : System functional block diagram. DETAILED DESCRIPTION
[0049] The following describes in detail embodiments of the present invention. The embodiments are exemplary and intended to explain the present invention, but are not to be construed as limiting the present invention.
[0050] Example 1:
[0051] This embodiment proposes a method for automatically matching and migrating AI algorithm models across hardware platforms using low-code development, which effectively solves the problem of differences in AI algorithm matching, migration, and optimization methods across different embedded device hardware platforms in the existing technology. By providing a visual operation interface, this method enables AI algorithm model files to be automatically adapted and optimized according to different hardware platforms, thereby significantly improving the performance and operating efficiency of the AI algorithm model. At the same time, it lowers the technical threshold for deploying and matching AI algorithm models, further promoting the widespread application and deployment of AI technology.
[0052] like Figure 1 The figure shows a flow chart of the automatic matching and migration method of AI algorithm models across hardware platforms using low-code development 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 to which the AI algorithm model needs to be migrated.
[0054] The AI algorithm model file is the source algorithm model file from the PC, such as the .pt model file used to save and load model weights and structure in the Pytorch framework, the SavedModel model trained and generated in the TensorFlow framework, or the .mindir model file trained and generated in the MindSpore framework. The corresponding algorithms can include target detection algorithms, image classification algorithms, target positioning algorithms, machine learning algorithms, action recognition algorithms, feature estimation algorithms, reinforcement learning algorithms, and custom algorithms, enabling matching and migration based on different deep learning frameworks such as Pytorch, TensorFlow, and MindSpace.
[0055] The hardware platform information includes hardware chip architecture, computing power indicators, and supported platform parameters.
[0056] The method to obtain hardware platform information is:
[0057] Interact with the target hardware platform through the API interface to obtain the static properties of the target hardware platform, including core parameters such as chip model, computing power index, instruction set architecture and memory capacity, and use the static properties of the target hardware platform to match with the hardware platform database stored in the system background. The hardware platform database stores information on various hardware platforms, including hardware chip architecture, computing power index, supported platform parameters, etc. The hardware platform database uses static properties as an index to ensure that the correct hardware platform is matched. If the static properties of the target hardware platform exist in the hardware platform database, the corresponding hardware platform information in the hardware platform database is called, including parameters such as hardware chip architecture, computing power index, supported platforms, etc. If the static properties of the target hardware platform are not stored in the hardware platform database, the user is prompted to upload information such as the chip model, hardware chip architecture, instruction set architecture, computing power index, memory capacity and supported platforms of the target hardware platform.
[0058] Step 2: Based on 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 properties of the target hardware platform, if the target hardware platform matches the hardware platform already in the hardware platform database, the AI algorithm model uploaded by the user will be optimized and adjusted based on the hardware platform information. If the target hardware platform does not match the hardware platform already in the hardware platform database, an adaptation solution will be developed based on the target hardware platform information uploaded by the user to fully utilize the advantages of hardware acceleration and improve the operating 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, the preset Verilog / HLS code template is called to generate synthesizable logic. Combined with the numerical format supported by the hardware (such as FP16 / BF16 of NPU), the bit width allocation of the quantization-sensitive layer is dynamically adjusted, and a global virtual address space is established. Then, zero-copy data transmission between NPU and GPU is achieved through RDMA. Finally, a unified accelerator interface (inference_engine.run()) is defined, and the bottom layer is automatically mapped to different chip instructions to optimize and verify the construction adaptation solution, so as to fully utilize the advantages of hardware acceleration and improve the operating efficiency and performance of AI algorithm models.
[0061] Then, based on the target hardware platform information, the AI algorithm model uploaded by the user is optimized and adjusted, such as Figure 2 As shown, the AI algorithm model uploaded by the user is analyzed, and the corresponding model type is selected according to the function of the algorithm model. Based on the model type, the AI algorithm model uploaded by the user is parameter quantified, converted, deployed and evaluated, and the converted model is classified and downloaded to obtain the optimized AI algorithm model.
[0062] The specific process is:
[0063] Step 2.1: Analyze the AI algorithm model uploaded by the user and determine the model type of the AI algorithm model; the model type is classified according to function, including classification model, regression model, clustering model, time series model, generation model and reinforcement model, etc.
[0064] Step 2.2: Based on 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 model evaluation results. The model evaluation results include indicators such as confidence, accuracy, memory usage, model size, throughput, and hardware utilization.
[0065] For example, in this embodiment, the AI algorithm model uploaded by the user is analyzed, that is, the model architecture is parsed to determine the model type of the AI algorithm model; then, based on the model type, we select an AI algorithm model of the same type from the model library that stores a large number of existing models; and the selected AI algorithm model is parameter quantized, that is, based on the numerical format supported by the hardware, the quantization strategy (INT8 / FP16 / mixed precision) is selected according to the model parameter magnitude (<10M / 10-100M / 100M+), and the model is quantized (such as dynamic quantization, hybrid quantization, static quantization, and quantization perception methods); then, conversion tools (such as ATC tools and TensorRT) are used to convert the AI algorithm model to a format supported by the target hardware platform, and finally, TFLite Micro Interpreter is called to deploy the converted model to the target hardware platform. After deployment, the model is evaluated based on the results of real-time reasoning.
[0066] If the evaluation results meet the requirements, the converted model files will be classified and downloaded. If the evaluation results deviate from expectations, the AI algorithm model will be retrained, and the retrained AI algorithm model will be subjected to parameter quantization, model conversion, model deployment and evaluation until the best deployment result is achieved.
[0067] Step 2.3: Based on the target hardware platform information, compress and prune the optimized AI algorithm model to reduce model complexity and adapt it to the resource constraints of the target hardware platform;
[0068] Specifically include:
[0069] Based on the characteristics of hardware such as GPUs, TPUs, and FPGAs, and according to the chip's computing power indicators, the parameters and quantization methods of the optimized AI algorithm model are adapted to achieve maximum computing power and minimum latency inference capabilities. Furthermore, computing tasks are optimized into execution paths suitable for the hardware, improving computing performance and maximizing computing efficiency.
[0070] Step 2.4: Utilize Docker containerization, providing a unified interface and toolset to encapsulate all dependencies and environment settings within the resulting AI algorithm model, ensuring stable operation across diverse hardware platforms. Containerization allows users to quickly deploy the same model across different embedded devices, reducing configuration and environment setup challenges and improving deployment efficiency. This helps users debug, monitor, and manage logs across different hardware platforms, significantly reducing operational complexity and improving efficiency.
[0071] Through the above-mentioned adaptation and adjustment measures, the AI algorithm model uploaded by the user can be optimized for the target hardware platform, thereby improving the operating efficiency and overall performance of the AI algorithm model. For example, it can fully utilize the acceleration capabilities of the hardware platform (such as the model optimized for the GPU will automatically adjust to take advantage of the GPU's parallel computing advantages, and the model for the TPU will adjust 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 operating efficiency of the model, but also allows the AI algorithm to better adapt to different types of hardware platforms, thereby improving 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] The above-mentioned cross-hardware platform AI algorithm model automatic matching and migration method can realize the automatic matching, migration and tuning of AI algorithm models. It can automate hardware information identification, model migration and optimization, and Docker container deployment, thereby simplifying the deployment and operation process of AI algorithm models on different hardware platforms, ensuring maximum model performance, and improving cross-platform compatibility and stability, realizing automatic adaptation and optimization of models on different hardware platforms, thereby improving model performance and efficiency, and realizing wider application and deployment.
[0074] Example 2:
[0075] This embodiment proposes an automatic matching and migration system for AI algorithm models across hardware platforms to solve the problems of complex matching and migration operations and insufficient visualization of existing AI algorithm model models.
[0076] The system 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.
[0077] The system first uses the visualization technology of the low-code platform to develop a simple and friendly user-oriented operation interface, allowing users to operate the corresponding functional modules in this interface, select algorithm models, target hardware platforms, etc. as needed by dragging and dropping, and build a flowchart that automatically generates model files.
[0078] The specific functions of each module are:
[0079] Visual interface management module: used for function management. Users select the corresponding function area in the interface according to their needs, and generate the model file automatic matching and migration process by dragging and dropping.
[0080] Model analysis module: Users import corresponding AI algorithm model information according to their needs. The system needs to judge the AI algorithm model data and determine the model type of the AI algorithm model; if the corresponding model data exists, it does not need to be imported.
[0081] Model automatic matching and migration module: automatically selects the corresponding model conversion rules based on 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;
[0082] Model evaluation module: Users use test data sets to test the deployed AI algorithm model based on functional requirements, and obtain an evaluation report on the algorithm accuracy and performance of the back-end model, thereby evaluating the algorithm model.
[0083] Model management module: Users can classify and manage different AI algorithm models and data sets according to their needs to adapt to different embedded devices.
[0084] Based on the above system, the algorithm model execution process in the system is as follows: First, the user logs in to the visualization platform. Using the visualization interface management module, the user imports the AI algorithm model file to be converted into the model management module. In the visualization interface, the user selects the model analysis module and, based on the analysis results, chooses the corresponding model type. Using a drag-and-drop method, the algorithm is parameterized, converted, deployed, and evaluated through the model automatic matching and migration module and the model evaluation module. Finally, the algorithm model is classified and downloaded to generate the corresponding AI model file, which is automatically matched and migrated to the embedded device, thus realizing the algorithm's functionality on the terminal device. Furthermore, based on the model training results and hardware platform parameters, the model is compressed and pruned to reduce the model size and computational complexity to accommodate the hardware device's storage and computing resources. A framework and deployment tool suitable for running on embedded devices is selected from the Docker container. The AI algorithm model is converted to a device executable format and then integrated and deployed into the target embedded device's application. Finally, the deployed AI algorithm model is tested and verified to ensure that the deployed AI algorithm model meets the expected performance indicators and is displayed in the visualization interface. According to the results of system analysis, the corresponding hardware parameters can be selected for matching and optimization, the optimized model can be packaged, and finally the model file can be migrated to the embedded device.
[0085] Based on this system, users can use drag-and-drop to identify AI algorithm models and integrate tools, allowing users to shield the differences between different hardware platforms (such as CPU, NPU, GPU and other chips), different algorithm models (such as machine learning algorithms, reinforcement learning algorithms, etc.), and different integration frameworks (such as Pytorch, TensorFlow, etc.), and automatically match and migrate different AI algorithm models on different hardware platforms.
[0086] The system uses a visual interface developed on a low-code platform to provide an algorithm migration integration interface. Users can operate the entire AI algorithm matching and migration process on the interface, integrate and uniformly manage algorithm conversion tools for different hardware platforms, and integrate middleware and inference engines. It provides an inference interface to the outside world in a containerized manner, which users can download and use directly. It mainly converts different algorithm models into back-end algorithm models that can run on different hardware devices through conversion tools, generates evaluation reports, and can intuitively evaluate the accuracy and performance of AI algorithm models. In addition, the system can also manage the version and hardware data of the algorithm model to achieve resource reuse and reduce repeated conversion and data upload work. Users can shield the differences between different hardware platforms and do not need to pay attention to the type of algorithm model. The system can automatically match and migrate different AI algorithm models on different hardware devices.
[0087] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention without departing from the principles and purpose of the present invention.
Claims
1. A method for automatically matching and migrating AI algorithm models across hardware platforms using low-code development, characterized by: The following steps are involved: 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; The method to obtain hardware platform information is: By interacting with the target hardware platform, the static properties of the target hardware platform are obtained, including chip model, computing power index, instruction set architecture and memory capacity; the static properties of the target hardware platform are matched with the hardware platform database. If the static properties of the target hardware platform exist in the hardware platform database, the corresponding hardware platform information in the hardware platform database is called; otherwise, the user is prompted to upload the static properties and hardware platform information of the target hardware platform; Step 2: Based on the target hardware platform information obtained in step 1, optimize and adjust the AI algorithm model uploaded by the user to ensure that the AI algorithm model has the best performance and efficiency on the target hardware platform: The optimization and adjustment process is as follows: analyzing the AI algorithm model uploaded by the user, selecting the corresponding model type according to the function of the algorithm model, performing parameter quantization, model conversion, model deployment and evaluation on the AI algorithm model uploaded by the user based on the model type, and classifying and downloading the converted model to obtain the optimized AI algorithm model; specifically, the following steps are included: Step 2.1: Analyze the AI algorithm model uploaded by the user and determine the model type of the AI algorithm model; the model type is classified according to function, including classification model, regression model, clustering model, time series model, generation model and reinforcement model; Step 2.2: Based on 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, which includes confidence, accuracy, memory usage, model size, throughput, and hardware utilization. If the evaluation result meets the requirements, the converted model file is classified and downloaded. If the evaluation result deviates from expectations, the AI algorithm model is retrained, and parameter quantization, model conversion, model deployment, and evaluation are performed on the retrained AI algorithm model until the optimal deployment result is achieved. Step 2.3: Compress and prune the optimized AI algorithm model based on the target hardware platform information to adapt it to the resource constraints of the target hardware platform; Step 2.4: Use Docker containerization to provide a unified interface and tool set to encapsulate all dependencies and environment settings in the final AI algorithm model, ensuring stable operation of the AI algorithm model on different hardware platforms. Step 3: Deploy the AI algorithm model obtained in step 2 to the target hardware platform.
2. The method for automatically matching and migrating AI algorithm models across hardware platforms using low-code development according to claim 1 is characterized by: The hardware platform information includes hardware chip architecture, computing power indicators, and supported platform parameters.
3. The method for automatically matching and migrating AI algorithm models across hardware platforms using low-code development according to claim 1 is characterized by: In step 2, if the target hardware platform matches the existing hardware platform in the hardware platform database, the AI algorithm model uploaded by the user is optimized and adjusted based on the hardware platform information; if the target hardware platform does not match the existing hardware platform in the hardware platform database, an adaptation plan is developed based on the target hardware platform information uploaded by the user, and then the AI algorithm model uploaded by the user is optimized and adjusted based on the target hardware platform information.
4. The method for automatically matching and migrating AI algorithm models across hardware platforms using low-code development according to claim 3 is characterized by: The specific process of developing the adaptation solution is as follows: using dynamic code generation technology, based on the target hardware platform information, calling the preset Verilog / HLS code template to generate synthesizable logic, combining the numerical format supported by the hardware, dynamically adjusting the bit width allocation of the quantization-sensitive layer, establishing a global virtual address space, and then realizing zero-copy data transmission between the NPU and GPU through RDMA. Finally, defining a unified accelerator interface, automatically mapping the bottom layer to different chip instructions to optimize and verify the construction of the adaptation solution.
5. The method for automatically matching and migrating AI algorithm models across hardware platforms using low-code development according to claim 1 is characterized by: The specific process of step 2.2 is as follows: Analyze the AI algorithm model architecture uploaded by the user to determine the model type of the AI algorithm model; select an AI algorithm model of the same type from the model library based on the model type; and quantize the parameters of the selected AI algorithm model, selecting a quantization strategy based on the magnitude of the model parameters 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 TFLite Micro Interpreter to deploy the converted model to the target hardware platform; After deployment is complete, the AI algorithm model is evaluated based on the results of real-time inference.
6. The method for automatically matching and migrating AI algorithm models across hardware platforms using low-code development according to claim 1, characterized in that: The AI algorithm model is a source algorithm model file from the PC, including a .pt model file for saving and loading model weights and structures under the Pytorch framework, a SavedModel model generated by training under the TensorFlow framework, or a .mindir model file generated by training under the MindSpore framework.
7. An AI algorithm model automatic matching and migration system based on the method of any one of claims 1 to 6, characterized in that: It includes visual interface management module, model analysis module, model automatic matching and migration module, model evaluation module and model management module; The visual interface management module is used for function management. Users select the corresponding function area in the interface according to their needs and generate the model file automatic matching and migration process by dragging and dropping; The model analysis module is used to judge the AI algorithm model imported by the user and determine the model type of the AI algorithm model; The model automatic matching and migration module automatically selects the corresponding model conversion rules 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; The model evaluation module uses the test data set to test the deployed AI algorithm model and obtain an 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 user needs so as to adapt to different embedded devices.
8. The AI algorithm model automatic matching and migration system according to claim 7, characterized in that: The system operation process is as follows: based on the visual interface management module, the user imports the AI algorithm model file that needs to be converted into the model management module; selects the model analysis module in the visual interface, selects the corresponding model type according to the analysis results, and uses the drag-and-drop method to perform parameter quantification, model conversion, model deployment and evaluation operations on the algorithm through the model automatic matching migration module and the model evaluation module. Finally, the algorithm model is classified and downloaded 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.
9. The AI algorithm model automatic matching and migration system according to claim 8, characterized in that: In the model automatic matching and migration module, the model is compressed and pruned based on the model training results and hardware platform parameters to reduce the model size and computational complexity, adapt to the storage and computing resources of the hardware device, and select frameworks and deployment tools suitable for running on embedded devices from the Docker container. The AI algorithm model is converted into a device executable format and then 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 achieve the expected performance indicators and is displayed on the visual 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