An AI-based quantification lightweight method and system for adapting the interface between Hongmeng 6 and UE 5.4 engine

CN122526587APending Publication Date: 2026-08-07HANGZHOU DINGZHI MANCHUANG DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU DINGZHI MANCHUANG DIGITAL TECHNOLOGY CO LTD
Filing Date
2026-05-08
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0005]针对现有技术的不足,本发明提供一种基于AI量化轻量化的鸿蒙6与UE5.4引擎接口适配方法及系统,通过构建集成AI量化轻量化模块的三层架构中间件,解决UE5.4与鸿蒙6底层通信不兼容、传输延迟高、触控映射缺失、打包流程繁琐的问题;实现渲染数据轻量化传输,将接口延迟控制在≤10ms;支持鸿蒙终端触控操作与引擎参数调整的智能映射;适配鸿蒙HAP打包标准,一键生成可安装运行的安装包,最终提升动画制作跨终端协作效率

Benefits of technology

(1)提出融合AI量化轻量化技术的四层架构适配中间件,在渲染数据传输前通过INT8量化与特征蒸馏算法压缩数据体积,同时优化传输协议,解决鸿蒙轻量级终端算力、带宽受限的问题,实现接口延迟≤10ms,保障预览画面与编辑画面同步。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122526587A_ABST
    Figure CN122526587A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on AI quantification light weight's Hong Meng 6 and UE5.4 engine interface adaptation method and system, by constructing the middleware of three-layer architecture integrated AI quantification light weight module, solve UE5.4 and Hong Meng 6 bottom layer communication incompatible, transmission delay is high, touch mapping is missing, and the problem that packing process is complicated;Realize rendering data light weight transmission, control interface delay at ≤10ms;Support the intelligent mapping of Hong Meng terminal touch operation and engine parameter adjustment;Adapt Hong Meng HAP packing standard, one-key generation can be installed and run installation package, finally improve animation production cross-terminal collaboration efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer graphics engine and operating system interface adaptation technology, and in particular to a method and system for adapting the HarmonyOS 6 and UE5.4 engine interfaces based on AI quantization and lightweighting. Background Technology

[0002] In the field of animation production, as the industry's requirements for production precision and visual effects continue to increase, the UE5.4 engine, with its high-fidelity rendering capabilities and high-precision model editing functions, has become the mainstream production tool in animation project development due to its technological advantages. It is widely used in core aspects such as animation storyboard design, 3D model construction, and screen rendering. Meanwhile, HarmonyOS 6, as a new generation of distributed operating system, has formed a complete application ecosystem across multiple terminals such as tablets and smart screens, becoming an important carrier for cross-terminal collaboration in animation production. However, the UE5.4 engine was not adapted to the HarmonyOS 6 operating system at the underlying level during its research and development phase. Its native architecture differs significantly from the underlying graphics-driven logic and application ecosystem standards of HarmonyOS 6, making it impossible for the UE5.4 engine to achieve efficient deployment and cross-terminal collaboration directly on HarmonyOS 6 terminals. This forms a core technical barrier to cross-terminal applications in animation production, and the industry urgently needs an effective interface adaptation solution to address this technical problem.

[0003] Existing interface adaptation solutions for UE5.4 and HarmonyOS 6 have three major flaws, as verified in practical applications, making them unsuitable for the actual needs of animation production: First, the Vulkan rendering interface used by the UE5.4 engine has a low-level incompatibility with the graphics driver protocol of the HarmonyOS 6 operating system. This results in significant data loss and high latency during cross-device transmission, with actual transmission latency generally exceeding 50ms. This directly causes the preview screen on the HarmonyOS terminal and the editing screen of the UE5.4 engine on the PC to be out of sync in real time. Operations such as model adjustments and storyboard modifications in animation production cannot be previewed and verified on the terminal in a timely manner, significantly impacting production efficiency. Second, existing adaptation solutions lack a dedicated intelligent touch mapping mechanism, which is insufficient for HarmonyOS tablets and other devices. Operation commands from mobile touch terminals cannot be directly converted into model parameter adjustment commands that the UE5.4 engine can recognize. Staff cannot directly debug parameters such as model position, angle, and size on mobile terminals and must rely on PCs for operation. Cross-terminal debugging is cumbersome, has poor interactivity, and low overall debugging efficiency. Thirdly, the adapted UE5.4 animation project cannot directly generate HAP installation packages that conform to the HarmonyOS ecosystem standard. It needs to be manually repackaged. Not only is the packaging process cumbersome and time-consuming, but it is also prone to problems such as resource format conversion errors and improper permission configuration during manual operation, which in turn causes compatibility failures of the installation package on HarmonyOS terminals, increasing the trial and error costs and technical costs of project implementation.

