Data transmission method and device

By deploying distributed message queues and cloud-edge data channels on the cloud and edge ends, combined with topic credential management, data conflicts and network restrictions in data interactions in cloud-edge collaboration are solved, and efficient data transmission is achieved.

CN119172367APending Publication Date: 2024-12-20NINGBO HOLLYSYS INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411209181.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

There are data conflicts and network restrictions in the existing cloud-edge collaboration, resulting in inefficient data interaction, edge-side applications cannot access cloud data, and cloud applications cannot access edge-side data.

Method used

Deploy distributed message queues on the cloud and edge side respectively, and realize data transmission through the cloud-edge data channel. Subscribe and publish data topics using the theme credentials assigned by the administrator to ensure data interaction between the cloud and edge side applications.

Benefits of technology

It effectively solves the network restriction problem in cloud-edge data interaction, and avoids data conflicts through topic management and permission control, and achieves low-latency, high-performance, and high-reliability data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172367A_ABST
    Figure CN119172367A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and device, and the method and device are applied to a cloud channel controller of a cloud end, the cloud channel controller is connected with a first message queue and a side channel controller of an edge end, and the side channel controller is connected with a second message queue of the edge end. The method comprises the following steps: receiving edge application data acquired and sent by an edge channel controller from a target theme in a second message queue; and storing the edge application data to the target theme in the first message queue, so that the cloud application with the read-write permission of the target theme in the first message queue obtains the edge application data from the target theme in the first message queue. According to the scheme, the distributed message queues are deployed at the cloud end and the edge end respectively, the network limitation problem in cloud edge data interaction is solved by combining the cloud edge data channel, in addition, the cloud application and the edge application publish and subscribe data in the subscribed data theme, and the data conflict problem is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and in particular to a data transmission method and device. Background Art

[0002] Industrial Internet systems often adopt a cloud-edge-end architecture design. The cloud platform is a platform on the center side, and there is a unified docking protocol and interface protocol between the edge platform. Each edge platform can be managed by the cloud platform. Edge computing is not only close to the execution unit, but also a unit for collecting and preliminarily processing high-value data required by the cloud, which can better support cloud applications; conversely, the business rules or models output by cloud computing through big data analysis optimization can be sent to the edge side, and edge computing runs based on new business rules or models. Cloud-edge collaboration includes resource collaboration, data collaboration, and service collaboration. In terms of resource collaboration, for time series data, edge nodes need to provide infrastructure resources such as computing, storage, and network, and can independently manage local resources and collaborate with the cloud to execute the resource scheduling strategy issued by the cloud. In data collaboration, edge nodes are responsible for collecting time series data, preprocessing and simple analysis according to the original data model, and uploading the results to the cloud for storage, analysis, and value mining. In terms of service collaboration, after the cloud trains the model, it sends it to the edge node, and the edge node performs inference based on the model; the cloud manages the life cycle of edge applications, including deployment, startup, stop, deletion, and version updates; the cloud generates application orchestration strategies, and the edge side executes the corresponding cloud strategies.

[0003] In the existing cloud-edge collaboration, data interaction uses open source data queues. The cloud has the characteristics of multi-tenancy, and there will be multiple edge terminals in a cloud. A tenant may also have multiple edge terminals, so data conflicts may occur. In addition, the network between the cloud and the edge is generally not connected. If an open source data queue is deployed on the cloud, the edge application cannot access it; if it is deployed on the edge, the cloud application cannot access it.

[0004] In summary, data conflict and network limitation issues in cloud-edge collaborative data interaction are problems that need to be solved urgently. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a data transmission method and device to achieve the purpose of solving data conflicts and network limitation problems in cloud-edge collaborative data interaction.

[0006] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0007] A first aspect of an embodiment of the present invention discloses a data transmission method, which is applied to a cloud channel controller in a cloud, wherein the cloud channel controller is connected to a first message queue and a side channel controller at an edge end respectively, and the side channel controller is connected to a second message queue at the edge end, and the method includes:

