CN114051030B - Communication method, communication device, intelligent community system and storage medium - Google Patents

Communication method, communication device, intelligent community system and storage medium Download PDF

Info

Publication number
CN114051030B
CN114051030B CN202111333200.5A CN202111333200A CN114051030B CN 114051030 B CN114051030 B CN 114051030B CN 202111333200 A CN202111333200 A CN 202111333200A CN 114051030 B CN114051030 B CN 114051030B
Authority
CN
China
Prior art keywords
message
edge
processing module
cloud
center
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
CN202111333200.5A
Other languages
Chinese (zh)
Other versions
CN114051030A (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.)
Guangdong Ruizhu Intelligent Technology Co ltd
Original Assignee
Guangdong Ruizhu Intelligent Technology 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 Guangdong Ruizhu Intelligent Technology Co ltd filed Critical Guangdong Ruizhu Intelligent Technology Co ltd
Priority to CN202111333200.5A priority Critical patent/CN114051030B/en
Publication of CN114051030A publication Critical patent/CN114051030A/en
Application granted granted Critical
Publication of CN114051030B publication Critical patent/CN114051030B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a communication method, a communication device, a smart community system and a storage medium. The communication method is used for a home system, and the home system comprises a plurality of cloud processing modules and a plurality of edge processing modules. The communication method comprises the following steps: receiving a control request sent by a terminal, wherein the control request is generated according to input operation on the terminal; one cloud processing module is enabled to issue a subject message to a message processing center according to the control request; subscribing one of the edge processing modules from the message processing center and analyzing the subject message; and sending a control instruction to the intelligent equipment according to the analysis result. According to the communication method, the cloud processing modules and the edge processing modules can enable other processing modules to be taken over for work when one of the cloud processing modules and/or one of the edge processing modules is down, so that the system performance is improved; only one edge processing module analyzes the subject message, so that the intelligent device is prevented from being repeatedly controlled due to repeated analysis.

Description

