Communication method, device, medium and product between cloud and IoT device

By extending common interface requests in IoT devices, the problem of flexibility and inefficiency when IoT devices add new services or functions in the prior art is solved, and more efficient end-cloud communication is achieved.

CN115834735BActive Publication Date: 2024-12-20QINGDAO HAIER TECH +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202111093890.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-17
Publication Date
2024-12-20
Estimated Expiration
2041-09-17

AI Technical Summary

Technical Problem

In the prior art, when adding new services or functions to IoT devices, it is necessary to expand corresponding content in the end-cloud communication protocol, resulting in less flexibility and efficiency in carrying out new end-cloud communication services.

Method used

By extending the universal interface request in the terminal cloud communication protocol, the cloud forwarding device receives the new function execution request and generates a universal interface request. There is no need to expand the corresponding content for each new function, and directly instructs the target Internet of Things device to execute through the universal interface request. New features.

Benefits of technology

It improves the flexibility and efficiency of carrying out new end-cloud communication services, reduces the processing steps of cloud forwarding devices, and speeds up the processing speed of new functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115834735B_ABST
    Figure CN115834735B_ABST
Patent Text Reader

Abstract

The present invention provides a communication method, device, medium and product between the cloud and an Internet of Things device. The method is applied to a cloud forwarding device, including: receiving a new function execution request sent by a cloud application device, the new function execution request including target new function related information of a target Internet of Things device; encapsulating the target new function related information, generating a general interface request, and marking the request type of the general interface request; sending the general interface request marked with the request type to the target Internet of Things device, the general interface request is used to instruct the target device application in the target Internet of Things device to execute the target new function. Based on this, it is only necessary to expand the corresponding content of the general interface request once in the end-cloud communication protocol. In this way, when the cloud forwarding device receives the new function execution request, it can directly generate a general interface request without expanding the corresponding content for the new function, thereby improving the flexibility and efficiency of carrying out new end-cloud communication services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Things, and in particular to a communication method, device, medium and product between a cloud and Internet of Things devices. Background Art

[0002] The Internet of Things (IoT) technology is an information carrier based on the Internet, traditional telecommunications networks, etc., which allows all ordinary physical objects that can be independently addressed to form an interconnected network.

[0003] In current technology, IoT cloud applications need to remotely request IoT devices to implement corresponding functions. Usually, an instruction needs to be designed for each function in the communication protocol between IoT devices (referred to as the end) and IoT cloud applications (referred to as the cloud). For each function, corresponding content needs to be developed in IoT devices, IoT cloud applications, and corresponding communication systems to support the function.

[0004] Using this implementation method in current technology, if a new service or function is added to an IoT device, and the IoT cloud application needs to remotely request the new service or function on the IoT device, the instructions corresponding to the new service or function need to be extended to the communication protocol between the end and the cloud, and corresponding content needs to be developed on the end, the cloud, and the corresponding communication system to support the new service or function, which makes the flexibility and efficiency of launching new end-cloud communication services low. Summary of the invention

[0005] The present invention provides a communication method, device, medium and product between a cloud and an Internet of Things device, for solving the problems of low flexibility and efficiency in developing a new end-to-cloud communication business.

[0006] In a first aspect, the present invention provides a communication method between a cloud and an Internet of Things device, which is applied to a cloud forwarding device, the method comprising: receiving a new function execution request sent by a cloud application device, the new function execution request including information related to a target new function of a target Internet of Things device, the target new function related information indicating information that needs to be indicated to the Internet of Things device to implement the target new function; encapsulating the target new function related information to generate a general interface request, and marking the request type of the general interface request; sending the general interface request marked with the request type to a target Internet of Things device, the general interface request being used to instruct a target device application in the target Internet of Things device to execute the target new function.

[0007] Optionally, the cloud forwarding device includes a forwarding end request proxy component and a machine-to-machine (M2M) gateway; the receiving of the new function execution request sent by the cloud application device includes: using the forwarding end request proxy component to receive the new function execution request sent by the cloud application device; the encapsulating the target new function related information, generating a general interface request, and marking the request type of the general interface request includes: using the M2M gateway to encapsulate the target new function related information, generate a general interface request, and mark the request type of the general interface request.

[0008] Optionally, the target new function related information includes: target IoT device identification information, target device application identification information, interface information of the target new function and interface input parameters; the use of the M2M gateway to encapsulate the target new function related information, generate a general interface request, and mark the request type of the general interface request, including: using the M2M gateway and encapsulating the target new function related information through the message queuing telemetry transport protocol (MQTT) or the WIFI basic protocol to generate a general interface request; marking the request type of the general interface request as a general interface request type.

[0009] Optionally, the method also includes: using an M2M gateway to receive an interface response message sent by a target Internet of Things device, the interface response message representing a response message having an execution result and a response type fed back after executing a target new function; using the M2M gateway to parse the interface response message to obtain the response type of the interface response message; if it is determined that the response type of the interface response message is a general interface response type, sending the execution result of the target new function in the interface response message to a cloud application device through a forwarding end request proxy component.

[0010] In a second aspect, the present invention provides a communication method between a cloud and an IoT device, which is applied to an IoT device, the method comprising: receiving a general interface request sent by a cloud forwarding device, the general interface request comprising: information related to a target new function, the information related to the target new function indicating information that needs to be indicated to the IoT device to implement the target new function; parsing the general interface request to determine the target device application and the target new function of the request; and executing the target new function through the target device application.

[0011] Optionally, the Internet of Things device includes: a connection component and an interface request proxy component; the target new function related information includes: target Internet of Things device identification information, target device application identification information, interface information and interface input parameters of the target new function; the receiving of the general interface request sent by the cloud forwarding device includes: using the connection component to receive the general interface request sent by the cloud forwarding device; the parsing of the general interface request to determine the target device application and the target new function of the request includes: using the interface request proxy component to parse the general interface request to obtain the target device application identification information and the interface information of the target new function; determining the target device application according to the target device application identification information, and determining the target new function according to the interface information of the target new function.

[0012] Optionally, executing the target new function through the target device application includes: inputting interface input parameters into the target device application of the Internet of Things device, and using the target device application to execute the target new function according to the interface input parameters.

[0013] Optionally, the method also includes: using an interface request proxy component to obtain an interface response message, and sending the interface response message to a connection component, wherein the interface response message represents a response message with an execution result and a response type that is fed back after executing the target new function; using the connection component to encapsulate the interface response message to form a general interface response message, and marking the response type of the general interface response message as a general interface response type; and using the connection component to send the general interface response message to a cloud forwarding device.

