A cloud-edge fusion method and device, electronic equipment and medium
By introducing cloud-native technologies, microservices, and object storage services into the cloud-edge collaboration solution, and combining AMQP and MQTT protocols, the complexity of configuration and service robustness of the cloud-edge collaboration solution are solved, achieving efficient and reliable data processing and management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LINEWELL SOFTWARE
- Filing Date
- 2024-04-28
- Publication Date
- 2026-07-03
AI Technical Summary
Existing cloud-edge collaboration solutions suffer from complex configurations and an inability to guarantee service robustness.
By introducing cloud-native technologies, microservices, and object storage services, and using AMQP and MQTT protocols for message transmission, communication is established between the edge cloud service center and the edge boxes to achieve application resource management and task execution. Sentinel service and fallback mechanism are used to ensure service availability.
It reduces the coupling of service modules, optimizes IoT device registration and network topology configuration, ensures the reliability of interactions between the cloud and the edge and between the edges, and provides more accurate and efficient data processing services.
Smart Images

Figure CN118612216B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a cloud-edge fusion method, apparatus, electronic device, and medium. Background Technology
[0002] Currently, deploying IoT applications to the cloud or edge has become a trend. With the continuous development of technology, IoT solutions based solely on the cloud or solely on the edge are gradually failing to meet the growing demand. Therefore, more and more enterprises are turning their attention to a combination of the two, namely cloud-edge collaborative solutions, to accelerate data analysis and enable enterprises to make faster and better decisions.
[0003] However, in the practical application of cloud-edge collaboration, on the one hand, there are complex configuration issues in IoT device registration and discovery, IP address allocation and management, network topology optimization, and routing; on the other hand, single-node, highly cohesive deployment schemes cannot guarantee service robustness. In view of the aforementioned problems, the inventors of this case conducted in-depth research on these issues, resulting in this case. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a cloud-edge fusion method, device, electronic device and medium to solve the problems of complex configuration and inability to guarantee service robustness in existing cloud-edge collaboration solutions.
[0005] In a first aspect, the present invention provides a cloud-edge fusion method, the method comprising the following steps:
[0006] Establish message communication between the edge cloud service center and the edge box based on the AMQP protocol;
[0007] The edge cloud service center receives uploaded application resources, manages the application resources, and sends the resource information to the edge boxes;
[0008] The edge cloud service center receives resource download requests from edge boxes and distributes the corresponding application resources to the edge boxes for installation based on the resource download requests;
[0009] The edge cloud service center distributes the generated tasks to the edge boxes for execution, receives the task execution results returned by the edge boxes after they have completed the tasks, and performs data storage, external interaction, and edge box management operations based on the task execution results.
[0010] Furthermore, the application resources include a plugin package, an algorithm package, and an application package. The plugin package provides a smart box operation interface service after installation, the algorithm package provides an algorithm service after installation, and the application package provides a background application service after installation. The smart box operation interface service, the algorithm service, and the background application service interact with each other via the MQTT protocol.
[0011] Furthermore, the edge cloud service center receives uploaded application resources, manages these resources, and sends resource information to the edge boxes, specifically including:
[0012] The edge cloud service center receives uploaded application resources and stores them in a file system service built with minio. It manages the application resources stored in the file system service, generates resource information for the application resources and provides the download address for minio, and sends the resource information and download address to the edge box so that the edge box can download and install the required application resources.
[0013] Furthermore, the edge cloud service center distributes the generated tasks to be executed to the edge boxes for execution, and receives the task execution results returned by the edge boxes after they have completed the tasks. Specifically, this includes:
[0014] Users edit the required task content through the edge cloud platform, and the edge cloud service center pushes the required task content to the edge box through the message service center; the edge box uses the installed application resources to interact with the connected IoT devices according to the required task content, and generates the corresponding task execution result based on the interaction result, and returns the task execution result to the edge cloud service center through the message service center.
[0015] Alternatively, several customized tasks can be generated using the cloud management service cluster. These customized tasks include task execution cycles, execution algorithms, or generation strategies. Each customized task is then distributed to a customized edge box via the message service center. The edge box utilizes the installed application resources to interact with the connected IoT devices based on the customized tasks, and generates corresponding task execution results based on the interaction results. These task execution results are then distributed to the cloud management service cluster via the message service center.
[0016] Furthermore, the cloud management service cluster employs sentinel service and a fallback mechanism to ensure service availability.
[0017] Furthermore, the data storage, external interaction, and edge box management operations based on the task execution results specifically include:
[0018] Based on the task execution results, the relevant data is stored in the database;
[0019] Based on the task execution results, relevant analysis reports are generated, and interaction with users is achieved through the external gateway;
[0020] Based on the task execution results, edge box management, IoT device management, partition management, or video stream query functions are provided. Edge box management includes deleting, adding, and managing information of edge boxes; IoT device management includes deleting, adding, and managing information of IoT devices connected to edge boxes; partition management includes assigning different types of edge boxes to different partitions; and video stream query refers to accessing the RTSP address of the IPC device provided by the edge box through the external gateway of the edge cloud platform.
[0021] Furthermore, storing relevant data in the database specifically includes: persistently storing business data in a MySQL database and caching frequently used data in a Redis cache.
[0022] Secondly, the present invention provides a cloud-edge fusion device, the device comprising a communication establishment module, a resource management module, a resource distribution module, and a task execution module;
[0023] The communication establishment module is used to establish message communication between the edge cloud service center and the edge box based on the AMQP protocol.
[0024] The resource management module is used by the edge cloud service center to receive uploaded application resources, manage the application resources, and send resource information to the edge box.
[0025] The resource distribution module is used by the edge cloud service center to receive resource download requests from edge boxes and distribute the corresponding application resources to the edge boxes for installation based on the resource download requests.
[0026] The task execution module is used by the edge cloud service center to send the generated tasks to the edge boxes for execution, receive the task execution results returned by the edge boxes after the tasks are completed, and perform data storage, external interaction, or edge box management operations based on the task execution results.
[0027] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.
[0028] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0029] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
[0030] 1. By introducing cloud-native, microservice, and object storage services into the cloud-edge collaboration solution, and using them for real-time analysis and processing of uplink and downlink data between the edge cloud service center and the edge box, various application resources are uploaded to the edge cloud service center for storage and management. The edge box can download and install the required application resources as needed, thereby reducing the coupling between service modules. Therefore, it can ensure the robustness of the service and provide more accurate and efficient data processing services.
[0031] 2. By introducing a message transmission protocol into the private domain network, the cloud-edge deployment scheme based on AMQP and using the highly available Rabbit deployment scheme as the interaction queue, and the edge devices based on MQTT and using Mosquitto as the reliable interaction queue, can not only effectively optimize the complex configuration problems in the traditional IoT device registration and discovery, IP address allocation and management, network topology optimization and routing, but also ensure the reliability of the interaction between the cloud and the edge, and between the edge devices. At the same time, IoT devices only need to access the cloud via MQTT to complete cloud management, making the process simple and convenient.
[0032] 3. By storing various application resources (including plugin packages, algorithm packages, and application packages) in a file system service built with minio, it is possible to facilitate unified management of various application resources and provide highly available file upload and download services.
[0033] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0034] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0035] Figure 1 This is an execution flowchart of a cloud-edge fusion method according to Embodiment 1 of the present invention;
[0036] Figure 2 This is a block diagram illustrating the interaction principle between the edge cloud service center and the edge box in this invention.
[0037] Figure 3 This is a schematic diagram of the structure of a cloud-edge fusion device according to Embodiment 2 of the present invention;
[0038] Figure 4 This is a schematic diagram of the electronic device in Embodiment 3 of the present invention;
[0039] Figure 5This is a schematic diagram of the structure of the medium in Embodiment 4 of the present invention. Detailed Implementation
[0040] To better understand the technical solution of the present invention, the technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0041] Before proceeding, some existing technologies involved in this invention will be explained:
[0042] AMQP Protocol: An application-layer standard advanced message queue protocol that provides unified messaging services. It is an open standard for application-layer protocols designed for message-oriented middleware. Clients and message middleware based on this protocol can exchange messages without being restricted by different client / middleware products or different development languages.
[0043] Edge computing refers to an open platform that integrates network, computing, storage, and application capabilities on the side closest to the source of objects or data, providing services at the nearest edge. Its applications are initiated on the edge, resulting in faster network service responses and meeting the industry's basic needs in real-time business, application intelligence, security, and privacy protection.
[0044] Minio is an open-source object storage service based on the Apache License v2.0. It is compatible with the Amazon S3 cloud storage service interface and is well-suited for storing large amounts of unstructured data, such as images, videos, log files, backup data, and container / virtual machine images. An object file can be of any size, ranging from a few kilobytes to a maximum of 5 terabytes.
[0045] Cloud-native: A distributed cloud based on distributed deployment and unified operation and management, built upon technologies such as containers, microservices, and DevOps. Cloud-native applications are applications designed for the cloud. By using cloud-native technologies, developers do not need to consider the underlying technical implementation, and can fully leverage the elasticity and distributed advantages of the cloud platform to achieve rapid deployment, on-demand scaling, and uninterrupted delivery. Cloud-native technologies can solve problems such as different release environments and the inability to quickly deploy in traditional scenarios.
[0046] Microservices: Microservices are an architecture that breaks down a single monolithic application into smaller, interconnected, independent services. Each service typically implements a set of independent features or functionalities, containing its own business logic and adapters. Interconnectivity between microservices is achieved through exposed APIs. These independent microservices do not need to be deployed on the same virtual machine, the same system, or the same application server. Microservices can solve concurrency issues and address service partitioning and fault tolerance problems.
[0047] Example 1
[0048] This embodiment provides a cloud-edge fusion method, such as... Figure 1 and Figure 2 As shown, the method includes the following steps:
[0049] Step S1: Establish message communication between the edge cloud service center and the edge box based on the AMQP protocol, that is, the edge cloud service center and the edge box communicate with each other via the AMQP protocol;
[0050] Step S2: The edge cloud service center receives the uploaded application resources, manages the application resources, and sends the resource information to the edge box so that the edge box can download the required application resources and install and use them according to the resource information.
[0051] Step S3: The edge cloud service center receives the resource download request from the edge box and distributes the corresponding application resources to the edge box for installation based on the resource download request;
[0052] Step S4: The edge cloud service center distributes the generated tasks to be executed to the edge boxes for execution, receives the task execution results returned by the edge boxes after they have completed the tasks, and performs data storage, external interaction, and edge box management operations based on the task execution results.
[0053] In an embodiment of the present invention, step S1 specifically involves: connecting the edge cloud service center to the message service center (AMQP) and simultaneously connecting the edge box to the message service center (AMQP), so that the edge cloud service center and the edge box can communicate via the AMQP protocol, i.e., the cloud and edge use a highly available Rabbit deployment scheme based on AMQP as the interaction queue.
[0054] In an embodiment of the present invention, in step S2, the application resources include a plugin package, an algorithm package, and an application package. The plugin package provides a smart box operation interface service after installation (equivalent to deploying a smart box operation interface module on the edge box). The algorithm package provides an algorithm service after installation (equivalent to deploying an algorithm service module on the edge box). The application package provides a background application service after installation (equivalent to deploying a background application module on the edge box). The smart box operation interface service, algorithm service, and background application service interact with each other via the MQTT protocol, i.e., the edge device uses Mosquitto as a reliable interaction queue based on MQTT. In specific use, the smart box operation interface service is responsible for data acquisition, control, and device node management of IoT devices. The algorithm service uses video stream services as input data for target detection, identification, and tracking. The background application service is used for data analysis and alarm generation. By uploading various application resources to the edge cloud service center for storage and management, the edge box can download and install the required application resources (i.e., service modules) according to actual needs, thereby reducing the coupling between service modules.
[0055] This invention introduces a message transmission protocol into a private domain network, using a highly available Rabbit deployment scheme based on AMQP for cloud-edge interaction, and Mosquitto based on MQTT for edge devices as a reliable interaction queue. This not only effectively optimizes the complex configuration issues in traditional IoT device registration and discovery, IP address allocation and management, network topology optimization and routing, but also ensures the reliability of interactions between cloud and edge, and between edge devices. At the same time, IoT devices only need to access the cloud via MQTT to complete cloud management, making the process simple and convenient.
[0056] In an embodiment of the present invention, the edge cloud service center receiving uploaded application resources, managing the application resources, and sending resource information to the edge box specifically includes:
[0057] The edge cloud service center receives uploaded application resources (including plugin packages, algorithm packages, and application packages), stores these resources in a file system service built with miniio, manages the application resources stored in the file system service, generates resource information for the application resources and provides the miniio download address, and sends the resource information and download address to the edge box for the edge box to download and install the required application resources. In a specific implementation of this invention, application resources can be uploaded and stored in the file system service via an external gateway; in step S3, the edge box can download the required application resources from the file system service of the edge cloud service center through the miniio download address.
[0058] This invention stores various application resources (including plugin packages, algorithm packages, and application packages) in a file system service built with minio. On the one hand, it facilitates unified management of various application resources, and on the other hand, it provides highly available file upload and download services.
[0059] In an embodiment of the present invention, in step S4, the edge cloud service center distributes the generated task to be executed to the edge box for execution, and receiving the task execution result returned by the edge box after executing the task specifically includes:
[0060] Users edit the required task content through the edge cloud platform. The edge cloud service center pushes the required task content to the edge box through the message service center. Specifically, the required task content is pushed to the edge box in the form of a JSON message. The edge box uses the installed application resources to interact with the connected IoT devices according to the required task content. IoT devices can include IPC devices, various sensors, audio devices, etc., and generate corresponding task execution results (such as generating corresponding algorithm results, data analysis results, etc.) based on the interaction results. The task execution results are returned to the edge cloud service center through the message service center, thereby realizing functions such as data collection, data feedback, video streaming services, and data processing.
[0061] Alternatively, several customized tasks can be generated using a cloud management service cluster. These customized tasks include task execution cycles, execution algorithms, or generation strategies. Each customized task is then distributed to a customized edge box via a message service center. Here, the cloud management service cluster refers to extending the edge cloud service center into a cluster. In specific implementations of this invention, a cloud management service center can be set up as the management entity to manage the cloud management service cluster and distribute customized tasks to customized edge boxes via the message service center. This allows different edge boxes to execute different customized tasks. The customized tasks are also distributed and pushed in the form of JSON messages. The edge box uses installed application resources to interact with the connected IoT devices based on the customized tasks and generates corresponding task execution results based on the interaction results. These task execution results are then distributed to the cloud management service cluster via the message service center.
[0062] Of course, in specific implementations of this invention, the edge cloud service center and the edge box can not only perform tasks such as data collection and algorithms, but also perform functions such as heartbeat sensing, device and node management.
[0063] More specifically, the cloud management service cluster uses Sentinel service and fallback mechanism to ensure service availability; among them, Sentinel service is a high-availability traffic protection component for distributed service architecture, which mainly focuses on traffic and helps developers ensure the stability of microservices from multiple dimensions such as rate limiting, traffic shaping, circuit breaking and degradation, system load protection, and hotspot protection; the fallback mechanism is a commonly used fault tolerance mechanism.
[0064] In an embodiment of the present invention, step S4, specifically includes the following operations: data storage, external interaction, and edge box management based on the task execution results:
[0065] Based on the task execution results, the relevant data is stored in the database so that it can be queried and used when needed;
[0066] Based on the task execution results, relevant analysis reports are generated and interacted with users through the external gateway so that users can view the relevant analysis reports to help them make better decisions.
[0067] Based on the task execution results, edge box management, IoT device management, partition management, or video stream query functions are provided. Of course, this invention is not limited to these; other required functions can be added according to actual needs during specific implementation. Among them, edge box management includes deleting, adding, and managing information (i.e., managing relevant information of edge boxes) of edge boxes (i.e., AI computing boxes); IoT device management includes deleting, adding, and managing information (i.e., managing relevant information of IoT devices) of IoT devices connected to edge boxes; partition management includes assigning different types of edge boxes to different partitions. Of course, this invention is not limited to these; partition management can also be performed using different partitioning methods during specific implementation; video stream query refers to accessing the RTSP address of the IPC device provided by the edge box through the external gateway of the edge cloud platform. Since edge boxes usually connect to multiple IPC devices in specific implementations, the RTSP address of the IPC device can be uploaded to the edge cloud platform through the edge box, so that the edge cloud platform can use the RTSP address of the IPC device to watch the video in real time.
[0068] More specifically, storing relevant data in the database includes: persistently storing business data in a MySQL database and caching frequently used data in a Redis cache. By using a MySQL database for persistent storage of business data, it is easy to cluster and expand the database as the volume of business data increases. Seata can be used for distributed transaction management, and ES+DB can be used for data query optimization. Caching frequently used data in Redis improves the efficiency of querying frequently used data.
[0069] In summary, this invention introduces cloud-native, microservice, and object storage services into a cloud-edge collaborative solution, which are used for real-time analysis and processing of uplink and downlink data between the edge cloud service center and the edge box. At the same time, various application resources are uploaded to the edge cloud service center for storage and management. The edge box can download and install the required application resources as needed, thereby reducing the coupling between service modules. Therefore, it can ensure the robustness of the service and provide more accurate and efficient data processing services.
[0070] Based on the same inventive concept, this application also provides an apparatus corresponding to the method in Embodiment 1, as detailed in Embodiment 2.
[0071] Example 2
[0072] This embodiment provides a cloud-edge fusion device, such as Figure 2 and Figure 3 As shown, the device includes a communication establishment module, a resource management module, a resource distribution module, and a task execution module;
[0073] The communication establishment module is used to establish message communication between the edge cloud service center and the edge box based on the AMQP protocol, so that the edge cloud service center and the edge box can communicate with each other via the AMQP protocol.
[0074] The resource management module is used by the edge cloud service center to receive uploaded application resources, manage the application resources, and send the resource information to the edge box so that the edge box can download the required application resources and install and use them according to the resource information.
[0075] The resource distribution module is used by the edge cloud service center to receive resource download requests from edge boxes and distribute the corresponding application resources to the edge boxes for installation based on the resource download requests.
[0076] The task execution module is used by the edge cloud service center to send the generated tasks to the edge boxes for execution, receive the task execution results returned by the edge boxes after the tasks are completed, and perform data storage, external interaction and edge box management operations based on the task execution results.
[0077] In an embodiment of the present invention, the communication establishment module specifically involves connecting the edge cloud service center to the message service center (AMQP) and simultaneously connecting the edge box to the message service center (AMQP), enabling message communication between the edge cloud service center and the edge box via the AMQP protocol. In other words, the cloud and edge use a highly available Rabbit deployment scheme based on AMQP as the interaction queue.
[0078] In embodiments of the present invention, the application resources in the resource management module include a plugin package, an algorithm package, and an application package. The plugin package provides a smart box operation interface service after installation (equivalent to deploying a smart box operation interface module on the edge box). The algorithm package provides an algorithm service after installation (equivalent to deploying an algorithm service module on the edge box). The application package provides a background application service after installation (equivalent to deploying a background application module on the edge box). The smart box operation interface service, algorithm service, and background application service interact via the MQTT protocol; that is, the edge device uses Mosquitto as a reliable interaction queue based on MQTT. In practical use, the smart box operation interface service is responsible for data acquisition, control, and device node management of IoT devices. The algorithm service uses video stream services as input data for target detection, identification, and tracking. The background application service performs data analysis and alarm generation. By uploading various application resources to the edge cloud service center for storage and management, the edge box can download and install the required application resources (i.e., service modules) according to actual needs, reducing the coupling between service modules.
[0079] This invention introduces a message transmission protocol into a private domain network, using a highly available Rabbit deployment scheme based on AMQP for cloud-edge interaction, and Mosquitto based on MQTT for edge devices as a reliable interaction queue. This not only effectively optimizes the complex configuration issues in traditional IoT device registration and discovery, IP address allocation and management, network topology optimization and routing, but also ensures the reliability of interactions between cloud and edge, and between edge devices. At the same time, IoT devices only need to access the cloud via MQTT to complete cloud management, making the process simple and convenient.
[0080] In an embodiment of the present invention, the edge cloud service center receiving uploaded application resources, managing the application resources, and sending resource information to the edge box specifically includes:
[0081] The edge cloud service center receives uploaded application resources (including plugin packages, algorithm packages, and application packages), stores these resources in a file system service built with minio. It manages the application resources stored in the file system service, generates resource information for the application resources, and provides a download address for minio. This resource information and download address are then distributed to the edge boxes for downloading and installing the required application resources. In a specific implementation, application resources can be uploaded and stored in the file system service via an external gateway. In the resource distribution module, the edge boxes can download the required application resources from the edge cloud service center's file system service using the minio download address.
[0082] This invention stores various application resources (including plugin packages, algorithm packages, and application packages) in a file system service built with minio. On the one hand, it facilitates unified management of various application resources, and on the other hand, it provides highly available file upload and download services.
[0083] In an embodiment of the present invention, in the task execution module, the edge cloud service center distributes the generated task to be executed to the edge box for execution, and receiving the task execution result returned by the edge box after executing the task specifically includes:
[0084] Users edit the required task content through the edge cloud platform. The edge cloud service center pushes the required task content to the edge box through the message service center. Specifically, the required task content is pushed to the edge box in the form of a JSON message. The edge box uses the installed application resources to interact with the connected IoT devices according to the required task content. IoT devices can include IPC devices, various sensors, audio devices, etc., and generate corresponding task execution results (such as generating corresponding algorithm results, data analysis results, etc.) based on the interaction results. The task execution results are returned to the edge cloud service center through the message service center, thereby realizing functions such as data collection, data feedback, video streaming services, and data processing.
[0085] Alternatively, several customized tasks can be generated using a cloud management service cluster. These customized tasks include task execution cycles, execution algorithms, or generation strategies. Each customized task is then distributed to a customized edge box via a message service center. Here, the cloud management service cluster refers to extending the edge cloud service center into a cluster. In specific implementations of this invention, a cloud management service center can be set up as the management entity to manage the cloud management service cluster and distribute customized tasks to customized edge boxes via the message service center. This allows different edge boxes to execute different customized tasks. The customized tasks are also distributed and pushed in the form of JSON messages. The edge box uses installed application resources to interact with the connected IoT devices based on the customized tasks and generates corresponding task execution results based on the interaction results. These task execution results are then distributed to the cloud management service cluster via the message service center.
[0086] Of course, in specific implementations of this invention, the edge cloud service center and the edge box can not only perform tasks such as data collection and algorithms, but also perform functions such as heartbeat sensing, device and node management.
[0087] More specifically, the cloud management service cluster uses Sentinel service and fallback mechanism to ensure service availability; among them, Sentinel service is a high-availability traffic protection component for distributed service architecture, which mainly focuses on traffic and helps developers ensure the stability of microservices from multiple dimensions such as rate limiting, traffic shaping, circuit breaking and degradation, system load protection, and hotspot protection; the fallback mechanism is a commonly used fault tolerance mechanism.
[0088] In an embodiment of the present invention, the data storage, external interaction, and edge box management operations based on the task execution results in the task execution module specifically include:
[0089] Based on the task execution results, the relevant data is stored in the database so that it can be queried and used when needed;
[0090] Based on the task execution results, relevant analysis reports are generated and interacted with users through the external gateway so that users can view the relevant analysis reports to help them make better decisions.
[0091] Based on the task execution results, edge box management, IoT device management, partition management, or video stream query functions are provided. Of course, this invention is not limited to these; other required functions can be added according to actual needs during specific implementation. Among them, edge box management includes deleting, adding, and managing information (i.e., managing relevant information of edge boxes) of edge boxes (i.e., AI computing boxes); IoT device management includes deleting, adding, and managing information (i.e., managing relevant information of IoT devices) of IoT devices connected to edge boxes; partition management includes assigning different types of edge boxes to different partitions. Of course, this invention is not limited to these; partition management can also be performed using different partitioning methods during specific implementation; video stream query refers to accessing the RTSP address of the IPC device provided by the edge box through the external gateway of the edge cloud platform. Since edge boxes usually connect to multiple IPC devices in specific implementations, the RTSP address of the IPC device can be uploaded to the edge cloud platform through the edge box, so that the edge cloud platform can use the RTSP address of the IPC device to watch the video in real time.
[0092] More specifically, storing relevant data in the database includes: persistently storing business data in a MySQL database and caching frequently used data in a Redis cache. By using a MySQL database for persistent storage of business data, it is easy to cluster and expand the database as the volume of business data increases. Seata can be used for distributed transaction management, and ES+DB can be used for data query optimization. Caching frequently used data in Redis improves the efficiency of querying frequently used data.
[0093] In summary, this invention introduces cloud-native, microservice, and object storage services into a cloud-edge collaborative solution, which are used for real-time analysis and processing of uplink and downlink data between the edge cloud service center and the edge box. At the same time, various application resources are uploaded to the edge cloud service center for storage and management. The edge box can download and install the required application resources as needed, thereby reducing the coupling between service modules. Therefore, it can ensure the robustness of the service and provide more accurate and efficient data processing services.
[0094] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to Embodiment 1, as detailed in Embodiment 3.
[0095] Example 3
[0096] This embodiment provides an electronic device, such as... Figure 4 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can implement any of the embodiments in Example 1.
[0097] Since the electronic device described in this embodiment is the device used to implement the method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection of this application.
[0098] Based on the same inventive concept, this application provides a storage medium corresponding to Embodiment 1, as detailed in Embodiment 4.
[0099] Example 4
[0100] This embodiment provides a computer-readable storage medium, such as... Figure 5 As shown, a computer program is stored thereon, which, when executed by a processor, can implement any of the embodiments in Example 1.
[0101] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0103] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0104] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0105] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A cloud edge fusion method, characterized in that, The method includes the following steps: Establish message communication between the edge cloud service center and the edge box based on the AMQP protocol; The edge cloud service center receives uploaded application resources, manages these resources, and distributes the resource information to the edge boxes. Specifically, the edge cloud service center receives uploaded application resources and stores them in a file system service built with MinIO. It manages the application resources stored in the file system service, generates resource information for the application resources, and provides a download address for MinIO. This resource information and download address are then distributed to the edge boxes for download and installation. The application resources include plugin packages, algorithm packages, and application packages. Plugin packages provide smart box operation interface services after installation, algorithm packages provide algorithm services after installation, and application packages provide background application services after installation. The smart box operation interface service, algorithm service, and background application service interact via the MQTT protocol. The smart box operation interface service is responsible for data acquisition, control, and device node management of IoT devices. The algorithm service uses video stream services as input data for target detection, identification, and tracking. The background application service performs data analysis and alarm generation. The edge cloud service center receives resource download requests from edge boxes and distributes the corresponding application resources to the edge boxes for installation based on the resource download requests; The edge cloud service center distributes the generated tasks to the edge boxes for execution, and receives the task execution results returned by the edge boxes after they have completed the tasks. Specifically, this includes generating several customized tasks using the cloud management service cluster. These customized tasks include task execution cycles, execution algorithms, or generation strategies. Each customized task is then distributed to the customized edge boxes through the message service center. The edge boxes utilize the installed application resources to interact with the connected IoT devices based on the customized tasks, and generate corresponding task execution results based on the interaction results. These results are then distributed to the cloud management service cluster through the message service center. Finally, data storage, external interaction, and edge box management operations are performed based on the task execution results.
2. The cloud-edge fusion method of claim 1, wherein: The edge cloud service center distributes the generated tasks to the edge boxes for execution, and receiving the task execution results returned by the edge boxes after the tasks are completed includes: Users edit the required task content through the edge cloud platform, and the edge cloud service center pushes the required task content to the edge box through the message service center. The edge box uses the installed application resources to interact with the connected IoT devices according to the required task content, and generates the corresponding task execution result based on the interaction result, and returns the task execution result to the edge cloud service center through the message service center.
3. The cloud-edge fusion method of claim 2, wherein: The cloud management service cluster uses sentinel service and fallback mechanism to ensure service availability.
4. The cloud-edge fusion method of claim 1, wherein: The specific operations of data storage, external interaction, and edge box management based on task execution results include: Based on the task execution results, the relevant data is stored in the database; Based on the task execution results, relevant analysis reports are generated, and interaction with users is achieved through the external gateway; Based on the task execution results, edge box management, IoT device management, partition management, or video stream query functions are provided. Edge box management includes deleting, adding, and managing information of edge boxes; IoT device management includes deleting, adding, and managing information of IoT devices connected to edge boxes; partition management includes assigning different types of edge boxes to different partitions; and video stream query refers to accessing the RTSP address of the IPC device provided by the edge box through the external gateway of the edge cloud platform.
5. The cloud-edge fusion method of claim 4, wherein: The process of storing relevant data in the database specifically includes: persistently storing business data in a MySQL database and caching frequently used data in a Redis cache.
6. A cloud edge fusion device, comprising: The device includes a communication establishment module, a resource management module, a resource distribution module, and a task execution module; The communication establishment module is used to establish message communication between the edge cloud service center and the edge box based on the AMQP protocol. The resource management module is used by the edge cloud service center to receive uploaded application resources, manage these resources, and send resource information to the edge box. Specifically, the edge cloud service center receives uploaded application resources and stores them in a file system service built with MinIO. It manages the application resources stored in the file system service, generates resource information and provides a MinIO download address, and sends the resource information and download address to the edge box for downloading and installing the required application resources. The application resources include plugin packages, algorithm packages, and application packages. Plugin packages provide smart box operation interface services after installation, algorithm packages provide algorithm services after installation, and application packages provide background application services after installation. The smart box operation interface service, algorithm service, and background application service interact via the MQTT protocol. The smart box operation interface service is responsible for data acquisition, control, and device node management of IoT devices. The algorithm service uses video stream services as input data for target detection, identification, and tracking. The background application service performs data analysis and alarm generation. The resource distribution module is used by the edge cloud service center to receive resource download requests from edge boxes and distribute the corresponding application resources to the edge boxes for installation based on the resource download requests. The task execution module is used by the edge cloud service center to distribute generated tasks to edge boxes for execution, and to receive task execution results returned by the edge boxes after completing the tasks. Specifically, it includes generating several customized tasks using the cloud management service cluster. The customized tasks include task execution cycles, execution algorithms, or generation strategies. Each customized task is distributed to a customized edge box through the message service center. The edge box uses installed application resources to interact with the connected IoT devices according to the customized tasks, and generates corresponding task execution results based on the interaction results. The task execution results are then distributed to the cloud management service cluster through the message service center. Data storage, external interaction, or edge box management operations are performed based on the task execution results.
7. An electronic device 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 program, it implements the method as described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 5.