[0004] Furthermore, traditional adaptation solutions suffer from significant design flaws, failing to specifically optimize for the hardware characteristics of lightweight devices like HarmonyOS tablets and smart screens, and ignoring the inherent limitations of these devices in terms of computing power and bandwidth. The rendering data output by the UE5.4 engine includes high-precision model textures and high-frame-rate image data, resulting in a massive data volume. When this unoptimized, high-volume data is transmitted and run on HarmonyOS lightweight devices, it easily leads to data transmission congestion and excessive terminal computational load, directly causing device lag, frame drops, and even program crashes. The current development trend of the animation production industry has created an urgent need for an integrated cross-terminal collaboration model of "editing-previewing-debugging". The aforementioned technical shortcomings of traditional adaptation solutions make it impossible to achieve efficient collaborative progress between PC and HarmonyOS terminals in the entire animation production process. This not only restricts the implementation and promotion of cross-terminal collaboration models for animation production, but also makes it difficult to meet the industry's demand for efficient and convenient production. Therefore, developing a UE5.4 and HarmonyOS 6 interface adaptation method with stronger adaptability, higher transmission efficiency, and adaptation effect that is more in line with the HarmonyOS ecosystem has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method and system for adapting the HarmonyOS 6 and UE5.4 engine interfaces based on AI quantization and lightweighting. By constructing a three-layer middleware architecture integrating AI quantization and lightweighting modules, it solves the problems of incompatibility between UE5.4 and HarmonyOS 6 at the underlying level, high transmission latency, lack of touch mapping, and cumbersome packaging process. It achieves lightweight transmission of rendering data, controlling interface latency to ≤10ms; supports intelligent mapping between HarmonyOS terminal touch operations and engine parameter adjustments; and adapts to the HarmonyOS HAP packaging standard, generating an installable and runnable package with one click, ultimately improving the efficiency of cross-terminal collaboration in animation production.

[0006] This invention provides a method for adapting the HarmonyOS 6 and UE5.4 engine interfaces based on AI-quantized lightweight design, including: Provides hardware and software environments for both development and terminal applications; Perform lightweight compression on the texture data and frame rendering data of the animation model output from the development end; The compressed data is converted into a format supported by the terminal graphics driver and transmitted to the terminal. After receiving the data, the terminal completes the screen rendering and real-time preview. When a user performs an operation on the terminal, a lightweight classification AI model is used to identify the type of operation. The operation is mapped to an adjustment command and sent to the development team; After receiving the command, the development team updates the animation model and synchronously transmits the updated data to the terminal; and After debugging, the animation model is packaged to generate an installation package.

[0007] In one embodiment of the present invention, the development end is a Windows 11 system loaded with the UE5.4 engine, and the terminal is a HarmonyOS 6 tablet.

[0008] In one embodiment of the present invention, the lightweight compression operation performed on the texture data and frame rendering data of the animation model output by the development end includes: The texture data and frame rendering data are compressed through feature distillation; The INT8 quantization tool is used to convert 32-bit floating-point data to 8-bit integer data.

