CN110099078B - Method, device, equipment and storage medium for communication between equipment and message synchronization - Google Patents

Method, device, equipment and storage medium for communication between equipment and message synchronization Download PDF

Info

Publication number
CN110099078B
CN110099078B CN201810083725.XA CN201810083725A CN110099078B CN 110099078 B CN110099078 B CN 110099078B CN 201810083725 A CN201810083725 A CN 201810083725A CN 110099078 B CN110099078 B CN 110099078B
Authority
CN
China
Prior art keywords
message
response
request
subscription
resource path
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.)
Active
Application number
CN201810083725.XA
Other languages
Chinese (zh)
Other versions
CN110099078A (en
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810083725.XA priority Critical patent/CN110099078B/en
Publication of CN110099078A publication Critical patent/CN110099078A/en
Application granted granted Critical
Publication of CN110099078B publication Critical patent/CN110099078B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a method, a device, equipment and a storage medium for communication and message synchronization among equipment, so that a terminal and a server can realize synchronous request and response. The method comprises the following steps: receiving a request message sent by a message gateway; adding a prefix of a resource path to the request message, generating a corresponding request push message and forwarding the request push message to the terminal equipment; receiving a response push message fed back by the terminal equipment; and deleting the prefix of the resource path from the response push message, generating a corresponding response message and sending the response message to the message gateway. The request to which the response belongs can be determined through the prefix, and the response is forwarded to complete synchronous request and response sending, so that the method can be applied to various communication scenes.

Description

Method, device, equipment and storage medium for communication between equipment and message synchronization
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for inter-device communication, a method and an apparatus for message synchronization, a connection gateway, a message gateway, an electronic device, and a storage medium.
Background
The Internet of things (IoT) is an Internet with which things are connected, and with the rise of the Internet of things, Internet of things devices are increasingly diversified.
The internet of things equipment needs to be networked and interactively communicated with a server at the cloud end to perform message transmission, equipment control and the like. At present, requests and responses between devices and servers of the internet of things are generally realized asynchronously, however, synchronous requests and responses between the devices and the servers are required in some scenarios, for example, synchronous requests and responses are required in scenarios such as lighting, unlocking, and the like, and the asynchronous request and response mechanism limits interaction scenarios of the devices and the servers.
Disclosure of Invention
The embodiment of the application provides a communication method between devices, so that a terminal and a server can realize synchronous request and response.
Correspondingly, the embodiment of the application also provides a device for communication among equipment, a method and a device for message synchronization, a connection gateway, a message gateway, electronic equipment and a storage medium, which are used for ensuring the realization and application of the system.
In order to solve the above problem, an embodiment of the present application discloses an inter-device communication method, which is applied to a connection gateway, and the method includes: receiving a request message sent by a message gateway; adding a prefix of a resource path to the request message, generating a corresponding request push message and forwarding the request push message to the terminal equipment; receiving a response push message fed back by the terminal equipment; and deleting the prefix of the resource path from the response push message, generating a corresponding response message and sending the response message to the message gateway.
Optionally, the adding a prefix of a resource path to the request message and generating a corresponding request push message include: determining a prefix of a resource path corresponding to the request message, wherein the prefix comprises: a message identifier; and adding the prefix on the resource path of the request message to generate a corresponding request push message.
Optionally, the deleting the prefix of the resource path from the response push message, and generating a corresponding response message includes: determining a resource path for the response push message; and deleting the prefix of the resource path and generating a corresponding response message.
Optionally, after receiving the response push message fed back by the terminal device, the method further includes: inquiring the prefix of the resource path in the response push message to obtain a corresponding message identifier; and matching the request message corresponding to the response push message according to the message identifier. And matching the context information corresponding to the request message.
Optionally, the step of sending the response message to the message gateway includes: and determining a message gateway according to the context information, and sending the response message to the message gateway.
Optionally, the method further includes: receiving a subscription request sent by terminal equipment; deleting the prefix of the resource path in the subscription request to generate a corresponding subscription message; and sending the subscription message to a message gateway.
Optionally, the method further includes: receiving a subscription result fed back by the message gateway; adding a prefix to the resource path of the subscription result to obtain a corresponding subscription response; and sending a subscription response to the terminal equipment.
The embodiment of the application also discloses a communication method between devices, which is applied to a message gateway, and the method comprises the following steps: receiving a request message sent by a service server, wherein the request message comprises: a resource path; inquiring subscription information of the terminal equipment and a connection gateway connected with the terminal equipment according to the resource path; sending the request message to the connection gateway; and receiving a response message fed back by the connection gateway, and returning the response message to the service server.
Optionally, the querying, according to the resource path, subscription information of the terminal device and a connection gateway connected to the terminal device includes: determining the equipment identifier of the terminal equipment according to the resource path; judging whether the equipment identification subscribes to the resource path; and determining a connection gateway connected with the terminal equipment after judging that the resource path is subscribed.
Optionally, after determining that the resource path is subscribed to, the method further includes: judging whether the terminal equipment has the issuing authority of the resource path; and after judging that the issuing authority of the resource path exists, executing a step of determining a connection gateway connected with the terminal equipment.
Optionally, the step of determining a connection gateway to which the terminal device is connected includes: and inquiring the session information corresponding to the terminal equipment through the equipment session list, and determining the address information of a connection gateway connected with the terminal equipment.
Optionally, the returning the response message to the service server includes: and returning the response message to the service server according to the context information of the response message.
Optionally, the method further includes: and receiving a subscription message, and generating a subscription result of the corresponding terminal equipment according to the subscription message.
Optionally, the generating a subscription result of the corresponding terminal device according to the subscription message includes: determining a terminal device according to the subscription message, and judging whether the terminal device has a corresponding authority, wherein the authority comprises: publishing rights and/or subscribing rights; after judging that the terminal equipment has the corresponding authority, generating a subscription result of successful subscription; and after judging that the terminal equipment does not have the corresponding authority, generating a subscription result of failed subscription.
The embodiment of the application also discloses a device for communication between devices, which is applied to a connection gateway, and the device comprises: the request receiving module is used for receiving a request message sent by the message gateway; the request forwarding module is used for adding a prefix of a resource path to the request message, generating a corresponding request push message and forwarding the request push message to the terminal equipment; a response receiving module, configured to receive a response push message fed back by the terminal device; and the response forwarding module is used for deleting the prefix of the resource path from the response push message, generating a corresponding response message and sending the response message to the message gateway.
Optionally, the request forwarding module is configured to determine a prefix of a resource path corresponding to the request message, where the prefix includes: a message identifier; and adding the prefix on the resource path of the request message to generate a corresponding request push message.
Optionally, the response forwarding module is configured to determine a resource path of the response push message; and deleting the prefix of the resource path and generating a corresponding response message.
Optionally, the response forwarding module is further configured to query a prefix of a resource path in the response push message, and obtain a corresponding message identifier; and matching the request message corresponding to the response push message according to the message identifier. And matching the context information corresponding to the request message.
Optionally, the response forwarding module is configured to determine a message gateway according to the context information, and send the response message to the message gateway.
Optionally, the method further includes: the subscription request module is used for receiving a subscription request sent by the terminal equipment; the subscription sending module is used for deleting the prefix of the resource path in the subscription request and generating a corresponding subscription message; and sending the subscription message to a message gateway.
Optionally, the method further includes: the result feedback module is used for receiving the subscription result fed back by the message gateway; a subscription response module, configured to add a prefix to the resource path of the subscription result to obtain a corresponding subscription response; and sending a subscription response to the terminal equipment.
The embodiment of the application also discloses a device for communication between devices, which is applied to a message gateway, and the device comprises: a service request module, configured to receive a request message sent by a service server, where the request message includes: a resource path; the subscription inquiry module is used for inquiring the subscription information of the terminal equipment and a connection gateway connected with the terminal equipment according to the resource path; a forwarding module, configured to send the request message to the connection gateway; the response acquisition module is used for receiving a response message fed back by the connection gateway; and the service response module is used for returning the response message to the service server.
Optionally, the subscription query module includes: the path judgment submodule is used for determining the equipment identifier of the terminal equipment according to the resource path; judging whether the equipment identification subscribes to the resource path; and after the resource path is judged to be subscribed, triggering and determining a connection gateway connected with the terminal equipment.
Optionally, the subscription query module further includes: the authority judgment submodule is used for judging whether the terminal equipment has the issuing authority of the resource path; and after the issuing authority with the resource path is judged, triggering and determining a connection gateway connected with the terminal equipment.
Optionally, the subscription query module includes: and the connection gateway determining submodule is used for inquiring the session information corresponding to the terminal equipment through the equipment session list and determining the address information of the connection gateway connected with the terminal equipment.
Optionally, the service response module is configured to return a response message to the service server according to the context information of the response message.
Optionally, the method further includes: and the subscription module is used for receiving the subscription message and generating a subscription result of the corresponding terminal equipment according to the subscription message.
Optionally, the subscription module is configured to determine a terminal device according to the subscription message, and determine whether the terminal device has a corresponding right, where the right includes: publishing rights and/or subscribing rights; after judging that the terminal equipment has the corresponding authority, generating a subscription result of successful subscription; and after judging that the terminal equipment does not have the corresponding authority, generating a subscription result of failed subscription.
The embodiment of the present application further discloses a connection gateway, including: a processor; and a memory having executable code stored thereon, which when executed, causes the processor to perform a method of inter-device communication as described in one or more of the embodiments of the present application.
One or more machine-readable media having executable code stored thereon that, when executed, cause a processor to perform a method of inter-device communication as described in one or more of the embodiments of the present application are also disclosed.
The embodiment of the present application further discloses a message gateway, which includes: a processor; and a memory having executable code stored thereon, which when executed, causes the processor to perform a method of inter-device communication as described in one or more of the embodiments of the present application.
One or more machine-readable media having executable code stored thereon that, when executed, cause a processor to perform a method of inter-device communication as described in one or more of the embodiments of the present application are also disclosed.
The embodiment of the application also discloses a message synchronization method, which comprises the following steps: before sending a request message, adding a message identifier for the request message and recording the message identifier; after receiving a response message, matching the message identifier added in the response message with the recorded message identifier, and determining a request message synchronous with the response message; and forwarding the response message of the deleted message identifier to the equipment corresponding to the synchronous request message.
Optionally, the message identifier is located in a prefix of a resource path of a message, and the message includes: a request message and a response message.
Optionally, the adding a message identifier to the request message and recording the message identifier includes: adding a prefix to a resource path of the request message; acquiring a device identifier from the resource path, and acquiring a message identifier from the prefix; and forming the equipment identification and the message identification into index information.
Optionally, the matching the message identifier added in the response message with the recorded message identifier to determine the request message synchronized with the response message includes: acquiring equipment identification from the resource path of the response message, and acquiring message identification from the prefix of the resource path; matching index information by adopting the equipment identifier and the message identifier, and determining the matched index information; and taking the matched index information corresponding to the affiliated request message as a synchronous request message.
Optionally, the forwarding the response message of the deletion message identifier to the device corresponding to the synchronous request message includes: deleting a prefix of a resource path of the response message; and sending the response message of deleting the prefix to the equipment corresponding to the synchronous request message.
The embodiment of the present application further discloses a message synchronization apparatus, including: the identification processing module is used for adding a message identification for the request message and recording the message identification before sending the request message; the synchronous matching module is used for matching the message identification added in the response message with the recorded message identification after receiving the response message and determining the request message synchronous with the response message; and the message forwarding module is used for forwarding the response message of the deleted message identifier to the equipment corresponding to the synchronous request message.
Optionally, the message identifier is located in a prefix of a resource path of a message, and the message includes: a request message and a response message.
Optionally, the identification processing module includes: a prefix adding submodule, configured to add a prefix to the resource path of the request message; the index generation submodule is used for acquiring equipment identification from the resource path and acquiring message identification from the prefix; and forming the equipment identification and the message identification into index information.
Optionally, the synchronization matching module is configured to obtain a device identifier from a resource path of the response message, and obtain a message identifier from a prefix of the resource path; matching index information by adopting the equipment identifier and the message identifier, and determining the matched index information; and taking the matched index information corresponding to the affiliated request message as a synchronous request message.
Optionally, the message forwarding module is configured to delete a prefix of the resource path of the response message; and sending the response message of deleting the prefix to the equipment corresponding to the synchronous request message.
The embodiment of the application also discloses an electronic device, which comprises: a processor; and a memory having executable code stored thereon, which when executed, causes the processor to perform a message synchronization method as described in one or more of the embodiments of the present application.
One or more machine-readable media having stored thereon executable code that, when executed, causes a processor to perform a message synchronization method as described in one or more of the embodiments of the present application are also disclosed.
Compared with the prior art, the embodiment of the application has the following advantages:
in the embodiment of the application, automatic matching of the request and the response can be realized through the prefix of the resource path, the prefix of the resource path can be added to the request message, the corresponding request push message is generated and forwarded to the terminal device, then the response push message fed back by the terminal device can be received, the prefix of the resource path is deleted from the response push message, the corresponding response message is generated and sent to the message gateway, and therefore the request to which the response belongs is determined through the prefix and forwarded, synchronous request and response sending are completed, and the method and the device can be applied to various communication scenes.
Drawings
Fig. 1 is a schematic diagram of a communication system of an embodiment of the present application;
FIG. 2 is an interaction diagram of a resource subscription in an embodiment of the present application;
FIG. 3 is a schematic diagram of a synchronous interaction of a request and a response in an embodiment of the present application;
FIG. 4 is a flowchart of steps for connecting to a gateway in an embodiment of a subscription method of the present application;
FIG. 5 is a flow chart illustrating steps of a message gateway in an embodiment of a subscription method of the present application;
FIG. 6 is a flowchart illustrating steps of a message gateway in an embodiment of a method for inter-device communication according to the present application;
FIG. 7 is a flowchart illustrating steps for connecting a gateway in an embodiment of a method for inter-device communication according to the present application;
FIG. 8 is a flow chart illustrating steps of an embodiment of a message synchronization method of the present application;
FIG. 9 is a flow chart of steps in another message synchronization method embodiment of the present application;
fig. 10 is a block diagram of an embodiment of an inter-signal communication apparatus applied to a connection gateway according to the present application;
fig. 11 is a block diagram of another embodiment of an inter-signal communication apparatus applied to a connection gateway according to the present application;
FIG. 12 is a block diagram of an embodiment of an inter-signal communication apparatus applied to a message gateway according to the present application;
FIG. 13 is a block diagram of an alternative embodiment of an inter-signal communication device for use in a message gateway;
FIG. 14 is a block diagram of an embodiment of a message synchronization apparatus according to the present application;
FIG. 15 is a block diagram of another embodiment of a message synchronization apparatus of the present application;
fig. 16 is a schematic structural diagram of an apparatus according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
The embodiment of the application can be applied to the MQTT (Message queue Telemetry Transport) technology. When the existing MQTT is used for interaction between a server and a device, because a response cannot be synchronously returned, a server needs to monitor a message callback after calling an API to send a request, that is, the server needs to bind the request and the response according to the content in a message body to wait for the reply of the device. The inter-device communication mechanism provided by the embodiment of the application can realize asynchronous-to-synchronous conversion without modifying the content in the message body, the mechanism realizes automatic matching of requests and responses by extending the prefix of a resource path (topic), the request message of the server can synchronously acquire the responses of the device end, and the usability is greatly improved.
Fig. 1 is a schematic diagram of a communication system, which includes: a service server 10, a message gateway 20, a connection gateway 30 and a terminal device 40. The service server 10, the message gateway 20, and the connection gateway 30 are located at a service end, the terminal device 40 is located at a device end, the communication system may include a plurality of terminal devices, and the terminal devices access the communication system through the connection gateway, wherein the connection gateway (also referred to as a connection server) may be connected to one or more terminal devices for implementing interaction between the service end and the device end. That is, different terminal devices may be connected to the same or different connection gateways, and the terminal device and the connection gateway may be directly connected or may be connected to the connection gateway through a gateway at the device side. The terminal equipment comprises the Internet of things equipment, such as lighting equipment and security equipment. The service server is a server corresponding to various services, and is specifically determined according to the services, such as a control server of a light service, a server of a security service, and the like. The message gateway (also called message server) is a server for message transmission and management in the system, and the message gateway can support the transmission and management of messages of a plurality of different protocols. The message gateway can be connected with one or more connection gateways, and the message gateway can also be connected with one or more service servers.
In an optional embodiment of the present application, the terminal device and the connection gateway may communicate based on a long connection channel of MQTT protocol, the subscription is a standard MQTT message, and the message gateway and the connection gateway may implement service invocation between each other through a distributed service framework, such as DUBBO.
In the embodiment of the application, the terminal device may send a message to the message gateway through the connection gateway, and perform subscription of a corresponding service, so as to obtain a corresponding subscription service, such as subscribing to some resource data, publishing some resource data, and the like, and a subsequent request and response for synchronization between the service server and the terminal device may be implemented based on a prefix of the resource path.
The subscription to the resource service may be achieved by:
referring to fig. 2, an interaction diagram of a resource subscription in an embodiment of the present application is shown.
In step 202, the terminal device sends a subscription request to the connection gateway.
After the terminal device is on line, it may actively subscribe or unsubscribe to a resource path topic or a resource path topic containing wildcards, where the wildcards may be various symbols, such as '+' or '#'. For example, the subscription request includes resource path/ext/rrpc/+/$ { topic }, where '+' is a wildcard, and the subscription request can subscribe to the resource path of the category corresponding to the wildcard.
And 204, deleting the prefix of the resource path in the subscription request by the connection gateway, and generating a corresponding subscription message.
In the embodiment of the application, the message gateway supports interaction of various protocols, so the message gateway is connected with a connection gateway of various protocols. For the versatility of the message gateway, the message gateway may not be aware of the prefix of the resource path. For example, in a topic-based communication model, deleting a topic prefix can unify processing logic of a message gateway, and special processing is not required for the use scenario of the MQTT protocol. Therefore, before transmitting data to the message gateway, the connection gateway may delete the prefix from the resource path of the subscription request, and generate a corresponding subscription message.
Step 206, the connection gateway sends the subscription message to the message gateway.
And step 208, the message gateway generates a subscription result of the corresponding terminal device according to the subscription message.
The message gateway can execute the subscription service of the terminal equipment according to the subscription message and generate corresponding subscription results, wherein the subscription results comprise successful subscription results and unsuccessfully subscribed subscription results.
The message gateway can perform subscription management, including performing subscription judgment of the device, managing subscription relationship, and performing distribution of subscription messages. Wherein the right to the resource subscription includes: the terminal equipment comprises a subscription authority and a release authority, wherein the subscription authority is that the terminal equipment has the authority of subscribing the specified resource path, and the release authority is that the terminal equipment has the authority of releasing the message of the specified resource path. For example, based on the MQTT protocol extensible rights model, the resource path may include resource information, and if the device1 belongs to the product1, the corresponding resource path may be/product 1/device1, while for other resource paths, the device1 has no right to publish or subscribe. Moreover, distribution of publishing rights and subscribing rights can be performed on the resource path, for example, distribution rights of/product 1/product 1/aaa and subscription rights of/product 1/product 1/bbb are distributed to the device1, and the device1 has rights to subscribe/product 1/product 1/bbb, but does not have rights to subscribe/product 1/product 1/aaa.
The generating of the subscription result of the corresponding terminal device according to the subscription message includes: determining a terminal device according to the subscription message, and judging whether the terminal device has a corresponding authority, wherein the authority comprises: publishing rights and/or subscribing rights; after judging that the terminal equipment has the corresponding authority, generating a subscription result of successful subscription; and after judging that the terminal equipment does not have the corresponding authority, generating a subscription result of failed subscription. Therefore, the terminal identifier can be determined based on the resource path of the subscription message, and then the authority of the terminal device is determined based on the terminal identifier, and the authority of each terminal device can be configured in the message gateway, such as recorded in a corresponding configuration file and a database. Thereby determining whether the terminal device has the required rights including the publishing rights and/or the subscription rights. The specific required subscription authority can be determined according to the subscription message, or various authorities can be subscribed at one time. The subscription result with the corresponding authority can generate a subscription result with successful subscription, and the subscription result with failed subscription can be generated without the corresponding authority, so that the subscription result can include successful subscription of some authorities, failed subscription of some authorities and the like. The message gateway records and stores the authority subscribed by the terminal device in a NoSQL database, such as HBase.
Step 210, the message gateway sends the subscription result to the connection gateway. The message gateway can determine the equipment identification based on the subscription result, inquire the session information according to the equipment identification so as to determine the address corresponding to the connection gateway, and feed back the subscription result based on the address.
Step 212, the connection gateway adds a prefix to the resource path of the subscription result to obtain a corresponding subscription response. After receiving the subscription result, the connection gateway may determine a prefix of the resource path based on the device identifier, and then add the prefix to the resource path of the subscription result to obtain a subscription response.
In step 214, the connection gateway sends a subscription response to the terminal device.
Therefore, the terminal equipment completes the subscription, and the subsequent service server can realize synchronous request and response with the terminal equipment. The method can be realized by the following steps:
referring to fig. 3, a schematic diagram of synchronous interaction of requests and responses in an embodiment of the present application is shown.
Step 302, the service server sends a request message to the message gateway. The service server may invoke an Application Programming Interface (API) to send the request message to the designated device, where the service server generates the request message by using a resource path without a prefix without sensing the prefix of the resource path.
Step 304, the message gateway queries the subscription information of the terminal device and a connection gateway connected with the terminal device according to the resource path. The request message includes a resource path, and the message gateway may query subscription information of the terminal device according to the resource path, for example, query whether the terminal device subscribes to the resource path, or query whether the terminal device has a corresponding right, and the like.
The querying, according to the resource path, subscription information of the terminal device and a connection gateway connected to the terminal device includes: determining the equipment identifier of the terminal equipment according to the resource path; judging whether the equipment identification subscribes to the resource path; and determining a connection gateway connected with the terminal equipment after judging that the resource path is subscribed. After the resource path is subscribed, the method further includes: judging whether the terminal equipment has the issuing authority of the resource path; and after judging that the issuing authority of the resource path exists, executing a step of determining a connection gateway connected with the terminal equipment.
Therefore, after the service server sends the request message to the message gateway through the interface, the message gateway can determine the terminal identifier based on the resource path, and then query whether the terminal device subscribes to the resource path according to the terminal identifier, if the terminal device subscribes to the resource path, whether the terminal device has the publishing right can be judged, if the terminal device has the publishing right, the synchronous response of the executable request of the terminal device is confirmed, the request message can be forwarded to the terminal device, and therefore the connection gateway connected with the terminal device can also be determined. If the terminal device does not subscribe to the resource path, or subscribes to the resource path but does not issue the right, the terminal device cannot perform the requested synchronous response, and may end the process, and may also feed back a failure message to the service server.
The step of determining a connection gateway to which the terminal device is connected includes: and inquiring the session information corresponding to the terminal equipment through the equipment session list, and determining the address information of a connection gateway connected with the terminal equipment. The server stores records of distributed sessions, such as session information, which can record device states, addresses of connection gateways, communication protocols, and the like, so that the connection gateways connected with the device, such as a connection server accessed through MQTT long connection, can be found through the session information of the terminal device.
Step 306, the message gateway sends the request message to the connection gateway. The message gateway can send the message to the corresponding connection gateway through internal interface calling.
Step 308, the connection gateway adds a prefix of the resource path to the request message, and generates a corresponding request push message. The connection gateway may determine a message Identity (ID) based on the request message, generate a prefix of a resource path corresponding to the request message based on the message Identity, add the prefix to the resource path of the request message, and generate a corresponding request push message. The connection gateway can also record a device identifier and a message identifier as index information for matching the response and the request, wherein the device identifier is a global unique identifier of the terminal device and can uniquely represent the terminal device.
In the process of sending the request and the response, the message ID does not need to be carried in a message body, the MQTT protocol does not need to be expanded to place the message ID in the reserved field, the message ID is added in the prefix of the topic, the device end does not need to analyze the message ID, the message ID is sent to the same topic when the response is returned, the service server does not need to sense the prefix of the topic and is consistent with the mode of sending the asynchronous message by using the common topic, the processing flow of the service server does not need to be improved, and the method is convenient to realize.
Step 310, the connection gateway sends the push request message to the terminal device. The connection gateway can issue a request push message to the terminal device through the long connection channel.
In step 312, the terminal device may perform corresponding processing based on the request push message, and generate a response push message. Wherein the response push message may be generated based on an execution result of the corresponding process, and the resource path and a prefix of the resource path, which corresponds to the prefix of the request push message, are added in the response push message.
In step 314, the terminal device sends a response push message to the connection gateway. For example, the terminal device may upload a response push message to the connection gateway through the long connection channel.
Step 316, the connection gateway deletes the prefix of the resource path from the response push message, and generates a corresponding response message. The connection gateway can determine the resource path of the response push message and the prefix of the resource path, then delete the prefix of the resource path, and generate a corresponding response message. In the embodiment of the application, the connection gateway records the index information matching the request and the response in advance, so that the prefix of the resource path in the response push message can be queried, the message identifier is obtained from the prefix, the terminal identifier is obtained from the resource path, then the index information is queried by adopting the message identifier and the terminal identifier, the request message corresponding to the response push message is determined based on the index information, and the context information of the request message is obtained.
In this embodiment of the application, the context information may include, in a service level, device information, a resource path, and the like, and, in a program level, includes context information of a called distributed service framework, such as a DUBBO, and thus, a mechanism for returning a request to a source can be implemented based on the context information of the framework, that is, a corresponding request is determined based on the context information, and a response message is returned to the message gateway and the corresponding access server.
Step 318, the connection gateway sends a response message to the message gateway.
Step 320, the message gateway returns the response message to the service server. The message gateway may return the response message based on a mechanism of requesting back to the source, for example, may determine and feed back a service server corresponding to the response message according to the context information of the response message.
According to the embodiment of the application, automatic association of the request and the response can be realized on the basis of not expanding the MQTT protocol, and the cloud can remotely control the equipment and synchronously obtain the response, so that the MQTT protocol simultaneously supports two use scenes of synchronization and asynchronization.
Referring to fig. 4, a flowchart illustrating steps of connecting to a gateway in an embodiment of a subscription method according to the present application is shown.
Step 402, receiving a subscription request sent by a terminal device.
Step 404, deleting the prefix of the resource path in the subscription request, and generating a corresponding subscription message.
Step 406, sending the subscription message to a message gateway.
After the terminal equipment is on line, the terminal equipment can execute subscription with required authority, so that a subscription request is sent to the connection gateway, after the connection gateway receives the subscription request, the prefix of the resource path in the subscription request can be deleted, a corresponding subscription message is generated, and then the subscription message is sent to the message gateway.
And step 408, receiving the subscription result fed back by the message gateway.
Step 410, adding a prefix to the resource path of the subscription result to obtain a corresponding subscription response.
Step 412, sending a subscription response to the terminal device.
And after executing the subscription operation, the message gateway generates and feeds back a subscription result. After receiving the subscription result, the connection gateway can add a prefix to the resource path of the subscription result to obtain a corresponding subscription response, and then sends the subscription response to the terminal device, thereby realizing the subscription process.
Referring to fig. 5, a flowchart illustrating steps of a message gateway in an embodiment of a subscription method according to the present application is shown.
Step 502, a subscription message is received.
Step 504, determining the terminal device according to the subscription message, and judging whether the terminal device has a corresponding authority.
Wherein the right comprises: and issuing the authority and/or subscribing the authority, wherein the message gateway can determine the authority which the terminal equipment has based on the record and then subscribe the authority in response to the authority. No subscription is possible for rights that are not available.
If yes, go to step 506; if not, go to step 508,
step 506, generating a subscription result of successful subscription.
And after judging that the terminal equipment has the corresponding authority, generating a subscription result of successful subscription.
Step 508, generate the subscription result of the failed subscription.
And after judging that the terminal equipment does not have the corresponding authority, generating a subscription result of failed subscription.
Step 510, sending the subscription result.
The message gateway can determine the equipment identification based on the subscription result, inquire the session information according to the equipment identification so as to determine the address corresponding to the connection gateway, and feed back the subscription result based on the address.
Referring to fig. 6, a flowchart illustrating steps of a message gateway in an embodiment of an inter-device communication method according to the present application is shown.
Step 602, receiving a request message sent by a service server.
The service server can call the API interface to send a request message to the specified terminal equipment to the message gateway, wherein the request message comprises: a resource path.
The API is a server API that is open to the service server, so that the message of the service party can specify the topic that the message needs to be sent, and then the message can be sent. Synchronous messages or asynchronous messages can be distinguished through corresponding parameters, and specific parameters can be determined according to required equipment. Therefore, the usability of the API can be improved, a business side does not need to sense specific technical details, and the processing logic of the business side does not need to be changed.
Step 604, determining the device identifier of the terminal device according to the resource path.
Step 606, determining whether the device identifier is subscribed to the resource path.
Based on the device identification, the terminal device may query a record to determine whether the device is subscribed to the resource path. If yes, go to step 608; if not, the process is ended, and the service server can be informed of the transmission failure of the request message and the like.
Step 608, determining whether the terminal device has the issuing authority of the resource path.
For the response of the request, the terminal device is also required to have the publishing right, that is, the device can publish the message through the resource path, so the message gateway can also judge whether the terminal device has the publishing right of the resource path. If so, go to step 610; if not, the process can be ended, and the service server can be informed of the transmission failure of the request message and the like.
Step 610, determining a connection gateway connected with the terminal device.
After determining that the terminal device subscribes to the resource path and has the publishing right, determining a connection gateway to which the terminal device is connected, for example, querying session information corresponding to the terminal device through a device session list, and determining address information of the connection gateway to which the terminal device is connected. In the communication system, each device may correspond to a session, wherein session information may be queried from a device session list of a corresponding session server, and the session information may record a device state, an address of a connection gateway, a communication protocol, and the like, so that address information of the connection gateway to which the device is connected, such as address information of a connection server accessed through MQTT long connection, may be found from the session information of the terminal device, and thus the connection server corresponding to the device may be determined.
Step 612, sending the request message to the connection gateway.
The connection gateway can send the request message to the connection gateway corresponding to the address information through internal interface calling.
And step 614, receiving a response message fed back by the connection gateway.
After the connection gateway forwards the request message to the terminal equipment, the connection gateway can synchronously receive the response of the terminal equipment, thereby feeding back the response message to the message gateway.
Step 616, returning the response message to the service server.
Wherein the returning the response message to the service server includes: and returning the response message to the service server according to the context information of the response message. The message gateway may return the response message based on a mechanism of requesting back to the source, for example, may determine a service server corresponding to the response message according to the context information of the response message, and then return the response message to the service server through the interface.
Referring to fig. 7, a flowchart illustrating steps of connecting a gateway in an embodiment of an inter-device communication method according to the present application is shown.
Step 702, receiving a request message sent by a message gateway.
Step 704, adding a prefix of the resource path to the request message, and generating a corresponding request push message.
Wherein, the adding a prefix of a resource path to the request message to generate a corresponding request push message includes: determining a prefix of a resource path corresponding to the request message, wherein the prefix comprises: a message identifier; and adding the prefix on the resource path of the request message to generate a corresponding request push message. The connection gateway may determine a message identifier based on the request message, generate a prefix of a resource path corresponding to the request message based on the message identifier, and then add the prefix to the resource path of the request message to generate a corresponding request push message. The connection gateway can also record a device identifier and a message identifier as index information for matching the response and the request, wherein the device identifier is a global unique identifier of the terminal device and can uniquely represent the terminal device.
For example, the resource path is in the format of/ext/rrpc/$ { msgId }/$ { topic }, and the prefix of the resource path is/ext/rrpc/$ { msgId }, where $ { msgId } is a message ID, and the matching request and response may be indexed based on the globally unique identifier device ID and the message ID of the device, e.g., the index information is device ID + message ID. And $ topic is the resource path topic actually used by the business, and contains the relevant resource information of the equipment. ext refers to services based on MQTT protocol extension, topic is identified by an ext beginning, and rrpc refers to reverse rpc (remote procedure call) invocation, so that a server can remotely control terminal equipment, such as controlling the on or off of a lighting system.
Step 706, the request push message is forwarded to the terminal device.
When the message is sent to the equipment, the message gateway can route the request to the corresponding connection gateway, the connection gateway can send the message to the equipment through a long connection channel of an MQTT protocol, and the equipment reply response also reaches the connection gateway through the channel, so that the request and the response can be matched based on the index information.
Step 708, receiving a response push message fed back by the terminal device.
The connection gateway receives a response push message of the terminal equipment through long connection, and then can inquire the prefix of a resource path in the response push message to acquire a corresponding message identifier; and matching the request message corresponding to the response push message according to the message identifier. And matching the context information corresponding to the request message. The connection gateway records the index information matched with the request and the response in advance, so that the prefix of the resource path in the response push message can be inquired, the message identifier is obtained from the prefix, the terminal identifier is obtained from the resource path, then the index information is inquired by adopting the message identifier and the terminal identifier, the request message corresponding to the response push message is determined based on the index information, and the context information of the request message is obtained.
Step 710, deleting the prefix of the resource path from the response push message, and generating a corresponding response message.
Deleting the prefix of the resource path from the response push message, and generating a corresponding response message, including: determining a resource path for the response push message; and deleting the prefix of the resource path and generating a corresponding response message. Because the message gateway does not need to sense the prefix of the resource path, the prefix of the resource path can be deleted from the response push message, and the response message corresponding to the request is obtained.
Step 712, sending the response message to the message gateway.
Wherein, include: and determining a message gateway according to the context information, and sending the response message to the message gateway. Based on the context information matched with the response push message, the request matched with the response can be determined through a request back-to-source mechanism, so that the request is determined to correspond to the message gateway, and then the response message is sent to the message gateway.
Firstly, the method realizes the synchronous message model of the MQTT, can be compatible with the MQTT protocol and various Software Development Kits (SDKs) on the device side, and is easy to use and popularize in service.
Secondly, when the service server sends the message to control the equipment, the message body does not need to be modified to realize the asynchronous-to-synchronous function, and when the equipment replies the response, the same as the asynchronous message is sent, and both ends do not need extra processing logic. And the upper connection gateway converts the asynchronous request into the synchronous request, the scheme is light, the asynchronous interface response of a back-end system is not needed to be written into the database DB, and new response messages in the database are not needed to be polled regularly.
In order to implement synchronization of a request and a response, the embodiment of the application can add message identifiers to the request message and the response message, so that the message bodies of the request message and the response message are not changed, and the corresponding relationship between the request and the response is established through the additionally added message identifiers, thereby implementing message synchronization.
Referring to fig. 8, a flowchart illustrating steps of an embodiment of a message synchronization method according to the present application is shown.
Step 802, before sending a request message, adding a message identifier to the request message and recording the message identifier.
After acquiring the request message, the gateway may add a message identifier to the request message, record the message identifier, and send the request message with the message identifier added to the terminal device before forwarding the request message to the terminal device.
Step 804, after receiving the response message, matching the message identifier added in the response message with the recorded message identifier, and determining the request message synchronized with the response message.
The terminal equipment can generate a response message according to the request message, adds a message identifier corresponding to the request to the response message, and then sends the response message with the added message identifier to the gateway. The gateway can acquire the added message identifier from the response message, then match the added message identifier with the recorded message identifier, determine the matched message identifier, and take the request message corresponding to the matched message identifier as the synchronous request message.
Step 806, forwarding the response message of the deletion message identifier to the device corresponding to the synchronized request message.
According to the synchronous request message, the device to be sent, such as a message gateway, a service server and the like, can be determined, then the message identifier can be deleted for the response message, and then the response message is sent to the corresponding device. Therefore, the matching of the request and the response is realized through the message identifiers added in the request and the response, and the synchronous forwarding is completed.
Referring to fig. 9, a flow chart of steps of another embodiment of a message synchronization method of the present application is shown.
Step 902, add a prefix to the resource path of the request message.
After obtaining the request message, the connection gateway may determine a prefix of the resource path in the request message, and then add a prefix to the resource path of the request message, where the prefix includes a message identifier and may be used to synchronize the request and the response.
For example, the resource path in the request message is $ { topic }, and the prefix is determined to be/ext/rrpc/001, where if the message identifier is 001, the prefix may be added to the resource path, and the resource path of the request message after the prefix is added is/ext/rrpc/001/$ { topic }.
Step 904, obtaining the device identifier from the resource path, and obtaining the message identifier from the prefix.
Step 906, the device identification and the message identification are formed into index information.
The embodiment of the present application may also use the message identifier and the device identifier together as an index to match the request and the response, where the resource path of the request message includes the device identifier, and the device identifier refers to an identifier corresponding to the device that sent the request, such as a device identifier of the service server. The device identity can be obtained from the resource path and the message identity from the prefix of the resource path. The message identification and the device identification are then formed into index information. For example, if the device in the resource path is identified as D1 and the message is identified as 001, the index information may be D1+ 001.
The connection gateway can store indexes matching the request and the response, index information is formed by the device identification and the message identification, and the matched device identification and the matched message identification can determine the matched request and response.
Step 908, sending the request message.
The prefix-add request message may then be sent to the terminal device. And after receiving the request message, the terminal equipment can execute corresponding processing and generate a response message. And adding a prefix for the resource path of the response message according to the prefix of the resource path in the request message, and then sending the response message.
At step 910, a response message is received.
The gateway may receive a response message with a prefix added to the resource path of the response message.
Step 912, obtaining the device identifier from the resource path of the response message, and obtaining the message identifier from the prefix of the resource path.
Step 914, matching the index information by using the device identifier and the message identifier, and determining the matched index information.
The index information in the index is matched by adopting the equipment identifier and the message, wherein the equipment identifier can be matched with the equipment identifier recorded in the index information, the message identifier is matched with the message identifier recorded in the index information, and the index information matched with both the equipment identifier and the message identifier is matched with the index information.
For example, the response message corresponds to the device identifier D1 and the message identifier 001, and matches the index information D1+ 001.
Step 916, using the matched index information corresponding to the affiliated request message as the synchronous request message.
For the index information obtained by matching, the request message to which the matched index information belongs can be used as a synchronous request message, wherein context information can be determined according to the synchronous request message, and then a device sending the request message, such as a message gateway, a service server and the like, can be determined according to the context information.
Step 918, deleting the prefix of the resource path of the response message.
Step 920, sending the response message for deleting the prefix to the device corresponding to the synchronous request message.
Since the message gateway does not need to sense the prefix of the resource path, before sending out the response message, the prefix of the resource path of the response message may be deleted, for example, the resource path added with the prefix is/ext/rrpc/001/$ { topic }, and the prefix/ext/rrpc/001 may be deleted.
After deleting the prefix of the resource path, the response message may be sent to the device corresponding to the synchronous request message, where the response message may be sent to a message gateway, and then the message gateway forwards the response message to the corresponding service server.
In the embodiment of the present application, a request message in which a prefix is added in a resource path is similar to the request push message in the embodiment, and a response message in which a prefix is added in a resource path is similar to the response push message in the embodiment.
Therefore, prefixes can be added to the resource paths of the request messages, index information is formed according to the message identifiers in the prefixes and the equipment identifiers in the resource paths, and matching of responses and requests is carried out based on the index information. After receiving the response message, matching the index information by using the device identifier and the message identifier corresponding to the response message to obtain a request and a response which need to be synchronized. The embodiment of the application can add the message identifier in the prefix of the resource path of the request message and the response message, thereby conveniently realizing the synchronization of the request and the response without modifying the message body. The method is applied to MQTT scenes, can conveniently realize asynchronous-to-synchronous conversion, and is high in usability.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
On the basis of the above embodiments, the present embodiment further provides an inter-device communication apparatus, which is applied to a connection gateway.
Referring to fig. 10, a block diagram of an embodiment of an inter-signal communication apparatus applied to a connection gateway according to the present application is shown, and specifically, the apparatus may include the following modules:
a request receiving module 1002, configured to receive a request message sent by a message gateway.
The request forwarding module 1004 is configured to add a prefix of a resource path to the request message, generate a corresponding request push message, and forward the request push message to the terminal device.
A response receiving module 1006, configured to receive a response push message fed back by the terminal device.
A response forwarding module 1008, configured to delete the prefix of the resource path from the response push message, generate a corresponding response message, and send the response message to the message gateway.
In summary, automatic matching of a request and a response can be achieved through a prefix of a resource path, the prefix of the resource path can be added to the request message, a corresponding request push message is generated and forwarded to a terminal device, then a response push message fed back by the terminal device can be received, the prefix of the resource path is deleted from the response push message, a corresponding response message is generated and sent to the message gateway, and therefore the request to which the response belongs is determined through the prefix and forwarded, and synchronous request and response sending is completed, and the method can be applied to various communication scenarios.
Referring to fig. 11, a block diagram of another embodiment of the present application, which is applied to an inter-signal communication apparatus connected to a gateway, is shown, and specifically includes the following modules:
a subscription request module 1010, configured to receive a subscription request sent by a terminal device.
A subscription sending module 1012, configured to delete the prefix of the resource path in the subscription request, and generate a corresponding subscription message; and sending the subscription message to a message gateway.
And a result feedback module 1014, configured to receive the subscription result fed back by the message gateway.
A subscription response module 1016, configured to add a prefix to the resource path of the subscription result to obtain a corresponding subscription response; and sending a subscription response to the terminal equipment.
A request receiving module 1002, configured to receive a request message sent by a message gateway.
The request forwarding module 1004 is configured to add a prefix of a resource path to the request message, generate a corresponding request push message, and forward the request push message to the terminal device.
A response receiving module 1006, configured to receive a response push message fed back by the terminal device.
A response forwarding module 1008, configured to delete the prefix of the resource path from the response push message, generate a corresponding response message, and send the response message to the message gateway.
The request forwarding module 1004 is configured to determine a prefix of a resource path corresponding to the request message, where the prefix includes: a message identifier; and adding the prefix on the resource path of the request message to generate a corresponding request push message.
The response forwarding module 1008 is configured to determine a resource path of the response push message; and deleting the prefix of the resource path and generating a corresponding response message.
The response forwarding module 1008 is further configured to query a prefix of a resource path in the response push message, and obtain a corresponding message identifier; and matching the request message corresponding to the response push message according to the message identifier. And matching the context information corresponding to the request message.
The response forwarding module 1008 is configured to determine a message gateway according to the context information, and send the response message to the message gateway.
According to the embodiment of the application, automatic association of the request and the response can be realized on the basis of not expanding the MQTT protocol, and the cloud can remotely control the equipment and synchronously obtain the response, so that the MQTT protocol simultaneously supports two use scenes of synchronization and asynchronization. In the process of sending the request and the response, the message ID does not need to be carried in a message body, the MQTT protocol does not need to be expanded to place the message ID in a reserved field, the message ID is added in the prefix of the topic, the equipment end does not need to analyze the message ID, the message ID is sent to the same topic when the response is returned, the service server does not need to sense the prefix of the topic and is consistent with the mode of sending asynchronous messages by using common topic, the processing flow of the service server does not need to be improved, and the method is convenient to implement.
On the basis of the above embodiments, the present embodiment further provides an inter-device communication apparatus, which is applied to a message gateway.
Referring to fig. 12, a block diagram of an embodiment of an inter-signal communication apparatus applied to a message gateway according to the present application is shown, which may specifically include the following modules:
a service request module 1202, configured to receive a request message sent by a service server, where the request message includes: a resource path.
A subscription query module 1204, configured to query, according to the resource path, subscription information of the terminal device and a connection gateway to which the terminal device is connected.
A forwarding module 1206, configured to send the request message to the connection gateway.
A response obtaining module 1208, configured to receive a response message fed back by the connection gateway.
A service response module 1210, configured to return the response message to the service server.
In summary, automatic matching of a request and a response can be achieved through a prefix of a resource path, the prefix of the resource path can be added to the request message, a corresponding request push message is generated and forwarded to a terminal device, then a response push message fed back by the terminal device can be received, the prefix of the resource path is deleted from the response push message, a corresponding response message is generated and sent to the message gateway, and therefore the request to which the response belongs is determined through the prefix and forwarded, and synchronous request and response sending is completed, and the method can be applied to various communication scenarios.
Referring to fig. 13, a block diagram of another embodiment of an inter-signal communication apparatus applied to a message gateway according to the present application is shown, and specifically, the apparatus may include the following modules:
the subscription module 1212 is configured to receive the subscription message, and generate a subscription result of the corresponding terminal device according to the subscription message.
A service request module 1202, configured to receive a request message sent by a service server, where the request message includes: a resource path.
A subscription query module 1204, configured to query, according to the resource path, subscription information of the terminal device and a connection gateway to which the terminal device is connected.
A forwarding module 1206, configured to send the request message to the connection gateway.
A response obtaining module 1208, configured to receive a response message fed back by the connection gateway.
A service response module 1210, configured to return the response message to the service server.
The subscription query module 1204 includes: path judgment submodule 12042, authority judgment submodule 12044, and connection gateway determination submodule 12046.
A path judgment submodule 12042, configured to determine a device identifier of the terminal device according to the resource path; judging whether the equipment identification subscribes to the resource path; and after the resource path is judged to be subscribed, triggering and determining a connection gateway connected with the terminal equipment.
The permission judgment submodule 12044 is configured to judge whether the terminal device has the issue permission of the resource path; and after the issuing authority with the resource path is judged, triggering and determining a connection gateway connected with the terminal equipment.
The connection gateway determining submodule 12046 is configured to query, through the device session list, session information corresponding to the terminal device, and determine address information of a connection gateway to which the terminal device is connected.
The service response module 1210 is configured to return a response message to the service server according to the context information of the response message.
The subscription module 1212 is configured to determine a terminal device according to the subscription message, and determine whether the terminal device has a corresponding right, where the right includes: publishing rights and/or subscribing rights; after judging that the terminal equipment has the corresponding authority, generating a subscription result of successful subscription; and after judging that the terminal equipment does not have the corresponding authority, generating a subscription result of failed subscription.
Firstly, the method realizes the synchronous message model of the MQTT, can be compatible with the MQTT protocol and various Software Development Kits (SDKs) on the device side, and is easy to use and popularize in service.
Secondly, when the service server sends the message to control the equipment, the message body does not need to be modified to realize the asynchronous-to-synchronous function, and when the equipment replies the response, the same as the asynchronous message is sent, and both ends do not need extra processing logic. And the upper connection gateway converts the asynchronous request into the synchronous request, the scheme is light, the asynchronous interface response of a back-end system is not needed to be written into the database DB, and new response messages in the database are not needed to be polled regularly.
On the basis of the above embodiments, the embodiments of the present application further provide a message synchronization apparatus, which can be applied to electronic devices such as a connection gateway.
Referring to fig. 14, a block diagram of a message synchronization apparatus according to an embodiment of the present application is shown, which may specifically include the following modules:
the identifier processing module 1402 is configured to add a message identifier to the request message and record the message identifier before sending the request message.
A synchronization matching module 1404, configured to, after receiving a response message, match the message identifier added in the response message with the recorded message identifier, and determine a request message synchronized with the response message.
A message forwarding module 1406, configured to forward the response message of the deletion message identifier to the device corresponding to the synchronized request message.
Referring to fig. 15, a block diagram of another embodiment of a message synchronization apparatus according to the present application is shown, which may specifically include the following modules:
the identifier processing module 1402 is configured to add a message identifier to the request message and record the message identifier before sending the request message.
A synchronization matching module 1404, configured to, after receiving a response message, match the message identifier added in the response message with the recorded message identifier, and determine a request message synchronized with the response message.
A message forwarding module 1406, configured to forward the response message of the deletion message identifier to the device corresponding to the synchronized request message.
Wherein the message identifier is located in a prefix of a resource path of a message, and the message includes: a request message and a response message.
The identification processing module 1402 includes: prefix adding submodule 14022 and index generating submodule 14024, wherein:
a prefix adding submodule 14022, configured to add a prefix to the resource path of the request message.
An index generation submodule 14024, configured to obtain a device identifier from the resource path and obtain a message identifier from the prefix; and forming the equipment identification and the message identification into index information.
The synchronization matching module 1404 is configured to obtain a device identifier from a resource path of the response message, and obtain a message identifier from a prefix of the resource path; matching index information by adopting the equipment identifier and the message identifier, and determining the matched index information; and taking the matched index information corresponding to the affiliated request message as a synchronous request message.
The message forwarding module 1406 is configured to delete the prefix of the resource path of the response message; and sending the response message of deleting the prefix to the equipment corresponding to the synchronous request message.
Therefore, prefixes can be added to the resource paths of the request messages, index information is formed according to the message identifiers in the prefixes and the equipment identifiers in the resource paths, and matching of responses and requests is carried out based on the index information. After receiving the response message, matching the index information by using the device identifier and the message identifier corresponding to the response message to obtain a request and a response which need to be synchronized. The embodiment of the application can add the message identifier in the prefix of the resource path of the request message and the response message, thereby conveniently realizing the synchronization of the request and the response without modifying the message body. The method is applied to MQTT scenes, can conveniently realize asynchronous-to-synchronous conversion, and is high in usability.
The present application further provides a non-transitory, readable storage medium, where one or more modules (programs) are stored, and when the one or more modules are applied to a device, the device may execute instructions (instructions) of method steps in this application.
Embodiments of the present application provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause an electronic device to perform the methods as described in one or more of the above embodiments. In the embodiment of the application, the electronic device comprises a server, a gateway, a sub-device and the like, wherein the sub-device is a device such as an internet of things device.
Embodiments of the present disclosure may be implemented as an apparatus, which may include electronic devices such as servers (clusters), terminal devices such as IoT devices, and the like, using any suitable hardware, firmware, software, or any combination thereof, for a desired configuration. Fig. 16 schematically illustrates an example apparatus 1600 that may be used to implement various embodiments described herein.
For one embodiment, fig. 16 illustrates an example apparatus 1600 having one or more processors 1602, a control module (chipset) 1604 coupled to at least one of the processor(s) 1602, a memory 1606 coupled to the control module 1604, a non-volatile memory (NVM)/storage 1608 coupled to the control module 1604, one or more input/output devices 1610 coupled to the control module 1604, and a network interface 1612 coupled to the control module 1606.
The processor 1602 may include one or more single-core or multi-core processors, and the processor 1602 may include any combination of general-purpose or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 1600 can be a server or the like of the transcoding end described in this embodiment.
In some embodiments, apparatus 1600 may include one or more computer-readable media (e.g., memory 1606 or NVM/storage 1608) having instructions 1614 and one or more processors 1602, which in conjunction with the one or more computer-readable media are configured to execute instructions 1614 to implement modules to perform actions described in this disclosure.
For one embodiment, the control module 1604 may include any suitable interface controllers to provide any suitable interface to at least one of the processor(s) 1602 and/or any suitable device or component in communication with the control module 1604.
The control module 1604 may include a memory controller module to provide an interface to the memory 1606. The memory controller module may be a hardware module, a software module, and/or a firmware module.
Memory 1606 may be used, for example, to load and store data and/or instructions 1614 for device 1600. For one embodiment, memory 1606 may comprise any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 1606 may comprise double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
For one embodiment, the control module 1604 may include one or more input/output controllers to provide an interface to the NVM/storage 1608 and input/output device(s) 1610.
For example, NVM/storage 1608 may be used to store data and/or instructions 1614. The NVM/storage 1608 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more Hard Disk Drives (HDDs), one or more Compact Disc (CD) drives, and/or one or more Digital Versatile Disc (DVD) drives).
NVM/storage 1608 may include storage resources that are physically part of the device on which apparatus 1600 is installed, or it may be accessible by the device and need not be part of the device. For example, the NVM/storage 1608 may be accessed over a network via the input/output device(s) 1610.
Input/output device(s) 1610 can provide an interface for apparatus 1600 to communicate with any other suitable devices, input/output devices 1610 can include communication components, audio components, sensor components, and so forth. Network interface 1612 may provide an interface for device 1600 to communicate over one or more networks, and device 1600 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and/or protocols, such as access to a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, etc., or a combination thereof.
For one embodiment, at least one of the processor(s) 1602 may be packaged together with logic for one or more controllers (e.g., memory controller modules) of the control module 1604. For one embodiment, at least one of the processor(s) 1602 may be packaged together with logic for one or more controllers of the control module 1604 to form a System In Package (SiP). For one embodiment, at least one of the processor(s) 1602 may be integrated on the same die with logic for one or more controllers of the control module 1604. For one embodiment, at least one of the processor(s) 1602 may be integrated on the same die with logic for one or more controllers of the control module 1604 to form a system on a chip (SoC).
In various embodiments, the apparatus 1600 may be, but is not limited to being: a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.), among other terminal devices. In various embodiments, apparatus 1600 may have more or fewer components and/or different architectures. For example, in some embodiments, device 1600 includes one or more cameras, keyboards, Liquid Crystal Display (LCD) screens (including touch screen displays), non-volatile memory ports, multiple antennas, graphics chips, Application Specific Integrated Circuits (ASICs), and speakers.
An embodiment of the present application provides a control device, including: one or more processors; and one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the control device to perform a device remote commissioning method as described in one or more of the embodiments of the present application.
An embodiment of the present application provides a debugging device, including: one or more processors; and one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the commissioning device to perform the device remote commissioning method as described in one or more of the embodiments of the present application.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method and apparatus for communication between devices, the method and apparatus for message synchronization, the connection gateway, the message gateway, the electronic device, and the storage medium provided by the present application are described in detail above, and specific examples are applied in the present application to explain the principles and embodiments of the present application, and the descriptions of the above embodiments are only used to help understand the method and core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (44)