[0014] According to a third aspect, a communication device between a cloud and an IoT device is provided, comprising: a receiving module for receiving a new function execution request sent by a cloud application device, wherein the new function execution request includes information related to a target new function of a target IoT device, wherein the information related to the target new function indicates information that needs to be indicated to the IoT device to implement the target new function; a processing module for encapsulating the information related to the target new function, generating a general interface request, and marking the request type of the general interface request; and a sending module for sending the general interface request marked with the request type to a target IoT device, wherein the general interface request is used to instruct a target device application in the target IoT device to execute the target new function.

[0015] In a fourth aspect, a communication device between a cloud and an IoT device is provided, comprising: a receiving module, receiving a general interface request sent by a cloud forwarding device, wherein the general interface request comprises: information related to a target new function, wherein the information related to the target new function represents information that needs to be indicated to the IoT device to implement the target new function; a determination module, parsing the general interface request, determining the target device application and the target new function of the request; and a processing module, executing the target new function through the target device application.

[0016] In a fifth aspect, a cloud forwarding device is provided, comprising: at least one processor; and a memory and a transceiver communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the transceiver is used to send and receive data between cloud application devices and Internet of Things devices; the instructions are executed by the at least one processor so that the at least one processor can execute any one of the methods described in the first aspect.

[0017] In the sixth aspect, an Internet of Things device is provided, comprising: at least one processor; and a memory and a transceiver communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the transceiver is used to send and receive data with a cloud forwarding device; the instructions are executed by the at least one processor so that the at least one processor can execute any method described in the second aspect of claim.

[0018] In the seventh aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspect, the second aspect, or the first aspect and the second aspect.

[0019] In an eighth aspect, a computer program product is provided, comprising a computer program, which, when executed, enables the computer to execute a method as described in any one of the first aspect, the second aspect, or both the first aspect and the second aspect.

[0020] The embodiment of the present invention provides a communication method, apparatus, medium and product between the cloud and an IoT device, which receives a new function execution request sent by a cloud application device, wherein the new function execution request includes information related to a target new function of a target IoT device; encapsulates the information related to the target new function, generates a general interface request, and marks the request type of the general interface request; sends the general interface request marked with the request type to the target IoT device, wherein the general interface request is used to instruct a target device application in the target IoT device to execute the target new function. In the embodiment of the present invention, the corresponding content of the general interface request only needs to be expanded once in the end-cloud communication protocol, so that when the cloud forwarding device receives the new function execution request, it can directly generate a general interface request without expanding the corresponding content for the new function, thereby improving the flexibility and efficiency of carrying out new end-cloud communication services. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0022] Figure 1 A schematic diagram of a network architecture of a communication method between a cloud and an IoT device provided by an embodiment of the present invention;

[0023] Figure 2 A schematic flow chart of a communication method between the cloud and an IoT device provided in the first embodiment of the present invention;

[0024] Figure 3 A schematic flow chart of a communication method between the cloud and an IoT device provided in accordance with a second embodiment of the present invention;

[0025] Figure 4 A schematic flow chart of a communication method between the cloud and an IoT device provided in a third embodiment of the present invention;

[0026] Figure 5 A schematic flow chart of a communication method between the cloud and an IoT device provided in a fourth embodiment of the present invention;

[0027] Figure 6 A schematic flow chart of a communication method between the cloud and an IoT device provided in a fifth embodiment of the present invention;

[0028] Figure 7 A schematic flow chart of a communication method between the cloud and an IoT device provided in a sixth embodiment of the present invention;

[0029] Figure 8 A schematic flow chart of a communication method between the cloud and an IoT device provided in a seventh embodiment of the present invention;

[0030] Fig. 9 A schematic flow chart of a communication method between the cloud and an IoT device provided in the eighth embodiment of the present invention;

[0031] Fig.10 A schematic block diagram of a communication device between a cloud and an IoT device provided in a first embodiment of the present invention;

[0032] Fig.11 A schematic block diagram of a communication device between a cloud and an IoT device provided in a fifth embodiment of the present invention;

[0033] Fig.12 A schematic block diagram of an electronic device provided by an embodiment of the present invention.

[0034] The above drawings have shown clear embodiments of the present invention, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0036] The Internet of Things technology is an information carrier based on the Internet, traditional telecommunications networks, etc., which allows all common physical objects that can be independently addressed to form an interconnected network. In the embodiments of the present invention, the corresponding technologies and existing problems are explained in combination with the interaction between the Internet of Things cloud application and the Internet of Things device.

[0037] In current technology, IoT cloud applications need to remotely request IoT devices to implement functions on IoT devices, such as turning on the air conditioner, setting the temperature, starting or stopping the local scene, etc. It is usually necessary to design an instruction for each function in the communication protocol between the IoT device (referred to as the end) and the IoT cloud application (referred to as the cloud). At the same time, for each function, corresponding content needs to be developed in the IoT device and the IoT cloud application, as well as the corresponding communication system, to support the function. For example, for the operation of starting the local scene, if the end-cloud communication protocol is the MQTT protocol, a new topic will be added, such as: / device / {deviceId} / scene / {sceneId} / start, where device represents the IoT device, deviceId represents the identification information of the IoT device, scene represents an application on the corresponding IoT device to be requested, where scene itself represents "local scene application", start represents a function of an application on the corresponding IoT device to be requested, where start itself represents "start local scene application"; if the end-cloud communication protocol is the WIFI basic protocol, a new command word will be added, such as START_SCENE, which means "start local scene application".

[0038] Similarly, for example, for the operation of stopping the local scene, if the end-cloud communication protocol is the MQTT protocol, a new topic will be added, such as: / device / {deviceId} / scene / {sceneId} / stop; if the end-cloud communication protocol is the WIFI basic protocol, a new command word will be added, such as STOP_SCENE. The meanings of the two are similar to the above, and for the sake of brevity, they will not be repeated here.

[0039] Therefore, combined with the above, it can be seen that using this implementation method in the current technology, every time a new service or function is added to the IoT device, and the IoT cloud application needs to remotely request the new service or function on the IoT device, it is necessary to extend the instructions corresponding to the new service or function to the communication protocol between the end and the cloud, and develop corresponding content on the end, cloud and corresponding communication system to support the new service or new function, thereby reducing the flexibility and efficiency of launching new end-cloud communication services.

[0040] In response to the problems in the prior art, the inventors discovered through research that, in the case where a new service or function is added to an IoT device and the IoT cloud application needs to remotely request the newly added service or function on the IoT device, if it is not necessary to expand the content corresponding to each newly added service or function in the communication protocol between the end and the cloud for each newly added service or function, but instead a general interface request is expanded in the communication protocol between the end and the cloud, all newly added services or functions between the end and the cloud can be implemented through the general interface request without expanding the content corresponding to each newly added service or function in the cloud forwarding device, which will be of great help in improving the flexibility and efficiency of developing new end-cloud communication services.