[0009] In one embodiment of the present invention, the data compression of the texture data and frame rendering data through feature distillation includes: A teacher network was constructed, and core visual features of UE5.4 rendered data were extracted and compared with the student network through a pre-trained convolutional neural network. The raw rendered frame data output from the UE5.4 engine is input into the teacher network at a resolution of W×H×3, and high-dimensional feature maps are extracted through convolutional layers. Where Ft is the high-dimensional feature map of the UE5.4 rendering data extracted by the teacher network; R is the real number field, representing that the numerical type of the feature map is real number; Ct is the number of channels of the feature map output by the teacher network; Wt is the width of the feature map output by the teacher network; Ht is the height of the feature map output by the teacher network. A knowledge distillation loss function is used to guide the student network to learn the feature distribution of the teacher network, thereby minimizing the differences in the feature maps output by the student network.

[0010] In one embodiment of the present invention, the conversion from 32-bit floating-point data to 8-bit integer data using the INT8 quantization tool includes: The feature map output by the student network is quantized using the following formula, converting 32-bit floating-point data into 8-bit integer data: ; Where quant(x) is the 8-bit integer quantized value obtained by quantizing the floating-point pixel value x; x is a 32-bit floating-point pixel value in the feature map; min(x) is the minimum value of the feature map pixels; max(x) is the maximum value of the pixels in the feature map; 255 is the upper limit of the value range for an 8-bit integer. round() is the rounding function.

[0011] In one embodiment of the present invention, the data is further packaged and quantization parameters are added for inverse quantization restoration on the HarmonyOS terminal. The inverse quantization formula is as follows: ; Where Dequant(q) is the 32-bit floating-point pixel value restored by dequantizing the 8-bit integer quantization value q; q is the quantized 8-bit integer value; 255 is the upper limit of the value range for an 8-bit integer. max(x) is the maximum value of the pixels in the original feature map; min(x) is the minimum value of the pixels in the original feature map; x is the 32-bit floating-point pixel value in the original feature map.

[0012] In one embodiment of the present invention, the lightweight classification AI model adopts the MobileNetV3 architecture and the model size is less than 5MB.

[0013] In one embodiment of the present invention, converting the compressed data into a format supported by the terminal graphics driver includes protocol conversion through a Vulkan-HarmonyOS graphics driver parameter mapping table.

[0014] This invention also provides an AI-based lightweight HarmonyOS 6 and UE5.4 engine interface adaptation system, comprising: The AI ​​quantization lightweight layer is configured to achieve lightweight rendering of UE5.4 rendering data, including a model compression module, a precision standard module, and an inference optimization module. The rendering interface adaptation layer is configured to achieve cross-terminal rendering synchronization, including an API encapsulation module, a cross-platform rendering adaptation module, and a graphics resource management module. The instruction transmission layer is configured to solve the problems of touch operation mapping and low-latency data transmission, including a data encryption module, a protocol parsing module, and a real-time transmission control module; The packaging adaptation layer is configured to convert UE5.4 projects into HarmonyOS standard installation packages, including a multi-format packaging module, a signature verification module, and a compatibility testing module.

[0015] In one embodiment of the present invention, the model compression module is configured to achieve lightweight rendering data through feature distillation and INT8 quantization; The accuracy standard module is configured to retain core visual features throughout the entire process through feature distillation and to achieve data conversion using quantization-inverse quantization formulas, ensuring that the rendering accuracy after compression is not less than 95% of the original data. The inference optimization module is configured to optimize the inference process of AI quantization processing to address the hardware limitations of HarmonyOS lightweight terminals, and improve the computational efficiency of data compression and restoration by relying on the MindSporeLite framework.

[0016] The present invention has the following beneficial effects: (1) A four-layer architecture adaptation middleware integrating AI quantization and lightweight technology is proposed. Before rendering data transmission, the data volume is compressed by INT8 quantization and feature distillation algorithm. At the same time, the transmission protocol is optimized to solve the problem of limited computing power and bandwidth of HarmonyOS lightweight terminal, and the interface latency is ≤10ms to ensure the synchronization of preview and editing screens.

[0017] (2) Design a touch command intelligent mapping mechanism based on a lightweight classification AI model to automatically identify the touch operation type of HarmonyOS tablet and accurately map it to UE5.4 engine parameter adjustment command. The command recognition accuracy is ≥99%, the operation feedback delay is ≤5ms, and cross-terminal debugging can be completed without relying on the PC.

[0018] (3) Construct an AI-optimized HAP one-click packaging process, use AI quantization technology to lighten the UE5.4 project resources, and integrate the HarmonyOS application packaging standard to automatically complete resource conversion, permission configuration and signing. The generated installation package size is reduced by 30%-40%, and it can run on HarmonyOS multi-terminal compatibility without secondary modification.

[0019] (4) Achieve three-in-one collaborative adaptation of AI quantization and lightweighting, UE5.4 engine and HarmonyOS 6 system, forming a complete technical closed loop of "data lightweighting - protocol conversion - intelligent interaction - standard packaging", which improves cross-terminal collaboration efficiency by more than 80% compared with traditional solutions. Attached Figure Description

[0020] Figure 1 A flowchart of an embodiment of the present invention for an interface adaptation method between HarmonyOS 6 and UE5.4 engine based on AI quantization and lightweighting is shown; and Figure 2 The diagram shows a block diagram of a HarmonyOS 6 and UE5.4 engine interface adaptation system based on AI quantization and lightweighting in one embodiment of the present invention. Detailed Implementation

[0021] In the following description, the invention is described with reference to various embodiments. However, those skilled in the art will recognize that the embodiments may be practiced without one or more specific details or with other alternatives and / or additional methods, materials, or components. In other instances, well-known structures, materials, or operations are not shown or described in detail so as not to obscure the inventive points of the invention. Similarly, for illustrative purposes, specific quantities, materials, and configurations are set forth to provide a comprehensive understanding of embodiments of the invention. However, the invention is not limited to these specific details.

[0022] In this invention, the various embodiments are merely intended to illustrate the solutions of the invention and should not be construed as limiting.

[0023] In this specification, references to "an embodiment" or "this embodiment" mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in at least one embodiment of the invention. The phrase "in one embodiment" appearing throughout this specification does not necessarily refer to the same embodiment in all instances.

[0024] Furthermore, the numbering of the steps in the methods of the present invention does not limit the execution order of the method steps. Unless otherwise specified, the method steps may be executed in different orders.

[0025] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0026] Figure 1 The flowchart of the interface adaptation method between HarmonyOS 6 and UE5.4 engine based on AI quantization and lightweighting is shown in one embodiment of the present invention.

[0027] like Figure 1 As shown in this embodiment, the AI-based lightweight HarmonyOS 6 and UE5.4 engine interface adaptation method includes: S1. Set up the hardware and software environment for the development end and HarmonyOS terminal, configure the hardware environment that meets the requirements, deploy the UE5.4 engine and enable Vulkan rendering mode, and complete the plugin configuration required for animation storyboard editing and model rendering; at the same time, install the animation UE5.4 and HarmonyOS 6 interface adaptation middleware V1.0, and set up supporting development environments such as C++17 and MindSporeLite. Install the preview and debugging client on terminals such as HarmonyOS 6 tablets and smart screens to complete the update and configuration of underlying software such as HarmonyOS graphics drivers; By using the HarmonyOS distributed soft bus, the development end and the HarmonyOS terminal are paired, a low-latency local area network transmission environment is built, and a two-way communication connection is established between the two ends, laying the foundation for subsequent data transmission and command interaction.

[0028] S2. Lightweight Compression of Rendering Data: This step utilizes the AI ​​quantization lightweight layer of the middleware, employing a combination of feature distillation and INT8 quantization algorithms to lightweight process the animation model texture data and frame rendering data output by the UE5.4 engine. While maintaining rendering accuracy ≥95%, the data volume is reduced by 30%–40%. This process is divided into two stages: feature distillation preprocessing and INT8 quantization compression, with detailed operations as follows: S2.1 Feature distillation preprocessing: a pre-trained high-precision convolutional neural network is built as the teacher network, and a student network adapted to lightweight terminals is constructed at the same time. The teacher network is used to extract the core visual features of UE5.4 rendering data. The raw rendered frame data (resolution W×H×3) output from UE5.4 is input into the teacher network, and high-dimensional feature maps are extracted through convolutional layers. Where Ft is the high-dimensional feature map of the UE5.4 rendering data extracted by the teacher network; R is the real number field, representing that the numerical type of the feature map is real number; Ct is the number of channels of the feature map output by the teacher network; Wt is the width of the feature map output by the teacher network; Ht is the height of the feature map output by the teacher network. A knowledge distillation loss function is introduced to guide the student network to learn the feature distribution of the teacher network, minimizing the difference between the feature map output by the student network and the feature map of the teacher network, and preserving the core visual features such as model outline and texture details in the rendered data.

