A heterogeneous object model conversion method and device based on a large language model

By using large language model technology to analyze and transform heterogeneous models, the problem of interconnection and interoperability between IoT platforms has been solved, achieving seamless conversion and interoperability of devices, and improving the accuracy and universality of model conversion.

CN119358534BActive Publication Date: 2025-11-18ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411316863.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-11-18
Estimated Expiration
2044-09-20

AI Technical Summary

Technical Problem

Inconsistent object model specifications across different IoT platforms prevent devices from interconnecting, and existing technologies struggle to handle the complexity and differences between devices while ensuring universality and security.

Method used

Employing the code understanding and generation capabilities of a large language model, and through a device model parser, object model mapper, and LLM-agent, the system achieves the conversion of heterogeneous object models, including parsing, mapping, and detection processes, ensuring the accuracy and completeness of the conversion.

Benefits of technology

It achieves seamless conversion between different object models, improves the generalization ability and accuracy of model conversion, and ensures that the converted devices can interoperate and communicate with each other.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119358534B_ABST
    Figure CN119358534B_ABST
Patent Text Reader

Abstract

A heterogeneous object model conversion method and device based on a large language model, the method comprising: (1) a device model parser is responsible for loading and parsing the object model file and profile file of the device, obtaining the object model type of the device and the core function data of the device; (2) an object model mapper plays a crucial role in the object model conversion process, obtains the model mapping dictionary between different object models by learning the relationship between different device object models and related model mapping rules fine-tuning; (3) an object model converter converts the macro framework of the object model based on the model mapping dictionary, converts the core function data of the source device object model in the device model parser into the core function data of the target object model, and fills it into the object model and profile file of the target device; in order to ensure the correctness of the conversion, the converted target object model file and profile file are detected based on a large model. The application can overcome the difference between object models and provide universality of conversion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention proposes a method and apparatus for heterogeneous object model conversion based on a large language model. Addressing the problem of incompatibility between different IoT platforms due to inconsistent object model specifications, we propose a heterogeneous object model conversion framework based on a large language model. This framework utilizes the code understanding and generation capabilities of the large language model to convert the source object model into the target object model and performs necessity checks, thus achieving conversion between heterogeneous object models. Technical Background

[0002] An object model is an abstract descriptive method that aims to define in detail the attributes of a device (such as color and size) and describe in detail the functions or services it provides (such as lighting and cooling). Object models use a unified language to describe, control, and understand device functions, and are the foundation for achieving interconnectivity between IoT devices.

[0003] Currently, major IoT platforms all have their own custom object model specifications. This lack of standardization among platforms prevents devices from interoperating. To address this issue, platforms aim to build object model conversion capabilities, enabling custom object models to interoperate with industry-standard object models. The current challenge in object model conversion technology lies in ensuring broad applicability and handling the complexity and differences between various devices simultaneously. This includes not only the correct abstraction of various device functions, the definition of unified data formats, and the implementation of cross-platform interoperability, but also support for multiple languages ​​and rapid debugging while ensuring security. Summary of the Invention

[0004] To overcome the inability of devices from different platform vendors to achieve interoperability due to differences between object models, and to provide universality for conversion, this invention provides a method and apparatus for heterogeneous object model conversion based on a large language model.

[0005] This invention leverages the powerful code understanding and generation capabilities of large language models to address the differences and complexities in the conversion process between different object models. Overall, the heterogeneous object model conversion technology framework based on large language models includes a device model parser, an object model mapper, an object model converter, and an LLM-agent. The device model parser parses the object model and profile file of the source device to obtain the object model type and core functional data of the source device. The object model mapper contains a model mapping dictionary between different object models, providing a macro-level conversion framework for the object model converter. The object model converter then populates the macro-level conversion framework with the core functional data of the parsed device object model and performs a reliable conversion check on the converted target object model and profile file. Once the check passes, the final heterogeneous object model conversion is complete. The LLM-agent primarily provides an interface supporting large language models, assisting in completing various complex tasks.

[0006] (1) A heterogeneous object model conversion method based on a large language model, comprising the following steps: The device model parser is responsible for loading and parsing the object model file and profile file of the device to obtain the object model type and core functional data of the device. The main steps are as follows:

[0007] Step (1.1): First, obtain the object model file and profile file of the current device and load them into the device model parser.

[0008] Step (1.2): The LLM-agent uses the large language model to parse the device's object model file and profile file to obtain the device's object model type and core functional data. At this point, the device model parser has completed the parsing of the device's object model and profile files.

[0009] (2) The object model mapper plays a crucial role in the object model conversion process. By learning the relationships between different device object models and fine-tuning the relevant model mapping rules, a model mapping dictionary between different object models is obtained. The main steps are as follows:

[0010] Step (2.1): First, obtain the object model files and profile files of different devices from different manufacturers and platforms, including the device's attributes, commands, events and other descriptive information, as a large model pre-training dataset.

[0011] Step (2.2): The LLM-agent pre-trains the large language model based on the dataset, and finds the intrinsic mapping relationship between different object models by learning the intrinsic connections between them.

