Gateway lxc container management method based on mqtt protocol

The MQTT-based gateway LXC container management method facilitates remote and secure management of LXC containers on gateways, addressing network interruption issues during upgrades by enabling secure and reliable remote installation and customization.

CN119071157APending Publication Date: 2024-12-03ITIBIA TECH (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411041543.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The management of increasing numbers of gateways complicates network operations, leading to network interruptions during upgrades and potential paralysis due to the need for collaborative development and local upgrades.

Method used

A gateway LXC container management method using the MQTT protocol enables remote management of LXC containers through a container management platform, allowing for secure and reliable connection, installation, and customization without local upgrades, with features like heartbeat packets to maintain connection integrity.

Benefits of technology

Enables remote management of LXC containers on gateways, ensuring secure and reliable operation without network interruptions, allowing for customized functions and resource management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071157A_ABST
    Figure CN119071157A_ABST
Patent Text Reader

Abstract

The invention relates to a gateway lxc container management method based on an mqtt protocol, and the method comprises the steps: firstly starting an mqtt client, monitoring and transmitting an mqtt protocol message through the mqtt client, and transmitting gateway related information to a container management platform for data verification through the mqtt client after the mqtt client is started; after the verification is passed, the container management platform issues container operation to the gateway, the mqtt client is started after the gateway is started, and gateway data is sent to the management platform for verification after the gateway is started; the management platform issues a related container management operation to the gateway after the verification is passed; and the gateway and the management platform regularly send heartbeat packets to keep connection. According to the lxc container management method based on the mqtt protocol, a gateway and a container management platform are connected based on the mqtt protocol, and the container management platform verifies gateway data and carries out container management on a gateway container. And remote management can be realized, and the connection is ensured to be safe and reliable through an mqtt protocol.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a gateway LXC container management method based on the MQTT protocol, which enables a container management platform to manage the container installed on the gateway. Background Art

[0002] At present, due to the rapid development of network technology, the number of gateways is increasing, making the management of gateways by operators more complicated. When operators need to develop new requirements, they need to complete the collaborative development of gateways and then upgrade the gateways in use as a whole. This will cause network interruption during the upgrade process and large-scale network paralysis.

[0003] Therefore, it is necessary to develop a method that can better implement gateway function upgrades. Summary of the invention

[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a gateway lxc container management method based on the mqtt protocol to remotely manage and install lxc containers.

[0005] The purpose of the present invention is achieved through the following technical solutions:

[0006] The gateway lxc container management method based on the mqtt protocol is characterized in that: the gateway is connected to the container management platform through the mqtt protocol, the container management platform performs remote container management on the gateway, the lxc container pulls up the corresponding image, the image provides customized services, and the container restricts the image service permissions, including the following steps:

[0007] 1) After the gateway is started, pull up the MQTT client first to monitor and send MQTT protocol messages;

[0008] 2) The MQTT client sends the gateway data to the container management platform for verification. The container management platform verifies the legitimacy of the gateway data and replies to the gateway. After the verification is passed, the heartbeat packet is sent regularly to maintain the connection with the gateway;

[0009] 3) After receiving the verification pass message, the gateway starts to listen to the messages sent by the container management platform and responds;

[0010] 4) The container management platform sends a new container installation operation message to the gateway, and the gateway verifies the sent parameters and creates a container based on the parameters;

[0011] 5) The container management platform sends a container uninstallation operation message to the gateway, and the gateway verifies the sent parameters and uninstalls the container according to the parameters;

[0012] 6) The container management platform sends an update container operation message to the gateway, and the gateway verifies the sent parameters and updates the corresponding container according to the parameters.

[0013] Furthermore, in the above-mentioned gateway lxc container management method based on the mqtt protocol, in step 1), after the gateway is started, the mqtt client is first pulled up, and the mqtt client listens to and sends mqtt protocol messages.