[0029] S2.2, INT8 quantization compression, performs quantization processing on the feature map output by the student network, converting 32-bit floating-point data into 8-bit integer data using the quantization formula: ; Where quant(x) is the 8-bit integer quantized value obtained by quantizing the floating-point pixel value x; x is a 32-bit floating-point pixel value in the feature map; min(x) is the minimum value of the feature map pixels; max(x) is the maximum value of the pixels in the feature map; 255 is the upper limit of the value range for an 8-bit integer. round() is the rounding function; The quantized 8-bit integer data is packaged, and quantization parameters such as min(x) and max(x) are added to the data for the HarmonyOS terminal to perform dequantization and restoration. The dequantization formula is as follows: ; Where Dequant(q) is the 32-bit floating-point pixel value restored by dequantizing the 8-bit integer quantization value q; q is the quantized 8-bit integer value; 255 is the upper limit of the value range for an 8-bit integer. max(x) is the maximum value of the pixels in the original feature map; min(x) is the minimum value of the pixels in the original feature map; x is the 32-bit floating-point pixel value in the original feature map.

[0030] S3. Rendering interface adaptation: Start the middleware's rendering interface adaptation layer, call the preset Vulkan and HarmonyOS graphics driver parameter mapping table, convert the rendering data after AI quantization and lightweighting into a format supported by HarmonyOS 6 graphics driver, and at the same time complete the protocol conversion from UE5.4 Vulkan rendering instructions to HarmonyOS graphics driver instructions. A custom low-latency UDP protocol is used to transmit the converted rendering data and instructions to the HarmonyOS terminal, with strict control over interface latency to ≤10ms; After receiving the transmitted data, the HarmonyOS terminal performs data dequantization and restoration based on the quantization parameters, and then performs screen rendering operations to achieve real-time preview of the animation project, ensuring that the preview screen is synchronized with the development editing screen.

[0031] S4. Intelligent mapping of touch operation and real-time screen update: When users perform touch operations such as clicking, swiping, and zooming on the HarmonyOS tablet, the middleware's instruction transmission layer calls the MobileNetV3 lightweight classification AI model to accurately identify the operation type with an accuracy rate of ≥99%. The recognized touch operation is intelligently mapped into model parameter adjustment instructions (position / angle / size adjustment) that can be recognized by the UE5.4 engine, and the instruction transmission is completed, ensuring that the instruction feedback delay is ≤5ms; After receiving the parameter adjustment command, the UE5.4 engine updates the animation model and rendering data in real time. Then, it repeats the AI ​​quantization and lightweight processing in step 2 and the protocol conversion and low-latency transmission process in step 3 to transmit the new rendering data to the HarmonyOS terminal, complete the real-time update of the preview screen, and realize two-way real-time interaction between the development end and the HarmonyOS terminal.

[0032] S5. Generate the HarmonyOS standard HAP installation package. After the animation project has completed the entire process of editing, previewing, and debugging on the development end and the HarmonyOS terminal, start the middleware packaging and adaptation layer: It automatically reads animation project resource files that have been optimized by AI, eliminating the need for manual processing of resource formats.

[0033] Following the HarmonyOS HAP application packaging standard, the system automatically completes the format conversion of project resources, application permission configuration, and generates a signature file that meets the requirements of the HarmonyOS application market.

[0034] After completing all configurations, a HAP format installation package that can be installed and run on multiple terminals such as HarmonyOS 6 tablets and smart screens will be generated directly. The generated installation package does not require secondary modification and can be directly compatible with HarmonyOS ecosystem terminals.

[0035] Figure 2 The diagram shows a block diagram of a HarmonyOS 6 and UE5.4 engine interface adaptation system based on AI quantization and lightweighting in one embodiment of the present invention.

[0036] like Figure 2As shown in this embodiment, the core component of the HarmonyOS 6 and UE5.4 engine interface adaptation system based on AI quantization and lightweighting is a four-layer architecture adaptation middleware (Animation UE5.4 and HarmonyOS 6 Interface Adaptation Middleware V1.0) built to achieve HarmonyOS 6 and UE5.4 engine interface adaptation. This middleware is deployed in the supporting software and hardware environment of the development end and HarmonyOS terminal. The four layers are, in order, AI quantization and lightweighting layer 100, rendering interface adaptation layer 200, instruction transmission layer 300, and packaging adaptation layer 400. Each layer has a dedicated functional sub-module. The layers and modules work together to form a complete technical closed loop of "data lightweighting - protocol conversion - intelligent interaction - standard packaging". The specific functions of each component layer and its subordinate modules are as follows: AI Quantization Lightweight Layer 100, as the core layer for data "slimming" in the system, relies on the MindSporeLite lightweight inference framework and INT8 quantization tool to achieve lightweight rendering data in UE5.4, adapting to the computing power and bandwidth limitations of HarmonyOS lightweight terminals while ensuring rendering accuracy. It consists of 3 sub-modules: The model compression module 110 uses a combination algorithm of "feature distillation + INT8 quantization" to achieve lightweight rendering data. First, the core visual features of the rendering data are extracted through the teacher network, and then the student network is guided to learn the feature distribution by the knowledge distillation loss function. Then, the 32-bit floating-point rendering data is converted into 8-bit integer data through the quantization-inverse quantization formula, which ultimately reduces the data volume by 30%-40%, and adds restoration parameters to the quantized data for use by the HarmonyOS terminal.

[0037] The Precision Standard Module 120 controls the rendering quality after data compression throughout the entire process. It preserves core visual features through feature distillation and achieves precise data conversion through quantization-inverse quantization formulas, ensuring that the rendering accuracy after compression is no less than 95% of the original data, avoiding image distortion and loss of details, and meeting the high-fidelity preview requirements of animation production.

[0038] The inference optimization module 130 optimizes the inference process of AI quantization processing to address the hardware limitations of HarmonyOS lightweight terminals. It leverages the MindSporeLite framework to improve the computational efficiency of data compression and restoration, reducing processing time on both the development and terminal sides, and laying the foundation for subsequent low-latency data transmission.

[0039] The rendering interface adaptation layer 200 acts as a "communication translator" between the UE5.4 engine and the HarmonyOS 6 system. Relying on the C++17 development environment and the HarmonyOS graphics driver, it resolves the incompatibility issues between their underlying protocols, enabling cross-terminal rendering synchronization. It comprises three sub-modules: API encapsulation module 210 encapsulates the Vulkan rendering interface of UE5.4 and the graphics driver interface of HarmonyOS 6 in a unified manner, builds a standardized adaptation interface, shields the differences between the two native interfaces, and allows the development end and the terminal to not need to care about the underlying protocol details, realizing "one-click call" of the interface.

[0040] The cross-platform rendering adaptation module 220 has a preset parameter mapping table between Vulkan and HarmonyOS graphics driver. It accurately converts the AI-quantized rendering data and UE5.4 Vulkan rendering instructions into the format and instructions supported by HarmonyOS 6 graphics driver, adapting to the rendering needs of different terminals such as HarmonyOS tablets (2.5K resolution) and smart screens (4K resolution), ensuring the consistency of preview images across multiple terminals.

[0041] The graphics resource management module 230 performs unified storage, scheduling and updating of converted graphics resources such as textures and frame data, and synchronizes with the model adjustment, scene switching and other editing operations of the UE5.4 development end in real time to avoid resource redundancy or transmission omissions and ensure that the terminal preview screen and the development end editing screen are synchronized.

