[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115987871B - MQTT-based topological relation preservation method, device and medium - Google Patents

MQTT-based topological relation preservation method, device and medium Download PDF

Info

Publication number
CN115987871B
CN115987871B CN202211638425.6A CN202211638425A CN115987871B CN 115987871 B CN115987871 B CN 115987871B CN 202211638425 A CN202211638425 A CN 202211638425A CN 115987871 B CN115987871 B CN 115987871B
Authority
CN
China
Prior art keywords
leaf
client
server
clients
mqtt
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
CN202211638425.6A
Other languages
Chinese (zh)
Other versions
CN115987871A (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.)
Inspur Network Technology Shandong Co ltd
Original Assignee
Inspur Network Technology Shandong Co 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 Inspur Network Technology Shandong Co ltd filed Critical Inspur Network Technology Shandong Co ltd
Priority to CN202211638425.6A priority Critical patent/CN115987871B/en
Publication of CN115987871A publication Critical patent/CN115987871A/en
Application granted granted Critical
Publication of CN115987871B publication Critical patent/CN115987871B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a topology relation preservation method, device and medium based on MQTT. And establishing message queue telemetry transmission MQTT connection with the corresponding uplink server to update topological relation data of the Leaf clients to corresponding remote Leaf clients in the same RoCE-SAN network based on the legacy messages of the server with which the MQTT connection is established and the sharing operation of the server. The leaf client and the server pre-deploy the MQTT protocol. The remote Leaf client is a remote device subscribing to the Leaf client through the MQTT network. The legacy message is used to characterize the online status of the Leaf client. And updating the topological relation data of at least one Leaf client subscribed by the Leaf client in the topological information table according to the sharing operation of the corresponding uplink server. The topology information table includes topology relationship data for the local Leaf clients and subscribed Leaf clients. The topological relation data at least comprises a local connected device list of each Leaf client.

Description

MQTT-based topological relation preservation method, device and medium
Technical Field
The application relates to the technical field of communication, in particular to a topological relation preservation method, device and medium based on message queue telemetry transmission (Message Queuing Telemetry Transport, MQTT).
Background
In providing storage access services for business systems, a storage access network, a RoCE-SAN network, a remote direct data access (Remote Direct Memory Access, RDMA) storage area network over an aggregated ethernet is constructed primarily using transmission control protocol (Transmission Control Protocol, TCP).
At present, in the RoCE-SAN network, if each gateway device or switch is to be implemented, a large number of protocol topology interaction messages and interaction logic need to be constructed to discover other remote devices, so as to implement topology discovery and topology management. However, for large-scale RoCE-SAN networks with more gateway devices or switches, the topology maintenance workload is large, and because a large number of protocol topology interaction messages and interaction logics are built, the maintenance process is complex, errors are easy to occur, and the real-time performance of topology update is poor.
Disclosure of Invention
In order to solve the problems, the embodiment of the application provides a topology relation preservation method, device and medium based on MQTT.
In one aspect, the embodiment of the application provides a topology relation preservation method based on MQTT, which comprises the following steps:
The Leaf client generates a local connected device list; and
Establishing message queue telemetry transmission MQTT connection with a corresponding uplink server to update topological relation data of the Leaf clients to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network based on the heritage messages of the server and sharing operation of the server which have established the MQTT connection; the leaf client and the server pre-deploy an MQTT protocol; the remote Leaf client is a remote device subscribed to the Leaf client through an MQTT network; the legacy message is used for representing the online state of the Leaf client;
updating topology relation data of at least one Leaf client subscribed by the Leaf client in a topology information table according to sharing operation of the corresponding uplink server; the topology information table comprises topology relation data of a local Leaf client and subscribed Leaf clients; the topological relation data at least comprises a local connected equipment list of each Leaf client.
In one implementation manner of the application, the Leaf client sends an MQTT connection message to each uplink server, and under the condition of establishing MQTT connection, based on the connection message feedback information of each uplink server, whether the server prestores the corresponding MQTT connection message is determined; the MQTT connection message at least comprises: equipment identification, a legacy topic and a legacy message;
If not, sending the legacy message to the server;
if yes, the server updates the current legacy message according to the communication connection state with the Leaf client.
In one implementation of the application, the server sends the legacy topic to each Leaf client connected therewith;
based on the subscription operation of each downlink Leaf client, the corresponding remote Leaf client is determined.
In one implementation of the application, the server determines the online state of the Leaf client according to the legacy message from the Leaf client or the updated legacy message;
Under the condition that the Leaf client is in an online state, determining topological relation data of the Leaf client in real time, and synchronizing the topological relation data to each remote Leaf client;
And under the condition that the Leaf clients are in an offline state, sending the empty topological relation data of the Leaf clients to each remote Leaf client so as to delete the pre-stored historical topological relation data of the Leaf clients in each remote Leaf client through the empty topological relation data.
In one implementation manner of the application, each remote Leaf client sends null topology relationship data feedback information to the corresponding server under the condition that the Leaf client is in an offline state; the empty topology relation data feedback information comprises the receiving moment of the empty topology relation data;
and under the condition that the server receives the matching of the empty topological relation data feedback information of each remote Leaf client, generating an updating instruction and sending the updating instruction to each remote Leaf client.
In one implementation of the present application, in a case where the Leaf client is in an offline state, the Leaf client determines a fault type corresponding to the offline state;
Deleting the corresponding topology information table by the Leaf client under the condition that the fault type is the first type;
and in the case that the fault type is the second type, the Leaf client stores the topology information table.
In one implementation of the present application, the first type is an uplink port failure between the Leaf client and each of the uplink servers; the second type is a hardware device power down or control layer protocol exception of the Leaf client.
In one implementation of the application, the device is identified as the IP address of each Leaf client.
On the other hand, the embodiment of the application also provides a topology relation preservation device based on the MQTT, which comprises the following steps:
the generation module is used for generating a local downlink equipment list by the Leaf client; and
The method comprises the steps of establishing a connection module, a Message Queue Telemetry Transmission (MQTT) connection with a corresponding uplink server, and updating topological relation data of the Leaf clients to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network based on the heritage information of the server with the established MQTT connection and the sharing operation of the server; the leaf client and the server pre-deploy an MQTT protocol; the remote Leaf client is a remote device subscribed to the Leaf client through an MQTT network; the legacy message is used for representing the online state of the Leaf client;
the updating module is used for updating the topological relation data of at least one Leaf client subscribed by the Leaf client in the topological information table according to the sharing operation of the corresponding uplink server; the topology information table comprises topology relation data of a local Leaf client and subscribed Leaf clients; the topological relation data at least comprises a local connected equipment list of each Leaf client.
In yet another aspect, an embodiment of the present application further provides a MQTT-based topology preservation non-volatile computer storage medium storing computer-executable instructions configured to:
The Leaf client generates a local connected device list; and
Establishing message queue telemetry transmission MQTT connection with a corresponding uplink server to update topological relation data of the Leaf clients to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network based on the heritage messages of the server and sharing operation of the server which have established the MQTT connection; the leaf client and the server pre-deploy an MQTT protocol; the remote Leaf client is a remote device subscribed to the Leaf client through an MQTT network; the legacy message is used for representing the online state of the Leaf client;
updating topology relation data of at least one Leaf client subscribed by the Leaf client in a topology information table according to sharing operation of the corresponding uplink server; the topology information table comprises topology relation data of a local Leaf client and subscribed Leaf clients; the topological relation data at least comprises a local connected equipment list of each Leaf client.
Through the scheme, the application can realize the topology real-time discovery and management of the RoCE-SAN by utilizing the existing legacy technology of the high-efficiency mature MQTT, can simply and quickly enable the Leaf client to discover the online and offline of the remote equipment, and greatly improves the timeliness of topology updating. And can respond various topological change scenes fast, improve the whole network performance, achieve and discern the topological structure of the far-end equipment of perception fast, and then adapt to various network topological change scenes fast, keep the robustness and high-efficient of the network topology. Therefore, the problems that a large number of protocol topology interaction messages and interaction logics are required to be constructed to realize topology discovery and topology management in the prior art, the large-scale RoCE-SAN topology maintenance workload for more leaf equipment is large and complex, errors are easy to occur, and the real-time performance of topology update is poor are solved. The cost investment of maintenance personnel is reduced, and the use experience of a user is improved. In addition, the topology relation can be updated by rapidly responding to the fault of the storage network switch.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a schematic diagram of a topology of a RoCE-SAN storage network according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a topology relation preservation method based on MQTT in an embodiment of the present application;
FIG. 3 is a schematic diagram of a topology structure of a MQTT-based topology preserving method in an embodiment of the present application;
FIG. 4 is a schematic diagram of another topology structure of a MQTT-based topology preserving method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a topology preserving apparatus based on MQTT in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The technology mainly uses FC-SAN and IP-SAN networks to provide storage access service for various business systems, but each has defects and bottlenecks, the RoCE-SAN is a high-performance lossless storage area network based on the RoCE protocol, has the characteristics of zero packet loss, low time delay, plug and play, rapid fault convergence and the like, can have the advantages of the FC-SAN and the IP-SAN, and realizes the fusion of the FC-SAN and the IP-SAN. The RoCE-SAN achieves and outperforms the FC-SAN and IP-SAN in terms of function, IOPS performance, and failure convergence performance, and will gradually replace the FC-SAN and IP-SAN.
The existing implementation scheme mainly utilizes TCP protocol to construct a storage access network. As shown in fig. 1, where port1 and port2 refer to a first interface and a second interface, respectively, a Local host represents a Local host, and a Remote host represents: remote host, remote leaf, means the Remote leaf client, leaf is the node gateway device. The Spine is a switch or router, etc. host is host and storage array, two Spine core switches are used as TCP server servers, the two servers are backup to each other and the whole network is reachable by three layers of routes, all other Leaf switches are used as TCP client clients, and TCP connection and interaction of TCP protocol messages are required between each server and client. TCP connection is not required to be established between Leaf switches, only direct connection with a host and interaction with LLDP protocol are required, TCP connection is not required to be established between Spine switches, and the two are mutually backup. The protocol message is a TCP encapsulated message, and the content containing the key information of the equipment is carried in the Data field of the TCP message. The Leaf switch can send the key information of the equipment to the spine switch through the protocol message, and the spine switch gathers and then sends the key information to all other Leaf switches. The Leaf switch discovers a locally mounted Host device list through a link layer discovery protocol (LINK LAYER Discovery Protocol, LLDP) and sends the locally mounted Host device list to the Spine through a TCP protocol message, the Spine sends the device information to all other Leaf switches, and the local Host device information list and a remote Host device information list need to be stored under each Leaf switch, and the remote Host device under the Leaf is the local Host device under other leaves. Each Leaf switch also discovers all other remote Leaf switches in the network topology through TCP protocol message interaction, and each different Leaf switch and host device can be represented by a switch IP address, and the hosts downloaded by the switches all have different IP addresses.
In the prior art, since each Leaf switch needs to discover all other online Leaf switches at a far end, a large number of protocol topology interaction messages and interaction logics are required to be constructed to realize topology discovery and topology management, and the large-scale RoCE-SAN topology maintenance workload for more Leaf devices is large, complex and easy to make mistakes, and the real-time performance of topology update is poor. For example, if Leaf1 is powered off or the link between Leaf1 and two spines is completely disconnected, at this time, leaf1 has been disconnected from the RoCE-SAN network, and Leaf1 needs to rely on its complex TCP topology information interaction to sense the topology change and delete all the remote Host (Host 3 and Host 4) device information in time, so that the whole topology update is greatly aged, and the whole network performance is reduced. Meanwhile, the Leaf2 switch cannot quickly sense abnormality of the Leaf1 switch, and further remote devices host1 and host2 stored under the Leaf2 are quickly deleted. Wherein Leaf1 will synchronize its local device host1 and host2 information to Leaf2, host1 and host2 are the remote host devices of Leaf2, and also local devices host3 and host4 under Leaf2 are the remote host devices of Leaf 1.
Based on the above, the embodiment of the application provides a topology relation preservation method, a device and a medium based on MQTT, which are used for reducing the topology maintenance workload, complexity and maintenance error rate of a RoCE-SAN network, improving the instantaneity of topology update, reducing the cost input of maintenance personnel and improving the use experience of users. The method and the device achieve the purpose of quickly identifying and sensing the topological structure of the remote equipment, further quickly adapting to various network topology changing scenes, and keeping the robustness and high efficiency of the network topology.
Various embodiments of the present application are described in detail below with reference to the attached drawing figures.
The embodiment of the application provides a topology relation preservation method based on MQTT, as shown in fig. 2, the method can comprise the steps of S201-S203:
S201, the Leaf client generates a local connected device list.
As shown in fig. 3, when the Leaf client is Leaf3, leaf3 can discover its downlink local connected device list through the LLDP protocol, including: the downlink devices of host5 and host6 may be devices of a user terminal, such as a server, a computer, etc., and the application is not limited in particular to the types of devices in the local downlink device list.
The local host device list under Leaf1 has host1 and host2, the remote host device list has host3 and host4 connected to Leaf2, and the remote Leaf device list of topology discovery has Leaf2. The local host device list under Leaf2 has host3 and host4, the remote host device list has host1 and host2 downlinked to Leaf1, and the remote Leaf device list of its topology discovery has Leaf1, where both Leaf and host devices are identified and distinguished by their respective IP addresses.
S202, the Leaf client establishes message queue telemetry transmission MQTT connection with the corresponding uplink server to update topological relation data of the Leaf client to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network based on the heritage messages of the server and sharing operation of the server of which the MQTT connection is established.
The leaf client and the server pre-deploy the MQTT protocol. The remote Leaf client is a remote device subscribing to the Leaf client through the MQTT network. The legacy message is used to characterize the online status of the Leaf client.
In the embodiment of the application, an MQTT protocol is preset between the Spine and the Leaf, wherein the Spine is an MQTT server, and the Leaf is an MQTT client and serves as a publisher and subscriber of MQTT information.
Taking Leaf3 as an example of a Leaf client, leaf3 powers up and joins the RoCE-SAN topology network. Then, the Leaf client sends an MQTT connection message to each uplink server (e.g. Spine1, spine 2) and establishes an MQTT connection; the MQTT connection message at least comprises: the device identification, the relic theme, the relic information and the relic reservation information are used for indicating whether the Leaf client uses the MQTT-based topological relation preservation method to carry out topological relation preservation, and the relic reservation information is of a Boolean type. The device identification in the MQTT connection message as in Leaf3 is set to the IP address of the device, lastWillTopic (legacy topic) is set to "roce/Leaf3", LASTWILLMESSAGE (legacy message) is set to "offine", LASTWILLRETAIN (legacy reservation) is set to true.
Then, the uplink server records the MQTT connection message (equipment identification, the heritage theme, the heritage information and the heritage reservation information) of the Leaf3 for establishing connection, and can generate connection message feedback information according to the MQTT connection message. For example, if Leaf3 first establishes an MQTT connection with the upstream server for the first power-up join of the RoCE-SAN network, then the upstream server will complete the recording of MQTT connection messages from Leaf 3. If the uplink server contains relevant information of the Leaf3 MQTT connection message, all information in the MQTT connection message does not need to be saved. And the uplink server side generates connection message feedback information which characterizes whether the Leaf3 establishes MQTT connection with the uplink server side for the first time. And the Leaf3 can determine whether the server side stores corresponding MQTT connection messages in advance based on the connection message feedback information of each uplink server side.
And under the condition that the corresponding MQTT connection message is not stored in the server in advance, transmitting a legacy message to the server.
Under the condition that the server side is determined to store corresponding MQTT connection messages in advance, the server side updates the current legacy message according to the communication connection state with the Leaf client side.
In other words, the upstream server may determine whether the client that makes the MQTT connection is the first connection. Generally, relevant information equipment identifiers, a legacy topic, a legacy message and legacy reservation information of the first connected Leaf client are not stored in the server, and the server needs to store the relevant legacy information first. In the MQTT connection message sent for the first time, the legacy message is offline, namely in the offline state; and the Leaf client is required to send an online legacy message online to the server according to the feedback information of the connection message after the MQTT connection is established.
In the actual use process, the Leaf client may have the situation that the upper port is opened and closed again, so that the Leaf client does not establish the MQTT connection with the upper server for the first time. In this case, the uplink server may determine, according to the online state (the power-on state) of the Leaf client, that the Leaf client device identifier in the online state belongs to a device that stores the corresponding MQTT connection message in advance, and determine whether the communication connection state between the current server and the Leaf client is normal, if so, the server will automatically update the relevant information about the legacy in the pre-stored MQTT connection message, that is, the legacy message is changed from offline to online.
In the embodiment of the application, after the MQTT connection message of each Leaf client is stored by the uplink server, the MQTT connection message is used as the information of the heritage of each Leaf client, and at least comprises: the subject of the heritage, the heritage information and the heritage reservation information.
In the embodiment of the application, after the Leaf client establishes the message queue telemetry transmission MQTT connection with the corresponding uplink server, the method further comprises the following steps:
The server (Spine) sends the legacy topic to each of its subordinate Leaf clients (e.g., leaf1, leaf 2). And determining the corresponding remote Leaf clients based on subscription operations of the respective linked Leaf clients.
In other words, in the case that the Leaf client establishes an MQTT network with the server, the server (e.g., spine 2) connects or indirectly connects devices such as (Spine 1, leaf2, leaf 1), the relevant information of Leaf3 will be obtained. Specifically, the same league information of Leaf3 is stored in the Spine1, and the Leaf1 or the Leaf2 can learn about the league theme of the Leaf3 through the Spine1 or the Spine2, and perform subscription behavior on the Leaf 3. Subscription refers to that the remote device can join the topology information table of the subscription device, namely the local device, and the subscription device has the authority of knowing the offline and online states of the remote device.
The subscription device may only have the event 1, the event 2 does not subscribe to the legacy topic of the event 3, and then the service end only shares the legacy information of the event 3 to the event 1, and only the event 1 is the remote event client.
In the embodiment of the application, based on the heritage information of the service end with the established MQTT connection and the sharing operation of the service end, the topological relation data of the Leaf clients are updated to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network, and the method specifically comprises the following steps:
The server determines the online state of the Leaf client according to the legacy message or the updated legacy message from the Leaf client. And under the condition that the Leaf clients are in an online state, determining the topological relation data of the Leaf clients in real time, and synchronizing the topological relation data to each remote Leaf client. And under the condition that the Leaf clients are in an offline state, sending the empty topological relation data of the Leaf clients to each remote Leaf client so as to delete the pre-stored historical topological relation data of the Leaf clients in each remote Leaf client through the empty topological relation data.
In other words, the status of the legacy message of the Leaf client stored in the server can automatically detect and change according to the legacy message actively sent by the initially connected Leaf client or when the reconnected Leaf client is powered on or reconnected. If the Leaf client is currently online, the server can send the topological relation data of the Leaf client, such as Leaf3 (host 5, host 6), that is, the Leaf client and the corresponding local connected device list thereof, to the topological information table of each remote Leaf client. If the Leaf clients are in the offline state, the server can change the state of the legacy message in the legacy information into offly, namely, generate empty topological relation data, and send the empty topological relation data to the remote Leaf clients subscribing to the Leaf clients, so that each remote Leaf client deletes the topological relation data of the offline Leaf clients from the topological information table.
In the embodiment of the application, under the condition that the Leaf client is in an offline state, each remote Leaf client sends the empty topology relationship data feedback information to the corresponding server. The null topology relationship data feedback information includes a reception time of the null topology relationship data. And under the condition that the feedback information of the null topology relationship data of each remote Leaf client is matched, generating an updating instruction by the server side, and sending the updating instruction to each remote Leaf client.
In other words, the server may match the time when each remote Leaf client having the topology relationship data of the offline state Leaf client receives the offline legacy message offlip of the Leaf client, and if the times are matched, that is, the time difference is equal or less than the preset deviation, the topology information table of each remote Leaf client will be updated. Therefore, the situation that each remote Leaf client cannot update the topology information table simultaneously and timely is avoided, and the real-time performance of the topology update is higher. And the problem that the update of each client cannot realize synchronization during update is avoided, and topology update errors are reduced.
The preset deviation may be set by a user, and the present application is not particularly limited thereto.
In the embodiment of the application, under the condition that the Leaf client is in an offline state, the Leaf client determines the fault type corresponding to the offline state. In the case that the fault type is the first type, the Leaf client deletes the corresponding topology information table. In the event that the fault type is the second type, the Leaf client stores a topology information table.
The first type is the uplink port faults of the Leaf client and each uplink server. The second type is a hardware device power down or control layer protocol exception for the Leaf client.
As shown in fig. 4, when the Leaf client (Leaf 1) and each upper port fail, leaf1 deletes the corresponding topology information table, that is, deletes the local connected device list and the topology relationship data of other devices (Leaf 2 and its host3, host4, leaf3 and its host5, host 6). In the event that the hardware device of Leaf1 is powered down or the control layer protocol is abnormal, leaf1 may not delete the topology information table, so that when the device returns to normal, the server-side Spine detects that Leaf1 returns to the MQTT connection, it directly resets the legacy message of Leaf1 to "online", where the legacy subject corresponding to Leaf1 is "roce/Leaf1", so that all the other Leaf devices Leaf2 and Leaf3 subscribed to "roce/Leaf1" can receive the online legacy message "online" of Leaf1, and update the respective remote device topology information table in real time, and add Leaf1 to the respective remote device topology information table. NULL indicates invalid.
And S203, the Leaf client updates the topological relation data of at least one Leaf client subscribed by the Leaf client in the topological information table according to the sharing operation of the corresponding uplink server.
The topology information table includes topology relationship data for the local Leaf clients and subscribed Leaf clients. The topological relation data at least comprises a local connected device list of each Leaf client.
That is, when the Leaf client sends the information of the legacy to other clients, the server can subscribe to other remote Leaf clients, determine the remote devices host under the other remote Leaf clients, and update the topology information table. The topology relation data in the updated topology information table comprises the topology relation of the remote Leaf client and the topology relation data of the local connected equipment list.
Through the scheme, the application can realize the topology real-time discovery and management of the RoCE-SAN by utilizing the existing legacy technology of the high-efficiency mature MQTT, can simply and quickly discover the online and offline of the remote equipment, greatly improve the timeliness of topology updating, quickly respond to various topology change scenes and improve the whole network performance, and solves the problems that a large number of protocol topology interaction messages and interaction logics are required to be constructed to realize the topology discovery and the topology management in the prior art, the maintenance workload of the large-scale RoCE-SAN topology with more leaf equipment is large, complex and easy to make mistakes, and the real-time of the topology updating is poor.
Fig. 5 is a schematic structural diagram of a topology relation preserving apparatus based on MQTT according to an embodiment of the present application, where the apparatus includes:
a generating module 501, configured to generate a local connected device list by using a Leaf client. And
The connection establishment module 502 is configured to establish a message queue telemetry transport MQTT connection with a corresponding uplink server, so as to update topology relationship data of the Leaf client to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network based on a legacy message of the server for which the MQTT connection has been established and a sharing operation of the server. The leaf client and the server pre-deploy the MQTT protocol. The remote Leaf client is a remote device subscribing to the Leaf client through the MQTT network. The legacy message is used to characterize the online status of the Leaf client.
An updating module 503, configured to update topology relationship data of at least one Leaf client subscribed by the Leaf client in the topology information table according to a sharing operation of the corresponding uplink server. The topology information table includes topology relationship data for the local Leaf clients and subscribed Leaf clients. The topological relation data at least comprises a local connected device list of each Leaf client.
The embodiment of the application also provides a non-volatile computer storage medium for preserving the topological relation based on the MQTT, which stores computer executable instructions, wherein the computer executable instructions are as follows:
the Leaf client generates a local list of connected devices. And
And establishing message queue telemetry transmission MQTT connection with the corresponding uplink server to update topological relation data of the Leaf clients to corresponding remote Leaf clients in the same RoCE-SAN network based on the heritage messages of the server with the established MQTT connection and the sharing operation of the server. The leaf client and the server pre-deploy the MQTT protocol. The remote Leaf client is a remote device subscribing to the Leaf client through the MQTT network. The legacy message is used to characterize the online status of the Leaf client.
And updating the topological relation data of at least one Leaf client subscribed by the Leaf client in the topological information table according to the sharing operation of the corresponding uplink server. The topology information table includes topology relationship data for the local Leaf clients and subscribed Leaf clients. The topological relation data at least comprises a local connected device list of each Leaf client.
The embodiments of the present application are described in a progressive manner, and the same and similar parts of the embodiments are all referred to each other, and each embodiment is mainly described in the differences from the other embodiments. In particular, for the apparatus and medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and references to the parts of the description of the method embodiments are only required.
The device, the medium and the method provided by the embodiment of the application are in one-to-one correspondence, so that the device and the medium also have similar beneficial technical effects as the corresponding method, and the beneficial technical effects of the device and the medium are not repeated here because the beneficial technical effects of the method are described in detail above.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (8)

1. The topology relation preservation method based on the MQTT is characterized by comprising the following steps:
The Leaf client generates a local connected device list; and
Establishing message queue telemetry transmission MQTT connection with a corresponding uplink server to update topological relation data of the Leaf clients to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network based on the heritage messages of the server and sharing operation of the server which have established the MQTT connection; the leaf client and the server pre-deploy an MQTT protocol; the remote Leaf client is a remote device subscribed to the Leaf client through an MQTT network; the legacy message is used for representing the online state of the Leaf client;
updating topology relation data of at least one Leaf client subscribed by the Leaf client in a topology information table according to sharing operation of the corresponding uplink server; the topology information table comprises topology relation data of a local Leaf client and subscribed Leaf clients; the topological relation data at least comprises a local downlink equipment list of each Leaf client;
based on the heritage information of the service end with the established MQTT connection and the sharing operation of the service end, the topological relation data of the Leaf clients are updated to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network, and the method specifically comprises the following steps:
The server determines the online state of the Leaf client according to the heritage information from the Leaf client or the updated heritage information;
Under the condition that the Leaf client is in an online state, determining topological relation data of the Leaf client in real time, and synchronizing the topological relation data to each remote Leaf client;
And under the condition that the Leaf clients are in an offline state, sending the empty topological relation data of the Leaf clients to each remote Leaf client so as to delete the pre-stored historical topological relation data of the Leaf clients in each remote Leaf client through the empty topological relation data.
2. The method according to claim 1, wherein the method further comprises:
the Leaf client sends MQTT connection messages to each uplink server, and under the condition that MQTT connection is established, whether the server prestores corresponding MQTT connection messages or not is determined based on the feedback information of the connection messages of the server of each uplink; the MQTT connection message at least comprises: equipment identification, a legacy topic and a legacy message;
If not, the server needs to store the relevant information of the heritage first; in the MQTT connection message sent for the first time, the legacy message is offline, namely in the offline state; the Leaf client is required to send an online legacy message online to the server according to the feedback information of the connection message after the MQTT connection is established;
if yes, the server updates the current legacy message according to the communication connection state with the Leaf client.
3. The method of claim 2, wherein after the Leaf client establishes a message queue telemetry transport MQTT connection with the corresponding upstream server, the method further comprises:
the server side sends the heritage subjects to each Leaf client side connected with the server side;
based on the subscription operation of each downlink Leaf client, the corresponding remote Leaf client is determined.
4. The method according to claim 1, wherein the method further comprises:
Under the condition that the Leaf clients are in an offline state, each remote Leaf client sends null topology relationship data feedback information to the corresponding server; the empty topology relation data feedback information comprises the receiving moment of the empty topology relation data;
Generating an update instruction and sending the update instruction to each remote Leaf client under the condition that the server receives the matching of the empty topology relation data feedback information of each remote Leaf client; the updating instruction is used for updating the topology information table of each remote Leaf client.
5. The method according to claim 1, wherein the method further comprises:
Under the condition that the Leaf client is in an offline state, the Leaf client determines a fault type corresponding to the offline state;
Deleting the corresponding topology information table by the Leaf client under the condition that the fault type is the first type;
Storing the topology information table by the Leaf client in case that the fault type is a second type;
the first type is an uplink port fault of the Leaf client and each uplink server; the second type is a hardware device power down or control layer protocol exception of the Leaf client.
6. The method of claim 2, wherein the device is identified as an IP address of each Leaf client.
7. A MQTT-based topological relation preservation device, the device comprising:
the generation module is used for generating a local downlink equipment list by the Leaf client; and
The method comprises the steps of establishing a connection module, a Message Queue Telemetry Transmission (MQTT) connection with a corresponding uplink server, and updating topological relation data of the Leaf clients to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network based on the heritage information of the server with the established MQTT connection and the sharing operation of the server; the leaf client and the server pre-deploy an MQTT protocol; the remote Leaf client is a remote device subscribed to the Leaf client through an MQTT network; the legacy message is used for representing the online state of the Leaf client;
The updating module is used for updating the topological relation data of at least one Leaf client subscribed by the Leaf client in the topological information table according to the sharing operation of the corresponding uplink server; the topology information table comprises topology relation data of a local Leaf client and subscribed Leaf clients; the topological relation data at least comprises a local downlink equipment list of each Leaf client;
Based on the heritage information of the service end with the established MQTT connection and the sharing operation of the service end, the topological relation data of the Leaf clients are updated to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network, and the device is particularly capable of:
The server determines the online state of the Leaf client according to the heritage information from the Leaf client or the updated heritage information;
Under the condition that the Leaf client is in an online state, determining topological relation data of the Leaf client in real time, and synchronizing the topological relation data to each remote Leaf client;
And under the condition that the Leaf clients are in an offline state, sending the empty topological relation data of the Leaf clients to each remote Leaf client so as to delete the pre-stored historical topological relation data of the Leaf clients in each remote Leaf client through the empty topological relation data.
8. A non-volatile computer storage medium storing computer executable instructions for MQTT-based topology preservation, the computer executable instructions configured to:
The Leaf client generates a local connected device list; and
Establishing message queue telemetry transmission MQTT connection with a corresponding uplink server to update topological relation data of the Leaf clients to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network based on the heritage messages of the server and sharing operation of the server which have established the MQTT connection; the leaf client and the server pre-deploy an MQTT protocol; the remote Leaf client is a remote device subscribed to the Leaf client through an MQTT network; the legacy message is used for representing the online state of the Leaf client;
updating topology relation data of at least one Leaf client subscribed by the Leaf client in a topology information table according to sharing operation of the corresponding uplink server; the topology information table comprises topology relation data of a local Leaf client and subscribed Leaf clients; the topological relation data at least comprises a local downlink equipment list of each Leaf client;
based on the heritage information of the service end with the established MQTT connection and the sharing operation of the service end, the topological relation data of the Leaf clients are updated to a plurality of corresponding remote Leaf clients in the same RoCE-SAN network, and the method specifically comprises the following steps:
The server determines the online state of the Leaf client according to the heritage information from the Leaf client or the updated heritage information;
Under the condition that the Leaf client is in an online state, determining topological relation data of the Leaf client in real time, and synchronizing the topological relation data to each remote Leaf client;
And under the condition that the Leaf clients are in an offline state, sending the empty topological relation data of the Leaf clients to each remote Leaf client so as to delete the pre-stored historical topological relation data of the Leaf clients in each remote Leaf client through the empty topological relation data.
CN202211638425.6A 2022-12-19 2022-12-19 MQTT-based topological relation preservation method, device and medium Active CN115987871B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211638425.6A CN115987871B (en) 2022-12-19 2022-12-19 MQTT-based topological relation preservation method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211638425.6A CN115987871B (en) 2022-12-19 2022-12-19 MQTT-based topological relation preservation method, device and medium

Publications (2)

Publication Number Publication Date
CN115987871A CN115987871A (en) 2023-04-18
CN115987871B true CN115987871B (en) 2024-07-26

Family

ID=85969351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211638425.6A Active CN115987871B (en) 2022-12-19 2022-12-19 MQTT-based topological relation preservation method, device and medium

Country Status (1)

Country Link
CN (1) CN115987871B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117411792B (en) * 2023-12-15 2024-02-13 深圳中科德能科技有限公司 Smart box connection discovery method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110278248A (en) * 2019-05-29 2019-09-24 平安科技(深圳)有限公司 Testament message distributing method, device and computer readable storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106657130B (en) * 2017-01-09 2020-05-19 上海浦东软件园汇智软件发展有限公司 MQTT-based access authentication method and equipment
CN110048927B (en) * 2018-01-16 2020-12-15 华为技术有限公司 Communication method and communication device
US10938663B2 (en) * 2018-05-07 2021-03-02 Servicenow, Inc. Discovery and management of devices
CN111327524B (en) * 2018-12-14 2022-06-07 中国电信股份有限公司 Flow forwarding method and system, SDN controller and computer readable storage medium
CN113347623B (en) * 2020-02-18 2023-11-07 佛山市云米电器科技有限公司 Method and system for uploading sub-equipment
CN113157449A (en) * 2021-04-16 2021-07-23 上海寰果信息科技有限公司 Real-time stream data analysis processing method based on MQTT

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110278248A (en) * 2019-05-29 2019-09-24 平安科技(深圳)有限公司 Testament message distributing method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN115987871A (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN108199897B (en) OPC UA multi-server aggregation method supporting cache management
US8767751B2 (en) Unsolicited FIP packet injection by proxy and spoofing and autoconfiguring intermediate bridges using FIP snooping
EP2586163B1 (en) Notifying a controller of a change to a packet forwarding configuration of a network element over a communication channel
US8335236B2 (en) FCoE isolated port channels and FCoE session resynchronization in vPC/MCEC environments using DCBXP
CN101577722A (en) Method for realizing MAC forced forwarding function and device
KR20050003346A (en) Network attached storage snmp single system image
EP3562107A1 (en) Broadcast packet processing method and processing apparatus, controller, and switch
CN105450779B (en) The method of one household appliance connection multiserver
US20180241695A1 (en) Direct replying actions in sdn switches
CN102916897B (en) A kind of method and apparatus realizing VRRP load balancing
TWI740210B (en) Method for terminal device management and server
US11601360B2 (en) Automated link aggregation group configuration system
CN104980355A (en) Source controllable multicast data transmission method and system thereof under SDN Environment
CN113595806B (en) Distribution network Internet of things communication architecture method based on OPCUA and MQTT protocol
CN100479415C (en) System for realizing data communication and its method
WO2022253087A1 (en) Data transmission method, node, network manager, and system
CN110149218A (en) A kind for the treatment of method and apparatus of warning information
CN115987871B (en) MQTT-based topological relation preservation method, device and medium
CN110213340A (en) Cloud management method, interchanger, server and the platform of box interchanger
CN115022180B (en) Topology management method, device, equipment and medium based on RoCE-SAN
CN104202255A (en) Efficient multi-link data transmission implementation method
CN111585791A (en) Data synchronization configuration method, system and storage medium
CN106533775B (en) Virtualize member device and neighbor discovering method
CN109413142B (en) Method for realizing iSCSI virtual agent under L inux
CN104518902A (en) Method and equipment for using software-defined networking (SDN) to optimize two-layer network traffic

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
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: 250101 s01-6 / F, No. 1036, Langchao Road, high tech Zone, Jinan City, Shandong Province

Applicant after: Inspur Network Technology (Shandong) Co.,Ltd.

Address before: 250101 s01-6 / F, No. 1036, Langchao Road, high tech Zone, Jinan City, Shandong Province

Applicant before: INSPUR CISCO NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant