Cloud-edge Collaborative Message Intercommunication Method, System and Storage Medium for Internet of Things
Through the collaborative work of cloud virtual consumers and edge consumer agent services, the technical problem of message interoperability under the cloud-edge collaboration architecture is solved, and the message interoperability between the cloud and edge is realized, ensuring the security and flexibility of message transmission.
Patent Information
- Application Number
- CN202211614923.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-15
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-12-15
AI Technical Summary
Under the cloud-edge collaboration architecture, there are technical challenges in how to achieve message interoperability between the cloud and the edge.
Through the collaborative work of cloud producers and edge consumer agent services, cloud virtual consumers and edge consumer agent services are used to simulate producers and consumers, establish a message queue subscription and delivery mechanism, and realize the interoperability of messages between the cloud and the edge.
There is no need to adjust the business code, maintain development consistency, reduce maintenance complexity, and realize the message interoperability channel under cloud-edge collaboration, ensuring the security and flexibility of messaging.
Smart Images

Figure CN116112518B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things communication technologies, and in particular, to a cloud-edge collaborative message intercommunication method, system, and storage medium for the Internet of Things. Background Art
[0002] With the rapid development of information technology, Internet of Things technologies have been widely applied. The Internet of Things usage scenarios required by different business fields vary, and these differences are mainly reflected in environmental differences, differences in platform security requirements, etc. In order to meet the Internet of Things usage scenario requirements of various different business fields, the operation mode and deployment architecture of the Internet of Things platform need to be flexible and diverse enough, such as the cloud-edge collaborative architecture. With the emergence of the cloud-edge collaborative architecture, technical challenges have arisen in how to achieve cloud-edge communication. Currently, for cloud-edge communication under cloud-edge collaboration, there is an urgent need for a method that can achieve message intercommunication between the cloud and the edge under cloud-edge collaboration. Summary of the Invention
[0003] In view of this, embodiments of this application provide a cloud-edge collaborative message intercommunication method, system, and storage medium for the Internet of Things, aiming to at least solve the technical problem of how messages are intercommunicated between the cloud and the edge under cloud-edge collaboration.
[0004] The first aspect of the embodiments of this application provides a cloud-edge collaborative message intercommunication method for the Internet of Things. The method is applied to the cloud and includes: a cloud producer obtains a first message to be consumed and delivers the first message to be consumed to a cloud public queue to wait for consumption; a cloud virtual consumer subscribes to messages from the cloud public queue, obtains the first message to be consumed, and delivers the first message to be consumed to a cloud private queue to wait for consumption, where the cloud private queue accepts subscriptions from an edge consumption proxy service.
[0005] In combination with the first aspect, in some possible implementation manners, the step of the cloud virtual consumer delivering the first message to be consumed to the cloud private queue to wait for consumption includes: using a preset message interceptor to determine whether the first message to be consumed meets a preset interception condition; if it does not meet the condition, then delivering the first message to be consumed to the cloud private queue to wait for consumption.
[0006] In combination with the first aspect, in some possible implementation manners, the method further includes: a cloud virtual producer receives a second message to be consumed reported by the edge consumption proxy service and simulates an edge producer to deliver the second message to be consumed to the cloud public queue to wait for consumption; a cloud consumer subscribes to messages from the cloud public queue, obtains the second message to be consumed, and processes the second message to be consumed.
[0007] In the second aspect of the embodiments of the present application, a cloud-edge collaborative message intercommunication method for the Internet of Things is provided. The method is applied to the edge side and includes: the edge-side consumption proxy service subscribes to messages from the cloud private queue to obtain the first message to be consumed; the edge-side consumption proxy service simulates the cloud producer and delivers the first message to be consumed to the edge public queue for waiting to be consumed; the edge consumer subscribes to messages from the edge public queue, obtains the first message to be consumed, and processes the first message to be consumed.
[0008] In combination with the second aspect, in some possible implementation manners, before the step that the edge-side consumption proxy service subscribes to messages from the cloud private queue to obtain the first message to be consumed, it further includes: identifying whether the edge-side consumption proxy service has read permission in the cloud private queue; if it has, establishing a subscription link between the edge-side consumption proxy service and the cloud private queue, where the subscription link is used to transfer the first message to be consumed from the cloud private queue to the edge-side consumption proxy service.
[0009] In combination with the second aspect, in some possible implementation manners, the method further includes: the edge producer obtains the second message to be consumed and delivers the second message to be consumed to the edge public queue for waiting to be consumed; the edge-side consumption proxy service subscribes to messages from the edge public queue, obtains the second message to be consumed, and reports the second message to be consumed to the cloud virtual producer, where the cloud virtual producer is used to simulate the edge producer and deliver the second message to be consumed to the cloud public queue for waiting to be consumed.
[0010] In combination with the second aspect, in some possible implementation manners, the step that the edge-side consumption proxy service reports the second message to be consumed to the cloud virtual producer includes: the edge-side consumption proxy service reports the second message to be consumed to the cloud virtual producer by using the RPC remote call service.
[0011] In the third aspect of the embodiments of the present application, a cloud is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The feature is that when the processor executes the computer program, it implements the steps of the cloud-edge collaborative message intercommunication method for the Internet of Things provided in the first aspect.
[0012] In the fourth aspect of the embodiments of the present application, an edge side is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The feature is that when the processor executes the computer program, it implements the steps of the cloud-edge collaborative message intercommunication method for the Internet of Things provided in the second aspect.
[0013] The fifth aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the steps of the cloud-edge collaborative message intercommunication method of the Internet of Things provided in the first aspect or the second aspect.
[0014] A cloud-edge collaborative message intercommunication method, system and storage medium provided by the embodiments of the present application have the following beneficial effects:
[0015] In the present application, the cloud producer obtains the first message to be consumed and delivers the first message to be consumed to the cloud public queue for waiting to be consumed. The cloud virtual consumer subscribes to the message from the cloud public queue and delivers the first message to be consumed to the cloud private queue for waiting to be consumed. The edge consumption proxy service subscribes to the message from the cloud private queue to obtain the first message to be consumed. The edge consumption proxy service simulates the cloud producer and delivers the first message to be consumed to the edge public queue for waiting to be consumed. The edge consumer subscribes to the message from the edge public queue, obtains the first message to be consumed and processes the first message to be consumed. In this way, through the cloud virtual consumer in the cloud and the edge consumption proxy service in the edge, the channel for message intercommunication under cloud-edge collaboration can be effectively opened, and the technical problem of how messages are intercommunicated between the cloud and the edge under cloud-edge collaboration is solved. Description of the Drawings
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0017] Figure 1 It is a flowchart of the implementation of the first cloud-edge collaborative message intercommunication method of the Internet of Things provided by the embodiments of the present application;
[0018] Figure 2 It is a schematic diagram of the process of a message being sent from the cloud to the edge for consumption provided by the embodiments of the present application;
[0019] Figure 3 It is a flowchart of the implementation of the second cloud-edge collaborative message intercommunication method of the Internet of Things provided by the embodiments of the present application;
[0020] Figure 4 It is a flowchart of a method when the cloud virtual consumer delivers the first message to be consumed to the cloud private queue in the first cloud-edge collaborative message intercommunication method provided by the embodiments of the present application;
[0021] Figure 5Another implementation flowchart of the first method for cloud-edge collaborative message intercommunication in the Internet of Things provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of a process in which a message is sent from an edge to a cloud for consumption, provided in an embodiment of the present application;
[0023] Figure 7 A flowchart of a method for establishing a subscription link between an edge consumer proxy service and a cloud-side private queue in the second method for cloud-edge collaborative message intercommunication of the Internet of Things provided in an embodiment of the present application;
[0024] Figure 8 Another implementation flowchart of the second method for cloud-edge collaborative message intercommunication in the Internet of Things provided in an embodiment of the present application;
[0025] Figure 9 This is a basic structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0027] The present application provides a cloud-edge collaborative message intercommunication system for the Internet of Things, which includes a cloud and an edge. It is understood that the cloud refers to the cloud server and the edge refers to the edge server. The present application aims to open up a channel for message intercommunication under cloud-edge collaboration, and realize message intercommunication between the cloud and the edge under cloud-edge collaboration. Cloud-edge collaboration refers to the complementary collaboration between cloud computing and edge computing. Cloud computing can grasp the overall situation, process large amounts of data and conduct in-depth analysis, and plays an important role in non-real-time data processing scenarios, while edge computing focuses on the local area and can better play a role in small-scale, real-time intelligent analysis to meet the real-time needs of local data processing. The present application also provides a cloud-edge collaborative message intercommunication method for the Internet of Things applied to the above-mentioned system. Based on the cloud-edge collaborative message intercommunication method for the Internet of Things, the message intercommunication channel under cloud-edge collaboration can be realized without intrusion into the existing cloud-edge collaborative architecture, without adjusting the business code, and without perception of development. It can maintain the existing development methods and processes, and can achieve code consistency on both ends of the cloud and edge, avoiding the need to maintain different branch codes, thereby reducing the complexity of maintenance.
[0028] In some embodiments of this application, please refer to Figure 1 , Figure 1This is the implementation flowchart of the first cloud-edge collaborative message intercommunication method provided by the embodiments of this application. This cloud-edge collaborative message intercommunication method of the Internet of Things is applied to the cloud. Exemplarily, as Figure 1 shown, the above method may specifically include the following steps:
[0029] S11: The cloud producer obtains the first message to be consumed, and delivers the first message to be consumed to the cloud public queue for waiting to be consumed;
[0030] S12: The cloud virtual consumer subscribes to messages from the cloud public queue, obtains the first message to be consumed, and delivers the first message to be consumed to the cloud private queue for waiting to be consumed, where the cloud private queue accepts the subscription of the edge consumption proxy service.
[0031] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the process of sending a message from the cloud to the edge for consumption provided by the embodiments of this application. As Figure 2 shown, the cloud is configured with a cloud producer, a cloud public queue, a cloud virtual consumer, a cloud private queue, and a message interceptor.
[0032] During the process of the cloud creating a message and sending it to the edge for consumption, in the cloud, the cloud producer can obtain the first message to be consumed from the business system accessed by the cloud. After the cloud producer obtains the first message to be consumed, the obtained first message to be consumed can be delivered to the cloud public queue by the cloud producer for waiting to be consumed. In this embodiment, the cloud public queue can cache the first messages to be consumed from different business systems. It should be noted that the first message to be consumed is the data to be processed uploaded by the business system to the cloud, and the cloud can access one or more business systems.
[0033] The cloud virtual consumer is used to simulate an edge consumer to consume the first message to be consumed obtained by the cloud producer. In this embodiment, a subscription link can be established between the cloud virtual consumer and the cloud public queue, so that the cloud virtual consumer can subscribe to messages from the cloud public queue through the subscription link, thereby obtaining the first message to be consumed through the subscription message. After the cloud virtual consumer obtains the first message to be consumed, the cloud virtual consumer can deliver the obtained first message to be consumed to the cloud private queue for consumption. In the cloud, the cloud private queue can accept subscriptions from the edge consumption proxy service, thereby effectively opening up the channel for message exchange under cloud-edge collaboration and communicating messages between the cloud and the edge. In this embodiment, the cloud private queue can establish a mapping association with the business system, so that the cloud private queue corresponds to the business system one-to-one. It is understandable that multiple cloud private queues can be created in the cloud to connect to different business systems and provide them to the edge for use, so as to avoid mutual impact between cloud and edge businesses.
[0034] In some embodiments of this application, please refer to Figure 3 , Figure 3 The second embodiment of the present application provides a flowchart for implementing the cloud-edge collaborative message intercommunication method of the Internet of Things. The cloud-edge collaborative message intercommunication method of the Internet of Things is applied at the edge. For example, Figure 3 As shown, the above method may specifically include the following steps:
[0035] S31: The edge consumption proxy service subscribes to messages from the cloud private queue to obtain the first message to be consumed;
[0036] S32: The edge consumption proxy service simulates the cloud producer and delivers the first message to be consumed to the edge public queue for consumption;
[0037] S33: The edge consumer subscribes to messages from the edge public queue, obtains the first message to be consumed, and processes the first message to be consumed.
[0038] In this embodiment, Figure 2 As shown, the edge is configured with edge consumption proxy service, edge public queue and edge consumer.
[0039] Based on the fact that the cloud - side private queue can accept subscriptions from the edge - side consumption proxy service. At the edge - side, by establishing a subscription link between the edge - side consumption proxy service and the cloud - side private queue, the edge - side consumption proxy service can subscribe to messages from the cloud - side private queue, thereby realizing the transfer of the first message to be consumed from the cloud to the edge - side. After the edge - side consumption proxy service obtains the first message to be consumed, it can simulate the cloud - side producer through the edge - side consumption proxy service and deliver the first message to be consumed into the edge - side public queue for waiting to be consumed. In this embodiment, the edge - side public queue can also cache the first messages to be consumed from different business systems. Among them, at the edge - side, the first messages to be consumed of different business systems are delivered to the edge - side public queue through different edge - side consumption proxy services. At the edge - side, the edge - side public queue can accept subscriptions from edge - side consumers, that is, at the edge - side, by establishing a subscription link between the edge - side public queue and the edge - side consumers, the edge - side consumers can subscribe to messages from the edge - side public queue, thereby realizing that the edge - side consumers can obtain the first message to be consumed from the edge - side public queue, and then process the first message to be consumed through the edge - side consumers. In this way, the process of message inter - communication between the cloud and the edge - side under cloud - edge collaboration is realized.
[0040] As can be seen from the above, in the cloud - edge collaborative message inter - communication method of the Internet of Things provided by the embodiments of the present application, the first message to be consumed is obtained through the cloud - side producer and delivered to the cloud - side public queue for waiting to be consumed. The cloud - side virtual consumer subscribes to messages from the cloud - side public queue and delivers the first message to be consumed to the cloud - side private queue for waiting to be consumed. The edge - side consumption proxy service subscribes to messages from the cloud - side private queue and obtains the first message to be consumed. The edge - side consumption proxy service simulates the cloud - side producer and delivers the first message to be consumed to the edge - side public queue for waiting to be consumed. The edge - side consumer subscribes to messages from the edge - side public queue, obtains the first message to be consumed and processes the first message to be consumed. In this way, through the cloud - side virtual consumer in the cloud and the edge - side consumption proxy service in the edge - side, the channel for message inter - communication under cloud - edge collaboration can be effectively opened up, and the technical problem of how messages are inter - communicated between the cloud and the edge - side under cloud - edge collaboration is solved.
[0041] In some embodiments of the present application, please refer to Figure 4 , Figure 4 is a flowchart of a method when the cloud - side virtual consumer delivers the first message to be consumed to the cloud - side private queue in the first cloud - edge collaborative message inter - communication method provided by the embodiments of the present application. Exemplarily, as Figure 4 shown, the above - mentioned method may specifically include the following steps:
[0042] S41: Use a preset message interceptor to judge whether the first message to be consumed meets the preset interception condition;
[0043] S42: If not satisfied, deliver the first message to be consumed to the cloud private queue for waiting to be consumed.
[0044] In this embodiment, based on the one-to-one correspondence between the cloud private queue and the business system, a message interceptor can be configured between the cloud virtual consumer and the cloud private queue. The first message to be consumed written into the cloud private queue is determined through the message interceptor, so as to effectively ensure the security of the process of sending messages from the cloud to the edge for consumption. Specifically, an interception condition can be set in the message interceptor. Exemplarily, the interception condition can be set as the read / write permission of the private queue. For example, in the cloud, the interception condition of the cloud private queue A is the first message to be consumed generated by other business systems except the business system A'. That is, the message interceptor only delivers the first message to be consumed generated by the business system A' to the cloud private queue A. In this embodiment, when the cloud virtual consumer delivers the first message to be consumed to the cloud private queue, the cloud virtual consumer can transmit the first message to be consumed obtained by subscribing from the cloud public queue to the message interceptor for identification. The message interceptor determines whether the first message to be consumed meets the interception condition. If the interception condition is not met, it means that the cloud private queue has the write permission for the first message to be consumed. At this time, the first message to be consumed can be delivered to the cloud private queue for waiting to be consumed.
[0045] In some embodiments of the present application, please refer to Figure 5 , Figure 5 which is another implementation flowchart of the first cloud-edge collaborative message intercommunication method provided by the embodiments of the present application. This cloud-edge collaborative message intercommunication method is applied to the cloud. Exemplarily, as Figure 5 shown, the above method may specifically include the following steps:
[0046] S51: The cloud virtual producer receives the second message to be consumed reported by the edge consumption proxy service, and simulates the edge producer to deliver the second message to be consumed to the cloud public queue for waiting to be consumed;
[0047] S52: The cloud consumer subscribes to messages from the cloud public queue, obtains the second message to be consumed and processes the second message to be consumed.
[0048] Please also refer to Figure 6 , Figure 6 which is a schematic diagram of the process of sending messages from the edge to the cloud for consumption provided by the embodiments of the present application. As Figure 6 shown, a cloud consumer and a cloud virtual producer are also configured in the cloud.
[0049] During the process of the edge - end creation message sending the message to the cloud for consumption, in the cloud, a communication connection can be established between the cloud virtual producer and the edge - end consumption proxy service of the edge - end. The cloud virtual producer receives the second message to be consumed reported by the edge - end consumption proxy service. After the cloud virtual producer receives the second message to be consumed, in the cloud, the cloud virtual producer can simulate the edge - end producer to deliver the second message to be consumed into the cloud public queue for waiting to be consumed. And the cloud consumer in the cloud can obtain the second message to be consumed transmitted from the edge - end by subscribing to the message from the cloud public queue, so as to enable the cloud consumer to process the second message to be consumed transmitted from the edge - end. In some specific embodiments of the present application, the communication connection between the cloud virtual producer and the edge - end consumption proxy service of the edge - end can be established through the RPC remote call service. Among them, RPC (Remote Procedure Call Protocol) refers to the remote procedure call protocol, which is a protocol for requesting services from remote computer programs through the network without the need to understand the underlying network technology. In this embodiment, RPC uses the https protocol and uses the authentication mechanism of openapi (open interface) to ensure the security of communication.
[0050] In some embodiments of the present application, please refer to Figure 7 , Figure 7 which is a flowchart of a method for the edge - end consumption proxy service to establish a subscription link with the cloud private queue in the second cloud - edge collaborative message intercommunication method provided by the embodiment of the present application. Exemplarily, as Figure 7 shown, the above - mentioned method may specifically include the following steps:
[0051] S71: Identify whether the edge - end consumption proxy service has read permission in the cloud private queue;
[0052] S72: If it has, establish a subscription link between the edge - end consumption proxy service and the cloud private queue, where the subscription link is used to transfer the first message to be consumed from the cloud private queue to the edge - end consumption proxy service.
[0053] In this embodiment, at the edge side, before establishing a subscription link between the edge-side consumption proxy service and the cloud private queue, the security of the connection between the edge-side consumption proxy service and the cloud private queue can be ensured by identifying whether the edge-side consumption proxy service has read permission in the cloud private queue. Specifically, the edge-side read permission can be set in the cloud private queue. For example, the identity identifier of the edge-side consumption proxy service that can be connected to the cloud private queue is stored in the cloud private queue. Before establishing a subscription link between the edge-side consumption proxy service and the cloud private queue, the identity identifier of the edge-side consumption proxy service is compared with the identity identifier stored in the cloud private queue to determine whether the two identity identifiers are the same. If they are the same, it is recognized that the edge-side consumption proxy service has read permission in the cloud private queue; otherwise, it does not have read permission. When the edge-side consumption proxy service has read permission in the cloud private queue, the edge-side consumption proxy service is triggered to connect to the cloud private queue to establish a subscription link between the edge-side consumption proxy service and the cloud private queue. In this embodiment, this subscription link is used to transfer the first message to be consumed from the cloud private queue to the edge-side consumption proxy service, thereby effectively opening up the message intercommunication channel under cloud-edge collaboration and realizing message intercommunication between the cloud and the edge side.
[0054] In some embodiments of the present application, please refer to Figure 8 , Figure 8 which is another implementation flowchart of the second cloud-edge collaboration message intercommunication method for the Internet of Things provided by the embodiments of the present application. This cloud-edge collaboration message intercommunication method for the Internet of Things is applied to the edge side. Exemplarily, as Figure 8 shown, the above method may specifically include the following steps:
[0055] S81: The edge-side producer obtains the second message to be consumed and delivers the second message to be consumed to the edge-side public queue for waiting to be consumed;
[0056] S82: The edge-side consumption proxy service subscribes to messages from the edge-side public queue, obtains the second message to be consumed, and reports the second message to be consumed to the cloud virtual producer, where the cloud virtual producer is used to simulate the edge-side producer to deliver the second message to be consumed to the cloud public queue for waiting to be consumed.
[0057] In this embodiment, please refer to Figure 6, an edge producer is also configured at the edge side. In this embodiment, at the edge side, the edge producer can obtain the second message to be consumed from the service system accessed at the edge side. After the edge producer obtains the second message to be consumed, the obtained second message to be consumed can be delivered to the edge public queue by the edge producer for waiting to be consumed. It should be noted that the second message to be consumed is the data to be processed uploaded by the service system to the edge side, and one or more service systems can be accessed at the edge side. After the edge producer delivers the second message to be consumed to the edge public queue, the edge consumption proxy service can subscribe to messages from the edge public queue to obtain the second message to be consumed. Furthermore, based on the communication connection between the edge consumption proxy service and the cloud virtual producer, the edge consumption proxy service reports the second message to be consumed to the cloud virtual producer, so as to effectively open up the message intercommunication channel under cloud-edge collaboration and perform message intercommunication between the cloud and the edge side. In this embodiment, the cloud virtual producer is used to simulate the edge producer delivering the second message to be consumed to the cloud public queue for waiting to be consumed. In some specific implementation manners of the present application, the cloud virtual producer and the edge consumption proxy service at the edge side can be communicatively connected through an RPC remote call service, so that the edge consumption proxy service can use the RPC remote call service to report the second message to be consumed to the cloud virtual producer.
[0058] It can be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution is prior or posterior, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0059] In some embodiments of the present application, please refer to Figure 9 , Figure 9 is a basic structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device 9 can be a cloud or an edge side, such as Figure 9 shown, the electronic device 9 in this embodiment includes: a processor 91, a memory 92, and a computer program 93 stored in the memory 92 and executable on the processor 91, such as a program for the cloud-edge collaboration message intercommunication method of the Internet of Things. When the processor 91 executes the computer program 93, the steps in each of the above embodiments of the cloud-edge collaboration message intercommunication method of the Internet of Things are implemented. For specific reference, please refer to the relevant descriptions in the embodiments, which will not be elaborated here.
[0060] Exemplarily, the computer program 93 can be divided into one or more modules (units), and the one or more modules are stored in the memory 92 and executed by the processor 91 to complete the present application. The one or more modules can be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 93 in the electronic device 9.
[0061] The electronic device may include, but is not limited to, a processor 91 and a memory 92. Those skilled in the art can understand that Figure 9 This is merely an example of the electronic device 9 and does not constitute a limitation on the electronic device 9. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the electronic device may further include an input / output device, a network access device, a bus, etc.
[0062] The processor 91 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0063] The memory 92 may be an internal storage unit of the electronic device 9, such as a hard disk or memory of the electronic device 9. The memory 92 may also be an external storage device of the electronic device 9, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 9. Further, the memory 92 may also include both the internal storage unit and the external storage device of the electronic device 9. The memory 92 is used to store the computer program and other programs and data required by the electronic device. The memory 92 may also be used to temporarily store data that has been output or is to be output.
[0064] It should be noted that for the content such as information interaction and execution process between the above units, since it is based on the same concept as the method embodiment of the present application, for its specific functions and the technical effects brought, reference may be specifically made to the method embodiment part, and details are not described herein again.
[0065] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above various method embodiments can be implemented. In this embodiment, the computer-readable storage medium may be non-volatile or volatile.
[0066] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, it enables the mobile terminal to execute the steps in the above-mentioned method embodiments when executed.
[0067] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the electronic device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiments and will not be elaborated here.
[0068] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned method embodiments of the present application, it can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps in the above-mentioned method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any physical or virtual device, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0069] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0070] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A cloud-edge collaborative message intercommunication method for the Internet of Things, characterized in that, The method is applied to the cloud and includes: The cloud producer obtains the first message to be consumed and delivers the first message to be consumed to the cloud public queue for waiting to be consumed. The cloud virtual consumer simulates the edge consumer to subscribe to messages from the cloud public queue, obtains the first message to be consumed, and delivers the first message to be consumed to the cloud private queue for waiting to be consumed, where the cloud private queue accepts subscriptions from the edge consumption proxy service. The method further includes: The cloud virtual producer receives the second message to be consumed reported by the edge consumption proxy service and simulates the edge producer to deliver the second message to be consumed to the cloud public queue for waiting to be consumed. The cloud consumer subscribes to messages from the cloud public queue, obtains the second message to be consumed, and processes the second message to be consumed.
2. The cloud-edge collaborative message intercommunication method of the Internet of Things according to claim 1, characterized in that, The step in which the cloud virtual consumer delivers the first message to be consumed to the cloud private queue for waiting to be consumed includes: Using a preset message interceptor to determine whether the first message to be consumed meets the preset interception condition. If it does not meet the condition, deliver the first message to be consumed to the cloud private queue for waiting to be consumed.
3. A cloud-edge collaborative message intercommunication method for the Internet of Things, characterized in that, The method is applied to the edge and includes: The edge consumption proxy service subscribes to messages from the cloud private queue and obtains the first message to be consumed; where the cloud virtual consumer simulates the edge consumer to subscribe to messages from the cloud public queue, obtains the first message to be consumed, and delivers the first message to be consumed to the cloud private queue. The edge consumption proxy service simulates the cloud producer and delivers the first message to be consumed to the edge public queue for waiting to be consumed. The edge consumer subscribes to messages from the edge public queue, obtains the first message to be consumed, and processes the first message to be consumed. The method further includes: The edge producer obtains the second message to be consumed and delivers the second message to be consumed to the edge public queue for waiting to be consumed; The edge consumption proxy service subscribes to messages from the edge public queue, obtains the second message to be consumed, and reports the second message to be consumed to the cloud virtual producer, where the cloud virtual producer is used to simulate the edge producer to deliver the second message to be consumed to the cloud public queue for waiting to be consumed.
4. The cloud-edge collaborative message intercommunication method of the Internet of Things according to claim 3, characterized in that, Before the step in which the edge consumption proxy service subscribes to messages from the cloud private queue and obtains the first message to be consumed, it further includes: Identifying whether the edge consumption proxy service has read permission in the cloud private queue. If it has the permission, establish a subscription link between the edge consumption proxy service and the cloud private queue, where the subscription link is used to transfer the first message to be consumed from the cloud private queue to the edge consumption proxy service.
5. The cloud-edge collaborative message intercommunication method of the Internet of Things according to claim 3, characterized in that, The step in which the edge consumption proxy service reports the second message to be consumed to the cloud virtual producer includes: The edge consumption proxy service uses the RPC remote call service to report the second message to be consumed to the cloud virtual producer.
6. A cloud, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to claim 1 or 2.
7. An edge device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 3 to 5 are implemented.
8. A cloud-edge collaborative message intercommunication system for the Internet of Things, characterized in that, The system includes a cloud side and an edge side, wherein: The cloud side is used to execute the cloud-edge collaborative message intercommunication method of the Internet of Things according to claim 1 or 2; The edge side is used to execute the cloud-edge collaborative message intercommunication method of the Internet of Things according to any one of claims 3 to 5.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2, or 3 to 5 are implemented.
Citation Information
Patent Citations
Message queue cluster migration method and device
CN114064328A
Cloud-edge collaborative large screen visualization method and system
CN115296889A