Charging station safety event incremental learning method and system based on cloud collaboration
By using a cloud-based collaborative incremental learning method, difficult example samples uploaded by edge devices are received and clustered for analysis. The teacher model is incrementally trained and knowledge distillation technology is used to solve the problems of insufficient recognition capability and low update efficiency of the charging station safety event identification system, thus achieving efficient and lossless model updates.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG POWER GRID ENERGY INVESTMENT CO LTD
- Filing Date
- 2026-01-09
- Publication Date
- 2026-05-15
AI Technical Summary
Existing charging station safety incident identification systems are insufficient in identifying new types of destructive behavior and unconventional fire precursors without prior warning. Furthermore, existing technology update methods suffer from problems such as large data transmission volumes, high computational resource consumption, long update cycles, or limited learning resources for edge devices.
By using a cloud-based collaborative incremental learning method, difficult example samples uploaded by edge devices are received, cluster analysis and incremental training are performed, knowledge distillation technology is used to transfer knowledge, and differential parameter update packages are generated to achieve efficient updates of lightweight models.
It enables accurate summarization and integration of unknown security events, improves the efficiency and quality of model learning new knowledge, avoids catastrophic forgetting, ensures the continuity and reliability of the system's recognition capabilities, and reduces network transmission load.
Smart Images