Communication method, communication device, intelligent community system and storage medium
Technical Field
The application relates to the technical field of the internet of things, in particular to a communication method, a communication device, an intelligent community system and a storage medium.
Background
Along with the rapid development of the internet of things, intelligent home is also rapidly developed as home equipment connected by the internet of things technology. When the state of intelligent equipment and the data of the intelligent equipment are collected in the intelligent community system based on the internet of things technology, the intelligent community system is limited by a traditional internet of things communication scheme, and performance bottleneck problems are easy to occur in the communication process of the intelligent equipment and the cloud.
Disclosure of Invention
The embodiment of the application provides a communication method, a communication device, a smart community system and a storage medium.
The communication method of the embodiment of the application is used for an intelligent home, the intelligent home comprises a plurality of cloud processing modules and a plurality of edge processing modules, and the communication method comprises the following steps:
receiving a control request sent by a terminal, wherein the control request is generated according to an input operation on the terminal;
one cloud processing module is enabled to issue a subject message to a message processing center according to the control request;
subscribing one of the edge processing modules from the message processing center and analyzing the subject message;
and sending a control instruction to the intelligent equipment according to the analysis result.
According to the communication method, as the intelligent home is provided with the cloud processing modules and the edge processing modules, when one of the cloud processing modules and/or one of the edge processing modules is down, the communication method can be continuously completed by the other processing modules, so that the purposes of improving the system performance and the usability are achieved; and only one of the edge processing modules subscribes and analyzes the theme message from the message processing center, so that the problem that the control instruction is repeatedly issued due to repeated analysis of the theme message issued according to the control request, so that the intelligent device is repeatedly controlled to generate unpredictable results is avoided.
In some embodiments, the enabling one of the cloud processing modules to issue the subject message to the message processing center according to the control request includes:
load balancing is carried out on the cloud processing modules according to the control request;
and based on a load balancing result, selecting the corresponding cloud processing module to issue the subject message to the message processing center.
In some embodiments, the cloud processing module and the edge processing module each include an MQTT client application, and a shared subscription mechanism is adopted between a plurality of the edge processing modules, so that only one of the edge processing modules subscribes to the subject message from the message processing center.
In some embodiments, the message processing center includes a plurality of MQTT server-side applications, and the message processing center is configured to store and process the subject message so that the subject message can be subscribed to by the edge-side processing module.
In some embodiments, the sending a control instruction to the intelligent device according to the analysis result includes:
sending the analysis result to a device service center so that the device service center sends the control instruction to the intelligent device
The embodiment of the application provides a communication method for intelligent home, the intelligent home includes a plurality of cloud processing modules and a plurality of edge processing modules, and the communication method includes:
forwarding the report request to the equipment service center;
one of the edge processing modules issues a subject message to a message processing center according to the reporting request;
subscribing one of the cloud processing modules from the message processing center and analyzing the subject message;
and reporting information to the cloud according to the analysis result.
In some embodiments, the cloud processing module and the edge processing module each include an MQTT client application, and a shared subscription mechanism is adopted among the plurality of cloud processing modules, so that only one cloud processing module subscribes to the subject message from the message processing center.
The embodiment of the application provides a communication device, the communication device includes:
the receiving module is used for receiving a control request sent by the terminal, wherein the control request is generated according to input operation on the terminal;
the first execution module is used for enabling one cloud processing module to issue a subject message to the message processing center according to the control request;
the second execution module is used for subscribing one of the edge processing modules from the message processing center and analyzing the subject message;
a sending module for sending control instructions to the intelligent equipment according to the analysis result,
the embodiment of the application provides a smart community system, the smart community system includes:
the cloud comprises a cloud gateway, and a plurality of cloud processing modules are deployed in the cloud gateway;
the edge terminal comprises an edge gateway, and a plurality of edge terminal processing modules are deployed on the edge gateway;
the cloud processing module and the edge processing module perform information interaction through the message processing center;
the device service center is used for controlling the intelligent device and inquiring the state of the intelligent device;
the intelligent equipment can receive the control instruction sent by the equipment service center and report the equipment state to the equipment service center; and
a processor for implementing the communication method in any of the above embodiments.
Embodiments of the present application provide a non-transitory computer-readable storage medium of computer-executable instructions that, when executed by one or more processors, cause the processors to perform the communication method of any of the above embodiments.
Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of a communication method according to an embodiment of the present application;
FIG. 2 is a schematic block diagram of a communication device according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of interaction between a terminal and a smart community system in an embodiment of the present application;
FIG. 4 is a flow chart of a communication method according to an embodiment of the present application;
FIG. 5 is a flow chart of a communication method according to an embodiment of the present application;
fig. 6 is a flow chart of a communication method in an embodiment of the present application.
Description of main reference numerals:
the intelligent community system 1000, the cloud 100, the cloud gateway 11, the cloud processing module 110, the edge 200, the edge gateway 21, the edge processing module 210, the message processing center 300, the equipment service center 400, the intelligent equipment 500, the communication device 600, the receiving module 61, the first executing module 62, the second executing module 63, the sending module 64, the processor 700 and the terminal 2000.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, it should be understood that the terms "center," "longitudinal," "transverse," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," etc. indicate or are based on the orientation or positional relationship shown in the drawings, merely for convenience of description and to simplify the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present application. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the description of the present application, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically connected, electrically connected or can be communicated with each other; can be directly connected or indirectly connected through an intermediate medium, and can be communicated with the inside of two elements or the interaction relationship of the two elements. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be.
In this application, unless expressly stated or limited otherwise, a first feature "above" or "below" a second feature may include both the first and second features being in direct contact, and may also include the first and second features not being in direct contact but being in contact with each other by way of additional features therebetween. Moreover, a first feature being "above," "over" and "on" a second feature includes the first feature being directly above and obliquely above the second feature, or simply indicating that the first feature is higher in level than the second feature. The first feature being "under", "below" and "beneath" the second feature includes the first feature being directly under and obliquely below the second feature, or simply means that the first feature is less level than the second feature.
The following disclosure provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and arrangements of specific examples are described below. Of course, they are merely examples and are not intended to limit the present application. Furthermore, the present application may repeat reference numerals and/or letters in the various examples, which are for the purpose of brevity and clarity, and which do not in themselves indicate the relationship between the various embodiments and/or arrangements discussed. In addition, the present application provides examples of various specific processes and materials, but one of ordinary skill in the art may recognize the application of other processes and/or the use of other materials.
Referring to fig. 1, an embodiment of the present application provides a communication method for smart home. The smart home includes a plurality of cloud processing modules 110 and a plurality of edge processing modules 210, and the communication method includes:
step S10: receiving a control request transmitted from the terminal 2000, the control request being generated according to an input operation at the terminal 2000;
step S20: causing one of the cloud processing modules 110 to issue a subject message to the message processing center 300 according to the control request;
step S30: causing one of the edge processing modules 210 to subscribe to and parse the subject message from the message processing center 300;
step S40: and sending a control instruction to the intelligent device 500 according to the analysis result.
Referring to fig. 2, a communication device 600 is provided in an embodiment of the present application. The communication device 600 includes a receiving module 61, a first executing module 62, a second executing module 63, and a transmitting module 64. Wherein the receiving module 61 is configured to receive a control request sent by the terminal 2000, the control request being generated according to an input operation on the terminal 2000; the first execution module 62 is configured to enable one of the cloud processing modules 110 to issue a subject message to the message processing center 300 according to the control request; the second execution module 63 is configured to make one of the edge processing modules 210 subscribe to and parse the subject message from the message processing center 300; the sending module 64 is configured to send a control instruction to the smart device 500 according to the analysis result.
Referring to fig. 3, an embodiment of the present application provides a smart community system 1000, where the smart community system 1000 includes a cloud end 100, an edge end 200, a message processing center 300, a device service center 400, a smart device 500, and a processor 700. The cloud end 100 includes a cloud end gateway 1111, and the cloud end gateway 1111 is deployed with a plurality of cloud end processing modules 110; edge 200 comprises an edge gateway with a plurality of edge processing modules 210 deployed; the cloud processing module 110 and the edge processing module 210 perform information interaction through the message processing center 300; the device service center 400 is used for controlling the intelligent device 500 and inquiring the state of the intelligent device 500; the intelligent device 500 can accept the control instruction sent by the device service center 400 and report the device status to the device service center 400.
The processor 700 is configured to receive a control request sent by the terminal 2000, and is configured to cause one of the cloud processing modules 110 to issue a subject message to the message processing center 300 according to the control request, and to cause one of the edge processing modules 210 to subscribe to and parse the subject message from the message processing center 300, and to send a control instruction to the smart device 500 according to the parsing result.
In the communication method in the embodiment of the present application, since the home system has a plurality of cloud processing modules 110 and a plurality of edge processing modules 210, when one of the cloud processing modules 110 and/or one of the edge processing modules 210 is down, the rest processing modules can continue to complete the execution of the communication method, thereby achieving the purpose of improving the performance and usability of the intelligent community system 1000; moreover, by only subscribing and parsing the subject message from the message processing center 300 by one of the edge processing modules 210, the problem that the control instruction is repeatedly issued due to repeated parsing of the subject message issued according to the control request is avoided, so that the intelligent device 500 is repeatedly controlled to generate unpredictable results is avoided.
Along with the development of technology, people have a higher pursuit to construct a more convenient, comfortable and safe home environment in a house, so that a smart community system 1000 is generated, and the smart community system 1000 can be constructed by integrating and unifying facilities related to home life by utilizing technologies such as the internet of things, network communication technology, automatic control technology and the like.
In a scenario that the intelligent community system 1000 is applied to the internet of things communication technology, a user can remotely control the state of the intelligent device 500 by sending an instruction to an application program, meanwhile, the state reported by the intelligent device 500 can be analyzed, real-time monitoring of the intelligent device 500 is achieved, an efficient management system for residential facilities and family schedule matters is built, and the living environment of environmental protection and energy saving is improved, wherein the living environment is improved in household safety, convenience and comfort.
It should be appreciated that the preferred internet of things communication protocol is MQTT (Message Queuing Telemetry Transport, message queue telemetry transport protocol), which is a "lightweight" communication protocol based on publish/subscribe (publich/subsc) mode built on TCP/IP protocols. The MQTT has the advantage of providing real-time reliable messaging services for connected remote devices with very little code and limited bandwidth, and is also a low-overhead, low-bandwidth-occupation instant messaging protocol. However, the implementation of the internet of things communication scheme by adopting the MQTT protocol in the smart community system 1000 often faces the following problems, because only a single MQTT client application is deployed between the cloud end 100 and the edge end 200, performance bottlenecks easily occur, for example, an MQTT server is deployed at the cloud end 100, and an MQTT client is deployed at the edge end 200, so that the internet of things communication capability is limited by the processing capability of the MQTT server, and the availability is poor, and the whole system is easily unavailable when the MQTT client is down.
Even if a plurality of MQTT client applications are respectively set at the cloud end 100 and the edge end 200 in view of improving availability and concurrent processing capability, when a user initiates an instruction for controlling the intelligent device 500 through the terminal 2000 such as a mobile phone, the MQTT client applications issue MQTT messages to the MQTT server, for example, the message subject is device_control, and at this time, the MQTT application clients subscribed to the MQTT application subject is device_control consume the MQTT messages, which results in repeated execution of the control instruction to the intelligent device 500 with unpredictable results.
Therefore, the technology of the patent utilizes the 'shared subscription' which is one of the new characteristics of the MQTT5.0 protocol to avoid repeated disappearance of the message and realize the high-availability communication scheme of the Internet of things.
In step S10-step S40, the terminal 2000 may be an electronic device such as a smart phone, a tablet computer, a notebook computer, or a smart band. The terminal 2000 is any type of electronic device, and it is only necessary to ensure that an application program for managing the smart community system 1000 is installed on the terminal 2000, so that the user can remotely control the smart device 500 through the application program. The intelligent device 500 may be a variety of intelligent home devices such as an intelligent light bulb, an intelligent air conditioner, and the like.
For example, in one scenario, a user may click on/off a smart light bulb in an application of a cell phone, and a request to control the smart light bulb may be received by the processor 700 after generation, and then processed for subsequent steps.
Cloud 100 may be an installation-free/portable secure environment for application software, for example, cloud 100 may be a rented cloud server on which application software may be installed and deployed. The edge 200 may refer to a network software and hardware environment near the side of the intelligent device 500 or the data source, and in this application, the local environment where the intelligent device 500 is located is the edge 200.
A plurality of cloud processing modules 110 may be deployed at the cloud gateway 1111 and a plurality of edge processing modules 210 may be deployed at the edge gateway 21. Information interaction between the cloud processing module 110 and the edge processing module 210 can be achieved through the message processing center 300, that is, the cloud processing module 110 and the edge processing module 210 can establish long connection with the message processing center 300, and publish and subscribe messages through the message processing center 300.
Since the MQTT5.0 protocol is applied to the smart community system 1000 in the present application to implement the internet of things communication scheme, it can be understood that after receiving the control request sent by the terminal 2000 via the processor 700 in step S10, the control request may be sent to one of the cloud processing modules 110, so that the control request may be received and processed, so as to issue a theme message to the message processing center 300 according to the control request, where the theme of the theme message depends on the specific control request.
In particular, the control request may be in the nature of an HTTP legal request, and the MQTT is a client-server based message publish/subscribe transport protocol, where both the publisher and subscriber of the message may act as clients, the server as a message broker, and the publisher of the message may also be a subscriber. In this application, when the intelligent community system 1000 applies the protocol to establish the communication scheme of the internet of things, the cloud processing module 110 serves as a client in the MQTT, can establish a long connection with the message processing center 300 serving as a server, is responsible for receiving and processing HTTP legal requests sent by clients such as H5, applet, application software and the like transferred by the processor 700, and issues subject messages to the message processing center 300 based on the control requests.
It can be appreciated that, since the edge gateway is configured with the plurality of edge processing modules 210, in order to avoid that the plurality of edge processing modules 210 subscribe to the message processing center 300 for the subject message, the processor 700 may perform processing in step S30, so that only one of the edge processing modules subscribes to and parses the subject message from the message processing center 300, thereby ensuring that the system is ensured to be high-performance and high-availability while the plurality of edge processing modules 210 are configured to avoid repeated consumption of the subject message.
Finally, after one of the edge processing modules subscribes to and parses the subject message, the processor 700 may send a control instruction to the corresponding smart device 500 according to the parsing result, for example, send a control instruction to the smart bulb to be turned on or turned off according to the input operation of the user, via step S40.
Referring to fig. 4, in some embodiments, the enabling one of the cloud processing modules 110 to issue the subject message to the message processing center 300 according to the control request (step S20) includes:
step S21: performing load balancing on the plurality of cloud processing modules 110 according to the control request;
step S22: based on the load balancing result, the corresponding cloud processing module 110 is selected to issue the subject message to the message processing center 300.
In some embodiments, the first execution module 62 is configured to execute load balancing on the plurality of cloud processing modules 110 according to the control request, and select, based on the load balancing result, the corresponding cloud processing module 110 to issue the subject message to the message processing center 300.
In some embodiments, the processor 700 is configured to perform load balancing on the plurality of cloud processing modules 110 according to the control request, and select a corresponding cloud processing module 110 to issue the subject message to the message processing center 300 based on the load balancing result.
Thus, performing load balancing can improve performance and reliability of communication services.
Specifically, in step S21-step S22, since a plurality of cloud processing modules 110 are provided to improve performance and availability of the smart community system 1000, it is ensured that after any one cloud processing module 110 is down, the processor 700 may forward the control request to the rest of the cloud processing modules 110.
In order to ensure the task amount balance of each cloud processing module 110, the control request is prevented from being forwarded to the same cloud processing module 110, so that the same cloud processing module 110 always issues the subject message to the message processing center 300, and when the control request is forwarded to the cloud processing module 110 to issue the subject message to the message processing center 300 based on the control request, the control request is determined to be forwarded to the corresponding cloud processing module 110 according to the load balancing result, that is, the corresponding cloud processing module 110 completes the message issue.
In the case where a control request is received and a corresponding subject message needs to be issued to the message processing center 300, load balancing may be performed on the plurality of cloud processing modules 110. Load balancing may be implemented by many conventional HTTP load balancing policies, such as HTTP redirect load balancing, DNS domain name resolution load balancing, reverse proxy load balancing policies, IP load balancing policies, and data link load balancing policies. In one embodiment, the method can be realized by adopting a spring-closed eureka registry and an nginx server as reverse proxy and other technical means.
Then, based on the load balancing result, the corresponding cloud processing module 110 may be selected to issue the subject message to the message processing center 300, for example, the cloud processing module 110 with less load is selected, or the cloud processing module 110 installed correspondingly under the cloud server with better running performance is selected to complete the task of issuing the subject message.
Referring to fig. 5, in some embodiments, the cloud processing module 110 and the edge processing module 210 each include MQTT client applications. A shared subscription mechanism may be employed among the plurality of edge processing modules 210 such that only one edge processing module 210 subscribes to subject messages from the message processing center 300.
Thus, the shared subscription mechanism can ensure that the plurality of edge processing modules 210 are arranged to improve the communication performance of the intelligent community system 1000 and ensure high availability, and avoid unpredictable results caused by repeated consumption of the subject message by the plurality of edge processing modules 210, so that the communication in the intelligent community system 1000 is more stable and reliable.
Specifically, it can be understood that when the user initiates the control request through the terminal 2000, the cloud processing module 110 in the present application serves as an MQTT client application in the MQTT, and may issue a subject message of a specific subject to the message processing center 300, that is, the cloud processing module 110 may serve as an issue end; correspondingly, the edge processing module 210 may subscribe to the subject message from the message processing center 300, and then the edge processing module 210 may be a subscription end, and since the subscription end and the publishing end are both clients in the MQTT, the edge processing module 210 as the subscription end may also be an MQTT client application.
The communication scheme of the intelligent community system 1000 in the application is based on the MQTT5.0 protocol, and a new characteristic, namely shared subscription, is introduced in the MQTT5.0 protocol. The shared subscription is equivalent to the load balancing function of the subscription end in the MQTT, that is, load balancing of the plurality of edge processing modules 210 can be achieved. The shared subscription is a subscription mode for realizing load balancing among a plurality of subscription ends, and can ensure that one message is consumed only once.
For example, after the user sends a control request of the smart device 500 to the cloud 100 through the application software installed on the terminal 2000 and performs load balancing, the processor 700 forwards the control request to one cloud processing module 110 of the cloud gateway 1111, that is, the MQTT client application program, and then issues a theme message to the message processing center 300 based on the control request, if the theme is device_control, since the plurality of edge processing modules 210 of the edge gateway 21, that is, the MQTT client application programs share and subscribe to the theme device_control, only one edge processing module 210 can consume the theme device_control, the edge processing module 210 subscribed to the theme re-parses the content of the subscribed theme message, and then executes the control logic to control the smart device 500 of the edge 200, so as to ensure that the control command generated by the corresponding control request cannot be repeatedly executed, and the communication control in the smart community system 1000 is more stable and reliable.
In addition, it is understood that all MQTT client applications included in the cloud processing module 110 and the edge processing module 210 must support the MQTT5.0 protocol.
Referring again to fig. 3, in some embodiments, the message processing center 300 includes a plurality of MQTT server-side applications, and the message processing center 300 is configured to store and process subject messages so that the subject messages can be subscribed to by the edge-side processing module 210.
In this manner, the provision of multiple MQTT server-side applications may increase the high availability and throughput capabilities of the message processing center 300.
In particular, as described above, MQTT is a client-server based message publish/subscribe transport protocol in which both publishers and subscribers of messages can act as clients and servers act as message proxies. In this application, when the intelligent community system 1000 applies the protocol to establish the internet of things communication scheme, the message processing center 300 may include a plurality of MQTT server applications, that is, the message processing center 300 may serve as a message broker, and the plurality of MQTT server applications may be deployed on a plurality of servers. The message processing center 300 can thus provide highly available cluster services to store and process subject messages so that the subject messages can be subscribed to by the edge processing module 210.
The message processing center 300, i.e., the MQTT server-side application and the cluster in the present application, may be implemented by installing and deploying a plurality of MQTT services and reverse proxies, and it is understood that each MQTT server-side application in the message processing center 300 must support the MQTT5.0 protocol. In this way, the setup of the message processing center 300 may improve the high availability and throughput capabilities of the message processing center 300.
Referring to fig. 3 and 5, in some embodiments, sending a control instruction to the smart device 500 according to the analysis result (step S40) includes:
step S41: the parsing result is transmitted to the device service center 400, so that the device service center 400 transmits a control instruction to the smart device 500.
In some embodiments, the sending module 64 is configured to send the analysis result to the device service center 400, so that the device service center 400 sends a control instruction to the smart device 500.
In some embodiments, the processor 700 is configured to send the parsing result to the device service center 400, so that the device service center 400 sends a control instruction to the smart device 500.
Thus, the remote control of the smart device 500 by the user can be completed by sending a control instruction to the smart device 500.
Specifically, in step S41, the processor 700 may send the parsing result of the subscribed topic message parsed by the edge processing module 210 to the device service center 400, where the device service center 400 may provide an application service for controlling the specific smart device 500, and may issue a correct control instruction according to the underlying protocol of the smart device 500. In this way, after receiving the parsed control request, the device service center 400 may send a control instruction to the corresponding intelligent device 500 according to the specific content of the control request, so that the intelligent device 500 completes the corresponding operation according to the control instruction.
Referring to fig. 3 and 6, in some embodiments, the communication method provided in the present application further includes:
step S50: forwarding the report request to the device service center 400;
step S60: causing one of the edge processing modules 210 to issue a subject message to the message processing center 300 according to the report request;
step S70: subscribing one of the cloud processing modules 110 from the message processing center 300 and analyzing the subject message;
step S80: and reporting information to the cloud end 100 according to the analysis result.
In some embodiments, the communication device 600 may further include a forwarding module and a reporting module. The forwarding module is configured to send a reporting request to the device service center 400; the first execution module 62 is configured to enable one of the edge processing modules 210 to issue a subject message to the message processing center 300 according to the report request; the second execution module 63 is configured to make one of the cloud processing modules 110 subscribe to and parse the subject message from the message processing center 300; the reporting module is configured to report information to the cloud end 100 according to the analysis result.
In some embodiments, the processor 700 is configured to send a report request to the device service center 400; for one of the edge processing modules 210 to issue a subject message to the message processing center 300 according to the report request; and for one of the cloud processing modules 110 to subscribe to and parse the subject message from the message processing center 300; and is used for reporting information to the cloud end 100 according to the analysis result.
Specifically, in step S50-step S80, it can be understood that in the smart community system 1000, not only can a user remotely control the smart device 500 through the terminal 2000, but also the smart device 500 can report information such as its own state to the cloud end 100 through the MQTT protocol for query.
Then, in one scenario, the intelligent device 500 installed at the edge 200 sends a report request to report its own status, the processor 700 forwards the report request to the device service center 400 after receiving the report request, and after the processor 700 performs load balancing on the plurality of edge processing modules 210 according to the report request, the device service center 400 sends a report request to a corresponding one of the edge processing modules 210, so that the corresponding edge processing module 210 issues a subject message to the message processing center 300 according to the report request.
Wherein the message topic may be device_report. Of course, in other embodiments, the message subject may be "payload", "deviceId", and "deviceType", etc., and the application is not limited in any way herein.
Then, the processor 700 may only make one of the cloud processing modules 110 subscribe to and parse the topic message from the message processing center 300, so as to ensure that topic consumption is not repeatedly consumed by multiple cloud processing modules 110. Finally, after the analysis, the processor 700 may enable the cloud processing module 110 to report the information to the cloud 100, so as to complete the uplink of the instruction.
Particularly, the related process of load balancing the plurality of edge processing modules 210 is the same as the related process of load balancing the plurality of cloud processing modules 110, which is not described herein.
Referring to fig. 3, in some embodiments, the cloud processing module 110 and the edge processing module 210 each include an MQTT client application, and a shared subscription mechanism is adopted between the cloud processing modules 110, so that only one cloud processing module 110 subscribes to the subject message from the message processing center 300.
In this way, the shared subscription mechanism can avoid unpredictable consequences caused by repeated consumption of the subject message by the plurality of cloud processing modules 110 while ensuring setting of the plurality of cloud processing modules 110 to improve the communication performance and ensure high availability of the intelligent community system 1000, so that the status reporting of the intelligent device 500 in the intelligent community system 1000 is more stable and reliable.
Specifically, it may be appreciated that the processor 700 forwards the report request to the device service center 400, so that when the report request is forwarded to the corresponding edge processing module 210 through the device service center 400, the edge processing module 210 acts as an MQTT client application in the MQTT, and may issue a subject message of a specific subject to the message processing center 300, that is, the edge processing module 210 may act as an issue end; correspondingly, at this time, the cloud processing module 110 may subscribe to the topic message from the message processing center 300, and then the cloud processing module 110 may be used as a subscription end, and since the subscription end and the publishing end are both clients in the MQTT, the cloud processing module 110 as the subscription end may also be an MQTT client application.
The communication scheme of the intelligent community system 1000 in the application is based on the MQTT5.0 protocol, and a new characteristic, namely shared subscription, is introduced in the MQTT5.0 protocol. The shared subscription is equivalent to the load balancing function of the subscription end in the MQTT, and thus load balancing of the cloud processing modules 110 can be achieved. The shared subscription is a subscription mode for realizing load balancing among a plurality of subscription ends, and can ensure that one message is consumed only once.
For example, after performing load balancing, the processor 700 forwards the report request to one of the edge processing modules 210 of the edge gateway 21, that is, the MQTT client application program, through the device service center 400, and then, based on the report request, issues a topic message to the message processing center 300, if the topic is device_report, because the multiple cloud processing modules 110 of the cloud gateway 1111, that is, the multiple MQTT client application programs share and subscribe to the topic device_report, only one of the cloud processing modules 110 can actually consume the topic of device_report, the cloud processing module 110 subscribed to the topic re-parses the content of the subscribed topic message, and then, reports the related information of the smart device 500 to the cloud 100, so that the topic message generated by the corresponding report request is not repeatedly consumed, and the communication in the intelligent community system 1000 is more stable and reliable.
In addition, it will be appreciated that all MQTT client applications included in the cloud processing module 110 and the edge processing module 210 must support the MQTT5.0 protocol
Embodiments of the present application provide a non-transitory computer-readable storage medium storing a computer program, which when executed by one or more processors 700, causes the processors 700 to perform the communication method of any of the above embodiments.
For example, when the computer program is executed by one or more processors 700, the processor 700 is caused to perform the steps of:
step S10: receiving a control request transmitted from the terminal 2000, the control request being generated according to an input operation at the terminal 2000;
step S20: causing one of the cloud processing modules 110 to issue a subject message to the message processing center 300 according to the control request;
step S30: causing one of the edge processing modules 210 to subscribe to and parse the subject message from the message processing center 300;
step S40: and sending a control instruction to the intelligent device 500 according to the analysis result.
Specifically, in one embodiment, the smart community system 1000 may further include a processor 700, where the processor 700 may be a central processing unit (Central Processing Unit, CPU). The processor 700 may also be a chip such as other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination thereof.
The computer program may be stored in a memory, which is a non-transitory computer readable storage medium, for storing non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions/modules corresponding to the methods in the above-described method embodiments. The processor 700 executes various functional applications and data processing of the processor 700 by running non-transitory software programs, instructions and modules stored in memory, i.e., implementing the methods in the method embodiments described above.
It will be appreciated by those skilled in the art that implementing all or part of the above-described methods in the embodiments may be implemented by a computer program for instructing relevant hardware, and the implemented program may be stored in a computer readable storage medium, and the program may include the steps of the embodiments of the above-described methods when executed. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
In the description of the present specification, reference to the terms "one embodiment," "certain embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present application have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the application, the scope of which is defined by the claims and their equivalents.

Claims (9)

1. The utility model provides a communication method, is used for intelligent house, its characterized in that, intelligent house includes a plurality of high in the clouds processing module and a plurality of edge processing module, a plurality of high in the clouds processing module deploys at high in the clouds gateway, a plurality of edge processing module deploys at edge gateway, high in the clouds processing module with edge processing module all includes MQTT client application, the communication method includes:
receiving a control request sent by a terminal, wherein the control request is generated according to an input operation on the terminal;
load balancing is carried out on the cloud processing modules according to the control request;
based on a load balancing result, selecting the corresponding cloud processing module to issue a subject message to a message processing center, wherein the message processing center comprises a plurality of MQTT server-side application programs, and the cloud processing module and the edge processing module are connected with the message processing center in a long way and issue and subscribe the message through the message processing center;
subscribing one of the edge processing modules from the message processing center and analyzing the subject message;
and sending a control instruction to the intelligent equipment according to the analysis result.
2. The communication method of claim 1, wherein a shared subscription mechanism is employed among a plurality of said edge processing modules such that only one of said edge processing modules subscribes to said subject message from said message processing center.
3. The communication method according to claim 1, wherein the message processing center is configured to store and process the subject message so that the subject message can be subscribed to by the edge processing module.
4. The communication method according to claim 1, wherein the sending a control command to the intelligent device according to the analysis result includes:
and sending the analysis result to a device service center so that the device service center sends the control instruction to the intelligent device.
5. The utility model provides a communication method, is used for intelligent house, its characterized in that, intelligent house includes a plurality of high in the clouds processing module and a plurality of edge processing module, a plurality of high in the clouds processing module deploys at high in the clouds gateway, a plurality of edge processing module deploys at edge gateway, high in the clouds processing module with edge processing module all includes MQTT client application, the communication method includes:
forwarding the report request to the equipment service center;
after load balancing is carried out on a plurality of edge processing modules according to the reporting request, the equipment service center sends the reporting request to one of the corresponding edge processing modules, the corresponding edge processing modules issue subject messages to a message processing center according to the reporting request, the message processing center comprises a plurality of MQTT service end application programs, long connection is established between the cloud processing module and the edge processing modules, and the message processing center issues and subscribes the messages;
subscribing one of the cloud processing modules from the message processing center and analyzing the subject message;
and reporting information to the cloud according to the analysis result.
6. The communication method according to claim 5, wherein a shared subscription mechanism is employed among the plurality of cloud processing modules, such that only one of the cloud processing modules subscribes to the subject message from the message processing center.
7. The utility model provides a communication device for intelligent house, its characterized in that, intelligent house includes a plurality of high in the clouds processing module and a plurality of edge processing module, and is a plurality of high in the clouds processing module deploys at high in the clouds gateway, and is a plurality of edge processing module deploys at edge gateway, high in the clouds processing module with edge processing module all includes MQTT client application, communication device includes:
the receiving module is used for receiving a control request sent by the terminal, wherein the control request is generated according to input operation on the terminal;
the first execution module is used for executing load balancing on the cloud processing modules according to the control request, selecting the corresponding cloud processing module to issue a subject message to a message processing center based on a load balancing result, wherein the message processing center comprises a plurality of MQTT server side application programs, and the cloud processing module and the edge processing module are both in long connection with the message processing center and issue and subscribe the message through the message processing center;
the second execution module is used for subscribing one of the edge processing modules from the message processing center and analyzing the subject message;
and the sending module is used for sending a control instruction to the intelligent equipment according to the analysis result.
8. An intelligent community system, comprising:
the cloud comprises a cloud gateway, wherein a plurality of cloud processing modules are deployed on the cloud gateway, and the cloud processing modules comprise MQTT client application programs;
the edge terminal comprises an edge gateway, wherein a plurality of edge terminal processing modules are deployed on the edge gateway, and the edge terminal processing modules comprise MQTT client application programs;
the message processing center is used for carrying out information interaction between the cloud processing module and the edge processing module through the message processing center, the message processing center comprises a plurality of MQTT server-side application programs, and the cloud processing module and the edge processing module are connected with the message processing center in a long way and carry out message publishing and subscribing through the message processing center;
the device service center is used for controlling the intelligent device and inquiring the state of the intelligent device;
the intelligent equipment can receive the control instruction sent by the equipment service center and report the equipment state to the equipment service center; and
a processor for implementing the communication method of any one of claims 1-6.
9. A non-transitory computer-readable storage medium of computer-executable instructions, which when executed by one or more processors, cause the processors to perform the communication method of any of claims 1-6.
CN202111333200.5A 2021-11-11 2021-11-11 Communication method, communication device, intelligent community system and storage medium Active CN114051030B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111333200.5A CN114051030B (en) 2021-11-11 2021-11-11 Communication method, communication device, intelligent community system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111333200.5A CN114051030B (en) 2021-11-11 2021-11-11 Communication method, communication device, intelligent community system and storage medium

Publications (2)

Publication Number Publication Date
CN114051030A CN114051030A (en) 2022-02-15
CN114051030B true CN114051030B (en) 2024-03-22

Family

ID=80208494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111333200.5A Active CN114051030B (en) 2021-11-11 2021-11-11 Communication method, communication device, intelligent community system and storage medium

Country Status (1)

Country Link
CN (1) CN114051030B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117407007A (en) * 2023-12-13 2024-01-16 北京东土科技股份有限公司 Application management system and method of chemical equipment controller

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110336736A (en) * 2019-05-27 2019-10-15 四川长虹电器股份有限公司 The shared method subscribed to is realized based on MQTT server cluster
CN110912789A (en) * 2019-12-27 2020-03-24 无锡青起长升智能科技有限公司 Intelligent household Internet of things communication method based on Alicloud IoT Hub platform
CN111935296A (en) * 2020-08-18 2020-11-13 成都长虹网络科技有限责任公司 System for high-availability infinite MQTT message service capacity expansion
CN111970363A (en) * 2020-08-17 2020-11-20 北京金山云网络技术有限公司 Data processing method and device based on Internet of things
CN112995348A (en) * 2021-05-12 2021-06-18 北京金山云网络技术有限公司 Control method, device and system of Internet of things equipment
US11159634B1 (en) * 2017-11-22 2021-10-26 Amazon Technologies, Inc. Subscription fan out

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11159634B1 (en) * 2017-11-22 2021-10-26 Amazon Technologies, Inc. Subscription fan out
CN110336736A (en) * 2019-05-27 2019-10-15 四川长虹电器股份有限公司 The shared method subscribed to is realized based on MQTT server cluster
CN110912789A (en) * 2019-12-27 2020-03-24 无锡青起长升智能科技有限公司 Intelligent household Internet of things communication method based on Alicloud IoT Hub platform
CN111970363A (en) * 2020-08-17 2020-11-20 北京金山云网络技术有限公司 Data processing method and device based on Internet of things
CN111935296A (en) * 2020-08-18 2020-11-13 成都长虹网络科技有限责任公司 System for high-availability infinite MQTT message service capacity expansion
CN112995348A (en) * 2021-05-12 2021-06-18 北京金山云网络技术有限公司 Control method, device and system of Internet of things equipment