[0008] Receive edge application data obtained and sent by the edge channel controller from the target topic in the second message queue; the target topic is pre-subscribed by the edge application in the second message queue using the topic credentials assigned by the administrator, so that the edge application has read and write permissions for the target topic in the second message queue; the edge application data is generated by the edge application and written to the target topic in the second message queue;

[0009] The edge application data is stored in the target topic in the first message queue, so that the cloud application with the read and write permissions of the target topic in the first message queue can obtain the edge application data from the target topic in the first message queue; the cloud application has the read and write permissions of the target topic in the first message queue after subscribing to the target topic in the first message queue through the topic credentials assigned by the administrator in advance.

[0010] Preferably, the method further comprises:

[0011] acquiring, from the target topic in the first message queue, cloud application data written by the cloud application;

[0012] The cloud application data is sent to the side channel controller, triggering the side channel controller to store the cloud application data in the target topic in the second message queue, so that the edge application obtains the cloud application data from the target topic in the second message queue.

[0013] Preferably, sending the cloud application data to the side channel controller includes:

[0014] Preprocessing the cloud application data;

[0015] Based on the MQTT protocol or the HTTP protocol, the preprocessed cloud application data is sent to the side channel controller.

[0016] A second aspect of an embodiment of the present invention discloses a data transmission method, which is applied to a side channel controller at an edge end, wherein the side channel controller is respectively connected to a second message queue and a cloud channel controller at a cloud end, and the cloud channel controller is connected to a first message queue at a cloud end, and the method includes:

[0017] Obtain edge application data from a target topic in the second message queue; the target topic is pre-subscribed by the edge application in the second message queue using a topic credential assigned by an administrator, so that the edge application has read and write permissions for the target topic in the second message queue; the edge application data is generated by the edge application and written into the target topic in the second message queue;

[0018] The edge application data is sent to the cloud channel controller, triggering the cloud channel controller to store the edge application data in the target topic in the first message queue, so that the cloud application with the read and write permissions of the target topic in the first message queue obtains the edge application data from the target topic in the first message queue; the cloud application has the read and write permissions of the target topic in the first message queue after subscribing to the target topic in the first message queue through the topic credentials assigned by the administrator in advance.

[0019] Preferably, the method further comprises:

[0020] Receiving cloud application data acquired and sent by the cloud channel controller from the target topic in the first message queue; the cloud application data is generated by a cloud application having read and write permissions for the target topic in the first message queue, and is written into the target topic in the first message queue;

[0021] The cloud application data is stored in the target topic in the second message queue, so that the edge application obtains the cloud application data from the target topic in the second message queue.

[0022] Preferably, sending the edge application data to the cloud channel controller includes:

[0023] Preprocessing the edge application data;

[0024] Based on the MQTT protocol or the HTTP protocol, the preprocessed edge application data is sent to the cloud channel controller.

[0025] A third aspect of an embodiment of the present invention discloses a data transmission device, which is applied to a cloud channel controller in a cloud, wherein the cloud channel controller is connected to a first message queue and a side channel controller at an edge end respectively, and the side channel controller is connected to a second message queue at the edge end, wherein the device comprises:

[0026] A first receiving unit is used to receive edge application data obtained and sent by the edge channel controller from a target topic in the second message queue; the target topic is pre-subscribed in the second message queue by the edge application using the topic credentials assigned by the administrator, so that the edge application has read and write permissions for the target topic in the second message queue; the edge application data is generated by the edge application and written to the target topic in the second message queue;

[0027] The first storage unit is used to store the edge application data to the target topic in the first message queue, so that the cloud application with the read and write permissions of the target topic in the first message queue can obtain the edge application data from the target topic in the first message queue; the cloud application has the read and write permissions of the target topic in the first message queue after subscribing to the target topic in the first message queue through the topic credentials assigned by the administrator in advance.

[0028] A fourth aspect of an embodiment of the present invention discloses a data transmission device, which is applied to a side channel controller at an edge end, wherein the side channel controller is respectively connected to a second message queue and a cloud channel controller at a cloud end, and the cloud channel controller is connected to a first message queue at a cloud end, and the device comprises:

