Method for data interworking between application and IoT device and middleware device performing the method
A middleware device enables efficient data interoperability between applications and IoT devices by using a common interface, reducing the need for applications to support multiple protocols and simplifying development processes.
Patent Information
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- KOREA ELECTRONICS TECH INST
- Filing Date
- 2022-12-28
- Publication Date
- 2026-07-15
AI Technical Summary
Existing applications must support multiple network protocols used by IoT devices, leading to increased development resources and time due to redundant protocol support, which complicates communication and increases costs.
A middleware device facilitates data linkage between applications and IoT devices by generating matching information based on IoT device profiles, allowing applications to communicate through a common interface without directly supporting the IoT device's network protocols.
Reduces development resources and costs by allowing applications to focus on essential functions, simplifying development and shortening the development period.
Smart Images

Figure 112022141486787-PAT00002_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to a method for data linkage between an application and an IoT device and a middleware device for performing the method. Background Technology
[0002] The Internet of Things (IoT) is a technology that connects physical objects equipped with sensors and communication capabilities to the internet. Through the Internet of Things, connected industrial manufacturing plants, intelligent data analysis, next-generation medical services, smart homes and cities, and wearable devices can be realized. As the Internet of Things enables data-driven insights, improvements in operational processes, and efficient data utilization, new business models can be created.
[0003] Figure 1 is a diagram illustrating a data linkage structure between an application and an IoT device according to the prior art. IoT devices can use various network protocols, and an application must use the same network protocol as the IoT device to communicate with it. In other words, since the network protocols used by IoT devices are very diverse, an application must support all of the numerous network protocols used by various IoT devices in order to communicate smoothly with the IoT device. Furthermore, when a single IoT device and multiple applications communicate simultaneously, each application must redundantly support the same network protocol. As such, following the conventional method in which an application must independently support all of the IoT device's network protocols to communicate with the IoT device results in wasted development resources and increased development difficulties, leading to problems such as increased application research and development costs and time. The problem to be solved
[0004] The present invention aims to provide a method and apparatus for data interoperability between an application and an IoT device utilizing middleware, wherein the application can transmit and receive data with the IoT device through a common interface provided by the middleware without the application directly supporting the network protocol of the IoT device.
[0005] The objectives of the present invention are not limited to those mentioned above, and other unmentioned objectives will be clearly understood by those skilled in the art from the description below. means of solving the problem
[0006] A method for data linkage between an application and an IoT device according to an embodiment of the present invention comprises: a step in which a middleware device generates matching information between the IoT device and the network protocol used by the IoT device based on IoT device profile information for the IoT device; a step in which a middleware device analyzes a request message received from an application device to extract information of the request target IoT device; a step in which a middleware device generates a request packet corresponding to the network protocol used by the target IoT device of the request message based on the request message, the IoT device information, and the matching information; a step in which a middleware device transmits the request packet to the target IoT device; a step in which a middleware device converts a response packet transmitted by the target IoT device in response to the request packet into a response message; and a step in which a middleware device transmits the response message to the application device.
[0007] In one embodiment of the present invention, the request message and the response message may be messages in a JSON data format.
[0008] In one embodiment of the present invention, the profile information may include an identifier of the IoT device and network protocol information used by the IoT device.
[0009] In one embodiment of the present invention, the profile information may include information regarding sensing data received from the IoT device.
[0010] In one embodiment of the present invention, the profile information may include information for controlling an actuator associated with the IoT device.
[0011] In one embodiment of the present invention, the profile information may be in JSON data format.
[0012] And, a middleware device for performing data linkage between an application and an IoT device according to an embodiment of the present invention includes: a communication module that receives a request message from an application device; a profile information processing module that generates matching information between an IoT device and a network protocol based on IoT device profile information; a message analysis module that analyzes the request message and extracts information of the target IoT device from the request message; a packet generation module that generates a request packet corresponding to the network protocol used by the target IoT device of the request message based on the IoT device information and the matching information; and a message generation module that converts a response packet transmitted by the target IoT device in response to the request packet into a response message. The communication module transmits the request packet to the target IoT device, receives the response packet from the target IoT device, and transmits the response message to the application device.
[0013] In one embodiment of the present invention, the request message and the response message may be messages in a JSON data format. Effects of the invention
[0014] According to one embodiment of the present invention, since the application does not need to support various network protocols used by IoT devices, there is an effect of reducing the resources required for development.
[0015] In addition, according to one embodiment of the present invention, since the developer can focus on developing the essential functions of the application excluding communication functions, development becomes easier, and there is an effect of reducing application development costs and shortening the development period.
[0016] The effects obtainable from the present invention are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art from the description below. Brief explanation of the drawing
[0017] FIG. 1 is a block diagram showing a data linkage structure between an application and an IoT device according to the prior art. FIG. 2 is a block diagram showing a data linkage structure between an application and an IoT device according to an embodiment of the present invention. Figure 3 is a block diagram showing the basic configuration of an IoT device. FIGS. 4a to 4e are drawings relating to the JSON data format of IoT device profile information. FIGS. 5a to 5e are example drawings of IoT device profile information according to JSON data format. FIG. 6 is a diagram regarding the JSON data format of a request message. Figure 7 is an example diagram of a request message according to the JSON data format. FIG. 8 is a diagram regarding the JSON data format of a response message. FIG. 9 is an example diagram of a response message according to the JSON data format. FIG. 10 is a diagram regarding the JSON data format of an event message. FIG. 11 is an example diagram of an event message according to the JSON data format. FIG. 12 is a flowchart illustrating a method for data linkage between an application and an IoT device according to an embodiment of the present invention. FIG. 13 is a flowchart illustrating a method for data linkage between an application and an IoT device according to an embodiment of the present invention. FIG. 14 is a block diagram showing the configuration of a middleware device that performs data linkage between an application and an IoT device according to an embodiment of the present invention. FIG. 15 is a block diagram showing a computer system for implementing a data linkage method between an application and an IoT device according to an embodiment of the present invention. Specific details for implementing the invention
[0018] The advantages and features of the present invention and the methods for achieving them will become clear by referring to the embodiments described below in detail together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below but may be implemented in various different forms. These embodiments are provided merely to ensure that the disclosure of the present invention is complete and to fully inform those skilled in the art of the scope of the invention, and the present invention is defined only by the scope of the claims. Meanwhile, the terms used in this specification are for describing the embodiments and are not intended to limit the present invention. In this specification, the singular form includes the plural form unless specifically stated otherwise in the text. The terms "comprises" and / or "comprising" as used in this specification do not exclude the presence or addition of one or more other components, steps, actions, and / or elements in addition to the mentioned components, steps, actions, and / or elements.
[0019] In describing the present invention, detailed descriptions of related prior art are omitted if it is determined that such descriptions may unnecessarily obscure the essence of the invention.
[0020] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In order to facilitate an overall understanding in describing the present invention, the same reference numerals will be used for the same means regardless of the drawing number.
[0022] 1. Data Interconnection Structure Between Applications and IoT Devices
[0023] FIG. 2 is a block diagram showing a data linkage structure between an application and an IoT device according to an embodiment of the present invention.
[0024] The above data linkage structure can be broadly classified into three layers: an application, middleware, and an IoT device. The application does not communicate directly with the IoT device but communicates indirectly through the middleware. In other words, the middleware handles the data linkage between the application and the IoT device on its behalf. The middleware supports network protocols (e.g., OPC / UA, MODBUS, MQTT, AMQP, COAP) necessary for data linkage between the application and multiple IoT devices. According to the data linkage structure between the application and the IoT device of the present invention, all applications communicate through a common interface provided by the middleware, while IoT devices communicate with the middleware according to a protocol-dependent interface, thereby enabling mutual bidirectional communication between the application, middleware, and IoT device.
[0026] 2. IoT Device Profile Information
[0027] FIG. 3 is a block diagram showing the basic configuration of an IoT device. As illustrated in FIG. 3, the IoT device interacts with various sensors or actuators. Additionally, the IoT device may include sensors or actuators.
[0028] An IoT device according to one embodiment of the present invention transmits sensing data collected through a sensor to middleware or controls an actuator according to a command received from the middleware. The profile information of the IoT device (hereinafter referred to as "IoT device profile information") varies depending on the sensors and actuators included or linked to the IoT device. Therefore, the middleware must secure the IoT device profile information in advance so that it can collect sensing data from sensors linked to the IoT device or from the IoT device itself, or control an actuator through the IoT device, based on the IoT device profile information. Accordingly, the middleware must acquire the IoT device profile information from an external source and register it in an internal storage in advance before performing data linkage between an application and an IoT device.
[0029] Hereinafter, in this specification, a sensor included in or linked to an IoT device is referred to as a sensor 'linked' with the IoT device, and an actuator included in or linked to an IoT device is referred to as an actuator 'linked' with the IoT device.
[0030] According to one embodiment of the present invention, the IoT device profile information used by the application and the middleware device performing the method for data linkage between an application and an IoT device comprises (1) general information, (2) configuration information, (3) resource information, and (4) command information.
[0031] (1) General information consists of an identifier of the IoT device and descriptive information of the IoT device. In the present invention, the 'name of the IoT device' is used with the same meaning as the identifier of the IoT device.
[0032] (2) Configuration information is information required for network interoperability between middleware and IoT devices. Configuration information consists of a configuration identifier (in this invention, 'configuration name' is also used with the same meaning), a network interoperability protocol between middleware and IoT devices (meaning a network protocol used by the IoT device), and an address and port number required for network interoperability with the IoT device.
[0033] (3) Resource information is information regarding a sensor associated with an IoT device or sensing data received from an IoT device (which may be referred to as 'sensing value'). Resource information is configured to include the type of the sensing value and information on automatic event settings.
[0034] (4) Command information is information for controlling an actuator connected to an IoT device, and consists of information such as command type.
[0035] FIGS. 4a to 4e are drawings relating to a data linkage method between an application and an IoT device according to an embodiment of the present invention, and a JSON data format of IoT device profile information used by a middleware device performing the method. Considering that an IoT device may have various IoT device profile information, the present invention allows for additional necessary information to be freely added as options within a JSON object. The JSON data format of IoT device profile information according to an embodiment of the present invention, illustrated in FIG. 4a, consists of four parts: a JSON data format of general information (11), a JSON data format of configuration information (12), a JSON data format of resource information (13), and a JSON data format of command information (14). FIG. 4b illustrates the JSON data format of general information (11), FIG. 4c illustrates the JSON data format of configuration information (12), FIG. 4d illustrates the JSON data format of resource information (13), and FIG. 4e illustrates the JSON data format of command information (14).
[0036] Table 1 is a table explaining the meaning of each item included in the JSON data format of IoT device profile information according to one embodiment of the present invention. Through Table 1, the specific meaning of the JSON data format of IoT device profile information can be understood.
[0037] Name Type Description devices arrangement IoT Device Information name string IoT device identifier (IoT device name) description string IoT Device Description configuration JSON object Configuration Information name string Configuration identifier (configuration name) protocol string Network protocols used by IoT devices address string Access address (IP or device number, etc.) for the IoT device port integer Connection port for IoT devices deviceResource arrangement Resource Information name string Resource name (resource identifier) value JSON object Sensing value type string Value types (Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float32, Float64, Bool) autoEvent JSON object Automatic Events active Boolean Event activation status (enabled(true), disabled(false)) interval integer Event occurrence interval (microsecond) deviceCommand arrangement Command Information name string Command name command JSON object Control commands type string Command type (String or Binary)
[0038] FIGS. 5A to 5E are example drawings of IoT device profile information according to the JSON data format. The IoT device profile information illustrated in FIGS. 5A to 5E is in accordance with the JSON data format of FIGS. 4A to 4E and Table 1. The IoT device profile information according to one embodiment of the present invention illustrated in FIG. 5A consists of four parts: general information (21), configuration information (22), resource information (23), and command information (24). FIG. 5B shows an example of general information (21), FIG. 5C shows an example of configuration information (22), FIG. 5D shows an example of resource information (23), and FIG. 5E shows an example of command information (24).
[0039] FIG. 5b is an example of general information (21), showing an IoT device identifier ('My Device') and an IoT device description ('My Description').
[0040] FIG. 5c is an example of configuration information (22), showing a configuration identifier ('My Configuration'), a network protocol used by the IoT device ('Modbus TCP'), a connection address for the IoT device ('192.168.0.18'), and a connection port for the IoT device ('502').
[0041] FIG. 5d is an example of resource information (23), showing the resource name ('My Value1' or 'My Value2'), the type of the sensing value ('Int16' or 'Float32'), whether the automatic event is enabled ('false' or 'true'), and the interval of the automatic event occurrence ('100'; meaning 100 microseconds).
[0042] FIG. 5e is an example of command information (24), showing the command name ('My Command') and the command type ('String') of the control command.
[0044] 3. Common interface between applications and middleware
[0045] In order for an application to acquire sensing data (sensing values) from a sensor connected to an IoT device or to control an actuator connected to an IoT device, a common interface exists between the application and the middleware as shown in FIG. 2. The common interface between the application and the middleware consists of (1) requests and responses and (2) events.
[0046] (1) In the case of requests and responses, when an application sends a request message for a resource or command to the middleware using a common interface, the middleware operates by sending a response message to the application in response to the application's request message.
[0047] (2) In the case of an event, if the active information of the autoEvent included in the resource information (see Fig. 4d and Table 1) of the IoT device profile information in JSON data format is true, the middleware operates by periodically sending event messages to the application according to the event occurrence interval.
[0048] Figure 6 is a diagram regarding the JSON data format of a request message, and Table 2 is a table explaining the meaning of each item included in the JSON data format of the request message. Through Table 2, the specific meaning of each item included in the JSON data format of the request message can be understood.
[0049] Name Type Description deviceId string Identifier of the IoT device to which the request message is sent requestType string Request type ("Resource" or "Command") requestId string Identifier of the request ("Resource" or "Command") parameter JSON object Parameters to send to the request target
[0050] In the JSON data format for request messages, the request type is classified into Resource and Command. Resource refers to obtaining sensing values from sensors associated with IoT devices, while Command refers to actuator control. The request identifier (requestId) becomes the resource name defined in Table 1 ('name' of 'deviceResource') when the request type is 'Resource', and the command name defined in Table 1 ('name' of 'deviceCommand') when the request type is 'Command'. The device identifier (deviceId) refers to the identifier of the IoT device to which the request message is transmitted, and parameters represent additional information determined by the request identifier.
[0052] FIG. 7 is an example diagram of a request message according to the JSON data format. The request message illustrated in FIG. 7 is a message transmitted by an application to middleware to obtain sensing data (sensing value) from a sensor associated with an IoT device. The request message of FIG. 7 includes an identifier of the IoT device to which the request message is transmitted ('My Device'), a request type ('Resource'), and a request identifier ('My Value1').
[0053] Figure 8 is a diagram regarding the JSON data format of a response message, and Table 3 is a table explaining the meaning of each item included in the JSON data format of the response message. Through Table 3, the specific meaning of each item included in the JSON data format of the response message can be understood.
[0054] Name Type Description deviceId string Identifier of the IoT device that is the entity sending the response responseType string Response type ("Resoure" or "Command") responseId string Identifier of the response ("Resoure" or "Command") results JSON object Response results status Boolean Status of the request (true (success), false (failure)) value arrangement Return value based on the request (an array containing one or more numbers)
[0055] In the JSON data format for response messages, the response type is classified into Resource and Command. Resource refers to responding with sensing values from sensors associated with the IoT device, while Command refers to actuator control. The response identifier (responseId) becomes the resource name defined in Table 1 ('name' of 'deviceResource') when the request type is 'Resource', and the command name defined in Table 1 ('name' of 'deviceCommand') when the response type is 'Command'. The device identifier (deviceId) refers to the identifier of the IoT device that is the entity transmitting the response, and the response results include the status of the request and the return value information corresponding to the request.
[0056] FIG. 9 is an example diagram of a response message according to the JSON data format. The response message illustrated in FIG. 9 is a message in which middleware transmits sensing data (sensing value) of a sensor associated with a target IoT device to an application in response to a request message from the application. The response message of FIG. 9 includes an identifier ('My Device') of the IoT device that is the subject transmitting the response, a response type ('Resource'), a response identifier ('My Value1'), and a response result. The response result includes a status ('true') for the request, a value type ('Int16'), and a return value ('-18') according to the request.
[0057] Figure 10 is a diagram regarding the JSON data format of an event message, and Table 4 is a table explaining the meaning of each item included in the JSON data format of an event message.
[0058] Name Type Description eventId string Event identifier (128-bit UUID) timeStamp integer Time the event was generated (nanosecond) readings JSON object Event reception details deviceName string IoT device identifier (device name) sending the event resourceName string Resource name (resource identifier) valueType string Value types((Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float32, Float64, Bool) value arrangement Values included in the event (an array containing one or more numbers)
[0059] In the JSON data format for event messages, the event identifier (eventId) is an identifier that distinguishes each event. The event identifier can be a 128-bit Universally Unique Identifier (UUID). The timestamp refers to the time the event was generated (e.g., time expressed in nanoseconds), and the event readings include the identifier (deviceName) of the IoT device transmitting the event, the resource name (resourceName), the type of value (valueType), and information about the value included in the event.
[0060] FIG. 11 is an example diagram of an Event message according to the JSON data format. The Event message illustrated in FIG. 11 is a message that middleware sends to an application in relation to a resource where autoEvent is enabled. The Event message of FIG. 11 includes an Event identifier ('a33a569c-0a77-400d-8c90-26907a522b41'), a timestamp ('1641199777984549070'), and Event readings. The Event readings include the identifier of the IoT device sending the event ('My Device'), the resource name ('My Value2'), the type of value ('Float32'), and the value included in the event ('[3.141592, 12.093]').
[0061] Meanwhile, if we look at the JSON data format of Figs. 6, 8, and 10, there is a setting at the end called "additionalProperties": false, which means that information items other than those defined in the common interface (request, response, event) cannot be added.
[0063] 4. Message processing and operation methods of middleware for data interoperability between applications and IoT devices
[0064] Middleware communicates directly with applications and IoT devices to perform data synchronization between them. In other words, middleware acts as a broker between applications and IoT devices.
[0065] FIGS. 12 and 13 are flowcharts illustrating the message processing and operation methods of middleware for a common interface (request and response, event). That is, FIGS. 12 and 13 are flowcharts illustrating a method of data linkage between an application and an IoT device by middleware according to an embodiment of the present invention. FIG. 12 illustrates the process of a request from an application and a response from middleware, and FIG. 13 illustrates the process of automatic event processing by middleware. The data linkage method illustrated in FIGS. 12 and 13 is performed through communication between a device equipped with an application (30, hereinafter abbreviated as 'application device'), a device equipped with middleware (40, hereinafter abbreviated as 'middleware device'), and an IoT device (50). The middleware may be equipped on the same device as the application, or may be equipped on different devices.
[0066] Before utilizing the common interface, the middleware first interprets IoT device profile information (general information, configuration information, resource information, command information) according to the JSON data format of FIGS. 4a to 4e to set various environment information required by the middleware, and then performs data linkage between the application and the IoT device.
[0067] FIG. 12 is a flowchart illustrating a method for data linkage between an application and an IoT device according to an embodiment of the present invention. FIG. 12 illustrates a request and response process as described above. The data linkage method illustrated in FIG. 12 includes steps S110 through S210. The data linkage method illustrated in FIG. 12 is according to an embodiment, and the steps of the method for data linkage between an application and an IoT device according to the present invention are not limited to the embodiment illustrated in FIG. 12, and steps may be added, changed, or deleted as necessary.
[0068] Step S110 is a step in which the middleware device (40) sets the necessary environment information based on IoT device profile information. The middleware device (40) may possess IoT device profile information for multiple IoT devices (50). Based on the IoT device profile information, the middleware device (40) generates matching information between the IoT device (50) and the network protocol used by the IoT device (50). For example, the middleware device (40) extracts the IoT device identifier information included in the IoT device profile information and the network protocol information used by the IoT device (50) to generate matching information (hereinafter abbreviated as 'matching information') between the IoT device identifier of the IoT device (50) and the network protocol used by the IoT device (50). The middleware device (40) stores the generated matching information in an internal storage and can subsequently utilize the stored matching information to search for the network protocol used by the IoT device (50) that is the target of the request message.
[0069] Step S120 is a step in which the middleware device (40) establishes a connection with the IoT device (50). The middleware device (40) can establish a connection with multiple IoT devices (50). The middleware device (40) can utilize IoT device profile information in establishing a connection with the IoT device (50).
[0070] Step S130 is a step in which the middleware device (40) receives a request message from the application device (30). The application device (30) can send a request message in JSON data format to the middleware device (40), and the middleware device (40) can receive a request message in JSON data format.
[0071] Step S140 is a step in which the middleware device (40) parses and analyzes the request message of the application device (30). The middleware device (40) parses the syntax of the request message so that it can interpret the request message of the application device (30), and analyzes the parsed syntax. The middleware device (40) extracts target IoT device information (e.g., IoT device identifier) from the request message.
[0072] Step S150 is a step in which the middleware device (40) searches for a network protocol that matches the target IoT device (50). The middleware device (40) matches the network protocol for data linkage with the target IoT device of the request message. That is, the middleware device (40) searches for the network protocol used by the target IoT device (50) of the request message based on the target IoT device information (e.g., IoT device identifier) and matching information.
[0073] Step S160 is a step in which the middleware device (40) generates a packet dependent on the network protocol used by the target IoT device (50). Based on the request message, the middleware device (40) generates a request packet that corresponds to the network protocol used by the target IoT device (50) of the request message.
[0074] Step S170 is a step in which a middleware device (40) transmits a request packet dependent on a network protocol to a target IoT device (50).
[0075] Step S180 is a step in which the IoT device (50) processes a packet. The target IoT device (50) receives a request packet, processes the request packet, and generates a response packet.
[0076] Step S190 is the step in which the middleware device (40) receives a response packet. The target IoT device (50) sends a response packet corresponding to the request packet to the middleware device (40), and the middleware device (40) receives the response packet.
[0077] Step S200 is a step in which the middleware device (40) converts the response packet into a response message. The middleware device (40) converts the response packet into a response message according to the JSON data format of FIG. 8.
[0078] Step S210 is a step in which the middleware device (40) transmits a response message to the application device (30). The middleware device (40) transmits a response message corresponding to the request message of the application device (30) to the application device (30).
[0079] FIG. 13 is a flowchart illustrating a method for data linkage between an application and an IoT device according to an embodiment of the present invention. FIG. 13 illustrates the automatic event processing process of a middleware device (40) as described above. The data linkage method illustrated in FIG. 13 includes steps S310 through S390. The data linkage method illustrated in FIG. 13 is according to an embodiment, and the steps of the method for data linkage between an application and an IoT device according to the present invention are not limited to the embodiment illustrated in FIG. 13, and steps may be added, changed, or deleted as necessary.
[0080] Step S310 is a step in which the middleware device (40) sets the necessary environment information based on IoT device profile information. The middleware device (40) may possess IoT device profile information for multiple IoT devices (50). Based on the IoT device profile information, the middleware device (40) generates matching information between the IoT device (50) and the network protocol used by the IoT device (50). For example, the middleware device (40) extracts the IoT device identifier information included in the IoT device profile information and the network protocol information used by the IoT device (50) to generate matching information (hereinafter abbreviated as 'matching information') between the IoT device identifier of the IoT device (50) and the network protocol used by the IoT device (50).
[0081] Step S320 is a step in which the middleware device (40) establishes a connection with the IoT device (50). The middleware device (40) can establish a connection with multiple IoT devices (50). The middleware device (40) can utilize IoT device profile information in establishing a connection with the IoT device (50).
[0082] Step S330 is a step in which the middleware device (40) generates a packet dependent on the network protocol used by the IoT device (50). The middleware device (40) generates a request packet dependent on the protocol for data linkage with the IoT device (50) based on the resource information included in the IoT device profile information. That is, the middleware device (40) generates a request packet that corresponds to the network protocol used by the IoT device (50). The above request packet is a request packet targeting a resource in which an autoEvent is active among the resource information included in the IoT device profile information.
[0083] Step S340 is a step in which a middleware device (40) transmits a request packet dependent on a network protocol to an IoT device (50).
[0084] Step S350 is a step in which the IoT device (50) processes a packet. The IoT device (50) receives a request packet, processes the request packet, and generates a response packet.
[0085] Step S360 is the step in which the middleware device (40) receives a response packet. The IoT device (50) transmits a response packet corresponding to the request packet to the middleware device (40), and the middleware device (40) receives the response packet.
[0086] Step S370 is a step in which the middleware device (40) converts the response packet into an event message. The middleware device (40) converts the response packet into an event message according to the JSON data format of FIG. 10.
[0087] Step S380 is the step in which the middleware device (40) transmits an event message to the application device (30).
[0088] Step S390 is a step in which the middleware device (40) waits for a set event occurrence interval. The middleware device (40) waits for an event occurrence interval (e.g., 100 microseconds) of a pre-set autoEvent included in the resource information of the IoT device profile information.
[0089] Afterward, the middleware device (40) returns to step S340 and performs steps S340 and below. That is, the middleware device (40) periodically repeats the process of sending the previously generated request packet back to the IoT device (50), converting the response packet into an event message, and sending it to the application device (30).
[0090] The method for data linkage between the aforementioned application and IoT device has been described with reference to the flowchart presented in the drawings. For simplicity of explanation, the method has been illustrated and described using a series of blocks; however, the present invention is not limited to the order of the blocks, and some blocks may occur in a different order or simultaneously with other blocks as illustrated and described herein, and various other branches, flow paths, and sequences of blocks may be implemented to achieve the same or similar results. Furthermore, not all illustrated blocks may be required for the implementation of the method described herein.
[0091] Meanwhile, in the description with reference to FIGS. 12 and 13, each step may be further divided into additional steps or combined into fewer steps, depending on an embodiment of the present invention. Also, some steps may be omitted as necessary, and the order between steps may be changed. Furthermore, even if other omitted details are included, the contents of FIGS. 2 through 11 may be applied to the contents of FIGS. 12 through 13. Also, the contents of FIGS. 12 through 13 may be applied to the contents of FIGS. 2 through 11.
[0092] FIG. 14 is a block diagram showing the configuration of a middleware device that performs a data linkage method between an application and an IoT device according to an embodiment of the present invention.
[0093] A middleware device (40) that performs a data linkage method between an application and an IoT device according to one embodiment of the present invention includes a communication module (41), a profile information processing module (42), a message analysis module (43), a packet generation module (44), a message generation module (45), and an automatic event generation module (46). The middleware device (40) illustrated in FIG. 14 is according to one embodiment, and the components of the middleware device (40) according to the present invention are not limited to the embodiment illustrated in FIG. 14 and may be added, changed, or deleted as needed.
[0094] The communication module (41) establishes a connection with the application device (30) and the IoT device (50). The communication module (41) may utilize pre-stored IoT device profile information to establish a connection with the IoT device (50). The communication module (41) transmits and receives messages and data packets with the application device (30) and the IoT device (50). The communication module (41) receives a request message from the application device (30), transmits a request packet to the target IoT device (50) of the request message, receives a response packet from the target IoT device (50) of the request message, and transmits a response message to the application device (30). The request message transmitted by the application device (30) to the communication module (41) and the response message transmitted by the communication module (41) to the application device (30) may be messages in a JSON data format.
[0095] The profile information processing module (42) sets the environment information required by the middleware device (40) based on the pre-stored IoT device profile information. The profile information processing module (42) generates matching information between the IoT device (50) and the network protocol used by the IoT device (50) based on the IoT device profile information. For example, the profile information processing module (42) extracts the IoT device identifier information and the network protocol information used by the IoT device (50) from the IoT device profile information to generate matching information between the IoT device identifier of the IoT device (50) and the network protocol used by the IoT device (50).
[0096] The message analysis module (43) analyzes the request message of the application device (30) and extracts information about the requested IoT device from the request message. The message analysis module (43) parses the syntax of the request message so that the request message of the application device (30) can be interpreted, and then analyzes the parsed syntax to extract information about the requested IoT device from the request message.
[0097] The packet generation module (44) generates a request packet that corresponds to the network protocol used by the target IoT device of the application device (30) based on the request target IoT device information and the matching information between the IoT device (50) and the network protocol.
[0098] Specifically, the packet generation module (44) searches for a network protocol that matches the IoT device (50). The packet generation module (44) matches the network protocol for data linkage with the target IoT device of the request message. That is, the packet generation module (44) searches for the network protocol used by the target IoT device (50) of the request message based on the target IoT device information (e.g., IoT device identifier) and matching information. Then, the packet generation module (44) generates a request packet dependent on the network protocol used by the target IoT device (50). The request packet thus generated is transmitted to the target IoT device (50) by the communication module (41).
[0099] Meanwhile, the packet generation module (44) generates a request packet dependent on the protocol for data linkage with the IoT device (50) based on the resource information included in the IoT device profile information when there is a resource with an active autoEvent among the resource information included in the IoT device profile information. That is, when the middleware device (40) needs to send a response message to the application device (30) by an autoEvent, the packet generation module (44) generates a request packet that corresponds to the network protocol used by the IoT device (50) based on the resource information of the IoT device profile information.
[0100] The message generation module (45) converts the response packet transmitted by the target IoT device (50) in response to the request packet into a response message. The message generation module (45) can convert the response packet into a response message according to the JSON data format of FIG. 8.
[0101] Meanwhile, in the case of the above-described automatic event situation, the message generation module (45) converts the response packet transmitted by the IoT device (50) into an event message. In this case, the message generation module (45) can convert the response packet into an event message according to the JSON data format of FIG. 10. The communication module (41) transmits the event message to the application device (30).
[0102] The automatic event generation module (46) generates an automatic event for said resource after waiting for a set event generation interval when an event message is transmitted to the application device (30) if there is a resource among the resource information included in the IoT device profile information for which an automatic event is active. As described above, the event generation interval is a setting information included in the resource information of the IoT device profile information. When the automatic event generation module (46) generates an automatic event, the communication module (41) transmits a pre-generated request packet to the IoT device (50) for which the automatic event is active. In accordance with the automatic event generation operation of the automatic event generation module (46), the middleware device (40) periodically repeats the process of transmitting the pre-generated request packet to the IoT device (50), converting the response packet of the IoT device (50) into an event message, and transmitting it to the application device (30).
[0103] The middleware device (40) may be a server, smartphone, tablet computer, laptop computer, desktop computer, smart speaker, or smart watch, but is not limited thereto. Additionally, the middleware device (40) may be integrated with the application device (30). That is, the application and the middleware may be installed on the same device.
[0104] Even if the content of FIG. 2 to 13 is omitted in the description with reference to FIG. 14, it may be applied to the content of FIG. 14. Also, the content of FIG. 14 may be applied to the content of FIG. 2 to 13.
[0105] FIG. 15 is a block diagram showing a computer system for implementing a data linkage method between an application and an IoT device according to an embodiment of the present invention.
[0106] The middleware device (40) according to the present invention can be implemented by the computer system of FIG. 15.
[0107] Referring to FIG. 15, a computer system (1000) may include at least one of a processor (1010), memory (1030), an input interface device (1050), an output interface device (1060), and a storage device (1040) that communicate via a bus (1070). The computer system (1000) may also further include a communication device (1020) coupled to a network. The processor (1010) may be a central processing unit (CPU) or a semiconductor device that executes instructions stored in memory (1030) or a storage device (1040). Memory (1030) and storage device (1040) may include various forms of volatile or non-volatile storage media. For example, memory may include read-only memory (ROM) and random access memory (RAM). In the embodiments of this description, memory may be located inside or outside the processor, and memory may be connected to the processor through various known means. Memory is a volatile or non-volatile storage medium of various forms, and for example, memory may include read-only memory (ROM) or random access memory (RAM).
[0108] Accordingly, embodiments of the present invention may be implemented as a method implemented on a computer or as a non-transient computer-readable medium storing computer-executable instructions. In one embodiment, when executed by a processor, the computer-readable instructions may perform a method according to at least one aspect of the present description.
[0109] The communication device (1020) can transmit or receive wired or wireless signals.
[0110] In addition, the method according to an embodiment of the present invention may be implemented in the form of program instructions that can be executed through various computer means and may be recorded on a computer-readable medium.
[0111] The above computer-readable medium may include program instructions, data files, data structures, etc., either individually or in combination. The program instructions recorded on the computer-readable medium may be specially designed and configured for embodiments of the present invention, or they may be known and available to a person skilled in the art of computer software. The computer-readable recording medium may include a hardware device configured to store and execute program instructions. For example, the computer-readable recording medium may be magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floptical disks; ROM; RAM; flash memory, etc. The program instructions may include machine code, such as that generated by a compiler, as well as high-level language code that can be executed by a computer through an interpreter, etc.
[0112] Although the present invention has been described above with reference to preferred embodiments, those skilled in the art will understand that various modifications and changes can be made to the invention without departing from the spirit and scope of the invention as described in the following claims. Explanation of the symbols
[0113] 30: Application device 40: Middleware device 41: Communication module 42: Profile Information Processing Module 43: Message Analysis Module 44: Packet Generation Module 45: Message generation module 46: Automatic Event Generation Module 50: IoT devices 1000: Computer System 1010: Processor 1020: Communication device 1030: Memory 1040: Storage device 1050: Input interface device 1060: Output interface device 1070: Bus
Claims
Claim 1 A middleware device generates matching information between the identifiers of the plurality of IoT devices and the network protocols used by the plurality of IoT devices based on IoT device profile information for the plurality of IoT devices; a middleware device analyzes a request message received from an application device to extract the identifier of the target IoT device; a middleware device searches for the network protocol used by the target IoT device in the matching information using the identifier of the target IoT device; a middleware device generates a request packet corresponding to the network protocol used by the target IoT device based on the request message; a middleware device transmits the request packet to the target IoT device; and a middleware device converts a response packet transmitted by the target IoT device in response to the request packet into a message to be transmitted to the application device. The method includes the step of a middleware device transmitting a message converted from the response packet to the application device, wherein the profile information follows the JSON data format and includes an identifier of the plurality of IoT devices, a network protocol used by the plurality of IoT devices, and resource information of the plurality of IoT devices, wherein the resource information includes the resource name, type, and automatic event setting information of sensing data received by the plurality of IoT devices, and wherein the automatic event setting information includes activation status information indicating whether the automatic event is activated and the occurrence interval of the automatic event, and the step of converting the response packet into a message to be transmitted to the application device comprises the middleware device referring to the activation status information included in the profile information of the target IoT device, and if the target resource of the request packet is a resource in which the automatic event is activated, converting the response packet into an event message in the JSON data format;A method for data interoperability between an application and an IoT device, wherein a middleware device includes the step of converting a response packet into a response message in JSON data format when the target resource of the request packet is not a resource in which automatic events are enabled, by referring to activation status information included in the profile information of the target IoT device; and the step of transmitting the converted message to the application device includes the step of transmitting an event message to the application device according to the occurrence interval of an automatic event corresponding to the target resource when the target resource of the request packet is a resource in which automatic events are enabled. Claim 2 delete Claim 3 delete Claim 4 delete Claim 5 A method for data linkage between an application and an IoT device, wherein, in claim 1, the profile information includes information for controlling an actuator associated with the IoT device. Claim 6 delete Claim 7 A communication module that receives a request message from an application device; a profile information processing module that generates matching information between a plurality of IoT devices and a network protocol based on IoT device profile information for a plurality of IoT devices; a message analysis module that analyzes the request message and extracts an identifier of the target IoT device from the request message; a packet generation module that searches for a network protocol used by the target IoT device in the matching information using the identifier of the target IoT device, and generates a request packet corresponding to the network protocol used by the target IoT device based on the request message; and a message generation module that converts a response packet transmitted by the target IoT device in response to the request packet into a message to be transmitted to the application device.The communication module includes an automatic event generation module, wherein the communication module transmits the request packet to the target IoT device, receives the response packet from the target IoT device, and transmits the message converted from the response packet to the application device; wherein the profile information follows the JSON data format and includes identifiers of the plurality of IoT devices, network protocols used by the plurality of IoT devices, and resource information of the plurality of IoT devices; wherein the resource information includes the resource name, type, and automatic event setting information of sensing data received by the plurality of IoT devices; wherein the automatic event setting information includes activation status information indicating whether the automatic event is activated and the occurrence interval of the automatic event; wherein the message generation module refers to the activation status information included in the profile information of the target IoT device and, if the target resource of the request packet is a resource in which the automatic event is activated, converts the response packet into an event message in JSON data format; wherein, if the target resource of the request packet is not a resource in which the automatic event is activated, the response packet is converted into an response message in JSON data format, and the converted message is transmitted to the application device. A middleware device for performing data interoperability between an application and an IoT device, wherein, during the transmission process, if the target resource of the request packet is a resource in which an automatic event is enabled, the automatic event generating module generates the automatic event according to the generation interval of the automatic event corresponding to the target resource, and the communication module transmits the event message to the application device in accordance with the generation of the automatic event. Claim 8 A middleware device that performs data linkage between an application and an IoT device, wherein the profile information includes information for controlling an actuator associated with the IoT device.