A cloud-edge collaboration method based on container technology edge computing

By adopting container technology and cloud-edge collaboration modules in the edge computing gateway, the collaborative management and control of edge gateways and cloud-end is achieved, which solves the shortcomings of existing edge computing gateways in resource utilization and computing power expansion, and realizes efficient data processing and fine equipment regulation.

CN119225911BActive Publication Date: 2025-05-16STATE GRID JIANGSU INTEGRATED ENERGY SERVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411745296.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-05-16
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

The existing edge computing gateways have shortcomings in resource utilization and computing power expansion, which cannot meet the needs of diversified application scenarios, and cannot coordinate the control with the cloud, and control strategies cannot be adjusted dynamically.

Method used

The edge computing cloud-edge collaboration method based on container technology is adopted. The cloud-edge collaboration module built into the edge gateway performs container life cycle management and mirror life cycle management, realizes communication between the edge gateway and the cloud mirror management platform, predicts and optimizes regulation strategies, and uses machine learning models to perform abnormal detection.

Benefits of technology

It improves data processing efficiency and system real-time response capabilities, reduces latency, supports large-scale deployment and flexible application deployment, and achieves more refined equipment regulation and early operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225911B_ABST
    Figure CN119225911B_ABST
Patent Text Reader

Abstract

The present invention discloses a cloud-edge collaboration method based on edge computing of container technology, which relates to the field of edge computing technology. The method includes: using a cloud-edge collaboration module built into an edge gateway to perform container lifecycle management on a software container, and using a cloud image management platform to perform image lifecycle management on a container image; using a cloud-edge collaboration module to complete the communication between the edge gateway and the cloud image management platform, predicting and optimizing the control strategy of the edge gateway in the cloud image management platform, deploying the predicted and optimized control strategy to the edge gateway and acting on related devices; using a pre-built machine learning model and pre-set abnormal rules to perform abnormal detection on the monitoring data of each software container collected in real time, identifying and feeding back abnormal results to the management party. The present invention has the advantages of improving data processing efficiency, reducing latency, easy expansion, flexible deployment, more refined control, and early operation and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of edge computing technology, and in particular to a cloud-edge collaboration method based on container technology edge computing. Background Art

[0002] With the popularity of Internet of Things (IoT) devices and the explosive growth of data volume, the traditional centralized cloud computing model can no longer meet the needs of low-latency and high-bandwidth applications. Edge computing, as a new computing model, reduces data transmission latency and bandwidth usage by performing computing and storage close to the data source. However, the existing edge computing gateway architecture has deficiencies in resource utilization and computing power expansion, and cannot meet the needs of diverse application scenarios. Cloud-edge collaboration is also an important trend in the field of edge computing technology. Today's distributed photovoltaic and energy storage equipment is becoming more and more dispersed, and the capacity of a single machine is small. The EMS (Element Management System) at the edge must be "small" and "light" enough, and the cost is very sensitive. Relatively complex functions and operations such as prediction, optimization, and scheduling must be placed in the cloud to balance the needs of computing power and cost. Edge computing and cloud computing each undertake different analysis and computing functions, and cloud-edge collaborate with each other.

[0003] At present, the implementation method of edge computing gateway is mainly through embedded single-board hardware and software such as MCU (Microcontroller Unit) and ARM (an architecture standard) system, which develops edge gateways based on specific functions of data collection, storage and interaction with the upper-level platform.

[0004] Although existing edge computing gateway devices can collect, store, and report edge device data, the software developed for a specific environment is not well adapted, flexible, or compatible. Each manufacturer's own edge computing gateway can only run specific programs in its own gateway. It is difficult to run programs from other manufacturers in the gateway, and the functions of the gateway itself cannot be reused.

[0005] At present, most edge computing gateways can only complete specific functions such as data collection, storage, and reporting, and cannot be coordinated with the cloud. The control strategy of the equipment and the parameters required for predictive control cannot be updated from the cloud, and the control strategy cannot be adjusted dynamically. It is urgent to solve the problems of poor adaptability, insufficient flexibility, weak compatibility, complex management, and inability to coordinate control with the cloud.

[0006] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0007] In response to the problems in the related technology, the present invention proposes a cloud-edge collaboration method based on edge computing of container technology to overcome the above-mentioned technical problems existing in the existing related technology.

[0008] To this end, the specific technical solution adopted by the present invention is as follows:

[0009] A cloud-edge collaboration method based on container technology edge computing, the cloud-edge collaboration method based on container technology edge computing comprising:

[0010] S1. Use the cloud-edge collaboration module built into the edge gateway to manage the software container’s container lifecycle, and use the cloud image management platform to manage the container image’s image lifecycle;

[0011] S2. Use the cloud-edge collaboration module to complete the communication between the edge gateway and the cloud image management platform, predict and optimize the control strategy of the edge gateway in the cloud image management platform, deploy the predicted and optimized control strategy to the edge gateway and act on related devices;

[0012] S3. Based on the cloud image management platform and the pre-built machine learning model, the normal resource usage pattern of each software container is subjected to anomaly detection and learning. The machine learning model and the pre-set anomaly rules are used to perform anomaly detection on the monitoring data of each software container collected in real time, and the anomaly results are identified and fed back to the management party.

[0013] Among them, when using the cloud-edge collaboration module built into the edge gateway to manage the container lifecycle of the software container, the interactive communication method between each software container and between the software container and the cloud-edge collaboration module is configured, and the collected data is pre-processed locally in the edge gateway.