[0042] The instruction transmission layer 300 enables bidirectional real-time interaction between the development end and the HarmonyOS terminal. It relies on the MobileNetV3 lightweight classification AI model and a custom low-latency UDP protocol to solve the problems of touch operation mapping and low-latency data transmission. It consists of three sub-modules: The data encryption module 310 encrypts the rendering data and touch commands during transmission to prevent data leakage or tampering, ensuring the security of animation production projects and adapting to the transmission requirements of local area network (≥100Mbps bandwidth) environments.

[0043] The protocol parsing module 320 enables bidirectional parsing of the communication protocol. On the one hand, it parses the converted rendering instructions transmitted by the development end into rendering operations that can be executed by the HarmonyOS terminal. On the other hand, it parses the touch operation instructions of the HarmonyOS terminal into a format that the lightweight AI model can recognize, and parses the parameter adjustment instructions output by the AI ​​model into a format that the UE5.4 engine can respond to, thus completing cross-platform "instruction interoperability".

[0044] The real-time transmission control module 330 adopts a custom low-latency UDP protocol and combines it with the device pairing mechanism of HarmonyOS distributed soft bus to ensure high-speed transmission of data and commands. The interface latency is strictly controlled to ≤10ms (average 8ms) and the touch command feedback latency is ≤5ms, ensuring that the terminal preview screen and the development end editing operation are synchronized in real time, and the model parameters are updated immediately after touch adjustment.

[0045] Packaging adaptation layer 400, as the core of the conversion from UE5.4 projects to HarmonyOS standard installation packages, relies on the HUAWEI DevEcoStudio toolset and HarmonyOS application packaging standards to solve the problems of cumbersome traditional packaging processes and poor compatibility, achieving one-click packaging. It consists of 3 sub-modules: The multi-format packaging module 410 reads the project resources after AI-quantified optimization, automatically completes the resource format conversion and integration required by the HarmonyOS ecosystem, builds the installation package structure according to the HarmonyOS HAP application packaging standard, and supports "one-click triggering" packaging without the need for manual adjustment of resource formats.

[0046] The signature verification module 420 integrates HarmonyOS application signing tools and permission configuration templates. During the packaging process, it automatically generates a signature file that meets the requirements of the HarmonyOS application market. At the same time, it automatically configures application permissions according to the preview, debugging, and storage functions of the animation project, without manual intervention, ensuring that the installation package meets the HarmonyOS application market listing specifications.

[0047] The compatibility testing module 430 embeds compatibility detection logic during the packaging process, automatically verifying the compatibility of the installation package on different terminals such as HarmonyOS 6 tablets and smart screens, including resolution adaptation, touch response, and running stability; ensuring that the generated installation package has a 100% installation success rate on HarmonyOS multi-terminals, without lag or crashes, and the installation package size is reduced by 35% compared to traditional solutions, with packaging time of only 3-5 minutes.

[0048] Although various embodiments of the invention have been described above, it should be understood that they are presented by way of example only and not as limitations. It will be apparent to those skilled in the art that various combinations, modifications, and alterations can be made without departing from the spirit and scope of the invention. Therefore, the breadth and scope of the invention disclosed herein should not be limited by the exemplary embodiments disclosed above, but should be defined solely by the appended claims and their equivalents.

Claims

1. A method for adapting the HarmonyOS 6 and UE5.4 engine interfaces based on AI-based quantization and lightweighting, characterized in that, include: Provides hardware and software environments for both development and terminal applications; Perform lightweight compression on the texture data and frame rendering data of the animation model output from the development end; The compressed data is converted into a format supported by the terminal graphics driver and transmitted to the terminal. After receiving the data, the terminal completes the screen rendering and real-time preview. When a user performs an operation on the terminal, a lightweight classification AI model is used to identify the type of operation. The operation is mapped to an adjustment command and sent to the development team; After receiving the command, the development team updates the animation model and synchronously transmits the updated data to the terminal; and After debugging, the animation model is packaged to generate an installation package.