Also Published As

Publication number Publication date
CN114051030A (en) 2022-02-15

Similar Documents

Publication Publication Date Title
CN102546794B (en) Method for directly communicating browser client with back-end server as well as gateway and communication system
CN112799789A (en) Node cluster management method, device, equipment and storage medium
US20140280522A1 (en) System and method for providing an actively invalidated client-side network resource cache
US20170373804A1 (en) Methods for enabling delay-awareness in the constrained application protocol (coap)
KR20110076954A (en) Optimized polling in low resource devices
US20160241664A1 (en) Method, device, and system for redirecting data by using service proxy
CN109451804B (en) cNAP and method executed by cNAP and sNAP
JP2014130605A (en) Communication network and method for operating communication network
US10425253B2 (en) Inband data gathering with dynamic intermediary route selections
Chen et al. Converging MQTT resources in ETSI standards based M2M platform
US9197575B2 (en) Handling of snapshot messages as a result of delivery failure in a two-way push connection
Klauck et al. Chatty things-Making the Internet of Things readily usable for the masses with XMPP
US10609179B2 (en) Method and system establishing a network connection
US20130166755A1 (en) Method, apparatus and system for addressing resources
Srirama et al. Scalable mobile web services mediation framework
CN114051030B (en) Communication method, communication device, intelligent community system and storage medium
US9106596B2 (en) Method and apparatus of configuring a data broadcast service
CN111049915B (en) Container under-cloud message queue agent system and method
Kanakaris et al. Internet of things protocols-a survey
WO2013082897A1 (en) Application service update method and device
US20150215414A1 (en) Out of band electronic signaling
CN108924773B (en) Message processing method and device
Palmese et al. Coap vs. mqtt-sn: Comparison and performance evaluation in publish-subscribe environments
Bansal et al. Enhancing constrained application protocol using message options for internet of things
US10931596B2 (en) Method, apparatus and system for addressing resources

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