1. An inter-device communication method, applied to a connection gateway, the method comprising:
receiving a request message sent by a message gateway;
adding a prefix of a resource path to the request message, generating a corresponding request push message and forwarding the request push message to the terminal equipment;
receiving a response push message fed back by the terminal equipment;
and deleting the prefix of the resource path from the response push message, generating a corresponding response message and sending the response message to the message gateway.
2. The method according to claim 1, wherein the adding a resource path prefix to the request message and generating a corresponding request push message comprises:
determining a prefix of a resource path corresponding to the request message, wherein the prefix comprises: a message identifier;
and adding the prefix on the resource path of the request message to generate a corresponding request push message.
3. The method of claim 1, wherein the deleting the prefix of the resource path from the response push message and generating the corresponding response message comprise:
determining a resource path for the response push message;
and deleting the prefix of the resource path and generating a corresponding response message.
4. The method of claim 1, wherein after receiving the response push message fed back by the terminal device, the method further comprises:
inquiring the prefix of the resource path in the response push message to obtain a corresponding message identifier;
matching the request message corresponding to the response push message according to the message identifier;
and matching the context information corresponding to the request message.
5. The method of claim 4, wherein sending the response message to the message gateway comprises:
and determining a message gateway according to the context information, and sending the response message to the message gateway.
6. The method of claim 1, further comprising:
receiving a subscription request sent by terminal equipment;
deleting the prefix of the resource path in the subscription request to generate a corresponding subscription message;
and sending the subscription message to a message gateway.
7. The method of claim 6, further comprising:
receiving a subscription result fed back by the message gateway;
adding a prefix to the resource path of the subscription result to obtain a corresponding subscription response;
and sending a subscription response to the terminal equipment.
8. An inter-device communication method applied to a message gateway, the method comprising:
receiving a request message sent by a service server, wherein the request message comprises: a resource path;
inquiring subscription information of the terminal equipment and a connection gateway connected with the terminal equipment according to the resource path;
sending the request message to the connection gateway, adding a resource path prefix to the request message by the connection gateway, generating a corresponding request push message and forwarding the request push message to the terminal equipment, and generating a response message after deleting the resource path prefix from a response push message fed back by the terminal equipment;
and receiving a response message fed back by the connection gateway, and returning the response message to the service server.
9. The method according to claim 8, wherein the querying the subscription information of the terminal device and the connection gateway to which the terminal device connects according to the resource path comprises:
determining the equipment identifier of the terminal equipment according to the resource path;
judging whether the equipment identification subscribes to the resource path;
and determining a connection gateway connected with the terminal equipment after judging that the resource path is subscribed.
10. The method of claim 9, wherein determining that the resource path is subscribed to further comprises:
judging whether the terminal equipment has the issuing authority of the resource path;
and after judging that the issuing authority of the resource path exists, executing a step of determining a connection gateway connected with the terminal equipment.
11. The method according to any of claims 8-10, wherein the step of determining a connection gateway to which the terminal device is connected comprises:
and inquiring the session information corresponding to the terminal equipment through the equipment session list, and determining the address information of a connection gateway connected with the terminal equipment.
12. The method of claim 8, wherein returning the response message to the service server comprises:
and returning the response message to the service server according to the context information of the response message.
13. The method of claim 8, further comprising:
and receiving a subscription message, and generating a subscription result of the corresponding terminal equipment according to the subscription message.
14. The method according to claim 13, wherein the generating a subscription result of the corresponding terminal device according to the subscription message comprises:
determining a terminal device according to the subscription message, and judging whether the terminal device has a corresponding authority, wherein the authority comprises: publishing rights and/or subscribing rights;
after judging that the terminal equipment has the corresponding authority, generating a subscription result of successful subscription;
and after judging that the terminal equipment does not have the corresponding authority, generating a subscription result of failed subscription.
15. An inter-device communication apparatus, for use in connecting to a gateway, the apparatus comprising:
the request receiving module is used for receiving a request message sent by the message gateway;
the request forwarding module is used for adding a prefix of a resource path to the request message, generating a corresponding request push message and forwarding the request push message to the terminal equipment;
a response receiving module, configured to receive a response push message fed back by the terminal device;
and the response forwarding module is used for deleting the prefix of the resource path from the response push message, generating a corresponding response message and sending the response message to the message gateway.
16. The apparatus of claim 15,
the request forwarding module is configured to determine a prefix of a resource path corresponding to the request message, where the prefix includes: a message identifier; and adding the prefix on the resource path of the request message to generate a corresponding request push message.
17. The apparatus of claim 15,
the response forwarding module is configured to determine a resource path of the response push message; and deleting the prefix of the resource path and generating a corresponding response message.
18. The apparatus of claim 15,
the response forwarding module is further configured to query a prefix of the resource path in the response push message, and obtain a corresponding message identifier; matching the request message corresponding to the response push message according to the message identifier; and matching the context information corresponding to the request message.
19. The apparatus of claim 18,
and the response forwarding module is used for determining a message gateway according to the context information and sending the response message to the message gateway.
20. The apparatus of claim 15, further comprising:
the subscription request module is used for receiving a subscription request sent by the terminal equipment;
the subscription sending module is used for deleting the prefix of the resource path in the subscription request and generating a corresponding subscription message; and sending the subscription message to a message gateway.
21. The apparatus of claim 20, further comprising:
the result feedback module is used for receiving the subscription result fed back by the message gateway;
a subscription response module, configured to add a prefix to the resource path of the subscription result to obtain a corresponding subscription response; and sending a subscription response to the terminal equipment.
22. An inter-device communication apparatus, applied to a message gateway, the apparatus comprising:
a service request module, configured to receive a request message sent by a service server, where the request message includes: a resource path;
the subscription inquiry module is used for inquiring subscription information of the terminal equipment and a connection gateway connected with the terminal equipment according to the resource path;
the forwarding module is used for sending the request message to the connection gateway, the connection gateway adds a resource path prefix to the request message, generates a corresponding request push message and forwards the request push message to the terminal equipment, and generates a response message after deleting the resource path prefix from a response push message fed back by the terminal equipment;
the response acquisition module is used for receiving a response message fed back by the connection gateway;
and the service response module is used for returning the response message to the service server.
23. The apparatus of claim 22, wherein the subscription query module comprises:
the path judgment submodule is used for determining the equipment identifier of the terminal equipment according to the resource path; judging whether the equipment identification subscribes to the resource path; and after the resource path is judged to be subscribed, triggering and determining a connection gateway connected with the terminal equipment.
24. The apparatus of claim 23, wherein the subscription query module further comprises:
the authority judgment submodule is used for judging whether the terminal equipment has the issuing authority of the resource path; and after the issuing authority with the resource path is judged, triggering and determining a connection gateway connected with the terminal equipment.
25. The apparatus according to any of claims 22-24, wherein the subscription query module comprises:
and the connection gateway determining submodule is used for inquiring the session information corresponding to the terminal equipment through the equipment session list and determining the address information of the connection gateway connected with the terminal equipment.
26. The apparatus of claim 22,
and the service response module is used for returning the response message to the service server according to the context information of the response message.
27. The apparatus of claim 22, further comprising:
and the subscription module is used for receiving the subscription message and generating a subscription result of the corresponding terminal equipment according to the subscription message.
28. The apparatus of claim 27,
the subscription module is configured to determine a terminal device according to the subscription message, and determine whether the terminal device has a corresponding right, where the right includes: publishing rights and/or subscribing rights; after judging that the terminal equipment has the corresponding authority, generating a subscription result of successful subscription; and after judging that the terminal equipment does not have the corresponding authority, generating a subscription result of failed subscription.
29. A connectivity gateway, comprising:
a processor; and
memory having stored thereon executable code, which when executed, causes the processor to perform the inter-device communication method according to one or more of claims 1-7.
30. One or more machine-readable media having executable code stored thereon that, when executed, causes a processor to perform a method of inter-device communication as recited in one or more of claims 1-7.
31. A message gateway, comprising:
a processor; and
memory having stored thereon executable code, which when executed, causes the processor to perform the inter-device communication method according to one or more of claims 8-14.
32. One or more machine-readable media having executable code stored thereon that, when executed, causes a processor to perform a method of inter-device communication as recited in one or more of claims 8-14.
33. A message synchronization method, comprising:
before sending a request message, adding a message identifier for the request message and recording the message identifier;
after receiving a response message, matching the message identifier added in the response message with the recorded message identifier, and determining a request message synchronous with the response message;
and forwarding the response message of the deleted message identifier to the equipment corresponding to the synchronous request message.
34. The method of claim 33, wherein the message identifier is located in a prefix of a resource path of a message, and wherein the message comprises: a request message and a response message.
35. The method of claim 34, wherein adding a message identifier to the request message and recording the message identifier comprises:
adding a prefix to a resource path of the request message;
acquiring a device identifier from the resource path, and acquiring a message identifier from the prefix;
and forming the equipment identification and the message identification into index information.
36. The method of claim 35, wherein matching the message identifier added to the response message with the recorded message identifier to determine the request message synchronized with the response message comprises:
acquiring equipment identification from the resource path of the response message, and acquiring message identification from the prefix of the resource path;
matching index information by adopting the equipment identifier and the message identifier, and determining the matched index information;
and taking the matched index information corresponding to the affiliated request message as a synchronous request message.
37. The method of claim 34, wherein forwarding the response message with the deleted message identifier to the device corresponding to the synchronized request message comprises:
deleting a prefix of a resource path of the response message;
and sending the response message of deleting the prefix to the equipment corresponding to the synchronous request message.
38. A message synchronization apparatus, comprising:
the identification processing module is used for adding a message identification for the request message and recording the message identification before sending the request message;
the synchronous matching module is used for matching the message identification added in the response message with the recorded message identification after receiving the response message and determining the request message synchronous with the response message;
and the message forwarding module is used for forwarding the response message of the deleted message identifier to the equipment corresponding to the synchronous request message.
39. The apparatus of claim 38, wherein the message identifier is located in a prefix of a resource path of a message, and wherein the message comprises: a request message and a response message.
40. The apparatus of claim 39, wherein the identification processing module comprises:
a prefix adding submodule, configured to add a prefix to the resource path of the request message;
the index generation submodule is used for acquiring equipment identification from the resource path and acquiring message identification from the prefix; and forming the equipment identification and the message identification into index information.
41. The apparatus of claim 40,
the synchronous matching module is used for acquiring equipment identification from the resource path of the response message and acquiring message identification from the prefix of the resource path; matching index information by adopting the equipment identifier and the message identifier, and determining the matched index information; and taking the matched index information corresponding to the affiliated request message as a synchronous request message.
42. The apparatus of claim 39,
the message forwarding module is configured to delete a prefix of the resource path of the response message; and sending the response message of deleting the prefix to the equipment corresponding to the synchronous request message.
43. An electronic device, comprising:
a processor; and
memory having stored thereon executable code which, when executed, causes the processor to perform a message synchronization method as claimed in one or more of claims 33-37.
44. One or more machine-readable media having executable code stored thereon that, when executed, causes a processor to perform a message synchronization method as recited in one or more of claims 33-37.
CN201810083725.XA 2018-01-29 2018-01-29 Method, device, equipment and storage medium for communication between equipment and message synchronization Active CN110099078B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810083725.XA CN110099078B (en) 2018-01-29 2018-01-29 Method, device, equipment and storage medium for communication between equipment and message synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810083725.XA CN110099078B (en) 2018-01-29 2018-01-29 Method, device, equipment and storage medium for communication between equipment and message synchronization