2. The method according to claim 1, characterized in that, The development platform is a Windows 11 system with the UE5.4 engine, and the terminal is a HarmonyOS 6 tablet.

3. The method according to claim 1, characterized in that, The lightweight compression operation performed on the texture data and frame rendering data of the animation model output from the development end includes: The texture data and frame rendering data are compressed through feature distillation; The INT8 quantization tool is used to convert 32-bit floating-point data to 8-bit integer data.

4. The method according to claim 3, characterized in that, The data compression of the texture data and frame rendering data through feature distillation includes: A teacher network was constructed, and core visual features of UE5.4 rendered data were extracted and compared with the student network through a pre-trained convolutional neural network. The raw rendered frame data output from the UE5.4 engine is input into the teacher network at a resolution of W×H×3, and high-dimensional feature maps are extracted through convolutional layers. Where Ft is the high-dimensional feature map of the UE5.4 rendering data extracted by the teacher network; R is the real number field, representing that the numerical type of the feature map is real number; Ct is the number of channels of the feature map output by the teacher network; Wt is the width of the feature map output by the teacher network; Ht is the height of the feature map output by the teacher network. A knowledge distillation loss function is used to guide the student network to learn the feature distribution of the teacher network, thereby minimizing the differences in the feature maps output by the student network.

5. The method according to claim 3, characterized in that, The conversion from 32-bit floating-point data to 8-bit integer data using the INT8 quantization tool includes: The feature map output by the student network is quantized using the following formula, converting 32-bit floating-point data into 8-bit integer data: ; Where quant(x) is the 8-bit integer quantized value obtained by quantizing the floating-point pixel value x; x is a 32-bit floating-point pixel value in the feature map; min(x) is the minimum value of the feature map pixels; max(x) is the maximum value of the pixels in the feature map; 255 is the upper limit of the value range for an 8-bit integer. round() is the rounding function.

6. The method according to claim 3, characterized in that, It also includes packaging the quantized data and adding quantization parameters for inverse quantization restoration on HarmonyOS terminals. The inverse quantization formula is as follows: ; Where Dequant(q) is the 32-bit floating-point pixel value restored by dequantizing the 8-bit integer quantization value q; q is the quantized 8-bit integer value; 255 is the upper limit of the value range for an 8-bit integer. max(x) is the maximum value of the pixels in the original feature map; min(x) is the minimum value of the pixels in the original feature map; x is the 32-bit floating-point pixel value in the original feature map.

7. The method according to claim 1, characterized in that, The lightweight classification AI model adopts the MobileNetV3 architecture and has a size of less than 5MB.

8. The method according to claim 1, characterized in that, The process of converting the compressed data into a format supported by the terminal graphics driver includes protocol conversion via a Vulkan-HarmonyOS graphics driver parameter mapping table.

9. A HarmonyOS 6 and UE5.4 engine interface adaptation system based on AI quantization and lightweighting, characterized in that, include: The AI ​​quantization lightweight layer is configured to achieve lightweight rendering of UE5.4 rendering data, including a model compression module, a precision standard module, and an inference optimization module. The rendering interface adaptation layer is configured to achieve cross-terminal rendering synchronization, including an API encapsulation module, a cross-platform rendering adaptation module, and a graphics resource management module. The instruction transmission layer is configured to solve the problems of touch operation mapping and low-latency data transmission, including a data encryption module, a protocol parsing module, and a real-time transmission control module; The packaging adaptation layer is configured to convert UE5.4 projects into HarmonyOS standard installation packages, including a multi-format packaging module, a signature verification module, and a compatibility testing module.

10. The system according to claim 9, characterized in that, The model compression module is configured to achieve lightweight rendering data through feature distillation and INT8 quantization. The accuracy standard module is configured to retain core visual features throughout the entire process through feature distillation and to achieve data conversion using quantization-inverse quantization formulas, ensuring that the rendering accuracy after compression is not less than 95% of the original data. The inference optimization module is configured to optimize the inference process of AI quantization processing to address the hardware limitations of HarmonyOS lightweight terminals, and improve the computational efficiency of data compression and restoration by relying on the MindSporeLite framework.