[0029] A first acquisition unit is used to acquire edge application data from a target topic in the second message queue; the target topic is pre-subscribed by the edge application in the second message queue using a topic credential assigned by an administrator, so that the edge application has read and write permissions for the target topic in the second message queue; the edge application data is generated by the edge application and written into the target topic in the second message queue;

[0030] The first sending unit is used to send the edge application data to the cloud channel controller, triggering the cloud channel controller to store the edge application data in the target topic in the first message queue, so that the cloud application with the read and write permissions of the target topic in the first message queue can obtain the edge application data from the target topic in the first message queue; the cloud application has the read and write permissions of the target topic in the first message queue after subscribing to the target topic in the first message queue through the topic credentials assigned by the administrator in advance.

[0031] A fifth aspect of an embodiment of the present invention discloses a storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the data transmission method described in any one of the first aspect or the second aspect of the embodiment of the present invention.

[0032] A sixth aspect of an embodiment of the present invention discloses an electronic device, including: a memory and a processor;

[0033] The memory is used to store computer programs;

[0034] The processor is used to execute the computer program, specifically to implement the data transmission method described in any one of the first aspect or the second aspect of the embodiments of the present invention.

[0035] Based on the above-mentioned embodiment of the present invention, a data transmission method and device are provided, which are applied to a cloud channel controller on the cloud side, and the cloud channel controller is respectively connected to a first message queue and a side channel controller on the edge side, and the side channel controller is connected to a second message queue on the edge side. The method includes: receiving edge application data obtained and sent by the side channel controller from a target topic in the second message queue; the target topic is subscribed in advance in the second message queue by the edge application using the topic credentials assigned by the administrator, so that the edge application has the read and write permissions of the target topic in the second message queue; the edge application data is generated by the edge application and written to the target topic in the second message queue; the edge application data is stored in the target topic in the first message queue, so that the cloud application with the read and write permissions of the target topic in the first message queue obtains the edge application data from the target topic in the first message queue; the cloud application has the read and write permissions of the target topic in the first message queue after subscribing to the target topic in the first message queue in advance using the topic credentials assigned by the administrator. In this solution, distributed message queues are deployed on the cloud and edge respectively, and combined with cloud-edge data channels to solve the network limitation problem in cloud-edge data interaction. In addition, both cloud applications and edge applications publish and subscribe to data in subscribed data topics, effectively solving the data conflict problem. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0037] Figure 1 A diagram of a cloud-edge collaboration architecture disclosed in an embodiment of the present invention;

[0038] Figure 2 An architectural diagram of a real-time distributed message queue disclosed in an embodiment of the present invention;

[0039] Figure 3 A flowchart of a data transmission method disclosed in an embodiment of the present invention;

[0040] Figure 4 A flowchart of another data transmission method disclosed in an embodiment of the present invention;

[0041] Figure 5 A structural diagram of a data transmission device disclosed in an embodiment of the present invention;

[0042] Figure 6 A structural diagram of another data transmission device disclosed in an embodiment of the present invention;

[0043] Figure 7 The present invention is a structural diagram of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0045] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0046] like Figure 1 As shown, a cloud-edge collaboration architecture diagram disclosed in an embodiment of the present invention.

[0047] The cloud includes: distributed message queues that communicate with each other, cloud synchronization controllers, and cloud channel controllers (CloudHub).

[0048] The edge end includes: distributed message queues, edge synchronization controllers and side channel controllers (EdgeHub) that communicate with each other.

[0049] Among them, the distributed message queue on the cloud side is the first message queue, and the distributed message queue on the edge side is the second message queue; the cloud channel controller and the edge channel controller are communicated and connected to form a cloud-edge data channel.

[0050] The first message queue and the second message queue are deployed on the cloud and edge respectively. Through the cloud-edge data channel, the edge application directly sends the edge application data to the target topic in the second message queue. The cloud-edge data channel transmits and stores the edge application data to the target topic in the first message queue. The cloud application subscribes to the target topic in the first message queue to receive the data sent by the edge application.

[0051] On the contrary, the cloud application directly sends the cloud application data to the target topic in the first message queue, and the cloud-edge data channel transmits and stores the cloud application data to the target topic in the second message queue. The edge application subscribes to the target topic in the second message queue to receive the data sent by the cloud application.

[0052] It should be noted that in a message queue, a topic is an identifier used to classify and organize messages. The application will publish data to a specific topic (i.e., the target topic), and the data acquisition release can subscribe to this target topic to receive related data. For the present invention, there is a target topic in both the first message queue and the second message queue, that is, there is the same identifier. When data is transferred between queues, it is only transferred under the target topic. For example, the data of the target topic in the first message queue will still be saved in the target topic when it is transferred to the second message queue.

[0053] It is understandable that the first message queue and the second message queue are real-time distributed message queues, which are respectively set up on the cloud and the edge. For applications on the cloud and the edge, it is equivalent to using the same set of message queues.

[0054] It should be noted that the goal of real-time distributed data queue technology is to support the data interaction between the time series database, information model service, algorithm online service, cloud-edge data synchronization service, and internal components of the time series database in the cloud-edge integrated time series spatiotemporal database architecture, and to support the efficient writing of time series data. At the same time, the reliability and integrity of system data are guaranteed based on distributed data queue technology.

[0055] In an embodiment of the present invention, real-time distributed data queue technology is combined with cloud-edge data channels to solve the data interaction between cloud and edge in cloud-edge collaboration, such as resource collaboration, data collaboration and service collaboration, while having the characteristics of low latency, order, high performance and high reliability.

[0056] In the process of edge-cloud interaction, the cloud synchronization controller and the edge synchronization controller are responsible for ensuring data synchronization and consistency between the edge and the cloud. The cloud synchronization controller and the edge synchronization controller can manage the order and processing of data through timestamps, sequence numbers, or other methods to ensure correctness and reliability in an asynchronous environment.

[0057] Exemplarily, the application data interacted between the cloud and the edge include time series data, and the cloud synchronization controller and the edge synchronization controller can manage the order in which the time series data is sent according to the timestamps in the time series data.

[0058] like Figure 2 As shown, it is an architecture diagram of a real-time distributed message queue disclosed in an embodiment of the present invention.

[0059] It should be noted that the present invention adopts cloud native technology, and microservices (i.e., cloud applications and edge applications) are used as cloud native architectures. Each microservice can be developed in different development languages, and data interaction between microservices needs to be realized through distributed data queues. Therefore, distributed data queues need to meet the support of multiple development languages. To meet these requirements, a log-based distributed storage system is adopted.

[0060] For example, a Kafka cluster is selected as the basis of a distributed data queue, and the MQTT protocol is extended on it, thereby reducing the complexity of using distributed message queues in various components of the cloud-edge integrated time-series spatiotemporal database architecture, while satisfying the distributed data queue's support for multiple development languages.

[0061] Among them, Producer: producer, that is, the sender of the message; Consumer: consumer, that is, the receiver of the message; Admin: administrator; HAProxy: load balancer; MQTT: message queue telemetry transmission, which is a message protocol based on the publish / subscribe paradigm under the ISO standard (ISO / IEC PRF20922); MQTT Broker: MQTT server; Store: message storage unit.

[0062] The real-time distributed data queue adopts an architecture that separates computing and storage, in which multiple MQTT servers form the computing layer and the Kafka cluster forms the storage layer.

[0063] The architecture of computing and storage separation is adopted, that is, the data transmission layer adopts MQTT protocol, and the storage layer adopts log-based distributed storage system (kafka) to store data, which ensures high data reliability and solves the problem of data loss when the subscriber is offline. In addition, scalability is achieved through clustering.

[0064] The real-time distributed data queue publishes and subscribes to data on the data bus through the MQTT protocol, and uses token issuance and verification to control user access to data topics. The details are as follows:

[0065] After the administrator registers the application (including cloud applications and edge applications), he / she assigns the application a subject credential token. The administrator assigns the application read and write permissions for specific data topics.