[0041] The following is an introduction to the network architecture of the communication method between the cloud and the IoT device provided by the embodiment of the present invention. Figure 1 As shown, the network architecture corresponding to the data search method provided in this embodiment includes a cloud application device 1 for requesting an IoT device interface, a cloud forwarding device 2, and an IoT device 3. Among them, the IoT device 3 can be at least one IoT device, Figure 1 Two IoT devices 31 and IoT device 32 are shown. It should be understood that the IoT device is a device that can be remotely controlled by the cloud application device 1. The present invention does not limit the type of IoT devices. The cloud application device 1 has an interface for requesting the IoT device to implement the target new function, and the IoT device 3 has an interface that can implement the target new business or function. The cloud application device 1 sends a request for the target new function of the IoT device to the cloud forwarding device 2, and the cloud forwarding device 2 forwards the request to the IoT device 3. The IoT device 3 parses the corresponding request and implements the corresponding target new function, and forwards the execution result of the target new function to the cloud forwarding device 2. The cloud forwarding device 2 can forward the execution result of the target new function to the cloud application device 1.

[0042] Implementation

[0043] Figure 2 A schematic flow chart of a communication method between a cloud and an IoT device provided in the first embodiment of the present invention, such as Figure 2 As shown, the execution subject of the embodiment of the present invention is a communication device between the cloud and the Internet of Things device, and the communication device between the cloud and the Internet of Things device is located in a cloud forwarding device. The communication method between the cloud and the Internet of Things device provided in this embodiment includes the following steps.

[0044] Step 201: The cloud forwarding device receives a new function execution request sent by the cloud application device.

[0045] The new function execution request includes the target new function related information of the target IoT device. The target new function related information indicates the information that needs to be indicated to the IoT device to implement the target new function, and can be used to carry information such as the device, interface, request type, and parameters that need to be input corresponding to the target new function.

[0046] It can be understood that the cloud forwarding device is used to find which IoT device can complete the new function in the new function execution request and send it to the corresponding IoT device. Therefore, the new function execution request at least includes the identification information corresponding to the target IoT device.

[0047] It should also be understood that although the cloud forwarding device provided in this embodiment does not need to pay attention to the specific functions of the new functions, after the cloud forwarding device forwards the new function execution request to the target IoT device, the target IoT device finds the interface for implementing the target new function according to the new function execution request, and calls the corresponding interface to implement the target new function. Therefore, the new function execution request may include the target new function related information of the target IoT device. Among them, the target new function related information may include the application, interface and corresponding parameters for implementing the target new function.

[0048] Step 202: encapsulate the target newly added function related information, generate a general interface request, and mark the request type of the general interface request.

[0049] Among them, the general interface can be understood as a software interface developed for at least one new function, and the software interface can be understood as a general software interface for different functions. The request type of the general interface request is different from the request type of other existing functions. The general interface request type is a general interface request type, which indicates the request type corresponding to a general software interface request corresponding to the new function. That is, it can be understood that after the target IoT device adds at least one new function, the cloud application device wants the target IoT device to implement the at least one new function, and it can generate the above-mentioned general interface request based on the relevant information of the at least one new function, so that the target IoT device calls the corresponding application and interface based on the general interface request to implement the at least one new function.

[0050] It should be understood that the content corresponding to the general interface request is predefined, for example, may be defined in the protocol.

[0051] Step 203: Send the universal interface request marked with the request type to the target IoT device.

[0052] Among them, the universal interface request includes identification information corresponding to the target Internet of Things device, so the universal interface request marked with the request type can be sent to the target Internet of Things device according to the identification information corresponding to the target Internet of Things device.

[0053] The general interface request is used to instruct a target device application in a target IoT device to execute a target new function.

[0054] The communication method between the cloud and the IoT device provided in this embodiment is applied to the cloud forwarding device, by receiving the new function execution request sent by the cloud application device, the new function execution request includes the target new function related information of the target IoT device; encapsulating the target new function related information, generating a general interface request, and marking the request type of the general interface request; sending the general interface request marked with the request type to the target IoT device, the general interface request is used to instruct the target device application in the target IoT device to execute the target new function. Since a new function is added, the cloud forwarding device must correspondingly add a software interface corresponding to the new function, and the corresponding instructions must also be extended in the end-cloud communication protocol to facilitate the support of the function, thereby making the flexibility and efficiency of carrying out new end-cloud communication services low. Therefore, in the embodiment of the present invention, it is only necessary to extend the corresponding content of the general interface request once in the end-cloud communication protocol, so that when the cloud forwarding device receives the new function execution request, it can directly generate a general interface request without expanding the corresponding content for the new function, thereby improving the flexibility and efficiency of carrying out new end-cloud communication services.

[0055] Embodiment 2

[0056] Figure 3 A schematic flow chart of a data search method provided by the second embodiment of the present invention is shown in FIG. Figure 3 As shown, the communication method between the cloud and the IoT device provided in this embodiment is a further refinement of step 201 and step 202 based on the communication method between the cloud and the IoT device provided in the first embodiment of the present invention, wherein step 301 is a further refinement of step 201, and step 302 is a further refinement of step 202. The cloud forwarding device may include a forwarding end request proxy component and an M2M gateway, and the communication method between the cloud and the IoT device provided in this embodiment includes the following steps:

[0057] Step 301: Use a forwarding end request proxy component to receive a new function execution request sent by a cloud application device.

[0058] It can be understood that the forwarding end request proxy component is a predefined software interface, which is used to receive a new function execution request and convert the new function execution request into a request that can be recognized by the M2M gateway.

[0059] The forwarding end request proxy component is a component that specifically receives the new function execution request sent by the cloud application device. It is understandable that if the cloud application device sends a non-new function execution request, it can be directly received by the M2M gateway.

[0060] Step 302: Use the M2M gateway to encapsulate the target newly added function related information, generate a general interface request, and mark the request type of the general interface request.

[0061] Among them, the target new function related information includes: target IoT device identification information, target device application identification information, target new function interface information and interface input parameters.

[0062] It can be understood that the end-cloud communication protocol has already defined how to generate the content of the general interface request based on the target new function related information. Therefore, the form of the target IoT device identification information can also be understood as predefined.

[0063] Below, we take MQTT as an example of the end-cloud communication protocol to explain the various information related to the target new function. Among them, the target IoT device identification information can be represented as deviceId, which can be the serial number, name and model of the target IoT device, and other information that uniquely represents the target IoT device; the target device application identification information can be represented as service, which can be the serial number, name and model corresponding to a certain application in the target IoT device, and other information that uniquely represents a certain application in the target IoT device, such as "scene" (local scene application); the interface information of the target new function can be represented as apiName, which can represent the API corresponding to a certain function corresponding to a certain application, such as "start" (start local scene application); the interface input parameters can be represented as params, which represent the input parameters required by the aforementioned function, and can be a list of multiple parameter value pairs (key-value).