[0014] Furthermore, the cloud-edge collaboration module built into the edge gateway is used to perform container lifecycle management on the software container, including container installation, container upgrade, container startup, container stop, container deletion, container configuration modification, container configuration query, container status query and container log recall.

[0015] Furthermore, using the cloud image management platform to manage the image lifecycle of container images includes:

[0016] Upload container images to the cloud image management platform, and review and upgrade container images;

[0017] Get the uploaded container images and corresponding versions, and manage the container images.

[0018] Furthermore, the edge gateway control strategy is predicted and optimized in the cloud image management platform, including:

[0019] Select a prediction model and use the historical data reported by the edge gateway to train and optimize the prediction model; the historical data includes user transformer gateway information data, photovoltaic inverter data, energy storage data, air conditioning and lighting data, and charging pile data; the data items include electrical parameters and equipment status;

[0020] Use the prediction model to predict the edge gateway control parameters in real time, and use the prediction results as the input of the optimization algorithm; the control parameters include the control parameters of distributed photovoltaic inverters, energy storage cabinets, air conditioners, lighting and charging piles;

[0021] Determine the optimization objectives and constraints, generate the initial solution of the optimization algorithm based on prior knowledge, and configure the parameters of the optimization algorithm, including population size, number of iterations, and step size;

[0022] The quality of each solution is evaluated based on the objective function, convergence conditions are set, and the best solution is selected from all solutions as the final optimization result.

[0023] Furthermore, the optimization objectives include economic optimization, minimizing energy consumption, and maximizing equipment utilization;

[0024] The constraints include the power balance constraint of the microgrid, the charging and discharging capacity constraint of the energy storage system, the photovoltaic power generation constraint, the power purchase and sales restriction constraint of the power grid, and the charging power constraint of the electric vehicle charging pile;

[0025] Among them, the objective function is to minimize the total operating cost of the microgrid, and the formula of the objective function of minimizing the total operating cost of the microgrid is:

[0026]

[0027] In the formula, represents minimizing the total cost of operating the microgrid;

[0028] Indicates the power purchased from the main grid;

[0029] represents the cost of purchasing electricity;

[0030] Indicates the power sold to the main grid;

[0031] Represents the revenue from electricity sales;

[0032] represents the energy storage cost;

[0033] represents the cost of charging an electric vehicle;

[0034] T Represents the total time of the scheduling cycle,t Represents a time variable.

[0035] Furthermore, the control strategy after prediction optimization is deployed to the edge gateway and acts on related devices including:

[0036] The predicted and optimized control strategy is encapsulated as a container image. The edge gateway obtains the latest control strategy through container image installation and update; the latest control strategy is applied to the edge device.

[0037] Furthermore, based on the cloud image management platform and the pre-built machine learning model, the normal resource usage pattern of each software container is subjected to anomaly detection learning, and the monitoring data of each software container collected in real time is subjected to anomaly detection using the machine learning model and the pre-set anomaly rules, and the anomaly results are identified and fed back to the management party, including:

[0038] Collect monitoring data of each software container through the edge gateway and pre-process the monitoring data;

[0039] Select a machine learning algorithm and train the machine learning model using historically collected monitoring data of each software container to learn normal and abnormal resource usage patterns; evaluate the generalization ability of the machine learning model using cross-validation techniques;

[0040] Set exception rules according to business needs, and identify abnormal patterns by combining the output results of the machine learning model on real-time monitoring data and the anomaly detection threshold; the exception rules include the anomaly score predicted by the machine learning model exceeding the preset anomaly detection threshold; the anomaly detection threshold includes the upper limit threshold of CPU usage, the upper limit threshold of memory usage, and the upper limit threshold of disk usage;

[0041] Feedback the identified abnormal patterns to the management, provide abnormal handling suggestions based on the identified abnormal patterns, and establish a continuous monitoring mechanism.

[0042] Furthermore, monitoring data includes CPU usage, memory usage, disk I / O, network traffic, and response time.

[0043] Furthermore, configuring the interactive communication mode between the software containers and between the software containers and the cloud-edge collaboration module includes:

[0044] The edge computing gateway integrates the message middleware internally as a communication channel between software containers and between software containers and cloud-edge collaboration modules.

[0045] Furthermore, local preprocessing of the collected data in the edge gateway includes data quality detection, abnormal data processing, data value conversion, and historical data recording and recall.

[0046] The beneficial effects of the present invention are:

[0047] (1) Improve data processing efficiency: Through containerization technology, resource isolation and dynamic adjustment can be achieved, resource utilization can be improved, and resource contention can be reduced. After data is pre-processed locally, the amount of data transmitted to the cloud is reduced, effectively protecting user privacy and data security, thereby improving data processing and transmission efficiency.

[0048] (2) Reduce latency: Sink data processing tasks to the edge computing gateway to reduce data transmission latency and improve the system's real-time response capabilities.

[0049] (3) Easy to expand: The containerized edge gateway system supports large-scale deployment, and users can quickly add or delete nodes to improve the scalability of the system.

[0050] (4) Flexible deployment: The cloud-edge collaboration mechanism based on containerization technology can flexibly deploy applications according to actual needs to meet data processing requirements in different scenarios.

[0051] (5) More precise control: Day-ahead and short-term data forecasts and hourly control optimization and updates are performed through the cloud. The edge gateway dynamically executes control according to the strategy issued by the platform. The control is more precise and will better achieve the control goals.