[0014] Furthermore, in the above-mentioned gateway LXC container management method based on the MQTT protocol, in step 2), the MQTT client sends the gateway data to the container management platform for verification, and the container management platform performs a legitimacy check based on the data sent by the gateway. After the verification passes, the verification result is replied and the container list information is sent to the gateway at regular intervals. If the verification fails, the gateway verification failure is replied.

[0015] Furthermore, in the above-mentioned gateway LXC container management method based on the MQTT protocol, in step 3), after the gateway receives the message that the container management platform has passed the verification, it starts to monitor the relevant container operation information sent by the container management platform. If the verification fails, the gateway verification data is sent twice later. If it still fails, the MQTT client is exited.

[0016] Furthermore, in the above-mentioned gateway LXC container management method based on the MQTT protocol, in step 4), when the container management platform needs to send down the installation of a new container, the container management platform first sends the download image file address and the configuration file address to the gateway, and the gateway downloads the corresponding file according to the sent address, and replies to the container management platform after the download is complete. The container management platform sends the installation container operation, and the gateway creates the corresponding container according to the name value in the sent installation container parameter and pulls up the downloaded image in the container for operation.

[0017] Furthermore, in the above-mentioned gateway LXC container management method based on the MQTT protocol, in step 5), when the container management platform issues an operation to uninstall a container, the container management platform sends the name value of the container as a parameter to the gateway, and the gateway uninstalls the corresponding container according to the issued name value.

[0018] Furthermore, in the above-mentioned gateway LXC container management method based on the MQTT protocol, in step 6), when the container management platform needs to issue an update container operation, the container management platform needs to first issue an updated image and configuration file download address, and the gateway downloads the corresponding file according to the download address. After the download is completed, the container management platform sends a message to update the container to the gateway. The gateway first uninstalls the corresponding container according to the name parameter value in the message, and then recreates the container and pulls up the image in the container for operation.

[0019] Compared with the prior art, the present invention has significant advantages and beneficial effects, which are specifically embodied in the following aspects:

[0020] ① The present invention implements an LXC container management method based on the MQTT protocol. The gateway and the container management platform are connected based on the MQTT protocol. The container management platform verifies the gateway data and performs container management on the gateway container.

[0021] ② It can be managed remotely, and the connection is made through the MQTT protocol to ensure the security and reliability of the connection. According to specific needs, the lxc container is installed online to enable customized functions, without the need to upgrade the gateway locally or remotely to avoid network interruption;

[0022] ③The lxc container can set relevant permissions and restrictions on the pull-up function, and can limit the CPU and memory usage, etc. After the gateway and the container management platform establish a connection, they periodically send heartbeat packets to ensure that the connection process continues without interruption.

[0023] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by practicing the specific embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 : Schematic diagram of the process of connecting the gateway to the container management platform;

[0026] Figure 2 : Schematic diagram of the process of container management issued by the container management platform;

[0027] Figure 3 : The data format of the SystemInfo message sent by the gateway;

[0028] Figure 4 : The data format of the ReplySystemInfo message that the container management platform replies to;

[0029] Figure 5 : The data format of listAllLxc message sent by container management platform;

[0030] Figure 6 : The data format of the ReportAllLxcInfo message that the gateway replies to.

[0031] Figure 7: The data format of the downloadLxcFile message sent by the container management platform;

[0032] Figure 8 : The data format of the ReplydownloadLxcImage message that the gateway replies to;

[0033] Fig. 9 : The data format of the InstallLxc message sent by the container management platform;

[0034] Fig.10 : The data format of the gateway's reply ReplyInstallLxc message;

[0035] Fig.11 : The data format of the UninstallLxc message sent by the container management platform;

[0036] Fig.12 : The data format of the gateway's reply ReplyUninstallLxc message;

[0037] Fig.13 : The data format of the downloadLxcFile message sent by the container management platform;

[0038] Fig.14 : The data format of the ReplydownloadLxcImage message that the gateway replies to;