[0012] Step (2.3): Based on the relevant model mapping rules, fine-tune the pre-trained large model to strengthen the mapping relationship logic between different object models.

[0013] Step (2.4): Based on the parsing results of the device model parser, obtain the source device object model type, and combine it with the object model type of the target device to obtain the source device-target device model mapping dictionary, and provide it to the object model converter.

[0014] (3) The object model converter performs macroscopic framework conversion of the object model based on the model mapping dictionary. Simultaneously, it converts the core functional data of the source device object model in the device model parser into the core functional data of the target object model and populates it into the object model and profile files of the target device. To ensure the correctness of the conversion, conversion checks are performed on the converted target object model file and profile file based on the large model. The main steps are as follows:

[0015] Step (3.1): The object model converter converts the framework of the source device object model file and profile file into the framework of the target device object model file and profile file based on the model mapping dictionary.

[0016] Step (3.2): The LLM-agent extracts the core functional data of the source device object model file and profile file parsed by the model parser, and fills in the core data of the source device-target device object model file and profile file based on the large language model.

[0017] Step (3.3): To ensure the reliability of the conversion, the completed target device model file and profile file need to be checked. LLM-agent utilizes the powerful code understanding and analysis capabilities of the large language model to check the syntax rules, core data conversion integrity, and accuracy of the converted target device model file and profile file. If the expected detection requirements are not met, return to step 3.2 for re-conversion.

[0018] A second aspect of the present invention relates to a heterogeneous model conversion apparatus based on a large language model, comprising a memory and one or more processors, wherein the memory stores executable code, and the one or more processors execute the executable code to implement a heterogeneous model conversion method based on a large language model according to the present invention.

[0019] A third aspect of the invention relates to a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements a heterogeneous model conversion method based on a large language model according to the invention.

[0020] The working principle of this invention is:

[0021] (1) This invention uses large language model technology to analyze and identify the structure of different object models, and obtain the corresponding object model type and core function data.

[0022] (2) Construct corresponding semantic and grammatical mapping rules at the semantic and grammatical layers to realize the conversion between different object model structures and code languages, ensuring semantic consistency and interoperability between different models.

[0023] (3) After completing the basic object model framework conversion, fill in the corresponding functional information and perform necessary conversion checks to ensure the accuracy and completeness of the conversion.

[0024] The advantages of this invention are:

[0025] (1) This invention uses the large language model method to enhance the semantic understanding ability of the object model, and by utilizing the rich semantic knowledge of the large language model (LLM), it can more deeply process the conversion between object models and parse the functional data information in the object model.

[0026] (2) Based on the large language model method, this invention effectively solves the problems of complexity and universality between object model conversions. It can automatically convert based on different object model frameworks without setting complex and unified conversion rules, which facilitates the improvement of the generalization ability of model conversion.

[0027] (3) The present invention adds a model conversion detection module, which evaluates the accuracy and completeness of model conversion based on the existing code evaluation large language model, and ensures that the converted object model is complete and accurate. Attached Figure Description

[0028] Figure 1 This is a framework diagram of the method of the present invention.

[0029] Figure 2 This is a flowchart of the conversion process of the present invention. Detailed Implementation

[0030] The specific embodiments of the present invention are further described below with reference to the accompanying drawings.

[0031] Example 1

[0032] This embodiment relates to a method for device interconnection between Internet platforms based on a heterogeneous model conversion method using a large language model, comprising the following steps:

[0033] Step 1: Implement the parsing function of the device model parser. For example... Figure 2The device model parser in this invention is based on a large language model to complete device parsing. The parsing is divided into two parts: (1) parsing the object model and profile file to obtain the corresponding device object model type. (2) parsing the object model and profile file to extract the core functional data of the device.

[0034] (1) First, the device files of different manufacturers' platforms are used as the dataset for training the large language model. Then, the learning is fine-tuned through the relevant device model specifications. Finally, the parsing large language model can obtain the device's device model type through the device's device model and profile file.

[0035] (2) The large language model has powerful text understanding capabilities. Therefore, the large language model can extract core functional data from the description information such as attributes, events and services in the device object model and profile file by obtaining the object model type and corresponding format.

[0036] Step 2: Implement model mapping for object models to obtain a model mapping dictionary. First, obtain object model files and profile files for different devices from different manufacturers and platforms, including descriptive information such as device attributes, commands, and events, as a pre-training dataset for the large model. Then, the LLM-agent pre-trains and fine-tunes the large language model based on the dataset and relevant model mapping rules. By learning the intrinsic connections between different object models, it finds the inherent mapping relationships between them, ultimately obtaining a model mapping dictionary database for different source devices and target devices.

[0037] Step 3: Implement object model conversion and conversion detection.

[0038] (1) Object model conversion is a code conversion based on the model mapping dictionary and the parsed core functional data. The model mapping dictionary provides a macro framework for object model conversion, and the parsed core functional data is converted into target code based on the code of the large language model and populated into the target object model and profile file.

[0039] (2) The conversion detection is to ensure the credibility of the object model conversion. Based on the CodeFuseEval large language model, the object model conversion file is comprehensively evaluated for its syntax, functional correctness and completeness.

[0040] (2.1) Syntax correctness detection: The CodeFuseEval large language model performs syntax detection based on the transformed object model and profile file, and provides a syntax evaluation index α1.

[0041] (2.2) Functional correctness and completeness detection: The CodeFuseEval large language model performs functional correctness and completeness detection by comparing it with the source device model, profile file, and target file. Utilizing the text understanding capability of the large language model, the code language meaning between the source file and the target file is compared to obtain the functional correctness index α2 and the completeness evaluation index α3.

[0042] (2.3) The correctness of the syntax rules of the object model and profile file is judged based on the syntax evaluation index α1. If α1 is higher than 0.9, it is considered to be grammatically correct and the credibility evaluation in 2.4 is carried out. Otherwise, the object model conversion step is repeated.

[0043] (2.4) Based on the functional completeness and correctness evaluation indicators, the F1-score is obtained as the credibility of the object model conversion, F1-score = 2(α2+α3) / α2×α3. If the credibility is higher than the preset threshold K, the object model conversion is considered to be basically successful; otherwise, the object model conversion step is repeated.

[0044] Step 4: Implement device conversion and usage. For example, this invention enables a Huawei mobile phone's device app to control a Xiaomi device's light to switch on and off. When the Huawei mobile phone issues a control command, the object model converter can transform the Huawei device's object model into the Xiaomi device's object model structure and fill in the corresponding operation data information (such as attributes, commands, and event lights), making the object model compatible with the Xiaomi device. This allows the Huawei mobile phone's device app to control the Xiaomi light's on and off, completing the conversion between different heterogeneous object model devices.

[0045] Example 2

[0046] This embodiment relates to a heterogeneous model conversion device based on a large language model, including a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, they are used to implement a heterogeneous model conversion method based on a large language model according to Embodiment 1.

[0047] Example 3

[0048] This embodiment relates to a computer-readable storage medium storing a program that, when executed by a processor, implements a heterogeneous model conversion method based on a large language model as described in Embodiment 1.

[0049] The embodiments described in this specification are merely examples of implementations of the inventive concept. The scope of protection of this invention should not be considered as limited to the specific forms stated in the embodiments. The scope of protection of this invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.

Claims

1. A heterogeneous model conversion method based on a large language model, characterized in that: Includes the following steps: (1) The device model parser is responsible for loading and parsing the device's physical model file and profile file to obtain the device's physical model type and core functional data; specifically including: Step (1.1): First, obtain the object model file and profile file of the current device and load them into the device model parser; Step (1.2): The LLM-agent uses the large language model to parse the device's object model file and profile file to obtain the device's object model type and core function data; at this point, the device model parser has completed the parsing of the device's object model and profile files. (2) By learning the relationships between different device models and fine-tuning the related model mapping rules, a model mapping dictionary between different device models is obtained; (3) The object model converter performs macroscopic framework conversion of the object model based on the model mapping dictionary. Simultaneously, it converts the core functional data of the source device object model in the device model parser into the core functional data of the target object model and populates it into the object model and profile files of the target device. To ensure the correctness of the conversion, conversion checks are performed on the converted target object model file and profile file based on the large model. Specifically, this includes: Step (3.1): The object model converter converts the framework of the source device object model file and profile file into the framework of the target device object model file and profile file based on the model mapping dictionary; Step (3.2): The LLM-agent extracts the core functional data of the source device object model file and profile file parsed by the model parser, and fills in the core data of the source device-target device object model file and profile file based on the large language model; Step (3.3): To ensure the credibility of the conversion, the conversion of the completed target object model file and profile file needs to be checked; LLM-agent uses the powerful code understanding and analysis capabilities of the large language model to check the syntax rules, core data conversion integrity and accuracy of the converted target object model file and profile file; if the expected detection requirements cannot be met, return to step (3.2) to re-convert.

2. The heterogeneous model conversion method based on a large language model as described in claim 1, characterized in that: Step (2) specifically includes: Step (2.1): First, obtain the object model files and profile files of different devices from different manufacturers and platforms, including the device's attributes, commands, and event descriptions, as a large model pre-training dataset; Step (2.2): The LLM-agent pre-trains the large language model based on the dataset, and finds the intrinsic mapping relationship between different object models by learning the intrinsic connection between them. Step (2.3): Based on the relevant model mapping rules, fine-tune the pre-trained large model to strengthen the mapping relationship logic between different object models; Step (2.4): Based on the parsing results of the device model parser, obtain the source device object model type, and combine it with the object model type of the target device to obtain the source device-target device model mapping dictionary, and provide it to the object model converter.

3. A heterogeneous model conversion device based on a large language model, characterized in that, The device includes a memory and one or more processors, wherein the memory stores executable code, and the one or more processors execute the executable code to implement the heterogeneous model conversion method based on a large language model as described in any one of claims 1-2.

4. A computer-readable storage medium, characterized in that, It stores a program that, when executed by a processor, implements the heterogeneous model conversion method based on a large language model as described in any one of claims 1-2.

Citation Information

Patent Citations

  • Equipment operation management method and device, equipment and storage medium

    CN114896751A

  • Data processing method and device based on object model and electronic equipment

    CN116319892A