Figure CN122044631A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of charging station technology, and specifically to a cloud-based collaborative incremental learning method and system for charging station safety events. Background Technology
[0002] With the increasing popularity of new energy charging stations, their operating environment is becoming increasingly complex, and safety incidents are exhibiting characteristics of diversity, suddenness, and unpredictability. Currently, although video surveillance systems based on edge computing can achieve low-latency local event recognition, their core lightweight artificial intelligence models have a fixed knowledge scope during training. When faced with novel and unpredictable safety incidents (such as new types of destructive behavior, unconventional fire precursors, etc.), their recognition capabilities are severely insufficient, resulting in a persistently high false negative rate.
[0003] To address the model update issue, existing technologies primarily employ two approaches: First, periodically collecting data in the cloud, retraining the complete model, and then distributing it to the edge for replacement. This method involves large data transfer volumes, high computational resource consumption, and the full model replacement consumes significant bandwidth, resulting in long update cycles and an inability to respond promptly to emerging risks. Second, conducting online learning directly on edge devices. However, edge devices have limited computing power and storage resources, making them highly susceptible to catastrophic forgetting when learning new knowledge—learning new events but forgetting how to identify basic events like fires or falls, compromising reliability. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention proposes an incremental learning method for charging station security events based on cloud collaboration, applied to a cloud environment communicating with edge computing devices of multiple charging stations, including: Receive difficult example samples uploaded from the edge computing devices of the multiple charging stations; Cluster analysis is performed on the received difficult case samples, and samples belonging to the same potential event type are merged into an incremental learning batch; Based on the incremental learning batches, the teacher model in the cloud is incrementally trained under the constraint of the elastic weight consolidation mechanism. The target knowledge data corresponding to the incrementally trained teacher model is transferred to the lightweight student model through knowledge distillation technology. Calculate the parameter differences between the student model and the edge model currently running on the edge computing device, and generate a differential parameter update package.
[0005] In one embodiment, the aforementioned difficult sample is determined by the edge computing device in the following manner: The main AI model obtains the real-time video stream captured by the monitoring camera of the charging station and decodes the target video frame to be analyzed from the real-time video stream based on the confidence level. On the edge computing device, an anomaly detector based on a convolutional autoencoder is run in parallel to process the target video frame and obtain the reconstructed frame corresponding to the target video frame. Calculate the reconstruction error between the target video frame and the reconstructed frame, and dynamically update the judgment threshold based on the statistical value of the historical reconstruction error; When the reconstruction error exceeds the judgment threshold, the current target video frame is determined to be the difficult sample.
[0006] In one embodiment, the above-described acquisition of the real-time video stream captured by the monitoring camera of the charging station, and the main AI model decoding the target video frame to be analyzed from the real-time video stream based on confidence level, includes: Acquire real-time video streams captured by the monitoring cameras of the charging station; Synchronously collect IoT sensor data from the charging station. The IoT sensor data includes at least charging pile power data, charging pile temperature data, ambient humidity data, and smoke sensor readings. The static risk profile data of the charging station is retrieved from the backend of the charging station system. The static risk profile data includes at least the station level, equipment type, service life of each piece of equipment, historical failure frequency and surrounding environment attributes. Based on the key frames of the real-time video stream, the IoT sensor data of the charging station, and the static risk profile data, joint reasoning is performed to output the accident confidence level; When the confidence level of the accident is lower than a preset confidence threshold, the target video frame to be analyzed is decoded from the real-time video stream. The target video frame includes keyframes.
[0007] In one embodiment, the above-described calculation of the reconstruction error between the target video frame and the reconstructed frame, and the dynamic updating of the judgment threshold based on the statistical value of historical reconstruction errors, includes: Calculate the mean square error of each pixel between the target video frame and the reconstructed frame, and use it as the reconstruction error; Obtain the historical reconstruction error sequence within a preset time window, and calculate the mean μ and standard deviation σ of the sequence; The current judgment threshold τ is dynamically calculated based on the formula τ=μ+k·σ, where k is an adjustable coefficient set according to the resource status of the edge computing device and the requirements for early warning sensitivity.
[0008] In one embodiment, the above-described clustering analysis of the received difficult sample and merging samples belonging to the same potential event type into an incremental learning batch includes: The received difficult sample data is standardized and preprocessed to eliminate data bias caused by differences in acquisition equipment or environment; A pre-trained feature extraction network is used to extract high-level semantic feature vectors from pre-processed hard example samples. Based on the risk level of charging station safety events, the semantic feature vector is assigned a corresponding priority weight to obtain a weighted feature vector. Unsupervised clustering of the weighted feature vectors is performed using a clustering algorithm. All hard examples within the same cluster are merged into an incremental learning batch, and the batch is assigned a cluster label that represents the potential event type.
[0009] In one embodiment, the incremental training of the teacher model in the cloud based on the incremental learning batches, under the constraint of the elastic weight consolidation mechanism, includes: Before performing the first incremental learning, the teacher model is trained on the charging station basic safety dataset, and its model parameters are saved as baseline anchors. ; Calculate the Fisher information matrix F of each parameter of the teacher model with respect to the base dataset, where the diagonal elements of the matrix are... Characterization parameters The importance of previously learned tasks; According to the formula: , Determine the incremental learning loss function L, where The standard cross-entropy loss is given by λ, where λ is the regularization strength coefficient. The teacher model is iteratively trained using the incremental learning batches with the objective of minimizing the loss function L.
[0010] In one embodiment, the above-mentioned transfer of the target knowledge data corresponding to the incrementally trained teacher model to the lightweight student model through knowledge distillation technology includes: The parameters of the incrementally trained teacher model are fixed; The lightweight student model is constructed with fewer network parameters than the teacher model. Construct a distillation loss function, which is a weighted average of hard-labeled loss and soft-labeled loss, wherein: The hard label loss is the cross-entropy between the student model prediction result and the true label of the incremental learning batch. The soft label loss is the KL divergence between the logic layer results output by the student model and the logic layer results output by the teacher model. Using the incremental learning batches, with the goal of minimizing the distillation loss function, the lightweight student model is trained to complete knowledge transfer.
[0011] This invention also provides a cloud-based collaborative incremental learning system for charging station security events, applied in a cloud environment that communicates with edge computing devices of multiple charging stations, comprising: The receiving module is used to receive hard example samples uploaded from the edge computing devices of the multiple charging stations; The processing module is used to perform cluster analysis on the received difficult sample and merge samples belonging to the same potential event type into an incremental learning batch; The training module is used to incrementally train the teacher model in the cloud based on the incremental learning batches, under the constraint of the elastic weight consolidation mechanism. The knowledge distillation module is used to transfer the target knowledge data corresponding to the incrementally trained teacher model to the lightweight student model through knowledge distillation technology. The generation module is used to calculate the parameter differences between the student model and the edge model currently running on the edge computing device, and generate a differential parameter update package.
[0012] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described cloud-based collaborative incremental learning method for charging station safety events.
[0013] The present invention also provides a computer storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described cloud-based collaborative incremental learning method for charging station safety events.
[0014] This invention achieves accurate summarization and integration of unknown security events by receiving and clustering difficult example samples from multiple edge devices, ensuring the purity of incremental learning tasks from the source and improving the efficiency and quality of model learning new knowledge. Secondly, based on the elastic weight consolidation mechanism, constrained incremental training of the cloud-based teacher model is performed, fundamentally avoiding the catastrophic forgetting of old knowledge when learning new knowledge, ensuring the continuity and reliability of the system's recognition ability. Finally, through knowledge distillation and differential update package technology, new knowledge from the large cloud model is efficiently transferred and refined into small update packages suitable for edge devices, greatly reducing network transmission load and making frequent, timely, and silent model iteration possible, achieving efficient and lossless model updates under cloud collaboration. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of the cloud-based collaborative incremental learning method for charging station safety events according to the first embodiment of the present invention. Figure 2 This is a detailed flowchart of S11 in the first embodiment of the present invention; Figure 3 This is a detailed flowchart of S111 of the first embodiment of the present invention; Figure 4 This is a detailed flowchart of S12 in the first embodiment of the present invention; Figure 5 This is a detailed flowchart of S13 in the first embodiment of the present invention; Figure 6 This is a detailed flowchart of S14 in the first embodiment of the present invention; Figure 7 This is a structural block diagram of the cloud-based collaborative incremental learning system for charging station safety events according to the second embodiment of the present invention. Figure 8 This is a schematic diagram of the internal structure of a computer according to another embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Well-known modules, units, and their connections, links, communications, or operations are not shown or described in detail. Furthermore, the described features, architectures, or functions can be combined in any way in one or more embodiments. Those skilled in the art should understand that the various embodiments described below are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. It is also readily understood that the modules, units, or processing methods in the various embodiments described herein and shown in the accompanying drawings can be combined and designed in various different configurations. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] First embodiment: Please refer to Figures 1 to 6As shown, this embodiment of the invention discloses an incremental learning method for charging station security events based on cloud collaboration, applied to a cloud environment communicating with edge computing devices of multiple charging stations, including S11-S16, wherein: S11, receive difficult example samples uploaded from the edge computing devices of the multiple charging stations.
[0019] The execution entity in this embodiment is a server cluster deployed in the cloud. The difficult examples in this step refer to video data clips that edge computing devices determine are potential new types of security events that the current AI model cannot reliably identify. These samples are the foundational data for system updates; the cloud asynchronously receives such samples uploaded from a large number of edge devices at charging stations across the network via message queues or file transfer services.
[0020] It should be noted that the difficult example samples are determined and uploaded by the edge computing device in the following manner, please refer to [the relevant documentation]. Figure 2 As shown, this step S11 includes S111-S115, wherein: S111, acquire the real-time video stream collected by the monitoring camera of the charging station, and the main AI model decodes the target video frame to be analyzed from the real-time video stream according to the confidence level.
[0021] This step is the edge-side processing step. The main AI model is a lightweight model currently deployed on edge computing devices, responsible for daily security monitoring. Its confidence score is a quantitative output of its degree of certainty regarding the recognition results. Please refer to... Figure 3 As shown, this step S111 includes S1111-S1115, wherein: S1111, Obtain the real-time video stream captured by the monitoring camera of the charging station; S1112, synchronously collect IoT sensor data of the charging station, the IoT sensor data including at least charging pile power data, charging pile temperature data, ambient humidity data and smoke sensor readings; S1113, retrieve static risk profile data of the charging station from the charging station system backend. The static risk profile data includes at least the station level, equipment type, service life of each piece of equipment, historical failure frequency and surrounding environment attributes. The above steps S1112-S1113 introduce multimodal data including charging station IoT sensor data and the static risk profile data. That is, it not only relies on video, but also integrates equipment operating status, environmental status (IoT sensor data) and site inherent attributes (static risk profile data), providing richer basic data information for subsequent judgment.
[0022] S1114, Based on the key frames of the real-time video stream, the IoT sensor data of the charging station and the static risk profile data, perform joint reasoning and output the accident confidence level; A lightweight joint inference model comprehensively analyzes the aforementioned multi-source information. For example, even if the video footage is blurry or partially obscured due to distance or rain / vapor, the system will still consider a potential risk if the charging station's temperature rises sharply and the site has a history of frequent malfunctions. The output accident confidence score is a comprehensive skepticism index. The lower the confidence score, the less the current scenario resembles any known accident, but multiple data points suggest anomalies, indicating a potential risk.
[0023] S1115, when the confidence level of the accident is lower than the preset confidence level threshold, the target video frame to be analyzed is decoded from the real-time video stream; This step only involves the system consuming computational resources to decode the video stream and extract specific target video frames for further, more detailed analysis when the overall assessment deems the situation unclear and suspicious (relatively low incident confidence level). This effectively filters out a large number of normal or clearly known event scenes, improving edge-side processing efficiency.
[0024] S112, on the edge computing device, an anomaly detector based on a convolutional autoencoder is run in parallel to process the target video frame and obtain the reconstructed frame corresponding to the target video frame; A convolutional autoencoder is an unsupervised neural network that learns how to compress and reconstruct an input image by training on a large amount of normal scene data. It can reconstruct well for normal patterns it is familiar with; however, it reconstructs poorly for abnormal patterns it has not seen before, outputting blurry or incorrect reconstructed frames.
[0025] S113, calculate the reconstruction error between the target video frame and the reconstructed frame, and dynamically update the judgment threshold based on the statistical value of the historical reconstruction error; This step is used to quantify anomalies. The reconstruction error is typically calculated as the mean square error (MSE) of each pixel between the original frame and the reconstructed frame. For example, the formula could be: , Where N is the total number of pixels in the image, and Xi and Xi' are the values of the original image and the reconstructed image at the i-th pixel, respectively.
[0026] The larger the reconstruction error, the more abnormal the current image. In this step, dynamically updating the judgment threshold enables the system to adapt to different time periods (such as changes in day and night lighting) and environments, avoiding high false alarms caused by fixed thresholds. Specifically, this step S113 includes S1131-S1133, where: S1131, Calculate the mean square error of each pixel between the target video frame and the reconstructed frame, and use it as the reconstruction error; S1132, Obtain the historical reconstruction error sequence within the preset time window, and calculate the mean μ and standard deviation σ of the sequence; S1133, the current judgment threshold τ is dynamically calculated according to the formula τ = μ + k·σ, where k is an adjustable coefficient set according to the resource status of the edge computing device and the requirements for early warning sensitivity.
[0027] The above steps S1131-S1133, through statistical process control, enable the judgment threshold to adaptively adjust according to the environmental noise level, thereby improving the robustness and accuracy of difficult case triggering. The value of k can be adjusted according to the device's computing power (resource status) and sensitivity to new events (early warning sensitivity), and this embodiment does not impose any restrictions.
[0028] S114, when the reconstruction error exceeds the judgment threshold, the current target video frame is determined to be the difficult sample.
[0029] Surveillance video footage must simultaneously meet two conditions to be classified as a difficult case sample: it must be deemed suspicious (relatively low confidence of an accident) and visually abnormal (high reconstruction error).
[0030] The steps S111-S114 above establish a difficult example determination mechanism triggered by multimodal data and verified by dual criteria on the edge side, enabling accurate and efficient capture of unknown security events. This provides a high-quality data source for subsequent incremental learning in the cloud, improving the evolutionary efficiency of the entire system from the source.
[0031] S115, upload the difficult example sample to the cloud.
[0032] In this step, the edge device packages the video frame data identified as difficult cases, along with some associated metadata (such as device ID and timestamp), and transmits it to the cloud server over the network.
[0033] S12, perform cluster analysis on the received difficult sample and merge samples belonging to the same potential event type into an incremental learning batch.
[0034] This step is a crucial preprocessing stage for efficient learning in the cloud, aiming to organize messy and challenging data into structured learning tasks. By performing unsupervised clustering on massive amounts of challenging examples, samples with similar visual features that may belong to the same unknown event can be grouped into one category. This ensures that each incremental learning session focuses on learning only one new piece of knowledge, avoiding interference between features of different events.
[0035] Please refer to Figure 4As shown, this step S12 includes S121-S125, wherein: S121, Standardize and preprocess the received difficult sample data to eliminate data bias caused by differences in acquisition equipment or environment; This step is fundamental to ensuring the quality of subsequent analysis. Due to differences in camera models, installation angles, and lighting conditions at different charging stations, the directly acquired video data varies significantly. Standardized preprocessing includes, but is not limited to, resolution unification, pixel value normalization, or color space conversion. This ensures that all hard case samples are compared under the same standard, avoiding clustering errors caused by inconsistencies in the data itself.
[0036] S122 uses a pre-trained feature extraction network to extract high-level semantic feature vectors from pre-processed hard example samples; The pre-trained feature extraction network in this step typically refers to a deep convolutional neural network trained on a large, general-purpose image dataset. Its output is used as features by removing the final fully connected layer. A high-level semantic feature vector is a low-dimensional, dense numerical vector that is no longer just raw pixel information but contains high-level abstract information about the image, such as the shape, texture, and components of objects. For example, for a flame, its feature vector would highlight semantic information such as bright yellow areas and irregular, jagged edges. This allows computers to measure the similarity of image content by calculating the distance between vectors.
[0037] S123, Based on the risk level of charging station safety events, assign corresponding priority weights to the semantic feature vector to obtain a weighted feature vector; In charging station scenarios, different safety incidents have varying degrees of urgency and severity. For example, the risk level of fire precursors is far higher than that of vehicle occupancy violations. The system pre-defines a risk weight mapping table (e.g., fire incidents have a weight of 1.5, personal safety incidents have a weight of 1.2, and order incidents have a weight of 1.0). Before clustering, the feature vectors are multiplied by their corresponding weights, which amplifies the alertness of high-risk event samples in the feature space, making them more likely to form independent and significant cluster centers during clustering. This ensures that the system prioritizes learning and responding to new high-risk events.
[0038] S124, Unsupervised clustering of the weighted feature vectors is performed using a clustering algorithm; The clustering algorithm used in this step can be K-Means, DBSCAN, etc. Unsupervised clustering means that the algorithm does not need to know in advance what specific events these hard cases are, but automatically groups them based entirely on the mathematical similarity between feature vectors (such as Euclidean distance). Samples within the same group are highly similar in visual features, indicating that they are likely to belong to the same type of unknown security event.
[0039] S125 merges all hard examples within the same cluster into an incremental learning batch and assigns a cluster label representing the potential event type of the batch.
[0040] This step transforms the clustering results into a data structure that can be directly used for training. An incremental learning batch is a clean dataset targeting a single potential event type. Simultaneously, the system generates a cluster label for each batch. This label may not be a specific event name, but rather an internal identifier (e.g., cluster 3), pointing to a clear visual pattern, providing a basis for subsequent model learning and operational management.
[0041] The steps S121-S125 above, by cleaning, characterizing, weighting, prioritizing, and automatically grouping difficult examples, ensure from the source that the data used for incremental learning is pure and geared towards high-risk tasks, greatly improving the efficiency and relevance of subsequent model learning and laying a solid foundation for the accurate evolution of the entire system.
[0042] S13, Based on the incremental learning batch, the teacher model in the cloud is incrementally trained under the constraint of the elastic weight consolidation mechanism.
[0043] This step aims to enable the teacher model in the cloud to learn new knowledge while firmly retaining old knowledge. The teacher model can be a large, high-performance deep learning model. Elastic Weight Consolidation (EWC) is an incremental learning algorithm. Since different parameters in the model have different importance for memorizing different tasks, EWC quantifies this importance to protect important parameters from being drastically modified when learning new tasks.
[0044] Please refer to Figure 5 As shown, this step S13 includes S131-S134, wherein: S131, Before performing the first incremental learning, the teacher model is trained on the charging station basic safety dataset, and its model parameters are saved as a baseline anchor point. ; Reference anchor point It is a snapshot of the model's state before it learns any new knowledge. It represents the solidified memory of all the old knowledge the model has already mastered (such as known events like flames or falls). This serves as a reference point to prevent forgetting.
[0045] S132, Calculate the Fisher information matrix F of each parameter of the teacher model with respect to the basic dataset, where the diagonal elements of the matrix are... Characterization parameters The importance of previously learned tasks; The Fisher information matrix F is the core of the EWC algorithm. Its diagonal elements The numerical value quantifies the parameter. The importance of old tasks. The larger the value, the stronger the parameter. If this parameter is changed, the model's output for old tasks will change drastically. Therefore, this parameter is crucial for memorizing old knowledge and needs to be "protected" when learning new knowledge.
[0046] S133, according to the formula: , Determine the incremental learning loss function L, where The standard cross-entropy loss is given by λ, where λ is the regularization strength coefficient. This step constructs a loss function that integrates new and old knowledge objectives. As a standard cross-entropy loss, it is responsible for driving the model to learn new knowledge in the new batch. It acts as a "memory protector": it protects highly important ( The parameter (with a larger value) deviates from its reference value. The behavior is punished. λ is the regularization strength coefficient, used to balance the weights of the two goals of learning new knowledge and consolidating old knowledge.
[0047] S134, using the incremental learning batches, the teacher model is iteratively trained with the goal of minimizing the loss function L.
[0048] This step uses optimization algorithms such as gradient descent to continuously adjust the parameters θ of the teacher model, minimizing the total loss function L. This process forces the model to fit new data (difficult examples) while keeping its parameters, which are crucial for the old task, as close to their original values as possible, thus protecting important parameters from significant modification when learning new tasks.
[0049] The steps S131-S134 above introduce the EWC mechanism to quantify the importance of parameters and integrate them into the optimization objective, giving the model a robust memory protection capability. This enables the model to maintain a high recognition rate of existing events while continuously learning about unknown security events, fundamentally solving the problem of catastrophic forgetting in incremental learning and ensuring the reliability of the system's long-term operation.
[0050] S14 transfers the target knowledge data corresponding to the incrementally trained teacher model to the lightweight student model through knowledge distillation technology.
[0051] The purpose of this step is to compress and transfer the complex new knowledge learned by the large cloud-based model (teacher model) to a smaller model (student model) that is more suitable for edge deployment. The core idea of knowledge distillation is to enable the student model to mimic the behavior of the teacher model, rather than simply learning the actual labels of the data. The target knowledge data here mainly refers to the soft labels output by the teacher model, which contain rich information about the probability distribution of each category and contain more knowledge than simple hard labels such as "yes / no".
[0052] Please refer to Figure 6 As shown, this step S14 includes S141-S144, wherein: S141, fix the parameters of the incrementally trained teacher model; This step ensures that the teacher model, as a stable source of knowledge, infers from samples in the incremental learning batch with its parameters fixed, generating soft labels for the student model to learn.
[0053] S142, Construct the lightweight student model, whose network parameter count is less than that of the teacher model; Lightweight student models typically refer to neural networks with a more compact structure, fewer layers, or fewer channels. Their computational and memory usage is far less than that of teacher models, and they are designed specifically for resource-constrained edge computing devices.
[0054] S143, Construct a distillation loss function, which is a weighted sum of hard label loss and soft label loss; Distillation loss function is the overall objective guiding the student model's learning. Hard label loss (such as cross-entropy loss) ensures that the student model does not lose its basic classification ability. Soft label loss (such as KL divergence) measures the difference between the probability distribution output by the student model and the probability distribution output by the teacher model. It is the core of knowledge distillation, forcing the student model to learn the generalization ability and internal representation of the teacher model.
[0055] S144, Using the incremental learning batches, with the goal of minimizing the distillation loss function, the lightweight student model is trained to complete knowledge transfer.
[0056] Through training, the student model not only learns how to classify new events, but also learns to make judgments like the teacher model, thus preserving as much of the performance learned from difficult examples as possible while significantly reducing the model size.
[0057] The steps S141-S144 above, through knowledge distillation technology, enable efficient and lossless transfer of knowledge from a large-scale teacher model in the cloud to a lightweight student model, making it possible to perform efficient and low-cost model updates at the edge.
[0058] S15, calculate the parameter differences between the student model and the edge model currently running on the edge computing device, and generate a differential parameter update package.
[0059] This step aims to generate a relatively concise update patch, rather than a complete model file. Parameter differences refer to the differences in the values of parameters such as weights and biases at each layer between the student model and the current edge model. The differential parameter update package only contains these changed parameter values and their location indices, and its data volume is much smaller than the entire model, achieving a lightweight update package.
[0060] In a common implementation, after step S15 of this embodiment, there is also an edge model update step S16: sending the differential parameter update package to the corresponding edge computing device to update the local edge model.
[0061] The cloud uses a secure link to precisely distribute differential update packets to the edge devices that reported the corresponding difficult cases. After receiving the update packets, the edge devices merge them with their local models to silently and quickly complete the model upgrade. The entire process has minimal impact on the normal business operations of the edge devices and does not consume a large amount of network bandwidth.
[0062] The above steps S15-S16 minimize the network transmission overhead of model iteration through the differential update mechanism, making it possible to perform frequent and timely model updates for large-scale charging station networks, and greatly reducing operation and maintenance costs.
[0063] This invention achieves accurate summarization and integration of unknown security events by receiving and clustering difficult example samples from multiple edge devices, ensuring the purity of incremental learning tasks from the source and improving the efficiency and quality of model learning new knowledge. Secondly, based on the elastic weight consolidation mechanism, constrained incremental training of the cloud-based teacher model is performed, fundamentally avoiding the catastrophic forgetting of old knowledge when learning new knowledge, ensuring the continuity and reliability of the system's recognition ability. Finally, through knowledge distillation and differential update package technology, new knowledge from the large cloud model is efficiently transferred and refined into small update packages suitable for edge devices, greatly reducing network transmission load and making frequent, timely, and silent model iteration possible, achieving efficient and lossless model updates under cloud collaboration.
[0064] Second embodiment: Please refer to Figure 7 As shown, the present invention also provides a cloud-based collaborative incremental learning system 100 for charging station security events, applied in a cloud environment communicating with edge computing devices of multiple charging stations, comprising: The receiving module 110 is used to receive difficult example samples uploaded from the edge computing devices of the plurality of charging stations; Processing module 120 is used to perform cluster analysis on the received difficult sample and merge samples belonging to the same potential event type into an incremental learning batch; Training module 130 is used to incrementally train the teacher model in the cloud based on the incremental learning batches, under the constraint of the elastic weight consolidation mechanism. The knowledge distillation module 140 is used to transfer the target knowledge data corresponding to the incrementally trained teacher model to the lightweight student model through knowledge distillation technology. The generation module 150 is used to calculate the parameter differences between the student model and the edge model currently running on the edge computing device, and generate a differential parameter update package.
[0065] The modules in this embodiment are the same as the corresponding steps in the first embodiment described above, and will not be repeated here.
[0066] This invention achieves accurate summarization and integration of unknown security events by receiving and clustering difficult example samples from multiple edge devices, ensuring the purity of incremental learning tasks from the source and improving the efficiency and quality of model learning new knowledge. Secondly, based on the elastic weight consolidation mechanism, constrained incremental training of the cloud-based teacher model is performed, fundamentally avoiding the catastrophic forgetting of old knowledge when learning new knowledge, ensuring the continuity and reliability of the system's recognition ability. Finally, through knowledge distillation and differential update package technology, new knowledge from the large cloud model is efficiently transferred and refined into small update packages suitable for edge devices, greatly reducing network transmission load and making frequent, timely, and silent model iteration possible, achieving efficient and lossless model updates under cloud collaboration.
[0067] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0068] This invention also provides a computer storage medium storing a computer program that, when executed by a processor, implements the cloud-based collaborative incremental learning method for charging station safety events as described in the above embodiments.
[0069] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the cloud-based collaborative incremental learning method for charging station safety events described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0070] Alternatively, if the integrated units of the present invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, terminal, or network device, etc.) to execute all or part of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, RAM, ROM, magnetic disks, or optical disks.
[0071] Corresponding to the computer storage medium described above, one embodiment also provides a computer device, which includes 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 cloud-based collaborative incremental learning method for charging station safety events as described in the above embodiments.
[0072] This computer device can be a terminal, and its internal structure diagram can be as follows: Figure 8As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a cloud-based collaborative incremental learning method for charging station safety events. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0073] This invention achieves accurate summarization and integration of unknown security events by receiving and clustering difficult example samples from multiple edge devices, ensuring the purity of incremental learning tasks from the source and improving the efficiency and quality of model learning new knowledge. Secondly, based on the elastic weight consolidation mechanism, constrained incremental training of the cloud-based teacher model is performed, fundamentally avoiding the catastrophic forgetting of old knowledge when learning new knowledge, ensuring the continuity and reliability of the system's recognition ability. Finally, through knowledge distillation and differential update package technology, new knowledge from the large cloud model is efficiently transferred and refined into small update packages suitable for edge devices, greatly reducing network transmission load and making frequent, timely, and silent model iteration possible, achieving efficient and lossless model updates under cloud collaboration.
[0074] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0075] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A cloud-based collaborative incremental learning method for charging station safety events, characterized in that, Cloud-based applications for communicating with edge computing devices at multiple charging stations include: Receive difficult example samples uploaded from the edge computing devices of the multiple charging stations; Cluster analysis is performed on the received difficult case samples, and samples belonging to the same potential event type are merged into an incremental learning batch; Based on the incremental learning batches, the teacher model in the cloud is incrementally trained under the constraint of the elastic weight consolidation mechanism. The target knowledge data corresponding to the incrementally trained teacher model is transferred to the lightweight student model through knowledge distillation technology. Calculate the parameter differences between the student model and the edge model currently running on the edge computing device, and generate a differential parameter update package.
2. The method as described in claim 1, characterized in that, The difficult example samples are determined by the edge computing device in the following way: The main AI model obtains the real-time video stream captured by the monitoring camera of the charging station and decodes the target video frame to be analyzed from the real-time video stream based on the confidence level. On the edge computing device, an anomaly detector based on a convolutional autoencoder is run in parallel to process the target video frame and obtain the reconstructed frame corresponding to the target video frame. Calculate the reconstruction error between the target video frame and the reconstructed frame, and dynamically update the judgment threshold based on the statistical value of the historical reconstruction error; When the reconstruction error exceeds the judgment threshold, the current target video frame is determined to be the difficult sample.
3. The method as described in claim 2, characterized in that, The process of acquiring real-time video streams captured by the monitoring cameras of the charging station, and the main AI model decoding the target video frames to be analyzed from the real-time video streams based on confidence levels, includes: Acquire real-time video streams captured by the monitoring cameras of the charging station; Synchronously collect IoT sensor data from the charging station. The IoT sensor data includes at least charging pile power data, charging pile temperature data, ambient humidity data, and smoke sensor readings. The static risk profile data of the charging station is retrieved from the backend of the charging station system. The static risk profile data includes at least the station level, equipment type, service life of each piece of equipment, historical failure frequency and surrounding environment attributes. Based on the key frames of the real-time video stream, the IoT sensor data of the charging station, and the static risk profile data, joint reasoning is performed to output the accident confidence level; When the confidence level of the accident is lower than a preset confidence threshold, the target video frame to be analyzed is decoded from the real-time video stream. The target video frame includes keyframes.
4. The method as described in claim 3, characterized in that, The step of calculating the reconstruction error between the target video frame and the reconstructed frame, and dynamically updating the judgment threshold based on the statistical value of historical reconstruction errors, includes: Calculate the mean square error of each pixel between the target video frame and the reconstructed frame, and use it as the reconstruction error; Obtain the historical reconstruction error sequence within a preset time window, and calculate the mean μ and standard deviation σ of the sequence; The current judgment threshold τ is dynamically calculated based on the formula τ=μ+k·σ, where k is an adjustable coefficient set according to the resource status of the edge computing device and the requirements for early warning sensitivity.
5. The method as described in claim 1, characterized in that, The step of performing cluster analysis on the received difficult sample and merging samples belonging to the same potential event type into an incremental learning batch includes: The received difficult sample data is standardized and preprocessed to eliminate data bias caused by differences in acquisition equipment or environment; A pre-trained feature extraction network is used to extract high-level semantic feature vectors from pre-processed hard example samples. Based on the risk level of charging station safety events, the semantic feature vector is assigned a corresponding priority weight to obtain a weighted feature vector. Unsupervised clustering of the weighted feature vectors is performed using a clustering algorithm. All hard examples within the same cluster are merged into an incremental learning batch, and the batch is assigned a cluster label that represents the potential event type.
6. The method as described in claim 1, characterized in that, Based on the incremental learning batches, the teacher model in the cloud is incrementally trained under the constraint of the elastic weight consolidation mechanism, including: Before performing the first incremental learning, the teacher model is trained on the charging station basic safety dataset, and its model parameters are saved as baseline anchors. ; Calculate the Fisher information matrix F of each parameter of the teacher model with respect to the base dataset, where the diagonal elements of the matrix are... Characterization parameters The importance of previously learned tasks; According to the formula: , Determine the incremental learning loss function L, where The standard cross-entropy loss is given by λ, where λ is the regularization strength coefficient. The teacher model is iteratively trained using the incremental learning batches with the objective of minimizing the loss function L.
7. The method as described in claim 6, characterized in that, The target knowledge data corresponding to the incrementally trained teacher model is transferred to the lightweight student model using knowledge distillation techniques, including: The parameters of the incrementally trained teacher model are fixed; The lightweight student model is constructed with fewer network parameters than the teacher model. Construct a distillation loss function, which is a weighted average of hard-labeled loss and soft-labeled loss, wherein: The hard label loss is the cross-entropy between the student model prediction result and the true label of the incremental learning batch. The soft label loss is the KL divergence between the logic layer results output by the student model and the logic layer results output by the teacher model. Using the incremental learning batches, with the goal of minimizing the distillation loss function, the lightweight student model is trained to complete knowledge transfer.
8. A cloud-based collaborative incremental learning system for charging station safety events, characterized in that, Cloud-based applications for communicating with edge computing devices at multiple charging stations include: The receiving module is used to receive hard example samples uploaded from the edge computing devices of the multiple charging stations; The processing module is used to perform cluster analysis on the received difficult sample and merge samples belonging to the same potential event type into an incremental learning batch; The training module is used to incrementally train the teacher model in the cloud based on the incremental learning batches, under the constraint of the elastic weight consolidation mechanism. The knowledge distillation module is used to transfer the target knowledge data corresponding to the incrementally trained teacher model to the lightweight student model through knowledge distillation technology. The generation module is used to calculate the parameter differences between the student model and the edge model currently running on the edge computing device, and generate a differential parameter update package.
9. A computer 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 computer program, it implements the cloud-based collaborative incremental learning method for charging station safety events as described in any one of claims 1 to 7.
10. A computer storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the cloud-based collaborative incremental learning method for charging station safety events as described in any one of claims 1 to 7.