[0039] Fig.15 : The data format of the UpgradeLxc message sent by the container management platform;

[0040] Fig.16 : The data format of the gateway's reply ReplyUpgradeLxc message. DETAILED DESCRIPTION

[0041] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.

[0042] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, directional terms and order terms are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0043] When operators develop customized requirements for gateways, if they directly upgrade the running gateway, network interruption may occur during the upgrade process. You can install the lxc container remotely and start the corresponding function when starting the container to ensure that the customized function is started without restarting the gateway.

[0044] like Figure 1 As shown in the figure, the gateway lxc container management method based on the mqtt protocol, the gateway and the container management platform are connected through the mqtt protocol to ensure the security and reliability of the connection, provide real-time and reliable message services, occupy less resources, and the container management platform remotely manages the gateway container for easy management and operation. The lxc container pulls up the corresponding image, the image provides customized services, and the container restricts the image service permissions, including the following steps:

[0045] 1) After the gateway is started, the MQTT client is launched first, and the MQTT client listens to and sends MQTT protocol messages;

[0046] 2) The mqtt client sends the gateway data to the container management platform for verification. The container management platform verifies the validity of the gateway data and replies to the gateway. After the verification is passed, it sends heartbeat packets regularly to maintain the connection with the gateway. After the verification is passed, it replies with the verification result and starts to send the container list information to the gateway regularly. If the verification fails, it replies to the gateway that the verification failed

[0047] 3) After the gateway receives the message that the verification has passed from the container management platform, it starts to monitor the relevant container operation information sent by the container management platform. If the verification fails, it will send the gateway verification data twice. If it still fails, it will exit the mqtt client;

[0048] 4) The container management platform sends a new container installation operation message to the gateway, and the gateway verifies the sent parameters and creates a container based on the parameters;

[0049] When the container management platform needs to send and install a new container, the container management platform first sends the download address of the image file and the configuration file address to the gateway. The gateway downloads the corresponding file according to the sent address, and replies to the container management platform after the download is complete. The container management platform sends the installation container operation. The gateway creates the corresponding container according to the name value in the sent installation container parameter and pulls up the downloaded image in the container to run;

[0050] 5) The container management platform sends a container uninstallation operation message to the gateway, and the gateway verifies and uninstalls the container according to the sent parameters; the container management platform sends the name value of the container as a parameter to the gateway, and the gateway uninstalls the corresponding container according to the sent name value;

[0051] 6) The container management platform sends an update container operation message to the gateway, and the gateway verifies the sent parameters and updates the corresponding container according to the parameters;

[0052] When the container management platform needs to issue an update container operation, the container management platform needs to first issue the download address of the updated image and configuration file. The gateway downloads the corresponding file according to the download address. After the download is complete, the container management platform sends a container update message to the gateway. The gateway first uninstalls the corresponding container according to the name parameter value in the message, then recreates the container and pulls up the image in the container for operation.

[0053] like Figure 1 As shown, after the gateway is started, it connects to the container management platform. The container management platform first verifies the legitimacy of the device. After the authentication is passed, it sends the gateway the current container list regularly. After the gateway obtains the current container list, it returns the information to the container management platform.

[0054] After the gateway is started, the MQTT client is launched first. After launching, the basic parameters of the gateway are sent to the container management platform. The container management platform verifies the basic parameters of the reported gateway. After the verification passes, the container management platform replies that the gateway parameter verification has passed.

[0055] After the verification is passed, the container management platform starts to send a message to obtain the gateway container list at regular intervals. After receiving the message, the gateway parses it and obtains the current container, and returns the container list message to the container management platform;

[0056] like Figure 2 As shown in the figure, after the gateway establishes a connection with the lxc container management platform, the container management platform can send relevant container operations to the gateway, such as installation, uninstallation, and upgrade operations;

[0057] The container management platform sends a message to install the container. After receiving the message, the gateway performs the installation operation and returns the result to the container management platform.