[0052] (6) Advance operation and maintenance: Monitor the resource usage of each container app, trigger event information in a timely manner to notify operation and maintenance personnel, and use machine learning models and real-time monitoring data to dynamically learn normal resource usage patterns and identify potential abnormal behaviors or performance issues. Intervene in advance before failures or anomalies occur, and provide feedback to developers to upgrade and optimize container apps. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0054] Figure 1 is a flow chart of a cloud-edge collaboration method based on container technology edge computing according to an embodiment of the present invention;

[0055] Figure 2 This is an overview diagram of a cloud-edge collaboration method based on container technology edge computing according to an embodiment of the present invention;

[0056] Figure 3 It is a flow chart of uploading platform processing in specific application of a cloud-edge collaboration method based on container technology edge computing according to an embodiment of the present invention;

[0057] Figure 4 It is a module diagram of edge gateway management in a cloud-edge collaboration method based on container technology edge computing according to an embodiment of the present invention;

[0058] Figure 5 This is one of the flow charts of container management in a specific application of a cloud-edge collaboration method based on container technology edge computing according to an embodiment of the present invention;

[0059] Figure 6 This is the second flowchart of container management in a specific application of a cloud-edge collaboration method based on container technology edge computing according to an embodiment of the present invention;

[0060] Figure 7 This is the third flowchart of container management in a specific application of a cloud-edge collaboration method based on container technology edge computing according to an embodiment of the present invention;

[0061] Figure 8 It is a flow chart of predicting and optimizing the control strategy of the edge gateway in a specific application of a cloud-edge collaboration method based on edge computing of container technology according to an embodiment of the present invention;

[0062] Fig. 9 This is a schematic diagram of the interaction between container apps inside the gateway. DETAILED DESCRIPTION

[0063] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in the field should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0064] According to an embodiment of the present invention, a cloud-edge collaboration method based on edge computing of container technology is provided. The present invention deploys and manages containers on edge computing gateways, appifies software containers, and manages the installation, uninstallation, and update of edge gateway software through a cloud management platform. At the same time, the cloud platform automatically performs prediction, optimization, and other calculations based on the data reported by the gateway, and quickly synchronizes the calculation results to the edge gateway to achieve rapid update and correction of gateway control parameters, thereby achieving efficient cloud-edge coordination and achieving better control effects for device control. The edge gateway performs data processing, reduces platform data processing time, and speeds up the execution time of prediction and optimization algorithms. The edge gateway provides a container app interaction channel to facilitate data and information interaction between different apps. Based on the resource usage of each software container reported by each gateway, the platform uses a machine learning model to dynamically learn normal resource usage patterns, identify potential abnormal behaviors or performance issues, and intervene in maintenance in advance.

[0065] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to a cloud-edge collaboration method based on container technology edge computing according to an embodiment of the present invention, the cloud-edge collaboration method based on container technology edge computing includes:

[0066] S1. Use the cloud-edge collaboration module built into the edge gateway to manage the software container’s container lifecycle, and use the cloud image management platform to manage the container image’s image lifecycle;

[0067] S2. Use the cloud-edge collaboration module to complete the communication between the edge gateway and the cloud image management platform, predict and optimize the control strategy of the edge gateway in the cloud image management platform, deploy the predicted and optimized control strategy to the edge gateway and act on related devices;

[0068] S3. Based on the cloud image management platform and the pre-built machine learning model, the normal resource usage pattern of each software container is subjected to anomaly detection and learning. The machine learning model and the pre-set anomaly rules are used to perform anomaly detection on the monitoring data of each software container collected in real time, and the anomaly results are identified and fed back to the management party.

[0069] Among them, when using the cloud-edge collaboration module built into the edge gateway to manage the container lifecycle of the software container, the interactive communication method between each software container and between the software container and the cloud-edge collaboration module is configured, and the collected data is pre-processed locally in the edge gateway.

[0070] In order to facilitate understanding of the above technical solutions of the present invention, the above technical solutions of the present invention are further explained below from the perspectives of architecture and principle.

[0071] Developers package images in the development environment and then upload them to the image management platform. The cloud image platform provides a management interface. First, it can manage images in the warehouse, review submitted images, manage image version upgrades, view all container images and versions uploaded by developers, and manage image management such as enabling, disabling, and deleting container images. Second, it can manage image containers in edge gateways. On the image management platform, managers can download, install, delete, run, stop, configure software container resources, and recall software container operation log files for image containers of single or multiple edge gateways. The edge computing gateway has a built-in cloud-edge collaboration module, which is responsible for interacting with the management platform and controlling and configuring software containers. The cloud-edge collaboration module reports the system data of the gateway itself, such as CPU usage, memory usage, disk usage, etc., reports the CPU usage, memory usage, disk usage, etc. of each software container, and periodically detects each software container resource to see if it exceeds the resource configuration limit. If the limit is exceeded, the event is triggered and actively reported to the platform, so that the platform can track and detect the status of the gateway and the container, so that the maintenance personnel can perform maintenance immediately. The cloud platform uses machine learning models, gateways and software container apps to monitor data in real time, dynamically learn the normal resource usage patterns of each software container, identify potential abnormal behaviors or performance issues, and feed back abnormal results to developers for container app correction and optimization.

[0072] like Figure 2 As shown, 1. Developers develop applications and make images: create corresponding application images (Image) through the containerization platform (Docker).

[0073] 2. Upload the image to the image repository: Developers upload the prepared application image to the cloud image management and coordination platform through Docker for subsequent managers to use.

[0074] 3. Image repository and edge gateway image management: The image repository collaborates with the cloud image management collaborative platform to allow administrators to manage uploaded images.

