A lightweight inference engine system based on open neural network exchange format
By using a lightweight inference engine based on the Open Neural Network Exchange Format, seamless conversion and deployment of models across different frameworks and hardware platforms are achieved, solving the problems of low model deployment efficiency and high resource consumption in existing technologies, and enabling lightweight and real-time detection of edge devices.
Patent Information
- Application Number
- CN202611357390.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-11-24
AI Technical Summary
Existing inference engines are incompatible with multiple frameworks and hardware platforms, resulting in low model deployment efficiency, high resource consumption, inability to meet real-time requirements, and a lack of a unified resource scheduling and adaptation mechanism, making it impossible to achieve lightweight operation on edge devices.
A lightweight inference engine is built based on an open neural network exchange format. It utilizes a pluggable architecture to support different inference backends, optimizes the lightweight deployment of models on edge devices, achieves cross-platform compatibility through multi-framework model conversion, and dynamically schedules resources in conjunction with a resource monitoring module to achieve seamless conversion and deployment of models on different hardware platforms.
It improves the speed of environmental decoupling of multi-scene visual models and fusion with edge computing devices, reduces communication latency, enables real-time feedback of detection results, optimizes resource utilization of edge devices, and adapts to the needs of devices with different computing power.
Smart Images

Figure CN123159402A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of device technology, and in particular to a lightweight inference engine system based on the Open Neural Network Exchange Format. Background Technology
[0002] With the rapid development of artificial intelligence technology, visual neural network models have been widely used in various scenarios such as industrial inspection, intelligent security, coal mine operation monitoring, and mobile terminal recognition. Currently, various deep learning frameworks are developing independently, and the model formats trained by different frameworks are incompatible, leading to significant barriers when migrating models across multiple frameworks and deploying them across hardware platforms. Furthermore, when deploying models trained in the cloud to edge devices, issues such as large differences in computing power, inconsistent hardware architectures, and complex operating environments often result in low deployment efficiency, high inference latency, and excessive resource consumption, making it difficult to meet the high real-time requirements of business scenarios.
[0003] Most existing inference engines are adapted for specific frameworks or hardware, resulting in poor versatility and inability to simultaneously support mainstream domestic and international frameworks and hardware platforms. Furthermore, inference engines are bulky and have numerous dependencies, making lightweight operation difficult on resource-constrained edge devices. In addition, existing systems lack a unified resource scheduling and adaptation mechanism when dealing with edge devices of varying computing power levels, failing to achieve dynamic matching of computing power. This leads to lag on low-power devices and resource waste on high-power devices, failing to balance inference accuracy and operational efficiency. While the Open Neural Network Exchange Format (ONEF) serves as an industry-standard intermediate representation for models, enabling standardized conversion between different frameworks, current inference systems based on ONEF still suffer from rigid architectures, poor backend scalability, and insufficient adaptability to edge scenarios. They cannot meet the practical needs of decoupling and efficiently deploying multi-scenario visual models between cloud and edge. Therefore, this invention proposes a lightweight inference engine system based on ONEF to address the problems existing in the prior art. Summary of the Invention
[0004] To address the aforementioned issues, the present invention aims to propose a lightweight inference engine system based on an open neural network exchange format. This system constructs a lightweight inference engine based on the open neural network exchange format, utilizes a pluggable architecture to support different inference backends, optimizes the lightweight deployment of models on edge devices, effectively improves the decoupling speed of multi-scene visual model environments and the fusion speed of edge computing devices, reduces communication latency, completes a large number of image data processing tasks on coal mine edge computing devices, and realizes real-time feedback of detection results. A multi-framework model conversion was developed based on open neural network exchange. By using the standard set of open neural network exchange operators, the models of each framework are converted into intermediate representations, achieving maximum cross-platform compatibility of models on different underlying frameworks and different hardware platforms. This enables the models to be seamlessly converted and used between different frameworks, and decouples the design and deployment of multi-scene visual models in the cloud.
[0005] To achieve the objectives of this invention, the invention is implemented through the following technical solution: a lightweight inference engine system based on the Open Neural Network Exchange Format (ONE), comprising a model access module, a plug-in management module, an inference scheduling module, a lightweight operation module, and a resource monitoring module. The model access module is used to receive neural network model files in the ONE and extract model topology and operator information. The plug-in management module is used to dynamically load, unload, and manage inference backend plug-ins. The inference scheduling module is used to select matching inference backend plug-ins and allocate inference tasks according to the hardware type and computing power status of the current operating environment. The lightweight operation module is used to execute the model inference process based on the selected inference backend plug-ins, complete the processing of input data, and output the inference results. The resource monitoring module is used to collect real-time computing power load, memory usage, and temperature data of edge devices.
[0006] Further improvements are made in the following aspects: The plug-in management module includes a plug-in registration unit, a plug-in loading unit, a plug-in management unit, and a plug-in interface definition unit. The plug-in registration unit is used to maintain the plug-in registry and record the information of the installed backend plug-ins. The plug-in loading unit is used to dynamically load backend plug-ins according to the request of the inference scheduling module and complete plug-in initialization and resource allocation. The plug-in management unit is used to manage the enabling and disabling of plug-ins. The plug-in interface definition unit is used to formulate a unified inference backend plug-in interface specification.
[0007] A further improvement is that the plugin information recorded by the plugin registration unit includes the plugin name, compatible hardware type, supported operator set, and plugin version.
[0008] Further improvements are made in that the plugin interface definition unit includes an initialization interface, a session creation interface, an inference execution interface, a resource release interface, and an operator support query interface.
[0009] A further improvement is that the inference scheduling module includes a hardware identification unit and a scheduling strategy unit. The hardware identification unit is used to automatically identify the hardware type of the current operating environment, and the scheduling strategy unit is used to select the optimal inference backend plugin and assign the inference task to the corresponding plugin for execution based on the hardware type, model characteristics and preset rules.
[0010] A further improvement is made in that the inference scheduling process in the inference scheduling module includes the following steps: S1: The model access module completes the parsing and verification of the open neural network model and generates model metadata; S2: The inference scheduling module calls the hardware identification unit to identify the current device hardware type and available hardware resources; S3: The inference scheduling module queries the plugin registry to obtain a list of backend plugins adapted to the current hardware; S4: The scheduling strategy unit selects the optimal inference backend plugin based on model metadata, hardware type, and preset priority rules; S5: If the selected backend plugin is not loaded, call the plugin management module to load the corresponding plugin; S6: Create an inference session, configure inference parameters, and start the lightweight runtime module to execute inference tasks; S7: During inference, the backend plugin's running status is continuously monitored, and a backup backend plugin is automatically switched when an anomaly occurs to ensure inference stability.
[0011] Further improvements are made in that: the lightweight operating module includes a core framework unit and a backend plug-in unit. The core framework unit is used to build and provide device hardware resources and application scenarios, and the backend plug-in unit is used to connect the core framework unit and the underlying hardware to form a loosely coupled integration.
[0012] The beneficial effects of this invention are as follows: This invention constructs a lightweight inference engine based on an open neural network exchange format, supports different inference backends using a plug-in architecture, optimizes the lightweight deployment of the model on edge devices, effectively improves the decoupling speed of multi-scene visual model environment and the fusion speed of coal mine edge computing devices, reduces communication latency, and completes a large number of image data processing tasks on edge computing devices, realizing real-time feedback of detection results. A multi-framework model conversion was developed based on open neural network exchange. By using the standard set of open neural network exchange operators, the models of each framework are converted into intermediate representations, achieving maximum cross-platform compatibility of models on different underlying frameworks and different hardware platforms. This enables the models to be seamlessly converted and used between different frameworks, and decouples the design and deployment of multi-scene visual models in the cloud. Attached Figure Description
[0013] Figure 1 This is a system architecture diagram of the present invention; Figure 2 This is a diagram of the plug-in interface definition unit architecture of the present invention; Figure 3 This is a flowchart of the inference scheduling process in the inference scheduling module of the present invention. Detailed Implementation
[0014] To enhance understanding of the present invention, the present invention will be further described in detail below with reference to embodiments. These embodiments are only used to explain the present invention and do not constitute a limitation on the scope of protection of the present invention.
[0015] Example 1 according to Figure 1 , Figure 2 , Figure 3 As shown, this embodiment provides a lightweight inference engine system based on the Open Neural Network Exchange Format (ONE), including a model access module, a plug-in management module, an inference scheduling module, a lightweight operation module, and a resource monitoring module. The model access module receives neural network model files in the ONE and extracts the model topology and operator information. This unifies the input format of models from different sources, providing standardized model information support for subsequent inference scheduling, reducing the complexity of multi-model adaptation, and improving the system's versatility. It effectively solves the migration barriers of visual models between different frameworks in multiple scenarios, achieving decoupling between cloud training and edge deployment.
[0016] The plug-in management module dynamically loads, unloads, and manages inference backend plug-ins. It includes a plug-in registration unit, a plug-in loading unit, a plug-in management unit, and a plug-in interface definition unit. The plug-in registration unit maintains the plug-in registry, recording information about installed backend plug-ins. This information includes the plug-in name, compatible hardware type, supported operator set, and plug-in version. This centralized management of plug-in information provides a reliable data source for the inference scheduling module to quickly retrieve plug-ins compatible with the current hardware, avoiding scattered and redundant plug-in information and improving system maintainability and query efficiency. The plug-in loading unit dynamically loads backend plug-ins based on requests from the inference scheduling module, completing plug-in initialization and resource allocation. The plug-in management unit manages plug-in enabling and disabling operations. The plug-in interface definition unit defines a unified interface specification for inference backend plug-ins. This unit includes an initialization interface, a session creation interface, an inference execution interface, a resource release interface, and an operator support query interface. It enables flexible expansion and hot-swappable management of the inference backend, reduces the coupling between modules, supports multiple inference backends such as TensorRT, OpenVINO, and CANN, and is compatible with mainstream domestic and international GPU hardware platforms such as Huawei Atlas and Cambricon MLU, thereby improving the system's compatibility and scalability.
[0017] The inference scheduling module is used to select the matching inference backend plugin and allocate inference tasks based on the hardware type and computing power status of the current operating environment. The inference scheduling module includes a hardware identification unit and a scheduling strategy unit. The hardware identification unit is used to automatically identify the hardware type of the current operating environment, and the scheduling strategy unit is used to select the optimal inference backend plugin and allocate the inference task to the corresponding plugin for execution based on the hardware type, model characteristics and preset rules.
[0018] The inference scheduling process in the inference scheduling module includes the following steps: S1: The model access module completes the parsing and verification of open neural network models, generates model metadata, and is responsible for receiving model files in the open neural network exchange format, parsing the model structure and verifying its compliance, and extracting model metadata containing topology and operator information. This provides a standardized data structure for subsequent inference scheduling, ensuring that models from different frameworks can be uniformly identified and processed by the system, and is the foundation for decoupling cloud training from edge deployment. S2: The inference scheduling module calls the hardware identification unit to identify the current device's hardware type and available hardware resources. The hardware identification unit automatically detects the hardware type of the current edge device and assesses the status of key resources such as available computing power and memory. This achieves accurate perception of the operating environment, providing an objective basis for selecting the most suitable inference backend plugin and solving the adaptation problem caused by the large differences in computing power among edge devices. S3: The inference scheduling module queries the plugin registry to obtain a list of backend plugins adapted to the current hardware; it decouples the inference backend plugins from the hardware environment, and through the plugin-based management approach, it can quickly filter out available inference acceleration solutions, thereby improving the scalability of the system. S4: The scheduling strategy unit comprehensively considers model metadata, hardware type and preset priority rules, and intelligently selects the optimal inference backend plugin from the candidate list. It realizes dynamic matching of the best inference path according to the specific model and hardware environment, maximizes the use of hardware computing power, and thus achieves an efficient balance between computing accuracy and transmission latency. S5: If the optimal plugin selected in step S4 has not yet been loaded into memory, the plugin management module will be called to dynamically load the plugin and complete the initialization and resource allocation. This avoids the resource waste caused by statically loading all plugins, realizes on-demand loading of inference components, and significantly reduces the resource overhead of lightweight runtime on the edge side. S6: Create an inference session, configure inference parameters, and start the lightweight runtime module to execute inference tasks. This completes the closed loop from model preparation to actual computation, ensuring that the model can run efficiently and stably on the target hardware and achieve real-time feedback of detection results. S7: During the inference process, the backend plugin's running status is continuously monitored. When an anomaly occurs, the backup backend plugin is automatically switched to ensure inference stability, enhance the robustness and fault tolerance of the edge inference service, and ensure the continuity and stability of inference tasks in complex industrial environments.
[0019] The lightweight runtime module is used to execute the model inference process based on the selected inference backend plugin, complete the processing of input data and output of inference results. The lightweight runtime module includes a core framework unit and a backend plugin unit. The core framework unit is used to build and provide device hardware resources and application scenarios, while the backend plugin unit is used to connect the core framework unit and the underlying hardware to form a loosely coupled integration, which effectively simplifies the inference execution process, reduces the resource consumption of edge devices, and optimizes the lightweight deployment effect of the model.
[0020] The resource monitoring module collects real-time data on computing load, memory usage, and temperature of edge devices. This provides the inference scheduling module with real-time hardware status information, supports dynamic resource allocation and scheduling strategy adjustments, prevents device overload, and ensures stable system operation in edge computing scenarios.
[0021] This lightweight inference engine system, based on the Open Neural Network Exchange Format (ONEF), operates by having a model access module that receives ONEF neural network model files, parses and extracts topology and operator information to generate standardized model metadata, providing unified data support for subsequent scheduling. The inference scheduling module then calls the hardware identification unit to automatically identify the hardware type and resource status (computing power, memory, etc.) of the current edge device, queries the plugin registry to obtain a list of backend plugins compatible with the hardware, and the scheduling strategy unit intelligently selects the optimal inference backend plugin based on model metadata, hardware type, and preset rules. If not loaded, it is dynamically loaded and initialized. After creating inference session configuration parameters, the lightweight runtime module is started. The lightweight runtime module builds the runtime environment through the core framework unit, and the backend plugin unit connects the framework and the underlying hardware to execute inference tasks, completing input data processing and result output. A full-process resource monitoring module collects real-time data on device computing load, memory usage, and temperature, providing dynamic status information for inference scheduling, supporting resource allocation adjustments and abnormal switching, and ensuring stable system operation.
[0022] Example 2 according to Figure 1 , Figure 2 , Figure 3As shown, this embodiment provides a lightweight inference engine system based on the Open Neural Network Exchange Format (ONE). It employs a cloud-edge decoupled architecture, deploying a model training and conversion platform in the cloud. This platform is responsible for training visual models based on various deep learning frameworks and converting the trained models into the standard ONE format using an ONE conversion tool. After generating multi-precision model clusters, these models are distributed to the edge. The edge only needs to deploy the lightweight inference engine system of this invention, eliminating the need to install complex deep learning frameworks and dependency libraries, significantly simplifying the edge deployment process.
[0023] In industrial inspection scenarios, edge devices are deployed on edge servers or embedded devices in factory workshops. A lightweight inference engine receives visual inspection models in an open neural network exchange format from the cloud, adapts to local hardware through a plug-in management module, and executes product defect detection inference by a lightweight runtime module, outputting inspection results in real time. A resource monitoring module monitors the device's computing power in real time, and a dynamic adaptation module adjusts the inference strategy according to the computing power status to ensure the real-time performance and accuracy of the inspection.
[0024] In coal mine operation monitoring scenarios, the edge is deployed in the explosion-proof edge computing equipment of the coal mine. Due to the limited computing power and bandwidth of the edge computing equipment, the lightweight inference engine is optimized by trimming and retaining only the core inference function and the corresponding hardware backend plugin, which greatly reduces resource consumption. Through a dynamic adaptation mechanism, the inference parameters are automatically adjusted when the computing power fluctuates, so as to realize real-time inference for visual tasks such as coal mine worker behavior recognition and equipment status monitoring, reduce data transmission bandwidth pressure, and improve response speed.
[0025] In mobile edge computing scenarios, it is deployed in mobile environments such as 5G base station edge nodes and vehicle edge devices, adapting to hardware platforms of different manufacturers and computing power. Through a plug-in architecture, it can quickly adapt to new hardware and achieve rapid deployment and efficient inference of visual models.
[0026] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A lightweight inference engine system based on an open neural network exchange format, characterized in that: The system includes a model access module, a plug-in management module, an inference scheduling module, a lightweight operation module, and a resource monitoring module. The model access module receives neural network model files in the Open Neural Network Exchange Format (ONE) and extracts the model topology and operator information. The plug-in management module dynamically loads, unloads, and manages inference backend plug-ins. The inference scheduling module selects matching inference backend plug-ins and allocates inference tasks based on the hardware type and computing power status of the current operating environment. The lightweight operation module executes the model inference process based on the selected inference backend plug-ins, completing the processing of input data and outputting inference results. The resource monitoring module collects real-time data on the computing power load, memory usage, and temperature of edge devices.
2. The lightweight inference engine system based on the open neural network exchange format according to claim 1, characterized in that: The plug-in management module includes a plug-in registration unit, a plug-in loading unit, a plug-in management unit, and a plug-in interface definition unit. The plug-in registration unit is used to maintain the plug-in registry and record the information of the installed backend plug-ins. The plug-in loading unit is used to dynamically load backend plug-ins according to the request of the inference scheduling module and complete plug-in initialization and resource allocation. The plug-in management unit is used to manage the enabling and disabling of plug-ins. The plug-in interface definition unit is used to formulate a unified inference backend plug-in interface specification.
3. A lightweight inference engine system based on an open neural network exchange format according to claim 2, characterized in that: The plugin registration unit records plugin information including plugin name, compatible hardware type, supported operator set, and plugin version.
4. A lightweight inference engine system based on an open neural network exchange format according to claim 1, characterized in that: The plugin interface definition unit includes an initialization interface, a session creation interface, an inference execution interface, a resource release interface, and an operator support query interface.
5. A lightweight inference engine system based on an open neural network exchange format according to claim 1, characterized in that: The inference scheduling module includes a hardware identification unit and a scheduling strategy unit. The hardware identification unit is used to automatically identify the hardware type of the current operating environment. The scheduling strategy unit is used to select the optimal inference backend plugin and assign the inference task to the corresponding plugin for execution based on the hardware type, model characteristics and preset rules.
6. A lightweight inference engine system based on an open neural network exchange format according to claim 5, characterized in that: The inference scheduling process in the inference scheduling module includes the following steps: S1: The model access module completes the parsing and verification of the open neural network model and generates model metadata; S2: The inference scheduling module calls the hardware identification unit to identify the current device hardware type and available hardware resources; S3: The inference scheduling module queries the plugin registry to obtain a list of backend plugins adapted to the current hardware; S4: The scheduling strategy unit selects the optimal inference backend plugin based on model metadata, hardware type, and preset priority rules; S5: If the selected backend plugin is not loaded, call the plugin management module to load the corresponding plugin; S6: Create an inference session, configure inference parameters, and start the lightweight runtime module to execute inference tasks; S7: During inference, the backend plugin's running status is continuously monitored, and a backup backend plugin is automatically switched when an anomaly occurs to ensure inference stability.
7. A lightweight inference engine system based on an open neural network exchange format according to claim 1, characterized in that: The lightweight operating module includes a core framework unit and a backend plug-in unit. The core framework unit is used to build and provide device hardware resources and application scenarios, and the backend plug-in unit is used to connect the core framework unit and the underlying hardware to form a loosely coupled integration.