[0058] The container management platform sends a message to uninstall the container. After receiving the message, the gateway uninstalls the container and returns the result to the container management platform.

[0059] The container management platform sends an upgrade container operation. After receiving the message, the gateway performs the upgrade container operation and returns the result to the container management platform.

[0060] The gateway mac address is D8:AE:90:28:28:E8, and the SN is ITIB902828E8.

[0061] like Figure 3 As shown in the figure, after the gateway is started, the mqtt client is pulled up, and the mqtt client sends a SystemInfo message to the container management platform. The message is

[0062] {"method":"SystemInfo","timestamp":1718245041246,"id":"1","properties":{"Mac":"D8AE902828E8","Desc":"Gateway","Province":31,"Model":"OfficeTen1800-G8S8","HardVersion":"G0","SoftVersion":"V1.0.0","SN":"ITIB902828E8"}}, where the method value is SystemInfo, indicating that the message is a basic data message of the gateway. The timestamp value is the timestamp of sending the message. Mac is the MAC address of the gateway. SN is the SN of the gateway. Mac and SN are the unique identifiers of the gateway and are used for verification on the container management platform.

[0063] like Figure 4 As shown in the figure, after the container management platform receives the SystemInfo message from the gateway, it obtains the mac address and SN in the message, and verifies the legitimacy of the gateway through the mac address and SN. If the verification passes, the reply result value is 0, and the message reply is {"method":"ReplySystemInfo","timestamp":1718245372586,"id":"2","result":"0"}, where the method value is ReplySystemInfo, indicating that the message is a reply to the SystemInfo message; the gateway receives the ReplySystemInfo message replied by the container management platform. If the parsed result value is not 0, it means that the authentication fails, and the gateway needs to confirm whether the reported information is correct; if the result value is 0, it means that the authentication passes, and the gateway starts to listen to the messages sent by the container management platform.

[0064] like Figure 5As shown, after the container management platform verifies the gateway, it starts to send a message {"method":"listAllLxc","timestamp":1704442242546,"id":"3","properties":{}}} to the gateway every three minutes to obtain the list of installed containers. The method value is listAllLxc, indicating that the message is a message for obtaining the container list.

