WO2020063048A1 - Pon网络及其通讯方法,olt,mqtt-sn网关,onu及mqtt服务器 - Google Patents

Pon网络及其通讯方法,olt,mqtt-sn网关,onu及mqtt服务器 Download PDF

Info

Publication number
WO2020063048A1
WO2020063048A1 PCT/CN2019/096217 CN2019096217W WO2020063048A1 WO 2020063048 A1 WO2020063048 A1 WO 2020063048A1 CN 2019096217 W CN2019096217 W CN 2019096217W WO 2020063048 A1 WO2020063048 A1 WO 2020063048A1
Authority
WO
WIPO (PCT)
Prior art keywords
mqtt
onu
message
client
olt
Prior art date
Application number
PCT/CN2019/096217
Other languages
English (en)
French (fr)
Inventor
李晖
黄晓庆
Original Assignee
深圳前海达闼云端智能科技有限公司
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 深圳前海达闼云端智能科技有限公司 filed Critical 深圳前海达闼云端智能科技有限公司
Publication of WO2020063048A1 publication Critical patent/WO2020063048A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/25Arrangements specific to fibre transmission
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/27Arrangements for networking
    • H04B10/272Star-type networks or tree-type networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Definitions

  • the present disclosure relates to the field of communications, and in particular, to a PON network and a communication method thereof, an OLT, an MQTT-SN gateway, an ONU, and an MQTT server.
  • MQTT Message Queuing Telemetry Transport
  • M2M machine-to-machine communication
  • IoT Internet of Things
  • MQTT-SN MQTT For Sensor Networks
  • MQTT-SN Sensor version of MQTT
  • Any network can support MQTT-SN as long as it can provide two-way data transmission service between any node and a specific node (gateway).
  • the main purpose of the present disclosure is to provide a PON network and a communication method thereof, an OLT, an MQTT-SN gateway, an ONU, and an MQTT server, for implementing message transmission between nodes in a PON network through a publish / subscribe message communication mode.
  • a first aspect of the embodiments of the present disclosure provides a PON network, where the PON network includes:
  • the MQTT server and the MQTT-SN gateway work at a data link layer, the OLT is provided with an MQTT-SN client, and the ONU is provided with an MQTT-SN client.
  • the MQTT server is configured to broadcast an ADVERTISE message for the gateway, where the ADVERTISE message includes a client identifier oltClientId of an OLT connected to the MQTT server; and / or,
  • the MQTT server is configured to send a gateway information GWINFO message to the ONU if the gateway query SEARCHGW information sent by the ONU is received, where the GWINFO message includes the client identifier oltClientId of the OLT connected to the MQTT server.
  • the ONU is configured to send a connection CONNECT request to the MQTT server based on the MQTT-SN client, where the CONNECT request includes a client identifier oltClientId of an OLT connected to the ONU, and the ONU ClientId ClientId;
  • the client identifier oltClientId of the OLT includes the slot number and port number of the OLT on the interface board, and the client identifier ClientId of the ONU includes the slot number and port number of the OLT on the interface board. And the number of the ONU under the OLT.
  • the ONU is configured to send a registration REGISTER message to the MQTT server based on the MQTT-SN client, the REGISTER message includes service specification information, and the service specification information is used to register a subject message requesting registration Quantitative description of data service specifications;
  • the MQTT server is configured to, if a REGISTER message is received, configure the data service specifications of the subject message for which registration is requested according to the service specification information, and return a REGACK message for responding to the REGISTER message.
  • the service specification information includes one or more of the following information: specification version information, encryption mode information, distribution mode information, distribution mode information, and bandwidth description information;
  • the specification version information is used to identify a current service specification
  • the encryption mode information is used to specify whether data distribution is encrypted
  • the publishing mode information is used to specify a data transmission mode between the MQTT-SN client and the MQTT server;
  • the distribution mode information is used to specify a data transmission mode between the MQTT server and the subscribed MQTT-SN client;
  • the bandwidth description information is used to specify a fixed bandwidth, a guaranteed bandwidth, and a maximum bandwidth for the topic message release.
  • the REGACK message includes a service flow tag, and the service flow tag is used to classify the subject message requesting registration.
  • the MQTT server is configured to return a return code indicating a reason for the failure to the ONU when the ONU topic message registration fails or the topic message subscription fails or the topic message publication fails.
  • ONUs under the same MQTT server communicate with each other through a client server message communication mode; and / or,
  • the OLT communicates with multiple ONUs in a master-slave message communication mode.
  • a second aspect of the embodiments of the present disclosure provides a communication method for a PON network.
  • the method is applied to the ONU described in the first aspect, and the method includes:
  • the ONU sends a subject registration REGISTER message to the MQTT server based on the MQTT-SN client.
  • the REGISTER message includes service specification information, and the service specification information is used to quantitatively describe the data service specification of the subject requesting registration;
  • the topic is used for the ONU to communicate with a device subscribing to the topic.
  • the service specification information includes one or more of the following information: specification version information, encryption mode information, distribution mode information, distribution mode information, and bandwidth description information;
  • the specification version information is used to identify a current service specification
  • the encryption mode information is used to specify whether data distribution is encrypted
  • the publishing mode information is used to specify a data transmission mode between the MQTT-SN client and the MQTT server;
  • the distribution mode information is used to specify a data transmission mode between the MQTT server and the subscribed MQTT-SN client;
  • the bandwidth description information is used to specify a fixed bandwidth, a guaranteed bandwidth, and a maximum bandwidth for the topic message release.
  • the REGACK message includes a service flow tag, and the service flow tag is used to perform flow classification on a subject for which registration is requested.
  • the method further includes:
  • the ONU sends a connection CONNECT request to the MQTT server based on the MQTT-SN client, and the CONNECT request includes a client identifier oltClientId of an OLT connected to the ONU, and a client identifier ClientId of the ONU;
  • connection confirmation CONNACK message sent by the MQTT server is received, it is confirmed that the ONU and the MQTT server are successfully connected.
  • the method further includes:
  • a consistency check is performed on the description information and a registered topic registered by the ONU locally, where the consistency check indicates that the ONU can publish a topic message to the registered topic.
  • the third aspect of the embodiments of the present disclosure also provides another communication method for a PON network.
  • the method is applied to the MQTT server described in the first aspect.
  • the method includes:
  • Receive the subject registration REGISTER message sent by the ONU configure the data service specifications of the subject requesting registration according to the service specification information in the REGISTER message, and return a REGACK message for responding to the REGISTER message.
  • the REGACK message includes a service flow tag allocated for the subject requested by the ONU to register, and the service flow tag is used to perform flow classification on the subject requested to register.
  • the method further includes:
  • the CONNECT request includes a client identifier oltClientId of an OLT connected to the ONU, and a client identifier ClientId of the ONU;
  • the method further includes:
  • the ONU After successfully connecting to the ONU, the ONU sends description information of the registered topic of the ONU to the ONU.
  • the description information includes a topic identifier, a service flow tag, and a service specification.
  • the description information is used by the ONU to perform Registration subject consistency check.
  • a fourth aspect of the embodiments of the present disclosure provides a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the method described in the second aspect.
  • the fifth aspect of the embodiments of the present disclosure also provides another computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the method described in the third aspect.
  • a sixth aspect of the embodiments of the present disclosure further provides an ONU, where the ONU is provided with an MQTT-SN client, and the ONU includes:
  • a processor configured to execute the computer program in the memory to implement the steps of the method according to the second aspect.
  • a seventh aspect of the embodiments of the present disclosure further provides an MQTT server, including:
  • a processor configured to execute the computer program in the memory to implement the steps of the method according to the third aspect.
  • An eighth aspect of the embodiments of the present disclosure further provides an OLT configured as the OLT in the PON network according to any one of the first aspects.
  • the ninth aspect of the embodiments of the present disclosure also provides an MQTT-SN gateway, which is configured as the MQTT-SN gateway in the PON network according to any one of the first aspects.
  • a tenth aspect of the embodiments of the present disclosure provides a computer program product, the computer program product including a computer program executable by a programmable device, the computer program having a function for executing a first program when executed by the programmable device; The code part of the method described in the second aspect.
  • An eleventh aspect of the embodiments of the present disclosure provides a computer program product, the computer program product comprising a computer program executable by a programmable device, the computer program having a function for executing when executed by the programmable device Code part of the method described in the third aspect.
  • the OLT is provided with the MQTT-SN client
  • the ONU is provided with the MQTT-SN client.
  • Devices equipped with the MQTT-SN client can register topics with the OLT system, publish topic messages, and subscribe to topic messages published by other devices, thereby enabling message transmission between devices through the publish / subscribe message communication mode.
  • the MQTT-SN gateway and the MQTT server work at a data link layer, which can avoid extra processing and transmission overhead working at the IP layer or the network layer.
  • FIG. 1 is a schematic diagram of an existing MQTT-SN system architecture
  • FIG. 2 is a schematic structural diagram of a PON network according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of another PON network according to an embodiment of the present disclosure.
  • FIG. 4 is a network data link layer MQTT-SN system control and management plane architecture diagram illustrating a G-PON network as an example according to an embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of a communication method for a PON network according to an embodiment of the present disclosure
  • FIG. 6 is a schematic flowchart of another communication method for a PON network according to an embodiment of the present disclosure
  • FIG. 7 is a schematic diagram of a connection process between an MQTT-SN client and an MQTT server according to an embodiment of the present disclosure
  • FIG. 8 is a schematic diagram of an MQTT-SN client topic registration and topic subscription process according to an embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram of an ONU according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of an MQTT server according to an embodiment of the present disclosure.
  • the existing MQTT-SN system architecture is shown in Figure 1. It includes three types of MQTT-SN components: MQTT-SN client, MQTT-SN gateway, and MQTT-SN repeater.
  • the MQTT-SN client uses the MQTT-SN protocol to connect itself to the MQTT server through the MQTT-SN gateway.
  • the MQTT-SN gateway can be integrated or not integrated into the MQTT server.
  • the MQTT protocol is used between the MQTT-SN gateway and the MQTT server.
  • the main function of the MQTT-SN gateway is to convert between the MQTT protocol and the MQTT-SN protocol.
  • MQTT runs on the Transmission Control Protocol (TCP) layer
  • MQTT-SN can run on the data link layer
  • UDP User Datagram Protocol, user data
  • An embodiment of the present disclosure provides a PON network, as shown in FIG. 2, including:
  • Sensor version message queue telemetry transmission MQTT server 201 MQTT-SN gateway 202, an optical line terminal (Optical Line Terminal, OLT) 203 connected to the MQTT server through the MQTT-SN gateway 202, and an OLT 203 connected to the OLT 203
  • Optical network unit ONU204 shown in Figure 2 that the OLT and ONU can be connected through an optical splitter;
  • the MQTT-SN gateway 202 and the MQTT server 201 work at a data link layer, the OLT 203 is provided with an MQTT-SN client 2031, and the ONU 204 is provided with an MQTT-SN client 2032.
  • the MQTT server 201 and the MQTT-SN gateway 202 may be integrated together or separately established. In the case of separate establishment, the MQTT protocol is used between the MQTT server 201 and the MQTT-SN gateway 202. It is worth noting that the interaction between the MQTT server and the ONU described in this article can be understood as being forwarded through the MQTT-SN gateway.
  • the OLT system of the PON network usually includes multiple OLTs, and each OLT is connected to multiple ONUs through an optical splitter.
  • an OLT is provided with a set of MQTT servers and MQTT-SN gateways.
  • Figure 2 shows an OLT system in which the MQTT server and the OLT correspond one-to-one.
  • one MQTT server may be connected to multiple OLTs.
  • all OLTs in the system are connected to the same MQTT server, that is, another PON network shown in FIG. 3.
  • the architecture of the PON network shown in FIG. 2 is such that each OLT and all ONUs under the OLT form their own MQTT-SN system, and the MQTT-SN systems of different OLTs are independent of each other.
  • Each OLT has its own independent MQTT server with integrated MQTT-SN gateway function (MQTT-SN gateway and MQTT server can also be set up separately). All ONUs under each OLT can communicate with each other using the PON network message bus. However, ONUs under different OLTs cannot use this communication mechanism to communicate.
  • the architecture of the PON network shown in FIG. 3 is a full-system (cross-OLT) MQTT-SN system formed by all ONUs under all OLTs in the entire system.
  • the whole system has only one MQTT server with integrated MQTT-SN gateway function, or a set of separately set up MQTT-SN gateways and MQTT servers. All ONUs under all OLTs in the system can communicate with each other using the PON network message bus.
  • the PON network provided by the embodiment of the present disclosure is adopted.
  • the PON network is combined with the MQTT-SN system architecture, and an MQTT server and an MQTT-SN gateway are set together in an OLT system.
  • the OLT is provided with an MQTT-SN client, and the ONU is set.
  • devices equipped with the MQTT-SN client can register topics with the OLT system, publish topic messages, and subscribe to topic messages published by other devices, so as to realize the communication mode of publish / subscribe messages between devices. Perform message transfer.
  • the MQTT server works at the data link layer, which can avoid extra processing and transmission overheads of working at the IP layer or the network layer.
  • the following describes in detail the functions of the PON network using the MQTT-SN architecture to establish a connection, register a topic, publish a topic message, and subscribe to a topic in combination with the above-mentioned PON network.
  • the subject message data service specification (ServiceSpec) information is defined to quantitatively describe the service specification of the subject message data.
  • the service specification information includes one or more of the following information: specification version information, encryption mode information, distribution mode information, distribution mode information, and bandwidth description information;
  • the specification version information is used to identify a current service specification
  • the encryption mode information is used to specify whether data distribution is encrypted
  • the publishing mode information is used to specify a data transmission mode between the MQTT-SN client and the MQTT server;
  • the distribution mode information is used to specify a data transmission mode between the MQTT server and the subscribed MQTT-SN client;
  • the bandwidth description information is used to specify a fixed bandwidth, a guaranteed bandwidth, and a maximum bandwidth for the topic message release.
  • Version is the specification version information
  • DISTRIBUTION Encryption is the encryption mode information
  • PUBLISH Mode is the release mode information
  • DISTRIBUTION Mode is the distribution mode information
  • Fixed Bandwidth is the fixed bandwidth
  • Assured Bandwidth is the guaranteed bandwidth
  • Maximum Bandwidth is the maximum bandwidth .
  • the relationship between the fixed bandwidth, the guaranteed bandwidth, and the maximum bandwidth can be referred to the corresponding description in the G-PON technical specification ITU-TG.984.3 standard.
  • table 2 is an illustration of the specification version information Version in the service specification information:
  • the version number is included, and the bit carrying the version information indicates the specific number, and the corresponding version description information.
  • the following table 3 is the encryption mode information in the service specification information.
  • DISTRIBUTION refers to the transmission path from the MQTT-SN gateway to the subscribed MQTT-SN client, which is suitable for unicast and multicast.
  • the following table 4 is a schematic representation of the release mode information PUBLISH Mode in the service specification information:
  • the following table 5 is a schematic of the distribution mode information DISTRIBUTION Mode in the service specification information:
  • DISTRIBUTION Mode Bit 5 Bit 4 Description 0 0 0 MQTT-SN gateway to subscribing MQTT-SN client to this section of transmission path, using shared (unicast) 1 0 1 The MQTT-SN gateway to the subscribed MQTT-SN client to this section of the transmission path, using a dedicated (unicast) 2 1 0 The MQTT-SN gateway to the subscribed MQTT-SN client to this section of the transmission path, using shared (multicast) 3 1 1 1 The MQTT-SN gateway to the subscribed MQTT-SN client to this section of the transmission path, using dedicated (multicast) multicast
  • the ONU 204 is configured to send a registration REGISTER message to the MQTT server based on the MQTT-SN client, where the REGISTER message includes service specification information and the service specification The information is used to quantitatively describe the data service specifications of the subject message requesting registration;
  • the MQTT server 201 is configured to, if a REGISTER message is received, configure the data service specification of the subject message requesting registration according to the service specification information, and return a REGACK message for responding to the REGISTER message.
  • the embodiment of the present disclosure defines the data channel (end-to-end) segment of the subject message release as:
  • PUBLISH data channel refers to the uplink transmission path from the MQTT-SN client of the ONU that publishes the subject message to the MQTT server. It can only be unicast, not encrypted, and can choose to share or exclusively unicast;
  • DISTRIBUTION data channel refers to the downstream transmission path from the MQTT server to the MQTT-SN client of the subscribed ONU, which can be unicast and multicast, can be encrypted, can be shared or dedicated unicast, or can be selected Shared or dedicated multicast.
  • the above service specification information is used to configure the release data channel and the distribution data channel. That is, the MQTT server can configure the data channel of the publication and subscription process of the subject message requesting registration according to the specific service specification information.
  • FIG 4 shows the architecture of the control and management plane of the MQTT-SN system at the data link layer of the G-PON network as an example.
  • the G- The PON message bus layer implements an MQTT-SN client and an MQTT server with integrated MQTT-SN gateway functions.
  • OMCI configuration model in ITU-TG.988, such as Layer 2 N: MP Bridge-map-filtering, multicastservice and other configurations handle unicast, multicast, and GEMport (G-PON Encapsulation Mode port (G-PON encapsulation mode port) channel encryption and other services are directly applicable to G-PON network systems.
  • Layer 2 N MP Bridge-map-filtering, multicastservice and other configurations handle unicast, multicast, and GEMport (G-PON Encapsulation Mode port (G-PON encapsulation mode port) channel encryption and other services are directly applicable to G-PON network systems.
  • GEMport G-PON Encapsulation Mode port
  • AnnexCOMCIinEthernetPONSystems in ITU-TG.984.3 can also be used, so that the method provided by the embodiments of the present disclosure is applicable to EPON network systems.
  • the embodiment of the present disclosure can specifically isolate the transmission channel of the MQTT-SN control message from the transmission channel of the subject message data release to ensure the reliability of the transmission of the MQTT-SN control message, that is, That said, the topic release message is transmitted by the data channel, and all other MQTT-SN control messages are transmitted by the control channel.
  • the MQTT-SN control message transmission method may be:
  • the OLT allocates a dedicated GEM Port and T-CONT (Transmission Container) as a control channel for each MQTT-SN client running on the ONU, and is used to transmit control messages running the MQTT server to the ONU client.
  • GEM Ports must be mapped into T-CONT, which is uplinked by the OLT through DBA (Dynamic Bandwidth Allocation) scheduling.
  • T-CONT is the uplink traffic scheduling unit of the DBA, that is, the service container.
  • the T-CONT type can be Type2, which guarantees the bandwidth, and the size of the guaranteed bandwidth can depend on the specific application. It depends.
  • Topic release messaging can be:
  • the MQTT server When the MQTT server processes the topic registration message issued by the MQTT-SN client of the ONU, it can use the bandwidth description information in the service specification information and the existing multicast, GEMport and T-CONT usage of the published ONU, and the existing OLT With the remaining multicast, GEMport and T-CONT cases, determine how to allocate and use multicast, GEMport and T-CONT.
  • the MQTT server can use OMCI and PLOAM to perform corresponding dynamic configuration on the OLT and ONU, and will dynamically adjust the DBA allocation of the OLT accordingly.
  • the MQTT server when the MQTT server processes the topic subscription of the ONTT's MQTT-SN client to subscribe to the SUBSCRIBE message, it can use the bandwidth description information in the service specification information provided by the ONU that publishes the topic message and the existing multicast of the subscribed ONU.
  • the MQTT server can use OMCI and PLOAM to perform corresponding dynamic configuration on the OLT and the subscribed ONU.
  • the present disclosure defines a subject message data service flow tag (Service Flow Tag).
  • the service flow tag of the subject message data may be GEM port-ID, carried in the inner VLAN ID field of the Ethernet frame, that is, the GEM port ID is used as the service flow tag.
  • the MQTT server after receiving the REGISTER message sent by the ONU, the MQTT server includes a service flow token allocated by the MQTT server to the subject requesting registration, and the REGACK message returned to the ONU in response to the REGISTER message includes the service.
  • the flow tag is used to classify the subject message for which registration is requested, and messages issued by the ONU to the subject later carry the service flow tag.
  • the embodiment of the present disclosure further defines a return code ReturnCode, and each return code is used to characterize an error s reason.
  • Table 7 is a schematic of ReturnCode:
  • the specification version information in the service specification information is wrong 0x11 Error in mode encryption information in service specification information 0x12 Error in publishing mode information in service specification information 0x13 Error in distribution mode information in service specification information 0x14 Error in bandwidth description information in service specification information 0x20 Insufficient GEM port resources 0x21 Insufficient T-CONT resources 0x22 Insufficient multicast resources 0x23 Insufficient fixed bandwidth 0x24 Insufficient guaranteed bandwidth 0x25 Insufficient maximum bandwidth
  • the embodiment of the present disclosure may also define the client flag OltClientId of the OLT and give The corresponding value suggestions make it easier to name the ONU's client identifier ClientId and the subject message, so as to facilitate the addressing and retrieval of the subject message of the MQTT-SN client of the ONU.
  • the following method can be used to map the objects of the MQTT-SN to the G-PON network.
  • the MQTT-SN client running on the OLT is marked with "slot / port", where slot is the slot where the OLT interface board is located, and port port is the port of the OLT on the interface board, for example, the OLT interface board is inserted in the slot In 2, the port of the OLT on the interface board is 1, then the identifier of the MQTT-SN client running on the OLT is "2/1"; the MQTT-SN client running on the ONU is marked with "slot / port / onu" Among them, the slot and port are the slot and port where the OLT interface board connected to the ONU is located.
  • Onu is the ONU number bound by this ONU.
  • the ONU number bound by this ONU is 18, and the socket where the OLT interface board connected to the ONU is located. Slot and port are 2 and 1, respectively, then the identity of this MQTT-SN client is "2/1/18".
  • MQTT-SN client # 1/1 in the OLT shown in FIG. 2 and FIG. 3, it indicates that the MQTT-SN client slot is 1, the port is 1, and the identifier of the MQTT-SN client is 1. / 1, the number of the ONU connected to the OLT is "1/1/1" to "1/1 / N".
  • the “MQTT-SN client # 1/2” shown in FIG. 2 and FIG. 3 indicates that the identifier of the MQTT-SN client in the OLT is 1/2, and the identifier of the ONU connected to the OLT is “ 1/2/1 "to" 1/2 / N ".
  • the ONU 204 can be used to send a connection CONNECT request to the MQTT server based on the MQTT-SN client, where the CONNECT request includes a client identifier oltClientId of the OLT connected to the ONU, and a client identifier of the ONU ClientId, where the client identifier of the OLT, oltClientId, includes the slot number and port number of the OLT on the interface board, and the client identifier of the ONU, ClientId, includes the slot number of the OLT on the interface board , The port number, and the number of the ONU under the OLT.
  • the MQTT server addresses the MQTT-SN clients in the OLT and ONU.
  • the embodiments of the present disclosure can expand the definition of optional message fields (called It is an extended message format) to implement the above service specification information and service flow tags.
  • Table 8 is the definition of the extended message format:
  • the definition of the extended message format follows the definition of the existing basic message format.
  • the length in the message header is the full length of the message, including the message header itself, the Message Variable Part-Baseline. Message Variable Part-Extended.
  • Table 9 is a definition of the optional message fields of the extended variable message part in the extended message format, wherein, according to the specific message, zero or more different optional message fields may be superimposed in the extended variable message part.
  • Extended Field Preamble (Byte n + 1: n + 2)
  • Extended Field (Byte n + 3: n + m)
  • n + m Extended Field Preamble
  • each Extended Field has a specific leading identifier
  • each ExtendedField has a specific leading identifier.
  • the leading identifier of the service specification information ServiceSpec is "$$"
  • the leading identifier of the service flow tag ServiceFlowTag is "@@”.
  • the optional message field Extended Field shown in Table 9 may carry service specification information or a service flow tag.
  • the embodiment of the present disclosure can further expand the definition of the topic registration REGISTER message with an extended message format, where the extended topic registration message is superimposed on the basic topic registration message Service specification information, Table 10 and Table 11 are two types of extension topic registration messages:
  • ServiceFlowTagPreamble (Byte n + 9: n + 10) ServiceFlowTag (Byte (n + 11: n + 12) Optional, leading identifier of the following Service Flow Tag, fixed pattern "@@” Optional.
  • the ServiceTag used when the client topic message data PUBLISH is assigned by the MQTT-SN gateway. In the specific implementation, it is the GEM port-ID, which is placed in the inner VLAN ID field of the Ethernet frame.
  • the embodiments of the present disclosure may also use the extended message format to extend the definition of the subject registration confirmation REGACK message.
  • the extended topic registration confirmation message superimposes the service specification information of the extended topic message data and the service flow tag of the topic message data on the basic topic registration confirmation message, as shown in Table 12:
  • the embodiment of the present disclosure can also extend the definition of the gateway advertisement ADVERTISE message with the extended message format.
  • the extended gateway advertisement message superimposes the client identifier of the extended OLT on the basic gateway advertisement message.
  • the client identities of multiple OLTs can be superimposed together to list the client identities of all OLTs in the entire system (for the system shown in Figure 3).
  • the client identifier of the first OLT is the OLT directly connected to the ONU.
  • the client of the ONU can form its own client identity based on the client of the OLT.
  • the extended gateway advertisement message is shown in Table 13 below:
  • OltClientId (Byte 0) MsgType (Byte 1) GwId (Byte 2) Duration (Byte 3: 4) OltClientIdPreamble (Byte 5: 6) OltClientId (Byte 7: n) Full length including optional extended definitions Zh Zh Zh Optional, is the leading identifier of OltClientId, fixed pattern "##" Optional, OltClientId. Multiple OltClientIds can be added together to list all OltClientIds in the system. The first OltClientId is the OLT directly connected to the ONU.
  • the embodiment of the present disclosure may also extend the definition of the gateway information GWINFO message with an extended message format.
  • the extended gateway information message superimposes the client identifier OltClientId of the extended OLT on the basic gateway information message.
  • the client identities of multiple OLTs can be superimposed together to list the client identities of all OLTs in the entire system (for the system shown in Figure 3).
  • the client identifier of the first OLT is the OLT directly connected to the ONU.
  • the client of the ONU can form its own client identity based on the client of the OLT.
  • the extended gateway information message is shown in Table 14 below:
  • OltClientId (Byte 0) MsgType (Byte 1) GwId (Byte 2) GwAdd (Byte 3: n) OltClientIdPreamble (Byte n + 1: n + 2) OltClientId (Byte n + 3: n + m) Full length including optional extended definitions Zh Zh Zh Optional, is the leading identifier of OltClientId, fixed pattern "##" Optional, OltClientId. Multiple OltClientIds can be added together to list all OltClientIds in the system. The first OltClientId is the OLT directly connected to the ONU.
  • the MQTT server 201 is configured to broadcast an ADVERTISE message for the gateway, and the ADVERTISE message includes a client identifier oltClientId of the OLT 203 connected to the MQTT server 201; and / or, the MQTT server 201 is configured to, if After receiving the gateway query SEARCHGW information sent by the ONU, it sends a gateway information GWINFO message to the ONU 204, where the GWINFO message includes the client identifier oltClientId of the OLT 203 connected to the MQTT server 201.
  • the parsing method of the extended message format can also refer to the existing parsing method, and determine each data field in the message according to the message length and MsgType in the message header , And by locating each data domain in turn for analysis, this disclosure will not go into details.
  • ONUs under the same MQTT server can communicate through the client server message communication mode; and / or, the OLT and multiple ONUs communicate through Master-slave message communication mode for communication.
  • a most basic client server mode message header is defined in a message payload payload of a published message, including a message sequence number CSMsgId.
  • the front of the message load is the most basic client-server mode message header, including the message sequence number.
  • the server parses the message load, constructs the message returned by the client, and places the sequence number of the received message in the first message sequence number of the returned message load, and publishes the return message to the topic specific to this client.
  • the client parses the message load and completes the client server message communication according to the message sequence number corresponding to the previous request.
  • the master node For the confirmed master / slave Master / Slave message communication, you can fully refer to the implementation method that supports the Client / Server message communication mode of the client server, with the master node as the client and the slave node as the server.
  • the master node For unconfirmed master-slave message communication, the master node can publish a special topic, and all allowed slave nodes subscribe to this topic. The master node communicates with all slave nodes by publishing messages on this topic.
  • An embodiment of the present disclosure further provides a communication method for a PON network.
  • the method can be applied to, for example, the ONU 204 in the PON network provided in FIG. 2 or FIG. 3. As shown in FIG. 5, the method includes:
  • the ONU sends a subject registration REGISTER message to the MQTT server based on the MQTT-SN client.
  • the REGISTER message includes service specification information, and the service specification information is used to quantitatively describe the data service specification of the subject requesting registration;
  • the service specification information includes one or more of the following information: specification version information, encryption mode information, distribution mode information, distribution mode information, and bandwidth description information;
  • the specification version information is used to identify a current service specification
  • the encryption mode information is used to specify whether data distribution is encrypted
  • the publishing mode information is used to specify a data transmission mode between the MQTT-SN client and the MQTT server;
  • the distribution mode information is used to specify a data transmission mode between the MQTT server and the subscribed MQTT-SN client;
  • the bandwidth description information is used to specify a fixed bandwidth, a guaranteed bandwidth, and a maximum bandwidth for the topic message release.
  • the REGACK message includes a service flow tag, and the service flow tag is used to perform flow classification on a subject for which registration is requested.
  • the method further includes:
  • the ONU sends a connection CONNECT request to the MQTT server based on the MQTT-SN client, and the CONNECT request includes a client identifier oltClientId of an OLT connected to the ONU, and a client identifier ClientId of the ONU;
  • connection confirmation CONNACK message sent by the MQTT server is received, it is confirmed that the ONU and the MQTT server are successfully connected.
  • the method further includes:
  • a consistency check is performed on the description information and a registered topic registered by the ONU locally, where the consistency check indicates that the ONU can publish a topic message to the registered topic.
  • the embodiments of the present disclosure also define the extended MQTT-SN client topic registration process:
  • the topic registration process has been extended.
  • This method extends the definition of the topic registration message, and adds optional service specification information.
  • the service specification information is identified by the ServiceSpecPreamble fixed pattern "$$" as a preamble, and an optional service flow tag is added. $ "As the recognition leader.
  • the MQTT-SN client When the MQTT-SN client performs subject registration with the MQTT server, the MQTT-SN client can use the service specification information extended in the subject registration message to provide a description of the subject message data service specification, and the MQTT server allocates the corresponding according to the service specification Service flow label and PON network bandwidth resources, and use the PON network control and management mode to configure accordingly. If the MQTT-SN client does not provide a description of the subject message data service specifications, the MQTT server assigns and configures the subject according to the default configuration, for example, placing the subject into the control management GEM port.
  • the MQTT server will return the service flow token used in the topic message data publication PUBLISH to the client through the service flow token extended in the topic registration confirmation message REGACK.
  • the MQTT server will return the reason for the registration failure through the return code of the topic registration confirmation message REGACK.
  • ReturnCode refer to Table 7 above.
  • an ONU device provided with an MQTT-SN client can register a topic with an MQTT server in the OLT system, publish a topic message, and subscribe to a topic message published by other devices, so as to implement a communication mode of publish / subscribe messages between devices Perform message transfer.
  • An embodiment of the present disclosure also provides another communication method for a PON network.
  • the method may be applied to, for example, the MQTT-SN server 201 in the PON network provided in FIG. 2 or FIG. 3. As shown in FIG. 6, the method includes:
  • the REGACK message includes a service flow tag allocated for the subject requested by the ONU to register, and the service flow tag is used to perform flow classification on the subject requested to register.
  • the method further includes: the MQTT server broadcasts a gateway advertisement ADVERTISE message, the ADVERTISE message includes a client identifier oltClientId of the OLT connected to the MQTT server; and / or, the MQTT server receives a gateway query SEARCHGW sent by the ONU Information, a gateway information GWINFO message is sent to the ONU, and the GWINFO message includes the client identifier oltClientId of the OLT connected to the MQTT server.
  • the method further includes:
  • the CONNECT request includes a client identifier oltClientId of an OLT connected to the ONU, and a client identifier ClientId of the ONU;
  • the method further includes:
  • the ONU After successfully connecting to the ONU, the ONU sends description information of the registered topic of the ONU to the ONU.
  • the description information includes a topic identifier, a service flow tag, and a service specification.
  • the description information is used by the ONU to perform Registration subject consistency check.
  • an ONU device provided with an MQTT-SN client can register a topic with an MQTT server in the OLT system, publish a topic message, and subscribe to a topic message published by other devices, so as to implement a communication mode of publish / subscribe messages between devices. Perform message transfer.
  • Figure 7 provides a detailed process of establishing a connection between the MQTT server and the MQTT-SN client in the ONU device, including:
  • the MQTT server sends a gateway advertisement message.
  • the gateway advertisement ADVERTISE message includes the gateway ID and the client identifier oltClientId of the MQTT-SN client in the OLT connected to the MQTT server.
  • the ONU that receives the gateway advertisement message can generate its own client ID ClientId according to the client ID of the MQTT-SN client in the OLT. For example, if the client ID of the OLT is "1/2", the ONU client The identifier can be "1/2/3", and initiates a connection request to the MQTT server.
  • the ONU sends a connection request to the MQTT server.
  • connection request CONNECT includes a client identifier ClientId of the ONU.
  • the ONU may also actively send a gateway to query the SEARCHGW information to the MQTT server, and initiate a connection request after receiving the gateway information GWINFO message returned by the MQTT server, where the GWINFO message includes a connection to the MQTT-SN server.
  • the client ID of the OLT is oltClientId.
  • the MQTT server returns a connection confirmation to the ONU.
  • the MQTT server sends the related information of the registered topic of the ONU to the ONU through the topic registration message.
  • the related information may include a subject identifier of a registered subject, service specification information, and a service flow tag.
  • step S705 After the ONU successfully performs the consistency check on the registered topic, the ONU notifies the MQTT server of the topic registration confirmation, that is, step S705 is performed.
  • the ONU returns a topic registration confirmation to the MQTT server.
  • the MQTT server may send the related information of each topic in turn to the ONU for consistency verification through a registration request message.
  • the MQTT server may send the related information of each topic in turn to the ONU for consistency verification through a registration request message.
  • FIG. 7 only one registered topic is used as an example.
  • the G-PON system there is an ONU client 1/2/2 and a camera, which needs to transmit 1280 x 720 H.264 video stream. Assume that the number of frames is 24 frames per second and the motion coefficient is 2.
  • the topic message data service specification for this video stream can be clearly defined Service Spec. Assuming the system allows video stream to drop frames, use MQTT-SN QoS level 0. In this case, the ONU client 1/2/3 subscribes to this video stream, and the method for the ONU client 1/2/2 to register and publish the topic message is shown in Figure 8, including:
  • the ONU client 1/2/2 (the ONU including the MQTT-SN client 1/2/2 as shown in the figure) sends a topic registration message to the MQTT-SN server.
  • the MQTT-SN server returns the subject registration confirmation to the ONU client 1/2/2.
  • the ONU client 1/2/2 sends a topic message release to the MQTT-SN server.
  • the ONU client 1/2/3 (the ONU including the MQTT-SN client 1/2/3 shown in the figure) sends a topic subscription message to the MQTT-SN server.
  • the MQTT-SN server returns the topic subscription confirmation to the ONU client 1/2/3.
  • the subject message issued by the ONU client 1/2/2 is transmitted to the ONU client 1/2/3 via the MQTT-SN server.
  • topic message registration and publication are performed through the ONU client 1/2/2, and the ONU client 1/2/3 performs subscription and reception to realize ONU client 1/2/2 and ONU client 1/2 / 3 communication.
  • An embodiment of the present disclosure further provides an ONU, where the ONU is provided with an MQTT-SN client, and the ONU includes:
  • a processor configured to execute the computer program in the memory to implement the steps of the PON network communication method on the ONU side provided by the foregoing method embodiment.
  • FIG. 9 is a schematic structural diagram of the ONU.
  • the ONU 900 may include a processor 901 and a memory 902.
  • the electronic device 900 may further include one or more of a sensor component 903, an input / output (I / O) interface 904, and a communication component 905.
  • the processor 901 is configured to control the overall operation of the ONU 900 to complete the steps of the PON network communication method on the ONU side provided by the foregoing method embodiments.
  • the memory 902 is configured to store various types of data to support the operation on the ONU900. These data may include, for example, instructions for any application program or method for operating on the ONU900, and application-related data, such as an OLT customer End identification, etc.
  • the memory 902 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory ( Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory Programmable Read-Only Memory (referred to as EPROM), Programmable Read-Only Memory (referred to as PROM), Read-Only Memory (Read-Only Memory (referred to as ROM)), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM Static Random Access Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory Programmable Read-Only Memory
  • PROM Programmable Read-Only Memory
  • ROM Read-Only Memory
  • magnetic memory flash memory
  • flash memory magnetic disk or optical disk.
  • the sensor component 903 may include a mechanical sensor, a tactile sensor, a proximity sensor, a visual sensor, a thermal sensor, and the like, and details are not described herein.
  • the communication component 905 is used for wired or wireless communication between the ONU 900 and other devices.
  • An embodiment of the present disclosure further provides a computer-readable storage medium including program instructions, and the program instructions, when executed by a processor, implement the steps of the PON network communication method on the ONU side provided by the foregoing method embodiments.
  • the computer-readable storage medium may be the foregoing memory 902 including program instructions, and the foregoing program instructions may be executed by the processor 901 of the ONU 900 to complete the steps of the PON network communication method on the ONU side provided by the foregoing method embodiments.
  • An embodiment of the present disclosure further provides an MQTT server, including:
  • a processor configured to execute the computer program in the memory to implement the steps of the PON network communication method on the MQTT server side provided by the foregoing method embodiment.
  • the MQTT server 100 may include a processing component 1001, a memory 1002, a camera 1003, a lidar 1004, an actuator 1005, an input / output (I / O) interface 1006, and a communication component 1007.
  • the processing component 1001 may include one or more processors 1000 to execute instructions to complete all or part of the steps of the PON network communication method on the MQTT server side.
  • the memory 1002 is configured to store various types of data to support operation at the MQTT server 1000. Examples of such data include instructions for any application or method operating on the MQTT server 1000.
  • the memory 1002 may be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), Programming read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM Programming read-only memory
  • PROM programmable read-only memory
  • ROM read-only memory
  • magnetic memory flash memory
  • flash memory magnetic disk or optical disk.
  • the actuator 1005 can be various robot actuators, including servo motors, hydraulic actuators, and the like.
  • the I / O interface 1006 provides an interface between the processing component 1001 and a peripheral interface module.
  • the communication component 1007 is configured to facilitate wired or wireless communication between the MQTT server 100 and other devices. Such as WiFi, 4G or 5G, or a combination of them.
  • An embodiment of the present disclosure further provides a computer-readable storage medium including program instructions, and the program instructions, when executed by a processor, implement the steps of the PON network communication method on the MQTT server side provided by the foregoing method embodiments.
  • the computer-readable storage medium may be the foregoing memory 1002 including program instructions, and the foregoing program instructions may be executed by the processing component 1001 of the MQTT server 100 to complete the PON network communication method on the MQTT server side provided by the foregoing method embodiments.
  • An embodiment of the present disclosure further provides an OLT, which is configured as an OLT in any of the PON networks provided in the foregoing embodiments, and is configured to perform all operations related to the OLT in the PON network.
  • OLT which is configured as an OLT in any of the PON networks provided in the foregoing embodiments, and is configured to perform all operations related to the OLT in the PON network.
  • An embodiment of the present disclosure also provides an MQTT-SN gateway, which is configured as an MQTT-SN gateway in any of the PON networks provided in the above embodiments, and the MQTT-SN gateway is an independent device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Computing Systems (AREA)
  • Small-Scale Networks (AREA)
  • Information Transfer Between Computers (AREA)
  • Communication Control (AREA)

Abstract

本公开涉及一种PON网络及其通讯方法,OLT,MQTT-SN网关,ONU及MQTT服务器,用于在PON网络中实现节点之间通过发布/订阅消息通讯模式进行消息传输。所述PON网络包括:传感器版本的消息队列遥测传输MQTT服务器,MQTT-SN网关,通过所述MQTT-SN网关与所述MQTT服务器相连的光线路终端OLT,与所述OLT相连的光网络单元ONU;其中,所述MQTT服务器和所述MQTT-SN网关工作在数据链路层所述OLT设置有MQTT-SN客户端,所述ONU设置有MQTT-SN客户端。

Description

PON网络及其通讯方法,OLT,MQTT-SN网关,ONU及MQTT服务器 技术领域
本公开涉及通信领域,具体地,涉及一种PON网络及其通讯方法,OLT,MQTT-SN网关,ONU及MQTT服务器。
背景技术
消息总线和发布/订阅消息通讯模式在现代系统设计中的应用越来越广泛。消息队列遥测传输(Message Queuing Telemetry Transport,MQTT)是一个基于代理的支持发布/订阅消息通讯模式的消息传输协议。它的设计思想是轻巧、开放、简单、规范,易于实现。这些特点使得它对很多场景来说都是很好的选择,特别是对于受限的环境,如机器与机器的通信(MachinetoMachine,M2M),物联网环境(Internet of things,IoT)以及机器人系统内部通信。
传感器版本的MQTT(MQTT For Sensor Networks,MQTT-SN)是在MQTT基础上专门针对各种低成本的电池驱动设备以及传感器的一个优化设计。MQTT-SN对底层网络服务没有严格要求。任何网络只要能在任何节点和特定节点(网关)之间提供双向数据传输服务就能够支持MQTT-SN。
相关技术中,对于PON网络,还没有通过部署MQTT-SN进行ONU节点间通讯的方案。
发明内容
本公开的主要目的是提供一种PON网络及其通讯方法,OLT,MQTT-SN网关,ONU及MQTT服务器,用于在PON网络中实现节点之间通过发布/订阅消息通讯模式进行消息传输。
为了实现上述目的,本公开实施例第一方面提供一种PON网络,所述PON网络包括:
传感器版本的消息队列遥测传输MQTT服务器,MQTT-SN网关,通过所述MQTT-SN网关与所述MQTT服务器相连的光线路终端OLT,与所述OLT相连的光网络单元ONU;
其中,所述MQTT服务器和所述MQTT-SN网关工作在数据链路层,所述OLT设置有MQTT-SN客户端,所述ONU设置有MQTT-SN客户端。
可选地,所述MQTT服务器用于,广播网关广告ADVERTISE消息,所述ADVERTISE消息包括与所述MQTT服务器相连的OLT的客户端标识oltClientId;和/或,
所述MQTT服务器用于,若接收到ONU发送的网关查询SEARCHGW信息,则向所述ONU发送网关信息GWINFO消息,所述GWINFO消息包括与所述MQTT服务器相连的OLT的客户端标识oltClientId。
可选地,所述ONU用于,基于所述MQTT-SN客户端向所述MQTT服务器发送连接CONNECT请求,所述CONNECT请求包括与所述ONU连接的OLT的客户端标识oltClientId,以及所述ONU的客户端标识ClientId;
其中,所述OLT的客户端标识oltClientId包括所述OLT在接口板上的插槽编号以及端口编号,所述ONU的客户端标识ClientId包括所述OLT在接口板上的插槽编号,端口编号,以及所述ONU的在所述OLT下的编号。
可选地,所述ONU用于,基于所述MQTT-SN客户端向所述MQTT服务器发送注册REGISTER消息,所述REGISTER消息包括服务规格信息,所述服务规格信息用于对请求注册的主题消息的数据服务规格进行定量描述;
所述MQTT服务器用于,若接收到REGISTER消息,根据所述服务规格信息对请求注册的主题消息的数据服务规格进行配置,并返回用于响应所述REGISTER消息的REGACK消息。
可选地,所述服务规格信息包括以下信息中的一者或多者:规格版本信息,加密模式信息,发布模式信息,分发模式信息,带宽描述信息;
其中,所述规格版本信息用于标识当前的服务规格;
所述加密模式信息用于指定数据的分发是否加密;
所述发布模式信息用于指定MQTT-SN客户端到MQTT服务器之间数据传输模式;
所述分发模式信息用于指定MQTT服务器到订阅的MQTT-SN客户端之间的数据传输方式;
所述带宽描述信息用于指定主题消息发布的固定带宽,保证带宽,以及最大带宽。
可选地,所述REGACK消息包括服务流标记,所述服务流标记用于对请求注册的主题消息进行流分类。
可选地,所述MQTT服务器用于,在ONU主题消息注册失败或者主题消息订阅失败或者主题消息发布失败时,向所述ONU返回指示失败原因的代码ReturnCode。
可选地,同一MQTT服务器下的ONU之间通过客户服务器消息通讯模式进行通讯;和/或,
所述OLT与多个ONU之间通过主从消息通讯模式进行通讯。
本公开实施例第二方面提供一种PON网络的通讯方法,所述方法应用于第一方面中所述的ONU,所述方法包括:
ONU基于MQTT-SN客户端向MQTT服务器发送主题注册REGISTER消息,所述REGISTER消息包括服务规格信息,所述服务规格信息用于对请求注册的主题的数据服务规格进行定量描述;
若接收到所述MQTT服务器发送的用于响应所述REGISTER消息的REGACK消息,则确认主题注册成功;
所述主题用于所述ONU与订阅所述主题的设备进行通讯。
可选地,所述服务规格信息包括以下信息中的一者或多者:规格版本信息,加密模式信息,发布模式信息,分发模式信息,带宽描述信息;
其中,所述规格版本信息用于标识当前的服务规格;
所述加密模式信息用于指定数据的分发是否加密;
所述发布模式信息用于指定MQTT-SN客户端到MQTT服务器之间数据传输模式;
所述分发模式信息用于指定MQTT服务器到订阅的MQTT-SN客户端之间的数据传输方式;
所述带宽描述信息用于指定主题消息发布的固定带宽,保证带宽,以及最大带宽。
可选地,所述REGACK消息包括服务流标记,所述服务流标记用于对请求注册的主题进行流分类。
可选地,所述方法还包括:
所述ONU基于MQTT-SN客户端向MQTT服务器发送连接CONNECT请求,所述CONNECT请求包括与所述ONU连接的OLT的客户端标识oltClientId,以及所述ONU的客户端标识ClientId;
若接收到所述MQTT服务器发送的连接确认CONNACK消息,则确认所述ONU与所述MQTT服务器连接成功。
可选地,在所述ONU与所述MQTT服务器连接成功后,所述方法还包括:
所述ONU接收所述MQTT服务器发送的所述ONU已注册主题的描述信息,所述描述信息包括主题标识,服务流标记以及服务规格;
对所述描述信息与所述ONU本地记录的已注册主题进行一致性校验,其中,所述一致性校验成功表明所述ONU可对所述已注册主题发布主题消息。
本公开实施例第三方面还提供另一种PON网络的通讯方法,所述方法应用于第一方面所述的MQTT服务器,所述方法包括:
接收ONU发送的主题注册REGISTER消息,根据所述REGISTER消息中的服务规格信息对请求注册的主题的数据服务规格进行配置,并返回用于响应所述REGISTER消息的REGACK消息。
可选地,所述REGACK消息包括为所述ONU请求注册的主题分配的服务流标记,所述服务流标记用于对请求注册的主题进行流分类。
可选地,所述方法还包括:
接收ONU发送连接的CONNECT请求,所述CONNECT请求包括与所述ONU连接的OLT的客户端标识oltClientId,以及所述ONU的客户端标识ClientId;
向所述ONU发送连接确认CONNACK消息,用于指示所述ONU与所述MQTT服务器连接成功。
可选地,所述方法还包括:
在与所述ONU连接成功后,向所述ONU发送所述ONU已注册主题的描述信息,所述描述信息包括主题标识,服务流标记以及服务规格,所述描述信息用于所述ONU进行已注册主题的一致性校验。
本公开实施例第四方面提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现第二方面所述方法的步骤。
本公开实施例第五方面还提供另一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现第三方面所述方法的步骤。
本公开实施例第六方面还提供一种ONU,所述ONU设置有MQTT-SN客户端,所述ONU包括:
存储器,其上存储有计算机程序;
处理器,用于执行所述存储器中的所述计算机程序,以实现第二方面所述方法的步骤。
本公开实施例第七方面还提供一种MQTT服务器,包括:
存储器,其上存储有计算机程序;
处理器,用于执行所述存储器中的所述计算机程序,以实现第三方面所述方法的步骤。
本公开实施例第八方面还提供一种OLT,所述OLT被配置为第一方面任一项所述的PON网络中的OLT。
本公开实施例第九方面还提供一种MQTT-SN网关,所述MQTT-SN网关被配置为第一方面任一项所述的PON网络中的MQTT-SN网关。
本公开实施例第十方面提供一种计算机程序产品,所述计算机程序产品包含能够由可编程的装置执行的计算机程序,所述计算机程序具有当由所述可编程的装置执行时用于执行第二方面所述方法的代码部分。
本公开实施例第十一方面提供一种计算机程序产品,所述计算机程序产品包含能够由可编程的装置执行的计算机程序,所述计算机程序具有当由所述可编程的装置执行时用于执行第三方面所述方法的代码部分。
采用上述技术方案,至少能够达到如下技术效果:
将MQTT-SN系统架构与PON网络架构相结合,将MQTT服务器,MQTT-SN网关一起设置在OLT系统中,OLT设置有MQTT-SN客户端,所述ONU设置有MQTT-SN客户端,这样,设置有MQTT-SN客户端的设备就可以向OLT系统注册主题,发布主题消息,以及订阅其他设备发布的主题消息,从而实现设备之间通过发布/订阅消息通讯模式进行消息传输。并且,所述MQTT-SN网关和MQTT服务器工作在数据链路层,可以避免工作在IP层或网络层的额外处理和传送开销。
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。
附图说明
附图是用来提供对本公开的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本公开,但并不构成对本公开的限制。在附图中:
图1是现有MQTT-SN系统架构的一种示意图;
图2是本公开实施例提供的一种PON网络的结构示意图;
图3是本公开实施例提供的另一种PON网络的结构示意图;
图4是本公开实施例提供的一种以G-PON网络为例示出的网络数据链路层MQTT-SN系统控制管理平面架构图;
图5是本公开实施例提供一种PON网络的通讯方法的流程示意图;
图6是本公开实施例提供另一种PON网络的通讯方法的流程示意图;
图7是本公开实施例提供的一种MQTT-SN客户端与MQTT服务器的连接过程的示意图;
图8是本公开实施例提供的一种MQTT-SN客户端主题注册以及主题订阅过程的示意图;
图9是本公开实施例提供的一种ONU的结构示意图;
图10是本公开实施例提供的一种MQTT服务器的结构示意图。
具体实施方式
以下结合附图对本公开的具体实施方式进行详细说明。应当理解的是,此处所描述的具体实施方式仅用于说明和解释本公开,并不用于限制本公开。
为了使本领域技术人员能够更加容易理解本公开实施例提供的技术方案,首选对本公开实施例涉及到的相关技术进行简单介绍。
现有MQTT-SN系统架构如图1所示,包括三种MQTT-SN组件:MQTT-SN客户端,MQTT-SN网关和MQTT-SN转发器。MQTT-SN客户端使用MQTT-SN协议通过MQTT-SN网关将自身连接到MQTT服务器。MQTT-SN网关可以集成或不集成到MQTT服务器中。在独立网关的情况下,MQTT-SN网关和MQTT服务器之间使用MQTT协议。MQTT-SN网关的主要功能是在MQTT协议和MQTT-SN协议之间进行转换。其中,MQTT运行在TCP(Transmission Control Protocol,传输控制协议)层之上,MQTT-SN可以运行在数据链路层,IP(Internet Protocol Address,网际协议地址)层和UDP(User Datagram Protocol,用户数据报协议)之上。
本公开实施例提供一种PON网络,如图2所示,包括:
传感器版本的消息队列遥测传输MQTT服务器201,MQTT-SN网关202,通过所述MQTT-SN网关202与所述MQTT服务器相连的光线路终端(Optical Line Terminal,OLT)203,与所述OLT203相连的光网络单元ONU204(图2中示出了OLT与ONU之间可以通过光分路器相连);
其中,所述MQTT-SN网关202和MQTT服务器201工作在数据链路层,所述OLT203设置有MQTT-SN客户端2031,所述ONU204设置有MQTT-SN客户端2032。
值得说明的是,在具体实施时,MQTT服务器201和MQTT-SN网关202可以集成在一起,也可以分开设立。在分开设立的情况下,MQTT服务器201和MQTT-SN网关202之间使用MQTT协议。值得说明的是,本文中所描述的MQTT服务器与ONU之间的交互均可以理解为是通过MQTT-SN网关转发的。
另外,其中,PON网络的OLT系统通常包括多个OLT,每一OLT通过光分路器与多个ONU相连,本公开实施例中MQTT服务器与OLT之间可以是一一对应的关系,也就是说,一个OLT对应设置有一组MQTT服务器和MQTT-SN网关,图2即是以MQTT服务器与OLT一一对应示意的OLT系统。可选地,在具体实施时,也可以是一个MQTT服务器连接多个OLT,例如,系统中的所有OLT均与同一个MQTT服务器相连,即图3所示的另一种PON网络。
具体地,图2所示的PON网络的架构是让每一个OLT与该OLT下的所有ONU形成自己的MQTT-SN系统,并且不同OLT的MQTT-SN系统互相独立。每一个OLT有自己独立的集成有MQTT-SN网关功能的MQTT服务器(MQTT-SN网关和MQTT服务器也可以分开设立)。每一个OLT下的所有ONU可以利用PON网络消息总线互相通讯。但不同OLT下的ONU之间不能利用这个通讯机制进行通讯。
图3所示的PON网络的架构是全系统所有OLT下的所有ONU形成一个的全系统(跨OLT)的MQTT-SN系统。全系统只有一个集成有MQTT-SN网关功能的MQTT服务器,或者一组分开设立的MQTT-SN网关以及MQTT服务器。全系统所有OLT下的所有ONU都可以利用PON网络消息总线互相通讯。
图2和图3所示的系统架构只是一种可能的实现方式,在具体实施时,根据系统的具体应用和隔离等需求可以混合使用两种方式,组合出混合形态的PON网络MQTT-SN系统架构。
采用本公开实施例提供的PON网络,该PON网络与MQTT-SN系统架构相结合,将MQTT服务器,MQTT-SN网关一起设置在OLT系统中,OLT设置有MQTT-SN客户端,所述ONU设置有MQTT-SN客户端,这样,设置有MQTT-SN客户端的设备就可以向OLT系统注册主题,发布主题消息,以及订阅其他设备发布的主题消息,从而实现设备之间通过发布/订阅消息通讯模式进行消息传输。并且,所述MQTT服务器工作在数据链路层,可以避免工作在IP层或网络层的额外处理和传送开销。
下面结合上述PON网络详细说明该PON网络使用MQTT-SN架构建立连接,注册主题,发布主题消息,订阅主题等功能。
首先,为了准确地描述主题消息数据的服务规格,以便更好地利用PON网络的QoS(Quality of Service,服务质量)传送特性来传送主题消息数据,本公开实施例在一种可能的实现方式中定义了主题消息数据服务规格(ServiceSpec)信息,以对主题消息数据的服务规格进行定量描述。
可选地,所述服务规格信息包括以下信息中的一者或多者:规格版本信息,加密模式信息,发布模式信息,分发模式信息,带宽描述信息;
其中,所述规格版本信息用于标识当前的服务规格;
所述加密模式信息用于指定数据的分发是否加密;
所述发布模式信息用于指定MQTT-SN客户端到MQTT服务器之间数据传输模式;
所述分发模式信息用于指定MQTT服务器到订阅的MQTT-SN客户端之间的数据传输方式;
所述带宽描述信息用于指定主题消息发布的固定带宽,保证带宽,以及最大带宽。
示例地,下表1是服务规格信息ServiceSpec的一种示意:
Figure dest_path_image001
表1
如表1所示,Version为规格版本信息,DISTRIBUTION Encryption为加密模式信息,PUBLISH Mode为发布模式信息,DISTRIBUTION Mode为分发模式信息,Fixed Bandwidth为固定带宽,Assured Bandwidth为保证带宽,Maximum Bandwidth为最大带宽。在具体实施时,固定带宽,保证带宽以及最大带宽三者之间的关系可以参照G-PON技术规范ITU-TG.984.3标准中对应的描述。
具体地,下表2是服务规格信息中的规格版本信息Version的一种示意:
Version Bit 7 Bit 6 Description
0 0 0 Experimental
1 0 1 Reserved
2 1 0 Reserved
3 1 1 Reserved
表2
如表2所示,包括了版本的编号,以及携带版本信息的比特位上表示具体编号的值,以及对应的版本描述信息。
下表3是服务规格信息中的加密模式信息DISTRIBUTION Encryption的一种示意:
DISTRIBUTION Encryption Bit 0 Description
0 0 MQTT-SN网关到订阅的MQTT-SN客户端这一段传送路径不加密
1 1 MQTT-SN网关到订阅的MQTT-SN客户端这一段传送路径加密
表3
如表3所示,携带加密模式信息的比特位的值为0时,表示MQTT-SN网关到订阅的MQTT-SN客户端到这一段传送路径不加密,适合MQTT-SN网关到ONU和OLT上的MQTT-SN客户端。携带加密模式信息的比特位的值为1时,表示MQTT-SN网关到订阅的MQTT-SN客户端到这一段传送路径加密,适合MQTT-SN网关到ONU上的MQTT-SN客户端。其中,DISTRIBUTION即是指从MQTT-SN网关到订阅的MQTT-SN客户端到这一段传送路径,适合于单播(unicast)和组播(multicast)。
下表4是服务规格信息中的发布模式信息PUBLISH Mode的一种示意:
PUBLISH Mode Bit 7 Bit 6 Description
0 0 0 MQTT-SN客户端到MQTT-SN网关这一段传送路径,用共享(shared)单播(unicast)
1 0 1 MQTT-SN客户端到MQTT-SN网关这一段传送路径,用专一(dedicated)单播(unicast)
2 1 0 Reserved
3 1 1 Reserved
表4
如表4所示,携带加密模式信息的比特位的值为00时,表示MQTT-SN客户端到MQTT-SN网关这一段传送路径,用共享(shared)单播(unicast)传输数据,适合ONU和OLT上的MQTT-SN客户端。携带加密模式信息的比特位的值为01时,表示MQTT-SN客户端到MQTT-SN网关这一段传送路径,用专一(dedicated)单播(unicast)传输数据,适合ONU和OLT上的MQTT-SN客户端。其中,PUBLISH在这里特指从MQTT-SN客户端到MQTT-SN网关这一段传送路径,只能单播(unicast)。
下表5是服务规格信息中的分发模式信息DISTRIBUTION Mode的一种示意:
DISTRIBUTION Mode Bit 5 Bit 4 Description
0 0 0 MQTT-SN网关到订阅的MQTT-SN客户端到这一段传送路径,用共享(shared)单播(unicast)
1 0 1 MQTT-SN网关到订阅的MQTT-SN客户端到这一段传送路径,用专一(dedicated)单播(unicast)
2 1 0 MQTT-SN网关到订阅的MQTT-SN客户端到这一段传送路径,用共享(shared)组播(multicast)
3 1 1 MQTT-SN网关到订阅的MQTT-SN客户端到这一段传送路径,用专一(dedicated)组播(multicast)
表5
如表5所示,携带分发模式信息的比特位的值为00时,表示MQTT-SN网关到订阅的MQTT-SN客户端这一段传送路径用共享(shared)单播(unicast),适合ONU和OLT上的MQTT-SN客户端;携带分发模式信息的比特位的值为01时,表示MQTT-SN网关到订阅的MQTT-SN客户端到这一段传送路径,用专一(dedicated)单播(unicast),适合ONU和OLT上的MQTT-SN客户端;携带分发模式信息的比特位的值为10时,表示MQTT-SN网关到订阅的MQTT-SN客户端到这一段传送路径,用共享(shared)组播(multicast),适合ONU和OLT上的MQTT-SN客户端;携带分发模式信息的比特位的值为11时,表示MQTT-SN网关到订阅的MQTT-SN客户端到这一段传送路径,用专一(dedicated)组播(multicast),适合ONU和OLT上的MQTT-SN客户端。其中,DISTRIBUTION在这里特指从MQTT-SN网关到订阅的MQTT-SN客户端这一段传送路径,可以单播(unicast)和组播(multicast)。
这样,根据本公开实施例提供的服务规格信息,所述ONU204用于,基于所述MQTT-SN客户端向所述MQTT服务器发送注册REGISTER消息,所述REGISTER消息包括服务规格信息,所述服务规格信息用于对请求注册的主题消息的数据服务规格进行定量描述;
相应地,所述MQTT服务器201用于,若接收到REGISTER消息,根据所述服务规格信息对请求注册的主题消息的数据服务规格进行配置,并返回用于响应所述REGISTER消息的REGACK消息。
也就是说,根据PON网络的QoS传送特性,本公开实施例将主题消息发布的数据通道(端到端)分段定义为:
发布(PUBLISH)数据通道:指从发布主题消息的ONU的MQTT-SN客户端到MQTT服务器这一段的上行传送路径,只能单播,不加密,可以选择共享或者专一单播;
分发(DISTRIBUTION)数据通道:指从MQTT服务器到订阅的ONU的MQTT-SN客户端这一段的下行传送路径,可以单播和组播,可以加密,可以选择共享或者专一单播,或者可以选择共享或者专一组播。
上述服务规格信息即是用于对发布数据通道和分发数据通道进行配置。也就是说,MQTT服务器根据具体的服务规格信息,可以对请求注册的主题消息的发布以及订阅过程的数据通道进行配置。
图4是以G-PON网络为例示出的网络数据链路层MQTT-SN系统控制管理平面架构图,如图4所示,在G-PON网络OLT的控制管理平面GTC层之上,G-PON消息总线层实现了MQTT-SN客户端,集成MQTT-SN网关功能的MQTT服务器。
具体地,利用ITU-TG.988中的OMCI配置模型,例如Layer 2 N:MP bridge-map-filtering,multicastservice等配置处理单播,组播,和GEMport(G-PON Encapsulation Mode port,G-PON封装模式端口)通道加密等各种业务,直接适用于G-PON网络系统。上述只是举例说明,在具体实施时,也可以利用ITU-TG.984.3中AnnexCOMCIinEthernetPONSystems的定义,使得本公开实施例提供的方法适用于EPON网络系统。
基于图4所示的G-PON网络,本公开实施例具体可以将MQTT-SN控制消息的传送通道和主题消息数据发布的传送通道隔离,以确保MQTT-SN控制消息的传送可靠性,也就是说,主题发布消息由数据通道传送,所有其它MQTT-SN控制消息由控制通道传送。
具体地,MQTT-SN控制消息传送方式可以为:
OLT为每一个运行在ONU的MQTT-SN客户端分配一个专用GEM Port和T-CONT(TransmissionContainer,传输载体)作为控制通道,用来传送运行MQTT服务器到ONU客户端的控制消息。其中,所有的GEM Port都要映射到T-CONT中,由OLT通过DBA(Dynamic Bandwidth Allocation,动态带宽分配)调度的方式上行,T-CONT是DBA的上行流量调度单位,即业务容器。例如,参照现有G-PON网络的五种T-CONT类型,本公开实施例中针对MQTT-SN控制消息的传送,T-CONT类型可以为Type2,保证带宽,保证带宽的大小可因具体应用而定。
主题发布消息传送方式可以为:
MQTT服务器在处理发布ONU的MQTT-SN客户端的主题注册消息时,可以根据服务规格信息中的带宽描述信息,以及该发布ONU现有的组播,GEMport和T-CONT的使用情况,OLT现有和剩余组播,GEMport和T-CONT的情况,确定如何分配和使用组播,GEMport和T-CONT。MQTT服务器可以利用OMCI和PLOAM在OLT和ONU上进行相应的动态配置,并会相应地动态调整OLT的DBA分配。
同理,MQTT服务器在处理ONU的MQTT-SN客户端的主题订阅SUBSCRIBE消息时,可以根据发布主题消息的ONU提供的服务规格信息中的带宽描述信息,以及订阅的ONU现有的组播,GEMport的使用情况,OLT现有和剩余组播,GEMport的情况,确定如何分配和使用组播,GEMport。MQTT服务器可以利用OMCI和PLOAM在OLT和订阅的ONU上进行相应的动态配置。
可选地,如果ONU上的MQTT-SN客户端发起的主题注册消息没有携带服务规格信息,MQTT服务器可以根据缺省的服务规格信息(例如可以为最大带宽=256kbps,发布模式=共享单播,分发模式=共享组播,分发加密模式=不加密)进行处理。
可选地,为了准确地对主题消息数据进行流分类和传送,以便更好地利用PON网络的QoS传送特性来传送主题消息数据,本公开定义了主题消息数据服务流标记(Service Flow Tag)。
下表6是服务流标记的一种示意:
ServiceFlowTag Values ServiceFlowTag Description
0-4095 对主题消息数据进行流分类,以便更好地利用PON网络的QoS传送特性来传送主题消息数据 MQTT服务器分配的客户端发布主题消息数据时使用的服务流标记
表6
如表6所示,在具体实现时,主题消息数据的服务流标记可以是GEM port-ID,携带在Ethernet帧的inner VLAN ID域中,即用GEM port的ID作为服务流标记。
也就是说,MQTT服务器在接收到ONU发送的REGISTER消息后,向所述ONU返回的用于响应所述REGISTER消息的REGACK消息中包括MQTT服务器为请求注册的主题分配的服务流标记,所述服务流标记用于对请求注册的主题消息进行流分类,ONU在之后向该主题发布的消息均携带所述服务流标记。
可选地,为了准确地描述主题消息注册,主题消息订阅,主题消息发布时可能出现的错误和故障,本公开实施例还扩展定义了返回代码ReturnCode,每一种返回代码用于表征一种错误的原因。
表7是ReturnCode的一种示意:
ReturnCode Value Meaning
0x10 服务规格信息中的规格版本信息出错
0x11 服务规格信息中的模式加密信息出错
0x12 服务规格信息中的发布模式信息出错
0x13 服务规格信息中的分发模式信息出错
0x14 服务规格信息中的带宽描述信息出错
0x20 GEM port资源不足
0x21 T-CONT资源不足
0x22 组播资源不足
0x23 固定带宽不足
0x24 保证带宽不足
0x25 最大带宽不足
表7
可选地,为了便于ONU的MQTT-SN客户端以OLT的MQTT-SN客户端标识为前缀组织ONU客户端的标识ClientId,本公开实施例还可以对OLT的客户端标志OltClientId进行定义,并给出相应取值建议,使得简化ONU的客户端标志ClientId和主题消息的命名,以便于对ONU的MQTT-SN客户端的寻址和主题消息的检索。
示例地,如图4所示,在MQTT服务器中,可以采用如下的方法把MQTT-SN的对象映射到G-PON网络里。运行在OLT的MQTT-SN客户端用“slot/port”进行标志,其中插槽slot是OLT接口板所在的插槽,端口port是OLT在接口板上的端口,例如OLT接口板插在插槽2中,OLT在接口板上的端口是1,则运行在OLT的MQTT-SN客户端的标识是“2/1”;运行在ONU的MQTT-SN客户端用“slot/port/onu”进行标志,其中插槽和端口是连接ONU的OLT接口板所在的插槽和端口,onu是这个ONU绑定的ONU编号,例如这个ONU绑定的ONU 编号是18,连接ONU的OLT接口板所在的插槽,端口分别是2和1,则这个MQTT-SN客户端的标识是“2/1/18”。参照图2和图3中所示的OLT中的“MQTT-SN客户端 # 1/1”,即表明MQTT-SN客户端插槽为1,端口为1,该MQTT-SN客户端的标识为1/1,与该OLT连接的ONU的编号即为“1/1/1”至“1/1/N”。同理,图2和图3中所示的“MQTT-SN客户端 # 1/2”,即表明OLT中的MQTT-SN客户端的标识为1/2,该OLT连接的ONU的标识分别为“1/2/1”至“1/2/N”。
这样,ONU204即可用于基于所述MQTT-SN客户端向所述MQTT服务器发送连接CONNECT请求,所述CONNECT请求包括与所述ONU连接的OLT的客户端标识oltClientId,以及所述ONU的客户端标识ClientId,其中,其中,所述OLT的客户端标识oltClientId包括所述OLT在接口板上的插槽编号以及端口编号,所述ONU的客户端标识ClientId包括所述OLT在接口板上的插槽编号,端口编号,以及所述ONU的在所述OLT下的编号。实现MQTT服务器对OLT和ONU中的MQTT-SN客户端的寻址。
本公开实施例在现有MQTT-SN协议定义的消息格式(称之为基本消息格式)的基础上,在兼容MQTT-SN基本消息格式的前提下,还可以扩展可选项消息域的定义(称之为扩展消息格式),以实现上述服务规格信息以及服务流标记。
表8是扩展消息格式的定义:
Message Header (2 or 4 octets) Message Variable Part – Baseline (n octets) Message Variable Part – Extended (m octets)
表8
如表8所示,扩展消息格式的定义遵循现有基本消息格式的定义,消息头中的长度是消息的全部长度,包括消息头本身Message Header,基本可变消息部分Message Variable Part-Baseline,扩展可变消息部分Message Variable Part-Extended。
表9是扩展消息格式中的扩展可变消息部分的可选消息域的定义,其中,根据具体消息的不同,零个到多个不同的可选消息域可以叠加在扩展可变消息部分中。
Extended Field Preamble (Byte n+1:n+2) Extended Field (Byte n+3:n+m)
可选项,是后面ExtendedField的前导识别符,每一个Extended  Field有特定的前导识别符 可选项,主题消息数据的ExtendedField
表9
其中,每一个ExtendedField都有特定的前导识别符。例如,服务规格信息ServiceSpec的前导识别符是“$$”,服务流标记ServiceFlowTag的前导识别符是“@@”。表9中所示的可选消息域Extended Field可以携带服务规格信息或者是服务流标记。
这样,针对本公开实施例提供的服务规格信息,本公开实施例可以用扩展消息格式进一步扩展定义主题注册REGISTER消息,其中,扩展主题注册消息在基本主题注册消息上叠加了扩展的主题消息数据的服务规格信息,表10和表11是扩展主题注册消息两种示意:
Length (Byte 0) MsgType (Byte 1) TopicId (Byte 2:3) MsgId (Byte 4:5) TopicName (Byte 6:n) ServiceSpecPreamble (Byte n+1:n+2) ServiceSpec (Byte n+3:n+8)
全部长度包括扩展定义的可选项   固定0x0     可选项,是后面服务规格信息的前导识别符,固定模式“$$” 可选项,定义主题消息数据的服务规格信息,如果不存在,则将本主题放入控制管理GEM port
表10
Length (Byte 0) MsgType (Byte 1) TopicId (Byte 2:3) MsgId (Byte 4:5) TopicName (Byte 6:n) ServiceSpecPreamble (Byte n+1:n+2) ServiceSpec (Byte n+3:n+8)
全部长度包括扩展定义的可选项   MQTT-SN网关分配的TopicId     可选项,是后面ServiceSpec的前导识别符,固定模式“$$” 可选项,定义主题消息数据的ServiceSpec,如果不存在,则将本主题放入控制管理GEM port
ServiceFlowTagPreamble (Byte n+9:n+10) ServiceFlowTag (Byte n+11:n+12)
可选项,是后面Service Flow Tag的前导识别符,固定模式“@@” 可选项,MQTT-SN网关分配的客户端主题消息数据PUBLISH时使用的ServiceTag,在具体实现中它是GEM port-ID,放在Ethernet帧的inner VLAN ID域中
表11
进一步地,本公开实施例还可以用扩展消息格式扩展定义主题注册确认REGACK消息。其中,扩展主题注册确认消息在基本主题注册确认消息上叠加了扩展的主题消息数据的服务规格信息和主题消息数据的服务流标记,如表12所示:
Length (Byte 0) MsgType (Byte 1) TopicId (Byte 2:3) MsgId (Byte 4:5) ReturnCode (Byte 6) ServiceTagPreamble (Byte 7:8) ServiceFlowTag (Byte 9:10)
全部长度包括扩展定义的可选项   MQTT-SN网关分配的TopicId     可选项,是后面服务流标记的前导识别符,固定模式“@@” 可选项,MQTT-SN网关分配的客户端发布主题消息数据时使用的服务流标记
表12
本公开实施例还可以用扩展消息格式扩展定义网关广告ADVERTISE消息。扩展网关广告消息在基本网关广告消息上叠加了扩展的OLT的客户端标识。可把多个OLT的客户端标识叠加在一起,以列出全系统里所有的OLT的客户端标识(针对图3所示的系统)。第一个OLT的客户端标识是直接连接ONU的OLT。ONU的客户端可以根据OLT的客户端构成自己的客户端标识。示例地,扩展网关广告消息如下表13所示:
Length (Byte 0) MsgType (Byte 1) GwId (Byte 2) Duration (Byte 3:4) OltClientIdPreamble (Byte 5:6) OltClientId (Byte 7:n)
全部长度包括扩展定义的可选项       可选项,是后面OltClientId的前导识别符,固定模式“##” 可选项,OltClientId, 可把多个OltClientId叠加在一起,以列出系统里所有的OltClientId,第一个OltClientId是直接连接ONU的OLT
表13
本公开实施例还可以用扩展消息格式扩展定义网关信息GWINFO消息。其中,扩展网关信息消息在基本网关信息消息上叠加了扩展的OLT的客户端标识OltClientId。可把多个OLT的客户端标识叠加在一起,以列出全系统里所有的OLT的客户端标识(针对图3所示的系统)。第一个OLT的客户端标识是直接连接ONU的OLT。ONU的客户端可以根据OLT的客户端构成自己的客户端标识。示例地,扩展网关信息消息如下表14所示:
Length (Byte 0) MsgType (Byte 1) GwId (Byte 2) GwAdd (Byte 3:n) OltClientIdPreamble (Byte n+1:n+2) OltClientId (Byte n+3:n+m)
全部长度包括扩展定义的可选项       可选项,是后面OltClientId的前导识别符,固定模式“##” 可选项,OltClientId, 可把多个OltClientId叠加在一起,以列出系统里所有的OltClientId,第一个OltClientId是直接连接ONU的OLT
表14
其中,针对OLT内MQTT-SN系统架构(如图2所示),ADVERTISE消息和GWINFO消息中只需第一个OLT的OltClientId,而对于全系统(跨OLT)MQTT-SN系统架构(如图3所示),ADVERTISE消息和GWINFO消息中需列出全部所有OLT的OltClientId。
具体地,所述MQTT服务器201用于,广播网关广告ADVERTISE消息,所述ADVERTISE消息包括与所述MQTT服务器201相连的OLT203的客户端标识oltClientId;和/或,所述MQTT服务器201用于,若接收到ONU发送的网关查询SEARCHGW信息,则向所述ONU204发送网关信息GWINFO消息,所述GWINFO消息包括与所述MQTT服务器201相连的OLT203的客户端标识oltClientId。
此外,由于扩展消息格式的定义遵循现有基本消息格式的定义,因此,对于扩展消息格式的解析方法也可以参照现有解析方法,根据消息头中的消息长度以及MsgType确定消息中的各个数据域,并通过依次定位每一数据域进行解析,本公开对此不做赘述。
基于本公开实施例提供的PON网络,以及扩展定义的消息格式,可以实现同一MQTT服务器下的ONU之间通过客户服务器消息通讯模式进行通讯;和/或,所述OLT与多个ONU之间通过主从消息通讯模式进行通讯。
例如,让任何两个需要进行客户服务器Client/Server消息通讯的节点分别发布一个只允许对方订阅的主题。进一步地,在发布的消息的消息负荷payload中定义一个最基本的客户服务器模式消息头,包括消息序号CSMsgId。这样,当客户向服务器发出请求时,客户发布消息到专门针对服务器的主题中,消息负荷的最前面是最基本的客户服务器模式消息头,包括消息序号。服务器收到这个主题消息后,解析消息负荷,构建返回客户请求的消息,并把收到的消息序号放在返回的消息负荷的最前面的消息序号,发布返回消息到专门针对这个客户的主题中。客户收到这个返回的主题消息后,解析消息负荷,根据消息序号与之前的请求对应,完成一次客户服务器消息通讯。
而对于有证实的的主从Master/Slave消息通讯,可以完全参照上述的支持客户服务器Client/Server消息通讯模式的实现方法,主节点作为客户,从节点作为服务器。对于无证实的的主从消息通讯,则可以让主节点发布一个专门的主题,所有允许参加的从节点都订阅这个主题,主节点通过发布这个主题的消息实现对所有从节点通讯。
本公开实施例还提供一种PON网络的通讯方法,所述方法例如可以应用于图2或图3提供的PON网络中的ONU204,如图5所示,所述方法包括:
S501、ONU基于MQTT-SN客户端向MQTT服务器发送主题注册REGISTER消息,所述REGISTER消息包括服务规格信息,所述服务规格信息用于对请求注册的主题的数据服务规格进行定量描述;
S502、若接收到所述MQTT服务器发送的用于响应所述REGISTER消息的REGACK消息,则确认主题注册成功,其中,所述主题用于所述ONU与订阅所述主题的设备进行通讯。
可选地,所述服务规格信息包括以下信息中的一者或多者:规格版本信息,加密模式信息,发布模式信息,分发模式信息,带宽描述信息;
其中,所述规格版本信息用于标识当前的服务规格;
所述加密模式信息用于指定数据的分发是否加密;
所述发布模式信息用于指定MQTT-SN客户端到MQTT服务器之间数据传输模式;
所述分发模式信息用于指定MQTT服务器到订阅的MQTT-SN客户端之间的数据传输方式;
所述带宽描述信息用于指定主题消息发布的固定带宽,保证带宽,以及最大带宽。
可选地,所述REGACK消息包括服务流标记,所述服务流标记用于对请求注册的主题进行流分类。
可选地,所述方法还包括:
所述ONU基于MQTT-SN客户端向MQTT服务器发送连接CONNECT请求,所述CONNECT请求包括与所述ONU连接的OLT的客户端标识oltClientId,以及所述ONU的客户端标识ClientId;
若接收到所述MQTT服务器发送的连接确认CONNACK消息,则确认所述ONU与所述MQTT服务器连接成功。
可选地,在所述ONU与所述MQTT服务器连接成功后,所述方法还包括:
所述ONU接收所述MQTT服务器发送的所述ONU已注册主题的描述信息,所述描述信息包括主题标识,服务流标记以及服务规格;
对所述描述信息与所述ONU本地记录的已注册主题进行一致性校验,其中,所述一致性校验成功表明所述ONU可对所述已注册主题发布主题消息。
其中,REGISTER消息,REGACK消息的具体格式已经在系统实施例中详细说明,基于扩展的REGISTER消息以及REGACK消息,本公开实施例也定义扩展的MQTT-SN客户端主题注册过程:
在遵循MQTT-SN定义的标准主题注册过程的前提下,对主题注册过程进行了扩展。本方法扩展定义了主题注册消息,增加了可选的服务规格信息,该服务规格信息由ServiceSpecPreamble固定模式“$$”作为识别前导,还增加了可选的服务流标记,由ServiceTagPreamble固定模式“$$”作为识别前导。
在MQTT-SN客户端向MQTT服务器进行主题注册时,MQTT-SN客户端可以利用在主题注册消息中扩展定义的服务规格信息提供对主题消息数据服务规格的描述,由MQTT服务器根据服务规格分配相应的服务流标记和PON网络带宽资源,并利用PON网络的控制管理方式进行相应的配置。如果MQTT-SN客户端不提供对主题消息数据服务规格的描述,则由MQTT服务器根据缺省配置进行分配和配置,例如,将主题放入控制管理GEM port。
如果主题注册成功,MQTT服务器会通过主题注册证实消息REGACK中扩展定义的服务流标记返回给客户端进行主题消息数据发布PUBLISH时使用的服务流标记。
如果因为资源不够或其它原因无法进行主题注册,MQTT服务器会通过主题注册证实消息REGACK的ReturnCode返回注册失败的原因。该ReturnCode具体可以参照上述表7。
采用上述方法,设置有MQTT-SN客户端的ONU设备就可以向OLT系统中的MQTT服务器注册主题,发布主题消息,以及订阅其他设备发布的主题消息,从而实现设备之间通过发布/订阅消息通讯模式进行消息传输。
关于上述实施例中的方法,其中各个步骤的也已经在系统实施例中进行了详细描述,此处将不做详细阐述说明。
本公开实施例还提供另一种PON网络的通讯方法,所述方法例如可以应用于图2或图3提供的PON网络中的MQTT-SN服务器201,如图6所示,所述方法包括:
S601、接收ONU发送的主题注册REGISTER消息;
S602、根据所述REGISTER消息中的服务规格信息对请求注册的主题的数据服务规格进行配置;
S603、返回用于响应所述REGISTER消息的REGACK消息。
可选地,所述REGACK消息包括为所述ONU请求注册的主题分配的服务流标记,所述服务流标记用于对请求注册的主题进行流分类。
可选地,所述方法还包括:MQTT服务器广播网关广告ADVERTISE消息,所述ADVERTISE消息包括与所述MQTT服务器相连的OLT的客户端标识oltClientId;和/或,MQTT服务器接收ONU发送的网关查询SEARCHGW信息,则向所述ONU发送网关信息GWINFO消息,所述GWINFO消息包括与所述MQTT服务器相连的OLT的客户端标识oltClientId。
可选地,所述方法还包括:
接收ONU发送连接的CONNECT请求,所述CONNECT请求包括与所述ONU连接的OLT的客户端标识oltClientId,以及所述ONU的客户端标识ClientId;
向所述ONU发送连接确认CONNACK消息,用于指示所述ONU与所述MQTT服务器连接成功。
可选地,所述方法还包括:
在与所述ONU连接成功后,向所述ONU发送所述ONU已注册主题的描述信息,所述描述信息包括主题标识,服务流标记以及服务规格,所述描述信息用于所述ONU进行已注册主题的一致性校验。
采用上述方法,设置有MQTT-SN客户端的ONU设备就可以向OLT系统中的MQTT服务器注册主题,发布主题消息,以及订阅其他设备发布的主题消息,从而实现设备之间通过发布/订阅消息通讯模式进行消息传输。
REGISTER消息,REGACK消息,ADVERTISE消息以及GWINFO消息的具体格式已经在系统实施例中详细说明,关于上述实施例中的方法,其中各个步骤的也已经在系统实施例中进行了详细描述,此处将不做详细阐述说明。
以图4为例,图7提供了MQTT服务器与ONU设备中的MQTT-SN客户端建立连接的一种详细过程,包括:
S701、MQTT服务器发送网关广告消息。
其中,所述网关广告ADVERTISE消息包括网关ID,以及该MQTT服务器连接的OLT中的MQTT-SN客户端的客户端标识oltClientId。
其中,接收到该网关广告消息的ONU可以根据OLT中的MQTT-SN客户端的客户端标识生成自身的客户端标识ClientId,例如,OLT的客户端标识为“1/2”,则ONU的客户端标识可以为“1/2/3”,并向该MQTT服务器发起连接请求。
S702、ONU向MQTT服务器发送连接请求。
该连接请求CONNECT包括该ONU的客户端标识ClientId。
可选地,该ONU也可以主动向MQTT服务器发送网关查询SEARCHGW信息,并在接收到MQTT服务器返回的网关信息GWINFO消息后,发起连接请求,所述GWINFO消息包括与所述MQTT-SN服务器相连的OLT的客户端标识oltClientId。
S703、MQTT服务器向ONU返回连接确认。
S704、MQTT服务器通过主题注册消息,将该ONU已注册主题的相关信息发送给该ONU。
该相关信息可以包括已注册主题的主题标识,服务规格信息以及服务流标记。
该ONU在对已注册主题进行一致性校验成功后,通过主题注册确认通知MQTT服务器,即执行步骤S705。
S705、ONU向MQTT服务器返回主题注册确认。
在ONU已注册多个主题的情况下,MQTT服务器可以依次将每一个主题的相关信息通过注册请求消息发送给ONU进行一致性校验,图7中仅以一个已注册主题进行的举例说明。
下面具体给出一个在本公开实现的G-PON系统中,主题消息注册,订阅,发布和接收的实例。
在G-PON系统中有一个ONU客户端1/2/2有一个摄像头,需要传送1280 x 720 H.264视频流。假定帧数是24帧每秒,运动系数是2,根据Kush Gauge计算出来的最优带宽是3096kbps。如果再额外预留25%的带宽(包括Ethernet帧映射到GEM帧后的额外开销22bytes,以及主题消息发布的消息头开销9bytes),则总带宽需求是3870kbps(以32kbps为单位,则121*32kbps = 3872kbps)。如果采用保证带宽,则固定带宽为0,保证带宽为121(3872kbps),最大带宽为121(3872kbps)。若假定其它参数为发布模式=共享单播,分发模式=共享组播,加密模式=不加密,则可以明确定义这个视频流的主题消息数据服务规格Service Spec。假定系统允许视频流丢帧,使用MQTT-SN QoS级别0。在此种情况下,ONU客户端1/2/3订阅这个视频流,ONU客户端1/2/2进行主题消息注册和发布的方法如图8所示,包括:
S801、ONU客户端1/2/2(如图中所示的包括MQTT-SN客户端1/2/2的ONU)向MQTT-SN服务器发送主题注册消息。
其中,该主题注册消息中的主题标识TopicId=0x0,主题名称TopicName="1/2/2/video1",服务规格信息ServiceSpec为固定带宽FixedBandwidth=0,保证带宽AssuredBandwidth=121,最大带宽MaximumBandwidth=121,发布模式PublishMode=SharedUnicast,分发模式DistributionMode=SharedMulticast,加密模式DistributionEncryption=No。
S802、MQTT-SN服务器向ONU客户端1/2/2返回主题注册确认。
其中,该主题注册确认包括主题标识TopicId=0x1000,服务流标记Service Flow Tag=100。
S803、ONU客户端1/2/2向MQTT-SN服务器发送主题消息发布。
该主题消息发布PUBLISH包括主题标识TopicId=0x1000,QoS=0。
S804、ONU客户端1/2/3(如图中所示的包括MQTT-SN客户端1/2/3的ONU)向MQTT-SN服务器发送主题订阅消息。
该主题订阅消息SUBSCRIBE包括主题名称TopicName="1/2/2/video1",QoS=0。
S805、MQTT-SN服务器向ONU客户端1/2/3返回主题订阅确认。
该主题订阅确认SUBACK包括主题标识TopicId=0x1000,QoS=0。
S806、ONU客户端1/2/2发布的主题消息经由MQTT-SN服务器传送到ONU客户端1/2/3。
采用上述方法步骤,通过ONU客户端1/2/2进行主题消息注册和发布,ONU客户端1/2/3进行订阅和接收,实现ONU客户端1/2/2与ONU客户端1/2/3之间的通讯。
本公开实施例还提供一种ONU,所述ONU设置有MQTT-SN客户端,所述ONU包括:
存储器,其上存储有计算机程序;
处理器,用于执行所述存储器中的所述计算机程序,以实现上述方法实施例提供的ONU侧的PON网络通讯方法的步骤。
图9是上述ONU的一种结构示意图。如图9所示,该ONU900可以包括:处理器901,存储器902。该电子设备900还可以包括传感器组件903,输入/输出(I/O)接口904,以及通信组件905中的一者或多者。
其中,处理器901用于控制该ONU900的整体操作,以完成上述方法实施例提供的ONU侧的PON网络通讯方法的步骤。存储器902用于存储各种类型的数据以支持在该ONU900的操作,这些数据例如可以包括用于在该ONU900上操作的任何应用程序或方法的指令,以及应用程序相关的数据,例如OLT的客户端标识等。该存储器902可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,例如静态随机存取存储器(Static Random Access Memory,简称SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,简称EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,简称EPROM),可编程只读存储器(Programmable Read-Only Memory,简称PROM),只读存储器(Read-Only Memory,简称ROM),磁存储器,快闪存储器,磁盘或光盘。
该传感器组件903可以包括力学传感器,触觉传感器,接近传感器,视觉传感器,热觉传感器等,此处不做赘述。
通信组件905用于该ONU900与其他设备之间进行有线或无线通信。
本公开实施例还提供了一种包括程序指令的计算机可读存储介质,该程序指令被处理器执行时实现上述方法实施例提供的ONU侧的PON网络通讯方法的步骤。例如,该计算机可读存储介质可以为上述包括程序指令的存储器902,上述程序指令可由ONU900的处理器901执行以完成上述方法实施例提供的ONU侧的PON网络通讯方法的步骤。
本公开实施例还提供一种MQTT服务器,包括:
存储器,其上存储有计算机程序;
处理器,用于执行所述存储器中的所述计算机程序,以实现上述方法实施例提供的MQTT服务器侧的PON网络通讯方法的步骤。
参照图10,MQTT服务器100可以包括:处理组件1001,存储器1002,摄像头1003,激光雷达1004,执行器1005,输入/输出(I/ O)的接口1006,以及通信组件1007。
处理组件1001可以包括一个或多个处理器1000来执行指令,以完成MQTT服务器侧的PON网络通讯方法的全部或部分步骤。
存储器1002被配置为存储各种类型的数据以支持在MQTT服务器1000的操作。这些数据的示例包括用于在MQTT服务器1000上操作的任何应用程序或方法的指令。存储器1002可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
执行器1005可以为各种机器人执行器,包括伺服电机,液压驱动器等。
I/ O接口1006为处理组件1001和外围接口模块之间提供接口。
通信组件1007被配置为便于MQTT服务器100和其他设备之间有线或无线方式的通信。如WiFi,4G或5G,或它们的组合。
本公开实施例还提供了一种包括程序指令的计算机可读存储介质,该程序指令被处理器执行时实现上述方法实施例提供的MQTT服务器侧的PON网络通讯方法的步骤。例如,该计算机可读存储介质可以为上述包括程序指令的存储器1002,上述程序指令可由MQTT服务器100的处理组件1001执行以完成上述方法实施例提供的MQTT服务器侧的PON网络通讯方法。
本公开实施例还提供一种OLT,该OLT被配置为以上实施例提供的任一PON网络中的OLT,用于执行PON网络中与OLT相关的所有操作,具体可参照以上实施例中对PON网络的说明。
本公开实施例还提供一种MQTT-SN网关,所述MQTT-SN网关被配置为以上实施例提供的任一PON网络中的MQTT-SN网关,该MQTT-SN网关作为独立的一个设备。
以上结合附图详细描述了本公开的优选实施方式,但是,本公开并不限于上述实施方式中的具体细节,在本公开的技术构思范围内,可以对本公开的技术方案进行多种简单变型,这些简单变型均属于本公开的保护范围。
另外需要说明的是,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本公开对各种可能的组合方式不再另行说明。
此外,本公开的各种不同的实施方式之间也可以进行任意组合,只要其不违背本公开的思想,其同样应当视为本公开所公开的内容。

Claims (21)

  1. 一种PON网络,其特征在于,所述PON网络包括:
    传感器版本的消息队列遥测传输MQTT服务器,MQTT-SN网关,通过所述MQTT-SN网关与所述MQTT服务器相连的光线路终端OLT,与所述OLT相连的光网络单元ONU;
    其中,所述MQTT服务器和所述MQTT-SN网关工作在数据链路层,所述OLT设置有MQTT-SN客户端,所述ONU设置有MQTT-SN客户端。
  2. 根据权利要求1所述的PON网络,其特征在于,所述MQTT服务器用于,广播网关广告ADVERTISE消息,所述ADVERTISE消息包括与所述MQTT服务器相连的OLT的客户端标识oltClientId;和/或,
    所述MQTT服务器用于,若接收到ONU发送的网关查询SEARCHGW信息,则向所述ONU发送网关信息GWINFO消息,所述GWINFO消息包括与所述MQTT服务器相连的OLT的客户端标识oltClientId。
  3. 根据权利要求1所述的PON网络,其特征在于,所述ONU用于,基于所述MQTT-SN客户端向所述MQTT服务器发送连接CONNECT请求,所述CONNECT请求包括与所述ONU连接的OLT的客户端标识oltClientId,以及所述ONU的客户端标识ClientId;
    其中,所述OLT的客户端标识oltClientId包括所述OLT在接口板上的插槽编号以及端口编号,所述ONU的客户端标识ClientId包括所述OLT在接口板上的插槽编号,端口编号,以及所述ONU的在所述OLT下的编号。
  4. 根据权利要求1所述的PON网络,其特征在于,所述ONU用于,基于所述MQTT-SN客户端向所述MQTT服务器发送注册REGISTER消息,所述REGISTER消息包括服务规格信息,所述服务规格信息用于对请求注册的主题消息的数据服务规格进行定量描述;
    所述MQTT服务器用于,若接收到REGISTER消息,根据所述服务规格信息对请求注册的主题消息的数据服务规格进行配置,并返回用于响应所述REGISTER消息的REGACK消息。
  5. 权利要求4所述的PON网络,其特征在于,所述服务规格信息包括以下信息中的一者或多者:规格版本信息,加密模式信息,发布模式信息,分发模式信息,带宽描述信息;
    其中,所述规格版本信息用于标识当前的服务规格;
    所述加密模式信息用于指定数据的分发是否加密;
    所述发布模式信息用于指定MQTT-SN客户端到MQTT服务器之间数据传输模式;
    所述分发模式信息用于指定MQTT服务器到订阅的MQTT-SN客户端之间的数据传输方式;
    所述带宽描述信息用于指定主题消息发布的固定带宽,保证带宽,以及最大带宽。
  6. 根据权利要求4或5所述的PON网络,其特征在于,所述REGACK消息包括服务流标记,所述服务流标记用于对请求注册的主题消息进行流分类。
  7. 根据权利要求1至5中任一项所述的PON网络,其特征在于,所述MQTT服务器用于,在ONU主题消息注册失败或者主题消息订阅失败或者主题消息发布失败时,向所述ONU返回指示失败原因的代码ReturnCode。
  8. 根据权利要求1至5中任一项所述的PON网络,其特征在于,同一MQTT服务器下的ONU之间通过客户服务器消息通讯模式进行通讯;和/或,
    所述OLT与多个ONU之间通过主从消息通讯模式进行通讯。
  9. 一种PON网络的通讯方法,其特征在于,所述方法应用于权利要求1中所述的ONU,所述方法包括:
    ONU基于MQTT-SN客户端向MQTT服务器发送主题注册REGISTER消息,所述REGISTER消息包括服务规格信息,所述服务规格信息用于对请求注册的主题的数据服务规格进行定量描述;
    若接收到所述MQTT服务器发送的用于响应所述REGISTER消息的REGACK消息,则确认主题注册成功;
    所述主题用于所述ONU与订阅所述主题的设备进行通讯。
  10. 根据权利要求9所述的方法,其特征在于,所述服务规格信息包括以下信息中的一者或多者:规格版本信息,加密模式信息,发布模式信息,分发模式信息,带宽描述信息;
    其中,所述规格版本信息用于标识当前的服务规格;
    所述加密模式信息用于指定数据的分发是否加密;
    所述发布模式信息用于指定MQTT-SN客户端到MQTT服务器之间数据传输模式;
    所述分发模式信息用于指定MQTT服务器到订阅的MQTT-SN客户端之间的数据传输方式;
    所述带宽描述信息用于指定主题消息发布的固定带宽,保证带宽,以及最大带宽。
  11. 根据权利要求9或10所述的方法,其特征在于,所述REGACK消息包括服务流标记,所述服务流标记用于对请求注册的主题进行流分类。
  12. 根据权利要求9或10所述的方法,其特征在于,所述方法还包括:
    所述ONU基于MQTT-SN客户端向MQTT服务器发送连接CONNECT请求,所述CONNECT请求包括与所述ONU连接的OLT的客户端标识oltClientId,以及所述ONU的客户端标识ClientId;
    若接收到所述MQTT服务器发送的连接确认CONNACK消息,则确认所述ONU与所述MQTT服务器连接成功。
  13. 根据权利要求12所述的方法,其特征在于,在所述ONU与所述MQTT服务器连接成功后,所述方法还包括:
    所述ONU接收所述MQTT服务器发送的所述ONU已注册主题的描述信息,所述描述信息包括主题标识,服务流标记以及服务规格;
    对所述描述信息与所述ONU本地记录的已注册主题进行一致性校验,其中,所述一致性校验成功表明所述ONU可对所述已注册主题发布主题消息。
  14. 一种PON网络的通讯方法,其特征在于,所述方法应用于权利要求1所述的MQTT服务器,所述方法包括:
    接收ONU发送的主题注册REGISTER消息,根据所述REGISTER消息中的服务规格信息对请求注册的主题的数据服务规格进行配置,并返回用于响应所述REGISTER消息的REGACK消息。
  15. 根据权利要求14所述的方法,其特征在于,所述REGACK消息包括为所述ONU请求注册的主题分配的服务流标记,所述服务流标记用于对请求注册的主题进行流分类。
  16. 根据权利要求14或15所述的方法,其特征在于,所述方法还包括:
    接收ONU发送连接的CONNECT请求,所述CONNECT请求包括与所述ONU连接的OLT的客户端标识oltClientId,以及所述ONU的客户端标识ClientId;
    向所述ONU发送连接确认CONNACK消息,用于指示所述ONU与所述MQTT服务器连接成功。
  17. 根据权利要求16所述的方法,其特征在于,所述方法还包括:
    在与所述ONU连接成功后,向所述ONU发送所述ONU已注册主题的描述信息,所述描述信息包括主题标识,服务流标记以及服务规格,所述描述信息用于所述ONU进行已注册主题的一致性校验。
  18. 一种OLT,其特征在于,所述OLT被配置为如权利要求1至8中任一项所述的PON网络中的OLT。
  19. 一种MQTT-SN网关,其特征在于,所述MQTT-SN网关被配置为如权利要求1至8中任一项所述的PON网络中的MQTT-SN网关。
  20. 一种ONU,其特征在于,所述ONU设置有MQTT-SN客户端,所述ONU包括:
    存储器,其上存储有计算机程序;
    处理器,用于执行所述存储器中的所述计算机程序,以实现权利要求9至13中任一项所述方法的步骤。
  21. 一种MQTT服务器,其特征在于,包括:
    存储器,其上存储有计算机程序;
    处理器,用于执行所述存储器中的所述计算机程序,以实现权利要求14至17中任一项所述方法的步骤。
PCT/CN2019/096217 2018-09-29 2019-07-16 Pon网络及其通讯方法,olt,mqtt-sn网关,onu及mqtt服务器 WO2020063048A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201862739214P 2018-09-29 2018-09-29
US62/739,214 2018-09-29

Publications (1)

Publication Number Publication Date
WO2020063048A1 true WO2020063048A1 (zh) 2020-04-02

Family

ID=69950254

Family Applications (8)

Application Number Title Priority Date Filing Date
PCT/CN2019/096217 WO2020063048A1 (zh) 2018-09-29 2019-07-16 Pon网络及其通讯方法,olt,mqtt-sn网关,onu及mqtt服务器
PCT/CN2019/096208 WO2020063044A1 (zh) 2018-09-29 2019-07-16 节点通讯方法,服务器,客户端
PCT/CN2019/109247 WO2020063992A1 (zh) 2018-09-29 2019-09-29 Pon网络,用于pon网络的方法及装置,以及机器人系统
PCT/CN2019/109257 WO2020063996A1 (zh) 2018-09-29 2019-09-29 Pon网络,用于pon网络的方法及装置,以及机器人系统
PCT/CN2019/109246 WO2020063991A1 (zh) 2018-09-29 2019-09-29 Pon网络,用于pon网络的方法及装置,以及机器人系统
PCT/CN2019/109252 WO2020063993A1 (zh) 2018-09-29 2019-09-29 Pon网络,用于pon网络的方法及装置,以及机器人系统
PCT/CN2019/109256 WO2020063995A1 (zh) 2018-09-29 2019-09-29 Pon网络,用于pon网络的方法及装置,以及机器人系统
PCT/CN2019/109263 WO2020063997A1 (zh) 2018-09-29 2019-09-30 节点间通信方法、通信节点以及通信系统

Family Applications After (7)

Application Number Title Priority Date Filing Date
PCT/CN2019/096208 WO2020063044A1 (zh) 2018-09-29 2019-07-16 节点通讯方法,服务器,客户端
PCT/CN2019/109247 WO2020063992A1 (zh) 2018-09-29 2019-09-29 Pon网络,用于pon网络的方法及装置,以及机器人系统
PCT/CN2019/109257 WO2020063996A1 (zh) 2018-09-29 2019-09-29 Pon网络,用于pon网络的方法及装置,以及机器人系统
PCT/CN2019/109246 WO2020063991A1 (zh) 2018-09-29 2019-09-29 Pon网络,用于pon网络的方法及装置,以及机器人系统
PCT/CN2019/109252 WO2020063993A1 (zh) 2018-09-29 2019-09-29 Pon网络,用于pon网络的方法及装置,以及机器人系统
PCT/CN2019/109256 WO2020063995A1 (zh) 2018-09-29 2019-09-29 Pon网络,用于pon网络的方法及装置,以及机器人系统
PCT/CN2019/109263 WO2020063997A1 (zh) 2018-09-29 2019-09-30 节点间通信方法、通信节点以及通信系统

Country Status (1)

Country Link
WO (8) WO2020063048A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383904A (zh) * 2020-10-22 2021-02-19 赞同科技股份有限公司 无配对快速外设调用方法及装置
CN114363422A (zh) * 2021-12-31 2022-04-15 深圳市普渡科技有限公司 室内机器人及其控制系统和方法
CN114938329A (zh) * 2022-01-25 2022-08-23 厦门锐谷通信设备有限公司 一种基于mqtt的路由器网关设备管理方法及系统
CN114979097A (zh) * 2021-06-03 2022-08-30 中移互联网有限公司 基于mqtt的消息推送方法、装置及电子设备
CN115086380A (zh) * 2022-07-25 2022-09-20 苏州思萃工业互联网技术研究所有限公司 基于能源管理平台的数据传输系统及方法
CN116208379A (zh) * 2022-12-30 2023-06-02 金茂云科技服务(北京)有限公司 物联网设备mqtt主题发布订阅权限校验方法及系统

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021237229A2 (en) * 2020-12-09 2021-11-25 Futurewei Technologies, Inc. Efficient protection switching in wdm-pon
CN114338082A (zh) * 2021-11-30 2022-04-12 福建超智集团有限公司 一种智能网关安全连接云平台方法和系统
CN115297144B (zh) * 2022-07-29 2024-03-08 中汽创智科技有限公司 节点数据交互方法和装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106797391A (zh) * 2014-07-21 2017-05-31 康维达无线有限责任公司 使用mqtt协议的服务层交互工作
CN107615791A (zh) * 2015-04-23 2018-01-19 康维达无线有限责任公司 用于添加m2m服务的装置和方法
CN107708112A (zh) * 2017-11-02 2018-02-16 重庆邮电大学 一种适用于mqtt‑sn协议的加密方法

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123649A (zh) * 2006-08-08 2008-02-13 中国移动通信集团公司 信息服务系统及服务信息提供和获取的方法
CN101355387B (zh) * 2007-07-26 2012-04-04 华为技术有限公司 光网络单元接入网络的方法、设备及系统
CN102075247B (zh) * 2009-11-25 2014-08-06 中国科学院空间应用工程与技术中心 高速光纤总线
US20110274428A1 (en) * 2010-05-07 2011-11-10 Rong-Nan Chiou Bus-based optical network system
US9071536B2 (en) * 2010-05-07 2015-06-30 Rong-Nan Chiou Bus-based optical network system
CN101841747B (zh) * 2010-05-12 2013-04-10 烽火通信科技股份有限公司 插板式fttb型onu及实现语音业务的方法
JP5564393B2 (ja) * 2010-10-06 2014-07-30 株式会社日立製作所 受動光網システム
CN103916442A (zh) * 2013-01-07 2014-07-09 阿里巴巴集团控股有限公司 消息推送实现方法、移动终端及消息推送系统
CN203300035U (zh) * 2013-04-25 2013-11-20 国家电网公司 一种采集器及用电信息采集系统
CN103347221B (zh) * 2013-07-04 2016-08-10 北京邮电大学 一种针对EPON(Ethernet Passive Optical Network)的阀值讨论式节能方法
EP4274122A3 (en) * 2014-01-23 2024-06-12 Huawei Technologies Co., Ltd. Optical line terminal communication method and device with data structure
CN104837077B (zh) * 2014-02-12 2019-05-07 中兴通讯股份有限公司 光线路终端/光网络单元波长调节方法及装置
WO2015199267A1 (ko) * 2014-06-27 2015-12-30 주식회사 쏠리드시스템스 이더넷 기반의 통신 시스템
DE102016122384A1 (de) * 2016-11-21 2018-05-24 Beckhoff Automation Gmbh Konzept zum steuern einer nachrichtenübermittlung zwischen kommunikationsteilnehmern eines automatisierungssystems
CN106657340A (zh) * 2016-12-26 2017-05-10 安徽超清科技股份有限公司 一种警情无线采集推送系统及方法
CN106713124A (zh) * 2017-01-24 2017-05-24 深圳市启仑智能科技有限公司 一种基于mqtt和mysql的消息推送方法和系统
CN108989372B (zh) * 2017-06-02 2021-04-09 华为技术有限公司 服务发现的方法、注册中心和设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106797391A (zh) * 2014-07-21 2017-05-31 康维达无线有限责任公司 使用mqtt协议的服务层交互工作
CN107615791A (zh) * 2015-04-23 2018-01-19 康维达无线有限责任公司 用于添加m2m服务的装置和方法
CN107708112A (zh) * 2017-11-02 2018-02-16 重庆邮电大学 一种适用于mqtt‑sn协议的加密方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
IBM, MQTT FOR SENSOR NETWORKS (MQTT-SN) PROTOCOL SPECIFICATION, no. V1.2, 14 November 2013 (2013-11-14), XP055358775 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383904A (zh) * 2020-10-22 2021-02-19 赞同科技股份有限公司 无配对快速外设调用方法及装置
CN112383904B (zh) * 2020-10-22 2023-03-14 赞同科技股份有限公司 无配对快速外设调用方法及装置
CN114979097A (zh) * 2021-06-03 2022-08-30 中移互联网有限公司 基于mqtt的消息推送方法、装置及电子设备
CN114979097B (zh) * 2021-06-03 2023-07-21 中移互联网有限公司 基于mqtt的消息推送方法、装置及电子设备
CN114363422A (zh) * 2021-12-31 2022-04-15 深圳市普渡科技有限公司 室内机器人及其控制系统和方法
CN114938329A (zh) * 2022-01-25 2022-08-23 厦门锐谷通信设备有限公司 一种基于mqtt的路由器网关设备管理方法及系统
CN115086380A (zh) * 2022-07-25 2022-09-20 苏州思萃工业互联网技术研究所有限公司 基于能源管理平台的数据传输系统及方法
CN116208379A (zh) * 2022-12-30 2023-06-02 金茂云科技服务(北京)有限公司 物联网设备mqtt主题发布订阅权限校验方法及系统
CN116208379B (zh) * 2022-12-30 2023-08-22 金茂云科技服务(北京)有限公司 物联网设备mqtt主题发布订阅权限校验方法及系统

Also Published As

Publication number Publication date
WO2020063991A1 (zh) 2020-04-02
WO2020063044A1 (zh) 2020-04-02
WO2020063993A1 (zh) 2020-04-02
WO2020063996A1 (zh) 2020-04-02
WO2020063997A1 (zh) 2020-04-02
WO2020063992A1 (zh) 2020-04-02
WO2020063995A1 (zh) 2020-04-02

Similar Documents

Publication Publication Date Title
WO2020063048A1 (zh) Pon网络及其通讯方法,olt,mqtt-sn网关,onu及mqtt服务器
EP3178205B1 (en) Data transfer in a system of connected things
US9426546B2 (en) Maintaining a fabric name across a distributed switch
US11133949B2 (en) Method and device for establishing multicast data channel in network virtualization system
US9344382B2 (en) Multicast support for internet protocol version four residual deployment via encapsulation or translation
CN104104747A (zh) 报文传输方法及装置
JP6121548B2 (ja) パケットを送信するための方法、ルーティング・ブリッジ、およびシステム
CN106941437B (zh) 一种信息传输方法及装置
EP2552058B1 (en) Method, system and device for implementing multicast preview
CN108833591A (zh) P2p网络中数据传输的方法、电子设备、装置、网络架构
EP3032801B1 (en) Method and device for generating forwarding information
US9503272B2 (en) Fast convergence with multicast source mobility
WO2023208116A1 (zh) 一种管控方法、装置、通信设备和计算机存储介质
US20150195039A1 (en) System and method for interchanging data in a hybrid ethernet-based passive optical network
JP6467373B2 (ja) 通信チャネル制御装置、通信チャネル制御方法及び通信チャネル制御プログラム
US20150326405A1 (en) Multicast traffic bridging
WO2014063612A1 (zh) 智能终端接入trill网络的方法、智能终端及路由网桥
US10361946B2 (en) Methods and systems for determining data transport paths through data transport
KR101038811B1 (ko) 상호 연결된 브리지 망에서 동적 주소 결합 방법을 이용한 연결형 및 비연결형 프레임 전송 방법
WO2023046006A1 (zh) 网络传输方法和设备
WO2016086707A1 (zh) 一种管理信息的传送方法和系统
CN112333574B (zh) 通信接入终端产品快速发现及管理方法及系统
CN110730154B (zh) 一种视联网的业务处理方法和装置
US8402474B2 (en) Message sending method, message sending device and message transmission system
CN118175462A (zh) Fttr的设备管理方法、系统、网络设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19867949

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19867949

Country of ref document: EP

Kind code of ref document: A1