Data transmission method and device and electronic equipment
By obtaining and converting the meta-model of the IoT system, the problem of inconsistent meta-models between different IoT systems is solved, and data interoperability and system interoperability are achieved.
Patent Information
- Application Number
- CN202410774576.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-06
AI Technical Summary
The metamodels used between different IoT systems are not unified and syntax interoperability cannot be achieved.
By obtaining the meta-model of the source IoT system and the target IoT system, determine whether the two match. If they do not match, convert the meta-model of the source IoT system into the meta-model of the target IoT system, and convert the data according to the target system Supported formats for transmission.
It realizes data interoperability between different IoT systems, improves the interoperability of IoT systems, and solves interoperability problems caused by inconsistency in meta-models.
Smart Images

Figure CN118612291A
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method, device and electronic device for data transmission. Background Art
[0002] The Internet of Things is a technology that connects various physical devices, virtual devices, services and information through the network. It can realize intelligent interaction and collaboration between things, things and people, and people. The Internet of Things system is composed of a variety of heterogeneous network elements, such as sensors, actuators, terminal devices, gateways, cloud platforms, etc. They have different functions, protocols, data formats and other characteristics. Therefore, achieving interconnection between Internet of Things systems is an important and complex task.
[0003] In order to solve the interconnection problem between IoT systems, it is necessary to consider the interoperability of IoT systems, that is, the ability of IoT systems to effectively exchange information and collaborate with other IoT systems or external environments. However, in related technologies, the metamodels used by different IoT systems are not unified, and grammatical interoperability cannot be achieved.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a method, device and electronic device for data transmission, so as to at least solve the technical problem in the related art that the meta-models used between different Internet of Things systems are not unified and grammatical interoperability cannot be achieved.
[0006] According to one aspect of an embodiment of the present application, a method for data transmission is provided, including: obtaining a first metamodel corresponding to a source Internet of Things system, and obtaining a second metamodel corresponding to a target Internet of Things system, wherein the first metamodel is used to represent the structural relationship and semantic information between entity elements in the source Internet of Things system, and the second metamodel is used to represent the structural relationship and semantic information between entity elements in the target Internet of Things system; determining whether the first metamodel matches the second metamodel to obtain a matching result; if the matching result indicates that the first metamodel and the second metamodel do not match, converting the first metamodel into the second metamodel, and transmitting data from the source Internet of Things system to the target Internet of Things system in a format supported by the second metamodel.
[0007] Optionally, obtaining a first metamodel corresponding to the source Internet of Things system and obtaining a second metamodel corresponding to the target Internet of Things system include: obtaining a first data information set sent by all devices in the source Internet of Things system and obtaining a second data information set sent by all devices in the target Internet of Things system; determining a first entity element, a first relationship element, a first attribute element, and a first rule element contained in the source Internet of Things system based on the first data information set, wherein the first relationship element is used to represent the association relationship between the first entity elements, the first attribute element is used to represent the attribute of the data information in the source Internet of Things system, and the first rule element is used to represent the transmission rule satisfied by the data information in the source Internet of Things system; determining a second entity element, a second relationship element, a second attribute element, and a second rule element contained in the target Internet of Things system based on the second data information set, wherein the second relationship element is used to represent the association relationship between the second entity elements, the second attribute element is used to represent the attribute of the data information in the target Internet of Things system, and the second rule element is used to represent the transmission rule satisfied by the data information in the target Internet of Things system; determining the first metamodel based on the first entity element, the first relationship element, the first attribute element, and the first rule element; and determining the second metamodel based on the second entity element, the second relationship element, the second attribute element, and the second rule element.
[0008] Optionally, the method also includes: determining a first association relationship between a first attribute element and a first entity element or a first relationship element, and determining a first constraint relationship between a first rule element and the first entity element or the first relationship element or the first attribute element; determining a second association relationship between a second attribute element and a second entity element or a second relationship element, and determining a second constraint relationship between a second rule element and a second entity element or a second relationship element or a second attribute element; determining a first meta-model based on the first entity element, the first relationship element, the first attribute element, the first rule element, the first association relationship and the first constraint relationship; determining a second meta-model based on the second entity element, the second relationship element, the second attribute element, the second rule element, the second association relationship and the second constraint relationship.
[0009] Optionally, determining whether the first metamodel matches the second metamodel to obtain a matching result includes: obtaining a first entity element, a first relationship element, a first attribute element, and a first rule element in the first metamodel, and obtaining a second entity element, a second relationship element, a second attribute element, and a second rule element in the second metamodel; matching the first entity element and the second entity element, the first relationship element and the second relationship element, the first attribute element and the second attribute element, the first rule element and the second rule element, respectively, to obtain a first matching result, a second matching result, a third matching result, and a fourth matching result; determining the matching result based on the first matching result, the second matching result, the third matching result, and the fourth matching result.
[0010] Optionally, the method also includes: determining that the first metamodel and the second metamodel match when the first matching result indicates that the first entity element and the second entity element are identical or compatible, the second matching result indicates that the first relationship element and the second relationship are identical or compatible, the third matching result indicates that the first attribute element and the second attribute element are identical or compatible, and the fourth matching result indicates that the first rule element and the second rule element are identical or compatible; and determining that the first metamodel and the second metamodel do not match when the first matching result or the second matching result or the third matching result or the fourth matching result indicates that the corresponding elements are not identical or incompatible.
[0011] Optionally, when the matching result indicates that the first metamodel and the second metamodel do not match, the first metamodel is converted into the second metamodel, including: determining a target element that does not match the first metamodel and the second metamodel, wherein the target element is a first target element in the first metamodel and the target element is a second target element in the second metamodel; mapping the first target element to the second target element, and updating other elements associated with the first target element in the first metamodel to convert the first metamodel corresponding to the source Internet of Things system into the second metamodel.
[0012] Optionally, the method also includes: when the matching result indicates that the first metamodel and the second metamodel match, determining the grammatical interoperability rules between the source Internet of Things system and the target Internet of Things system; performing information conversion on the data in the source Internet of Things system according to the grammatical interoperability rules, and transmitting the converted data to the target Internet of Things system, wherein the information conversion includes at least one of the following: data format conversion, data encoding method conversion, and data transmission protocol conversion.
[0013] According to another aspect of an embodiment of the present application, a device for data transmission is also provided, including: an acquisition module, used to acquire a first metamodel corresponding to a source Internet of Things system, and to acquire a second metamodel corresponding to a target Internet of Things system, wherein the first metamodel is used to represent the structural relationship and semantic information between entity elements in the source Internet of Things system, and the second metamodel is used to represent the structural relationship and semantic information between entity elements in the target Internet of Things system; a determination module, used to determine whether the first metamodel matches the second metamodel and obtain a matching result; a conversion module, used to convert the first metamodel into the second metamodel when the matching result indicates that the first metamodel and the second metamodel do not match, and transmit the data from the source Internet of Things system to the target Internet of Things system in a format supported by the second metamodel.
[0014] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including: a memory and a processor, wherein the memory is used to store program instructions; and the processor is connected to the memory and is used to execute the above-mentioned data transmission method.
[0015] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, which includes a stored computer program, wherein a device where the non-volatile storage medium is located executes the above-mentioned data transmission method by running the computer program.
[0016] According to another aspect of the embodiments of the present application, a computer program product is provided, including computer instructions, which implement the above-mentioned data transmission method when executed by a processor.
[0017] In an embodiment of the present application, a first metamodel corresponding to a source Internet of Things system is obtained, and a second metamodel corresponding to a target Internet of Things system is obtained, wherein the first metamodel is used to represent the structural relationship and semantic information between entity elements in the source Internet of Things system, and the second metamodel is used to represent the structural relationship and semantic information between entity elements in the target Internet of Things system; it is determined whether the first metamodel matches the second metamodel to obtain a matching result; when the matching result indicates that the first metamodel and the second metamodel do not match, the first metamodel is converted into the second metamodel, and the data is transmitted from the source Internet of Things system to the target Internet of Things system in a format supported by the second metamodel, thereby achieving the purpose of data intercommunication between different Internet of Things systems, thereby achieving the technical effect of improving the interoperability of the Internet of Things system, and further solving the technical problem in the related technology that the metamodels used between different Internet of Things systems are not unified and grammatical interoperability cannot be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a method for data transmission according to an embodiment of the present application;
[0020] Figure 2 is a flow chart of a method for data transmission according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of a metamodel of an Internet of Things system (smart home) according to an embodiment of the present application;
[0022] Figure 4 It is a structural diagram of a data transmission device according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] The information collected in the embodiments of the present application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or reject automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.
[0026] The interoperability between IoT systems can be divided into three levels: syntactic interoperability, semantic interoperability, and behavioral interoperability. Syntactic interoperability refers to the ability of an IoT system to understand the information format of another IoT system, providing support for information interaction between IoT systems. Syntactic interoperability supports data exchange from the source system to the target system through the conversion between the metamodel of one IoT system (source system or source IoT system) and the metamodel of another IoT system (target system or target IoT system). A model is a formal expression obtained by abstracting certain features of actual data information. The metamodel is a further description of the concepts, relationships, rules, etc. in the model based on the abstract syntax of a specific modeling language, that is, the model of the model. The metamodel can describe the structure, attributes, constraints and other characteristics of data information in an IoT system, and provide a unified and standardized expression method for data information.
[0027] In related technologies, some research works have been devoted to proposing metamodels of different types or fields, such as sensor network metamodel, smart home metamodel, smart grid metamodel, etc., as well as some general or standardized metamodels, such as MOF (Meta-Object Facility) proposed by OMG (Object Management Group) and EMF (Eclipse Modeling Framework) proposed by Eclipse Foundation, etc. These metamodels can help IoT systems in different fields or application scenarios to model and express data information, but they are not compatible or unified, resulting in the inability to achieve grammatical interoperability between different IoT systems.
[0028] In order to solve the problems existing in the related technologies, realize the conversion and mapping between different meta-models, and realize the grammatical interoperability between IoT systems, the embodiment of the present application provides a method for data transmission, which can be run on Figure 1 In the computer terminal shown, the computer terminal is explained below.
[0029] The data transmission method embodiment provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a method for data transmission. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions connected via a wired and / or wireless network. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0030] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0031] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data transmission method in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned data transmission method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0032] The transmission module 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0033] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0034] It should be noted that, in some optional embodiments, the above Figure 1 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.
[0035] In the above-mentioned operating environment, an embodiment of the present application provides a method embodiment of data transmission. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] Figure 2 is a flow chart of a method for data transmission according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0037] Step S202: obtaining a first metamodel corresponding to the source Internet of Things system and a second metamodel corresponding to the target Internet of Things system, wherein the first metamodel is used to represent the structural relationship and semantic information between entity elements in the source Internet of Things system, and the second metamodel is used to represent the structural relationship and semantic information between entity elements in the target Internet of Things system.
[0038] In the above step S202, the entity type involved in the data information in the Internet of Things system may be, for example, a sensor, a device, a controller, etc. The entity type may be used to determine the entity elements contained in the metamodel in the Internet of Things system, that is, the entity type and the entity element are essentially the same. The metamodel is an abstract description of how the entity elements in the Internet of Things system are related to and combined with each other. The metamodel may provide the types, attributes, relationships, and constraints between the entity elements, thereby representing the overall structure and semantic information of the Internet of Things.
[0039] Step S204: determine whether the first metamodel matches the second metamodel, and obtain a matching result.
[0040] In the above step S204, by comparing and analyzing each content of the first metamodel and the second metamodel, the differences in structure and semantics between the two IoT systems (i.e., the above source IoT system and the target IoT system) can be understood, so as to determine whether metamodel conversion is required to ensure that data can be correctly and effectively transmitted and exchanged between different IoT systems.
[0041] Step S206: when the matching result indicates that the first metamodel and the second metamodel do not match, the first metamodel is converted into the second metamodel, and the data is transmitted from the source Internet of Things system to the target Internet of Things system in a format supported by the second metamodel.
[0042] In the above step S206, based on the matching results, it can be determined whether the two metamodels match, and the matching criteria may include but are not limited to: the correspondence between entity types, consistency of attributes, compatibility of relationships, and satisfaction of constraints, etc. If the two metamodels have a high degree of similarity or consistency in these aspects, they can be considered to be matched. If they do not match, it means that there are significant differences in data structure and semantics between the source IoT system and the target IoT system, and data exchange and intercommunication cannot be performed directly. In this case, in order to achieve smooth data transmission and interoperability between systems, it is necessary to convert the first metamodel into the second metamodel, and transmit the data in the format supported by the target system.
[0043] In some embodiments of the present application, the goal of metamodel conversion is to make the first metamodel consistent with the second metamodel in structure and semantics so that it can be correctly parsed and processed by the target Internet of Things system. During the conversion process, it may be necessary to map the entity types in the source system, adjust the naming and type of the attributes, and express the conversion relationship. After completing the conversion of the metamodel, data can be transmitted in the format supported by the target Internet of Things system. In the process of data transmission, it is usually involved to format the data in the source system according to the definition of the second metamodel to ensure that the data can be correctly identified and parsed by the target system during the transmission process, such as converting the data into a specific data structure, using a specific encoding method or protocol for encapsulation, etc. Through this conversion and formatting, the data of the source Internet of Things system can be transmitted to the target Internet of Things system in a way that the target system can understand, thereby realizing data intercommunication and interoperability between systems. This not only helps to break down the data barriers between different systems, but also promotes the integration and fusion of the Internet of Things system and improves the efficiency and performance of the overall system.
[0044] Through the above steps S202 to S206, the purpose of data intercommunication between different IoTs is achieved, thereby achieving the technical effect of improving the interoperability of IoT systems, and further solving the technical problem in the related art that the metamodels used by different IoT systems are not unified and syntax interoperability cannot be achieved. The following is a detailed description.
[0045] In step S202 of the above-mentioned data transmission method, obtaining a first metamodel corresponding to the source Internet of Things system and obtaining a second metamodel corresponding to the target Internet of Things system include: obtaining a first data information set sent by all devices in the source Internet of Things system, and obtaining a second data information set sent by all devices in the target Internet of Things system; determining a first entity element, a first relationship element, a first attribute element, and a first rule element contained in the source Internet of Things system according to the first data information set, wherein the first relationship element is used to represent the association relationship between the first entity elements, the first attribute element is used to represent the attribute of the data information in the source Internet of Things system, and the first rule element is used to represent the transmission rule satisfied by the data information in the source Internet of Things system; determining a second entity element, a second relationship element, a second attribute element, and a second rule element contained in the target Internet of Things system according to the second data information set, wherein the second relationship element is used to represent the association relationship between the second entity elements, the second attribute element is used to represent the attribute of the data information in the target Internet of Things system, and the second rule element is used to represent the transmission rule satisfied by the data information in the target Internet of Things system; determining a first metamodel according to the first entity element, the first relationship element, the first attribute element, and the first rule element; and determining a second metamodel according to the second entity element, the second relationship element, the second attribute element, and the second rule element.
[0046] In some embodiments of the present application, the first relationship element and the second relationship element may be collectively referred to as relationship elements, and relationship elements are used to represent the association relationship between entity elements, such as the connection relationship between sensors and controllers, the communication relationship between devices, etc.; the first attribute element and the second attribute element may be collectively referred to as attribute elements, and attribute elements are used to represent the attributes of data information transmitted by entity elements, such as data type, value range, constraint conditions, frequency of occurrence, etc.; the first rule element and the second rule element may be collectively referred to as rule elements, and rule elements are used to determine the transmission rules according to the data information, such as the data transmission frequency, transmission protocol, format, etc. Thus, the meta-model corresponding to the Internet of Things system is determined according to the entity elements, relationship elements, attribute elements, and rule elements.
[0047] In the above-mentioned data transmission method, determining the first metamodel and the second metamodel also includes: determining a first association relationship between the first attribute element and the first entity element or the first relationship element, and determining a first constraint relationship between the first rule element and the first entity element or the first relationship element or the first attribute element; determining a second association relationship between the second attribute element and the second entity element or the second relationship element, and determining a second constraint relationship between the second rule element and the second entity element or the second relationship element or the second attribute element; determining the first metamodel based on the first entity element, the first relationship element, the first attribute element, the first rule element, the first association relationship and the first constraint relationship; determining the second metamodel based on the second entity element, the second relationship element, the second attribute element, the second rule element, the second association relationship and the second constraint relationship.
[0048] In the embodiment of the present application, when determining the meta-model, in addition to considering the above-mentioned entity elements, relationship elements, attribute elements, and rule elements, it is also necessary to consider the association relationship and the constraint relationship. Specifically, the first association relationship and the second association relationship can be collectively referred to as an association relationship, which includes the association relationship between the attribute element and the entity element, for example, the "current temperature" attribute of a temperature sensor is directly associated with the sensor entity itself; the association relationship can also include the association relationship between the attribute element and the relationship element, for example, a "data transmission rate" attribute may be associated with the communication relationship between two devices. The first constraint relationship and the second constraint relationship can be collectively referred to as a constraint relationship, which can represent the constraint relationship between the rule element and the entity element, indicating how the rule restricts or affects the behavior or state of the entity, for example, a rule may stipulate that a certain type of sensor must send data once every minute; the constraint relationship can also represent the constraint relationship between the rule element and the relationship element, for example, the communication protocol or frequency between the two devices may be constrained by a specific rule; in addition, the constraint relationship can also represent the constraint relationship between the rule element and the attribute element, that is, the rule can limit the value range or format of the attribute. For example, the temperature properties of a temperature sensor may be limited to between -40°C and 100°C.
[0049] After the first metamodel and the second metamodel are determined, the metamodels may be described and represented by a formal language, such as XML, JSON, etc.
[0050] In step S204 of the above-mentioned data transmission method, determining whether the first metamodel matches the second metamodel to obtain a matching result includes: obtaining a first entity element, a first relationship element, a first attribute element, and a first rule element in the first metamodel, and obtaining a second entity element, a second relationship element, a second attribute element, and a second rule element in the second metamodel; matching the first entity element and the second entity element, the first relationship element and the second relationship element, the first attribute element and the second attribute element, the first rule element and the second rule element respectively to obtain a first matching result, a second matching result, a third matching result, and a fourth matching result; determining the matching result based on the first matching result, the second matching result, the third matching result, and the fourth matching result.
[0051] In the above-mentioned data transmission method, the method also includes: determining that the first metamodel and the second metamodel match when the first matching result indicates that the first entity element and the second entity element are identical or compatible, the second matching result indicates that the first relationship element and the second relationship are identical or compatible, the third matching result indicates that the first attribute element and the second attribute element are identical or compatible, and the fourth matching result indicates that the first rule element and the second rule element are identical or compatible; determining that the first metamodel and the second metamodel do not match when the first matching result or the second matching result or the third matching result or the fourth matching result indicates that the corresponding elements are not identical or incompatible.
[0052] In an embodiment of the present application, when an IoT system (i.e., the source IoT system) needs to exchange data with another IoT system (i.e., the target IoT system), it is first necessary to detect whether the metamodels of the two IoT systems match, that is, whether they have the same or compatible entity elements, relationship elements, attribute elements, and rule elements. That is, when determining whether the first metamodel matches the second metamodel, it is necessary to evaluate each matching result one by one and comprehensively judge their matching degree. Specifically, the indication content of the first matching result is used to indicate whether the first entity element and the second entity element are the same or compatible. For example, if the entity elements in the two metamodels are the same or can be replaced by each other (i.e., compatible) in terms of type, function, quantity, etc., they are considered to match. The indication content of the second matching result is used to indicate whether the first relationship element and the second relationship element are the same or compatible. For example, if the association methods described by the relationship elements in the two metamodels are the same, or these association methods are logically consistent, then they are considered to match. The indication content of the third matching result is used to indicate whether the first attribute element and the second attribute element are the same or compatible. For example, if the attribute elements in the two metamodels are the same or can correspond to each other in terms of name, data type, value range, etc., they are considered to match. The indication content of the fourth matching result is used to indicate whether the first rule element and the second rule element are identical or compatible. The rule elements define constraints on data transmission or system operation. For example, if the rule elements in the two metamodels are identical or can satisfy each other in terms of constraints, application scope, etc., they are considered to be matched.
[0053] For the determination of matching results, only when all four matching results indicate that the corresponding elements are identical or compatible, can the first metamodel and the second metamodel be determined to be matched. This means that the two metamodels have high consistency in entities, relationships, attributes, and rules, and can be considered to be similar in structure and semantics. As long as one matching result indicates that the corresponding elements are not identical or compatible, it can be determined that the first metamodel and the second metamodel are not matched. This means that there are inconsistencies in some key aspects of the two metamodels, which leads to problems in data intercommunication or system interoperability. Through the above-mentioned matching condition analysis and result determination, the matching degree between the first metamodel and the second metamodel can be systematically evaluated, providing a clear decision basis for subsequent model integration, data exchange, or system interoperability. This matching method ensures the consistency and compatibility between metamodels, thereby improving the interoperability between IoT systems.
[0054] In step S204 of the above-mentioned data transmission method, when the matching result indicates that the first metamodel and the second metamodel do not match, the first metamodel is converted into the second metamodel, including: determining a target element that does not match the first metamodel and the second metamodel, wherein the target element is the first target element in the first metamodel and the target element is the second target element in the second metamodel; mapping the first target element to the second target element, and updating other elements associated with the first target element in the first metamodel to convert the first metamodel corresponding to the source Internet of Things system into the second metamodel.
[0055] In an embodiment of the present application, when comparing two metamodels, it will be found that there are mismatches between certain elements (such as entities, relationships, attributes or rules), and these mismatched elements are referred to as target elements. Among them, in the first metamodel, these mismatched elements are referred to as first target elements, and in the second metamodel, the corresponding mismatched elements are referred to as second target elements. In the process of element mapping, it may be involved to change the name, type, attribute or other characteristics of the elements in the first metamodel so that they match the elements in the second metamodel. In addition, since the elements in the metamodel are interrelated, changing one element may affect other elements. After mapping the first target element, it is necessary to check and update other elements associated with the element in the first metamodel to ensure the consistency and integrity of the entire metamodel. It should be noted that this update may involve modifying relationships, adjusting attributes or redefining rules.
[0056] When performing metamodel conversion, it should be ensured that the converted first metamodel is semantically consistent with the second metamodel, that is, they can describe the same or similar IoT system structure and behavior. In addition, during the conversion process, unnecessary complexity should be reduced as much as possible to improve the efficiency and accuracy of the conversion, and the specific needs and characteristics of the IoT system should be considered to ensure that the converted metamodel can support the normal operation and interoperability of the system.
[0057] In the above-mentioned data transmission method, the method also includes: when the matching result indicates that the first metamodel and the second metamodel match, determining the grammatical interoperability rules between the source Internet of Things system and the target Internet of Things system; performing information conversion on the data in the source Internet of Things system according to the grammatical interoperability rules, and transmitting the converted data to the target Internet of Things system, wherein the information conversion includes at least one of the following: data format conversion, data encoding method conversion and data transmission protocol conversion.
[0058] In an embodiment of the present application, when the matching results show that the first metamodel (representing the source IoT system) and the second metamodel (representing the target IoT system) match, it means that there is a high degree of compatibility and consistency between the two systems, and the grammatical interoperability rules between them can be further determined. Specifically: Based on the matching results of the metamodel, it is necessary to clarify the interoperability principles between the source IoT system and the target IoT system at the grammatical level, including determining the specifications, message formats, communication protocols, etc. for data interaction. It is also necessary to clarify the IoT device information requirements related to grammatical interoperability, such as the device's data interface, communication capabilities, etc., to ensure that data can be transmitted smoothly between different systems. It is also necessary to formulate information exchange rules between IoT devices from a grammatical perspective. These rules will serve as a guide for data interoperability between the source system and the target system.
[0059] After the grammatical interoperability rules are determined, the data in the source IoT system can be transformed so that it can be transmitted to the target IoT system. The information transformation may involve at least one of the following operations:
[0060] 1. Data format conversion: Data formats may vary from system to system, so format conversion is required to adapt to the requirements of the target system. For example, converting XML format data to JSON format, or converting one specific data structure to another.
[0061] 2. Data encoding conversion: Different IoT systems may use different data encoding methods. Therefore, before data transmission, encoding conversion may be required to ensure data accuracy and readability.
[0062] 3. Data transmission protocol conversion: Protocol conversion is a key step to ensure that data can be transmitted smoothly between different systems. Protocol conversion is required when the source system and the target system use different communication protocols. It usually involves the use of a protocol converter or adapter to convert data from one protocol to another protocol.
[0063] After the information conversion is completed, the converted data can be transmitted to the target IoT system according to the determined grammatical interoperability rules. In this process, the integrity and security of the data need to be guaranteed to ensure that the data is not tampered with or leaked during transmission.
[0064] The data transmission method provided in the embodiment of the present application has the following advantages: 1. It can dynamically generate a metamodel suitable for the system according to the characteristics and requirements of data information in different Internet of Things systems, thereby improving the flexibility and adaptability of grammatical interoperability between Internet of Things systems; 2. It can realize the conversion and mapping of metamodels between different Internet of Things systems, solve the problem of incompatible or inconsistent data information formats between different Internet of Things systems, and improve the efficiency and accuracy of grammatical interoperability between Internet of Things systems; 3. It can use a formalized language to describe and represent the grammatical interoperability rules between Internet of Things systems, thereby improving the readability and maintainability of grammatical interoperability between Internet of Things systems.
[0065] The following takes a sample IoT system (smart home) as an example to illustrate how to generate a metamodel of the IoT system. Figure 3 This is a metamodel diagram of the example IoT system (smart home). Figure 3 As shown in the figure, the example IoT system (smart home) contains the following entity types: room, device, and service. Among them, room is a physical entity, which represents the division of different functional areas in the smart home; device is a physical entity, which represents various smart devices installed or connected in the smart home, such as lights, air conditioners, curtains, etc.; service is a virtual entity, which represents various functions or applications provided or called in the smart home, such as temperature control, lighting control, security monitoring, etc.
[0066] According to the above entity types, it can be determined that the metamodel of the example IoT system (smart home) contains the following entity elements: room entity, device entity, and service entity. Among them, the room entity represents a room; the device entity represents a device; and the service entity represents a service. Figure 3 In the example, a room entity, three device entities (ie, device entity 1, device entity 2, and device entity 3) and two service entities (including service entity 1 and service entity 2) may be included.
[0067] According to the above entity types, the following relationship elements can also be determined: containment relationship, connection relationship and dependency relationship. Among them, the containment relationship means that a room contains multiple devices; the connection relationship means that a device is connected to a service; the dependency relationship means that a service depends on multiple devices.
[0068] According to the attributes of the data information in the example Internet of Things system (smart home), it can be determined that the metamodel of the example Internet of Things system (smart home) contains the following attribute elements: room ID attribute: a unique identifier representing the room entity; room name attribute: a name representing the room entity; room area attribute: an area representing the room entity; device ID attribute: a unique identifier representing the device entity; device name attribute: a name representing the device entity; device type attribute: a type representing the device entity; device status attribute: a current status of the device entity; service ID attribute: a unique identifier representing the service entity; service name attribute: a name representing the service entity; service type attribute: a type representing the service entity; service parameter attribute: a parameter representing the service entity.
[0069] Based on the attributes of the above data information, the following association relationships can also be determined: the room ID attribute is associated with the room entity; the room name attribute is associated with the room entity; the room area attribute is associated with the room entity; the device ID attribute is associated with the device entity; the device name attribute is associated with the device entity; the device type attribute is associated with the device entity; the device status attribute is associated with the device entity; the service ID attribute is associated with the service entity; the service name attribute is associated with the service entity; the service type attribute is associated with the service entity; and the service parameter attribute is associated with the service entity.
[0070] According to the rules of data information in the example Internet of Things system (smart home), it can be determined that the metamodel of the example Internet of Things system (smart home) contains the following rule elements: data format rules: representing the format of data information, such as XML, JSON, etc.; encoding method rules: representing the encoding method of data information, such as UTF-8, GBK, etc.; transmission protocol rules: representing the transmission protocol of data information, such as HTTP, MQTT, etc.
[0071] According to the above data information rules, the following constraint relationships can also be determined: data format rules constrain all entity elements, relationship elements and attribute elements; encoding method rules constrain all entity elements, relationship elements and attribute elements; transmission protocol rules constrain all connection relationships and dependency relationships.
[0072] The entity elements, relationship elements, attribute elements and rule elements determined in the above steps are combined into a metamodel of the example Internet of Things system (smart home). The metamodel also takes into account association relationships and constraint relationships, and the metamodel is described and represented in XML language.
[0073] The following takes another example IoT system (smart grid) as an example to illustrate how to achieve grammatical interoperability between the example IoT system (smart grid) and the above example IoT system (smart home).
[0074] This example IoT system (smart grid) contains the following entity types: power station, power grid and user. The power station is a physical entity, representing the power generation facilities in the smart grid, such as wind power generation, solar power generation, etc. The power grid is a physical entity, representing the power transmission and distribution facilities in the smart grid, such as transformers, switches, lines, etc. The user is a virtual entity, representing the electricity users in the smart grid, such as households, enterprises, etc.
[0075] Based on these entity types, it can be determined that the metamodel of this example IoT system (smart grid) contains the following entity elements and relationship elements. Entity elements include: power station entity, power grid entity and user entity. Among them, the power station entity represents a power station; the power grid entity represents a power grid; the user entity represents a user. Relationship elements include: connection relationship, supply relationship and demand relationship. Among them, the connection relationship indicates that a power station is connected to a power grid; the supply relationship indicates that a power grid supplies multiple users; the demand relationship indicates that a user's demand comes from multiple power grids.
[0076] According to the attributes of the data information in the example IoT system (smart grid), it can be determined that the meta-model of the example IoT system (smart grid) contains the following attribute elements and association relationships. The attribute elements include: power station ID attribute: a unique identifier of the power station entity; power station name attribute: a name of the power station entity; power station type attribute: a type of the power station entity; power station power attribute: a current power of the power station entity; power grid ID attribute: a unique identifier of the power grid entity; power grid name attribute: a name of the power grid entity; voltage attribute: a current voltage of the power grid entity; current attribute: a current current of the power grid entity; user ID attribute: a unique identifier of the user entity; user name attribute: a name of the user entity; user type attribute: a type of the user entity; user usage attribute: a current usage of the user entity. The association relationships include: the power station ID attribute is associated with the power station entity; the power station name attribute is associated with the power station entity; the power station type attribute is associated with the power station entity; the power station power attribute is associated with the power station entity; the power grid ID attribute is associated with the power grid entity; the power grid name attribute is associated with the power grid entity; the voltage attribute is associated with the power grid entity; the current attribute is associated with the power grid entity; the user ID attribute is associated with the user entity; the user name attribute is associated with the user entity; the user type attribute is associated with the user entity; and the user usage attribute is associated with the user entity.
[0077] According to the rules of data information in this example IoT system (smart grid), it can be determined that the metamodel of this example IoT system (smart grid) contains the following rule elements and constraint relationships. Rule elements include: data format rules: indicating the format of data information, such as XML, JSON, etc.; encoding rules: indicating the encoding method of data information, such as UTF-8, GBK, etc.; transmission protocol rules: indicating the transmission protocol of data information, such as HTTP, MQTT, etc. Constraint relationships include: data format rules constrain all entity elements, relationship elements, and attribute elements; encoding rules constrain all entity elements, relationship elements, and attribute elements; transmission protocol rules constrain all connection relationships and supply relationships.
[0078] The entity elements, relationship elements, attribute elements and rule elements determined in the above steps are combined into a metamodel of the example Internet of Things system (smart grid). The metamodel takes into account both constraint relationships and association relationships, and is described and represented in JSON language.
[0079] When the example IoT system (smart grid) needs to exchange data with the example IoT system (smart home) described above, first check whether the metamodels of the two systems match. Since the metamodels of the two systems have different entity elements, relationship elements, attribute elements, and rule elements, the metamodels of the two systems do not match. In order to achieve grammatical interoperability, the metamodel of the smart grid needs to be converted accordingly according to the metamodel of the smart home so that the metamodels of the two systems match. The specific conversion process is as follows:
[0080] 1. Map the power station entity in the smart grid to the device entity in the smart home, and map the power station ID attribute, power station name attribute, power station type attribute and power station power attribute to the device ID attribute, device name attribute, device type attribute and device status attribute;
[0081] 2. Map the grid entity in the smart grid to the service entity in the smart home, and map the grid ID attribute, grid name attribute, voltage attribute and current attribute to the service ID attribute, service name attribute, service type attribute and service parameter attribute;
[0082] 3. Map the user entity in the smart grid to the room entity in the smart home, and map the user ID attribute, user name attribute, user type attribute and user usage attribute to the room ID attribute, room name attribute, room area attribute and room temperature attribute;
[0083] 4. Map the connection relationship in the smart grid to the connection relationship in the smart home, map the supply relationship to the dependency relationship, and map the demand relationship to the inclusion relationship;
[0084] 5. Modify the data format rules, encoding rules and transmission protocol rules in the smart grid to XML, UTF-8 and HTTP respectively to be consistent with smart homes.
[0085] After the above transformation, a metamodel of the smart grid matching the smart home is obtained, and the metamodel is described and represented in XML language.
[0086] Since the metamodels of the two systems have matched, the data information of the smart grid can be converted and mapped according to the grammatical interoperability rules between the two systems, so that the smart home can correctly understand and use the data information of the smart grid. The specific conversion and mapping process is as follows:
[0087] 1. Convert data information in smart grid from JSON format to XML format;
[0088] 2. Convert the data information in the smart grid from UTF-8 encoding to UTF-8 encoding;
[0089] 3. Convert data information in the smart grid from the MQTT transmission protocol to the HTTP transmission protocol;
[0090] 4. Replace the power station entity, grid entity and user entity in the data information of the smart grid with the device entity, service entity and room entity respectively;
[0091] 5. Replace the power station ID attribute, power station name attribute, power station type attribute and power station power attribute in the data information of the smart grid with the device ID attribute, device name attribute, device type attribute and device status attribute respectively;
[0092] 6. Replace the grid ID attribute, grid name attribute, voltage attribute and current attribute in the data information of the smart grid with the service ID attribute, service name attribute, service type attribute and service parameter attribute respectively;
[0093] 7. Replace the user ID attribute, user name attribute, user type attribute and user usage attribute in the data information in the smart grid with the room ID attribute, room name attribute, room area attribute and room temperature attribute respectively.
[0094] After the above conversion and mapping, the data information of the smart grid compatible with the smart home is obtained, and the data information is described and represented in XML language.
[0095] Through the above process, the grammatical interoperability between the smart grid and the smart home can be achieved, so that the two systems can exchange data and collaborate effectively.
[0096] Figure 4is a structural diagram of a data transmission device according to an embodiment of the present application, such as Figure 4 As shown, the device comprises:
[0097] An acquisition module 42 is used to acquire a first metamodel corresponding to a source Internet of Things system and a second metamodel corresponding to a target Internet of Things system, wherein the first metamodel is used to represent a structural relationship and semantic information between entity elements in the source Internet of Things system, and the second metamodel is used to represent a structural relationship and semantic information between entity elements in the target Internet of Things system;
[0098] A determination module 44 is used to determine whether the first metamodel matches the second metamodel and obtain a matching result;
[0099] The conversion module 46 is used to convert the first metamodel into the second metamodel when the matching result indicates that the first metamodel and the second metamodel do not match, and transmit the data from the source Internet of Things system to the target Internet of Things system in a format supported by the second metamodel.
[0100] Through the acquisition module 42, determination module 44 and conversion module 46 in the above-mentioned data transmission device, the purpose of data intercommunication between different Internet of Things is achieved, thereby realizing the technical effect of improving the interoperability of the Internet of Things system, and further solving the technical problem in the related technology that the meta-models used between different Internet of Things systems are not unified and the grammatical interoperability cannot be achieved.
[0101] In the acquisition module in the above-mentioned data transmission device, the acquisition module is used to acquire a first data information set sent by all devices in the source Internet of Things system, and to acquire a second data information set sent by all devices in the target Internet of Things system; determine the first entity element, the first relationship element, the first attribute element, and the first rule element contained in the source Internet of Things system based on the first data information set, wherein the first relationship element is used to represent the association relationship between the first entity elements, the first attribute element is used to represent the attribute of the data information in the source Internet of Things system, and the first rule element is used to represent the transmission rule satisfied by the data information in the source Internet of Things system; determine the second entity element, the second relationship element, the second attribute element, and the second rule element contained in the target Internet of Things system based on the second data information set, wherein the second relationship element is used to represent the association relationship between the second entity elements, the second attribute element is used to represent the attribute of the data information in the target Internet of Things system, and the second rule element is used to represent the transmission rule satisfied by the data information in the target Internet of Things system; determine the first meta model based on the first entity element, the first relationship element, the first attribute element, and the first rule element; determine the second meta model based on the second entity element, the second relationship element, the second attribute element, and the second rule element.
[0102] In the acquisition module in the above-mentioned data transmission device, the acquisition module is also used to determine the first association relationship between the first attribute element and the first entity element or the first relationship element, and determine the first constraint relationship between the first rule element and the first entity element or the first relationship element or the first attribute element; determine the second association relationship between the second attribute element and the second entity element or the second relationship element, and determine the second constraint relationship between the second rule element and the second entity element or the second relationship element or the second attribute element; determine the first meta model based on the first entity element, the first relationship element, the first attribute element, the first rule element, the first association relationship and the first constraint relationship; determine the second meta model based on the second entity element, the second relationship element, the second attribute element, the second rule element, the second association relationship and the second constraint relationship.
[0103] In the determination module in the above-mentioned data transmission device, the determination module is used to obtain the first entity element, the first relationship element, the first attribute element, and the first rule element in the first metamodel, and to obtain the second entity element, the second relationship element, the second attribute element, and the second rule element in the second metamodel; respectively match the first entity element and the second entity element, the first relationship element and the second relationship element, the first attribute element and the second attribute element, the first rule element and the second rule element to obtain the first matching result, the second matching result, the third matching result and the fourth matching result; determine the matching result based on the first matching result, the second matching result, the third matching result and the fourth matching result.
[0104] In the determination module in the above-mentioned data transmission device, the determination module is also used to determine that the first metamodel and the second metamodel match when the first matching result indicates that the first entity element and the second entity element are identical or compatible, the second matching result indicates that the first relationship element and the second relationship are identical or compatible, the third matching result indicates that the first attribute element and the second attribute element are identical or compatible, and the fourth matching result indicates that the first rule element and the second rule element are identical or compatible; and determine that the first metamodel and the second metamodel do not match when the first matching result or the second matching result or the third matching result or the fourth matching result indicates that the corresponding elements are not identical or incompatible.
[0105] In the conversion module in the above-mentioned data transmission device, the conversion module is used to determine the target element that does not match the first metamodel and the second metamodel, wherein the target element is the first target element in the first metamodel and the target element is the second target element in the second metamodel; the first target element is mapped to the second target element, and other elements associated with the first target element in the first metamodel are updated to convert the first metamodel corresponding to the source Internet of Things system into the second metamodel.
[0106] In the conversion module in the above-mentioned data transmission device, the conversion module is also used to determine the grammatical interoperability rules between the source Internet of Things system and the target Internet of Things system when the matching result indicates that the first metamodel and the second metamodel match; perform information conversion on the data in the source Internet of Things system according to the grammatical interoperability rules, and transmit the converted data to the target Internet of Things system, wherein the information conversion includes at least one of the following: data format conversion, data encoding method conversion and data transmission protocol conversion.
[0107] It should be noted that Figure 4 The data transmission device shown is used to perform Figure 2 The data transmission method shown in the figure, therefore the relevant explanations in the above data transmission method are also applicable to the data transmission device, and will not be repeated here.
[0108] An embodiment of the present application also provides an electronic device, including: a memory and a processor, wherein the memory is used to store program instructions; and the processor is connected to the memory and is used to execute the above-mentioned data transmission method.
[0109] An embodiment of the present application further provides a non-volatile storage medium, which includes a stored computer program, wherein a device where the non-volatile storage medium is located executes the above-mentioned data transmission method by running the computer program.
[0110] An embodiment of the present application also provides a computer program product, including a non-volatile computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the data transmission method in the present application are implemented.
[0111] An embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the data transmission method in the present application.
[0112] An embodiment of the present application also provides a computer program, which, when executed by a processor, implements the steps of the data transmission method in the present application.
[0113] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0114] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0115] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0116] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0117] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0118] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0119] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for data transmission, characterized in that: include: Acquire a first metamodel corresponding to a source Internet of Things system, and acquire a second metamodel corresponding to a target Internet of Things system, wherein the first metamodel is used to represent a structural relationship and semantic information between entity elements in the source Internet of Things system, and the second metamodel is used to represent a structural relationship and semantic information between entity elements in the target Internet of Things system; Determine whether the first metamodel matches the second metamodel, and obtain a matching result; When the matching result indicates that the first metamodel and the second metamodel do not match, the first metamodel is converted into a second metamodel, and the data is transmitted from the source Internet of Things system to the target Internet of Things system in a format supported by the second metamodel.
2. The method according to claim 1, characterized in that Acquiring a first metamodel corresponding to a source Internet of Things system and acquiring a second metamodel corresponding to a target Internet of Things system, including: Acquire a first data information set sent by all devices in the source Internet of Things system, and acquire a second data information set sent by all devices in the target Internet of Things system; Determine, according to the first data information set, a first entity element, a first relationship element, a first attribute element, and a first rule element contained in the source Internet of Things system, wherein the first relationship element is used to represent an association relationship between the first entity elements, the first attribute element is used to represent an attribute of the data information in the source Internet of Things system, and the first rule element is used to represent a transmission rule satisfied by the data information in the source Internet of Things system; Determine, according to the second data information set, a second entity element, a second relationship element, a second attribute element, and a second rule element contained in the target Internet of Things system, wherein the second relationship element is used to indicate an association relationship between the second entity elements, the second attribute element is used to indicate an attribute of the data information in the target Internet of Things system, and the second rule element is used to indicate a transmission rule satisfied by the data information in the target Internet of Things system; Determine the first meta-model according to the first entity element, the first relationship element, the first attribute element and the first rule element; The second meta-model is determined according to the second entity element, the second relationship element, the second attribute element and the second rule element.
3. The method according to claim 2, characterized in that The method further comprises: Determine a first association relationship between the first attribute element and the first entity element or the first relationship element, and determine a first constraint relationship between the first rule element and the first entity element or the first relationship element or the first attribute element; Determine a second association relationship between the second attribute element and the second entity element or the second relationship element, and determine a second constraint relationship between the second rule element and the second entity element or the second relationship element or the second attribute element; Determine the first meta-model according to the first entity element, the first relationship element, the first attribute element, the first rule element, the first association relationship and the first constraint relationship; The second meta-model is determined according to the second entity element, the second relationship element, the second attribute element, the second rule element, the second association relationship and the second constraint relationship.
4. The method according to claim 2, characterized in that: Determining whether the first metamodel matches the second metamodel to obtain a matching result includes: Acquire the first entity element, the first relationship element, the first attribute element, and the first rule element in the first meta-model, and acquire the second entity element, the second relationship element, the second attribute element, and the second rule element in the second meta-model; respectively matching the first entity element and the second entity element, the first relationship element and the second relationship element, the first attribute element and the second attribute element, and the first rule element and the second rule element to obtain a first matching result, a second matching result, a third matching result, and a fourth matching result; The matching result is determined according to the first matching result, the second matching result, the third matching result and the fourth matching result.
5. The method according to claim 4, characterized in that The method further comprises: In the case where the first matching result indicates that the first entity element and the second entity element are identical or compatible, the second matching result indicates that the first relationship element and the second relationship are identical or compatible, the third matching result indicates that the first attribute element and the second attribute element are identical or compatible, and the fourth matching result indicates that the first rule element and the second rule element are identical or compatible, determining that the first meta model and the second meta model match; When the first matching result, the second matching result, the third matching result, or the fourth matching result indicates that the corresponding elements are not identical or compatible, it is determined that the first metamodel and the second metamodel do not match.
6. The method according to claim 5, characterized in that When the matching result indicates that the first metamodel and the second metamodel do not match, converting the first metamodel into a second metamodel includes: Determine a target element that does not match the first metamodel and the second metamodel, wherein the target element is a first target element in the first metamodel and is a second target element in the second metamodel; The first target element is mapped to the second target element, and other elements associated with the first target element in the first metamodel are updated to convert the first metamodel corresponding to the source Internet of Things system into the second metamodel.
7. The method according to claim 1, characterized in that The method further comprises: In a case where the matching result indicates that the first metamodel matches the second metamodel, determining a grammatical interoperability rule between the source Internet of Things system and the target Internet of Things system; The data in the source IoT system is converted according to the grammatical interoperability rules, and the converted data is transmitted to the target IoT system, wherein the information conversion includes at least one of the following: data format conversion, data encoding method conversion, and data transmission protocol conversion.
8. A data transmission device, characterized in that: include: an acquisition module, configured to acquire a first metamodel corresponding to a source Internet of Things system, and to acquire a second metamodel corresponding to a target Internet of Things system, wherein the first metamodel is used to represent a structural relationship and semantic information between entity elements in the source Internet of Things system, and the second metamodel is used to represent a structural relationship and semantic information between entity elements in the target Internet of Things system; A determination module, used to determine whether the first metamodel matches the second metamodel, and obtain a matching result; and a conversion module, configured to convert the first metamodel into a second metamodel when the matching result indicates that the first metamodel and the second metamodel do not match, and transmit the data from the source Internet of Things system to the target Internet of Things system in a format supported by the second metamodel.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store program instructions; The processor is connected to the memory, and is used to execute the data transmission method described in any one of claims 1 to 7.
10. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the data transmission method according to any one of claims 1 to 7 by running the computer program.
11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the data transmission method according to any one of claims 1 to 7 is implemented.