[0065] like Figure 6 As shown in the figure, after receiving the listAllLxc message sent by the container management platform, the gateway replies to the container management platform with a message format of {"method":"ReportAllLxcInfo","timestamp":1718245342485,"id":"4","properties":[{"name":"Communication","state":1,"CPU":1530000,"mem":8192,"version":"V2.0"}, where the method value is ReportAllLxcInfo, indicating that the message is a reply to the container list, name indicates the name of the container, which is the unique identifier of the container, CPU indicates the current CPU operation usage, mem indicates the current memory usage, and state is 1, indicating that it is currently in the running state.

[0066] like Figure 7 As shown in the figure, when the container management platform needs to install a container to the gateway, it needs to first send the download image and configuration file address to the gateway for download, and send the image download message {"method":"downloadLxcFile","timestamp":1704442242546,"id":"5","properties":{"imageName":"Anquanmao_v4.0.tar.gz","imageVersion":"v4.0","image":"http: / / 192.168.60.81:30900 / lxc-resource / plugin / Anquanmao_v4.0.tar.gz","config","http: / / 192.168.60.81:30900 / lxc-resource / plugin / aqm.conf"}}, and the method value is downloadLxcFile, indicating that the message is a message for downloading the container image and configuration file, image is the gateway image download address, and config is the container configuration file.

[0067] like Figure 8As shown in the figure, after the gateway receives the file download message sent by the container management platform, it downloads the corresponding file according to the address, verifies the file and replies to the container management platform with a download completion message {"method":"ReplydownloadLxcImage","timestamp":1718249121278,"id":"6","result":"0"}, where the method value is ReplydownloadLxcImage, indicating that the message is a container file download reply message, and the result value is 0, indicating that the download is complete.

[0068] like Fig. 9 As shown in the figure, after the container management platform receives the download completion message from the gateway, it sends a message to install the container

[0069] {"method":

[0070] "InstallLxc","timestamp":1704442242546,"id":"7","properties":{"name":"Anq uanmao","config":"aqm.conf","imageName":"Anquanmao_v4.0.tar.gz","image Version":"v4.0"}}, the method value is InstallLxc, indicating that the message is a container installation message, properties is the container installation parameter, name is the name of the container, config is the name of the container configuration file, and imageName is the image name of the container.

[0071] like Fig.10 As shown in the figure, after the gateway receives the container installation operation message from the container management platform, the gateway creates the corresponding lxc container according to the name value and configuration file, decompresses the image and puts it into the container, and pulls up the image when the container is started. After the image is successfully pulled up, the gateway replies to the container management platform with a message that the container is successfully installed.

[0072] {"method":"ReplyInstallLxc","timestamp":1718249192318,"id":"8","result":"0"}.

[0073] like Fig.11As shown in the figure, when the container management platform uninstalls the gateway container, it sends the uninstall container {"method":"UninstallLxc","timestamp":1718253156205,"id":"9","properties":{"name":"Anquanmao"}}, the method value is UninstallLxc, indicating that the message is an uninstall container message, properties are uninstall container parameters, and the name value is the name of the container.

[0074] like Fig.12 As shown in the figure, after the gateway receives the container uninstallation operation message sent by the container management platform, the gateway uninstalls the corresponding lxc container according to the name value and replies {"method":"ReplyUninstallLxc","timestamp":1718253156401,"id":"10","result":"0"} after successful uninstallation.

[0075] like Fig.13 As shown in the figure, when the container management platform upgrades the container to the gateway, it needs to first send the upgraded download image and configuration file address to the gateway for download, and send the image download message {"method":"downloadLxcFile","timestamp":1718253276052,"id":"5","properties":{"imageName":"Anquanmao_v5.0.tar.gz","imageVersion":"v5.0","image":"http: / / 192.168.60.81:30900 / lxcresource / plugin / Anquanmao_v5.0.tar.gz","config","http: / / 192.168.60.81:30900 / lxcresource / plugin / aqm.conf"}}, and the method value is downloadLxcFile, indicating that the message is a message for downloading the container image and configuration file, image is the gateway image download address, and config is the container configuration file download address.

[0076] like Fig.14As shown in the figure, after the gateway receives the file download message sent by the container management platform, it downloads the corresponding file according to the address, verifies the file and replies to the container management platform with a download completion message {"method":"ReplydownloadLxcImage","timestamp":1718253276306,"id":"6","result":"0"}, where the method value is ReplydownloadLxcImage, indicating that the message is a container file download reply message, and the result value is 0, indicating that the download is complete.

[0077] like Fig.15 As shown in the figure, when the container management platform receives the download completion message from the gateway, it sends a message to upgrade the container operation

[0078] {"method":

[0079] "UpgradeLxc","timestamp":1718253396261,"id":"7","properties":{"name":"An quanmao","config":"aqm.conf","imageName":"Anquanmao_v5.0.tar.gz","imageVersion":"v5.0"}}, the method value is UpgradeLxc, indicating that the message is an upgrade container operation, properties is the upgrade container parameters, name is the name of the container, config is the name of the container configuration file, and imageName is the image name of the container.

[0080] like Fig.16 As shown in the figure, after the gateway receives the upgrade container operation message from the container management platform, the gateway first uninstalls the created lxc container according to the name value, then recreates the lxc container, decompresses the image and puts it into the container, and pulls up the image when the container is started. After the image is successfully pulled up, the gateway replies to the container management platform with a successful container upgrade message

[0081] {"method":"ReplyUpgradeLxc","timestamp":1718249189592,"id":"8","result":"0"}.

[0082] In summary, the present invention implements an lxc container management method based on the mqtt protocol, the gateway and the container management platform are connected based on the mqtt protocol, the container management platform verifies the gateway data, and performs container management on the gateway container, etc.;

[0083] It can be managed remotely, and the connection is through the MQTT protocol to ensure the security and reliability of the connection;

[0084] According to specific needs, lxc containers are installed online to enable customized functions, without upgrading the gateway locally or remotely to avoid network interruption;

[0085] The lxc container can set relevant permissions and restrictions on the pull-up function, and can limit the CPU and memory usage, etc.;

[0086] After the gateway and container management platform establish a connection, they periodically send heartbeat packets to ensure that the connection process is continuous and uninterrupted.

[0087] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention. It should be noted that similar numbers and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0088] The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

[0089] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A gateway lxc container management method based on the mqtt protocol, characterized in that: The gateway is connected to the container management platform through the MQTT protocol. The container management platform performs remote container management on the gateway. The lxc container pulls up the corresponding image. The image provides customized services. The container restricts the image service permissions, including the following steps: 1) After the gateway is started, pull up the MQTT client first to monitor and send MQTT protocol messages; 2) The MQTT client sends the gateway data to the container management platform for verification. The container management platform verifies the legitimacy of the gateway data and replies to the gateway. After the verification is passed, the heartbeat packet is sent regularly to maintain the connection with the gateway; 3) After receiving the verification pass message, the gateway starts to listen to the messages sent by the container management platform and responds; 4) The container management platform sends a new container installation operation message to the gateway, and the gateway verifies the sent parameters and creates a container based on the parameters; 5) The container management platform sends a container uninstallation operation message to the gateway, and the gateway verifies the sent parameters and uninstalls the container according to the parameters; 6) The container management platform sends an update container operation message to the gateway, and the gateway verifies the sent parameters and updates the corresponding container according to the parameters.