Publications (2)

Publication Number Publication Date
CN110099078A CN110099078A (en) 2019-08-06
CN110099078B true CN110099078B (en) 2022-02-25

Family

ID=67442709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810083725.XA Active CN110099078B (en) 2018-01-29 2018-01-29 Method, device, equipment and storage medium for communication between equipment and message synchronization

Country Status (1)

Country Link
CN (1) CN110099078B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110868348B (en) * 2019-10-17 2022-11-15 深圳绿米联创科技有限公司 Multi-gateway communication method, device and system and electronic equipment
CN111010447A (en) * 2019-12-23 2020-04-14 北京奇艺世纪科技有限公司 Data communication method and device
CN111212085B (en) * 2020-01-16 2022-11-22 厦门网宿有限公司 Method for synchronously calling Internet of things platform, internet of things system and network equipment
CN111800496B (en) * 2020-06-30 2023-05-02 中国平安财产保险股份有限公司 Interface calling method, device, computer equipment and storage medium
CN111917617B (en) * 2020-07-31 2022-03-29 宁波奥克斯电气股份有限公司 Intelligent household electrical appliance control method and device, server and storage medium
CN111683158B (en) * 2020-08-12 2020-11-06 南京天创电子技术有限公司 MQTT protocol communication method for realizing synchronous request response
CN112468536A (en) * 2020-10-30 2021-03-09 华帝股份有限公司 Method and system for controlling intelligent equipment
CN112511636B (en) * 2020-12-04 2022-04-08 中国建设银行股份有限公司 Data transmission system, method, device, computer equipment and storage medium
CN113454969B (en) * 2020-12-31 2023-09-19 商汤国际私人有限公司 Information interaction method, device, equipment, system and storage medium
CN113722121A (en) * 2021-08-09 2021-11-30 青岛鼎信通讯股份有限公司 MQTT protocol-based message receiving and transmitting method for acquisition terminal
CN114338806B (en) * 2022-02-28 2022-06-21 湖南云畅网络科技有限公司 Synchronous message processing method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836723A (en) * 2015-03-31 2015-08-12 青岛海尔智能家电科技有限公司 Communication method based on MQTT topic subscription mechanism and access gateway
CN106101178A (en) * 2016-05-30 2016-11-09 海尔优家智能科技(北京)有限公司 A kind of subscription message distribution, method of reseptance, device and related system
CN106657130A (en) * 2017-01-09 2017-05-10 上海浦东软件园汇智软件发展有限公司 Access authentication method and access authentication equipment based on MQTT
CN107231262A (en) * 2017-06-26 2017-10-03 华南理工大学 A kind of message route method cascaded based on MQTT multilayers

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051543B (en) * 2012-11-01 2015-09-09 广州键智桥网络技术有限公司 A kind of process of route prefix, search, increase and delet method
US9407567B2 (en) * 2012-12-24 2016-08-02 Telefonaktiebolaget Lm Ericsson (Publ) Enabling external access to multiple services on a local server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836723A (en) * 2015-03-31 2015-08-12 青岛海尔智能家电科技有限公司 Communication method based on MQTT topic subscription mechanism and access gateway
CN106101178A (en) * 2016-05-30 2016-11-09 海尔优家智能科技(北京)有限公司 A kind of subscription message distribution, method of reseptance, device and related system
CN106657130A (en) * 2017-01-09 2017-05-10 上海浦东软件园汇智软件发展有限公司 Access authentication method and access authentication equipment based on MQTT
CN107231262A (en) * 2017-06-26 2017-10-03 华南理工大学 A kind of message route method cascaded based on MQTT multilayers