[0066] The cloud application uses the topic credential token to subscribe to a specific data topic in the distributed message queue on the cloud (i.e., subscribe to data), and the edge application uses the topic credential token to publish data (i.e., write data) to a specific data topic in the distributed message queue on the edge.

[0067] Correspondingly, the edge application uses the topic credential token to subscribe to the specific data topic of the edge distributed message queue (i.e., subscribe to data), and the cloud application uses the topic credential token to publish data (i.e., write data) to the specific data topic of the cloud distributed message queue.

[0068] It should be noted that the cloud synchronization controller can be used to extract cloud application data from the distributed message queue on the cloud in sequence according to the generation timestamp of the cloud application data and send it to the cloud channel controller. The cloud channel controller sends the cloud application data to the edge channel controller. The edge channel controller forwards the cloud application data to the edge synchronization controller. The edge synchronization controller stores the cloud application data in the distributed message queue on the edge in sequence according to the generation timestamp of the cloud application data.

[0069] Correspondingly, the edge synchronization controller can be used to extract edge application data from the distributed message queue at the edge in sequence according to the generation timestamp of the edge application data and send it to the edge channel controller. The edge channel controller sends the edge application data to the cloud channel controller. The cloud channel controller forwards the edge application data to the cloud synchronization controller. The cloud synchronization controller stores the edge application data in the distributed message queue at the cloud in sequence according to the generation timestamp of the edge application data.

[0070] Multi-tenancy is supported in real-time distributed data queues, that is, each application can only access the data of the corresponding data topic, there will be no topic conflict, and the data is isolated.

[0071] Based on the cloud-edge collaborative architecture disclosed in the above embodiment of the present invention, Figure 3 FIG. 1 is a flowchart of a data transmission method disclosed in an embodiment of the present invention, which is applied to a cloud channel controller in the cloud and mainly includes the following steps:

[0072] Step S301: receiving edge application data acquired and sent by the side channel controller from the target topic in the second message queue.

[0073] The target topic is a data topic that the edge application pre-subscribes to in the second message queue using the topic credentials assigned by the administrator, so that the edge application has read and write permissions for the target topic in the second message queue.

[0074] The edge application data includes: time series data and event data generated by the edge application. After the edge application data is generated, since the edge application subscribes to the target topic in the second message queue, it will be written to the target topic in the second message queue.

[0075] Step S302: Store the edge application data in the target topic in the first message queue, so that the cloud application with read and write permissions for the target topic in the first message queue can obtain the edge application data from the target topic in the first message queue.

[0076] The cloud application subscribes to the target topic in the first message queue in advance through the topic credentials allocated by the administrator, and then has the read and write permissions of the target topic in the first message queue.

[0077] During the specific implementation of step S302, the edge application data is sent to the cloud synchronization controller, which stores the data in the target topic in the first message queue in sequence according to a preset strategy, so that the cloud application with read and write permissions for the target topic in the first message queue can obtain the edge application data from the target topic in the first message queue.

[0078] Among them, the prediction strategy can be based on the timestamp or serial number carried by the edge application data.

[0079] In one embodiment, cloud application data written by a cloud application is obtained from a target topic in a first message queue, and the cloud application data is sent to a side channel controller, triggering the side channel controller to store the cloud application data in a target topic in a second message queue, so that the edge application obtains the cloud application data from the target topic in the second message queue.

[0080] Among them, cloud application data can be parameters of information models, parameters of algorithm models, control instructions, etc.

[0081] Specifically, the cloud synchronization controller can be used to obtain the cloud application data written by the cloud application from the target topic in the first message queue in a certain order, and then provide it to the cloud channel controller.

[0082] Preferably, the cloud channel controller pre-processes the cloud application data; based on the MQTT protocol or the HTTP protocol, the pre-processed cloud application data is sent to the side channel controller.

[0083] Preprocessing includes data cleaning, denoising, etc.

[0084] Based on a data transmission method disclosed in the above-mentioned embodiment of the present invention, in this solution, distributed message queues are deployed on the cloud and edge respectively, and combined with the cloud-edge data channel to solve the network limitation problem in cloud-edge data interaction. In addition, both cloud applications and edge applications publish and subscribe to data in the subscribed data topics, effectively solving the data conflict problem.

[0085] Based on the cloud-edge collaborative architecture disclosed in the above embodiment of the present invention, Figure 4 As shown, it is a flowchart of another data transmission method disclosed in an embodiment of the present invention, which is applied to a side channel controller at an edge end and mainly includes the following steps:

[0086] Step S401: Acquire edge application data from a target topic in a second message queue.

[0087] The target topic is a topic that the edge application pre-subscribes to in the second message queue using the topic credentials assigned by the administrator, so that the edge application has read and write permissions for the target topic in the second message queue.

[0088] The edge application data is generated by the edge application and written to the target topic in the second message queue.

[0089] Specifically, the edge synchronization controller can be used to obtain the edge application data written by the edge application from the target topic in the second message queue in a certain order, and then provide it to the cloud channel controller.

[0090] Step S402: Send the edge application data to the cloud channel controller, triggering the cloud channel controller to store the edge application data in the target topic in the first message queue, so that the cloud application with read and write permissions for the target topic in the first message queue can obtain the edge application data from the target topic in the first message queue.

[0091] The cloud application subscribes to the target topic in the first message queue in advance through the topic credentials allocated by the administrator, and then has the read and write permissions of the target topic in the first message queue.

[0092] In step S402, the edge application data is preprocessed, and the preprocessed edge application data is sent to the cloud channel controller based on the MQTT protocol or the HTTP protocol.

[0093] Among them, preprocessing includes data cleaning, denoising, etc.

[0094] In one embodiment, the cloud application data is received and sent by the cloud channel controller from the target topic in the first message queue.

[0095] The cloud application data is generated by a cloud application having read and write permissions for the target topic in the first message queue, and is written into the target topic in the first message queue.

[0096] The cloud application data is stored in the target topic in the second message queue, so that the edge application obtains the cloud application data from the target topic in the second message queue.

[0097] Based on a data transmission method disclosed in the above-mentioned embodiment of the present invention, in this solution, distributed message queues are deployed on the cloud and edge respectively, and combined with the cloud-edge data channel to solve the network limitation problem in cloud-edge data interaction. In addition, both cloud applications and edge applications publish and subscribe to data in the subscribed data topics, effectively solving the data conflict problem.

[0098] and Figure 3 The corresponding embodiment of the present invention discloses a data transmission method, such as Figure 5 , which is a structural diagram of a data transmission device disclosed in an embodiment of the present invention, applied to a cloud channel controller in the cloud, including: a first receiving unit 501 and a first storage unit 502 .

[0099] The first receiving unit 501 is used to receive edge application data obtained and sent by the edge channel controller from the target topic in the second message queue; the target topic is subscribed in advance by the edge application in the second message queue using the topic credentials assigned by the administrator, so that the edge application has read and write permissions for the target topic in the second message queue; the edge application data is generated by the edge application and written to the target topic in the second message queue.

[0100] The first storage unit 502 is used to store edge application data in the target topic in the first message queue, so that the cloud application with read and write permissions for the target topic in the first message queue can obtain the edge application data from the target topic in the first message queue; the cloud application has read and write permissions for the target topic in the first message queue after subscribing to the target topic in the first message queue through the topic credentials assigned by the administrator in advance.

[0101] In one embodiment, the device further comprises:

[0102] The second acquisition unit is used to acquire the cloud application data written by the cloud application from the target topic in the first message queue.

[0103] The second sending unit is used to send the cloud application data to the edge channel controller, triggering the edge channel controller to store the cloud application data in the target topic in the second message queue, so that the edge application obtains the cloud application data from the target topic in the second message queue.

[0104] Among them, the second sending unit that sends the cloud application data to the side channel controller is specifically used to: pre-process the cloud application data; and send the pre-processed cloud application data to the side channel controller based on the MQTT protocol or the HTTP protocol.

[0105] Based on a data transmission device disclosed in the above-mentioned embodiment of the present invention, in this solution, distributed message queues are deployed on the cloud and edge respectively, and combined with the cloud-edge data channel to solve the network limitation problem in cloud-edge data interaction. In addition, both cloud applications and edge applications publish and subscribe to data in the subscribed data topics, effectively solving the data conflict problem.

[0106] and Figure 4 The corresponding embodiment of the present invention discloses a data transmission method, such as Figure 6 , which is a structural diagram of another data transmission device disclosed in an embodiment of the present invention. The device is applied to a side channel controller at an edge end and includes: a first acquisition unit 601 and a first sending unit 602.

[0107] The first acquisition unit 601 is used to obtain edge application data from the target topic in the second message queue; the target topic is pre-subscribed by the edge application in the second message queue using the topic credentials assigned by the administrator, so that the edge application has read and write permissions for the target topic in the second message queue; the edge application data is generated by the edge application and written to the target topic in the second message queue.

[0108] The first sending unit 602 is used to send edge application data to the cloud channel controller, triggering the cloud channel controller to store the edge application data in the target topic in the first message queue, so that the cloud application with read and write permissions to the target topic in the first message queue can obtain the edge application data from the target topic in the first message queue; the cloud application has read and write permissions to the target topic in the first message queue after subscribing to the target topic in the first message queue through the topic credentials assigned by the administrator in advance.

[0109] The first sending unit 602 for sending edge application data to the cloud channel controller is specifically used for:

[0110] Preprocess the edge application data; based on the MQTT protocol or HTTP protocol, send the preprocessed edge application data to the cloud channel controller.

[0111] In one embodiment, the device further comprises:

[0112] The second receiving unit is used to receive cloud application data obtained and sent by the cloud channel controller from the target topic in the first message queue; the cloud application data is generated by a cloud application with read and write permissions for the target topic in the first message queue, and written into the target topic in the first message queue.

[0113] The second storage unit is used to store the cloud application data in the target topic in the second message queue, so that the edge application obtains the cloud application data from the target topic in the second message queue.

[0114] Based on a data transmission device disclosed in the above-mentioned embodiment of the present invention, in this solution, distributed message queues are deployed on the cloud and edge respectively, and combined with the cloud-edge data channel to solve the network limitation problem in cloud-edge data interaction. In addition, both cloud applications and edge applications publish and subscribe to data in the subscribed data topics, effectively solving the data conflict problem.

[0115] The present invention also provides an electronic device, please refer to Figure 7 , the electronic device includes a memory 701 and a processor 702.

[0116] Wherein, the memory 701 is used to store computer programs;

[0117] The processor 702 is used to execute a computer program, specifically to implement the data transmission method provided in any embodiment of the present application.

[0118] The present application also provides a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the data transmission method provided in any embodiment of the present application.

[0119] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, 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 creative work.

[0120] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0121] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data transmission method, It is characterized in that A cloud channel controller applied to a cloud end, the cloud channel controller is connected to a first message queue and a side channel controller of an edge end respectively, the side channel controller is connected to a second message queue of the edge end, and the method includes: Receive edge application data obtained and sent by the edge channel controller from the target topic in the second message queue; the target topic is pre-subscribed by the edge application in the second message queue using the topic credentials assigned by the administrator, so that the edge application has read and write permissions for the target topic in the second message queue; the edge application data is generated by the edge application and written to the target topic in the second message queue; The edge application data is stored in the target topic in the first message queue, so that the cloud application with the read and write permissions of the target topic in the first message queue can obtain the edge application data from the target topic in the first message queue; the cloud application has the read and write permissions of the target topic in the first message queue after subscribing to the target topic in the first message queue through the topic credentials assigned by the administrator in advance.

2. The method according to claim 1, It is characterized in that The method further comprises: acquiring, from the target topic in the first message queue, cloud application data written by the cloud application; The cloud application data is sent to the side channel controller, triggering the side channel controller to store the cloud application data in the target topic in the second message queue, so that the edge application obtains the cloud application data from the target topic in the second message queue.

3. The method according to claim 2, It is characterized in that The sending the cloud application data to the side channel controller includes: Preprocessing the cloud application data; Based on the MQTT protocol or the HTTP protocol, the preprocessed cloud application data is sent to the side channel controller.