[0064] It should be understood that one M2M gateway corresponds to multiple IoT devices, so the target new function related information at least includes the target IoT device identification information, which is used by the M2M gateway to identify which IoT device the target new function corresponds to.

[0065] It should also be understood that the target device application identification information, the interface information of the target new function and the interface input parameters are used by subsequent IoT devices to determine the application corresponding to the target new function, as well as the corresponding interface information and parameters required to implement the target new function.

[0066] The communication method between the cloud and the IoT device provided in this embodiment uses a forwarding end request proxy component to receive the new function execution request sent by the cloud application device; uses an M2M gateway to encapsulate the target new function related information, generate a general interface request, and mark the request type of the general interface request. For the new function, the cloud forwarding device deploys a general interface specifically for sending and receiving new function related information, namely, the forwarding end request proxy component, through which the new function execution request is sent to the M2M gateway, and the forwarding end request proxy component and the M2M gateway have pre-stored corresponding information for converting the new function related information into a general interface request. The M2M gateway only needs to convert the new function related information into a general interface request and send it to the IoT device. Therefore, when adding a new function, the forwarding end request proxy component and the M2M gateway only play a forwarding role, saving the intermediate process of determining why the new function is a new function and the need to re-expand the instructions corresponding to the new function in the end-cloud transmission protocol.

[0067] Embodiment 3

[0068] Figure 4 A schematic flow chart of a communication method between a cloud and an IoT device provided in a third embodiment of the present invention, such as Figure 4 As shown, the communication method between the cloud and the IoT device provided in this embodiment is a further refinement of step 302 based on the communication method between the cloud and the IoT device provided in the second embodiment of the present invention. The communication method between the cloud and the IoT device provided in this embodiment includes the following steps:

[0069] Step 401: Use an M2M gateway to encapsulate the target newly added function related information through MQTT or WIFI basic protocol to generate a general interface request.

[0070] It should be understood that MQTT or WIFI basic protocol can be understood as end-cloud communication protocol.

[0071] Exemplarily, the process of encapsulating the target new function related information is explained below by taking the end-cloud communication protocol as MQTT as an example. As mentioned above, the target new function related information may include: target IoT device identification information (for example, deviceId), target device application identification information (for example, service), target new function interface information (for example, apiName) and interface input parameters (for example, params). The above target new function related information is encapsulated into a message with a topic name (topic name) of "general interface (application programming interface, API) request" to generate a general interface request. Among them, the general interface request can be, for example, / device / {deviceId} / api / req, and it is published to the topic (topic) corresponding to the general API request. Among them, the api in the general interface request of the above example can correspond to the interface information of the target new function mentioned above, and req corresponds to the interface input parameters mentioned above.

[0072] It should be understood that the end-cloud communication protocol can expand the relevant information of the general interface request so that the IoT device can parse and obtain the relevant information of the target new function after receiving the encapsulated general interface request.

[0073] Step 402: Mark the request type of the general interface request as a general interface request type.

[0074] It can be understood that in the embodiment of the present invention, the general interface request type can be regarded as a type specially set for the newly added function. The general interface request type can correspond to the "general API request" mentioned above, for example.

[0075] The communication method between the cloud and the IoT device provided in this embodiment is applied to the cloud forwarding device, and the target new function related information is encapsulated by using the M2M gateway and the MQTT or WIFI basic protocol to generate a general interface request; the request type of the general interface request is marked as the general interface request type. In this embodiment, for the target new function, the end-cloud communication protocol MQTT or the WIFI basic protocol can be used to expand the relevant content of a general interface request, so that when adding a new function, since the M2M gateway has pre-stored the relevant content of converting the new function related information into the general interface request, the M2M gateway only needs to convert the new function related information into the general interface request, and does not need to re-expand the instructions corresponding to the new function in the end-cloud communication protocol. Therefore, when adding a new function, the M2M gateway can quickly determine that the received request is a new function execution request, and then quickly generate a general interface request, thereby improving the flexibility and efficiency of carrying out new end-cloud communication services.

[0076] Embodiment 4

[0077] Figure 5 A schematic flow chart of a communication method between a cloud and an IoT device provided in a fourth embodiment of the present invention, such as Figure 5 As shown, the communication method between the cloud and the IoT device provided in this embodiment is based on the communication method between the cloud and the IoT device provided in any of the foregoing embodiments of the present invention, and further includes a process in which the cloud forwarding device processes the general interface response type message. The communication method between the cloud and the IoT device provided in this embodiment includes the following steps:

[0078] Step 501: Use an M2M gateway to receive an interface response message sent by a target IoT device.

[0079] Among them, the interface response message can represent the response message with execution result and response type fed back after executing the target new function, and can be used to carry the device, interface, response type and execution result corresponding to a certain function.

[0080] It should be understood that the interface response message may be a message of a general interface response type or other interface response messages. Among them, the message of the general interface response type corresponds to the message of the general interface request type mentioned above. Therefore, if the interface response message is a message of a general interface response type, it can be used to represent a response message with an execution result and a response type fed back after executing the target new function, for example, it can be used to carry the device, interface, response type and execution result corresponding to the target new function.

[0081] Step 502: The M2M gateway is used to parse the interface response message to obtain the response type of the interface response message.

[0082] Among them, the response type of the interface response message is similar to the request type of the interface in the previous text. In the embodiment of the present invention, the response type can be a general interface response type corresponding to the general interface request type in the previous text or other interface response types. Among them, the general interface response type can be understood as the response type corresponding to the general interface response message obtained after processing by the Internet of Things device. Among them, the general interface response message represents the general interface response message corresponding to the newly added function.

[0083] Step 503: If it is determined that the response type of the interface response message is a general interface response type, the target new function execution result in the interface response message is sent to the cloud application device through the forwarding end request proxy component.

[0084] It is understandable that the relevant content of the general interface response may be predefined, for example, the relevant content of the general interface response is defined in the end-cloud communication protocol, so the M2M gateway can determine whether the type of the interface response message is a general interface response type.

[0085] It should be understood that the forwarding end request proxy component is a general interface specifically used to send and receive information related to new functions. Therefore, if the response type of the interface response message is determined to be a general interface response type, the target new function execution result is sent to the cloud application device through the forwarding end request proxy component.

[0086] The target new function execution result may be a result of successful execution of the target new function, or a result of failed execution of the target new function.