[0075] 4. Container management and cloud-edge collaboration: The image is distributed to multiple edge computing gateways, each of which contains a container function module and a cloud-edge collaboration module.

[0076] Based on the data reported by the edge gateway, the cloud management platform performs predictions and optimization calculations related to the regulation of each gateway, such as load forecasting, photovoltaic power generation forecasting, etc., optimizes the regulation parameters of regulation equipment such as energy storage and charging piles, and then sends the calculated prediction and optimized regulation data to the edge gateway. The edge gateway then actually controls the equipment regulation based on the regulation parameters and dynamically updates the regulation parameters to achieve better regulation effects.

[0077] The Edge Computing Gateway integrates MQTT Broker (MQTT server, Message Queuing Telemetry Transport, Message Queuing Telemetry Transport Protocol) internally as a communication channel between software containers, making it convenient for container apps to communicate with each other through MQTT Broker.

[0078] After local data processing, the edge gateway reduces the amount of data transmitted to the cloud, reduces the delay of data transmission, and reduces the consumption of large amounts of edge gateway data processing in the cloud, effectively protecting user privacy and data security, thereby improving data processing and transmission efficiency. Data processing includes: data quality detection, abnormal data processing, data value conversion, historical data recording and call testing.

[0079] (1) Container upload management platform

[0080] Each manufacturer or individual creates a container app with specific functions in their own development environment, uploads it to the cloud image management platform, and then manages the uploaded images on the platform. The manager can review and upgrade all uploaded images, view the container images and versions uploaded by all developers, and manage the container images by starting, stopping, deleting, and other image management.

[0081] Upload platform processing flow as follows Figure 3 As shown, the process includes 1. Developers create images; 2. Upload images to the image management platform (image status - pending review); 3. Managers review and manage image repositories; 4. Check image versions, image functions or upgrade instructions, test results, and set image status; if the image is normal: (image status - published); if the image is abnormal, roll back the developer: (image status - rollback); 5. Image operation: set the image status, disable, publish, etc. according to the situation, and can delete the image and perform other operations.

[0082] (2) Edge Gateway Management

[0083] Deploy and manage Linux container management tools such as Docker (an open source application container engine) on the edge computing gateway to encapsulate applications into independent software containers to achieve resource isolation, dynamic adjustment, and efficient utilization.

[0084] The administrator can install, uninstall, and track the status of the edge gateway according to the on-site gateway usage, or install, uninstall, and track the status of different gateways in batches at the same time. Quickly configure different functions of different gateways at different sites. The edge gateway has a built-in edge collaboration function module to realize the cloud-edge collaboration function.

[0085] The functional framework of the edge computing gateway is as follows: Figure 4As shown, Figure 4 The figure shows how to manage multiple application images through Docker in the edge computing gateway and run containers based on these images. The container communicates with the MQTT message broker and keeps synchronization and collaboration with the cloud through the cloud-edge collaboration module.

[0086] The main functions of the cloud-edge collaboration module are:

[0087] Through efficient network communication protocols, it is responsible for communicating with cloud servers to achieve management such as software container installation and uninstallation, data reporting, and interactive setting of control parameters. The main functions are described in detail as follows.

[0088] 1) Container Management

[0089] Includes container installation, container upgrade, container start, container stop, container deletion, container configuration modification, container configuration query, container status query, and container log recall.

[0090] Specific management processes such as Figure 5-Figure 7 shown. Figure 5 The installation or upgrade process includes: 1. The administrator selects one or more edge gateways; 2. The installation or upgrade image name, installation or upgrade type, and container operation configuration parameters are sent to the edge gateway through the cloud-edge collaboration module; 3. The edge gateway deletes (upgrades) the original local container management image or creates (installs) a new image installation path according to the image name, and replies to the platform with the result; 4. The platform performs the next operation based on the status reported by the edge gateway. If the reply is successful, the platform sends the image file to the replied installation path. If the reply is failed, the operation is processed according to the failure type code; 5. The edge gateway detects that the file transfer is complete, adds the image to the local container management of the edge gateway, and the installation or upgrade is completed.

[0091] Figure 6 The start, stop and delete process includes: 1. The administrator selects one or more edge gateways; 2. The start, stop or delete image name and start, stop or delete type are sent to the edge gateway through the cloud-edge collaboration module; 3. The edge gateway starts the container, stops the container, deletes the image, etc. according to the image name and the start, stop or delete operation type, and then replies to the platform with the result; 4. The platform records the operation status of each gateway container according to the results reported by the edge gateway.

[0092] Figure 7In the process of container configuration, status or log recall query, the manager selects one or more edge gateways; 2. The query image name, query configuration, status or log recall type are sent to the edge gateway through the cloud-edge collaboration module; 3. The edge gateway queries the configuration parameters or running status of the corresponding container, or the running log file according to the image name, query configuration, status or log recall type, and then replies to the platform result or sends the log file; 4. The platform records and displays the running status or resource configuration status of each gateway query container according to the result reported by the edge gateway, or displays and records the running log file.

[0093] 2) Data prediction and optimization control

[0094] Based on the data reported by the edge gateway, the cloud management platform performs predictions and optimization calculations related to the regulation of each gateway, such as load forecasting, photovoltaic power generation forecasting, etc., optimizes and corrects the regulation parameters of adjustable equipment such as energy storage and charging piles, and then sends the calculated prediction data and optimized regulation parameter data to the edge gateway. The edge computing gateway tracks and controls the actual equipment regulation targets based on the updated data sent down.