2. The gateway lxc container management method based on the mqtt protocol according to claim 1 is characterized in that: Step 1), after the gateway is started, first pull up the MQTT client, and the MQTT client listens and sends MQTT protocol messages.

3. The gateway lxc container management method based on the mqtt protocol according to claim 1 is characterized in that: Step 2), the MQTT client sends the gateway data to the container management platform for verification. The container management platform performs a validity check based on the data sent by the gateway. If the check passes, it replies with the check result and starts to send the container list information to the gateway regularly. If the check fails, it replies to the gateway that the check failed.

4. The gateway lxc container management method based on the mqtt protocol according to claim 1 is characterized in that: Step 3), after the gateway receives the message that the container management platform has passed the verification, it starts to monitor the relevant container operation information sent by the container management platform. If the verification fails, it will send the gateway verification data twice later. If it still fails, it will exit the mqtt client.

5. The gateway lxc container management method based on the mqtt protocol according to claim 1 is characterized in that: Step 4), when the container management platform needs to send down the installation of a new container, the container management platform first sends the download address of the image file and the configuration file address to the gateway. The gateway downloads the corresponding file according to the sent address, and replies to the container management platform after the download is complete. The container management platform sends the installation container operation, and the gateway creates the corresponding container according to the name value in the sent installation container parameter and pulls up the downloaded image in the container to run.

6. The gateway lxc container management method based on the mqtt protocol according to claim 1 is characterized in that: Step 5), when the container management platform issues a container uninstallation operation, the container management platform sends the name value of the container as a parameter to the gateway, and the gateway uninstalls the corresponding container according to the issued name value.

7. The gateway lxc container management method based on the mqtt protocol according to claim 1 is characterized in that: Step 6), when the container management platform needs to send an update container operation, the container management platform needs to first send the updated image and configuration file download address, the gateway downloads the corresponding file according to the download address, after the download is complete, the container management platform sends a container update message to the gateway, the gateway first uninstalls the corresponding container according to the name parameter value in the message, and then recreates the container and pulls up the image in the container to run.