[0087] The communication method between the cloud and the IoT device provided in this embodiment is applied to the cloud forwarding device, and receives the interface response message sent by the target IoT device by using the M2M gateway; the M2M gateway is used to parse the interface response message to obtain the response type of the interface response message and the target new function execution result; if it is determined that the response type of the interface response message is a general interface response type, the target new function execution result is sent to the cloud application device through the forwarding end request proxy component. In this embodiment, for the target new function, the cloud forwarding device deploys a general interface specifically used for sending and receiving new function related information, namely the forwarding end request proxy component, so that when a new function is added, the M2M gateway can directly receive the general interface response and forward the response to the forwarding end request proxy component, so that the forwarding end request proxy component forwards the response to the cloud application device, and the forwarding end request proxy component and the M2M gateway do not need to develop corresponding content for the new function, and only forward the response, thereby reducing the complexity of end-to-cloud transmission and improving the flexibility and efficiency of developing new end-to-cloud communication services.

[0088] Embodiment 5

[0089] Figure 6 A schematic flow chart of a communication method between the cloud and an IoT device provided in a fifth embodiment of the present invention, Figure 6 is a schematic flow chart of a communication method between a cloud and an IoT device according to a fifth embodiment of the present invention. Figure 6 As shown, the execution subject of the embodiment of the present invention is a communication device between the cloud and the IoT device, and the communication device between the cloud and the IoT device is located in the IoT device. The communication method between the cloud and the IoT device provided in this embodiment includes the following steps:

[0090] Step 601: Receive a universal interface request sent by a cloud forwarding device.

[0091] The general interface request includes: information related to the target new function.

[0092] It should be understood that this step corresponds to step 203 in the first embodiment.

[0093] As can be seen from step 302, the general interface request can be obtained by encapsulating the target new function related information, so the general interface request includes the target new function related information. The target new function related information can be specifically referred to the relevant description above, which will not be repeated here.

[0094] Step 602: parse the general interface request to determine the target device application and target new function of the request.

[0095] It should be understood that the IoT device deploys the relevant content of the general interface request, and the general interface request includes the relevant information of the target new function, that is, the general interface request at least includes the target IoT device identification information, the target device application identification information and the interface information of the target new function. Therefore, the specific target IoT device can be determined according to the target IoT device identification information, the target device application can be determined according to the target device application identification information, and the interface corresponding to the target new function can be determined according to the interface information of the target new function. Among them, the target device application can be understood as the application on the target IoT device that can realize the target new function.

[0096] It should also be understood that, since the target new function related information also includes the interface input parameters of the target new function, the general interface request also includes the interface input parameters of the target new function.

[0097] Step 603: Execute the target newly added function through the target device application.

[0098] In step 602 , the target device application may call an interface corresponding to the target new function, and implement the corresponding target new function based on the interface input parameters of the target new function.

[0099] The communication method between the cloud and the IoT device provided in this embodiment is applied to the IoT device, by receiving a universal interface request sent by a cloud forwarding device, wherein the universal interface request includes: information related to the target new function; parsing the universal interface request to determine the target device application and the target new function of the request; and executing the target new function through the target device application. In the embodiment of the present invention, since the information related to the target new function is encapsulated as a universal interface request in the cloud forwarding device, all new functions between the end and the cloud can be implemented through the universal interface request, and the corresponding content of the universal interface request only needs to be expanded once in the cloud forwarding device, so there is no need to expand the corresponding content for each new function, which reduces the processing steps in the cloud forwarding device as a whole, speeds up the processing of new functions, and improves the flexibility and efficiency of launching new end-cloud communication services.

[0100] Embodiment 6

[0101] Figure 7 A schematic flow chart of a communication method between the cloud and an IoT device provided in a sixth embodiment of the present invention, such as Figure 7 As shown, the communication method between the cloud and the IoT device provided in this embodiment is a further refinement of step 601 and step 602 based on the communication method between the cloud and the IoT device provided in the fifth embodiment of the present invention, wherein step 701 is a further refinement of step 601, and step 702 is a further refinement of step 602. The IoT device may include: a connection component and an interface request proxy component, and the communication method between the cloud and the IoT device provided in this embodiment includes the following steps:

[0102] Step 701: Use a connection component to receive a universal interface request sent by a cloud forwarding device.

[0103] It can be understood that the connection component is used to forward the received universal interface request to the interface request proxy component.

[0104] Step 702: Use an interface request proxy component to parse the general interface request to determine the target device application and target new function of the request.

[0105] Among them, the interface request proxy component is a component deployed on the IoT device for the new function, which can be used to parse the general interface request. The general interface request can be encapsulated by the target new function related information. Therefore, the general interface request includes the target new function related information, and the target new function related information includes the target device application and the target new function related information. Therefore, it can be used to determine the target device application and the target new function of the request.

[0106] Specifically, step 702 can be divided into two steps, step 7021 and step 7022. These two steps are described in detail below.

[0107] Step 7021: Use the interface request proxy component to parse the general interface request to obtain the target device application identification information and the interface information of the target new function.

[0108] Step 7022: determine the target device application according to the target device application identification information, and determine the target new function according to the interface information of the target new function.

[0109] Step 703: input the interface input parameters into the target device application of the IoT device, and use the target device application to execute the target new function according to the interface input parameters.

[0110] It should be understood that the target device application is installed in the IoT device, so this step can be implemented by a software module of the IoT device.

[0111] The communication method between the cloud and the IoT device provided in this embodiment is applied to the IoT device, by receiving a general interface request sent by a cloud forwarding device, wherein the general interface request includes: information related to the target new function; parsing the general interface request to determine the target device application and the target new function of the request; and executing the target new function through the target device application. In the embodiment of the present invention, since the information related to the target new function is encapsulated as a general interface request in the cloud forwarding device, the IoT device receives the general interface request sent by the cloud forwarding device, which is equivalent to obtaining the information related to the target new function. By deploying the corresponding interface request proxy component for processing the general interface request, the IoT device collaborates with the cloud forwarding device to complete the processing of the target new function, thereby making the processing process of the cloud forwarding device simpler and the processing process of the target new function more concise.

[0112] Embodiment 7

[0113] Figure 8 A schematic flow chart of a communication method between the cloud and an IoT device provided in the seventh embodiment of the present invention, such as Figure 8 As shown, the communication method between the cloud and the IoT device provided in this embodiment is based on the communication method between the cloud and the IoT device provided in the fifth or sixth embodiment of the present invention, and also includes a process in which the IoT device processes a general interface response type message. The communication method between the cloud and the IoT device provided in this embodiment includes the following steps:

[0114] Step 801: Use the interface request proxy component to obtain an interface response message, and send the interface response message to the connection component.

[0115] Among them, the interface request proxy component is a component deployed on the IoT device for new functions. In addition to being used to parse general interface requests, it can also be used to obtain interface response messages and send interface response messages to the connection component.

[0116] It should be understood that the interface request proxy component is a component corresponding to the general interface specifically used to send and receive information related to new functions. Therefore, if it is determined that an interface response message is received, the interface request proxy component can send the execution result of the target new function to the cloud application device.

[0117] Among them, the relevant description in the fourth specific embodiment of the interface response message is not repeated here for the sake of brevity.

[0118] Step 802: Use a connection component to encapsulate the interface response message to form a general interface response message, and mark the response type of the general interface response message as a general interface response type.

[0119] The response type of the interface response message may refer to the related description of step 502 above, and will not be described again here for the sake of brevity.

[0120] For ease of understanding, an example is given here to illustrate the process of encapsulating the interface response message, which is similar to the process of encapsulating the target new function related information. For example, the interface response message may include: target IoT device identification information (for example, deviceId), target device application identification information (for example, service), target new function interface information (for example, apiName) and target new function execution result. The above target new function related information is encapsulated into a message with a topic name (topic name) of "general interface (application programming interface, API) response" to generate an interface response message. Among them, the interface response message can be, for example, / device / {deviceId} / api / resq, and it is published to the topic (topic) corresponding to the general API request. Among them, the api in the general interface request of the above example can correspond to the interface information of the target new function in the above text, and resq corresponds to the target new function execution result in the above text.

[0121] Step 803: Use the connection component to send the universal interface response message to the cloud forwarding device.

[0122] The communication method between the cloud and the IoT device provided in this embodiment is applied to the IoT device, and the interface response message is obtained by using an interface request proxy component, and the interface response message is sent to the connection component; the interface response message is encapsulated by the connection component to form a general interface response message, and the response type of the general interface response message is marked as a general interface response type; the general interface response message is sent to the cloud forwarding device by the connection component. Since a new function is added, the embodiment of the present invention uses a "general interface request" in the cloud forwarding device to send corresponding information to the IoT device. Therefore, in this embodiment, for the target new function, on the IoT device side, by deploying an "interface request proxy component", the "general interface response" message is forwarded to the cloud forwarding device, and then the method of the fifth embodiment can be used to further process the "general interface response" message. As described in the fifth embodiment, since the relevant content of the "general interface response" can be predefined, the cloud forwarding device can be directly forwarded to the cloud application device, and there is no need to expand the corresponding content in the cloud forwarding device and the end-cloud communication protocol again, thereby reducing the complexity of the end-cloud transmission and improving the flexibility and efficiency of carrying out new end-cloud communication services.

[0123] Embodiment 8

[0124] Fig. 9 It is a schematic flow chart of the communication method between the cloud and the Internet of Things device provided by the eighth embodiment of the present invention, which mainly describes the method provided by the embodiment of the present invention from the interaction process among the cloud application device 1, the cloud forwarding device 2 and the target Internet of Things device 31.

[0125] It should be understood that the above-mentioned cloud application device 1, cloud forwarding device 2 and target IoT device 31 can correspond to the above-mentioned Figure 1 The application device 1, the cloud forwarding device 2 and the Internet of Things device 31.

[0126] The cloud application device 1 includes at least one application. Fig. 9 4 applications are shown, namely cloud application 11, cloud application 12, cloud application 13, and cloud application 14; cloud forwarding device 2 may include forwarding end request proxy component 5 and M2M gateway 6; target IoT device 31 may include connection component 7, interface request proxy component 8, and target device application 9. Fig. 9 The communication method between the cloud and the IoT device provided in this embodiment is described. Fig. 9 As shown, the communication method between the cloud and the IoT device provided in this embodiment may include the following steps:

[0127] Step 901 : an application (eg, cloud application 11 ) in cloud application device 1 sends a new function execution request to cloud forwarding device 2 .

[0128] Correspondingly, the forwarding-end request proxy component 5 in the cloud forwarding device 2 receives the new function execution request.

[0129] Step 902 : the forwarding end request proxy component 5 forwards the newly added function execution request to the corresponding M2M gateway 6 .

[0130] Step 903 : The M2M gateway 6 sends the newly added function execution request to the corresponding target IoT device 31 .

[0131] It can be understood that the M2M gateway 6 can convert the new function execution request into a general interface request that can be recognized by the target IoT device 31.

[0132] It should be understood that the relevant content of the general interface request can be predefined. For example, the content included in the general interface request and the corresponding meaning of each content can be defined in the end-cloud communication protocol. For details, please refer to the relevant description of the second embodiment above.

[0133] Accordingly, the connection component 7 of the target IoT device 31 is used to receive the universal interface request.

[0134] Step 904 : the connection component 7 forwards the universal interface request to the interface request proxy component 8 .

[0135] Step 905 : the interface request proxy component 8 forwards the general interface request to the corresponding target device application 9 .

[0136] Step 906 : the target device application 9 returns the execution result to the interface request proxy component 8 .

[0137] It is understandable that after receiving the general interface request, corresponding processing can be performed to obtain the target new function execution result. The specific process can be referred to the relevant description above, and for the sake of brevity, it will not be repeated here.

[0138] Step 907 , the interface request proxy component 8 returns the execution result to the connection component 7 .

[0139] Step 908 : The connection component 7 returns the execution result to the M2M gateway 6 .

[0140] Step 909 , the M2M gateway 6 returns the execution result to the forwarding end request proxy component 5 .

[0141] Step 910 , the forwarding end requests the proxy component 5 to return the execution result to the cloud application 11 .

[0142] It should be understood that the specific details of the above process can be found in the relevant descriptions of other embodiments of the present invention, and for the sake of brevity, they will not be repeated here.

[0143] The method provided in this embodiment can convert the execution request of the new function into a universal interface request, and the universal interface request is predefined, which means that both the cloud forwarding device and the Internet of Things device can recognize the universal interface request. In this way, the cloud forwarding device does not need to expand the corresponding content multiple times for each new function, but only needs to expand the corresponding content of the universal interface request once. Therefore, for the target new function, the complexity of end-cloud transmission is reduced, thereby improving the flexibility and efficiency of developing new end-cloud communication services.

[0144] Fig.10 A schematic block diagram of a communication device between the cloud and an IoT device provided in the first embodiment of the present invention. Fig.10As shown, the communication device can correspond to a cloud forwarding device. The device 1000 includes: a receiving module 1010, a processing module 1020 and a sending module 1030. Among them: the receiving module 1010 is used to receive a new function execution request sent by a cloud application device, and the new function execution request includes information related to a target new function of a target IoT device, and the target new function related information indicates information that needs to be indicated to the IoT device to implement the target new function; the processing module 1020 is used to encapsulate the target new function related information, generate a general interface request, and mark the request type of the general interface request; the sending module 1030 is used to send the general interface request marked with the request type to the target IoT device, and the general interface request is used to instruct the target device application in the target IoT device to execute the target new function.

[0145] Optionally, when the receiving module 1010 receives the new function execution request sent by the cloud application device, it is specifically used to use the forwarding end request proxy component to receive the new function execution request sent by the cloud application device; when the processing module 1020 encapsulates the target new function related information, generates a universal interface request, and marks the request type of the universal interface request, it is specifically used to use the M2M gateway to encapsulate the target new function related information, generate a universal interface request, and mark the request type of the universal interface request.

[0146] Optionally, when the processing module 1020 uses the M2M gateway to encapsulate the information related to the target new function, generates a general interface request, and marks the request type of the general interface request, it is specifically used to use the M2M gateway and encapsulate the information related to the target new function through the MQTT or WIFI basic protocol to generate a general interface request; mark the request type of the general interface request as a general interface request type.

[0147] Optionally, the receiving module 1010 is also used to use the M2M gateway to receive an interface response message sent by the target Internet of Things device, where the interface response message represents a response message with an execution result and a response type that is fed back after executing the target new function; the processing module 1020 is also used to use the M2M gateway to parse the interface response message to obtain the response type of the interface response message; if it is determined that the response type of the interface response message is a general interface response type, the execution result of the target new function in the interface response message is sent to the cloud application device through the forwarding end request proxy component.

[0148] Fig.11 A schematic block diagram of a communication device between the cloud and an IoT device provided in the fifth embodiment of the present invention. The communication device may correspond to an IoT device. Fig.11As shown, the device 1100 includes: a receiving module 1110, a determining module 1120 and a processing module 1130. Among them: the receiving module 1110 is used to receive a universal interface request sent by a cloud forwarding device, and the universal interface request includes: information related to the target new function, and the target new function related information indicates information that needs to be indicated to the IoT device to implement the target new function; the determining module 1120 is used to parse the universal interface request and determine the target device application and the target new function of the request; the processing module 1130 is used to execute the target new function through the target device application.

[0149] Optionally, when receiving the universal interface request sent by the cloud forwarding device, the receiving module 1110 is specifically configured to adopt a connection component to receive the universal interface request sent by the cloud forwarding device.

[0150] Optionally, when the determination module 1120 parses the general interface request to determine the target device application and the target new function of the request, it is specifically used to use an interface request proxy component to parse the general interface request to obtain the target device application identification information and the interface information of the target new function; determine the target device application according to the target device application identification information, and determine the target new function according to the interface information of the target new function.

[0151] Optionally, the processing module 1130 is specifically configured to input the interface input parameters into a target device application of the IoT device, and use the target device application to execute the target new function according to the interface input parameters.

[0152] Optionally, the communication device may also include a sending module, which is used to use an interface request proxy component to obtain an interface response message, and send the interface response message to a connection component, wherein the interface response message represents a response message with an execution result and a response type that is fed back after executing the target new function; the processing module 1130 is also used to use the connection component to encapsulate the interface response message to form a general interface response message, and mark the response type of the general interface response message as a general interface response type; the sending module is also used to use the connection component to send the general interface response message to a cloud forwarding device.

[0153] Fig.12 Schematic block diagram of an electronic device provided by an embodiment of the present invention. Fig.12As shown, it includes: at least one processor 1210; and a memory 1220 that is communicatively connected to the at least one processor 1210; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor 1210 so that the at least one processor 1210 can execute the communication method between the cloud and the Internet of Things device provided by any embodiment.

[0154] Exemplarily, if the electronic device corresponds to the cloud forwarding device in the above method embodiment, the processor 1210 can be used to receive a new function execution request sent by a cloud application device, wherein the new function execution request includes information related to a target new function of a target IoT device; encapsulate the information related to the target new function, generate a general interface request, and mark the request type of the general interface request; send the general interface request marked with the request type to the target IoT device, wherein the general interface request is used to instruct the target device application in the target IoT device to execute the target new function. Please refer to the detailed description in the method embodiment for details, which will not be repeated here.

[0155] If the electronic device corresponds to the IoT device in the above method embodiment, the processor 1210 may be used to receive a universal interface request sent by a cloud forwarding device, wherein the universal interface request includes: information related to a target new function; parse the universal interface request to determine the target device application and the target new function requested; and execute the target new function through the target device application. For details, please refer to the detailed description in the method embodiment, which will not be repeated here.

[0156] Optionally, the electronic device may further include at least one memory 1220 for storing program instructions and / or data. The memory 1220 is coupled to the processor 1210. The coupling in the embodiment of the present invention is an indirect coupling or communication connection between devices, units or modules, which may be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The processor 1210 may operate in conjunction with the memory 1220. The processor 1210 may execute program instructions stored in the memory 1220. At least one of the at least one memory may be included in the processor.

[0157] Optionally, the electronic device may further include a communication interface 1230 for communicating with other devices via a transmission medium, so that the device used in the electronic device can communicate with other devices. Exemplarily, if the electronic device corresponds to the cloud forwarding device in the above method embodiment, the other device may be an Internet of Things device; if the electronic device corresponds to the Internet of Things device in the above method embodiment, the other device may be a cloud forwarding device. The communication interface 1230 may be, for example, a transceiver, an interface, a bus, a circuit, or a device capable of implementing a transceiver function. The processor 1210 may use the communication interface 1230 to send and receive data and / or information, and to implement the method performed by the cloud forwarding device and the Internet of Things device in any of the above embodiments.

[0158] The specific connection medium between the processor 1210, the memory 1220 and the communication interface 1230 is not limited in the embodiment of the present invention. Fig.12 The processor 1210, the memory 1220 and the communication interface 1230 are connected via a bus 1240. The bus 1240 is connected to the Fig.12 The connections between the other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0159] It should also be understood that the division of modules in the embodiments of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present invention may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0160] The present invention also provides a computer program product, the computer program product comprising: a computer program (also referred to as code, or instruction), when the computer program is executed, causes the computer to execute Figures 2 to 9 A communication method between the cloud and an IoT device in any of the embodiments shown.

[0161] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes Figures 2 to 9 A communication method between the cloud and an IoT device in any of the embodiments shown.

[0162] It should be understood that the processor in the embodiment of the present invention can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit in the processor or the instruction in the form of software. The above processor can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined to perform. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0163] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0164] The terms "unit", "module" and the like used in this specification may be used to represent a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution.

[0165] It will be appreciated by those skilled in the art that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in combination with computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. In the several embodiments provided by the present invention, it should be understood that the disclosed devices, equipment and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0166] 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 network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0167] In addition, each functional unit in each embodiment of the present invention 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.