[0095] The amount of prediction optimization calculation is large. The cloud is responsible for the long-term prediction of the day-ahead strategy and the short-term prediction after 1 hour. The day-ahead and short-term prediction results are sent to the control for update.

[0096] Starting at 23:00 every day, prediction algorithms such as SVR, random forest, and neural network are used to predict the load and photovoltaic power generation data for the whole day of the next day, and optimization control algorithms such as genetic algorithm and particle swarm algorithm are used to calculate the overall control strategy for the next day.

[0097] At every hour every day, the latest data and historical data before the current time are used to predict the load and photovoltaic power generation data one hour later. The optimization control algorithm is used to calculate the control strategy one hour later.

[0098] The control objectives of the control strategy can be various strategies such as economic strategy, minimizing energy consumption, security strategy, etc. This paper mainly explains the mechanism of cloud-side collaborative control based on the prediction optimization control calculation and the edge gateway according to the prediction optimization control results.

[0099] Implementation steps of prediction algorithm and optimization algorithm:

[0100] Implementation steps of the prediction algorithm:

[0101] 1. Model selection and training

[0102] Model selection: Choose an appropriate prediction model based on the nature of the problem, such as time series prediction models such as ARIMA, LSTM, Prophet, or supervised learning models such as random forest and support vector machine.

[0103] Training model: Use historical data to train the model and adjust hyperparameters to optimize model performance. The historical data includes user transformer gateway information data, photovoltaic inverter data, energy storage data, air conditioning and lighting data, and charging pile (including V2G) data; data items include electrical parameters and equipment status.

[0104] Cross-validation: The generalization ability of the model is evaluated through cross-validation techniques.

[0105] 2. Model evaluation and optimization

[0106] Evaluation Metrics: Choose appropriate evaluation metrics (such as MAE, RMSE, R², etc.) to measure the accuracy of the predictions.

[0107] Model tuning: Adjust model parameters or try different model combinations based on the evaluation results.

[0108] 3. Prediction result output

[0109] Real-time prediction: Deploy the trained model to the cloud or edge devices to achieve real-time prediction. Predicted control parameters include distributed photovoltaic inverters (output power), energy storage cabinets (start and stop, charging and discharging strategies, output power), air conditioners (start and stop, temperature), lighting (start and stop), charging piles (including V2G, output power), etc.

[0110] Result feedback: The prediction results are fed back to the optimization algorithm as input for the next step of optimization and regulation.

[0111] Optimization algorithm implementation steps:

[0112] 1. Goal definition

[0113] Define optimization goals: Define optimization goals based on business needs, such as economic optimization, minimizing energy consumption, maximizing equipment utilization, etc.

[0114] The goal is to minimize the total cost of operating the microgrid (economic optimum), which includes the cost of purchasing electricity from the grid, the operating cost of the energy storage system, the power generation income of the photovoltaic system, and the management cost of the electric vehicle charging pile.

[0115] set up: Indicates the power purchased from the main grid, in units of kW . Indicates the cost of purchasing electricity, in yuan / kWh. Indicates the power sold to the main grid, in units of kW . Represents the revenue from electricity sales, in Yuan / kWh. Represents photovoltaic power generation, in units of kW . Indicates the load power demand in units of kW . Indicates the charging power of the energy storage system, in units of kW . Indicates the discharge power of the energy storage system, in units of kW . Indicates the state of the energy storage system (StateofCharge), in percentage . Represents the cost of energy storage, including charging and discharging losses. Represents the cost of charging an electric vehicle. Represents the charging power demand of electric vehicles, in units of kW . T Represents the total time of the scheduling cycle, t Represents a time variable.

[0116] The objective function of the total cost can be written as:

[0117]

[0118] in, represents the minimization of the total operating cost of the microgrid, and It can be determined by the electricity price predicted by the model, and , and other power variables are obtained through optimization decisions.

[0119] Power balance constraints:

[0120] At every moment , the power demand of the microgrid must be equal to the sum of the power of the load and the electric vehicle charging pile, satisfying the following balance equation:

[0121]

[0122] Energy storage system constraints:

[0123] The charging and discharging of energy storage systems are subject to capacity constraints, and the charging and discharging efficiency and state constraints must also be considered:

[0124]

[0125] in, and They are the charging efficiency and discharging efficiency of the energy storage system; Indicates the lower limit of energy storage regulation soc; Indicates the upper limit of SOC for energy storage regulation.

[0126] Photovoltaic power generation constraints:

[0127] Photovoltaic power generation is determined by factors such as weather conditions, so it is necessary to predict future photovoltaic power generation. , it is necessary to ensure that it complies with the actual power generation capacity of the photovoltaic system:

[0128]

[0129] in, Indicates the predicted maximum power generation of photovoltaic power, which is provided by the photovoltaic prediction model, usually predicted by a machine learning model based on solar radiation, weather and other data.

[0130] Restrictions on power purchase and sales from the power grid:

[0131] Microgrids can purchase electricity from the grid or sell electricity to the grid, but they cannot purchase and sell electricity at the same time. Set the following constraints:

[0132]

[0133] Electric vehicle charging pile constraints:

[0134] The charging power of an electric vehicle charging pile is limited by the capacity of the charging pile and the charging needs of the vehicle:

[0135]

[0136] in, is the maximum charging power of the electric vehicle charging pile, It is the charging power of the electric vehicle charging pile, which depends on the charging needs of the vehicle and the capacity of the charging pile.

[0137] Through the above objective functions and constraints, combined with the prediction of load, photovoltaic power generation and electricity price by machine learning model, the optimal scheduling of microgrid system can be achieved. Dynamic programming, genetic algorithm, reinforcement learning and other optimization algorithms can be used to solve the problem and obtain the economically optimal operation strategy of microgrid.

[0138] 2. Initial solution generation

[0139] Initial configuration: Generate an initial feasible solution based on historical data or expert knowledge, i.e., prior knowledge.

[0140] Solution encoding: Encoding the variables in the optimization problem into a form that can be processed by a computer.

[0141] 3. Optimization algorithm selection and configuration

[0142] Algorithm selection: Select a suitable optimization algorithm according to the characteristics of the problem, such as genetic algorithm (GA), particle swarm optimization (PSO), gradient descent method, etc.

[0143] Parameter setting: configure the algorithm parameters, such as population size, number of iterations, step size, etc.

[0144] 4. Optimization solution

[0145] Iterative solution: Use the selected optimization algorithm to perform iterative solution and gradually approach the optimal solution.

[0146] Convergence judgment: Set convergence conditions, such as stopping iteration when there is no obvious improvement after several consecutive generations.

[0147] 5. Evaluation and selection of solutions

[0148] Evaluate solutions: Evaluate the quality of each solution using a predetermined objective function.

[0149] Select the optimal solution: Select the optimal solution from all solutions as the final optimization result.

[0150] 6. Optimize the application of results

[0151] Application of results: Apply the optimization results to the actual system, such as adjusting the working mode of the equipment, scheduling resources, etc.

[0152] Effect monitoring: Monitor the operating status of the optimized system to ensure that the expected optimization effect is achieved.

[0153] 7. Dynamic Adjustment

[0154] Closed-loop control: Dynamically adjust the optimization strategy according to the actual operating conditions to achieve closed-loop control.

[0155] Continuous optimization: Continuously adjust the optimization algorithm based on feedback information to continuously improve system performance.

[0156] The control strategy and parameter setting process after prediction optimization is divided into two steps:

[0157] 1. The control strategy execution function itself is a container image, which is installed and updated through the container image. After installing this control strategy execution container app, the edge gateway has the control strategy parsing and execution function, and can apply the cloud algorithm control results to specific devices.

[0158] 2. The cloud platform performs calculations, predictions, and optimization based on the collected data reported by the edge gateway, and then sends it to the edge gateway for policy control. The control strategy is automatically adjusted according to the new prediction and optimization calculation parameters sent by the cloud platform to achieve better control effects.

[0159] The specific process is as follows Figure 8 As shown, the process includes:

[0160] 1. At 23:00 or every hour, obtain the load and photovoltaic power generation data reported by the gateway from the database;

[0161] 2. Data processing, data cleaning, abnormal data correction, etc.;

[0162] 3. Use prediction algorithms such as random forests and neural networks to predict the load and photovoltaic power generation data for the next day or the prediction data after 1 hour;

[0163] 4. Use optimization control algorithms such as genetic algorithm and particle swarm algorithm to calculate the control strategy parameters for the next day or one hour later;

[0164] 5. Send the prediction data results and control parameter results to each edge gateway;

[0165] 6. The edge computing gateway control strategy execution container app performs actual equipment control according to the control parameters of energy storage, charging piles or photovoltaic inverters issued by the platform;

[0166] 7. The edge computing gateway collects the data after regulation and controls and reports it to the platform. The platform uses the new data to predict and calculate the prediction and regulation parameters one hour later at the hour.

[0167] 3) Report the data of the gateway itself and the running container system

[0168] Such as CPU occupancy, memory occupancy, disk occupancy, etc., report the CPU occupancy, memory occupancy, disk occupancy, etc. corresponding to each software container, so as to track and detect the gateway status and container status on the platform, and check the resource usage of each software container in a 1min period to see if it exceeds the resource configuration limit. If the limit is exceeded, the event will be triggered and actively reported to the platform.

[0169] The cloud platform uses machine learning models, gateways and container apps to monitor data in real time, dynamically learn the normal resource usage patterns of each software container, identify potential abnormal behaviors or performance issues, and feed back abnormal results to developers for container app correction and optimization.

[0170] The specific implementation steps are as follows:

[0171] 1. Data Collection

[0172] Collection tool selection: Collect real-time monitoring data of each container app through the gateway, including key performance indicators such as CPU usage, memory usage, disk I / O, network traffic, response time, etc. Select appropriate monitoring tools (such as Prometheus, Grafana, ELK Stack, etc.) to collect the operation data of the software container.

[0173] API interface design: Design the API interface so that the gateway can communicate with each software container application and obtain the monitoring data of the software container in real time.

[0174] Collection frequency setting: The data collection frequency can be adjusted according to business needs (such as every second, every minute).

[0175] 2. Data preprocessing

[0176] Cleaning data: Clean the collected data to remove invalid data or noise to ensure data quality.

[0177] Feature extraction: Extract meaningful features based on business needs, such as maximum CPU usage, average memory usage, etc.

[0178] Data standardization: Standardize or normalize the data to eliminate the impact of dimension and make different types of features comparable.

[0179] 3. Build a machine learning model

[0180] Select algorithm: Select a suitable machine learning algorithm according to the nature of the problem, such as support vector machine (SVM), random forest (RF), long short-term memory network (LSTM), etc.

[0181] Training model: Use historical monitoring data to train the model and learn normal and abnormal resource usage patterns.

[0182] Cross-validation: The generalization ability of the model is evaluated through cross-validation technology to ensure the performance of the model on unknown data.

[0183] 4. Anomaly Detection

[0184] Abnormal rule setting: Set abnormal rules according to business needs, such as resource usage beyond the historical normal range, sudden performance indicator fluctuations, abnormal scores predicted by the model exceeding the threshold, etc. Combine model output results (such as abnormal scores) with business rules to make joint judgments to avoid misjudgment by a single model.

[0185] Set thresholds: Set anomaly detection thresholds based on the trained model. When real-time monitoring data exceeds the threshold, it is considered that there is abnormal behavior or performance problem. Anomaly detection thresholds include CPU usage upper threshold, memory usage upper threshold, and disk usage upper threshold.

[0186] Real-time detection: Use the trained model to detect the data collected in real time and identify abnormal patterns.

[0187] 5. Result feedback and optimization

[0188] Result feedback: The detected abnormal results are fed back to the developer or operation and maintenance team in real time.

[0189] Exception handling: Provides exception handling suggestions, such as restarting software containers, optimizing resource allocation, etc.

[0190] Model update: Continuously update and optimize the model based on feedback results and new data to improve the accuracy and robustness of the model.

[0191] 6. User Interface and Notifications

[0192] User interface: Design a user interface to display anomaly detection results, including information such as the frequency, type, and severity of anomalies.

[0193] Alarm notification: When an abnormality is detected, relevant personnel are notified via email, SMS or in-app messaging.

[0194] 7. Continuous monitoring and improvement

[0195] Continuous monitoring: Establish a continuous monitoring mechanism to ensure that the model can run effectively in the long term.

[0196] Performance optimization: Continuously adjust model parameters and optimize performance based on actual application results.

[0197] (3) Interaction method between container apps within the gateway

[0198] like Fig. 9 As shown in the figure, the edge computing gateway integrates MQTT Broker as the communication channel between software containers, which facilitates the communication between container apps through MQTT Broker. The cloud-edge collaboration module also communicates and interacts with the container app in this way.

[0199] (4) Edge gateway data processing

[0200] After the data is pre-processed locally, the amount of data transmitted to the cloud is reduced, the delay in data transmission is reduced, and the large amount of edge gateway data processing consumption in the cloud is reduced, effectively protecting user privacy and data security, thereby improving data processing and transmission efficiency.

[0201] Data processing content:

[0202] Data quality detection: The edge gateway collects and obtains data through the communication protocol. If there is a communication protocol parsing error or a communication connection failure, the data quality of the data point collected under the communication end protocol is set to device error. When data is collected normally through the protocol, the data quality is updated to good quality.

[0203] Abnormal data processing: According to the data range of the collected data, set the maximum and minimum values. Within the range, the data is normal and the data quality is good. If the data exceeds the data range or changes abnormally, set the data quality to data abnormality.

[0204] Data value conversion: In order to maintain a unified standard definition for the same data collected by the platform from different equipment manufacturers through different gateways, the edge gateway converts different value types of the same data. For example, the photovoltaic power generation status is uniformly defined by the platform, such as a value of 1 for standby, a value of 2 for power generation, and a value of 3 for abnormality. The device status values ​​defined by different photovoltaic inverter manufacturers may not have the same meaning as the platform-defined values. Therefore, the edge computing gateway converts the meaning of the data values ​​collected by the device into a unified definition of the platform, and uniformly processes them into the status values ​​required by the platform through expression calculation.

[0205] Historical data recording and call testing: The gateway itself records the historical data of the collected data. When the gateway and the platform cannot upload the platform data in time due to network reasons, the data is recorded in the local database. When the communication between the gateway and the platform is established again, the platform reads the historical data of the call testing edge gateway according to the data missing time period and restores the missing data of the platform.

[0206] When the collected data is reported to the platform, including data quality information, the platform can facilitate data processing, data cleaning and other processing when performing forecasting, optimization and regulation calculations, thereby reducing data processing time and speeding up forecasting and optimization and regulation calculation time.

[0207] In addition, the cloud management platform in the present invention can be converted into a local computer platform, and the local computer management platform can also realize the functions of the cloud management platform.

[0208] In summary, with the help of the above technical solutions of the present invention, the data processing efficiency is improved: the isolation and dynamic adjustment of resources are realized through containerization technology, the resource utilization rate is improved, the resource contention phenomenon is reduced, and the data is pre-processed locally, which reduces the amount of data transmitted in the cloud, effectively protects user privacy and data security, thereby improving data processing and transmission efficiency. Reduce latency: sink the data processing task to the edge computing gateway, reduce the delay of data transmission, and improve the real-time response capability of the system. Easy to expand: the containerized edge gateway system supports large-scale deployment, and users can quickly add or delete nodes to improve the scalability of the system. Flexible deployment: based on the cloud-edge collaboration mechanism of containerization technology, applications can be flexibly deployed according to actual needs to meet the data processing needs in different scenarios. More refined regulation: through the cloud to perform day-ahead and short-term data prediction and hourly regulation optimization and update, the edge gateway dynamically executes regulation according to the platform's issued strategy, the regulation is more refined, and the regulation goal will be better achieved. Advance operation and maintenance: monitor the resource usage of each container app, trigger event information in time to notify the operation and maintenance personnel, and use the machine learning model to dynamically learn the normal resource usage pattern and identify potential abnormal behavior or performance problems by using real-time monitoring data. Intervene in advance before failures or exceptions occur, and provide feedback to developers to upgrade and optimize the container app.