4. A data transmission method, It is characterized in that A side channel controller applied to an edge end, the side channel controller is connected to a second message queue and a cloud channel controller in the cloud respectively, the cloud channel controller is connected to a first message queue in the cloud, and the method includes: Obtain edge application data from a target topic in the second message queue; the target topic is pre-subscribed by the edge application in the second message queue using a topic credential assigned by an administrator, so that the edge application has read and write permissions for the target topic in the second message queue; the edge application data is generated by the edge application and written into the target topic in the second message queue; The edge application data is sent to the cloud channel controller, triggering the cloud channel controller to store the edge application data in the target topic in the first message queue, so that the cloud application with the read and write permissions of the target topic in the first message queue obtains the edge application data from the target topic in the first message queue; the cloud application has the read and write permissions of the target topic in the first message queue after subscribing to the target topic in the first message queue through the topic credentials assigned by the administrator in advance.

5. The method according to claim 4, It is characterized in that The method further comprises: Receiving cloud application data acquired and sent by the cloud channel controller from the target topic in the first message queue; the cloud application data is generated by a cloud application having read and write permissions for the target topic in the first message queue, and is written into the target topic in the first message queue; The cloud application data is stored in the target topic in the second message queue, so that the edge application obtains the cloud application data from the target topic in the second message queue.

6. The method according to claim 4, It is characterized in that The sending the edge application data to the cloud channel controller includes: Preprocessing the edge application data; Based on the MQTT protocol or the HTTP protocol, the preprocessed edge application data is sent to the cloud channel controller.

7. A data transmission device, It is characterized in that A cloud channel controller applied to a cloud end, the cloud channel controller is connected to a first message queue and a side channel controller of an edge end respectively, the side channel controller is connected to a second message queue of the edge end, and the device comprises: A first receiving unit is used to receive edge application data obtained and sent by the edge channel controller from a target topic in the second message queue; the target topic is pre-subscribed in the second message queue by the edge application using the topic credentials assigned by the administrator, so that the edge application has read and write permissions for the target topic in the second message queue; the edge application data is generated by the edge application and written to the target topic in the second message queue; The first storage unit is used to store the edge application data to the target topic in the first message queue, so that the cloud application with the read and write permissions of the target topic in the first message queue can obtain the edge application data from the target topic in the first message queue; the cloud application has the read and write permissions of the target topic in the first message queue after subscribing to the target topic in the first message queue through the topic credentials assigned by the administrator in advance.

8. A data transmission device, It is characterized in that A side channel controller applied to an edge end, the side channel controller is connected to a second message queue and a cloud channel controller in the cloud respectively, the cloud channel controller is connected to a first message queue in the cloud, and the device includes: A first acquisition unit is used to acquire edge application data from a target topic in the second message queue; the target topic is pre-subscribed by the edge application in the second message queue using a topic credential assigned by an administrator, so that the edge application has read and write permissions for the target topic in the second message queue; the edge application data is generated by the edge application and written into the target topic in the second message queue; The first sending unit is used to send the edge application data to the cloud channel controller, triggering the cloud channel controller to store the edge application data in the target topic in the first message queue, so that the cloud application with the read and write permissions of the target topic in the first message queue can obtain the edge application data from the target topic in the first message queue; the cloud application has the read and write permissions of the target topic in the first message queue after subscribing to the target topic in the first message queue through the topic credentials assigned by the administrator in advance.

9. A storage medium, It is characterized in that Used to store a computer program, which, when executed, is specifically used to implement the data transmission method as described in any one of claims 1 to 3, or to implement the data transmission method as described in any one of claims 4 to 6.

10. An electronic device, It is characterized in that include: Memory and processor; The memory is used to store computer programs; The processor is used to execute the computer program, specifically to implement the data transmission method as described in any one of claims 1 to 3, or to implement the data transmission method as described in any one of claims 4 to 6.

Citation Information

Cited By

  • Multi-region cloud platform data consistency processing method, device, product and system

    CN120086290A

  • Multi-region cloud platform data consistency processing method, device, product and system

    CN120086290B