Edge computing gateway configuration transmission method and device
By splitting the configuration file into multiple shard files and using MQTT message transmission, the problem of high transmission failure rate of edge computing device configuration files is solved and more efficient transmission efficiency is achieved.
Patent Information
- Application Number
- CN202210731511.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-06-24
AI Technical Summary
In the existing technology, the point-to-point transmission of configuration files between the cloud management platform and the edge gateway is inefficient, and there are problems such as file loss and failure in the process, resulting in a high transmission failure rate of edge computing device configuration files.
Split the target configuration file into multiple fragmented files, and send MQTT messages carrying fragmented files and verification information for each fragmented file until all fragmented files are sent, and the transmission failure rate is reduced through fragmented transmission. and improve efficiency.
Through fragmented transmission, the transmission failure rate of edge computing gateway configuration is reduced and the transmission efficiency is improved. The transmission failure rate of fragmented files is lower than that of the original configuration file, and fragmented files can be sent in multiple ways, improving improve transmission efficiency.
Smart Images

Figure CN115242774B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular to an edge computing gateway configuration transmission method and device. Background Art
[0002] In the era of big data, edge computing devices are located at the edge of the network close to the data source, integrating network, computing, storage, and application core capabilities to provide edge intelligent services nearby, meeting the key needs of industry digitalization in agile connectivity, real-time business, data optimization, application intelligence, security and privacy protection, and serving as a bridge connecting the physical and digital worlds.
[0003] In industry, edge computing devices are widely used in smart factories, smart grids, smart water conservancy, environmental monitoring, sewage treatment, elevator monitoring, packaging machinery, printing and dyeing machinery, engineering machinery, textile machinery, water supply equipment, thermal boilers and other industrial fields. As mentioned above, edge computing devices usually work in extremely complex local area network environments. The network between them and the management platform deployed in the cloud usually has high latency, low bandwidth, and instability, which poses greater challenges to the configuration and collection of edge computing devices.
[0004] In the related technology, the point-to-point transmission of configuration files between the cloud management platform and the edge gateway is inefficient, and there are problems such as file packet loss and midway failure, resulting in a high transmission failure rate of configuration files. Summary of the invention
[0005] The present invention provides an edge computing gateway configuration transmission method and device, which are used to solve the defect of high transmission failure rate of configuration files in the prior art, reduce the transmission failure rate of edge computing gateway configuration, and improve transmission efficiency.
[0006] In a first aspect, the present invention provides an edge computing gateway configuration transmission method, applied to a first communication terminal, comprising:
[0007] Get multiple shard files of the target configuration file;
[0008] For each target slice file in the multiple slice files, sending an MQTT message carrying the target slice file and verification information corresponding to the target slice file to the second communication end until all the multiple slice files are sent;
[0009] A first notification message indicating that sending of the target configuration file is completed is sent to the second communication end.
[0010] Optionally, according to an edge computing gateway configuration transmission method provided by the present invention, after sending an MQTT message carrying a target shard file and verification information corresponding to the target shard file to the second communication end, the method further includes:
[0011] Monitoring a second notification message sent by the second communication end to indicate a failure in transmission of the target segment file;
[0012] When it is determined that the second notification message is received, the MQTT message carrying the target segment file and the verification information corresponding to the target segment file is resent to the second communication end.
[0013] Optionally, according to an edge computing gateway configuration transmission method provided by the present invention, the first communication end is a cloud edge computing gateway management platform, and before the obtaining of multiple shard files of the target configuration file, the method further includes:
[0014] receiving a first input for uploading the target configuration file;
[0015] In response to the first input, obtaining the target configuration file;
[0016] receiving a second input for selecting an edge computing gateway;
[0017] In response to the second input, determining one or more edge computing gateways to be configured;
[0018] A target edge computing gateway is determined as the second communication end among the one or more edge computing gateways to be configured, and the target edge computing gateway is used to receive the target configuration file from the cloud edge computing gateway management platform and distribute the target configuration file to the one or more edge computing gateways to be configured.
[0019] Optionally, according to an edge computing gateway configuration transmission method provided by the present invention, after sending a first notification message indicating that the target configuration file has been sent to the second communication end, the method further includes:
[0020] Receiving a third notification message sent by the target edge computing gateway to indicate that the target configuration file has taken effect;
[0021] The one or more edge computing gateways to be configured are notified through an MQTT message to download the target configuration file from the target edge computing gateway.
[0022] Optionally, according to an edge computing gateway configuration transmission method provided by the present invention, the first communication end is an edge computing gateway, the second communication end is a cloud edge computing gateway management platform, and before the obtaining of multiple shard files of the target configuration file, the method further includes:
[0023] Receive a fourth notification message sent by the cloud-based edge computing gateway management platform to instruct the collection of a configuration file of the edge computing gateway;
[0024] After obtaining the multiple fragment files of the target configuration file, the method further includes:
[0025] Sending a message carrying the name of the target configuration file, the number of shards and verification information to the cloud edge computing gateway management platform;
[0026] Receive an ACK confirmation message sent by the cloud edge computing gateway management platform.
[0027] In a second aspect, the present invention provides an edge computing gateway configuration transmission method, applied to a second communication terminal, comprising:
[0028] Receiving an MQTT message sent by the first communication terminal and carrying a target shard file and verification information corresponding to the target shard file, wherein the target shard file is any one of the multiple shard files of the target configuration file;
[0029] A first notification message sent by the first communication terminal is received to determine that the target configuration file has been received.
[0030] Optionally, according to an edge computing gateway configuration transmission method provided by the present invention, after receiving an MQTT message sent by the first communication terminal and carrying the target shard file and verification information corresponding to the target shard file, the method further includes:
[0031] Based on the verification information corresponding to the target shard file, verify the target shard file to obtain a first verification result;
[0032] When the first verification result indicates that the verification has not passed, a second notification message indicating that the transmission of the target segment file has failed is sent to the first communication end.
[0033] Optionally, according to an edge computing gateway configuration transmission method provided by the present invention, the first communication end is an edge computing gateway, and the second communication end is a cloud edge computing gateway management platform. After receiving the first notification message sent by the first communication end and determining that the target configuration file has been received, the method further includes:
[0034] Merge the received target shard files to obtain the configuration file to be verified;
[0035] Based on the verification information of the target configuration file, verify the configuration file to be verified to obtain a second verification result;
[0036] When the second verification result indicates that the verification is passed, it is determined that the configuration file to be verified is consistent with the target configuration file.
[0037] In a third aspect, the present invention further provides an edge computing gateway configuration transmission device, applied to a first communication end, comprising:
[0038] A first acquisition module is used to acquire multiple fragment files of a target configuration file;
[0039] A first transmission module is used to send an MQTT message carrying a target slice file and verification information corresponding to the target slice file to the second communication end for each target slice file in the multiple slice files until the multiple slice files are sent;
[0040] The second transmission module is used to send a first notification message indicating that the sending of the target configuration file is completed to the second communication end.
[0041] In a fourth aspect, the present invention further provides an edge computing gateway configuration transmission device, applied to a second communication terminal, comprising:
[0042] A third transmission module is used to receive an MQTT message sent by the first communication terminal and carrying a target slice file and verification information corresponding to the target slice file, wherein the target slice file is any slice file among multiple slice files of the target configuration file;
[0043] The fourth transmission module is used to receive the first notification message sent by the first communication terminal, and determine that the target configuration file has been received.
[0044] The edge computing gateway configuration transmission method and device provided by the present invention split the target configuration file into multiple slice files, and then send an MQTT message carrying the target slice file and verification information corresponding to the target slice file to the second communication end for each target slice file in the multiple slice files. The data volume corresponding to the slice file is much smaller than the data volume corresponding to the target configuration file, the transmission failure rate of the slice file is lower than the transmission failure rate of the target configuration file, and the slice files of the target configuration file can be sent in multiple channels. The transmission efficiency is higher than the efficiency of the point-to-point configuration file transmission method, which can reduce the transmission failure rate of the edge computing gateway configuration and improve the transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 It is one of the flow charts of the edge computing gateway configuration transmission method provided by the present invention;
[0047] Figure 2 This is the second flow chart of the edge computing gateway configuration transmission method provided by the present invention;
[0048] Figure 3 This is the third flow chart of the edge computing gateway configuration transmission method provided by the present invention;
[0049] Figure 4 This is a fourth flow chart of the edge computing gateway configuration transmission method provided by the present invention;
[0050] Figure 5 It is one of the structural schematic diagrams of the edge computing gateway configuration transmission device provided by the present invention;
[0051] Figure 6 This is the second structural diagram of the edge computing gateway configuration transmission device provided by the present invention;
[0052] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Figure 1 It is one of the flow charts of the edge computing gateway configuration transmission method provided by the present invention, such as Figure 1 As shown, the execution subject of the edge computing gateway configuration transmission method may be a first communication terminal, for example, the first communication terminal may be a cloud edge computing gateway management platform or an edge computing gateway. The method includes:
[0055] Step 101, obtaining multiple slice files of the target configuration file;
[0056] Specifically, in order to send the target configuration file to the second communication terminal, the first communication terminal may segment the target configuration file to obtain multiple segment files of the target configuration file.
[0057] Optionally, the first communication end may be a cloud-based edge computing gateway management platform, and the second communication end may be an edge computing gateway. In order to send the target configuration file to the edge computing gateway for applying the target configuration file to the edge computing gateway, the cloud-based edge computing gateway management platform may segment the target configuration file and obtain multiple segment files of the target configuration file.
[0058] Optionally, the first communication end may be an edge computing gateway, and the second communication end may be a cloud-based edge computing gateway management platform. In order to meet the request of the cloud-based edge computing gateway management platform to collect the target configuration file on the edge computing gateway, the edge computing gateway may slice the target configuration file and obtain multiple slice files of the target configuration file.
[0059] Step 102, for each target shard file in the multiple shard files, sending a message queuing telemetry transport (MQTT) message carrying the target shard file and verification information corresponding to the target shard file to the second communication end until the multiple shard files are sent;
[0060] Specifically, after obtaining multiple shard files of the target configuration file, the verification information corresponding to the target shard file can be determined for each target shard file in the multiple shard files, and the target shard file and the verification information corresponding to the target shard file can be carried in an MQTT message for sending. The MQTT messages corresponding to the multiple shard files can be sent in multiple channels until all shard files of the target configuration file are sent.
[0061] Optionally, the first communication end may be a cloud-based edge computing gateway management platform, and the second communication end may be an edge computing gateway. The cloud-based edge computing gateway management platform may send MQTT messages corresponding to multiple shard files in multiple channels, and may send all shard files of the target configuration file to the edge computing gateway, so that the edge computing gateway may obtain the target configuration file based on the received shard files and deploy and apply the target configuration file.
[0062] Optionally, the first communication end may be an edge computing gateway, and the second communication end may be a cloud-based edge computing gateway management platform. The edge computing gateway may send MQTT messages corresponding to multiple shard files in multiple channels, respectively, so that all shard files of the target configuration file of the edge computing gateway may be reported to the cloud-based edge computing gateway management platform, so that the cloud-based edge computing gateway management platform may collect the configuration file of the edge computing gateway through the received shard files.
[0063] Step 103: Send a first notification message to the second communication end to indicate that sending of the target configuration file is completed.
[0064] Specifically, after sending all the fragment files of the target configuration file, the first communication end can send a first notification message to the second communication end to notify the second communication end that the target configuration file has been sent, so that the second communication end can merge the received fragment files to obtain the target configuration file.
[0065] Optionally, the first communication end may be a cloud-based edge computing gateway management platform, and the second communication end may be an edge computing gateway. After sending all the fragment files of the target configuration file, the cloud-based edge computing gateway management platform may send a first notification message to the edge computing gateway, notifying the edge computing gateway that the target configuration file has been sent, so that the edge computing gateway can merge the received fragment files and obtain the target configuration file. It is understandable that after the edge computing gateway obtains the target configuration file, it can deploy and apply the target configuration file.
[0066] Optionally, the first communication end may be an edge computing gateway, and the second communication end may be a cloud-based edge computing gateway management platform. After sending all the fragmented files of the target configuration file, the edge computing gateway may send a first notification message to the cloud-based edge computing gateway management platform, notifying the cloud-based edge computing gateway management platform that the target configuration file has been sent, so that the cloud-based edge computing gateway management platform can merge the received fragmented files to obtain the target configuration file. It is understandable that after the cloud-based edge computing gateway management platform collects the target configuration file, it can store the target configuration file.
[0067] The edge computing gateway configuration transmission method provided by the present invention splits the target configuration file into multiple slice files, and then sends an MQTT message carrying the target slice file and verification information corresponding to the target slice file to the second communication end for each target slice file in the multiple slice files. The data volume corresponding to the slice file is much smaller than the data volume corresponding to the target configuration file, the transmission failure rate of the slice file is lower than the transmission failure rate of the target configuration file, and the slice files of the target configuration file can be sent in multiple channels. The transmission efficiency is higher than the efficiency of the point-to-point configuration file transmission method, which can reduce the transmission failure rate of the edge computing gateway configuration and improve the transmission efficiency.
[0068] Optionally, after sending the MQTT message carrying the target shard file and verification information corresponding to the target shard file to the second communication end, the method further includes:
[0069] Monitoring a second notification message sent by the second communication end to indicate a failure in transmission of the target segment file;
[0070] When it is determined that the second notification message is received, the MQTT message carrying the target segment file and the verification information corresponding to the target segment file is resent to the second communication end.
[0071] Optionally, the first communication end may be a cloud-based edge computing gateway management platform, and the second communication end may be an edge computing gateway. After the cloud-based edge computing gateway management platform sends an MQTT message carrying the target shard file and verification information corresponding to the target shard file to the edge computing gateway, it may monitor a second notification message sent by the edge computing gateway to indicate a failure in the transmission of the target shard file, and then, upon determining that the second notification message has been received, resend the MQTT message carrying the target shard file and verification information corresponding to the target shard file to the edge computing gateway.
[0072] Optionally, the first communication end may be an edge computing gateway, and the second communication end may be a cloud-based edge computing gateway management platform. After the edge computing gateway sends an MQTT message carrying the target shard file and verification information corresponding to the target shard file to the edge computing gateway, it may monitor a second notification message sent by the cloud-based edge computing gateway management platform to indicate a failure in the transmission of the target shard file, and then, upon determining that the second notification message has been received, resend the MQTT message carrying the target shard file and verification information corresponding to the target shard file to the cloud-based edge computing gateway management platform.
[0073] Therefore, in the case where the target segment file transmission fails, the first communication end may retransmit the target segment file to the second communication end to ensure that the target segment file is successfully received by the second communication end.
[0074] Optionally, the first communication end is a cloud edge computing gateway management platform, and before obtaining the multiple slice files of the target configuration file, the method further includes:
[0075] receiving a first input for uploading the target configuration file;
[0076] In response to the first input, obtaining the target configuration file;
[0077] receiving a second input for selecting an edge computing gateway;
[0078] In response to the second input, determining one or more edge computing gateways to be configured;
[0079] A target edge computing gateway is determined as the second communication end among the one or more edge computing gateways to be configured, and the target edge computing gateway is used to receive the target configuration file from the cloud edge computing gateway management platform and distribute the target configuration file to the one or more edge computing gateways to be configured.
[0080] Optionally, the user can upload the configuration file to the file server through the cloud-based edge computing gateway management platform (that is, receive the first input for uploading the target configuration file, and then obtain the target configuration file), and select the configuration file to be issued and the edge computing gateway to be configured on the cloud-based edge computing gateway management platform (that is, receive the second input for selecting the edge computing gateway, and then determine one or more edge computing gateways to be configured).
[0081] Optionally, the cloud-based edge computing gateway management platform selects a master gateway from the edge computing gateways selected by the user (that is, determines a target edge computing gateway from one or more edge computing gateways to be configured as the second communication end), and the other gateways serve as slave gateways.
[0082] It can be understood that the communication connection between the target edge computing gateway and other edge computing gateways to be configured (edge computing gateways other than the target edge computing gateway in one or more edge computing gateways to be configured) is relatively stable, and other edge computing gateways to be configured can stably download the target configuration file from the target edge computing gateway.
[0083] Optionally, after sending a first notification message indicating that sending of the target configuration file is completed to the second communication end, the method further includes:
[0084] Receiving a third notification message sent by the target edge computing gateway to indicate that the target configuration file has taken effect;
[0085] The one or more edge computing gateways to be configured are notified through an MQTT message to download the target configuration file from the target edge computing gateway.
[0086] Specifically, the first communication end may be a cloud-based edge computing gateway management platform, and the second communication end may be a target edge computing gateway. After the cloud-based edge computing gateway management platform sends a first notification message to the target edge computing gateway indicating that the target configuration file has been sent, the cloud-based edge computing gateway management platform may receive a third notification message sent by the target edge computing gateway indicating that the target configuration file has taken effect, and may then notify one or more edge computing gateways to be configured via an MQTT message to download the target configuration file from the target edge computing gateway.
[0087] It can be understood that the communication connection between the target edge computing gateway and other edge computing gateways to be configured is relatively stable, and other edge computing gateways to be configured can stably download the target configuration file from the target edge computing gateway.
[0088] Optionally, the first communication end is an edge computing gateway, and the second communication end is a cloud edge computing gateway management platform. Before obtaining the multiple shard files of the target configuration file, the method further includes:
[0089] Receive a fourth notification message sent by the cloud-based edge computing gateway management platform to instruct the collection of a configuration file of the edge computing gateway;
[0090] After obtaining the multiple fragment files of the target configuration file, the method further includes:
[0091] Sending a message carrying the name of the target configuration file, the number of shards and verification information to the cloud edge computing gateway management platform;
[0092] Receive an ACK (Acknowledge) confirmation message sent by the cloud edge computing gateway management platform.
[0093] It can be understood that the edge computing gateway can learn from receiving the fourth notification message that the cloud-based edge computing gateway management platform needs to collect the configuration file of the edge computing gateway, and then slice the configuration file. The edge computing gateway sends the total number of configuration file slices and the configuration file MD5 verification code to the cloud-based edge computing gateway management platform via an MQTT message. After receiving the MQTT message, the cloud-based edge computing gateway management platform saves the total number of configuration slices and the configuration file MD5 verification code, and sends an ACK message to the edge computing gateway via MQTT.
[0094] The edge computing gateway configuration transmission method provided by the present invention splits the target configuration file into multiple slice files, and then sends an MQTT message carrying the target slice file and verification information corresponding to the target slice file to the second communication end for each target slice file in the multiple slice files. The data volume corresponding to the slice file is much smaller than the data volume corresponding to the target configuration file, the transmission failure rate of the slice file is lower than the transmission failure rate of the target configuration file, and the slice files of the target configuration file can be sent in multiple channels. The transmission efficiency is higher than the efficiency of the point-to-point configuration file transmission method, which can reduce the transmission failure rate of the edge computing gateway configuration and improve the transmission efficiency.
[0095] Figure 2 This is a second flow chart of the edge computing gateway configuration transmission method provided by the present invention, such as Figure 2 As shown, the execution subject of the edge computing gateway configuration transmission method can be a second communication terminal, for example, the second communication terminal can be an edge computing gateway or a cloud edge computing gateway management platform. The method includes:
[0096] Step 201, receiving an MQTT message sent by a first communication terminal and carrying a target slice file and verification information corresponding to the target slice file, wherein the target slice file is any slice file among multiple slice files of a target configuration file;
[0097] Specifically, in order to enable the second communication end to receive the target configuration file, the second communication end can receive an MQTT message sent by the first communication end that carries the target shard file and verification information corresponding to the target shard file. The target shard file is any one of the multiple shard files of the target configuration file. The second communication end can receive the MQTT messages corresponding to the multiple shard files in multiple channels until all shard files of the target configuration file are received.
[0098] Optionally, the first communication end may be a cloud-based edge computing gateway management platform, and the second communication end may be an edge computing gateway. The edge computing gateway may receive MQTT messages corresponding to multiple shard files in multiple channels, and may send all shard files of the target configuration file to the edge computing gateway. The edge computing gateway may then obtain the target configuration file based on the received shard files and deploy and apply the target configuration file.
[0099] Optionally, the first communication end may be an edge computing gateway, and the second communication end may be a cloud-based edge computing gateway management platform. The cloud-based edge computing gateway management platform may receive MQTT messages corresponding to the shard files in multiple channels, and may report all shard files of the target configuration file of the edge computing gateway to the cloud-based edge computing gateway management platform. The cloud-based edge computing gateway management platform may then collect the configuration file of the edge computing gateway through the received shard files.
[0100] Step 202: Receive a first notification message sent by the first communication terminal, and determine that the target configuration file has been received.
[0101] Specifically, the second communication end may determine that the target configuration file has been received by receiving the first notification message sent by the first communication end, and then may merge the received segment files to obtain the target configuration file.
[0102] Optionally, the first communication end may be a cloud-based edge computing gateway management platform, and the second communication end may be an edge computing gateway. After the cloud-based edge computing gateway management platform sends all the fragment files of the target configuration file, the edge computing gateway may receive a first notification message to learn that the target configuration file has been sent, and then the edge computing gateway may merge the received fragment files to obtain the target configuration file. It is understandable that after the edge computing gateway obtains the target configuration file, it may deploy and apply the target configuration file.
[0103] Optionally, the first communication end may be an edge computing gateway, and the second communication end may be a cloud-based edge computing gateway management platform. After the edge computing gateway has sent all the fragmented files of the target configuration file, the cloud-based edge computing gateway management platform may receive a first notification message to obtain that the target configuration file has been sent, and then the cloud-based edge computing gateway management platform may merge the received fragmented files to obtain the target configuration file. It is understandable that after the cloud-based edge computing gateway management platform collects the target configuration file, it may store the target configuration file.
[0104] The edge computing gateway configuration transmission method provided by the present invention receives an MQTT message carrying a target shard file and verification information corresponding to the target shard file sent by a first communication terminal for each target shard file in multiple shard files. The data volume corresponding to the shard file is much smaller than the data volume corresponding to the target configuration file. The transmission failure rate of the shard file is lower than the transmission failure rate of the target configuration file. The shard files of the target configuration file can be received in multiple channels. The transmission efficiency is higher than the efficiency of the point-to-point configuration file transmission method. The transmission failure rate of the edge computing gateway configuration can be reduced and the transmission efficiency can be improved.
[0105] Optionally, after receiving the MQTT message sent by the first communication terminal and carrying the target shard file and verification information corresponding to the target shard file, the method further includes:
[0106] Based on the verification information corresponding to the target shard file, verify the target shard file to obtain a first verification result;
[0107] When the first verification result indicates that the verification has not passed, a second notification message indicating that the transmission of the target segment file has failed is sent to the first communication end.
[0108] Optionally, the first communication end may be a cloud-based edge computing gateway management platform, and the second communication end may be an edge computing gateway. After receiving an MQTT message sent by the cloud-based edge computing gateway management platform and carrying verification information corresponding to the target shard file, the edge computing gateway may verify the target shard file based on the verification information corresponding to the target shard file to obtain a first verification result. Further, when the first verification result indicates that the verification has failed, a second notification message indicating that the transmission of the target shard file has failed may be sent to the cloud-based edge computing gateway management platform.
[0109] Optionally, the first communication end may be an edge computing gateway, and the second communication end may be a cloud-based edge computing gateway management platform. After receiving an MQTT message sent by the edge computing gateway carrying the target shard file and verification information corresponding to the target shard file, the cloud-based edge computing gateway management platform may verify the target shard file based on the verification information corresponding to the target shard file to obtain a first verification result. Furthermore, if the first verification result indicates that the verification has failed, the cloud-based edge computing gateway management platform may send a second notification message to the edge computing gateway to indicate that the transmission of the target shard file has failed.
[0110] Optionally, the first communication end is an edge computing gateway, and the second communication end is a cloud edge computing gateway management platform. Before receiving an MQTT message sent by the first communication end and carrying the target shard file and verification information corresponding to the target shard file, the method further includes:
[0111] Sending a fourth notification message for instructing to collect a configuration file of the edge computing gateway to the edge computing gateway;
[0112] Receiving a message sent by the edge computing gateway carrying the name, number of shards and verification information of the target configuration file;
[0113] Send an ACK confirmation message to the edge computing gateway.
[0114] Optionally, the first communication end is an edge computing gateway, and the second communication end is a cloud edge computing gateway management platform. After receiving the first notification message sent by the first communication end and determining that the target configuration file has been received, the method further includes:
[0115] Merge the received target shard files to obtain the configuration file to be verified;
[0116] Based on the verification information of the target configuration file, verify the configuration file to be verified to obtain a second verification result;
[0117] When the second verification result indicates that the verification is passed, it is determined that the configuration file to be verified is consistent with the target configuration file.
[0118] Specifically, the first communication end may be an edge computing gateway, and the second communication end may be a cloud-based edge computing gateway management platform. After the cloud-based edge computing gateway management platform receives the first notification message sent by the edge computing gateway and determines that the target configuration file has been received, the cloud-based edge computing gateway management platform may merge the received target shard files to obtain the configuration file to be verified, and then verify the configuration file to be verified. When the second verification result indicates that the verification is passed, it can be determined that the configuration file to be verified is consistent with the target configuration file.
[0119] Therefore, by verifying the configuration file to be verified, it can be ensured that the configuration file to be verified is consistent with the target configuration file.
[0120] The edge computing gateway configuration transmission method provided by the present invention receives an MQTT message carrying a target shard file and verification information corresponding to the target shard file sent by a first communication terminal for each target shard file in multiple shard files. The data volume corresponding to the shard file is much smaller than the data volume corresponding to the target configuration file. The transmission failure rate of the shard file is lower than the transmission failure rate of the target configuration file. The shard files of the target configuration file can be received in multiple channels. The transmission efficiency is higher than the efficiency of the point-to-point configuration file transmission method. The transmission failure rate of the edge computing gateway configuration can be reduced and the transmission efficiency can be improved.
[0121] Optionally, Figure 3 This is a flow chart of the edge computing gateway configuration transmission method provided by the present invention, as shown in FIG. Figure 3 As shown, the cloud-based edge computing gateway management platform can send the target configuration file to the edge computing gateway so that the edge computing gateway deploys the target configuration file. Among them, the cloud-based edge computing gateway management platform can be used for device configuration management and edge computing gateway management, and the file server can be used to store device configuration files.
[0122] Alternatively, if Figure 3 As shown, the user can upload the configuration file to the file server through the cloud-based edge computing gateway management platform, and select the configuration file to be issued and the edge computing gateway to be configured on the cloud-based edge computing gateway management platform.
[0123] Alternatively, if Figure 3 As shown, the cloud-based edge computing gateway management platform selects the master gateway (i.e., the target edge computing gateway) from the edge computing gateways selected by the user, and the other gateways serve as slave gateways. The cloud-based edge computing gateway management platform downloads the configuration file from the file server and slices it. The cloud-based edge computing gateway management platform sends information such as the configuration file slices and the message digest algorithm (MD5) checksum of the slice file, the configuration file MD5 checksum, and the total number of slices to the master gateway via MQTT messages.
[0124] Alternatively, if Figure 3 As shown, after receiving the MQTT message, the master gateway verifies the MD5 value of the slice file. If the verification succeeds, the slice is temporarily stored; if the verification fails, the slice sequence number is sent to the cloud edge computing gateway management platform through the MQTT message, and the cloud edge computing gateway management platform resends the failed configuration slice according to the sequence number.
[0125] Alternatively, if Figure 3 As shown, after the cloud-based edge computing gateway management platform sends all configuration slices, it sends a message to the master gateway through MQTT to complete the sending of all configuration slices. The master gateway receives the message to complete the sending of the configuration slice file, assembles all temporarily stored configuration data slices into a configuration file, and verifies the integrity of the file. If the verification fails, the configuration delivery fails. If the verification passes, the configuration takes effect, and notifies the cloud-based edge computing gateway management platform of the configuration delivery result through an MQTT message.
[0126] Alternatively, if Figure 3 As shown, the cloud-based edge computing gateway management platform receives and analyzes the configuration delivery result of the master gateway. If it fails, the user is prompted that the configuration delivery failed; if it succeeds, the cloud-based edge computing gateway management platform notifies the slave gateway through an MQTT message to download the configuration file from the master gateway. After receiving the MQTT notification message from the edge computing gateway management platform, the slave gateway parses the message content and calls the Restful interface provided by the master gateway according to the message content to download the configuration file and make the configuration file effective. After the slave gateway configuration is delivered, the cloud-based edge computing gateway management platform is notified of the configuration delivery result through an MQTT message.
[0127] Optionally, Figure 4 This is a fourth flow chart of the edge computing gateway configuration transmission method provided by the present invention, such as Figure 4 As shown, the cloud-based edge computing gateway management platform can collect target configuration files on the edge computing gateway and store the collected target configuration files. Among them, the cloud-based edge computing gateway management platform can be used for device configuration management and edge computing gateway management, and the file server can be used to store device configuration files.
[0128] Alternatively, if Figure 4 As shown, the user operates the collection device configuration on the cloud-based edge computing gateway management platform, and the cloud-based edge computing gateway management platform generates and sends the collection configuration MQTT message according to the edge computing gateway selected by the user.
[0129] Alternatively, if Figure 4 As shown, after receiving the MQTT message, the edge computing gateway configures the configuration file slices. The edge computing gateway sends the total number of configuration file slices and the configuration file MD5 check code to the cloud-based edge computing gateway management platform through the MQTT message. After receiving the MQTT message, the cloud-based edge computing gateway management platform saves the total number of configuration slices and the configuration file MD5 check code, and sends an ACK message to the edge computing gateway through MQTT. After receiving the ACK message from the cloud-based edge computing gateway management platform, the edge computing gateway uploads the configuration slices and the current slice MD5 check code in multiple channels.
[0130] Alternatively, if Figure 4 As shown, the cloud-based edge computing gateway management platform receives the configuration slice uploaded by the edge computing gateway, and verifies the integrity of the slice through the slice MD5 checksum. If the verification succeeds, the slice is uploaded to the file server. If the verification fails, the slice sequence number is sent to the edge computing gateway through the MQTT message, and the edge computing gateway re-uploads the failed configuration slice according to the sequence number.
[0131] Alternatively, if Figure 4 As shown in the figure, after the edge computing gateway uploads all configuration slices, it sends a message through MQTT indicating that all configuration slices have been uploaded. After receiving the message, the cloud-based edge computing gateway management platform obtains all configuration slices from the file server, merges them, and verifies the integrity of the configuration file through the MD5 checksum. If the verification is successful, the configuration file is uploaded to the file server for users to download and view. If the verification fails, the user is prompted.
[0132] It can be understood that the present invention provides a technical solution that when the edge computing gateway configuration is issued, a master gateway is selected, the configuration file is sliced, the sliced file is sent to the master gateway through MQTT messages, and the slave gateway synchronizes the configuration file from the master gateway; it also provides a technical solution that when the edge computing gateway configuration is collected, the edge computing gateway slices the configuration file, sends the slice file and its MD5 check code through multiple MQTT messages, the cloud-based edge computing gateway management platform verifies the integrity of the slice through the MD5 check code after receiving the slice, and merges the slice files after receiving all slice files and verifies the integrity of the configuration file through the MD5 check code.
[0133] It can be understood that the present invention can realize configuration file management, and perform operations such as edge computing gateway configuration delivery and collection through the cloud-based edge computing management platform, which helps to improve the efficiency of edge computing gateway configuration delivery and collection running in a complex network environment and a low-bandwidth, high-latency network environment with the cloud-based edge computing management platform, and helps to improve the stability of device configuration delivery and collection. Through the cloud-based edge computing management platform, users can monitor the entire configuration delivery and collection process, effectively reducing the probability of failure of edge computing gateway configuration delivery and collection, helping to improve the level of configuration delivery and collection automation, and can lower the technical threshold of managers and avoid manual errors.
[0134] The edge computing gateway configuration transmission device provided by the present invention is described below. The edge computing gateway configuration transmission device described below and the edge computing gateway configuration transmission method described above can correspond to each other.
[0135] Figure 5 It is one of the structural diagrams of the edge computing gateway configuration transmission device provided by the present invention, such as Figure 5As shown, the device is applied to the first communication end, including: a first acquisition module 501, a first transmission module 502 and a second transmission module 503, wherein:
[0136] A first acquisition module 501 is used to acquire multiple fragment files of a target configuration file;
[0137] The first transmission module 502 is used to send an MQTT message carrying the target slice file and verification information corresponding to the target slice file to the second communication end for each target slice file in the multiple slice files, until the multiple slice files are sent;
[0138] The second transmission module 503 is configured to send a first notification message indicating that the target configuration file has been sent to the second communication end.
[0139] Figure 6 This is a second structural diagram of the edge computing gateway configuration transmission device provided by the present invention, such as Figure 6 As shown, the device is applied to the second communication end, including: a third transmission module 601 and a fourth transmission module 602, wherein:
[0140] The third transmission module 601 is used to receive an MQTT message sent by the first communication terminal and carrying a target slice file and verification information corresponding to the target slice file, wherein the target slice file is any slice file among multiple slice files of the target configuration file;
[0141] The fourth transmission module 602 is used to receive the first notification message sent by the first communication terminal, and determine that the target configuration file has been received.
[0142] Figure 7 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the edge computing gateway configuration transmission method, for example, the method includes:
[0143] Get multiple shard files of the target configuration file;
[0144] For each target slice file in the multiple slice files, sending an MQTT message carrying the target slice file and verification information corresponding to the target slice file to the second communication end until all the multiple slice files are sent;
[0145] A first notification message indicating that sending of the target configuration file is completed is sent to the second communication end.
[0146] Or for example the method comprises:
[0147] Receiving an MQTT message sent by the first communication terminal and carrying a target shard file and verification information corresponding to the target shard file, wherein the target shard file is any one of the multiple shard files of the target configuration file;
[0148] A first notification message sent by the first communication terminal is received to determine that the target configuration file has been received.
[0149] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0150] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the edge computing gateway configuration transmission method provided by the above methods, for example, the method includes:
[0151] Get multiple shard files of the target configuration file;
[0152] For each target slice file in the multiple slice files, sending an MQTT message carrying the target slice file and verification information corresponding to the target slice file to the second communication end until all the multiple slice files are sent;
[0153] A first notification message indicating that sending of the target configuration file is completed is sent to the second communication end.
[0154] Or for example the method comprises:
[0155] Receiving an MQTT message sent by the first communication terminal and carrying a target shard file and verification information corresponding to the target shard file, wherein the target shard file is any one of the multiple shard files of the target configuration file;
[0156] A first notification message sent by the first communication terminal is received to determine that the target configuration file has been received.
[0157] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the edge computing gateway configuration transmission method provided by the above methods, for example, the method includes:
[0158] Get multiple shard files of the target configuration file;
[0159] For each target slice file in the multiple slice files, sending an MQTT message carrying the target slice file and verification information corresponding to the target slice file to the second communication end until all the multiple slice files are sent;
[0160] A first notification message indicating that sending of the target configuration file is completed is sent to the second communication end.
[0161] Or for example the method comprises:
[0162] Receiving an MQTT message sent by the first communication terminal and carrying a target shard file and verification information corresponding to the target shard file, wherein the target shard file is any one of the multiple shard files of the target configuration file;
[0163] A first notification message sent by the first communication terminal is received to determine that the target configuration file has been received.
[0164] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0165] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for transmitting edge computing gateway configuration, It is characterized in that Applied to the first communication end, comprising: Get multiple shard files of the target configuration file; For each target shard file in the multiple shard files, an MQTT message carrying the target shard file and verification information corresponding to the target shard file is sent to the second communication end until the multiple shard files are sent; the sending of the MQTT message carrying the target shard file and verification information corresponding to the target shard file to the second communication end includes: sending the MQTT messages of verification information corresponding to the multiple shard files respectively in multiple channels; Sending a first notification message indicating that sending of the target configuration file is completed to the second communication end; After sending the MQTT message carrying the target shard file and the verification information corresponding to the target shard file to the second communication end, the method further includes: Monitoring a second notification message sent by the second communication end to indicate a failure in transmission of the target segment file; When it is determined that the second notification message is received, the MQTT message carrying the target segment file and the verification information corresponding to the target segment file is resent to the second communication end.
2. According to the edge computing gateway configuration transmission method of claim 1, It is characterized in that The first communication end is a cloud edge computing gateway management platform, and before obtaining multiple slice files of the target configuration file, it also includes: receiving a first input for uploading the target configuration file; In response to the first input, obtaining the target configuration file; receiving a second input for selecting an edge computing gateway; In response to the second input, determining one or more edge computing gateways to be configured; A target edge computing gateway is determined as the second communication end among the one or more edge computing gateways to be configured, and the target edge computing gateway is used to receive the target configuration file from the cloud edge computing gateway management platform and distribute the target configuration file to the one or more edge computing gateways to be configured.
3. According to the edge computing gateway configuration transmission method of claim 2, It is characterized in that After sending the first notification message indicating that the sending of the target configuration file is completed to the second communication end, the method further includes: Receiving a third notification message sent by the target edge computing gateway to indicate that the target configuration file has taken effect; The one or more edge computing gateways to be configured are notified through an MQTT message to download the target configuration file from the target edge computing gateway.
4. According to claim 1, the edge computing gateway configuration transmission method, It is characterized in that The first communication end is an edge computing gateway, and the second communication end is a cloud edge computing gateway management platform. Before obtaining multiple slice files of the target configuration file, the method further includes: Receive a fourth notification message sent by the cloud-based edge computing gateway management platform to instruct the collection of a configuration file of the edge computing gateway; After obtaining the multiple fragment files of the target configuration file, the method further includes: Sending a message carrying the name of the target configuration file, the number of shards and verification information to the cloud edge computing gateway management platform; Receive an ACK confirmation message sent by the cloud edge computing gateway management platform.
5. A method for transmitting edge computing gateway configuration, It is characterized in that Applied to the second communication end, comprising: Receiving an MQTT message sent by a first communication terminal and carrying a target slice file and verification information corresponding to the target slice file, wherein the target slice file is any one of multiple slice files of a target configuration file; the receiving of the MQTT message sent by the first communication terminal and carrying the target slice file and verification information corresponding to the target slice file comprises: receiving MQTT messages corresponding to the multiple slice files respectively in multiple channels until all the slice files of the target configuration file are received; receiving a first notification message sent by the first communication terminal, and determining that the target configuration file has been received; After receiving the MQTT message sent by the first communication terminal and carrying the target slice file and the verification information corresponding to the target slice file, the method further includes: Based on the verification information corresponding to the target shard file, verify the target shard file to obtain a first verification result; When the first verification result indicates that the verification has not passed, a second notification message indicating that the transmission of the target segment file has failed is sent to the first communication end.
6. According to the edge computing gateway configuration transmission method of claim 5, It is characterized in that The first communication end is an edge computing gateway, and the second communication end is a cloud edge computing gateway management platform. After receiving the first notification message sent by the first communication end and determining that the target configuration file has been received, the method further includes: Merge the received target shard files to obtain the configuration file to be verified; Based on the verification information of the target configuration file, verify the configuration file to be verified to obtain a second verification result; When the second verification result indicates that the verification is passed, it is determined that the configuration file to be verified is consistent with the target configuration file.
7. An edge computing gateway configuration transmission device, It is characterized in that Applied to the first communication end, comprising: A first acquisition module is used to acquire multiple fragment files of a target configuration file; The first transmission module is used to send an MQTT message carrying the target slice file and verification information corresponding to the target slice file to the second communication end for each target slice file in the multiple slice files, until the multiple slice files are sent; the sending of the MQTT message carrying the target slice file and verification information corresponding to the target slice file to the second communication end includes: sending the MQTT message of verification information corresponding to the multiple slice files respectively in multiple channels; A second transmission module, used for sending a first notification message indicating that the sending of the target configuration file is completed to the second communication end; The second transmission module is also used to, after sending the MQTT message carrying the target slice file and the verification information corresponding to the target slice file to the second communication end, also include: listening to the second notification message sent by the second communication end to indicate the failure of the transmission of the target slice file; when it is determined that the second notification message has been received, resending the MQTT message carrying the target slice file and the verification information corresponding to the target slice file to the second communication end.
8. An edge computing gateway configuration transmission device, It is characterized in that Applied to the second communication end, comprising: The third transmission module is used to receive an MQTT message sent by the first communication terminal and carrying a target slice file and verification information corresponding to the target slice file, wherein the target slice file is any one of the multiple slice files of the target configuration file; the receiving of the MQTT message sent by the first communication terminal and carrying the target slice file and verification information corresponding to the target slice file comprises: receiving the MQTT messages corresponding to the multiple slice files respectively in multiple channels until all the slice files of the target configuration file are received; A fourth transmission module, configured to receive a first notification message sent by the first communication terminal, and determine that the target configuration file has been received; The fourth transmission module is also used to, after receiving the MQTT message sent by the first communication end and carrying the target shard file and the verification information corresponding to the target shard file, also include: based on the verification information corresponding to the target shard file, verifying the target shard file to obtain a first verification result; when the first verification result indicates that the verification has not passed, sending a second notification message to the first communication end to indicate that the transmission of the target shard file has failed.