Also Published As

Publication number Publication date
CN110099078A (en) 2019-08-06

Similar Documents

Publication Publication Date Title
CN110099078B (en) Method, device, equipment and storage medium for communication between equipment and message synchronization
US8352931B2 (en) Data push service method and system using data pull model
CN106933550B (en) Global information obtaining, processing and updating method, device and system
CN110247944B (en) Cross-regional service calling method, device and system and electronic equipment
TW200929946A (en) Method, device and system for acquiring resources
CN110365587B (en) Inter-device communication method, device and storage medium
CN107864208B (en) Method for fusing new media information
TW201724825A (en) System and method for acquiring, processing and updating global information
EP3979101A2 (en) Historical data support enhancement for network entities
CN104601724A (en) Method and system for uploading and downloading file
US20160149986A1 (en) Method Of Retrieving Service Capability in Bulk
CN110865985A (en) Data synchronization method and device, electronic equipment and storage medium
KR101954101B1 (en) Method and apparuats for updating personal information
CN105262793B (en) The method and system of audio file in intelligent sound box broadcasting memory
CN105991744B (en) Method and apparatus for synchronizing user application data
KR20230043919A (en) service request processing
US10887249B2 (en) Resource trees by management controller
US10218766B2 (en) Method of service capability notification
CN110677443A (en) Data transmitting and receiving method, transmitting end, receiving end, system and storage medium
CN114143332B (en) Processing method, electronic equipment and medium based on content delivery network CDN
CN113297305A (en) Session state processing method, device, equipment and storage medium
WO2017113302A1 (en) Media service proxy method, device and system thereof
TW202011302A (en) Cabinet management method and apparatus, cabinet device and storage medium
US20150135092A1 (en) Apparatus and method for exchanging data
WO2021031738A1 (en) Location acquisition method and apparatus, hss, udm device and storage medium

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40012133

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant