CN113612825A - Internet of things message middleware server cluster expansion method and system - Google Patents

Internet of things message middleware server cluster expansion method and system Download PDF

Info

Publication number
CN113612825A
CN113612825A CN202110842857.8A CN202110842857A CN113612825A CN 113612825 A CN113612825 A CN 113612825A CN 202110842857 A CN202110842857 A CN 202110842857A CN 113612825 A CN113612825 A CN 113612825A
Authority
CN
China
Prior art keywords
internet
emqx
information
platform
things
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.)
Granted
Application number
CN202110842857.8A
Other languages
Chinese (zh)
Other versions
CN113612825B (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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech 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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202110842857.8A priority Critical patent/CN113612825B/en
Publication of CN113612825A publication Critical patent/CN113612825A/en
Application granted granted Critical
Publication of CN113612825B publication Critical patent/CN113612825B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method and a system for expanding a message middleware server cluster of the Internet of things, which can be applied to the technical field of the Internet of things, wherein the method comprises the following steps: the Internet of things platform receives an equipment login message, corresponding node information and a global subject identifier which are sent by an EMQX server node, wherein the global subject identifier is pre-established by the EMQX server node, and the equipment login message, the corresponding node information and the global subject identifier are sent after the EMQX server node establishes connection with an equipment terminal according to a connection request message; the Internet of things platform determines the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification; and storing the attribution cluster information of the equipment side by the platform of the Internet of things. The invention can solve the problem that the existing cluster limits the node expansion, enhance the expandability and improve the availability and the processing performance of the system.

Description

Internet of things message middleware server cluster expansion method and system
Technical Field
The invention relates to the technical field of Internet of things, in particular to an Internet of things message middleware server cluster expansion method and an Internet of things platform.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
At present, under the ecological environment of the internet of things, more and more terminal devices are connected to the cloud, and the requirement that a large number of terminal devices and the cloud carry out real-time message communication is particularly important. The MQTT is widely applied to various fields as the most common real-time message notification mode at present, wherein the EMQ X Broker is the most common open source internet of things MQTT message middleware.
The existing EMQ X Broker supports the basic cluster but does not provide the cluster expansion function, and the basic cluster only supports adding 7 nodes (the nodes may be physical nodes or virtual nodes) for communication. The number of connectable devices is limited, and can only meet 10 ten thousand concurrent connections and support million device connections. Meanwhile, when a server deploying the EMQX is down, the single-point fault tolerance is low, and once a problem occurs, subsequent services are affected.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method for expanding a message middleware server cluster of an Internet of things, which is used for solving the problem that the existing cluster limits node expansion, enhancing expandability and improving system availability and processing performance, and comprises the following steps:
the method comprises the steps that an Internet of things platform receives equipment login information, corresponding node information and a global subject identification which are sent by an EMQX server node, wherein the global subject identification is pre-established by the EMQX server node, the equipment login information, the corresponding node information and the global subject identification are sent after the EMQX server node establishes connection with an equipment end according to a connection request message, and the connection request message is sent to the EMQX server node on a target EMQX server cluster by the equipment end according to the connection address information of the target EMQX server cluster;
the Internet of things platform determines the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification;
and storing the attribution cluster information of the equipment side by the platform of the Internet of things.
Further, the method for expanding the message middleware server cluster of the internet of things further comprises the following steps:
and the Internet of things platform receives an equipment uplink message sent by the EMQX server node, wherein the equipment uplink message is sent to the EMQX server node after the equipment end establishes connection with the EMQX server node.
Further, the method for expanding the message middleware server cluster of the internet of things further comprises the following steps:
the platform of the Internet of things generates a platform instruction corresponding to the equipment terminal;
the Internet of things platform searches the attribution cluster information of the equipment terminal according to the platform instruction;
and the Internet of things platform sends a platform instruction to the corresponding EMQX server node according to the attribution cluster information, and the platform instruction is used for being sent to the equipment end through the EMQX server node.
Further, the internet of things platform sends a platform instruction to the corresponding EMQX server node according to the attribution cluster information, and the platform instruction comprises:
and if the attribution cluster information is empty, the Internet of things platform sends a platform instruction to the default basic cluster.
Further, the internet of things platform sends a platform instruction to the corresponding EMQX server node according to the attribution cluster information, and the platform instruction comprises:
and if the attribution cluster information is not empty, the platform of the Internet of things sends a platform instruction to the EMQX server node in the attribution cluster information.
Further, the node information includes: IP address information and port information.
The embodiment of the invention provides an internet of things platform, which is used for solving the problem that the expansion of the existing cluster is limited by nodes, enhancing the expandability and improving the availability and the processing performance of a system, and comprises:
the device login message receiving module is used for receiving a device login message sent by an EMQX server node, corresponding node information and a global subject identifier, wherein the global subject identifier is pre-established by the EMQX server node, the device login message, the corresponding node information and the global subject identifier are sent after the EMQX server node establishes connection with a device terminal according to a connection request message, and the connection request message is sent by the device terminal to the EMQX server node on a target EMQX server cluster according to the connection address information of the target EMQX server cluster;
the cluster information determining module is used for determining the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification;
and the cluster information storage module is used for storing the attribution cluster information of the equipment terminal.
Further, the internet of things platform further comprises:
and the uplink message receiving module is used for receiving an equipment uplink message sent by the EMQX server node, wherein the equipment uplink message is sent to the EMQX server node after the equipment end establishes connection with the EMQX server node.
Further, the internet of things platform further comprises:
the platform instruction generating module is used for generating a platform instruction corresponding to the equipment terminal;
the cluster information searching module is used for searching the attribution cluster information of the equipment terminal according to the platform instruction;
and the platform instruction sending module is used for sending a platform instruction to the corresponding EMQX server node according to the attribution cluster information, and the platform instruction is used for being sent to the equipment end through the EMQX server node.
Further, the platform instruction sending module is further configured to:
and if the attribution cluster information is empty, the Internet of things platform sends a platform instruction to the default basic cluster.
Further, the platform instruction sending module is further configured to:
and if the attribution cluster information is not empty, the platform of the Internet of things sends a platform instruction to the EMQX server node in the attribution cluster information.
Further, the node information includes: IP address information and port information.
The embodiment of the invention provides an Internet of things message middleware server cluster expansion system, which is used for solving the problem that the existing cluster limits node expansion, enhancing expandability and improving the availability and processing performance of the system, and comprises the following components: the system comprises an equipment end, a target EMQX server cluster and an Internet of things platform, wherein the Internet of things platform comprises the Internet of things platform.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the Internet of things message middleware server cluster expansion method is realized.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program for executing the method for expanding the message middleware server cluster of the internet of things.
The method comprises the steps that an equipment login message, corresponding node information and a global subject identifier sent by an EMQX server node are received through an Internet of things platform, the global subject identifier is pre-established by the EMQX server node, the equipment login message, the corresponding node information and the global subject identifier are sent after the EMQX server node establishes connection with an equipment end according to a connection request message, and the connection request message is sent to the EMQX server node on a target EMQX server cluster by the equipment end according to the connection address information of the target EMQX server cluster; the Internet of things platform determines the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification; and storing the attribution cluster information of the equipment side by the platform of the Internet of things. In the embodiment of the invention, the global theme mark is pre-established on the EMQX server node, the equipment end sends the connection request message to the EMQX server node on the target EMQX server cluster according to the connection address information of the target EMQX server cluster, the EMQX server node establishes connection with the equipment end according to the connection request message and sends the equipment login message, the corresponding node information and the global theme mark to the Internet of things platform, further, the Internet of things platform can determine and store the home cluster information of the equipment end according to the equipment login message, the home cluster information of the equipment end, the target of expanding the number of the newly-increased nodes of the cluster is realized, when the cluster needs to be expanded, the home cluster information of the equipment end which is newly configured with the new cluster is only needed to be newly added on the Internet of things platform, the problem that the expansion of the nodes is limited by the EMQ X Broker of the existing open source free edition is solved, and the requirement of communication between mass equipment and the platform is met, the usability and the processing performance of the system are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a flowchart of an internet of things message middleware server cluster expansion method in an embodiment of the present invention;
fig. 2 is a flowchart of another method for expanding a message middleware server cluster in the internet of things according to the embodiment of the present invention;
fig. 3 is a flowchart of another method for expanding a message middleware server cluster in the internet of things according to the embodiment of the present invention;
fig. 4 to 6 are schematic diagrams illustrating a method for expanding a cluster of message middleware servers of the internet of things according to an embodiment of the present invention;
FIG. 7 is a diagram of a platform structure of the Internet of things in the embodiment of the invention;
fig. 8 is a structural diagram of another internet of things platform according to an embodiment of the present invention;
fig. 9 is a structural diagram of another internet of things platform according to an embodiment of the present invention;
fig. 10 is a diagram of an internet of things message middleware server cluster expansion system in the embodiment of the present invention;
fig. 11 is a schematic diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
First, the techniques involved in the embodiments of the present invention are explained:
EMQX Broker: (Erlang/Enterprise/Elastic MQTT Broker) EMQX open source edition provides support for common Internet of things protocols such as an MQTT protocol, CoAP and LwM 2M; supporting 10 ten thousand levels of concurrent connection; is an open-source MQTT message server in a publish-subscribe mode.
Erlang/OTP: the method is an excellent Soft-real-time (Soft-real), Low-Latency (Low-Latency) and Distributed (Distributed) language platform.
MQTT: is a Lightweight (Lightweight) and publish-subscribe mode (PubSub) message protocol of the internet of things.
Message middleware: is a supporting software system based on queue and message transmission technology and providing synchronous or asynchronous reliable message transmission for application system in network environment
Port number: the client can find the corresponding server end through the ip address, but the server end has a plurality of ports, each application program corresponds to a port number, and the client can really access the server through the port number similar to a house number. To distinguish the ports, each port is numbered, i.e., a port number.
Node (Node): the Erlang/OTP language platform distributed program is composed of Erlang operating systems which are distributed and interconnected, each Erlang operating system is called a Node (Node), and the nodes (nodes) are interconnected through TCP and communicated in a message transmission mode. The Erlang nodes are identified by unique node names, and the nodes are addressed through communication through the names. 1 IP address +1 port number, namely 1 node can be appointed; multiple EMQX server nodes may be included under 1 target EMQX server cluster.
In order to solve the problem of restricting node expansion by an existing cluster, enhance expandability, and improve system availability and processing performance, an embodiment of the present invention provides an internet of things message middleware server cluster expansion method, and fig. 1 is a flowchart of an internet of things message middleware server cluster expansion method provided in an embodiment of the present invention, and as shown in fig. 1, the method includes the following steps:
step 101, an internet of things platform receives an equipment login message, corresponding node information and a global subject identifier sent by an EMQX server node, wherein the global subject identifier is pre-established by the EMQX server node, the equipment login message, the corresponding node information and the global subject identifier are sent after the EMQX server node establishes connection with an equipment terminal according to a connection request message, and the connection request message is sent to the EMQX server node on a target EMQX server cluster by the equipment terminal according to the connection address information of the target EMQX server cluster;
102, determining the attribution cluster information of the equipment terminal by the Internet of things platform according to the equipment login information, the corresponding node information and the global subject identification;
and 103, storing the attribution cluster information of the equipment side by the platform of the Internet of things.
As shown in fig. 1, in the embodiment of the present invention, an internet of things platform receives an equipment login message, corresponding node information, and a global subject identifier sent by an EMQX server node, where the global subject identifier is pre-established by the EMQX server node, the equipment login message, the corresponding node information, and the global subject identifier are sent after the EMQX server node establishes a connection with an equipment terminal according to a connection request message, and the connection request message is sent by the equipment terminal to the EMQX server node on a target EMQX server cluster according to connection address information of the target EMQX server cluster; the Internet of things platform determines the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification; and storing the attribution cluster information of the equipment side by the platform of the Internet of things. In the embodiment of the invention, the global theme mark is pre-established on the EMQX server node, the equipment end sends the connection request message to the EMQX server node on the target EMQX server cluster according to the connection address information of the target EMQX server cluster, the EMQX server node establishes connection with the equipment end according to the connection request message and sends the equipment login message, the corresponding node information and the global theme mark to the Internet of things platform, further, the Internet of things platform can determine and store the home cluster information of the equipment end according to the equipment login message, the home cluster information of the equipment end, the target of expanding the number of the newly-increased nodes of the cluster is realized, when the cluster needs to be expanded, the home cluster information of the equipment end which is newly configured with the new cluster is only needed to be newly added on the Internet of things platform, the problem that the expansion of the nodes is limited by the EMQ XBroker of the existing open source free edition is solved, and the requirement of communication between mass equipment and the platform is met, the usability and the processing performance of the system are improved.
In one embodiment, as shown in fig. 2, the method for extending the message middleware server cluster of the internet of things in fig. 1 further includes:
and step 104, the Internet of things platform receives an equipment uplink message sent by the EMQX server node, wherein the equipment uplink message is sent to the EMQX server node after the equipment end establishes connection with the EMQX server node.
In one embodiment, as shown in fig. 3, the method for extending the message middleware server cluster of the internet of things further includes:
301, generating a platform instruction corresponding to the equipment terminal by the platform of the internet of things;
step 302, the internet of things platform searches the attribution cluster information of the equipment terminal according to the platform instruction;
and 303, the platform of the internet of things sends a platform instruction to the corresponding EMQX server node according to the attribution cluster information, wherein the platform instruction is used for being sent to the equipment end through the EMQX server node.
In this embodiment, the sending, by the internet of things platform, a platform instruction to the corresponding EMQX server node according to the attribution cluster information includes:
and if the attribution cluster information is empty, the Internet of things platform sends a platform instruction to the default basic cluster.
In this embodiment, the sending, by the internet of things platform, a platform instruction to the corresponding EMQX server node according to the attribution cluster information includes:
and if the attribution cluster information is not empty, the platform of the Internet of things sends a platform instruction to the EMQX server node in the attribution cluster information.
In one embodiment, the node information includes: IP address information and port information.
In specific implementation, the target EMQX server cluster comprises 2 or more EMQX servers (EMQX server nodes), and the EMQX server nodes are connected with the equipment end and the Internet of things platform to provide corresponding services for the equipment end and the Internet of things platform; a global theme identifier is pre-established on the EMQX server node, where the global theme identifier is a login message of an equipment terminal which subscribes the internet of things platform to the EMQX server, and the internet of things platform subscribes the theme. The IP address of the EMQX server node is static, and the data sent by the equipment needs to specify the 'IP address information + port information' of the EMQX, namely the corresponding EMQX server node. The method comprises the steps that a device end is accessed to a standard SDK or Agent program of an Internet of things platform, all node information of a device connection target EMQX server cluster is written in advance, and a communication address of the device and the target EMQX server cluster is determined; the login message of the device side belongs to the service content subscribed by the global theme. The Internet of things platform can communicate with the equipment end through a target EMQX server cluster and has node information of all EMQX server nodes; a global subscription theme module relation is established with the EMQX, and device login messages of all devices of the platform are subscribed; each EMQX server node has a corresponding unique identifier on the Internet of things platform.
A specific embodiment is given below to describe a specific application of the method for expanding the cluster of the message middleware server of the internet of things in the embodiment of the present invention. In this embodiment, as shown in fig. 4 to 6, the overall system architecture includes: the system comprises an equipment end, a target EMQX server cluster and an Internet of things platform. When the system needs to expand the cluster, only the information of the new cluster needs to be newly configured on the platform of the Internet of things. In the uplink and downlink processes of the equipment message, the communication between the EMXQ cluster and the equipment end and the Internet of things platform comprises the following steps:
1. and (5) message uplink process, as shown in figure 5.
The equipment is on line: step 1, equipment side logs in, and is randomly connected with a target EMQX server cluster through certain node information through the connection address information of the target cluster; step 2, after receiving the connection request of the equipment terminal, the EMQX server node uploads the connection message of the equipment and the node information of the EMQX connected with the current equipment to the Internet of things platform together; step 3, after receiving the equipment login message, the Internet of things platform judges the cluster to which the equipment belongs according to the node information of the EMQX connected with the current equipment, and stores the cluster information of the EMQX connected with the current equipment; and 4, after the equipment is connected with the EMQX server node, forwarding the message of the equipment uplink message to the Internet of things platform by the EMQX, and receiving the data by the platform.
2. Message downlink (platform instruction) procedure, as shown in fig. 6.
Step 1, an Internet of things platform issues an instruction to equipment; step 2, platform query: whether cluster information for the device is reserved; step 3, if the cluster information of the equipment is empty, entering step 4; if the cluster information of the equipment is not null, entering step 5; step 4, if the cluster information of the device is null, the platform issues the instruction to a default cluster (the default cluster is a basic cluster supported by the corresponding emqxBroker version, and the cluster is only specified); step 5, if the cluster information of the equipment is not empty, issuing an instruction according to the cluster information of the equipment; step 6, searching corresponding EMQX connection according to the cluster group; step 7, the target EMQX server cluster receives the information and issues an instruction to the terminal; and 8, the terminal equipment receives the platform instruction.
The embodiment of the invention solves the problem that the expansion of the EMQ X Broker limit node of the existing open source free edition; the expandability is strong, the cluster of the EMQ X Broker can be infinitely expanded, and the requirement of communication between mass equipment and a platform is met; and determining the cluster affiliation of the equipment through an uplink data source, and supporting the multi-EMQX cluster subscription function of the platform. Specifically, the embodiment of the invention has the following advantages:
1. the expandability is strong: the invention has strong expandability, can infinitely expand the EMQX cluster, and meets the requirement of communication between mass equipment and a platform;
2. high availability: expanding the number of clusters can improve the availability of the system, improve the processing performance of the system and reduce the time that the system can not provide services due to the limited number of EMQX connections.
3. The internal and external network devices can be distinguished: the cluster of the EMQX Broker is expanded from 1 to a plurality of internal and external networks which can be distinguished, the internal network equipment communicates through nodes of the internal network, and the external network equipment communicates through nodes of the external network to physically isolate the equipment. And similarly, the devices with different service types can be distinguished and distributed.
Based on the same inventive concept, the embodiment of the invention also provides an internet of things platform, as described in the following embodiments. Because the principle of solving the problems of the internet of things platform is similar to the internet of things message middleware server cluster expansion method, the implementation of the internet of things platform can refer to the implementation of the method, and repeated parts are not described again.
Fig. 7 is a structural diagram of an internet of things platform provided in an embodiment of the present invention, and as shown in fig. 7, the internet of things platform provided in the embodiment of the present invention may include:
a login message receiving module 701, configured to receive an equipment login message sent by an EMQX server node, corresponding node information, and a global subject identifier, where the global subject identifier is pre-established by the EMQX server node, the equipment login message, the corresponding node information, and the global subject identifier are sent after the EMQX server node establishes a connection with an equipment end according to a connection request message, and the connection request message is sent by the equipment end to the EMQX server node on a target EMQX server cluster according to connection address information of the target EMQX server cluster;
a cluster information determining module 702, configured to determine, according to the device login message, the corresponding node information, and the global subject identifier, home cluster information of the device side;
a cluster information storage module 703, configured to store the home cluster information of the device side.
In one embodiment, as shown in fig. 8, the internet of things platform of fig. 7 further includes:
an uplink message receiving module 704, configured to receive an equipment uplink message sent by an EMQX server node, where the equipment uplink message is sent to the EMQX server node after a connection is established between an equipment end and the EMQX server node.
In one embodiment, as shown in fig. 9, the internet of things platform further includes:
a platform instruction generating module 901, configured to generate a platform instruction corresponding to the device side;
a cluster information searching module 902, configured to search, according to the platform instruction, home cluster information of the device side;
a platform instruction sending module 903, configured to send a platform instruction to a corresponding EMQX server node according to the home cluster information, where the platform instruction is sent to an equipment end via the EMQX server node.
In one embodiment, the platform instruction sending module 903 is further configured to:
and if the attribution cluster information is empty, the Internet of things platform sends a platform instruction to the default basic cluster.
In one embodiment, the platform instruction sending module 903 is further configured to:
and if the attribution cluster information is not empty, the platform of the Internet of things sends a platform instruction to the EMQX server node in the attribution cluster information.
In one embodiment, the node information includes: IP address information and port information.
Based on the same inventive concept, the embodiment of the invention also provides an internet of things message middleware server cluster expansion system, which is described in the following embodiments. Because the principle of solving the problems of the internet of things message middleware server cluster expansion system is similar to the internet of things message middleware server cluster expansion method, the implementation of the internet of things message middleware server cluster expansion system can refer to the implementation of the method, and repeated parts are not described again.
Fig. 10 is a structural diagram of an internet of things message middleware server cluster extension system provided in an embodiment of the present invention, and as shown in fig. 10, the internet of things message middleware server cluster extension system provided in the embodiment of the present invention may include: the system comprises an equipment end, a target EMQX server cluster and an Internet of things platform.
In summary, in the embodiments of the present invention, an internet of things platform receives an equipment login message, corresponding node information, and a global subject identifier sent by an EMQX server node, where the global subject identifier is pre-established by the EMQX server node, the equipment login message, the corresponding node information, and the global subject identifier are sent after the EMQX server node establishes a connection with an equipment end according to a connection request message, and the connection request message is sent by the equipment end to the EMQX server node on a target EMQX server cluster according to connection address information of the target EMQX server cluster; the Internet of things platform determines the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification; and storing the attribution cluster information of the equipment side by the platform of the Internet of things. In the embodiment of the invention, the global theme mark is pre-established on the EMQX server node, the equipment end sends the connection request message to the EMQX server node on the target EMQX server cluster according to the connection address information of the target EMQX server cluster, the EMQX server node establishes connection with the equipment end according to the connection request message and sends the equipment login message, the corresponding node information and the global theme mark to the Internet of things platform, further, the Internet of things platform can determine and store the home cluster information of the equipment end according to the equipment login message, the home cluster information of the equipment end, the target of expanding the number of the newly-increased nodes of the cluster is realized, when the cluster needs to be expanded, the home cluster information of the equipment end which is newly configured with the new cluster is only needed to be newly added on the Internet of things platform, the problem that the expansion of the nodes is limited by the EMQ X Broker of the existing open source free edition is solved, and the requirement of communication between mass equipment and the platform is met, the usability and the processing performance of the system are improved.
Based on the same inventive concept, the embodiment of the invention also provides an embodiment of electronic equipment for realizing all or part of contents in the method for expanding the message middleware server cluster of the internet of things. The electronic device specifically comprises the following contents:
a processor (processor), a memory (memory), a communication Interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete mutual communication through the bus; the communication interface is used for realizing information transmission between related devices; the electronic device may be a desktop computer, a tablet computer, a mobile terminal, and the like, but the embodiment is not limited thereto. In this embodiment, the electronic device may be implemented with reference to the embodiment for implementing the method for expanding the message middleware server cluster of the internet of things and the embodiment for implementing the platform of the internet of things in the embodiment, and the contents thereof are incorporated herein, and repeated details are not described herein.
Fig. 11 is a schematic diagram of a system configuration structure of an electronic device according to an embodiment of the present invention. As shown in fig. 11, the electronic device 110 may include a processor 1101 and a memory 1102; the memory 1102 is coupled to the processor 1101. Notably, this FIG. 11 is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the functionality implemented by the internet of things message middleware server cluster expansion method may be integrated into the processor 1101. Among other things, the processor 1101 may be configured to control: the method comprises the steps that an Internet of things platform receives equipment login information, corresponding node information and a global subject identification which are sent by an EMQX server node, wherein the global subject identification is pre-established by the EMQX server node, the equipment login information, the corresponding node information and the global subject identification are sent after the EMQX server node establishes connection with an equipment end according to a connection request message, and the connection request message is sent to the EMQX server node on a target EMQX server cluster by the equipment end according to the connection address information of the target EMQX server cluster; the Internet of things platform determines the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification; and storing the attribution cluster information of the equipment side by the platform of the Internet of things.
As can be seen from the above, in the electronic device provided in the embodiment of the present invention, the internet of things platform receives the device login message, the corresponding node information, and the global subject identifier sent by the EMQX server node, where the global subject identifier is pre-established by the EMQX server node, the device login message, the corresponding node information, and the global subject identifier are sent after the EMQX server node establishes connection with the device end according to the connection request message, and the connection request message is sent by the device end to the EMQX server node on the target EMQX server cluster according to the connection address information of the target EMQX server cluster; the Internet of things platform determines the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification; and storing the attribution cluster information of the equipment side by the platform of the Internet of things.
The electronic equipment provided by the embodiment of the invention can solve the problem that the existing cluster limits the node expansion, enhance the expandability and improve the availability and the processing performance of the system.
In another embodiment, the internet of things platform may be configured separately from the processor 1101, for example, the internet of things platform may be configured as a chip connected to the processor 1101, and the functions of the internet of things message middleware server cluster expansion method are realized by the control of the processor.
As shown in fig. 11, the electronic device 110 may further include: a communication module 1106, an input unit 1104, an audio processing unit 1105, a display 1106, and a power supply 1103. It is noted that the electronic device 110 does not necessarily include all of the components shown in FIG. 11; furthermore, the electronic device 110 may also include components not shown in fig. 11, which may be referred to in the prior art.
As shown in fig. 11, the processor 1101, which is sometimes referred to as a controller or operational control, may comprise a microprocessor or other processor device and/or logic device, the processor 1101 receiving input and controlling the operation of the various components of the electronic device 110.
The memory 1102 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the processor 1101 may execute the program stored in the memory 1102 to realize information storage or processing, or the like.
An input unit 1104 provides input to the processor 1101. The input unit 1104 is, for example, a key or a touch input device internet of things platform. The power supply 1103 is used to supply power to the electronic device 110. The display 1106 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 1102 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 1102 may also be some other type of device. Memory 1102 includes a buffer memory 11021 (sometimes referred to as a buffer). The memory 1102 may include an application/function storage 11022, the application/function storage 11022 being used to store application programs and function programs or for executing a flow of operations of the electronic device 110 by the processor 1101.
The memory 1102 may also include a data store 11023, the data store 11023 being configured to store data such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage 11024 of the memory 1102 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, address book applications, etc.).
The communication module 1103 is a transmitter/receiver that transmits and receives signals via the antenna 1108. A communication module (transmitter/receiver) 1103 is coupled to the processor 1101 to provide input signals and receive output signals, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 1103, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be disposed in the same electronic device. The communication module (transmitter/receiver) 1103 is also coupled to a speaker 1109 and a microphone 1110 via an audio processing unit 1105 to provide audio output via the speaker 1109 and receive audio input from the microphone 1110, thereby implementing ordinary telecommunication functions. The audio processing unit 1105 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processing unit 1105 is also coupled to the processor 1101 so that sound can be recorded locally through the microphone 1110 and so that locally stored sound can be played through the speaker 1109.
An embodiment of the present invention further provides a computer-readable storage medium for implementing all the steps in the method for extending an internet of things message middleware server cluster in the foregoing embodiments, where the computer-readable storage medium stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements all the steps in the method for extending an internet of things message middleware server cluster in the foregoing embodiments, for example, when the processor executes the computer program, the processor implements the following steps: the method comprises the steps that an Internet of things platform receives equipment login information, corresponding node information and a global subject identification which are sent by an EMQX server node, wherein the global subject identification is pre-established by the EMQX server node, the equipment login information, the corresponding node information and the global subject identification are sent after the EMQX server node establishes connection with an equipment end according to a connection request message, and the connection request message is sent to the EMQX server node on a target EMQX server cluster by the equipment end according to the connection address information of the target EMQX server cluster; the Internet of things platform determines the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification; and storing the attribution cluster information of the equipment side by the platform of the Internet of things.
As can be seen from the above, in the computer-readable storage medium provided in the embodiment of the present invention, the internet of things platform receives the device login message, the corresponding node information, and the global subject identifier sent by the EMQX server node, where the global subject identifier is pre-established by the EMQX server node, the device login message, the corresponding node information, and the global subject identifier are sent after the EMQX server node establishes a connection with the device terminal according to the connection request message, and the connection request message is sent by the device terminal to the EMQX server node on the target EMQX server cluster according to the connection address information of the target EMQX server cluster; the Internet of things platform determines the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification; and storing the attribution cluster information of the equipment side by the platform of the Internet of things.
The computer-readable storage medium provided by the embodiment of the invention can solve the problem that the existing cluster limits the node expansion, enhance the expandability and improve the system availability and processing performance.
Although the present invention provides method steps as described in the examples or flowcharts, more or fewer steps may be included based on routine or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or client product executes, it may execute sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, apparatus (system) or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or 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. The terms "upper", "lower", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the referred devices or elements must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Unless expressly stated or limited otherwise, the terms "mounted," "connected," and "connected" are intended to be inclusive and mean, for example, that they may be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations. It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention is not limited to any single aspect, nor is it limited to any single embodiment, nor is it limited to any combination and/or permutation of these aspects and/or embodiments. Each aspect and/or embodiment of the invention can be used alone or in combination with one or more other aspects and/or embodiments.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.

Claims (15)

1. A method for expanding a message middleware server cluster of the Internet of things is characterized by comprising the following steps:
the method comprises the steps that an Internet of things platform receives equipment login information, corresponding node information and a global subject identification which are sent by an EMQX server node, wherein the global subject identification is pre-established by the EMQX server node, the equipment login information, the corresponding node information and the global subject identification are sent after the EMQX server node establishes connection with an equipment end according to a connection request message, and the connection request message is sent to the EMQX server node on a target EMQX server cluster by the equipment end according to the connection address information of the target EMQX server cluster;
the Internet of things platform determines the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification;
and storing the attribution cluster information of the equipment side by the platform of the Internet of things.
2. The method for expanding a cluster of message middleware servers of the internet of things according to claim 1, further comprising:
and the Internet of things platform receives an equipment uplink message sent by the EMQX server node, wherein the equipment uplink message is sent to the EMQX server node after the equipment end establishes connection with the EMQX server node.
3. The method for expanding a cluster of message middleware servers of the internet of things according to claim 1, further comprising:
the platform of the Internet of things generates a platform instruction corresponding to the equipment terminal;
the Internet of things platform searches the attribution cluster information of the equipment terminal according to the platform instruction;
and the Internet of things platform sends a platform instruction to the corresponding EMQX server node according to the attribution cluster information, and the platform instruction is used for being sent to the equipment end through the EMQX server node.
4. The method for expanding the message middleware server cluster of the internet of things according to claim 3, wherein the sending, by the internet of things platform, a platform instruction to the corresponding EMQX server node according to the home cluster information comprises:
and if the attribution cluster information is empty, the Internet of things platform sends a platform instruction to the default basic cluster.
5. The method for expanding the message middleware server cluster of the internet of things according to claim 3, wherein the sending, by the internet of things platform, a platform instruction to the corresponding EMQX server node according to the home cluster information comprises:
and if the attribution cluster information is not empty, the platform of the Internet of things sends a platform instruction to the EMQX server node in the attribution cluster information.
6. The method for expanding the message middleware server cluster of the internet of things according to any one of claims 1 to 5, wherein the node information comprises: IP address information and port information.
7. An internet of things platform, comprising:
the device login message receiving module is used for receiving a device login message sent by an EMQX server node, corresponding node information and a global subject identifier, wherein the global subject identifier is pre-established by the EMQX server node, the device login message, the corresponding node information and the global subject identifier are sent after the EMQX server node establishes connection with a device terminal according to a connection request message, and the connection request message is sent by the device terminal to the EMQX server node on a target EMQX server cluster according to the connection address information of the target EMQX server cluster;
the cluster information determining module is used for determining the attribution cluster information of the equipment terminal according to the equipment login information, the corresponding node information and the global subject identification;
and the cluster information storage module is used for storing the attribution cluster information of the equipment terminal.
8. The internet of things platform of claim 7, further comprising:
and the uplink message receiving module is used for receiving an equipment uplink message sent by the EMQX server node, wherein the equipment uplink message is sent to the EMQX server node after the equipment end establishes connection with the EMQX server node.
9. The internet of things platform of claim 7, further comprising:
the platform instruction generating module is used for generating a platform instruction corresponding to the equipment terminal;
the cluster information searching module is used for searching the attribution cluster information of the equipment terminal according to the platform instruction;
and the platform instruction sending module is used for sending a platform instruction to the corresponding EMQX server node according to the attribution cluster information, and the platform instruction is used for being sent to the equipment end through the EMQX server node.
10. The internet of things platform of claim 9, wherein the platform instruction sending module is further to:
and if the attribution cluster information is empty, the Internet of things platform sends a platform instruction to the default basic cluster.
11. The internet of things platform of claim 9, wherein the platform instruction sending module is further to:
and if the attribution cluster information is not empty, the platform of the Internet of things sends a platform instruction to the EMQX server node in the attribution cluster information.
12. The internet of things platform of any one of claims 7-11, wherein the node information comprises: IP address information and port information.
13. An internet of things message middleware server cluster expansion system is characterized by comprising: the device side, the target EMQX server cluster and the internet of things platform, wherein the internet of things platform comprises the internet of things platform of any one of claims 7-12.
14. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the internet of things message middleware server cluster expansion method of any one of claims 1 to 6 when executing the computer program.
15. A computer-readable storage medium storing a computer program for executing the method for extending a message middleware server cluster of the internet of things according to any one of claims 1 to 6.
CN202110842857.8A 2021-07-26 2021-07-26 Internet of things message middleware server cluster expansion method and system Active CN113612825B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110842857.8A CN113612825B (en) 2021-07-26 2021-07-26 Internet of things message middleware server cluster expansion method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110842857.8A CN113612825B (en) 2021-07-26 2021-07-26 Internet of things message middleware server cluster expansion method and system

