CN116134798A - Communication method and device based on MQTT protocol - Google Patents

Communication method and device based on MQTT protocol Download PDF

Info

Publication number
CN116134798A
CN116134798A CN202080105107.6A CN202080105107A CN116134798A CN 116134798 A CN116134798 A CN 116134798A CN 202080105107 A CN202080105107 A CN 202080105107A CN 116134798 A CN116134798 A CN 116134798A
Authority
CN
China
Prior art keywords
message
application terminal
information
server
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202080105107.6A
Other languages
Chinese (zh)
Inventor
吕小强
罗朝明
茹昭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN116134798A publication Critical patent/CN116134798A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a communication method and device based on an MQTT protocol, wherein cloud equipment can acquire the content type supported by an application terminal through a server, and the cloud equipment generates the content in a load of a release message according to the content type supported by the application terminal, so that the application terminal can accurately analyze the content in the load of the release message. The communication method based on the MQTT protocol comprises the following steps: the application terminal sends first information to the server, wherein the first information is used for indicating the content types supported by the application terminal.

Description

Communication method and device based on MQTT protocol Technical Field
The embodiment of the application relates to the field of Internet of things, and in particular relates to a communication method and device based on an MQTT protocol.
Background
Message queue telemetry transport (Message Queuing Telemetry Transport, MQTT) protocol is a publish/subscribe message protocol designed for low hardware performance remote devices and poor network conditions, and is widely used in the internet of things (Internet of Things, ioT) field. In some scenarios, the MQTT protocol may support content types (content types) of multiple loads (Payload), in which case the publisher and subscriber (subscriber) may not agree with the understanding of the content types in the load, thus presenting a problem that the subscriber cannot parse the content in the load.
Disclosure of Invention
The embodiment of the application provides a communication method and device based on an MQTT protocol, wherein cloud equipment can acquire the content type supported by an application terminal through a server, and the cloud equipment generates the content in a load of a release message according to the content type supported by the application terminal, so that the application terminal can accurately analyze the content in the load of the release message.
In a first aspect, a communication method based on MQTT protocol is provided, which includes:
the application terminal sends first information to the server, wherein the first information is used for indicating the content types supported by the application terminal.
In a second aspect, there is provided a communication method based on MQTT protocol, the method comprising:
the server receives first information sent by the application terminal, wherein the first information is used for indicating content types supported by the application terminal.
In a third aspect, a communication method based on MQTT protocol is provided, which includes:
and the cloud device acquires the content types supported by the application terminal from the server.
In a fourth aspect, an application terminal is provided for performing the method in the first aspect.
Specifically, the application terminal comprises a functional module for executing the method in the first aspect.
In a fifth aspect, a server is provided for performing the method in the second aspect.
Specifically, the server comprises functional modules for performing the method in the second aspect described above.
In a sixth aspect, a cloud device is provided for performing the method in the third aspect.
Specifically, the cloud device includes a functional module for executing the method in the third aspect.
In a seventh aspect, an application terminal is provided that includes a processor and a memory. The memory is used for storing a computer program, and the processor is used for calling and running the computer program stored in the memory to execute the method in the first aspect.
In an eighth aspect, a server is provided that includes a processor and a memory. The memory is for storing a computer program and the processor is for calling and running the computer program stored in the memory for performing the method of the second aspect described above.
In a ninth aspect, a cloud device is provided that includes a processor and a memory. The memory is for storing a computer program and the processor is for calling and running the computer program stored in the memory for performing the method of the third aspect described above.
In a tenth aspect, there is provided an apparatus for implementing the method of any one of the first to third aspects.
Specifically, the device comprises: a processor for calling and running a computer program from a memory, causing a device in which the apparatus is installed to perform the method of any of the first to third aspects as described above.
In an eleventh aspect, a computer-readable storage medium is provided for storing a computer program that causes a computer to execute the method of any one of the above first to third aspects.
In a twelfth aspect, there is provided a computer program product comprising computer program instructions for causing a computer to perform the method of any one of the first to third aspects above.
In a thirteenth aspect, there is provided a computer program which, when run on a computer, causes the computer to perform the method of any one of the first to third aspects described above.
Through the technical scheme, the application terminal can report the supported content types to the server, the cloud device can acquire the supported content types of the application terminal through the server, and the cloud device generates the content in the load of the release message according to the supported content types of the application terminal, so that the application terminal can accurately analyze the content in the load of the release message.
Drawings
Fig. 1 is a schematic flow chart of a communication method based on MQTT protocol according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of indicating supported content types by an application terminal according to an embodiment of the present application.
Fig. 3 is a schematic flow chart of another application terminal provided in an embodiment of the present application indicating the content types supported by the application terminal.
Fig. 4 is a schematic flow chart of still another application terminal provided in an embodiment of the present application to indicate the content types supported by the application terminal.
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 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 in accordance with 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.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden for the embodiments herein, are intended to be within the scope of the present application.
In this embodiment of the present application, the application terminal may be an MQTT client, and the application terminal completes message publishing and subscribing through an MQTT server (Broker), where the MQTT server is used to manage the subscribing and publishing of the MQTT client.
The application terminal may be a Mobile Phone (Mobile Phone), a tablet (Pad), a computer with a wireless transceiving function, a Virtual Reality (VR) terminal device, an augmented Reality (Augmented Reality, AR) terminal device, a wireless terminal device in industrial control (industrial control), a wireless terminal device in unmanned driving (self driving), a wireless terminal device in remote medical (remote medical), a wireless terminal device in smart grid (smart grid), a wireless terminal device in transportation security (transportation safety), a wireless terminal device in smart city (smart city), or a wireless terminal device in smart home (smart home), etc.
By way of example, but not limitation, in embodiments of the present application, the application terminal may also be a wearable device. The wearable device can also be called as a wearable intelligent device, and is a generic name for intelligently designing daily wear by applying wearable technology and developing wearable devices, such as glasses, gloves, watches, clothes, shoes and the like. The wearable device is a portable device that is worn directly on the body or integrated into the clothing or accessories of the user. The wearable device is not only a hardware device, but also can realize a powerful function through software support, data interaction and cloud interaction. The generalized wearable intelligent device includes full functionality, large size, and may not rely on the smart phone to implement complete or partial functionality, such as: smart watches or smart glasses, etc., and focus on only certain types of application functions, and need to be used in combination with other devices, such as smart phones, for example, various smart bracelets, smart jewelry, etc. for physical sign monitoring.
In the embodiment of the application, the cloud device may also be referred to as a cloud platform, which may be implemented based on a cloud Service, and the cloud Service may be combined with artificial intelligence (Artificial Intelligence, AI), i.e. the artificial intelligence cloud Service is also generally referred to as AI as a Service (AIaaS). The service mode of the artificial intelligent platform is the mainstream at present, and particularly, the AIaaS platform can split several common AI services and provide independent or packaged services at the cloud. This service mode is similar to an AI theme mall: all developers can access one or more artificial intelligence services provided by the use platform through an application program interface (Application Programming Interface, API) interface, and partial deep developers can also use an AI framework and AI infrastructure provided by the platform to deploy and operate and maintain self-proprietary cloud artificial intelligence services.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
The terminology used in the description section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application. The terms "first," "second," "third," and "fourth" and the like in the description and in the claims of this application and in the drawings, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion.
It should be understood that, in the embodiments of the present application, the "indication" may be a direct indication, an indirect indication, or an indication having an association relationship. For example, a indicates B, which may mean that a indicates B directly, e.g., B may be obtained by a; it may also indicate that a indicates B indirectly, e.g. a indicates C, B may be obtained by C; it may also be indicated that there is an association between a and B.
In the description of the embodiments of the present application, the term "corresponding" may indicate that there is a direct correspondence or an indirect correspondence between the two, or may indicate that there is an association between the two, or may indicate a relationship between the two and the indicated, configured, or the like.
In the embodiment of the present application, the "predefining" may be implemented by pre-storing corresponding codes, tables or other manners that may be used to indicate relevant information in a device (including, for example, an application terminal, a server, and a cloud device), which is not limited to a specific implementation manner. Such as predefined may refer to what is defined in the protocol.
In the embodiment of the present application, the "protocol" may refer to an MQTT protocol, for example, may include version MQTT3.1.1, and related protocols applied in future MQTTs, which is not limited in this application.
For a better understanding of the embodiments of the present application, the MQTT protocol associated with the present application is described.
The MQTT3.1.1 version cannot negotiate the content type (content type) capability of its transmitted content. Therefore, if content types of a plurality of loads (payload) are supported in one ecology, content types supported by a subscriber (subscriber) side cannot be perceived by a publisher side, and content subscribers side of a publication (publishing) cannot be parsed in some cases.
Based on the above problems, the application provides a communication scheme based on the MQTT protocol, and the cloud device can acquire the content type supported by the application terminal through the server and generate the content in the load of the release message according to the content type supported by the application terminal, so that the application terminal can accurately analyze the content in the load of the release message.
The technical scheme of the present application is described in detail below through specific embodiments.
Fig. 1 is a schematic flow chart of a communication method 100 based on MQTT protocol according to an embodiment of the present application, as shown in fig. 1, the method 100 may include at least some of the following:
S110, an application terminal sends first information to a server, wherein the first information is used for indicating content types supported by the application terminal;
s120, the server receives the first information sent by the application terminal;
s130, the cloud device acquires the content types supported by the application terminal from the server.
The "content type" generally refers to a content type existing in a message payload, and is used to define a type and/or an encoding manner of the content of the message payload, and determine what form and what encoding a message receiving side will read the content.
Alternatively, as example 1, 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 types supported by the application terminal.
For example, a fixed header (fixheader) in the MQTT connection message may be as shown in table 1 below, which may include reserved bits (reserved bits) of bits 0-3 for a total of 4 bits. The scheme of example 1 mainly multiplexes the bit0-bit3 fields in table 1, by which the types of content supported by the application terminal are described.
TABLE 1
Figure PCTCN2020129500-APPB-000001
Specifically, bit0-bit1: selection of 4 content types can be supported, and bit0-bit3 supports 16 content types at most. For example, in bit0-bit1: "10" means JSON and "11" means TLV. JavaScript object notation (JavaScript Object Notation, JSON) and Triplets (TLVs) are merely examples, and other content types may be included in the present application.
JSON is a lightweight data exchange format. The data is stored and represented in a text format that is completely independent of the programming language. The compact and clear hierarchical structure makes JSON an ideal data exchange language. Is easy to read and write by people, is easy to analyze and generate by machines, and effectively improves the network transmission efficiency.
In TLVs, the length of the T, L field is often fixed (typically 1 to 4 bytes), and the V field length is variable. The T field indicates the message type, the L field indicates the message length, and the V field is often used to store the content of the message.
It should be noted that, after the application terminal establishes a connection with the server, the MQTT connection message is sent once and only once. The MQTT connection message may carry content types supported by the application terminal, that is, content type of payload of a publish message that is subsequently sent to the application terminal and content type of payload of a subscription message that can be received.
Optionally, in example 1, the server sends the MQTT connection message to the cloud device.
In example 1, the server is one functional unit of the cloud device, so there is an internal interface (non-MQTT communication mechanism) between the server and the cloud device. In this case, the server sends the MQTT connection message to the cloud device through an internal interface between the server and the cloud device. Correspondingly, the cloud device acquires the MQTT connection message through an internal interface between the cloud device and the server. The MQTT connection message carries first information, and the first information is used for indicating the content types supported by the application terminal. The first information occupies at least one reserved bit of a fixed header in the MQTT-connection message.
Optionally, in example 1, the application terminal receives an MQTT connection acknowledgement message sent by the server.
Optionally, the MQTT connection acknowledgement message carries second information for indicating the content type supported by the application terminal.
Optionally, the second information occupies at least one reserved bit of the fixed header in the MQTT connection acknowledgement message, and a bit position occupied by the second information is the same as a bit position occupied by the first information.
The fixed header (fixheader) in the MQTT connection acknowledgement message may be as shown in table 2 below, which may include reserved bits (reserved bits) of bits 0-3 for a total of 4 bits. The second information multiplexes bit0-bit3 fields in table 2, by which the types of content supported by the application terminal are described.
TABLE 2
Figure PCTCN2020129500-APPB-000002
For example, the first information multiplexes bit0-bit1: "00" means JSON and "01" means TLV. And the second information multiplexing bit0-bit1: "00" means JSON and "01" means TLV.
In example 1, the server may make the cloud device aware through the internal interface after receiving the MQTT connection message. The cloud device records the identification of the application terminal and the content type supported by the application terminal after sensing the MQTT connection message, so that the content type supported by the application terminal can be queried when the cloud device needs to send a publishing message to the application terminal.
Optionally, in example 1, the server receives a fourth published message sent by the cloud device, where a content type of a load of the fourth published message belongs to a content type supported by the application terminal.
That is, when the cloud device needs to send a publish message to the application terminal, the content type identifiable by the application terminal can be found out according to the recorded information of the application terminal, and a corresponding publish message is generated; and sending the publishing message to a server, wherein the server forwards the publishing message to the application terminal according to the subscription of the application terminal.
Optionally, in example 1, 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 published message to the application terminal.
Alternatively, in example 1, it may also be that bit0 to bit3 in table 1 represent one content type respectively, and in example 1, the cloud device may be notified that the application terminal supports several content types simultaneously.
Alternatively, as example 2, the first information is carried in a topic (topic) of the first posting message. That is, in S110, the application terminal sends a first publishing message to the server, and the first information carried by the subject of the first publishing message is used to indicate the content types supported by the application terminal.
Optionally, the subject of the first posting message further includes at least one of:
an identification (deviceid) of the application terminal;
content information (content) indicating that the topic of the first distribution message is a topic carrying information indicating the type of content supported by the application terminal.
For example, the topic (topic) of the first posting message may be: content/[ deviceid ]/content ttypeid;
wherein, "content" indicates that the topic is a topic carrying content type, and the cloud device can determine the purpose and the purpose of the first publishing message through the keyword; "[ deviceid ]" means a device identification of the device (device) that sent the first distribution message, i.e., an identification of the application terminal; "contenttypeid" indicates a type identifier of the contenttype carried by the topic, for example, 0 identifier TLV,1 identifier JSON.
Optionally, the quality of service (Quality of Service, qoS) of the first posted message is 1 or 2. Thereby, the cloud device can be ensured to receive the first sending message.
Optionally, the load of the first distribution message is null.
Optionally, in example 2, the server receives a first subscription message sent by the cloud device, where the first subscription message is used to subscribe to a message that includes a content type message; and responding to the first subscription message, and sending the first distribution message to the cloud device by the server.
Correspondingly, the cloud device sends a first subscription message to the server, wherein the first subscription message is used for subscribing a message of which the topic contains a content type message; and the cloud device receives a first distribution message sent by the server, wherein a theme of the first distribution message carries first information, and the first information is used for indicating the content type supported by the application terminal.
That is, the topic carried by the message subscribed by the first subscription message includes a content type message or subscribes to a topic registration message, and the topic registration message is a message whose topic includes a content type.
For example, the cloud device subscribes ucc/content/# to the server for a message that requires content type reporting, "ucc" is a key, and # can directly match any content that follows. Specific forms are, for example, subscribe ucc/content/#.
Optionally, in example 2, 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 includes at least content confirmation information and an identifier of the application terminal; and in response to the second subscription message, the server sends a second published message to the application terminal, the topic of the second published message including at least one of: content confirmation information, identification of the application terminal, and content type identification.
Wherein the specific form of the second subscription message is, for example, subscribe: topic ucc/content tack/deviceid/#.
Wherein the specific form of the second published message is, for example, public: topic ucc/content stack/[ deviceid ]/content ttypeid.
Note that the "deviceid" is to prevent other devices from being notified, and the "content" indicates that the cloud device has received the first notification message.
Optionally, before the server sends the second published message to the application terminal, the server receives a third published message sent by the cloud device, where a theme of the third published message includes at least one of the following: content confirmation information, identification of the application terminal, and content type identification.
Wherein the specific form of the third published message is, for example, public: topic ucc/content stack/[ deviceid ]/content ttypeid.
Optionally, the subject of the third published message may further include an identification of the cloud device. In this case, the specific form of the third published message is, for example: pubish: topic ucc/content tack/[ deviceid ]/[ cloudid ]/content ttypeid.
That is, after receiving the second release message, the application terminal may learn that the cloud device has received the content type supporting message notified by the application terminal.
Optionally, the load of the second published message is empty.
Optionally, the load of the third published message is empty.
Optionally, in example 2, the server receives a fourth published message sent by the cloud device, where a content type of a load of the fourth published message belongs to a content type supported by the application terminal.
That is, when the cloud device needs to send a publish message to the application terminal, the content type identifiable by the application terminal can be found out according to the recorded information of the application terminal, and a corresponding publish message is generated; and sending the publishing message to a server, wherein the server forwards the publishing message to the application terminal according to the subscription of the application terminal.
Optionally, in example 2, 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 published message to the application terminal.
Optionally, in example 2, the cloud device and the server should confirm that the deviceID in topic should be the ID of the device that sent the first publishing message, i.e. the deviceID in the topic of the first publishing message should be the identity of the application terminal; the application terminal can also reissue topic to register the supported content types from the new, and after the cloud device receives the change message, the content type registry of the application terminal should be updated to refresh the content type of the application terminal.
Alternatively, in example 2, the cloud device may generate multiple MQTT clients (clients) that subscribe to different content type notification messages, respectively, and may then complete publishing through the different MQTT clients.
It should be noted that, in example 2, both the application terminal and the cloud device interact with the server as MQTT clients.
Optionally, in some embodiments, in a case that a content type supported by the application terminal is changed, the application terminal sends a fifth release message to the server, where a theme of the fifth release message carries third information, where the third information is used to indicate the updated content type supported by the application terminal.
For a server, the server receives a fifth release message sent by the application terminal, wherein the theme of the fifth release message carries third information, and the third information is used for indicating the updated content type supported by the application terminal; and the server sends a sixth release message to the cloud device, wherein the theme of the sixth release message carries fourth information, and the fourth information is used for indicating the updated content type supported by the application terminal.
For the cloud device, the cloud device receives a sixth release message sent by the server, where a theme 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 cloud device updates the content types supported by the application terminal.
That is, in the case that the content types supported by the application terminal are changed, the application terminal may initiate a process of updating the content types supported by the application terminal, so that the cloud device may accurately learn the content types supported by the application.
Therefore, in the embodiment of the application terminal can report the supported content types to the server, the cloud device can acquire the supported content types of the application terminal through the server, and the cloud device generates the content in the load of the release message according to the supported content types of the application terminal, so that the application terminal can accurately analyze the content in the load of the release message.
The MQTT protocol-based communication scheme of the present application is described in detail below by examples 1 to 3.
In embodiment 1, the server (Broker) 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 flow may be as shown in S11-S18 in fig. 2.
S11, the application terminal sends an MQTT connection message to the server, wherein the structure of a fixed header (fixheader) of the MQTT connection message can be shown in the table 1, in the fixed header of the MQTT connection message, bit0-bit3 is reserved bits, the application terminal multiplexes bit0-bit1 to indicate the content type supported by the application terminal, specifically, 00 represents Json, and 01 represents TLV.
S12, the cloud device acquires the MQTT connection message through an internal interface between the cloud device and the application terminal.
S13, the cloud device acquires the content type supported by the application terminal according to 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 identification of the application terminal.
S14, the server sends an MQTT connection confirmation message to the application terminal, wherein the structure of a fixed header (fixheader) of the MQTT connection confirmation message can be shown in the table 2, in the fixed header of the MQTT connection confirmation message, bit0-bit3 is reserved bits, the server multiplexes bit0-bit1 to indicate the content type supported by the application terminal, specifically, 00 represents Json, and 01 represents TLV.
That is, the server returns an MQTT connection acknowledge message to the application device, on which the same positions (bit 0-bit 1) of the reserved bits (bit 0-bit 3) of the same fixheader carry the same content type as in S11.
And S15, when the cloud device needs to send a publishing message to the application terminal, generating the publishing message of the corresponding content type according to the recorded information aiming at the application terminal.
S16, the cloud device sends a Publish message to the server, wherein the content type of the load of the Publish message belongs to the content type supported by the application terminal.
S17, the application terminal sends a subscription message to the server.
And S18, responding to the subscription message, and sending the public message received from the cloud terminal equipment to the application terminal by the server.
In embodiment 2, both the application terminal (Device) and the Cloud Device (Cloud) interact with the server (Broker) as MQTT clients, and the specific flow may be as S21-S28 in fig. 3.
S21, the cloud device sends a subscription message 1 (subscore: ucc/content/#) to the server, wherein the subscription message 1 is used for subscribing to a message with a topic containing a content type message. That is, the topic carried by the subscribed message 1 includes a content type message or a subscribed topic registration message, where the topic registration message is a message whose topic includes a content type. For example, the subscription message 1 is used to subscribe to a specific topic, which may be just the message type (key), e.g. subscription ucc/content/# indicates that a message of content type reporting is required. # may directly match any of the following.
S22, the application terminal sends a release message 1 to the server, wherein the theme of the release message 1 can be: content/[ deviceid ]/content ttypeid;
wherein, "content" indicates that the topic is a topic carrying content type, and the cloud device can determine the purpose and the purpose of the first publishing message through the keyword; "[ deviceid ]" means a device identification of the device (device) that sent the first distribution message, i.e., an identification of the application terminal; "contenttypeid" indicates a type identifier of the contenttype carried by the topic, for example, 0 identifier TLV,1 identifier JSON. The QoS of the first advertisement message is 1 or 2. Thereby, the cloud device can be ensured to receive the first sending message.
S23, the server sends the release message 1 to the cloud device.
S24, the cloud device acquires the content types supported by the application terminal according to the subject of the release message 1, and records the content types supported by the application terminal and the identification of the application terminal.
S25, when the cloud device needs to send the release message to the application terminal, generating a release message 2 corresponding to the content type according to the recorded information aiming at the application terminal.
S26, the cloud device sends a release message 2 to the server, wherein the content type of the load of the release message 2 belongs to the content type supported by the application terminal.
And S27, the application terminal sends a subscription message 2 to the server.
And S28, responding to the subscription message 2, and forwarding the release message 2 received from the cloud terminal device to the application terminal by the server.
Optionally, in embodiment 2, 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 sent the published message 1, that is, the deviceID in the topic of the published message 1 should be the identity of the application terminal; the application terminal can also reissue topic to register the supported content types from the new, and after the cloud device receives the change message, the content type registry of the application terminal should be updated to refresh the content type of the application terminal.
Alternatively, in embodiment 2, the cloud device may generate multiple MQTT clients (clients) that subscribe to different content type notification messages, and may complete publishing through the different MQTT clients later.
In embodiment 3, the application terminal (Device) and the Cloud Device (Cloud) both interact with the server (Broker) as MQTT clients, and the specific flow may be as S3-1 to S3-11 in fig. 4.
S3-1, the cloud device sends a subscription message 1 (subscore: ucc/content/#) to the server, wherein the subscription message 1 is used for subscribing to messages with the topic containing the content type message. That is, the topic carried by the subscribed message 1 includes a content type message or a subscribed topic registration message, where the topic registration message is a message whose topic includes a content type. For example, the subscription message 1 is used to subscribe to a specific topic, which may be just the message type (key), e.g. subscription ucc/content/# indicates that a message of content type reporting is required. # may directly match any of the following.
S3-2, the application terminal sends a release message 1 to the server, wherein the topic of the release message 1 can be: content/[ deviceid ]/content ttypeid;
wherein, "content" indicates that the topic is a topic carrying content type, and the cloud device can determine the purpose and the purpose of the first publishing message through the keyword; "[ deviceid ]" means a device identification of the device (device) that sent the first distribution message, i.e., an identification of the application terminal; "contenttypeid" indicates a type identifier of the contenttype carried by the topic, for example, 0 identifier TLV,1 identifier JSON. The QoS of the first advertisement message is 1 or 2. Thereby, the cloud device can be ensured to receive the first sending message.
Optionally, the load of the published message 1 is empty.
S3-3, the server forwards the release message 1 to the cloud device.
S3-4, the application terminal sends a subscription message 2 (subscription: ucc/content/device/#) to the server, wherein the subscription message 2 is used for subscribing to a target theme, and the target theme at least comprises content confirmation information and an identifier of the application terminal; the "deviceid" is to prevent other devices from being notified, and "content" indicates that the cloud device has received the first distribution message.
S3-5, the cloud device sends a release message 2 to the server, wherein the theme of the release message 2 comprises at least one of the following: content confirmation information, identification of the application terminal, and content type identification. For example, the published message 2 may specifically be Publish: topic ucc/content stack/[ deviceid ]/content ttypeid.
Optionally, the subject of the published message 2 may also include an identification of the cloud device.
Optionally, the load of the published message 2 is empty.
And S3-6, the server sends the release message 2 received from the cloud terminal equipment to the application terminal. Therefore, the application terminal can know that the cloud device has received the message supporting the content type, which is notified by the cloud device.
S3-7, the cloud device acquires the content type supported by the application terminal according to the subject of the release message 1, and records the content type supported by the application terminal and the identification of the application terminal.
And S3-8, when the cloud device needs to send the release message to the application terminal, generating the release message 3 corresponding to the content type according to the recorded information aiming at the application terminal.
And S3-9, the cloud device sends a release message 3 to the server, wherein the content type of the load of the release message 3 belongs to the content type supported by the application terminal.
And S3-10, the application terminal sends a subscription message 3 to the server.
S3-11, responding to the subscription message 3, and sending the release message 3 received from the cloud terminal device to the application terminal by the server.
Optionally, in embodiment 3, 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 sent the published message 1, that is, the deviceID in the topic of the published message 1 should be the identity of the application terminal; the application terminal can also reissue topic to register the supported content types from the new, and after the cloud device receives the change message, the content type registry of the application terminal should be updated to refresh the content type of the application terminal.
Alternatively, in embodiment 3, the cloud device may generate multiple MQTT clients (clients) that subscribe to different content type notification messages, and may complete publishing through the different MQTT clients later.
It should be appreciated that the examples illustrated in fig. 2-4 above are provided to assist those skilled in the art in better understanding the embodiments of the present application and are not intended to limit the scope of the embodiments of the present application. From the given figures 2 to 4, it will be apparent to those skilled in the art that various equivalent modifications or variations can be made, which also fall within the scope of the embodiments of the present application.
The method embodiments of the present application are described in detail above with reference to fig. 1 to 4, and the apparatus embodiments of the present application are described in detail below with reference to fig. 5 to 10, it being understood that the apparatus embodiments and the method embodiments correspond to each other, and similar descriptions may refer to the method embodiments.
Fig. 5 shows a schematic block diagram of a server 200 according to an embodiment of the present application. As shown in fig. 5, the server 200 includes:
the communication unit 210 is configured to receive first information sent by an application terminal, where the first information is used to indicate a content type supported by the application terminal.
Optionally, the first information occupies at least one reserved bit of the fixed header in the MQTT connection message.
Optionally, the communication unit 210 is further configured to send the MQTT connection message to the cloud device.
Optionally, the communication unit 210 is further configured to send an MQTT connection confirmation message to the application terminal.
Optionally, the MQTT connection acknowledgement message carries second information for indicating the content types supported by the application terminal.
Optionally, the second information occupies at least one reserved bit of the fixed header in the MQTT connection acknowledgement message, and a bit position occupied by the second information is the same as a bit position occupied by the first information.
Optionally, the first information is carried in the topic of the first posting message.
Optionally, the subject of the first posting message further includes at least one of:
the identification of the application terminal;
content information for indicating that the subject of the first distribution message is a subject carrying information for indicating the type of content supported by the application terminal.
Optionally, the load of the first distribution message is null.
Optionally, the quality of service QoS of the first distribution message is 1 or 2.
Optionally, 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 that includes a content type message;
in response to the first subscription message, the communication unit 210 is further configured to send the first publishing message to the cloud device.
Optionally, 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;
in response to the second subscription message, the communication unit 210 is further configured to send a second published message to the application terminal, where a topic of the second published message includes at least one of: content confirmation information, identification of the application terminal, and content type identification.
Optionally, the load of the second published message is empty.
Optionally, before the server sends the second published message to the application terminal, the communication unit 210 is further configured to receive a third published message sent by the cloud device, where a subject of the third published message includes at least one of the following: content confirmation information, an identifier of the application terminal, a content type identifier and an identifier of the cloud device.
Optionally, the load of the third published message is empty.
Optionally, the communication unit 210 is further configured to receive a fourth published message sent by the cloud device, where a content type of a load of the fourth published message belongs to a content type supported by the application terminal.
Optionally, 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 published message to the application terminal in response to the third subscription message.
Optionally, the communication unit 210 is further configured to receive a fifth release message sent by the application terminal, where a subject of the fifth release message carries third information, where the third information is used to indicate an updated content type supported by the application terminal;
The communication unit 210 is further configured to send a sixth published message to the cloud device, where a theme of the sixth published message carries fourth information, and the fourth information is used to indicate the updated content type supported by the application terminal.
Alternatively, in some embodiments, the communication unit may be a communication interface or transceiver, or an input/output interface of a communication chip or a system on a chip.
It should be understood that the server 200 according to the embodiments of the present application may correspond to a server in the embodiments of the method of the present application, and the foregoing and other operations and/or functions of each unit in the server 200 are respectively for implementing the corresponding flow of the server in the method 100 shown in fig. 1, and are not described herein for brevity.
Fig. 6 shows a schematic block diagram of an application terminal 300 according to an embodiment of the present application. As shown in fig. 6, the application terminal 300 includes:
and a communication unit 310 for transmitting first information to the server, the first information indicating the content types supported by the application terminal.
Optionally, the first information occupies at least one reserved bit of the fixed header in the MQTT connection message.
Optionally, the communication unit 310 is further configured to receive an MQTT connection acknowledgement message sent by the server.
Optionally, the MQTT connection acknowledgement message carries second information for indicating the content types supported by the application terminal.
Optionally, the second information occupies at least one reserved bit of the fixed header in the MQTT connection acknowledgement message, and a bit position occupied by the second information is the same as a bit position occupied by the first information.
Optionally, the first information is carried in the topic of the first posting message.
Optionally, the subject of the first posting message further includes at least one of:
the identification of the application terminal;
content information for indicating that the subject of the first distribution message is a subject carrying information for indicating the type of content supported by the application terminal.
Optionally, the load of the first distribution message is null.
Optionally, the quality of service QoS of the first distribution message is 1 or 2.
Optionally, 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 published message sent by the server, where a subject of the second published message includes at least one of the following: content confirmation information, identification of the application terminal, and content type identification.
Optionally, the load of the second published message is empty.
Optionally, 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 published message sent by the server, where a content type of a load of the fourth published message belongs to a content type supported by the application terminal.
Optionally, in the case that the content type supported by the application terminal is changed, the communication unit 310 is further configured to send a fifth publishing message to the server, where a theme of the fifth publishing message carries third information, where the third information is used to indicate the updated content type supported by the application terminal.
Alternatively, in some embodiments, the communication unit may be a communication interface or transceiver, or an input/output interface of a communication chip or a system on a chip.
It should be understood that the application terminal 300 according to the embodiment of the present application may correspond to the application terminal in the embodiment of the method of the present application, and the foregoing and other operations and/or functions of each unit in the application terminal 300 are respectively for implementing the corresponding flow of the application terminal in the method 100 shown in fig. 1, and are not repeated herein for brevity.
Fig. 7 shows a schematic block diagram of a cloud device 400 according to an embodiment of the present application. As shown in fig. 6, the cloud device 400 includes:
and a communication unit 410 for acquiring the content types supported by the application terminal from the server.
Optionally, the communication unit 410 is specifically configured to:
and acquiring an MQTT connection message through an internal interface between the MQTT connection message and the server, wherein the MQTT connection message carries first information which is used for indicating the content types supported by the application terminal.
Optionally, the first information occupies at least one reserved bit of a fixed header in the MQTT connection message.
Optionally, the communication unit 410 is specifically configured to:
sending a first subscription message to the server, wherein the first subscription message is used for subscribing to a message of which the topic contains a content type message;
and receiving a first distribution message sent by the server, wherein the theme of the first distribution message carries first information, and the first information is used for indicating the content type supported by the application terminal.
Optionally, the subject of the first posting message further includes at least one of:
the identification of the application terminal;
content information for indicating that the subject of the first distribution message is a subject carrying information for indicating the type of content supported by the application terminal.
Optionally, the load of the first distribution message is null.
Optionally, the quality of service QoS of the first distribution message is 1 or 2.
Optionally, the communication unit 410 is further configured to send a third published message to the server, where a subject of the third published message includes at least one of the following: content confirmation information, an identifier of the application terminal, a content type identifier and an identifier of the cloud device.
Optionally, the load of the third published message is empty.
Optionally, the communication unit 410 is further configured to send a fourth published message to the server according to the content type supported by the application terminal, where the content type of the load of the fourth published message belongs to the content type supported by the application terminal.
Optionally, the communication unit 410 is further configured to receive a sixth published message sent by the server, where a theme of the sixth published message carries fourth information, and the fourth information is used to indicate the updated content type supported by the application terminal.
Alternatively, in some embodiments, the communication unit may be a communication interface or transceiver, or an input/output interface of a communication chip or a system on a chip.
It should be appreciated that the cloud device 400 according to the embodiment of the present application may correspond to the cloud device in the embodiment of the method of the present application, and the above and other operations and/or functions of each unit in the cloud device 400 are respectively for implementing the corresponding flow of the cloud end device in the method 100 shown in fig. 1, which is not described herein for brevity.
Fig. 8 is a schematic structural diagram of a communication device 500 provided in an embodiment of the present application. The communication device 500 shown in fig. 8 comprises a processor 510, from which the processor 510 may call and run a computer program to implement the method in the embodiments of the present application.
Optionally, as shown in fig. 8, the communication device 500 may further comprise a memory 520. Wherein the processor 510 may call and run a computer program from the memory 520 to implement the methods in embodiments of the present application.
Wherein the memory 520 may be a separate device from the processor 510 or may be integrated into the processor 510.
Optionally, as shown in fig. 8, the communication device 500 may further include a transceiver 530, and the processor 510 may control the transceiver 530 to communicate with other devices, and in particular, may send information or data to other devices, or receive information or data sent by other devices.
Wherein the transceiver 530 may include a transmitter and a receiver. The transceiver 530 may further include antennas, the number of which may be one or more.
Optionally, the communication device 500 may be specifically an application terminal in the embodiment of the present application, and the communication device 500 may implement a corresponding flow implemented by the application terminal in each method in the embodiment of the present application, which is not described herein for brevity.
Optionally, the communication device 500 may be a server in the embodiment of the present application, and the communication device 500 may implement a corresponding flow implemented by the server in each method in the embodiment of the present application, which is not described herein for brevity.
Optionally, the communication device 500 may specifically be a cloud device in the embodiment of the present application, and the communication device 500 may implement a corresponding flow implemented by the cloud device in each method in the embodiment of the present application, which is not described herein for brevity.
Fig. 9 is a schematic structural view of an apparatus of an embodiment of the present application. The apparatus 600 shown in fig. 9 includes a processor 610, and the processor 610 may call and run a computer program from a memory to implement the methods in the embodiments of the present application.
Optionally, as shown in fig. 9, the apparatus 600 may further comprise a memory 620. Wherein the processor 610 may call and run a computer program from the memory 620 to implement the methods in embodiments of the present application.
The memory 620 may be a separate device from the processor 610 or may be integrated into the processor 610.
Optionally, the apparatus 600 may further comprise an input interface 630. The processor 610 may control the input interface 630 to communicate with other devices or chips, and in particular, may acquire information or data sent by the other devices or chips.
Optionally, the apparatus 600 may further comprise an output interface 640. Wherein the processor 610 may control the output interface 640 to communicate with other devices or chips, and in particular, may output information or data to other devices or chips.
Optionally, the device may be applied to an application terminal in the embodiment of the present application, and the device may implement a corresponding flow implemented by the application terminal in each method in the embodiment of the present application, which is not described herein for brevity.
Optionally, the apparatus may be applied to a server in the embodiments of the present application, and the apparatus may implement a corresponding flow implemented by the server in each method in the embodiments of the present application, which is not described herein for brevity.
Optionally, the device may be applied to the cloud device in the embodiment of the present application, and the device may implement a corresponding flow implemented by the cloud device in each method in the embodiment of the present application, which is not described herein for brevity.
Alternatively, the device mentioned in the embodiments of the present application may also be a chip. For example, a system-on-chip or a system-on-chip, etc.
Fig. 10 is a schematic block diagram of a communication system 700 provided in 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 may be used to implement the corresponding function implemented by the application terminal in the above method, the server 720 may be used to implement the corresponding function implemented by the server in the above method, and the cloud device 730 may be used to implement the corresponding function implemented by the cloud device in the above method, which is not described herein for brevity.
It should be appreciated that the processor of an embodiment of the present application may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method embodiments may be implemented by integrated logic circuits of hardware in a processor or instructions in software form. The processor may 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 programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
It will be appreciated that the memory in embodiments of the present application may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (Double Data Rate SDRAM), enhanced SDRAM (ESDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
It should be understood that the above memory is exemplary but not limiting, and for example, the memory in the embodiments of the present application may be Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), direct RAM (DR RAM), and the like. That is, the memory in embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
Embodiments of the present application also provide a computer-readable storage medium for storing a computer program.
Optionally, the computer readable storage medium may be applied to an application terminal in the embodiments of the present application, and the computer program causes a computer to execute a corresponding procedure implemented by the application terminal in each method in the embodiments of the present application, which is not described herein for brevity.
Optionally, the computer readable storage medium may be applied to a server in the embodiments of the present application, and the computer program causes a computer to execute a corresponding flow implemented by the server in each method in the embodiments of the present application, which is not described herein for brevity.
Optionally, the computer readable storage medium may be applied to the cloud device in the embodiment of the present application, and the computer program makes the computer execute corresponding processes implemented by the cloud device in each method in the embodiment of the present application, which is not described herein for brevity.
Embodiments of the present application also provide a computer program product comprising computer program instructions.
Optionally, the computer program product may be applied to an application terminal in the embodiments of the present application, and the computer program instructions cause the computer to execute corresponding processes implemented by the application terminal in the methods in the embodiments of the present application, which are not described herein for brevity.
Optionally, the computer program product may be applied to a server in the embodiments of the present application, and the computer program instructions cause the computer to execute corresponding processes implemented by the server in the methods in the embodiments of the present application, which are not described herein for brevity.
Optionally, the computer program product may be applied to the cloud device in the embodiment of the present application, and the computer program instructions cause the computer to execute corresponding processes implemented by the cloud device in each method of the embodiment of the present application, which are not described herein for brevity.
The embodiment of the application also provides a computer program.
Optionally, the computer program may be applied to an application terminal in the embodiments of the present application, and when the computer program runs on a computer, the computer is caused to execute a corresponding flow implemented by the application terminal in each method in the embodiments of the present application, which is not described herein for brevity.
Optionally, the computer program may be applied to a server in the embodiments of the present application, where the computer program when run on a computer causes the computer to execute corresponding processes implemented by the server in the methods in the embodiments of the present application, and for brevity, will not be described in detail herein.
Optionally, the computer program may be applied to the cloud device in the embodiment of the present application, and when the computer program runs on a computer, the computer is caused to execute a corresponding flow implemented by the cloud device in each method in the embodiment of the present application, which is not described herein for brevity.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. For such understanding, the technical solutions of the present application may be embodied in essence or in a part contributing to the prior art or in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (60)

  1. A communication method based on MQTT protocol, comprising:
    the server receives first information sent by an application terminal, wherein the first information is used for indicating content types supported by the application terminal.
  2. The method of claim 1, wherein the first information occupies at least one reserved bit of a fixed header in the MQTT-connection message.
  3. The method of claim 2, wherein the method further comprises:
    and the server sends the MQTT connection message to the cloud device.
  4. A method according to claim 2 or 3, wherein the method further comprises:
    and the server sends an MQTT connection confirmation message to the application terminal.
  5. The method of claim 4, wherein the MQTT connection acknowledgement message carries second information indicating the types of content supported by the application terminal.
  6. The method of claim 5, wherein the second information occupies at least one reserved bit of a fixed header in the MQTT connection acknowledgement message, and wherein the bit position occupied by the second information is the same as the bit position occupied by the first information.
  7. The method of claim 1, wherein the first information is carried in a topic of a first posting message.
  8. The method of claim 7, wherein the topic of the first posting message further comprises at least one of:
    the identification of the application terminal;
    content information for indicating that the subject of the first distribution message is a subject carrying information for indicating the content type supported by the application terminal.
  9. The method of claim 7 or 8, wherein the load of the first posted message is null.
  10. The method according to any of claims 7 to 9, wherein the quality of service QoS of the first distribution message is 1 or 2.
  11. The method of any one of claims 7 to 10, wherein the method further comprises:
    the method comprises the steps that the server receives a first subscription message sent by cloud equipment, wherein the first subscription message is used for subscribing a message of which the topic contains a content type message;
    Responsive to the first subscription message, the server sends the first distribution message to the cloud device.
  12. The method of any one of claims 7 to 11, wherein the method further comprises:
    the server receives a second subscription message sent by the application terminal, wherein the second subscription message is used for subscribing a target theme, and the target theme at least comprises content confirmation information and an identifier of the application terminal;
    in response to the second subscription message, the server sends a second published message to the application terminal, the topic of the second published message including at least one of: content confirmation information, identification of the application terminal, and content type identification.
  13. The method of claim 12, wherein the load of the second published message is null.
  14. The method according to claim 12 or 13, wherein before the server sends the second published message to the application terminal, the method further comprises:
    the server receives a third release message sent by the cloud device, wherein the theme of the third release message comprises at least one of the following: content confirmation information, identification of the application terminal, content type identification and identification of the cloud device.
  15. The method of claim 14, wherein the load of the third published message is null.
  16. The method of any one of claims 1 to 15, wherein the method further comprises:
    and the server receives a fourth release message sent by the cloud terminal equipment, wherein the content type of the load of the fourth release message belongs to the content type supported by the application terminal.
  17. The method of claim 16, wherein the method further comprises:
    the server receives a third subscription message sent by the application terminal;
    and responding to the third subscription message, and sending the fourth release message to the application terminal by the server.
  18. The method of any one of claims 1 to 17, wherein the method further comprises:
    the server receives a fifth release message sent by the application terminal, wherein the theme of the fifth release message carries third information, and the third information is used for indicating the updated content type supported by the application terminal;
    and the server sends a sixth release message to the cloud device, wherein the theme of the sixth release message carries fourth information, and the fourth information is used for indicating the updated content type supported by the application terminal.
  19. A communication method based on MQTT protocol, comprising:
    and the application terminal sends first information to the server, wherein the first information is used for indicating the content types supported by the application terminal.
  20. The method of claim 19, wherein the first information occupies at least one reserved bit of a fixed header in the MQTT-connection message.
  21. The method of claim 20, wherein the method further comprises:
    and the application terminal receives the MQTT connection confirmation message sent by the server.
  22. The method of claim 21, wherein the MQTT connection acknowledgement message carries second information indicating the types of content supported by the application terminal.
  23. The method of claim 22, wherein the second information occupies at least one reserved bit of a fixed header in the MQTT connection acknowledgement message, and wherein the bit position occupied by the second information is the same as the bit position occupied by the first information.
  24. The method of claim 19, wherein the first information is carried in a topic of a first posting message.
  25. The method of claim 24, wherein the topic of the first posting message further comprises at least one of:
    The identification of the application terminal;
    content information for indicating that the subject of the first distribution message is a subject carrying information for indicating the content type supported by the application terminal.
  26. The method of claim 24 or 25, wherein the load of the first posted message is null.
  27. The method according to any of claims 24 to 26, wherein the quality of service QoS of the first distribution message is 1 or 2.
  28. The method of any one of claims 24 to 27, wherein the method further comprises:
    the application terminal sends a second subscription message to the server, wherein the second subscription message is used for subscribing to a target theme, and the target theme at least comprises content confirmation information and an identifier of the application terminal;
    the application terminal receives a second release message sent by the server, wherein the theme of the second release message comprises at least one of the following components: content confirmation information, identification of the application terminal, and content type identification.
  29. The method of claim 28, wherein the payload of the second published message is empty.
  30. The method of any one of claims 19 to 29, wherein the method further comprises:
    The application terminal sends a third subscription message to the server;
    and the application terminal receives a fourth release message sent by the server, wherein the content type of the load of the fourth release message belongs to the content type supported by the application terminal.
  31. The method of any one of claims 19 to 30, wherein the method further comprises:
    and under the condition that the content types supported by the application terminal are changed, the application terminal sends a fifth release message to the server, wherein the theme of the fifth release message carries third information, and the third information is used for indicating the updated content types supported by the application terminal.
  32. A communication method based on MQTT protocol, comprising:
    and the cloud device acquires the content types supported by the application terminal from the server.
  33. The method of claim 32, wherein the cloud device obtaining, from a server, content types supported by an application terminal, comprising:
    the cloud device obtains an MQTT connection message through an internal interface between the cloud device and the server, wherein the MQTT connection message carries first information, and the first information is used for indicating content types supported by the application terminal.
  34. The method as in claim 33, wherein the first information occupies at least one reserved bit of a fixed header in the MQTT-connection message.
  35. The method of claim 32, wherein the cloud device obtaining, from a server, content types supported by an application terminal, comprising:
    the cloud device sends a first subscription message to the server, wherein the first subscription message is used for subscribing to a message of which the topic contains a content type message;
    the cloud device receives a first distribution message sent by the server, wherein a theme of the first distribution message carries first information, and the first information is used for indicating content types supported by the application terminal.
  36. The method of claim 35, wherein the topic of the first posting message further comprises at least one of:
    the identification of the application terminal;
    content information for indicating that the subject of the first distribution message is a subject carrying information for indicating the content type supported by the application terminal.
  37. A method as claimed in claim 35 or 36, wherein the load of the first published message is null.
  38. A method according to any of claims 35 to 37, wherein the quality of service QoS of the first distribution message is 1 or 2.
  39. The method of any one of claims 35 to 38, wherein the method further comprises:
    the cloud device sends a third release message to the server, wherein the theme of the third release message comprises at least one of the following: content confirmation information, identification of the application terminal, content type identification and identification of the cloud device.
  40. The method of claim 39, wherein the load of the third published message is null.
  41. The method of any one of claims 32 to 40, further comprising:
    and the cloud device sends a fourth release message to the server according to the content type supported by the application terminal, wherein the content type of the load of the fourth release message belongs to the content type supported by the application terminal.
  42. The method of any one of claims 32 to 41, further comprising:
    the cloud device receives a sixth release message sent by the server, wherein the theme of the sixth release message carries fourth information, and the fourth information is used for indicating the updated content type supported by the application terminal.
  43. A server, comprising:
    and the communication unit is used for receiving first information sent by the application terminal, wherein the first information is used for indicating the content types supported by the application terminal.
  44. An application terminal, comprising:
    and the communication unit is used for sending first information to the server, wherein the first information is used for indicating the content types supported by the application terminal.
  45. A cloud device, comprising:
    and the communication unit is used for acquiring the content types supported by the application terminal from the server.
  46. A server, comprising: a processor and a memory for storing a computer program, the processor being for invoking and running the computer program stored in the memory, performing the method of any of claims 1 to 18.
  47. An application terminal, comprising: a processor and a memory for storing a computer program, the processor being for invoking and running the computer program stored in the memory, performing the method of any of claims 19 to 31.
  48. A cloud device, comprising: a processor and a memory for storing a computer program, the processor being for invoking and running the computer program stored in the memory, performing the method of any of claims 32 to 42.
  49. A chip, comprising: a processor for calling and running a computer program from a memory, causing a device on which the chip is mounted to perform the method of any one of claims 1 to 18.
  50. A chip, comprising: a processor for calling and running a computer program from a memory, causing a device on which the chip is mounted to perform the method of any of claims 19 to 31.
  51. A chip, comprising: a processor for calling and running a computer program from a memory, causing a device on which the chip is mounted to perform the method of any of claims 32 to 42.
  52. A computer readable storage medium storing a computer program for causing a computer to perform the method of any one of claims 1 to 18.
  53. A computer readable storage medium storing a computer program for causing a computer to perform the method of any one of claims 19 to 31.
  54. A computer readable storage medium storing a computer program for causing a computer to perform the method of any one of claims 32 to 42.
  55. A computer program product comprising computer program instructions for causing a computer to perform the method of any one of claims 1 to 18.
  56. A computer program product comprising computer program instructions which cause a computer to perform the method of any of claims 19 to 31.
  57. A computer program product comprising computer program instructions for causing a computer to perform the method of any one of claims 32 to 42.
  58. A computer program, characterized in that the computer program causes a computer to perform the method according to any one of claims 1 to 18.
  59. A computer program, characterized in that the computer program causes a computer to perform the method of any one of claims 19 to 31.
  60. A computer program, characterized in that the computer program causes a computer to perform the method of any of claims 32 to 42.
CN202080105107.6A 2020-11-17 2020-11-17 Communication method and device based on MQTT protocol Pending CN116134798A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/129500 WO2022104555A1 (en) 2020-11-17 2020-11-17 Mqtt protocol-based communication method and device

Publications (1)

Publication Number Publication Date
CN116134798A true CN116134798A (en) 2023-05-16

Family

ID=81707985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080105107.6A Pending CN116134798A (en) 2020-11-17 2020-11-17 Communication method and device based on MQTT protocol

Country Status (2)

Country Link
CN (1) CN116134798A (en)
WO (1) WO2022104555A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115037810B (en) * 2022-08-08 2023-01-13 广东电网有限责任公司佛山供电局 Communication device of station-area-type rapid protection device
CN115695504B (en) * 2023-01-03 2023-04-11 东方合智数据科技(广东)有限责任公司 Internet of things platform communication method, device, equipment and storage medium
CN117114263A (en) * 2023-06-01 2023-11-24 中国航空油料集团有限公司 Aviation oil filling scheduling method and system
CN117319166A (en) * 2023-09-21 2023-12-29 深圳市西迪特科技股份有限公司 Access network equipment management method and computer equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10979879B2 (en) * 2016-12-09 2021-04-13 Convida Wireless, Llc Mechanisms for resource-directory to resource-directory communications
CN108173860A (en) * 2017-12-29 2018-06-15 深圳市泛海三江科技发展有限公司 A kind of MQTT connection methods, system, terminal and the server of low side constrained devices
CN108965447A (en) * 2018-07-27 2018-12-07 四川爱创科技有限公司 The method and system that data are acquired and remotely controlled
CN111770553A (en) * 2020-06-22 2020-10-13 深圳中兴网信科技有限公司 Internet of things equipment access system and method, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2022104555A1 (en) 2022-05-27

Similar Documents

Publication Publication Date Title
US10893048B2 (en) Multi-blockchain network data processing
CN116134798A (en) Communication method and device based on MQTT protocol
US11140105B2 (en) Method and system for providing interoperability for Rich Communication Suite (RCS) messaging
US20220141295A1 (en) Systems and Methods for Enabling Access to Third Party Services Via a Service Layer
EP3195567B1 (en) Publication and discovery of m2m-iot services
CN112152926B (en) Method and device for managing network slices of application
US10791070B2 (en) Service implementation method, apparatus, and system based on fix protocol
US11558320B2 (en) Method and system for providing interoperability for rich communication suite (RCS) messaging with local and remote applications
CN113438628B (en) Method and device for data interaction
CN112769945B (en) Distributed service calling method and device
CN110187877B (en) Icon acquisition method, device and system, electronic equipment and storage medium
CN113992641B (en) Data processing method, device, equipment and storage medium
CN103080931A (en) Method and apparatus for a paged update protocol
KR20090033746A (en) Method and system for communicating between star and fan, and server applied to the same
CN106571845A (en) Intelligent fitband wechat communication system
KR20140112149A (en) System for running application on mobiledevices using NFC tag
CN106973112B (en) Data processing method and system, terminal and server thereof
CN103428280A (en) Mobile terminal based mobile service data acquisition method and system
CN113918245A (en) Data calling method, device, equipment and computer readable storage medium
CN112565173B (en) Method and apparatus for message processing
US20230188485A1 (en) Method and system for providing interoperability for rich communication suite (rcs) information sharing using plural channels
CN114928596B (en) Data transmission method and device in micro-service communication process
US20230298116A1 (en) Method and system for capital management with custom assemblies and schedulable cost lines
CN116866425A (en) Distributed message pushing method and device, electronic equipment and storage medium
CN116108105A (en) Service processing system, method and equipment, and data synchronization method and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination