WO2022104555A1 - 基于mqtt协议的通信方法及设备 - Google Patents
基于mqtt协议的通信方法及设备 Download PDFInfo
- Publication number
- WO2022104555A1 WO2022104555A1 PCT/CN2020/129500 CN2020129500W WO2022104555A1 WO 2022104555 A1 WO2022104555 A1 WO 2022104555A1 CN 2020129500 W CN2020129500 W CN 2020129500W WO 2022104555 A1 WO2022104555 A1 WO 2022104555A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- message
- application terminal
- information
- server
- content type
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 169
- 238000004891 communication Methods 0.000 title claims abstract description 71
- 238000004590 computer program Methods 0.000 claims description 66
- 238000012790 confirmation Methods 0.000 claims description 38
- 230000004044 response Effects 0.000 claims description 14
- 230000008569 process Effects 0.000 description 25
- 238000010586 diagram Methods 0.000 description 13
- 230000006870 function Effects 0.000 description 13
- 230000001360 synchronised effect Effects 0.000 description 9
- 238000013473 artificial intelligence Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013497 data interchange Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
Images
Definitions
- the embodiments of the present application relate to the field of the Internet of Things, and more particularly, to a communication method and device based on the MQTT protocol.
- the Message Queuing Telemetry Transport (MQTT) protocol is a publish/subscribe message protocol designed for remote devices with low hardware performance and poor network conditions. It is widely used in the Internet of Things (Internet of Things, IoT) field.
- IoT Internet of Things
- the MQTT protocol can support the content type of multiple payloads. In this case, the publisher and subscriber may have inconsistent understanding of the content type in the payload. As a result, there is a problem that the subscriber cannot parse the content in the payload.
- the embodiments of the present application provide a communication method and device based on the MQTT protocol.
- the cloud device can obtain the content type supported by the application terminal through the server, and the cloud device can generate the content in the payload of the published message according to the content type supported by the application terminal, thereby Make sure that the application terminal can correctly parse the content in the payload of the published message.
- a communication method based on the MQTT protocol includes:
- the application terminal sends first information to the server, where the first information is used to indicate the content type supported by the application terminal.
- a communication method based on the MQTT protocol includes:
- the server receives the first information sent by the application terminal, where the first information is used to indicate the content type supported by the application terminal.
- a communication method based on the MQTT protocol comprising:
- the cloud device obtains the content types supported by the application terminal from the server.
- an application terminal is provided for executing the method in the above-mentioned first aspect.
- the application terminal includes a functional module for executing the method in the above-mentioned first aspect.
- a server is provided for executing the method in the second aspect.
- the server includes functional modules for executing the method in the second aspect above.
- a cloud device for executing the method in the third aspect.
- the cloud device includes functional modules for executing the method in the third aspect.
- an application terminal including a processor and a memory.
- the memory is used to store a computer program
- the processor is used to call and run the computer program stored in the memory to execute the method in the first aspect.
- a server including a processor and a memory.
- the memory is used to store a computer program
- the processor is used to call and run the computer program stored in the memory to execute the method in the second aspect.
- a cloud device including a processor and a memory.
- the memory is used to store a computer program
- the processor is used to call and run the computer program stored in the memory to execute the method in the third aspect.
- an apparatus for implementing the method in any one of the above-mentioned first to third aspects.
- the apparatus includes: a processor for invoking and running a computer program from a memory, so that a device on which the apparatus is installed executes the method in any one of the above-mentioned first to third aspects.
- a computer-readable storage medium for storing a computer program, the computer program causing a computer to perform the method in any one of the above-mentioned first to third aspects.
- a twelfth aspect provides a computer program product comprising computer program instructions, the computer program instructions causing a computer to perform the method in any one of the above-mentioned first to third aspects.
- a thirteenth aspect provides a computer program which, when run on a computer, causes the computer to perform the method in any one of the above-mentioned first to third aspects.
- the application terminal can report the content type it supports to the server, the cloud device can learn the content type supported by the application terminal through the server, and the cloud device can generate the content in the payload of the published message according to the content type supported by the application terminal, thus, it is ensured that the application terminal can correctly parse the content in the payload of the published message.
- FIG. 1 is a schematic flowchart of a communication method based on the MQTT protocol provided according to an embodiment of the present application.
- FIG. 2 is a schematic flowchart of an application terminal indicating a content type supported by an application terminal according to an embodiment of the present application.
- FIG. 3 is a schematic flowchart of another application terminal indicating the content type supported by the application terminal provided by an embodiment of the present application.
- FIG. 4 is a schematic flowchart of still another application terminal indicating the content type supported by the application terminal provided by an embodiment of the present application.
- FIG. 5 is a schematic block diagram of a server provided according to an embodiment of the present application.
- FIG. 6 is a schematic block diagram of an application terminal provided according to an embodiment of the present application.
- FIG. 7 is a schematic block diagram of a cloud device provided according to an embodiment of the present application.
- FIG. 8 is a schematic block diagram of a communication device provided according to an embodiment of the present application.
- FIG. 9 is a schematic block diagram of an apparatus provided according to an embodiment of the present application.
- FIG. 10 is a schematic block diagram of a communication system provided according to an embodiment of the present application.
- the application terminal may be an MQTT client, and the application terminal completes message publishing and subscription through an MQTT server (Broker), and the MQTT server is used to manage the subscription and publishing of the MQTT client.
- MQTT server Broker
- the application terminal can be a mobile phone (Mobile Phone), a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (Virtual Reality, VR) terminal device, an augmented reality (Augmented Reality, AR) terminal device, industrial control (industrial control) Wireless terminal equipment in ), wireless terminal equipment in self-driving, wireless terminal equipment in remote medical, wireless terminal equipment in smart grid, transportation safety (transportation safety) wireless terminal equipment in a smart city, wireless terminal equipment in a smart city, or wireless terminal equipment in a smart home, etc.
- a virtual reality Virtual Reality, VR
- AR Augmented Reality
- wireless terminal equipment in wireless terminal equipment in self-driving
- wireless terminal equipment in remote medical wireless terminal equipment in smart grid
- transportation safety (transportation safety) wireless terminal equipment in a smart city wireless terminal equipment in a smart city, or wireless terminal equipment in a smart home, etc.
- the application terminal may also be a wearable device.
- Wearable devices can also be called wearable smart devices, which are the general term for the intelligent design of daily wear and the development of wearable devices using wearable technology, such as glasses, gloves, watches, clothing and shoes.
- a wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction, and cloud interaction.
- wearable smart devices include full-featured, large-scale, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, which needs to cooperate with other devices such as smart phones.
- the cloud device may also be called a cloud platform, which may be implemented based on cloud services, and cloud services may be combined with artificial intelligence (Artificial Intelligence, AI), that is, artificial intelligence cloud services, generally also referred to as AI as a Service (AI as a Service, AIaaS).
- AI Artificial Intelligence
- AIaaS Artificial Intelligence
- the AIaaS platform will split several types of common AI services and provide independent or packaged services in the cloud.
- This service model is similar to opening an AI-themed mall: all developers can access one or more artificial intelligence services provided by the platform through the Application Programming Interface (API) interface.
- API Application Programming Interface
- Some experienced developers can also use the AI framework and AI infrastructure provided by the platform to deploy and operate their own cloud AI services.
- the "instruction" mentioned in the embodiments of the present application may be a direct instruction, an indirect instruction, or an associated relationship.
- a indicates B it can indicate that A directly indicates B, for example, B can be obtained through A; it can also indicate that A indicates B indirectly, such as A indicates C, and B can be obtained through C; it can also indicate that there is an association between A and B relation.
- corresponding may indicate that there is a direct or indirect corresponding relationship between the two, or may indicate that there is an associated relationship between the two, or indicate and be instructed, configure and be instructed configuration, etc.
- predefinition may be implemented by pre-saving corresponding codes, forms, or other means that can be used to indicate relevant information in a device (for example, including an application terminal, a server, and a cloud device).
- a device for example, including an application terminal, a server, and a cloud device.
- predefined may refer to the definition in the protocol.
- the "protocol” may refer to the MQTT protocol, for example, it may include the MQTT 3.1.1 version and related protocols applied in future MQTT, which is not limited in this application.
- MQTT version 3.1.1 cannot negotiate the content type capability of its transmitted content. Therefore, if the content type of multiple payloads is supported in an ecosystem, the publisher side cannot perceive the content type supported by the subscriber side, and the published content cannot be parsed by the subscriber side. Case.
- this application proposes a communication scheme based on the MQTT protocol.
- the cloud device can know the content type supported by the application terminal through the server, and the cloud device can generate the content in the payload of the published message according to the content type supported by the application terminal. Make sure that the application terminal can correctly parse the content in the payload of the published message.
- FIG. 1 is a schematic flowchart of a communication method 100 based on the MQTT protocol according to an embodiment of the present application. As shown in FIG. 1 , the method 100 may include at least part of the following contents:
- the application terminal sends first information to the server, where the first information is used to indicate a content type supported by the application terminal;
- the server receives the first information sent by the application terminal
- the cloud device acquires the content type supported by the application terminal from the server.
- content type generally refers to the content type that exists in the message payload, which is used to define the type and/or encoding method of the content of the message payload, and determine in what format and encoding the message recipient will read Take this part.
- the first information occupies at least one reserved bit of a fixed header (fixheader) in the MQTT connection message. That is, in S110, the application terminal sends an MQTT connection message to the server, and the first information carried in the MQTT connection message is used to indicate the content type supported by the application terminal.
- a fixed header headerer
- the fixed header (fixheader) in the MQTT connection message may be as shown in Table 1 below, which may include 4 reserved bits (reserved bits) of bit 0-bit 3 in total.
- the solution of Example 1 mainly reuses the bit0-bit3 fields in Table 1, and the content types supported by the application terminal are described by this field.
- bit0-bit1 can support the selection of 4 content types, and bit0-bit3 supports up to 16 content types.
- bit0-bit1 “10” for JSON, "11” for TLV.
- JavaScript Object Notation JavaScript Object Notation, JSON
- triplet tag-length-value, TLV
- other content types may also be included in this application.
- JSON is a lightweight data interchange format. Data is stored and represented in a text format that is completely independent of the programming language. Concise and clear hierarchy makes JSON an ideal data exchange language. It is easy for humans to read and write, but also easy for machines to parse and generate, and effectively improve the efficiency of network transmission.
- the lengths of the T and L fields are often fixed (usually 1 to 4 bytes (bytes)), and the length of the V field is variable.
- the T field indicates the message type
- the L field indicates the message length
- the V field is often used to store the content of the message.
- the MQTT connection message may carry the content type supported by the application terminal, that is, the content type of the payload of the publish (publish) message subsequently sent to the application terminal and the content type of the payload of the subscription message that can be received.
- Example 1 the server sends the MQTT connection message to the cloud device.
- the server is a functional unit of the cloud device, so there is an internal interface (non-MQTT communication mechanism) between the server and the cloud device.
- the server sends the MQTT connection message to the cloud device through the internal interface with the cloud device.
- the cloud device obtains the MQTT connection message through the internal interface with the server.
- the MQTT connection message carries first information, where the first information is used to indicate a content type supported by the application terminal.
- the first information occupies at least one reserved bit of the fixed header in the MQTT connection message.
- Example 1 the application terminal receives an MQTT connection confirmation message sent by the server.
- the MQTT connection confirmation message carries second information, where the second information is used to indicate a content type supported by the application terminal.
- the second information occupies at least one reserved bit of a fixed header in the MQTT connection confirmation message, and the bit position occupied by the second information is the same as the bit position occupied by the first information.
- the fixed header (fixheader) in the MQTT connection confirmation message may be as shown in Table 2 below, which may include 4 reserved bits (reserved bits) of bit 0-bit 3 in total.
- the bit0-bit3 field in the second information multiplexing table 2 is used to describe the content type supported by the application terminal.
- the first information multiplexes bit0-bit1: “00” indicates JSON, and “01” indicates TLV.
- the second information multiplexing bit0-bit1: "00” indicates JSON, and "01” indicates TLV.
- Example 1 after the server receives the above MQTT connection message, the cloud device can perceive it through the internal interface. After the cloud device perceives the above MQTT connection message, it records the identification of the application terminal and the content type supported by the application terminal in the cloud, so that when the cloud device needs to send a publish message to the application terminal later, it can query the content type supported by the application terminal.
- the server receives a fourth release message sent by the cloud device, where the content type of the payload of the fourth release message belongs to the content type supported by the application terminal.
- the cloud device when the cloud device needs to send a publish message to the application terminal, it can find out the content type that the application terminal can recognize according to the recorded information about the application terminal, and generate the corresponding publish message; and send it to the server, The server forwards the publish message to the application terminal according to the subscription of the application terminal.
- the server receives a third subscription message sent by the application terminal; and in response to the third subscription message, the server forwards the fourth publication message to the application terminal.
- bit0-bit3 in the above Table 1 can also represent one content type, respectively, then in Example 1, the cloud device can be notified that the application terminal supports several content types at the same time.
- the first information is carried in a topic (topic) of the first published message. That is, in S110, the application terminal sends a first release message to the server, and the first information carried in the subject of the first release message is used to indicate the content type supported by the application terminal.
- the subject of the first published message also includes at least one of the following:
- the identifier of the application terminal (deviceid);
- Content information which is used to indicate that the subject of the first release message is a subject that carries information used to indicate the content type supported by the application terminal.
- topic (topic) of the first published message may be: content/[deviceid]/contenttypeid;
- “content” indicates that the topic is a topic with content type, and the cloud device can use this keyword to determine the purpose and purpose of the first published message; “[deviceid]” indicates that the first published message is sent.
- the device identification of the device that is, the identification of the application terminal;
- “contenttypeid” indicates the type identification of the content type carried by the topic, for example, 0 identifies TLV, and 1 identifies JSON.
- the quality of service (Quality of Service, QoS) of the first published message is 1 or 2. Therefore, it can be ensured that the cloud device can receive the first release message.
- the payload of the first published message is empty.
- the server receives a first subscription message sent by the cloud device, the first subscription message is used for subscribing to a message whose topic includes content type messages; and in response to the first subscription message, the server sends the The first release message is sent to the cloud device.
- the cloud device sends a first subscription message to the server, where the first subscription message is used for subscribing to a message whose topic includes content type messages; and the cloud device receives the first publish message sent by the server, the first subscription message
- the subject of the published message carries first information, where the first information is used to indicate the content type supported by the application terminal.
- the topic carried in the message subscribed by the first subscription message includes the content type message or the subscription topic registration message
- the topic registration message is a message whose topic includes the content type.
- the cloud device subscribes to the server ucc/content/# indicating that the content type needs to be reported, "ucc" is a keyword, and # can directly match any content that follows.
- the specific form is, for example, Subscribe:ucc/content/#.
- the server receives a second subscription message sent by the application terminal, where the second subscription message is used to subscribe to a target topic, and the target topic at least includes content confirmation information and the identification of the application terminal; and a response
- the server sends a second publishing message to the application terminal, and the subject of the second publishing message includes at least one of the following: content confirmation information, an identifier of the application terminal, and a content type identifier.
- the specific form of the second subscription message is, for example, Subscribe:topic:ucc/contentack/deviceid/#.
- the specific form of the second publishing message is, for example, Publish: topic:ucc/contentack/[deviceid]/contenttypeid.
- the server before the server sends the second publishing message to the application terminal, the server receives a third publishing message sent by the cloud device, and the subject of the third publishing message includes at least one of the following: content confirmation information , the identifier of the application terminal, and the identifier of the content type.
- the specific form of the third publishing message is, for example, Publish: topic:ucc/contentack/[deviceid]/contenttypeid.
- the subject of the third release message may further include the identifier of the cloud device.
- the specific form of the third release message is, for example: Publish: topic:ucc/contentack/[deviceid]/[cloudid]/contenttypeid.
- the application terminal can learn that the cloud device has received the message that supports the content type type notified by it.
- the payload of the second publishing message is empty.
- the payload of the third publishing message is empty.
- the server receives a fourth release message sent by the cloud device, and the content type of the payload of the fourth release message belongs to the content type supported by the application terminal.
- the cloud device when the cloud device needs to send a publish message to the application terminal, it can find out the content type that the application terminal can identify according to the recorded information about the application terminal, and generate a corresponding publish message; and send it to the server, The server forwards the publish message to the application terminal according to the subscription of the application terminal.
- the server receives a third subscription message sent by the application terminal; and in response to the third subscription message, the server sends the fourth publication message to the application terminal.
- the cloud device and the server should confirm that the deviceID in the topic should be the ID of the device that sent the first published message, that is, the deviceID in the topic of the first published message should be the identification of the application terminal. ;
- the application terminal can also republish the topic to re-register the content type it supports. After the cloud device receives the change message, it should update the content type registry of the application terminal and refresh the content type of the application terminal.
- the cloud device can generate multiple MQTT clients (Clients) and subscribe to notification messages of different content types respectively, and then publish through different MQTT Clients in the future.
- Example 2 both the application terminal and the cloud device interact with the server as an MQTT client.
- the application terminal when the content type supported by the application terminal changes, the application terminal sends a fifth release message to the server, wherein the subject of the fifth release information carries the third information,
- the third information is used to indicate the updated content type supported by the application terminal.
- the server receives the fifth release message sent by the application terminal, wherein the subject of the fifth release information carries third information, and the third information is used to indicate the updated content type supported by the application terminal; And the server sends a sixth release message to the cloud device, where the subject of the sixth release message carries fourth information, where the fourth information is used to indicate the updated content type supported by the application terminal.
- the cloud device receives the sixth release message sent by the server, and the subject of the sixth release message carries fourth information, and the fourth information is used to indicate the updated content type supported by the application terminal. And the content type supported by the application terminal that the cloud device updates its records.
- the application terminal can initiate a process of updating the content type supported by the application terminal, so that the cloud device can accurately know the content type supported by the application.
- the application terminal can report the content types supported by the application terminal to the server, the cloud device can learn the content type supported by the application terminal through the server, and the cloud device can generate the payload of the published message according to the content type supported by the application terminal. , so as to ensure that the application terminal can correctly parse the content in the payload of the published message.
- the server is a functional unit of the cloud device (Cloud), so there is an internal interface (non-MQTT communication mechanism) between the server and the cloud device, and the specific process can be S11-S18 in Figure 2.
- the application terminal sends an MQTT connection message to the server, wherein the structure of the fixed header (fixheader) of the MQTT connection message may be as shown in Table 1 above.
- bit0-bit3 are reserved bits, and the application The terminal multiplexes bit0-bit1 to indicate the content type supported by the application terminal. Specifically, 00 represents Json, and 01 represents TLV.
- the cloud device obtains the MQTT connection message through the internal interface with the application terminal.
- the cloud device learns the content type supported by the application terminal according to the reserved bits bit0-bit1 in the fixed header of the MQTT connection message, and records the content type supported by the application terminal and the identifier of the application terminal.
- the server sends an MQTT connection confirmation message to the application terminal, wherein the structure of the fixed header (fixheader) of the MQTT connection confirmation message may be as shown in Table 2 above.
- bit0-bit3 are reserved Bit
- the server multiplexes bit0-bit1 to indicate the content type supported by the application terminal, specifically, 00 represents Json, and 01 represents TLV.
- the server returns an MQTT connection confirmation message to the application device, and the same position (bit0-bit1) of the reserved bits (bit0-bit3) of its fixheader on the MQTT connection confirmation message carries the same content type as in S11 .
- the cloud device sends a Publish message to the server, where the content type of the payload of the Publish message belongs to the content type supported by the application terminal.
- the application terminal sends a subscription message to the server.
- the server in response to the subscription message, sends the Publish message received from the cloud device to the application terminal.
- both the application terminal (Device) and the cloud device (Cloud) act as MQTT clients to interact with the server (Broker), and the specific process may be S21-S28 in FIG. 3 .
- the cloud device sends a subscription message 1 (Subscribe:ucc/content/#) to the server, where the subscription message 1 is used for subscribing to a message whose topic includes a content type message. That is, the topic carried in the message subscribed by the subscription message 1 includes the content type message or the subscription topic registration message, and the topic registration message is a message whose topic includes the content type.
- the subscription message 1 is used to subscribe to a specific topic, and the topic may only be a message type (keyword). For example, subscribe to ucc/content/# indicating that the content type needs to be reported. # can directly match anything that follows.
- the application terminal sends a release message 1 to the server, and the subject of the release message 1 may be: content/[deviceid]/contenttypeid;
- “content” indicates that the topic is a topic with content type, and the cloud device can use this keyword to determine the purpose and purpose of the first published message; “[deviceid]” indicates that the first published message is sent.
- the device identification of the device that is, the identification of the application terminal;
- “contenttypeid” indicates the type identification of the content type carried by the topic, for example, 0 identifies TLV, and 1 identifies JSON.
- the QoS of the first published message is 1 or 2. Therefore, it can be ensured that the cloud device can receive the first release message.
- the server sends the release message 1 to the cloud device.
- the cloud device learns the content type supported by the application terminal according to the subject of the published message 1, and records the content type supported by the application terminal and the identifier of the application terminal.
- the cloud device when the cloud device needs to send a release message to the application terminal, it generates a release message 2 corresponding to the content type according to the recorded information for the application terminal.
- the cloud device sends a publishing message 2 to the server, wherein the content type of the payload of the publishing message 2 belongs to the content type supported by the application terminal.
- the application terminal sends the subscription message 2 to the server.
- the server forwards the publication message 2 received from the cloud device to the application terminal.
- the cloud device and the server should confirm that the deviceID in the topic of the published message 1 should be the ID of the device that issued the published message 1, that is, the deviceID in the topic of the published message 1 should be the application.
- the identification of the terminal; the application terminal can also re-publish the topic to re-register the content type it supports.
- the cloud device After the cloud device receives the change message, it should update the content type registry of the application terminal and refresh the content type of the application terminal.
- the cloud device can generate multiple MQTT clients (Clients) and subscribe to different content type notification messages respectively, and then publish can be completed through different MQTT Clients in the future.
- Embodiment 3 both the application terminal (Device) and the cloud device (Cloud) are used as MQTT clients to interact with the server (Broker), and the specific process may be S3-1 to S3-11 in FIG.
- the cloud device sends a subscription message 1 (Subscribe:ucc/content/#) to the server, where the subscription message 1 is used for subscribing to a message whose topic includes a content type message. That is, the topic carried in the message subscribed by the subscription message 1 includes the content type message or the subscription topic registration message, and the topic registration message is a message whose topic includes the content type.
- the subscription message 1 is used to subscribe to a specific topic, and the topic may only be a message type (keyword). For example, subscribe to ucc/content/# indicating that the content type needs to be reported. # can directly match anything that follows.
- the application terminal sends a publishing message 1 to the server, and the subject of the publishing message 1 may be: content/[deviceid]/contenttypeid;
- “content” indicates that the topic is a topic with content type, and the cloud device can use this keyword to determine the purpose and purpose of the first published message; “[deviceid]” indicates that the first published message is sent.
- the device identification of the device that is, the identification of the application terminal;
- “contenttypeid” indicates the type identification of the content type carried by the topic, for example, 0 identifies TLV, and 1 identifies JSON.
- the QoS of the first published message is 1 or 2. Therefore, it can be ensured that the cloud device can receive the first release message.
- the payload of the published message 1 is empty.
- the server forwards the published message 1 to the cloud device.
- the application terminal sends a subscription message 2 (Subscribe: topic:ucc/contentack/deviceid/#) to the server, the subscription message 2 is used to subscribe to a target topic, and the target topic at least includes content confirmation information and an identifier of the application terminal ; "deviceid” is to prevent other devices from being notified, and "contentack” indicates that the cloud device has received the first release message.
- a subscription message 2 Subscribe: topic:ucc/contentack/deviceid/#
- the cloud device sends a release message 2 to the server, and the subject of the release message 2 includes at least one of the following: content confirmation information, an identifier of the application terminal, and a content type identifier.
- the publish message 2 may specifically be Publish:topic:ucc/contentack/[deviceid]/contenttypeid.
- the subject of the release message 2 may further include the identifier of the cloud device.
- the payload of the published message 2 is empty.
- the server sends the release message 2 received from the cloud device to the application terminal. Therefore, the application terminal can know that the cloud device has received the message that supports the content type type notified by it.
- the cloud device learns the content type supported by the application terminal according to the subject of the published message 1, and records the content type supported by the application terminal and the identifier of the application terminal.
- the cloud device when the cloud device needs to send a release message to the application terminal, it generates a release message 3 corresponding to the content type according to the recorded information for the application terminal.
- the cloud device sends a publishing message 3 to the server, wherein the content type of the payload of the publishing message 3 belongs to the content type supported by the application terminal.
- the application terminal sends a subscription message 3 to the server.
- the server in response to the subscription message 3, sends the publication message 3 received from the cloud device to the application terminal.
- the cloud device and the server should confirm that the deviceID in the topic of the published message 1 should be the ID of the device that issued the published message 1, that is, the deviceID in the topic of the published message 1 should be the application.
- the identification of the terminal; the application terminal can also re-publish the topic to re-register the content type it supports.
- the cloud device After the cloud device receives the change message, it should update the content type registry of the application terminal and refresh the content type of the application terminal.
- the cloud device can generate multiple MQTT clients (Clients) and subscribe to different content type notification messages respectively, and then publish can be completed through different MQTT Clients in the future.
- FIG. 2 to FIG. 4 are intended to help those skilled in the art to better understand the embodiments of the present application, but are not intended to limit the scope of the embodiments of the present application. Those skilled in the art can obviously make various equivalent modifications or changes according to the given FIGS. 2 to 4 , and such modifications or changes also fall within the scope of the embodiments of the present application.
- FIG. 5 shows a schematic block diagram of a server 200 according to an embodiment of the present application.
- the server 200 includes:
- the communication unit 210 is configured to receive first information sent by the application terminal, where the first information is used to indicate a content type supported by the application terminal.
- the first information occupies at least one reserved bit of the fixed header in the MQTT connection message.
- the communication unit 210 is further configured to send the MQTT connection message to the cloud device.
- the communication unit 210 is further configured to send an MQTT connection confirmation message to the application terminal.
- the MQTT connection confirmation message carries second information, where the second information is used to indicate a content type supported by the application terminal.
- the second information occupies at least one reserved bit of a fixed header in the MQTT connection confirmation message, and the bit position occupied by the second information is the same as the bit position occupied by the first information.
- the first information is carried in the subject of the first published message.
- the subject of the first published message also includes at least one of the following:
- the content information is used to indicate that the subject of the first release message is a subject carrying information used to indicate the content type supported by the application terminal.
- the payload of the first published message is empty.
- the quality of service QoS of the first published message is 1 or 2.
- the communication unit 210 is further configured to receive a first subscription message sent by the cloud device, where the first subscription message is used for subscribing to a message whose topic includes a content type message;
- the communication unit 210 is further configured to send the first publish message to the cloud device.
- the communication unit 210 is further configured to receive a second subscription message sent by the application terminal, where the second subscription message is used to subscribe to a target topic, and the target topic includes at least content confirmation information and an identifier of the application terminal;
- the communication unit 210 is further configured to send a second release message to the application terminal, where the subject of the second release message includes at least one of the following: content confirmation information, an identifier of the application terminal, Content type identifier.
- the payload of the second publishing message is empty.
- the communication unit 210 is further configured to receive a third publishing message sent by the cloud device, and the subject of the third publishing message includes at least one of the following: Type: content confirmation information, the identification of the application terminal, the identification of the content type, and the identification of the cloud device.
- the payload of the third publishing message is empty.
- the communication unit 210 is further configured to receive a fourth release message sent by the cloud device, where the content type of the payload of the fourth release message belongs to the content type supported by the application terminal.
- the communication unit 210 is further configured to receive a third subscription message sent by the application terminal;
- the communication unit 210 is further configured to send the fourth publishing message to the application terminal.
- the communication unit 210 is further configured to receive a fifth release message sent by the application terminal, wherein the subject of the fifth release information carries third information, and the third information is used to indicate that the updated application terminal supports content type;
- the communication unit 210 is further configured to send a sixth release message to the cloud device, where the subject of the sixth release message carries fourth information, where the fourth information is used to indicate the updated content type supported by the application terminal.
- the above-mentioned communication unit may be a communication interface or a transceiver, or an input/output interface of a communication chip or a system-on-chip.
- server 200 may correspond to the server in the method embodiment of the present application, and the above-mentioned and other operations and/or functions of each unit in the server 200 are respectively for realizing the server in the method 100 shown in FIG. 1 .
- the corresponding process for the sake of brevity, will not be repeated here.
- FIG. 6 shows a schematic block diagram of an application terminal 300 according to an embodiment of the present application.
- the application terminal 300 includes:
- the communication unit 310 is configured to send first information to the server, where the first information is used to indicate the content type supported by the application terminal.
- the first information occupies at least one reserved bit of the fixed header in the MQTT connection message.
- the communication unit 310 is further configured to receive the MQTT connection confirmation message sent by the server.
- the MQTT connection confirmation message carries second information, where the second information is used to indicate a content type supported by the application terminal.
- the second information occupies at least one reserved bit of a fixed header in the MQTT connection confirmation message, and the bit position occupied by the second information is the same as the bit position occupied by the first information.
- the first information is carried in the subject of the first published message.
- the subject of the first published message also includes at least one of the following:
- the content information is used to indicate that the subject of the first release message is a subject carrying information used to indicate the content type supported by the application terminal.
- the payload of the first published message is empty.
- the quality of service QoS of the first published message is 1 or 2.
- the communication unit 310 is further configured to send a second subscription message to the server, where the second subscription message is used to subscribe to a target topic, and the target topic includes at least content confirmation information and an identifier of the application terminal;
- the communication unit 310 is further configured to receive a second release message sent by the server, where the subject of the second release message includes at least one of the following: content confirmation information, an identifier of the application terminal, and a content type identifier.
- the payload of the second publishing message is empty.
- the communication unit 310 is further configured to send a third subscription message to the server;
- the communication unit 310 is further configured to receive a fourth release message sent by the server, where the content type of the payload of the fourth release message belongs to the content type supported by the application terminal.
- the communication unit 310 is further configured to send a fifth release message to the server, wherein the subject of the fifth release information carries third information, and the The third information is used to indicate the updated content type supported by the application terminal.
- the above-mentioned communication unit may be a communication interface or a transceiver, or an input/output interface of a communication chip or a system-on-chip.
- the application terminal 300 may correspond to the application terminal in the method embodiment of the present application, and the above-mentioned and other operations and/or functions of each unit in the application terminal 300 are respectively for realizing the method shown in FIG. 1 .
- the corresponding process of the application terminal in 100 is not repeated here for brevity.
- FIG. 7 shows a schematic block diagram of a cloud device 400 according to an embodiment of the present application.
- the cloud device 400 includes:
- the communication unit 410 is configured to acquire the content type supported by the application terminal from the server.
- the communication unit 410 is specifically used for:
- the MQTT connection message is acquired through the internal interface with the server, wherein the MQTT connection message carries first information, and the first information is used to indicate the content type supported by the application terminal.
- the first information occupies at least one reserved bit of a fixed header in the MQTT connection message.
- the communication unit 410 is specifically used for:
- a first release message sent by the server is received, and the subject of the first release message carries first information, where the first information is used to indicate a content type supported by the application terminal.
- the subject of the first published message also includes at least one of the following:
- the content information is used to indicate that the subject of the first release message is a subject carrying information used to indicate the content type supported by the application terminal.
- the payload of the first published message is empty.
- the quality of service QoS of the first published message is 1 or 2.
- the communication unit 410 is further configured to send a third release message to the server, where the subject of the third release message includes at least one of the following: content confirmation information, an identifier of the application terminal, a content type identifier, the The identity of the cloud device.
- the payload of the third publishing message is empty.
- the communication unit 410 is further configured to send a fourth release message to the server according to the content type supported by the application terminal, where the content type of the payload of the fourth release message belongs to the content type supported by the application terminal.
- the communication unit 410 is further configured to receive a sixth release message sent by the server, where the subject of the sixth release message carries fourth information, and the fourth information is used to indicate the updated content type supported by the application terminal. .
- the above-mentioned communication unit may be a communication interface or a transceiver, or an input/output interface of a communication chip or a system-on-chip.
- the cloud device 400 may correspond to the cloud device in the method embodiment of the present application, and the above and other operations and/or functions of each unit in the cloud device 400 are for realizing the method shown in FIG. 1 respectively.
- the corresponding process of the cloud device in 100 is not repeated here for brevity.
- FIG. 8 is a schematic structural diagram of a communication device 500 provided by an embodiment of the present application.
- the communication device 500 shown in FIG. 8 includes a processor 510, and the processor 510 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
- the communication device 500 may further include a memory 520 .
- the processor 510 may call and run a computer program from the memory 520 to implement the methods in the embodiments of the present application.
- the memory 520 may be a separate device independent of the processor 510 , or may be integrated in the processor 510 .
- the communication device 500 may further include a transceiver 530, and the processor 510 may control the transceiver 530 to communicate with other devices, specifically, may send information or data to other devices, or receive other devices Information or data sent by a device.
- the transceiver 530 may include a transmitter and a receiver.
- the transceiver 530 may further include antennas, and the number of the antennas may be one or more.
- the communication device 500 may specifically be the application terminal of the embodiment of the present application, and the communication device 500 may implement the corresponding processes implemented by the application terminal in each method of the embodiment of the present application. For the sake of brevity, details are not repeated here. .
- the communication device 500 may specifically be the server of the embodiment of the present application, and the communication device 500 may implement the corresponding processes implemented by the server in each method of the embodiment of the present application, which is not repeated here for brevity.
- the communication device 500 may specifically be the cloud device of the embodiment of the present application, and the communication device 500 may implement the corresponding processes implemented by the cloud device in each method of the embodiment of the present application. For brevity, details are not repeated here. .
- FIG. 9 is a schematic structural diagram of an apparatus according to an embodiment of the present application.
- the apparatus 600 shown in FIG. 9 includes a processor 610, and the processor 610 can call and run a computer program from a memory, so as to implement the method in the embodiment of the present application.
- the apparatus 600 may further include a memory 620 .
- the processor 610 may call and run a computer program from the memory 620 to implement the methods in the embodiments of the present application.
- the memory 620 may be a separate device independent of the processor 610 , or may be integrated in the processor 610 .
- the apparatus 600 may further include an input interface 630 .
- the processor 610 may control the input interface 630 to communicate with other devices or chips, and specifically, may acquire information or data sent by other devices or chips.
- the apparatus 600 may further include an output interface 640 .
- the processor 610 can control the output interface 640 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
- the apparatus may be applied to the application terminal in the embodiment of the present application, and the apparatus may implement the corresponding processes implemented by the application terminal in each method of the embodiment of the present application, which is not repeated here for brevity.
- the apparatus may be applied to the server in the embodiment of the present application, and the apparatus may implement the corresponding processes implemented by the server in each method of the embodiment of the present application, which is not repeated here for brevity.
- the apparatus can be applied to the cloud device in the embodiment of the present application, and the device can implement the corresponding processes implemented by the cloud device in each method of the embodiment of the present application, which is not repeated here for brevity.
- the device mentioned in the embodiment of the present application may also be a chip.
- it can be a system-on-chip, a system-on-a-chip, a system-on-a-chip, or a system-on-a-chip.
- FIG. 10 is a schematic block diagram of a communication system 700 provided by an embodiment of the present application. As shown in FIG. 10 , the communication system 700 includes an application terminal 710 , a server 720 and a cloud device 730 .
- the application terminal 710 can be used to implement the corresponding functions implemented by the application terminal in the above method
- the server 720 can be used to implement the corresponding functions implemented by the server in the above method
- the cloud device 730 can be used to implement the above The corresponding functions implemented by the cloud device in the method will not be repeated here for brevity.
- the processor in this embodiment of the present application may be an integrated circuit chip, which has a signal processing capability.
- each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
- the above-mentioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Programming logic devices, discrete gate or transistor logic devices, discrete hardware components.
- DSP Digital Signal Processor
- ASIC Application Specific Integrated Circuit
- FPGA Field Programmable Gate Array
- a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
- the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
- the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
- 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.
- the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
- the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
- Volatile memory may be Random Access Memory (RAM), which acts as an external cache.
- RAM Static RAM
- DRAM Dynamic RAM
- SDRAM Synchronous DRAM
- SDRAM double data rate synchronous dynamic random access memory
- Double Data Rate SDRAM DDR SDRAM
- enhanced SDRAM ESDRAM
- synchronous link dynamic random access memory Synchlink DRAM, SLDRAM
- Direct Rambus RAM Direct Rambus RAM
- the memory in the embodiment of the present application may also be a static random access memory (static RAM, SRAM), a dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.
- Embodiments of the present application further provide a computer-readable storage medium for storing a computer program.
- the computer-readable storage medium can be applied to the application terminal in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the application terminal in each method of the embodiments of the present application.
- the computer program enables the computer to execute the corresponding processes implemented by the application terminal in each method of the embodiments of the present application.
- the computer-readable storage medium can be applied to the server in the embodiments of the present application, and the computer program causes the computer to execute the corresponding processes implemented by the server in the various methods of the embodiments of the present application. Repeat.
- the computer-readable storage medium can be applied to the cloud device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the cloud device in each method of the embodiments of the present application.
- the computer program enables the computer to execute the corresponding processes implemented by the cloud device in each method of the embodiments of the present application.
- Embodiments of the present application also provide a computer program product, including computer program instructions.
- the computer program product can be applied to the application terminal in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the application terminal in each method of the embodiments of the present application. Repeat.
- the computer program product can be applied to the server in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the server in the various methods of the embodiments of the present application.
- the computer program instructions cause the computer to execute the corresponding processes implemented by the server in the various methods of the embodiments of the present application.
- details are not repeated here. .
- the computer program product can be applied to the cloud device in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the cloud device in each method of the embodiments of the present application. Repeat.
- the embodiments of the present application also provide a computer program.
- the computer program can be applied to the application terminal in the embodiments of the present application.
- the computer program runs on the computer, the computer executes the corresponding processes implemented by the application terminal in each method of the embodiments of the present application. For the sake of brevity. , and will not be repeated here.
- the computer program can be applied to the server in the embodiment of the present application.
- the computer program executes the corresponding process implemented by the server in each method of the embodiment of the present application.
- the computer program executes the corresponding process implemented by the server in each method of the embodiment of the present application.
- the computer program may be applied to the cloud device in the embodiments of the present application, and when the computer program runs on the computer, the computer executes the corresponding processes implemented by the cloud device in the various methods of the embodiments of the present application, for the sake of brevity. , and will not be repeated here.
- the disclosed system, apparatus and method may be implemented in other manners.
- the apparatus embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
- the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
- the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
- the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
本申请实施例提供了一种基于MQTT协议的通信方法及设备,云端设备可以通过服务器获知应用终端支持的内容类型,以及云端设备根据应用终端支持的内容类型生成发布消息的负载中的内容,从而确保应用终端能够正确解析发布消息的负载中的内容。该基于MQTT协议的通信方法包括:应用终端向服务器发送第一信息,该第一信息用于指示该应用终端支持的内容类型。
Description
本申请实施例涉及物联网领域,并且更具体地,涉及一种基于MQTT协议的通信方法及设备。
消息队列遥测传输(Message Queuing Telemetry Transport,MQTT)协议是一种为硬件性能低下的远程设备以及网络状况糟糕的情况而设计的发布/订阅型消息协议,被广泛应用于物联网(Internet of Things,IoT)领域。在一些场景下,MQTT协议可以支持多个负载(Payload)的内容类型(content type),此种情况下,发布者(publisher)与订阅者(subscriber)可能对负载中的内容类型的理解不一致,从而出现订阅者无法解析负载中的内容的问题。
发明内容
本申请实施例提供了一种基于MQTT协议的通信方法及设备,云端设备可以通过服务器获知应用终端支持的内容类型,以及云端设备根据应用终端支持的内容类型生成发布消息的负载中的内容,从而确保应用终端能够正确解析发布消息的负载中的内容。
第一方面,提供了一种基于MQTT协议的通信方法,该方法包括:
应用终端向服务器发送第一信息,该第一信息用于指示该应用终端支持的内容类型。
第二方面,提供了一种基于MQTT协议的通信方法,该方法包括:
服务器接收应用终端发送的第一信息,该第一信息用于指示该应用终端支持的内容类型。
第三方面,提供了一种基于MQTT协议的通信方法,该方法包括:
云端设备从服务器获取应用终端支持的内容类型。
第四方面,提供了一种应用终端,用于执行上述第一方面中的方法。
具体地,该应用终端包括用于执行上述第一方面中的方法的功能模块。
第五方面,提供了一种服务器,用于执行上述第二方面中的方法。
具体地,该服务器包括用于执行上述第二方面中的方法的功能模块。
第六方面,提供了一种云端设备,用于执行上述第三方面中的方法。
具体地,该云端设备包括用于执行上述第三方面中的方法的功能模块。
第七方面,提供了一种应用终端,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述第一方面中的方法。
第八方面,提供了一种服务器,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述第二方面中的方法。
第九方面,提供了一种云端设备,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述第三方面中的方法。
第十方面,提供了一种装置,用于实现上述第一方面至第三方面中的任一方面中的方法。
具体地,该装置包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该装置的设备执行如上述第一方面至第三方面中的任一方面中的方法。
第十一方面,提供了一种计算机可读存储介质,用于存储计算机程序,该计算机程序使得计算机执行上述第一方面至第三方面中的任一方面中的方法。
第十二方面,提供了一种计算机程序产品,包括计算机程序指令,所述计算机程序指令使得计算机执行上述第一方面至第三方面中的任一方面中的方法。
第十三方面,提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面至第三方面中的任一方面中的方法。
通过上述技术方案,应用终端可以向服务器上报其所支持的内容类型,云端设备可以通过服务器获知应用终端支持的内容类型,以及云端设备根据应用终端支持的内容类型生成发布消息的负载中的内容,从而确保应用终端能够正确解析发布消息的负载中的内容。
图1是根据本申请实施例提供的一种基于MQTT协议的通信方法的示意性流程图。
图2是本申请实施例提供的一种应用终端指示其所支持的内容类型的示意性流程图。
图3是本申请实施例提供的另一种应用终端指示其所支持的内容类型的示意性流程图。
图4是本申请实施例提供的再一种应用终端指示其所支持的内容类型的示意性流程图。
图5是根据本申请实施例提供的一种服务器的示意性框图。
图6是根据本申请实施例提供的一种应用终端的示意性框图。
图7是根据本申请实施例提供的一种云端设备的示意性框图。
图8是根据本申请实施例提供的一种通信设备的示意性框图。
图9是根据本申请实施例提供的一种装置的示意性框图。
图10是根据本申请实施例提供的一种通信系统的示意性框图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。针对本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在本申请实施例中,应用终端可以是MQTT的客户端,以及应用终端通过MQTT服务器(Broker)完成消息发布和订阅,MQTT服务器用于管理MQTT客户端的订阅与发布。
应用终端可以是手机(Mobile Phone)、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(Virtual Reality,VR)终端设备、增强现实(Augmented Reality,AR)终端设备、工业控制(industrial control)中的无线终端设备、无人驾驶(self driving)中的无线终端设备、远程医疗(remote medical)中的无线终端设备、智能电网(smart grid)中的无线终端设备、运输安全(transportation safety)中的无线终端设备、智慧城市(smart city)中的无线终端设备或智慧家庭(smart home)中的无线终端设备等。
作为示例而非限定,在本申请实施例中,应用终端还可以是可穿戴设备。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。
在本申请实施例中,云端设备也可以称之为云平台,其可以基于云服务实现,云服务可以与人工智能(Artificial Intelligence,AI)结合,即人工智能云服务,一般也被称作是AI即服务(AI as a Service,AIaaS)。这是目前主流的一种人工智能平台的服务方式,具体来说AIaaS平台会把几类常见的AI服务进行拆分,并在云端提供独立或者打包的服务。这种服务模式类似于开了一个AI主题商城:所有的开发者都可以通过应用程序接口(Application Programming Interface,API)接口的方式来接入使用平台提供的一种或者是多种人工智能服务,部分资深的开发者还可以使用平台提供的AI框架和AI基础设施来部署和运维自已专属的云人工智能服务。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。
应理解,在本申请的实施例中提到的“指示”可以是直接指示,也可以是间接指示,还可以是表示具有关联关系。举例说明,A指示B,可以表示A直接指示B,例如B可以通过A获取;也可以表示A间接指示B,例如A指示C,B可以通过C获取;还可以表示A和B之间具有关联关系。
在本申请实施例的描述中,术语“对应”可表示两者之间具有直接对应或间接对应的关系,也可以表示两者之间具有关联关系,也可以是指示与被指示、配置与被配置等关系。
本申请实施例中,“预定义”可以通过在设备(例如,包括应用终端、服务器、云端设备)中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,本申请对于其具体的实现方式不做限定。比如预定义可以是指协议中定义的。
本申请实施例中,所述“协议”可以指MQTT协议,例如可以包括MQTT3.1.1版本、以及应用于未来的MQTT中的相关协议,本申请对此不做限定。
为便于更好的理解本申请实施例,对本申请相关的MQTT协议进行说明。
MQTT3.1.1版本无法协商其传输内容的内容类型(content type)能力。因此在一个生态中如果支持多个负载(payload)的content type,则对于发布者(publisher)侧无法感知到订阅者(subscriber)侧支持的content type,存在发布(publish)的内容subscriber侧无法解析的情况。
基于上述问题,本申请提出了一种基于MQTT协议的通信方案,云端设备可以通过服务器获知 应用终端支持的内容类型,以及云端设备根据应用终端支持的内容类型生成发布消息的负载中的内容,从而确保应用终端能够正确解析发布消息的负载中的内容。
以下通过具体实施例详述本申请的技术方案。
图1是根据本申请实施例的基于MQTT协议的通信方法100的示意性流程图,如图1所示,该方法100可以包括如下内容中的至少部分内容:
S110,应用终端向服务器发送第一信息,该第一信息用于指示该应用终端支持的内容类型;
S120,该服务器接收该应用终端发送的该第一信息;
S130,云端设备从该服务器获取该应用终端支持的内容类型。
需要说明的是,“内容类型(content type)”一般是指消息负载中存在的内容类型,用于定义消息负载内容的类型和/或编码方式,决定消息接收方将以什么形式、什么编码读取这部分内容。
可选地,作为示例1,该第一信息占用MQTT连接消息中固定报头(fixheader)的至少一个预留比特。也即,在S110中,应用终端向服务器发送MQTT连接消息,且该MQTT连接消息中携带的该第一信息用于指示该应用终端支持的内容类型。
例如,MQTT连接消息中固定报头(fixheader)可以如下表1所示,其可以包括比特0-比特3共4比特的预留比特(reserved bits)。示例1的方案主要是复用表1中bit0-bit3字段,通过该字段来描述应用终端支持的内容类型。
表1
具体的,bit0-bit1:可以支持4种content type的选择,bit0-bit3最多支持16种content type。例如,在bit0-bit1中:“10”表示JSON,“11”表示TLV。JavaScript对象简谱(JavaScript Object Notation,JSON)和三元组(tag-length-value,TLV)仅仅只是示例,本申请还可以包括其他的内容类型。
JSON是一种轻量级的数据交换格式。采用完全独立于编程语言的文本格式来存储和表示数据。简洁和清晰的层次结构使得JSON成为理想的数据交换语言。易于人阅读和编写,同时也易于机器解析和生成,并有效地提升网络传输效率。
TLV中,T、L字段的长度往往固定(通常为1~4字节(bytes)),V字段长度可变。T字段表示报文类型,L字段表示报文长度、V字段往往用来存放报文的内容。
需要说明的是,应用终端在与服务器建立连接之后,会发送一次MQTT连接消息且仅发送一次。在该MQTT连接消息中可以携带该应用终端支持的内容类型,也即后续发送给应用终端的发布(publish)消息的payload的content type和能够接收的订阅消息的payload的content type。
可选地,在示例1中,该服务器将该MQTT连接消息发送至该云端设备。
在示例1中,服务器为云端设备的一个功能单位,因此服务器与云端设备之间存在内部接口(非MQTT通信机制)。此种情况下,服务器通过与云端设备之间的内部接口将该MQTT连接消息发送至该云端设备。相应的,该云端设备通过与该服务器之间的内部接口获取MQTT连接消息。其中,该MQTT连接消息携带第一信息,该第一信息用于指示该应用终端支持的内容类型。该第一信息占用该MQTT连接消息中固定报头的至少一个预留比特。
可选地,在示例1中,该应用终端接收该服务器发送的MQTT连接确认消息。
可选地,该MQTT连接确认消息携带第二信息,该第二信息用于指示应用终端支持的内容类型。
可选地,该第二信息占用该MQTT连接确认消息中固定报头的至少一个预留比特,且该第二信息占用的比特位置与该第一信息占用的比特位置相同。
MQTT连接确认消息中固定报头(fixheader)可以如下表2所示,其可以包括比特0-比特3共4比特的预留比特(reserved bits)。该第二信息复用表2中bit0-bit3字段,通过该字段来描述应用终端支持的内容类型。
表2
例如,该第一信息复用bit0-bit1:“00”表示JSON,“01”表示TLV。以及该第二信息复用bit0-bit1: “00”表示JSON,“01”表示TLV。
在示例1中,服务器收到上述MQTT连接消息后通过内部接口可以让云端设备感知。云端设备感知到上述MQTT连接消息之后在云端记录应用终端的标识和应用终端支持的内容类型,以便后续该云端设备需要向该应用终端发送publish消息的时候,可以查询该应用终端支持的内容类型。
可选地,在示例1中,服务器接收云端设备发送的第四发布消息,该第四发布消息的负载的内容类型属于该应用终端支持的内容类型。
也即,当云端设备需要向应用终端发送publish消息的时候,可以根据其记录的针对该应用终端信息,查找出该应用终端能识别的内容类型,并生成对应的publish消息;以及发送给服务器,该服务器根据该应用终端的订阅,将该publish消息转发给该应用终端。
可选地,在示例1中,该服务器接收该应用终端发送的第三订阅消息;以及响应于该第三订阅消息,该服务器将该第四发布消息转发至该应用终端。
可选地,在示例1中,也可以是上述表1中的bit0-bit3分别代表一种content type,则示例1中可以向云端设备通知应用终端同时支持几种content type。
可选地,作为示例2,该第一信息承载在第一发布消息的主题(topic)中。也即,在S110中,应用终端向服务器发送第一发布消息,且该第一发布消息的主题携带的该第一信息用于指示该应用终端支持的内容类型。
可选地,该第一发布消息的主题还包括以下中的至少一种:
该应用终端的标识(deviceid);
内容信息(content),用于表示该第一发布消息的主题为携带有用于指示该应用终端支持的内容类型的信息的主题。
例如,该第一发布消息的主题(topic)可以是:content/[deviceid]/contenttypeid;
其中,“content”表明该topic是一个携带有content type类型的topic,云端设备能够通过这一关键字确定该第一发布消息的用途和目的;“[deviceid]”表示发送该第一发布消息的设备(device)的设备标识,即该应用终端的标识;“contenttypeid”表示该topic携带的content type的类型标识,例如0标识TLV,1标识JSON。
可选地,该第一发布消息的服务质量(Quality of Service,QoS)为1或2。从而可以确保云端设备能够接收到该第一发布消息。
可选地,该第一发布消息的负载为空。
可选地,在示例2中,该服务器接收云端设备发送的第一订阅消息,该第一订阅消息用于订阅主题包含内容类型消息的消息;以及响应于该第一订阅消息,该服务器将该第一发布消息发送至该云端设备。
相应的,该云端设备向该服务器发送第一订阅消息,其中,该第一订阅消息用于订阅主题包含内容类型消息的消息;以及该云端设备接收该服务器发送的第一发布消息,该第一发布消息的主题中携带第一信息,该第一信息用于指示该应用终端支持的内容类型。
也即该第一订阅消息所订阅的消息携带的主题包括内容类型消息或者订阅主题注册消息,该主题注册消息为主题包括内容类型的消息。
例如,该云端设备向该服务器订阅ucc/content/#表示需要content type上报的消息,“ucc”为一个关键字,#可以直接匹配后面的任何内容。具体形式例如,Subscribe:ucc/content/#。
可选地,在示例2中,该服务器接收该应用终端发送的第二订阅消息,该第二订阅消息用于订阅目标主题,该目标主题至少包括内容确认信息和该应用终端的标识;以及响应于该第二订阅消息,该服务器向该应用终端发送第二发布消息,该第二发布消息的主题包括以下中的至少一种:内容确认信息、该应用终端的标识、内容类型标识。
其中,该第二订阅消息的具体形式例如,Subscribe:topic:ucc/contentack/deviceid/#。
其中,该第二发布消息的具体形式例如,Publish:topic:ucc/contentack/[deviceid]/contenttypeid。
需要说明的是,“deviceid”是为了让其他设备不会被通知,“contentack”表示云端设备接收到了上述第一发布消息。
可选地,在该服务器向该应用终端发送该第二发布消息之前,该服务器接收该云端设备发送的第三发布消息,该第三发布消息的主题包括以下中的至少一种:内容确认信息、该应用终端的标识、内容类型标识。
其中,该第三发布消息的具体形式例如,Publish:topic:ucc/contentack/[deviceid]/contenttypeid。
可选地,该第三发布消息的主题还可以包括该云端设备的标识。此种情况下,该第三发布消息的具体形式例如:Publish:topic:ucc/contentack/[deviceid]/[cloudid]/contenttypeid。
也就是说,该应用终端在接收到该第二发布消息之后,可以获知云端设备已经收到其通知的支持content type类型的消息。
可选地,该第二发布消息的负载为空。
可选地,该第三发布消息的负载为空。
可选地,在示例2中,该服务器接收云端设备发送的第四发布消息,该第四发布消息的负载的内容类型属于该应用终端支持的内容类型。
也即,当云端设备需要向应用终端发送publish消息的时候,可以根据其记录的针对该应用终端信息,查找出该应用终端能识别的内容类型,并生成对应的publish消息;以及发送给服务器,该服务器根据该应用终端的订阅,将该publish消息转发给该应用终端。
可选地,在示例2中,该服务器接收该应用终端发送的第三订阅消息;以及响应于该第三订阅消息,该服务器将该第四发布消息发送至该应用终端。
可选地,在示例2中,云端设备与服务器应该需要确认topic中的deviceID应为发出该第一发布消息的设备的ID,即该第一发布消息的主题中的deviceID应为应用终端的标识;应用终端也可以重新发布topic来从新注册其支持的内容类型,云端设备收到更改消息之后,应更新应用终端的content type注册表,刷新应用终端的contenttype。
可选地,在示例2中,云端设备可以生成多个MQTT客户端(Client),分别订阅不同的content type通知消息,则以后可以通过不同的MQTT Client来完成publish。
需要说明的是,在示例2中,应用终端和云端设备都作为MQTT客户端与服务器交互。
可选地,在一些实施例中,在该应用终端支持的内容类型发生改变的情况下,该应用终端向该服务器发送第五发布消息,其中,该第五发布信息的主题携带第三信息,该第三信息用于指示更新后的该应用终端支持的内容类型。
对于服务器来说,该服务器接收该应用终端发送的第五发布消息,其中,该第五发布信息的主题携带第三信息,该第三信息用于指示更新后的该应用终端支持的内容类型;以及该服务器向云端设备发送第六发布消息,该第六发布消息的主题携带第四信息,该第四信息用于指示更新后的该应用终端支持的内容类型。
对于云端设备来说,该云端设备接收该服务器发送的第六发布消息,该第六发布消息的主题携带第四信息,该第四信息用于指示更新后的该应用终端支持的内容类型。以及云端设备更新其记录的针对该应用终端支持的内容类型。
也就是说,在该应用终端支持的内容类型发生改变的情况下,该应用终端可以发起更新其所支持的内容类型的流程,从而云端设备可以准确获知该应用支持的内容类型。
因此,在本申请实施例中,应用终端可以向服务器上报其所支持的内容类型,云端设备可以通过服务器获知应用终端支持的内容类型,以及云端设备根据应用终端支持的内容类型生成发布消息的负载中的内容,从而确保应用终端能够正确解析发布消息的负载中的内容。
以下通过实施例1至实施例3详述本申请基于MQTT协议的通信方案。
实施例1,服务器(Broker)为云端设备(Cloud)的一个功能单位,因此服务器与云端设备之间存在内部接口(非MQTT通信机制),具体流程可以如图2中S11-S18。
S11,应用终端向服务器发送MQTT连接消息,其中,MQTT连接消息的固定报头(fixheader)的结构可以如上述表1所示,在MQTT连接消息的固定报头中,bit0-bit3为预留比特,应用终端复用bit0-bit1来指示应用终端支持的内容类型,具体,00表示Json,01表示TLV。
S12,云端设备通过与应用终端之间的内部接口获取MQTT连接消息。
S13,云端设备根据MQTT连接消息的固定报头中预留比特bit0-bit1获知应用终端支持的内容类型,并记录应用终端支持的内容类型和应用终端的标识。
S14,服务器向应用终端发送MQTT连接确认消息,其中,MQTT连接确认消息的固定报头(fixheader)的结构可以如上述表2所示,在MQTT连接确认消息的固定报头中,bit0-bit3为预留比特,服务器复用bit0-bit1来指示应用终端支持的内容类型,具体,00表示Json,01表示TLV。
也就是说,服务器返回一个MQTT连接确认消息给应用设备,在该MQTT连接确认消息上同样其fixheader的预留比特(bit0-bit3)的同样位置(bit0-bit1)携带与S11中相同的content type。
S15,云端设备需要向应用终端发送发布(Publish)消息的时候,根据记录的针对应用终端的信息,生成对应内容类型的Publish消息。
S16,云端设备向服务器发送Publish消息,其中,Publish消息的负载的内容类型属于应用终端支持的内容类型。
S17,应用终端向服务器发送订阅消息。
S18,响应于订阅消息,服务器将从云端设备处接收的Publish消息发送至应用终端。
实施例2,应用终端(Device)和云端设备(Cloud)都作为MQTT客户端与服务器(Broker)交互,具体流程可以如图3中S21-S28。
S21,云端设备向服务器发送订阅消息1(Subscribe:ucc/content/#),该订阅消息1用于订阅主题包含内容类型消息的消息。也即该订阅消息1所订阅的消息携带的主题包括内容类型消息或者订阅主题注册消息,该主题注册消息为主题包括内容类型的消息。例如,该订阅消息1用于订阅一个特定的主题,该主题可以仅是消息类型(关键字),例如订阅ucc/content/#表示需要content type上报的消息。#可以直接匹配后面的任何内容。
S22,应用终端向服务器发送发布消息1,该发布消息1的主题可以是:content/[deviceid]/contenttypeid;
其中,“content”表明该topic是一个携带有content type类型的topic,云端设备能够通过这一关键字确定该第一发布消息的用途和目的;“[deviceid]”表示发送该第一发布消息的设备(device)的设备标识,即该应用终端的标识;“contenttypeid”表示该topic携带的content type的类型标识,例如0标识TLV,1标识JSON。该第一发布消息的QoS为1或2。从而可以确保云端设备能够接收到该第一发布消息。
S23,服务器将该发布消息1发送至云端设备。
S24,云端设备根据该发布消息1的主题获知应用终端支持的内容类型,并记录应用终端支持的内容类型和应用终端的标识。
S25,云端设备需要向应用终端发送发布消息的时候,根据记录的针对应用终端的信息,生成对应内容类型的发布消息2。
S26,云端设备向服务器发送发布消息2,其中,发布消息2的负载的内容类型属于应用终端支持的内容类型。
S27,应用终端向服务器发送订阅消息2。
S28,响应于订阅消息2,服务器将从云端设备处接收的发布消息2转发至应用终端。
可选地,在实施例2中,云端设备与服务器应该需要确认发布消息1的topic中的deviceID应为发出该发布消息1的设备的ID,即该发布消息1的主题中的deviceID应为应用终端的标识;应用终端也可以重新发布topic来从新注册其支持的内容类型,云端设备收到更改消息之后,应更新应用终端的content type注册表,刷新应用终端的contenttype。
可选地,在实施例2中,云端设备可以生成多个MQTT客户端(Client),分别订阅不同的content type通知消息,则以后可以通过不同的MQTT Client来完成publish。
实施例3,应用终端(Device)和云端设备(Cloud)都作为MQTT客户端与服务器(Broker)交互,具体流程可以如图4中S3-1至S3-11。
S3-1,云端设备向服务器发送订阅消息1(Subscribe:ucc/content/#),该订阅消息1用于订阅主题包含内容类型消息的消息。也即该订阅消息1所订阅的消息携带的主题包括内容类型消息或者订阅主题注册消息,该主题注册消息为主题包括内容类型的消息。例如,该订阅消息1用于订阅一个特定的主题,该主题可以仅是消息类型(关键字),例如订阅ucc/content/#表示需要content type上报的消息。#可以直接匹配后面的任何内容。
S3-2,应用终端向服务器发送发布消息1,该发布消息1的主题可以是:content/[deviceid]/contenttypeid;
其中,“content”表明该topic是一个携带有content type类型的topic,云端设备能够通过这一关键字确定该第一发布消息的用途和目的;“[deviceid]”表示发送该第一发布消息的设备(device)的设备标识,即该应用终端的标识;“contenttypeid”表示该topic携带的content type的类型标识,例如0标识TLV,1标识JSON。该第一发布消息的QoS为1或2。从而可以确保云端设备能够接收到该第一发布消息。
可选地,该发布消息1的负载为空。
S3-3,服务器将该发布消息1转发至云端设备。
S3-4,应用终端向服务器发送订阅消息2(Subscribe:topic:ucc/contentack/deviceid/#),该订阅消息2用于订阅目标主题,该目标主题至少包括内容确认信息和该应用终端的标识;“deviceid”是为了让其他设备不会被通知,“contentack”表示云端设备接收到了上述第一发布消息。
S3-5,云端设备向服务器发送发布消息2,该发布消息2的主题包括以下中的至少一种:内容确认信息、该应用终端的标识、内容类型标识。例如,发布消息2具体可以是Publish:topic:ucc/contentack/[deviceid]/contenttypeid。
可选地,该发布消息2的主题还可以包括云端设备的标识。
可选地,该发布消息2的负载为空。
S3-6,服务器将从云端设备处接收的发布消息2发送至应用终端。从而,应用终端可以获知云端设备已经收到其通知的支持content type类型的消息。
S3-7,云端设备根据该发布消息1的主题获知应用终端支持的内容类型,并记录应用终端支持的内容类型和应用终端的标识。
S3-8,云端设备需要向应用终端发送发布消息的时候,根据记录的针对应用终端的信息,生成对应内容类型的发布消息3。
S3-9,云端设备向服务器发送发布消息3,其中,发布消息3的负载的内容类型属于应用终端支持的内容类型。
S3-10,应用终端向服务器发送订阅消息3。
S3-11,响应于订阅消息3,服务器将从云端设备处接收的发布消息3发送至应用终端。
可选地,在实施例3中,云端设备与服务器应该需要确认发布消息1的topic中的deviceID应为发出该发布消息1的设备的ID,即该发布消息1的主题中的deviceID应为应用终端的标识;应用终端也可以重新发布topic来从新注册其支持的内容类型,云端设备收到更改消息之后,应更新应用终端的content type注册表,刷新应用终端的contenttype。
可选地,在实施例3中,云端设备可以生成多个MQTT客户端(Client),分别订阅不同的content type通知消息,则以后可以通过不同的MQTT Client来完成publish。
应理解,上述图2至图4所示的例子是为了帮助本领域技术人员更好地理解本申请实施例,而非要限制本申请实施例的范围。本领域技术人员根据所给出的图2至图4,显然可以进行各种等价的修改或变化,这样的修改或变化也落入本申请实施例的范围内。
上文结合图1至图4,详细描述了本申请的方法实施例,下文结合图5至图10,详细描述本申请的装置实施例,应理解,装置实施例与方法实施例相互对应,类似的描述可以参照方法实施例。
图5示出了根据本申请实施例的服务器200的示意性框图。如图5所示,该服务器200包括:
通信单元210,用于接收应用终端发送的第一信息,该第一信息用于指示该应用终端支持的内容类型。
可选地,该第一信息占用MQTT连接消息中固定报头的至少一个预留比特。
可选地,该通信单元210还用于将该MQTT连接消息发送至该云端设备。
可选地,该通信单元210还用于向该应用终端发送MQTT连接确认消息。
可选地,该MQTT连接确认消息携带第二信息,该第二信息用于指示该应用终端支持的内容类型。
可选地,该第二信息占用该MQTT连接确认消息中固定报头的至少一个预留比特,且该第二信息占用的比特位置与该第一信息占用的比特位置相同。
可选地,该第一信息承载在第一发布消息的主题中。
可选地,该第一发布消息的主题还包括以下中的至少一种:
该应用终端的标识;
内容信息,用于表示该第一发布消息的主题为携带有用于指示该应用终端支持的内容类型的信息的主题。
可选地,该第一发布消息的负载为空。
可选地,该第一发布消息的服务质量QoS为1或2。
可选地,该通信单元210还用于接收云端设备发送的第一订阅消息,其中,该第一订阅消息用于订阅主题包含内容类型消息的消息;
响应于该第一订阅消息,该通信单元210还用于将该第一发布消息发送至该云端设备。
可选地,该通信单元210还用于接收该应用终端发送的第二订阅消息,该第二订阅消息用于订阅目标主题,该目标主题至少包括内容确认信息和该应用终端的标识;
响应于该第二订阅消息,该通信单元210还用于向该应用终端发送第二发布消息,该第二发布消息的主题包括以下中的至少一种:内容确认信息、该应用终端的标识、内容类型标识。
可选地,该第二发布消息的负载为空。
可选地,在该服务器向该应用终端发送该第二发布消息之前,该通信单元210还用于接收该云端设备发送的第三发布消息,该第三发布消息的主题包括以下中的至少一种:内容确认信息、该应用终端的标识、内容类型标识、该云端设备的标识。
可选地,该第三发布消息的负载为空。
可选地,该通信单元210还用于接收云端设备发送的第四发布消息,该第四发布消息的负载的内容类型属于该应用终端支持的内容类型。
可选地,该通信单元210还用于接收该应用终端发送的第三订阅消息;
响应于该第三订阅消息,该通信单元210还用于将该第四发布消息发送至该应用终端。
可选地,该通信单元210还用于接收该应用终端发送的第五发布消息,其中,该第五发布信息的主题携带第三信息,该第三信息用于指示更新后的该应用终端支持的内容类型;
该通信单元210还用于向云端设备发送第六发布消息,该第六发布消息的主题携带第四信息,该第四信息用于指示更新后的该应用终端支持的内容类型。
可选地,在一些实施例中,上述通信单元可以是通信接口或收发器,或者是通信芯片或者片上系统的输入输出接口。
应理解,根据本申请实施例的服务器200可对应于本申请方法实施例中的服务器,并且服务器200中的各个单元的上述和其它操作和/或功能分别为了实现图1所示方法100中服务器的相应流程,为了简洁,在此不再赘述。
图6示出了根据本申请实施例的应用终端300的示意性框图。如图6所示,该应用终端300包括:
通信单元310,用于向服务器发送第一信息,该第一信息用于指示该应用终端支持的内容类型。
可选地,该第一信息占用MQTT连接消息中固定报头的至少一个预留比特。
可选地,该通信单元310还用于接收该服务器发送的MQTT连接确认消息。
可选地,该MQTT连接确认消息携带第二信息,该第二信息用于指示该应用终端支持的内容类型。
可选地,该第二信息占用该MQTT连接确认消息中固定报头的至少一个预留比特,且该第二信息占用的比特位置与该第一信息占用的比特位置相同。
可选地,该第一信息承载在第一发布消息的主题中。
可选地,该第一发布消息的主题还包括以下中的至少一种:
该应用终端的标识;
内容信息,用于表示该第一发布消息的主题为携带有用于指示该应用终端支持的内容类型的信息的主题。
可选地,该第一发布消息的负载为空。
可选地,该第一发布消息的服务质量QoS为1或2。
可选地,该通信单元310还用于向该服务器发送第二订阅消息,该第二订阅消息用于订阅目标主题,该目标主题至少包括内容确认信息和该应用终端的标识;
该通信单元310还用于接收该服务器发送的第二发布消息,该第二发布消息的主题包括以下中的至少一种:内容确认信息、该应用终端的标识、内容类型标识。
可选地,该第二发布消息的负载为空。
可选地,该通信单元310还用于向该服务器发送第三订阅消息;
该通信单元310还用于接收该服务器发送的第四发布消息,该第四发布消息的负载的内容类型属于该应用终端支持的内容类型。
可选地,在该应用终端支持的内容类型发生改变的情况下,该通信单元310还用于向该服务器发送第五发布消息,其中,该第五发布信息的主题携带第三信息,该第三信息用于指示更新后的该应用终端支持的内容类型。
可选地,在一些实施例中,上述通信单元可以是通信接口或收发器,或者是通信芯片或者片上系统的输入输出接口。
应理解,根据本申请实施例的应用终端300可对应于本申请方法实施例中的应用终端,并且应用终端300中的各个单元的上述和其它操作和/或功能分别为了实现图1所示方法100中应用终端的相应流程,为了简洁,在此不再赘述。
图7示出了根据本申请实施例的云端设备400的示意性框图。如图6所示,该云端设备400包括:
通信单元410,用于从服务器获取应用终端支持的内容类型。
可选地,该通信单元410具体用于:
通过与该服务器之间的内部接口获取MQTT连接消息,其中,该MQTT连接消息携带第一信息,该第一信息用于指示该应用终端支持的内容类型。
可选地,该第一信息占用该MQTT连接消息中固定报头的至少一个预留比特。
可选地,该通信单元410具体用于:
向该服务器发送第一订阅消息,其中,该第一订阅消息用于订阅主题包含内容类型消息的消息;
接收该服务器发送的第一发布消息,该第一发布消息的主题中携带第一信息,该第一信息用于指示该应用终端支持的内容类型。
可选地,该第一发布消息的主题还包括以下中的至少一种:
该应用终端的标识;
内容信息,用于表示该第一发布消息的主题为携带有用于指示该应用终端支持的内容类型的信息的主题。
可选地,该第一发布消息的负载为空。
可选地,该第一发布消息的服务质量QoS为1或2。
可选地,该通信单元410还用于向该服务器发送第三发布消息,该第三发布消息的主题包括以下中的至少一种:内容确认信息、该应用终端的标识、内容类型标识、该云端设备的标识。
可选地,该第三发布消息的负载为空。
可选地,该通信单元410还用于根据该应用终端支持的内容类型向该服务器发送第四发布消息,该第四发布消息的负载的内容类型属于该应用终端支持的内容类型。
可选地,该通信单元410还用于接收该服务器发送的第六发布消息,该第六发布消息的主题携带第四信息,该第四信息用于指示更新后的该应用终端支持的内容类型。
可选地,在一些实施例中,上述通信单元可以是通信接口或收发器,或者是通信芯片或者片上系统的输入输出接口。
应理解,根据本申请实施例的云端设备400可对应于本申请方法实施例中的云端设备,并且云端设备400中的各个单元的上述和其它操作和/或功能分别为了实现图1所示方法100中云端设备的相应流程,为了简洁,在此不再赘述。
图8是本申请实施例提供的一种通信设备500示意性结构图。图8所示的通信设备500包括处理器510,处理器510可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。
可选地,如图8所示,通信设备500还可以包括存储器520。其中,处理器510可以从存储器520中调用并运行计算机程序,以实现本申请实施例中的方法。
其中,存储器520可以是独立于处理器510的一个单独的器件,也可以集成在处理器510中。
可选地,如图8所示,通信设备500还可以包括收发器530,处理器510可以控制该收发器530与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。
其中,收发器530可以包括发射机和接收机。收发器530还可以进一步包括天线,天线的数量可以为一个或多个。
可选地,该通信设备500具体可为本申请实施例的应用终端,并且该通信设备500可以实现本申请实施例的各个方法中由应用终端实现的相应流程,为了简洁,在此不再赘述。
可选地,该通信设备500具体可为本申请实施例的服务器,并且该通信设备500可以实现本申请实施例的各个方法中由服务器实现的相应流程,为了简洁,在此不再赘述。
可选地,该通信设备500具体可为本申请实施例的云端设备,并且该通信设备500可以实现本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。
图9是本申请实施例的装置的示意性结构图。图9所示的装置600包括处理器610,处理器610可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。
可选地,如图9所示,装置600还可以包括存储器620。其中,处理器610可以从存储器620中调用并运行计算机程序,以实现本申请实施例中的方法。
其中,存储器620可以是独立于处理器610的一个单独的器件,也可以集成在处理器610中。
可选地,该装置600还可以包括输入接口630。其中,处理器610可以控制该输入接口630与其他设备或芯片进行通信,具体地,可以获取其他设备或芯片发送的信息或数据。
可选地,该装置600还可以包括输出接口640。其中,处理器610可以控制该输出接口640与其他设备或芯片进行通信,具体地,可以向其他设备或芯片输出信息或数据。
可选地,该装置可应用于本申请实施例中的应用终端,并且该装置可以实现本申请实施例的各个方法中由应用终端实现的相应流程,为了简洁,在此不再赘述。
可选地,该装置可应用于本申请实施例中的服务器,并且该装置可以实现本申请实施例的各个方法中由服务器实现的相应流程,为了简洁,在此不再赘述。
可选地,该装置可应用于本申请实施例中的云端设备,并且该装置可以实现本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。
可选地,本申请实施例提到的装置也可以是芯片。例如可以是系统级芯片,系统芯片,芯片系统或片上系统芯片等。
图10是本申请实施例提供的一种通信系统700的示意性框图。如图10所示,该通信系统700包括应用终端710、服务器720和云端设备730。
其中,该应用终端710可以用于实现上述方法中由应用终端实现的相应的功能,该服务器720可以用于实现上述方法中由服务器实现的相应的功能,以及该云端设备730可以用于实现上述方法中由云端设备实现的相应的功能,为了简洁,在此不再赘述。
应理解,本申请实施例的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
应理解,上述存储器为示例性但不是限制性说明,例如,本申请实施例中的存储器还可以是静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)以及直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)等等。也就是说,本申请实施例中的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序。
可选的,该计算机可读存储介质可应用于本申请实施例中的应用终端,并且该计算机程序使得计算机执行本申请实施例的各个方法中由应用终端实现的相应流程,为了简洁,在此不再赘述。
可选地,该计算机可读存储介质可应用于本申请实施例中的服务器,并且该计算机程序使得计算机执行本申请实施例的各个方法中由服务器实现的相应流程,为了简洁,在此不再赘述。
可选地,该计算机可读存储介质可应用于本申请实施例中的云端设备,并且该计算机程序使得计算机执行本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。
可选的,该计算机程序产品可应用于本申请实施例中的应用终端,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由应用终端实现的相应流程,为了简洁,在此不再赘述。
可选地,该计算机程序产品可应用于本申请实施例中的服务器,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由服务器实现的相应流程,为了简洁,在此不再赘述。
可选地,该计算机程序产品可应用于本申请实施例中的云端设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。
本申请实施例还提供了一种计算机程序。
可选的,该计算机程序可应用于本申请实施例中的应用终端,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由应用终端实现的相应流程,为了简洁,在此不再赘述。
可选地,该计算机程序可应用于本申请实施例中的服务器,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由服务器实现的相应流程,为了简洁,在此不再赘述。
可选地,该计算机程序可应用于本申请实施例中的云端设备,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由云端设备实现的相应流程,为了简洁,在此不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。针对这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。
Claims (60)
- 一种基于MQTT协议的通信方法,其特征在于,包括:服务器接收应用终端发送的第一信息,所述第一信息用于指示所述应用终端支持的内容类型。
- 如权利要求1所述的方法,其特征在于,所述第一信息占用MQTT连接消息中固定报头的至少一个预留比特。
- 如权利要求2所述的方法,其特征在于,所述方法还包括:所述服务器将所述MQTT连接消息发送至所述云端设备。
- 如权利要求2或3所述的方法,其特征在于,所述方法还包括:所述服务器向所述应用终端发送MQTT连接确认消息。
- 如权利要求4所述的方法,其特征在于,所述MQTT连接确认消息携带第二信息,所述第二信息用于指示所述应用终端支持的内容类型。
- 如权利要求5所述的方法,其特征在于,所述第二信息占用所述MQTT连接确认消息中固定报头的至少一个预留比特,且所述第二信息占用的比特位置与所述第一信息占用的比特位置相同。
- 如权利要求1所述的方法,其特征在于,所述第一信息承载在第一发布消息的主题中。
- 如权利要求7所述的方法,其特征在于,所述第一发布消息的主题还包括以下中的至少一种:所述应用终端的标识;内容信息,用于表示所述第一发布消息的主题为携带有用于指示所述应用终端支持的内容类型的信息的主题。
- 如权利要求7或8所述的方法,其特征在于,所述第一发布消息的负载为空。
- 如权利要求7至9中任一项所述的方法,其特征在于,所述第一发布消息的服务质量QoS为1或2。
- 如权利要求7至10中任一项所述的方法,其特征在于,所述方法还包括:所述服务器接收云端设备发送的第一订阅消息,其中,所述第一订阅消息用于订阅主题包含内容类型消息的消息;响应于所述第一订阅消息,所述服务器将所述第一发布消息发送至所述云端设备。
- 如权利要求7至11中任一项所述的方法,其特征在于,所述方法还包括:所述服务器接收所述应用终端发送的第二订阅消息,所述第二订阅消息用于订阅目标主题,所述目标主题至少包括内容确认信息和所述应用终端的标识;响应于所述第二订阅消息,所述服务器向所述应用终端发送第二发布消息,所述第二发布消息的主题包括以下中的至少一种:内容确认信息、所述应用终端的标识、内容类型标识。
- 如权利要求12所述的方法,其特征在于,所述第二发布消息的负载为空。
- 如权利要求12或13所述的方法,其特征在于,在所述服务器向所述应用终端发送所述第二发布消息之前,所述方法还包括:所述服务器接收所述云端设备发送的第三发布消息,所述第三发布消息的主题包括以下中的至少一种:内容确认信息、所述应用终端的标识、内容类型标识、所述云端设备的标识。
- 如权利要求14所述的方法,其特征在于,所述第三发布消息的负载为空。
- 如权利要求1至15中任一项所述的方法,其特征在于,所述方法还包括:所述服务器接收云端设备发送的第四发布消息,所述第四发布消息的负载的内容类型属于所述应用终端支持的内容类型。
- 如权利要求16所述的方法,其特征在于,所述方法还包括:所述服务器接收所述应用终端发送的第三订阅消息;响应于所述第三订阅消息,所述服务器将所述第四发布消息发送至所述应用终端。
- 如权利要求1至17中任一项所述的方法,其特征在于,所述方法还包括:所述服务器接收所述应用终端发送的第五发布消息,其中,所述第五发布信息的主题携带第三信息,所述第三信息用于指示更新后的所述应用终端支持的内容类型;所述服务器向云端设备发送第六发布消息,所述第六发布消息的主题携带第四信息,所述第四信息用于指示更新后的所述应用终端支持的内容类型。
- 一种基于MQTT协议的通信方法,其特征在于,包括:应用终端向服务器发送第一信息,所述第一信息用于指示所述应用终端支持的内容类型。
- 如权利要求19所述的方法,其特征在于,所述第一信息占用MQTT连接消息中固定报头的至少一个预留比特。
- 如权利要求20所述的方法,其特征在于,所述方法还包括:所述应用终端接收所述服务器发送的MQTT连接确认消息。
- 如权利要求21所述的方法,其特征在于,所述MQTT连接确认消息携带第二信息,所述第二信息用于指示所述应用终端支持的内容类型。
- 如权利要求22所述的方法,其特征在于,所述第二信息占用所述MQTT连接确认消息中固定报头的至少一个预留比特,且所述第二信息占用的比特位置与所述第一信息占用的比特位置相同。
- 如权利要求19所述的方法,其特征在于,所述第一信息承载在第一发布消息的主题中。
- 如权利要求24所述的方法,其特征在于,所述第一发布消息的主题还包括以下中的至少一种:所述应用终端的标识;内容信息,用于表示所述第一发布消息的主题为携带有用于指示所述应用终端支持的内容类型的信息的主题。
- 如权利要求24或25所述的方法,其特征在于,所述第一发布消息的负载为空。
- 如权利要求24至26中任一项所述的方法,其特征在于,所述第一发布消息的服务质量QoS为1或2。
- 如权利要求24至27中任一项所述的方法,其特征在于,所述方法还包括:所述应用终端向所述服务器发送第二订阅消息,所述第二订阅消息用于订阅目标主题,所述目标主题至少包括内容确认信息和所述应用终端的标识;所述应用终端接收所述服务器发送的第二发布消息,所述第二发布消息的主题包括以下中的至少一种:内容确认信息、所述应用终端的标识、内容类型标识。
- 如权利要求28所述的方法,其特征在于,所述第二发布消息的负载为空。
- 如权利要求19至29中任一项所述的方法,其特征在于,所述方法还包括:所述应用终端向所述服务器发送第三订阅消息;所述应用终端接收所述服务器发送的第四发布消息,所述第四发布消息的负载的内容类型属于所述应用终端支持的内容类型。
- 如权利要求19至30中任一项所述的方法,其特征在于,所述方法还包括:在所述应用终端支持的内容类型发生改变的情况下,所述应用终端向所述服务器发送第五发布消息,其中,所述第五发布信息的主题携带第三信息,所述第三信息用于指示更新后的所述应用终端支持的内容类型。
- 一种基于MQTT协议的通信方法,其特征在于,包括:云端设备从服务器获取应用终端支持的内容类型。
- 如权利要求32所述的方法,其特征在于,所述云端设备从服务器获取应用终端支持的内容类型,包括:所述云端设备通过与所述服务器之间的内部接口获取MQTT连接消息,其中,所述MQTT连接消息携带第一信息,所述第一信息用于指示所述应用终端支持的内容类型。
- 如权利要求33所述的方法,其特征在于,所述第一信息占用所述MQTT连接消息中固定报头的至少一个预留比特。
- 如权利要求32所述的方法,其特征在于,所述云端设备从服务器获取应用终端支持的内容类型,包括:所述云端设备向所述服务器发送第一订阅消息,其中,所述第一订阅消息用于订阅主题包含内容类型消息的消息;所述云端设备接收所述服务器发送的第一发布消息,所述第一发布消息的主题中携带第一信息,所述第一信息用于指示所述应用终端支持的内容类型。
- 如权利要求35所述的方法,其特征在于,所述第一发布消息的主题还包括以下中的至少一种:所述应用终端的标识;内容信息,用于表示所述第一发布消息的主题为携带有用于指示所述应用终端支持的内容类型的信息的主题。
- 如权利要求35或36所述的方法,其特征在于,所述第一发布消息的负载为空。
- 如权利要求35至37中任一项所述的方法,其特征在于,所述第一发布消息的服务质量QoS为1或2。
- 如权利要求35至38中任一项所述的方法,其特征在于,所述方法还包括:所述云端设备向所述服务器发送第三发布消息,所述第三发布消息的主题包括以下中的至少一 种:内容确认信息、所述应用终端的标识、内容类型标识、所述云端设备的标识。
- 如权利要求39所述的方法,其特征在于,所述第三发布消息的负载为空。
- 如权利要求32至40中任一项所述的方法,其特征在于,所述方法还包括:所述云端设备根据所述应用终端支持的内容类型向所述服务器发送第四发布消息,所述第四发布消息的负载的内容类型属于所述应用终端支持的内容类型。
- 如权利要求32至41中任一项所述的方法,其特征在于,所述方法还包括:所述云端设备接收所述服务器发送的第六发布消息,所述第六发布消息的主题携带第四信息,所述第四信息用于指示更新后的所述应用终端支持的内容类型。
- 一种服务器,其特征在于,包括:通信单元,用于接收应用终端发送的第一信息,所述第一信息用于指示所述应用终端支持的内容类型。
- 一种应用终端,其特征在于,包括:通信单元,用于向服务器发送第一信息,所述第一信息用于指示所述应用终端支持的内容类型。
- 一种云端设备,其特征在于,包括:通信单元,用于从服务器获取应用终端支持的内容类型。
- 一种服务器,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求1至18中任一项所述的方法。
- 一种应用终端,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求19至31中任一项所述的方法。
- 一种云端设备,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求32至42中任一项所述的方法。
- 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求1至18中任一项所述的方法。
- 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求19至31中任一项所述的方法。
- 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如权利要求32至42中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至18中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求19至31中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求32至42中任一项所述的方法。
- 一种计算机程序产品,其特征在于,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求1至18中任一项所述的方法。
- 一种计算机程序产品,其特征在于,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求19至31中任一项所述的方法。
- 一种计算机程序产品,其特征在于,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求32至42中任一项所述的方法。
- 一种计算机程序,其特征在于,所述计算机程序使得计算机执行如权利要求1至18中任一项所述的方法。
- 一种计算机程序,其特征在于,所述计算机程序使得计算机执行如权利要求19至31中任一项所述的方法。
- 一种计算机程序,其特征在于,所述计算机程序使得计算机执行如权利要求32至42中任一项所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202080105107.6A CN116134798A (zh) | 2020-11-17 | 2020-11-17 | 基于mqtt协议的通信方法及设备 |
PCT/CN2020/129500 WO2022104555A1 (zh) | 2020-11-17 | 2020-11-17 | 基于mqtt协议的通信方法及设备 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/129500 WO2022104555A1 (zh) | 2020-11-17 | 2020-11-17 | 基于mqtt协议的通信方法及设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022104555A1 true WO2022104555A1 (zh) | 2022-05-27 |
Family
ID=81707985
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/129500 WO2022104555A1 (zh) | 2020-11-17 | 2020-11-17 | 基于mqtt协议的通信方法及设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116134798A (zh) |
WO (1) | WO2022104555A1 (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115037810A (zh) * | 2022-08-08 | 2022-09-09 | 广东电网有限责任公司佛山供电局 | 一种站域式快速保护装置的通讯装置 |
CN115695504A (zh) * | 2023-01-03 | 2023-02-03 | 东方合智数据科技(广东)有限责任公司 | 物联网平台通信方法、装置、设备及存储介质 |
CN117114263A (zh) * | 2023-06-01 | 2023-11-24 | 中国航空油料集团有限公司 | 航油加注调度方法及系统 |
CN117319166A (zh) * | 2023-09-21 | 2023-12-29 | 深圳市西迪特科技股份有限公司 | 接入网设备管理方法与计算机设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018106985A1 (en) * | 2016-12-09 | 2018-06-14 | Convida Wireless, Llc | Mechanisms for resource-directory to resource- directory communications |
CN108173860A (zh) * | 2017-12-29 | 2018-06-15 | 深圳市泛海三江科技发展有限公司 | 一种低端受限设备的mqtt连接方法、系统、终端及服务器 |
CN108965447A (zh) * | 2018-07-27 | 2018-12-07 | 四川爱创科技有限公司 | 数据采集和远程控制的方法及系统 |
CN111770553A (zh) * | 2020-06-22 | 2020-10-13 | 深圳中兴网信科技有限公司 | 物联网设备接入系统、方法、电子设备和存储介质 |
-
2020
- 2020-11-17 CN CN202080105107.6A patent/CN116134798A/zh active Pending
- 2020-11-17 WO PCT/CN2020/129500 patent/WO2022104555A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018106985A1 (en) * | 2016-12-09 | 2018-06-14 | Convida Wireless, Llc | Mechanisms for resource-directory to resource- directory communications |
CN108173860A (zh) * | 2017-12-29 | 2018-06-15 | 深圳市泛海三江科技发展有限公司 | 一种低端受限设备的mqtt连接方法、系统、终端及服务器 |
CN108965447A (zh) * | 2018-07-27 | 2018-12-07 | 四川爱创科技有限公司 | 数据采集和远程控制的方法及系统 |
CN111770553A (zh) * | 2020-06-22 | 2020-10-13 | 深圳中兴网信科技有限公司 | 物联网设备接入系统、方法、电子设备和存储介质 |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115037810A (zh) * | 2022-08-08 | 2022-09-09 | 广东电网有限责任公司佛山供电局 | 一种站域式快速保护装置的通讯装置 |
CN115695504A (zh) * | 2023-01-03 | 2023-02-03 | 东方合智数据科技(广东)有限责任公司 | 物联网平台通信方法、装置、设备及存储介质 |
CN115695504B (zh) * | 2023-01-03 | 2023-04-11 | 东方合智数据科技(广东)有限责任公司 | 物联网平台通信方法、装置、设备及存储介质 |
CN117114263A (zh) * | 2023-06-01 | 2023-11-24 | 中国航空油料集团有限公司 | 航油加注调度方法及系统 |
CN117319166A (zh) * | 2023-09-21 | 2023-12-29 | 深圳市西迪特科技股份有限公司 | 接入网设备管理方法与计算机设备 |
Also Published As
Publication number | Publication date |
---|---|
CN116134798A (zh) | 2023-05-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022104555A1 (zh) | 基于mqtt协议的通信方法及设备 | |
US10893048B2 (en) | Multi-blockchain network data processing | |
US10848526B2 (en) | Device triggering | |
US20220141295A1 (en) | Systems and Methods for Enabling Access to Third Party Services Via a Service Layer | |
CN112152926B (zh) | 一种管理应用的网络切片的方法及装置 | |
EP2699024B1 (en) | Near Field Communication Device | |
CN108476236B (zh) | 物联网数据的基于语义的内容规范 | |
EP2699023B1 (en) | Near Field Communication Device | |
WO2017092594A1 (zh) | 一种信息处理方法及装置 | |
CN111240858B (zh) | 事件调度方法及组件 | |
EP3091712B1 (en) | Smart device for realizing multiple-device collaboration and working method for multiple-device collaboration | |
EP4199474A1 (en) | Method and system for acquiring download information of application, and server and storage medium | |
CN112769945B (zh) | 分布式服务调用方法及装置 | |
CN114125940A (zh) | 数据报文发送方法、处理方法、装置、设备及数据报文 | |
CN114884880B (zh) | 数据传输方法以及系统 | |
WO2021244456A1 (zh) | 反向地址解析方法及电子设备 | |
KR101642713B1 (ko) | 디바이스간 원격 프로시저 호출 방법 | |
CN113918245A (zh) | 一种数据调用方法、装置、设备及计算机可读存储介质 | |
CN110190985A (zh) | 管理设备对远端存储设备进行管理的方法 | |
CN112051988B (zh) | 模块处理方法、装置及服务器 | |
WO2024082099A1 (zh) | 通信方法、电子设备及存储介质 | |
JP2011221864A (ja) | 情報処理システム及び情報処理方法 | |
CN112051988A (zh) | 模块处理方法、装置及服务器 | |
CN117978723A (zh) | 一种远程数据获取方法、装置、电子设备及存储介质 | |
CN118301562A (zh) | 信令处理方法、系统、设备及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20961846 Country of ref document: EP Kind code of ref document: A1 |