Publications (2)

Publication Number Publication Date
CN113612825A true CN113612825A (en) 2021-11-05
CN113612825B CN113612825B (en) 2023-07-11

Family

ID=78338336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110842857.8A Active CN113612825B (en) 2021-07-26 2021-07-26 Internet of things message middleware server cluster expansion method and system

Country Status (1)

Country Link
CN (1) CN113612825B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114615277A (en) * 2022-03-04 2022-06-10 杭州觅恒科技有限公司 EMQ X-based multi-cluster dynamic expansion method and system
CN114978683A (en) * 2022-05-20 2022-08-30 深圳市艾迪思特信息技术有限公司 Reverse proxy system based on MQTT protocol

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040255002A1 (en) * 2003-06-12 2004-12-16 Newisys, Inc., A Delaware Corporation Methods and apparatus for extended packet communications between multiprocessor clusters
US20180367610A1 (en) * 2017-06-19 2018-12-20 Beijing Baidu Netcom Science And Technology Co., Ltd. Data storage method and server applicable to distributed server cluster
CN109587228A (en) * 2018-11-23 2019-04-05 济南浪潮高新科技投资发展有限公司 A kind of publicly-owned agreement platform of internet of things and equipment cut-in method
CN111405021A (en) * 2020-03-10 2020-07-10 中国建设银行股份有限公司 Data transmission method, device, equipment and storage medium of peer-to-peer node

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040255002A1 (en) * 2003-06-12 2004-12-16 Newisys, Inc., A Delaware Corporation Methods and apparatus for extended packet communications between multiprocessor clusters
US20180367610A1 (en) * 2017-06-19 2018-12-20 Beijing Baidu Netcom Science And Technology Co., Ltd. Data storage method and server applicable to distributed server cluster
CN109587228A (en) * 2018-11-23 2019-04-05 济南浪潮高新科技投资发展有限公司 A kind of publicly-owned agreement platform of internet of things and equipment cut-in method
CN111405021A (en) * 2020-03-10 2020-07-10 中国建设银行股份有限公司 Data transmission method, device, equipment and storage medium of peer-to-peer node

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114615277A (en) * 2022-03-04 2022-06-10 杭州觅恒科技有限公司 EMQ X-based multi-cluster dynamic expansion method and system
CN114615277B (en) * 2022-03-04 2024-01-16 杭州觅恒科技有限公司 Multi-cluster dynamic expansion method and system based on EMQ X
CN114978683A (en) * 2022-05-20 2022-08-30 深圳市艾迪思特信息技术有限公司 Reverse proxy system based on MQTT protocol