[0209] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A cloud-edge collaboration method based on container technology edge computing, characterized in that: include: S1. Use the cloud-edge collaboration module built into the edge gateway to manage the software container’s container lifecycle, and use the cloud image management platform to manage the container image’s image lifecycle; S2. Use the cloud-edge collaboration module to complete the communication between the edge gateway and the cloud image management platform, predict and optimize the control strategy of the edge gateway in the cloud image management platform, deploy the predicted and optimized control strategy to the edge gateway and act on related devices; S3. Based on the cloud image management platform and the pre-built machine learning model, the normal resource usage pattern of each software container is subjected to anomaly detection and learning. The machine learning model and the pre-set anomaly rules are used to perform anomaly detection on the monitoring data of each software container collected in real time, and the anomaly results are identified and fed back to the management party. When using the cloud-edge collaboration module built into the edge gateway to manage the lifecycle of software containers, configure the interactive communication mode between each software container and between the software container and the cloud-edge collaboration module, and perform local preprocessing on the collected data in the edge gateway; The S2 further includes: Use historical data reported by the edge gateway to train and optimize the prediction model; historical data includes user transformer gateway information data, photovoltaic inverter data, energy storage data, air conditioning and lighting data, and charging pile data; data items include electrical parameters and equipment status; Use the prediction model to predict the edge gateway control parameters in real time, and use the prediction results as the input of the optimization algorithm; the control parameters include the control parameters of distributed photovoltaic inverters, energy storage cabinets, air conditioners, lighting and charging piles; Determine the optimization objectives and constraints, generate the initial solution of the optimization algorithm, and configure the parameters of the optimization algorithm; The quality of each solution is evaluated based on the objective function, convergence conditions are set, and the best solution is selected from all solutions as the final optimization result.

2. According to the cloud-edge collaboration method based on container technology edge computing according to claim 1, it is characterized in that: The cloud-edge collaboration module built into the edge gateway is used to manage the software container lifecycle, including container installation, container upgrade, container startup, container stop, container deletion, container configuration modification, container configuration query, container status query, and container log recall.

3. According to the cloud-edge collaboration method based on container technology edge computing according to claim 1, it is characterized in that: Using the cloud image management platform to manage the image lifecycle of container images includes: Upload container images to the cloud image management platform, and review and upgrade container images; Get the uploaded container images and corresponding versions, and manage the container images.

4. According to the cloud-edge collaboration method based on container technology edge computing according to claim 1, it is characterized in that: The optimization objectives include economic optimization, minimizing energy consumption, and maximizing equipment utilization; The constraints include the power balance constraint of the microgrid, the charging and discharging capacity constraint of the energy storage system, the photovoltaic power generation constraint, the power purchase and sales restriction constraint of the power grid, and the charging power constraint of the electric vehicle charging pile; Among them, the objective function is to minimize the total operating cost of the microgrid, and the formula of the objective function of minimizing the total operating cost of the microgrid is: Where, Minimize C total represents minimizing the total cost of operating the microgrid; P grid (t) represents the power purchased from the main grid; C buy (t) represents the cost of purchasing electricity; P sell (t) represents the power sold to the main grid; C sell (t) represents the revenue from electricity sales; C storage (t) represents the energy storage cost; C EV (t) represents the charging cost of electric vehicles; T represents the total time of the scheduling cycle, and t represents the time variable.

5. According to the cloud-edge collaboration method based on container technology edge computing according to claim 1, it is characterized in that: The step of deploying the predicted optimized control strategy to the edge gateway and acting on related devices includes: The predicted and optimized control strategy is encapsulated as a container image. The edge gateway obtains the latest control strategy through container image installation and update; the latest control strategy is applied to the edge device.

6. According to the cloud-edge collaboration method based on container technology edge computing according to claim 1, it is characterized in that: The cloud image management platform and the pre-built machine learning model are used to perform abnormal detection and learning on the normal resource usage mode of each software container, and the machine learning model and the pre-set abnormal rules are used to perform abnormal detection on the monitoring data of each software container collected in real time, and the abnormal results are identified and fed back to the management party, including: Collect monitoring data of each software container through the edge gateway and pre-process the monitoring data; Select a machine learning algorithm and train the machine learning model using historically collected monitoring data of each software container to learn normal and abnormal resource usage patterns; evaluate the generalization ability of the machine learning model using cross-validation techniques; Set exception rules according to business needs, and identify abnormal patterns by combining the output results of the machine learning model on real-time monitoring data and the anomaly detection threshold; the exception rules include the anomaly score predicted by the machine learning model exceeding the preset anomaly detection threshold; the anomaly detection threshold includes the upper limit threshold of CPU usage, the upper limit threshold of memory usage, and the upper limit threshold of disk usage; Feedback the identified abnormal patterns to the management, provide abnormal handling suggestions based on the identified abnormal patterns, and establish a continuous monitoring mechanism.

7. The cloud-edge collaboration method based on container technology edge computing according to claim 6 is characterized in that: The monitoring data includes CPU usage, memory usage, disk I / O, network traffic and response time.

8. The cloud-edge collaboration method based on container technology edge computing according to claim 1 is characterized in that: The configuration of interactive communication between software containers and between software containers and cloud-edge collaboration modules includes: The edge computing gateway integrates the message middleware internally as a communication channel between software containers and between software containers and cloud-edge collaboration modules.

9. The cloud-edge collaboration method based on container technology edge computing according to claim 1 is characterized in that: The local preprocessing of the collected data in the edge gateway includes data quality detection, abnormal data processing, data value conversion, and historical data recording and recall.

Citation Information

Patent Citations

  • Cloud side cooperation system and cloud side cooperation method based on native container technology

    CN112559133A

  • Implementation method of edge intelligent software platform based on container operating system

    CN117009981A