[0168] In the above embodiments, the functions of each functional unit can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0169] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0170] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention is indicated by the following claims.

[0171] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A communication method between a cloud and an IoT device, characterized in that: The method is applied to a cloud forwarding device, the cloud forwarding device includes a forwarding end request proxy component and an M2M gateway, and the method includes: The forwarding end request proxy component is used to receive a new function execution request sent by a cloud application device, wherein the new function execution request includes information related to a target new function of a target IoT device, and the information related to the target new function indicates information that needs to be indicated to the IoT device to implement the target new function; Using the M2M gateway to encapsulate the target newly added function related information, generate a general interface request, and mark the request type of the general interface request; Sending a universal interface request marked with a request type to a target IoT device, wherein the universal interface request is used to instruct a target device application in the target IoT device to execute the target newly added function; The M2M gateway is used to receive an interface response message sent by the target IoT device, wherein the interface response message indicates a response message having an execution result and a response type fed back after executing the target newly added function; The M2M gateway is used to parse the interface response message to obtain a response type of the interface response message; If it is determined that the response type of the interface response message is a general interface response type, the target new function execution result in the interface response message is sent to the cloud application device through the forwarding end request proxy component.

2. The method according to claim 1, characterized in that The target newly added function related information includes: target IoT device identification information, target device application identification information, target newly added function interface information and interface input parameters; The step of using the M2M gateway to encapsulate the target newly added function related information, generate a general interface request, and mark the request type of the general interface request includes: Use an M2M gateway and encapsulate the target new function related information through MQTT or WIFI basic protocol to generate a general interface request; The request type of the generic interface request is marked as the generic interface request type.

3. A communication method between a cloud and an IoT device, characterized in that: The method is applied to an Internet of Things device, and the method comprises: Receive a general interface request sent by a cloud forwarding device, the general interface request is used to instruct a target device application in a target IoT device to execute a target new function, the target new function related information indicates information that needs to be indicated to the IoT device to implement the target new function, the cloud forwarding device includes a forwarding end request proxy component and an M2M gateway, the general interface request is generated by encapsulating the target new function related information using the M2M gateway, the target new function related information indicates information that needs to be indicated to the IoT device to implement the target new function, the target new function related information is included in the new function execution request, and the new function execution request is sent by the cloud application device received by the forwarding end request proxy component; Parsing the universal interface request to determine the target device application and target new function of the request; Executing the target newly added function through the target device application; Also includes: An interface request proxy component is used to obtain an interface response message, and the interface response message is sent to the connection component, wherein the interface response message represents a response message having an execution result and a response type fed back after executing the target newly added function; The interface response message is encapsulated by using a connection component to form a general interface response message, and the response type of the general interface response message is marked as a general interface response type; The connection component is used to send the universal interface response message to the cloud forwarding device.

4. The method according to claim 3, characterized in that The Internet of Things device includes: a connection component and an interface request proxy component; The target newly added function related information includes: target IoT device identification information, target device application identification information, target newly added function interface information and interface input parameters; The receiving a universal interface request sent by the cloud forwarding device includes: The connection component is used to receive a universal interface request sent by a cloud forwarding device; The step of parsing the general interface request to determine a target device application and a target new function of the request includes: The interface request proxy component is used to parse the general interface request to obtain target device application identification information and target new function interface information; The target device application is determined according to the target device application identification information, and the target new function is determined according to the interface information of the target new function.

5. The method according to claim 4, characterized in that The executing the target newly added function by using the target device application includes: The interface input parameters are input into a target device application of the Internet of Things device, and the target device application is used to execute the target newly added function according to the interface input parameters.

6. A communication device between a cloud and an IoT device, characterized in that: include: A receiving module, configured to use a forwarding end request proxy component to receive a new function execution request sent by a cloud application device, wherein the new function execution request includes information related to a target new function of a target IoT device, and the information related to the target new function indicates information that needs to be indicated to the IoT device to implement the target new function; A processing module, configured to encapsulate the target newly added function related information by using an M2M gateway, generate a general interface request, and mark the request type of the general interface request, wherein the forwarding end request proxy component and the M2M gateway are included in a cloud forwarding device; A sending module, used to send a universal interface request marked with a request type to a target IoT device, wherein the universal interface request is used to instruct a target device application in the target IoT device to execute the target newly added function; The receiving module is further used to use the M2M gateway to receive an interface response message sent by the target IoT device, wherein the interface response message represents a response message having an execution result and a response type fed back after executing the target newly added function; The processing module is further configured to parse the interface response message using the M2M gateway to obtain a response type of the interface response message; If it is determined that the response type of the interface response message is a general interface response type, the target new function execution result in the interface response message is sent to the cloud application device through the forwarding end request proxy component.

7. A communication device between the cloud and an IoT device, characterized in that: include: A receiving module receives a universal interface request sent by a cloud forwarding device, the universal interface request is used to instruct a target device application in a target IoT device to execute a target new function, the target new function related information indicates information that needs to be indicated to the IoT device to implement the target new function, the cloud forwarding device includes a forwarding end request proxy component and an M2M gateway, the universal interface request is generated by encapsulating the target new function related information by the M2M gateway, the target new function related information indicates information that needs to be indicated to the IoT device to implement the target new function, the target new function related information is included in the new function execution request, and the new function execution request is sent by the cloud application device received by the forwarding end request proxy component; A determination module, which parses the general interface request and determines the target device application and target new function of the request; A processing module, executing the target newly added function through the target device application; A sending module, used to obtain an interface response message by using an interface request proxy component, and send the interface response message to a connection component, wherein the interface response message represents a response message having an execution result and a response type fed back after executing a target newly added function; The processing module is further used to encapsulate the interface response message using the connection component to form a universal interface response message, and mark the response type of the universal interface response message as a universal interface response type; The sending module is also used to use the connection component to send the universal interface response message to the cloud forwarding device.

8. A cloud forwarding device, comprising: at least one processor; as well as a memory and a transceiver communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the transceiver is used to send and receive data between the cloud application device and the Internet of Things device; The instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 2.

9. An Internet of Things device, comprising: at least one processor; as well as a memory and a transceiver communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the transceiver is used to send and receive data with a cloud forwarding device; The instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 3 to 5.

Citation Information

Patent Citations

  • Internet of Things intelligent gateway for multi-data protocol conversion

    CN106878163A

  • Method and device for realizing interconnection and intercommunication between equipment and equipment and Internet of Things cloud platform

    CN108809945A

  • Dynamic interaction method and system for Internet of Things equipment and platform, and storage medium

    CN110716974A

  • Intelligent industrial Internet of Things terminal detection system

    CN111526072A

  • Data processing method and device based on Internet of Things, computer equipment and medium

    CN112199210A