Also Published As

Publication number Publication date
CN113612825B (en) 2023-07-11

Similar Documents

Publication Publication Date Title
US20170163479A1 (en) Method, Device and System of Renewing Terminal Configuration In a Memcached System
US20130179558A1 (en) Server management using a baseboard management controller to establish a wireless network
CN111711663A (en) Processing method and device for publishing and subscribing services and electronic equipment
CN111031058A (en) Websocket-based distributed server cluster interaction method and device
US8868744B2 (en) Transactional messaging support in connected messaging networks
CN113783922A (en) Load balancing method, system and device
CN110661871B (en) Data transmission method and MQTT server
CN113612825B (en) Internet of things message middleware server cluster expansion method and system
KR20150112742A (en) Device controlling method, client, server and intermediate device
US20150088995A1 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
CN105518645A (en) Load-balanced, persistent connection techniques
CN110543428B (en) Application system testing method and device
CN112328413B (en) Application service calling method, device and system
CN114338063B (en) Message queue system, service processing method and computer readable storage medium
CN107579929B (en) Method, system and related device for setting reliable connection communication queue pair
WO2012019391A1 (en) System and method for obtaining detail information of number
US9485321B2 (en) Method and apparatus for brokering server and device communications and computer-readable storage medium for executing the method
CN115550354A (en) Data processing method and device and computer readable storage medium
CN103827830A (en) System and method for preventing single-point bottleneck in a transactional middleware machine environment
CN113438251A (en) Protocol conversion method, device and system
CN108900579A (en) Communication system, communication method, device, equipment and medium
CN112714146B (en) Resource scheduling method, device, equipment and computer readable storage medium
CN109981778B (en) Method, device, equipment and storage medium for realizing service of content distribution network
CN110784510A (en) Method for accessing target service node to bus and information interaction method of service node
CN114697339A (en) Load balancing method and device under centralized architecture

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
GR01 Patent grant
GR01 Patent grant