Garbage classification and placement behavior recognition method and system based on AI algorithm
Through the improved feature extraction algorithm and multi-branch deep neural network model, combined with edge-cloud collaborative computing and reinforcement learning, the problem of low accuracy in garbage disposal behavior recognition in the existing technology is solved, and efficient and accurate garbage classification recognition effect is achieved.
Patent Information
- Application Number
- CN202411529013.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-30
AI Technical Summary
Existing AI-based garbage classification and identification systems are difficult to accurately capture and identify garbage disposal behavior, especially under the influence of environmental factors such as lighting changes and occlusion, resulting in low recognition accuracy.
An improved simulated feature point selection algorithm is used, combined with the second-order channel attention mechanism and regional space fusion module, feature extraction and behavioral representation of garbage disposable video data. Multi-branched deep neural networks are used as behavior classification model, including graph attention mechanisms and multi-task learning strategies, and optimize the model through edge-cloud collaborative computing and reinforcement learning.
It significantly improves the identification accuracy and efficiency of garbage disposal behavior, enhances the discriminant and robustness of feature representation, improves the generalization ability and real-time performance of the model, and achieves continuous optimization and adaptability improvement of the model.
Smart Images

Figure CN119049133B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of AI behavior recognition technology, and in particular to a method and system for identifying garbage classification and delivery behavior based on an AI algorithm. Background Art
[0002] Traditional garbage sorting methods often rely on manual supervision and management, which is inefficient and prone to errors. In recent years, the rapid development of artificial intelligence technology has provided new ideas and methods to solve this problem.
[0003] Despite this, the current AI-based garbage classification and recognition system still faces many challenges. Garbage disposal behaviors are highly diverse and complex, and traditional computer vision algorithms have difficulty accurately capturing and identifying these behaviors. Environmental factors such as lighting changes and occlusions can affect the accuracy of recognition. Summary of the invention
[0004] The present invention provides a method and system for identifying garbage classification and delivery behavior based on an AI algorithm, which is used to accurately identify garbage classification and delivery behavior, and has real-time and scalability, thereby improving the efficiency and accuracy of garbage classification.
[0005] In a first aspect, the present invention provides a method for identifying garbage classification and delivery behavior based on an AI algorithm, and the method for identifying garbage classification and delivery behavior based on an AI algorithm comprises:
[0006] Collect and preprocess the garbage disposal video data to obtain a preprocessed data set;
[0007] Performing data exploration and augmentation processing on the preprocessed data set to obtain an extended data set;
[0008] An improved simulated feature point selection algorithm is adopted, and a second-order channel attention mechanism and a regional space fusion module are introduced to perform feature extraction and behavior characterization on the extended data set to obtain a behavior feature vector;
[0009] Constructing and training a behavior classification model according to the behavior feature vector to obtain a trained classification model, wherein the behavior classification model is a multi-branch deep neural network including a graph attention mechanism and a multi-task learning strategy;
[0010] Performing global re-detection and long-term behavior recognition based on the trained classification model to obtain a behavior recognition result;
[0011] Based on the behavior recognition results, edge-cloud collaborative computing and reinforcement learning are performed on the trained classification model to obtain a target classification model.
[0012] In a second aspect, the present invention provides a garbage classification and delivery behavior recognition system based on an AI algorithm, and the garbage classification and delivery behavior recognition system based on an AI algorithm includes:
[0013] The acquisition module is used to collect and preprocess the garbage disposal video data to obtain a preprocessed data set;
[0014] A processing module, used for performing data exploration and augmentation processing on the preprocessed data set to obtain an extended data set;
[0015] An extraction module, used to use an improved simulation feature point selection algorithm, and introduce a second-order channel attention mechanism and a regional space fusion module to perform feature extraction and behavior representation on the extended data set to obtain a behavior feature vector;
[0016] A training module, used to construct and train a behavior classification model according to the behavior feature vector to obtain a trained classification model, wherein the behavior classification model is a multi-branch deep neural network including a graph attention mechanism and a multi-task learning strategy;
[0017] A recognition module, used for performing global re-detection and long-term behavior recognition based on the trained classification model to obtain a behavior recognition result;
[0018] The computing module is used to perform edge-cloud collaborative computing and reinforcement learning on the trained classification model based on the behavior recognition results to obtain a target classification model.
[0019] The third aspect of the present invention provides a garbage classification and delivery behavior recognition device based on an AI algorithm, comprising: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory so that the garbage classification and delivery behavior recognition device based on the AI algorithm executes the above-mentioned garbage classification and delivery behavior recognition method based on the AI algorithm.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the above-mentioned garbage classification and placement behavior identification method based on AI algorithm.
[0021] In the technical solution provided by the present invention, the quality and diversity of training data are significantly improved by using a non-local mean algorithm for adaptive denoising and contrast enhancement, combining a generative adversarial network and a three-dimensional convolutional autoencoder for data augmentation, and the improved simulated feature point selection algorithm combined with a second-order channel attention mechanism and a regional space fusion module can more effectively capture the spatiotemporal characteristics of garbage disposal behavior and improve the discriminability and robustness of feature representation. A multi-branch deep neural network containing a graph attention mechanism and a multi-task learning strategy is used as a behavior classification model, which can handle multiple related tasks at the same time, thereby improving the generalization ability and recognition accuracy of the model. By performing temporal consistency processing and global re-detection on the initial classification results, combined with long-term behavior template matching, short-term misclassification phenomena are effectively reduced, and the accuracy of long-term behavior recognition is improved. The edge-cloud collaborative computing strategy is adopted, combined with reinforcement learning for model optimization, which not only improves the real-time performance of the system, but also can dynamically adjust task allocation according to actual application scenarios, thereby achieving continuous optimization and adaptability improvement of the model.
[0022] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0023] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of an embodiment of a method for identifying garbage classification and delivery behavior based on an AI algorithm in an embodiment of the present invention;
[0025] Figure 2 This is a schematic diagram of an embodiment of a garbage classification and delivery behavior recognition system based on an AI algorithm in an embodiment of the present invention;
[0026] Figure 3 This is a schematic diagram of an embodiment of a garbage classification and delivery behavior recognition device based on an AI algorithm in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device end including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or device ends.
[0029] To facilitate understanding of this embodiment, a method for identifying garbage classification and placement behavior based on an AI algorithm disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps:
[0030] 101. Collect and preprocess the garbage disposal video data to obtain a preprocessed data set;
[0031] It is understandable that the execution subject of the present invention may be a garbage classification and placement behavior recognition system based on an AI algorithm, or may be a terminal or a server, which is not specifically limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0032] Specifically, high-definition smart cameras are used to collect videos of garbage disposal points around the clock, and every action and scene of garbage disposal is captured comprehensively and in real time to obtain video data of garbage disposal. The video data of garbage disposal is timestamped and associated with geographic location information to generate tagged video data. The timestamp tag is used to locate the specific time when each disposal behavior occurs, and the geographic location information helps to clarify the corresponding disposal location of each video data, enhancing the traceability and management efficiency of the data. The tagged video data is segmented based on the scene change detection algorithm. The scene change detection algorithm can automatically identify scene changes in the video, such as the start and end of the disposal action, and divide the continuous disposal actions into independent video clips. The non-local mean algorithm is used to dynamically adjust the search window size and filter strength according to the video content to perform adaptive denoising. The algorithm can dynamically adjust the denoising parameters according to the content characteristics of different video clips, effectively remove the noise in the video, and obtain the denoised video clips. The denoised video clips are contrast enhanced to highlight the key details in the disposal behavior, especially in poor light or blurred conditions, which helps the AI algorithm to more accurately identify the actions and behaviors of garbage disposal. The enhanced video clips are processed in a unified data format to ensure that all video clips meet the requirements of subsequent algorithm processing and obtain the preprocessed data set.
[0033] 102. Perform data exploration and augmentation processing on the preprocessed data set to obtain an extended data set;
[0034] Specifically, a time series analysis is performed on the preprocessed data set to calculate the frequency distribution and periodic characteristics of garbage placement behavior. By analyzing the placement time in the video data, a time feature matrix is established to summarize the time laws and patterns of placement behavior, such as high-frequency or low-frequency placement activities in a specific time period. Based on the time feature matrix, a stratified sampling is performed on the preprocessed data set, and the data is divided into three subsets of high frequency, medium frequency and low frequency according to the frequency of placement. Through stratified sampling, the placement behavior in the data set is representative and covers the placement characteristics under different frequencies. An optical flow-based motion estimation algorithm is applied to each video clip in the stratified data subset. The algorithm captures the motion characteristics in the garbage placement behavior by calculating the pixel-level motion vector field, generates a motion feature map, and reveals the direction and intensity of the motion in the placement behavior. According to the generated motion feature map, a cluster analysis is performed on the stratified data subset, different placement behaviors are divided into multiple types, and behavior type labels are generated to identify and classify the diversity of placement behaviors. A generative adversarial network is applied to the stratified data subset with behavior type labels to generate synthetic video clips consistent with the original data distribution, and the first data set is obtained. Generative adversarial networks can generate realistic synthetic video clips through adversarial training, expand the scale of the data set, and ensure that the generated video clips are consistent with the original data in distribution, thereby enhancing the model's ability to recognize different delivery behaviors. The first data set is input into a three-dimensional convolutional autoencoder, and the video clips are reconstructed and interpolated to generate a sequence of delivery behaviors in the intermediate state to obtain a second data set. The three-dimensional convolutional autoencoder can capture the spatiotemporal features in the video, and through interpolation operations, it can generate more delivery behavior data with transition states, so that the model can learn the dynamic process of behavior changes. In order to enhance the diversity of the data, data enhancement techniques are applied to the second data set, including random cropping, rotation, flipping, and adding Gaussian noise. These data enhancement techniques simulate delivery behaviors in different environments by randomly changing the appearance of the video clips, increase the robustness of the model in processing different scenarios, and generate diverse data variants. The diverse data variants are merged with the preprocessed data set, and the data quality is evaluated by cross-validation methods, and those low-quality samples are eliminated to obtain a high-quality extended data set.
[0035] 103. An improved simulation feature point selection algorithm is used, and a second-order channel attention mechanism and a regional spatial fusion module are introduced to extract features and characterize behaviors of the extended data set to obtain a behavior feature vector;
[0036] Specifically, the improved simulated feature point selection algorithm is applied to each video clip in the extended dataset, and the initial feature point set is obtained by calculating the local response function and the global consistency constraint. The role of the local response function is to capture the salient feature points in the video clip, while the global consistency constraint ensures the consistency and continuity of the selected feature points in the entire video clip, and generates a representative initial feature point set. A multi-scale pyramid structure is constructed based on the initial feature point set, and a multi-scale feature descriptor is generated by extracting local features using SIFT descriptors for each scale layer. The multi-scale feature descriptor is subjected to dimensionality reduction processing to reduce the feature dimension and reduce the computational complexity, while retaining the most discriminative feature information to obtain a reduced-dimensional feature matrix. The reduced-dimensional feature matrix is input into the second-order channel attention module. In this module, the channel attention map is generated by calculating the covariance matrix and feature importance weights between feature channels. The calculation of the covariance matrix helps capture the dependency between channels, while the feature importance weights highlight those feature channels that are more critical to the identification of garbage disposal behavior by weighting the relationship between channels. The channel attention map and the reduced-dimensional feature matrix are element-by-element multiplied to generate a channel-enhanced feature representation. By combining the weight information of the attention map, the key information in the feature matrix is strengthened and the expression of the features is optimized. The channel-enhanced feature representation is input into the regional spatial fusion module. In this module, multi-scale spatial feature maps are generated through adaptive receptive field and multi-path feature aggregation. Adaptive receptive field allows the model to automatically adjust the size of the receptive field according to the characteristics of the input data and capture behavioral information in different spatial ranges; multi-path feature aggregation integrates features from different scales through multiple feature fusion paths to ensure that the model can fully utilize multi-scale information for behavior recognition. Convolution and pooling operations are performed on the multi-scale spatial feature map to generate a spatiotemporal feature sequence. The convolution operation extracts local features in the spatiotemporal dimension, while pooling is used to reduce dimensionality and aggregate important information to reduce redundant data. The spatiotemporal feature sequence is vectorized to obtain a behavioral feature vector.
[0037] Each video clip is decomposed into multiple scales to generate image pyramids of different scales, capturing the detailed information of the delivery behavior at each resolution level. Each layer in the image pyramid represents a different scale. Harris corner detection is applied to each scale layer, and the corner response value of each pixel is calculated to generate a corner response matrix. Harris corner detection identifies feature points in the image by analyzing local grayscale changes, that is, those pixels with significant changes in the local area. Based on the corner response matrix, non-maximum suppression is performed on each scale layer of the image pyramid. By screening the local maximum points and excluding non-significant feature points, a more representative preliminary feature point set is obtained. Non-maximum suppression helps to filter out noise points in the background, so that the feature point set is more focused on the actual delivery behavior related areas. Local descriptors are calculated for each feature point in the preliminary feature point set to generate binary feature descriptors. Binary feature descriptors are a concise and efficient feature representation method that reduces computational complexity while retaining sufficient distinguishability by encoding the local information of feature points into binary form. Feature descriptor sets are constructed based on binary feature descriptors. Based on the feature descriptor set, cross-scale feature matching operations are performed to establish feature correspondences at different scales to ensure that the same feature point can be correctly associated in multi-scale images. Cross-scale feature matching is particularly important for situations where the size of objects in the video changes or the perspective changes, because it can ensure that the feature points in different scenes are always consistent. Based on the cross-scale feature correspondence, the global consistency constraint is calculated. By analyzing the relative relationship of feature points at different scales and spatial positions, the selected feature point set is ensured to have global consistency. The calculation of the global consistency constraint helps to eliminate those isolated or mismatched feature points, thereby optimizing the selection of feature points and obtaining the processed feature point set. The processed feature point set is analyzed for temporal continuity and spatial correlation. By analyzing the changes of feature points in time and space dimensions, it is ensured that the selected feature points are not only significant in a single frame image, but also maintain spatiotemporal consistency in the entire video clip, and a spatiotemporal consistent feature point sequence is obtained. Based on the spatiotemporal consistent feature point sequence, the motion trajectory and local deformation of the feature points are calculated to obtain the initial feature point set. The motion trajectory of the feature points can reflect the dynamic changes of garbage disposal behavior, while the local deformation helps to capture subtle behavioral differences.
[0038] 104. Construct and train a behavior classification model based on the behavior feature vector to obtain a trained classification model. The behavior classification model is a multi-branch deep neural network that includes a graph attention mechanism and a multi-task learning strategy.
[0039] Specifically, the behavior feature vector is segmented in time series, and the behavior feature vector is converted into a time series feature sequence of fixed length. The time series feature sequence is input into the spatiotemporal graph convolutional network, and the spatiotemporal relationship in the behavior features is extracted through multi-layer graph convolution operations to generate graph feature representation. The spatiotemporal graph convolutional network consists of three graph convolution layers, each of which uses the ChebNet convolution kernel, and a graph pooling operation is added after each layer to reduce the complexity and parameter amount of the graph. The ChebNet convolution kernel can efficiently capture the spatiotemporal relationship between different feature points, helping the model understand the dynamic changes in garbage disposal behavior. A multi-head self-attention mechanism is applied to the graph feature representation to calculate the correlation between different time steps. Through 8 independent attention heads, the model calculates the linear projection of the query, key, and value respectively, which helps to capture the correlation features of the disposal behavior at different time points and generate an attention-weighted feature matrix. The multi-head self-attention mechanism enhances the flexibility and accuracy of the model in processing complex time series data by processing multiple feature dimensions in parallel. The attention-weighted feature matrix is input into the multi-branch convolutional neural network. The network consists of four parallel branches, each of which corresponds to a behavior classification task and processes it independently. Each branch includes three convolutional layers and two fully connected layers. Through this structure, the model can extract specific features for different behavior tasks and generate multi-task feature representations. The multi-branch structure ensures that the model can maintain high classification accuracy when processing a variety of garbage disposal behaviors. The cross-task attention module is applied to the generated multi-task feature representation to learn the correlation between different tasks and obtain the task interaction features. The cross-task attention module calculates the similarity matrix between different task pairs through bilinear pooling operations to capture the mutual influence between multiple behavior tasks. The task interaction features are input into the dynamic weight network, which adaptively adjusts the weight of each task according to the input features to obtain weighted task features. The dynamic weight network consists of two fully connected layers. The output layer uses the softmax function to normalize the task weights and dynamically allocates computing resources according to the importance of each task. The weighted task features are discretized to convert continuous features into discrete behavior category probability distributions to obtain the initial classification results. By converting complex feature vectors into specific classification labels, the model can make a preliminary classification of the garbage disposal behavior in each video clip. Based on the initial classification results, the label dependency between adjacent time steps is modeled, and sequence smoothing operations are performed to capture the time dependency between consecutive disposal behaviors and prevent the classification results from changing too frequently, thereby improving the stability and accuracy of the classification. The trained classification model is obtained, which can effectively identify and classify garbage disposal behaviors and adapt to different scenarios and task requirements.
[0040] The temporal feature sequence is constructed as a spatiotemporal graph structure. The features of each time step are represented as nodes in the graph, and edge connections are established based on temporal and spatial proximity to obtain the initial graph representation, so that the temporal and spatial associations between each feature point can be captured through the graph structure. The first layer of graph convolution operation is performed on the initial graph representation, and the local feature aggregation of each node is calculated using the K-order ChebNet polynomial kernel function. By setting K to 3, ChebNet can capture the third-order neighborhood information of each node, that is, not only the features of the local node can participate in the calculation, but also the features of the neighboring nodes around it can be integrated into the feature representation of the node. The local feature aggregation operation can effectively extract the local dependencies of the delivery behavior in time and space, and generate the first layer of graph convolution output. Based on the first layer of graph convolution output, the graph pooling operation is performed, and the graph nodes are clustered and merged to reduce the number of nodes and obtain the downsampled graph structure. The second layer of graph convolution operation is performed on the downsampled graph structure. In this layer, the recursive ChebNet convolution kernel is used to calculate the high-order relationship between nodes. The recursive depth is set to 2, which means that the convolution kernel can recursively capture the features of two or more node neighborhoods and extract more levels of spatiotemporal relationships. By extracting high-order relationships, deep behavioral features across multiple time steps and spatial regions are obtained to generate the second-layer graph convolution output. Based on the second-layer graph convolution output, adaptive graph pooling is performed. According to the importance score of the node, the pooling ratio is dynamically adjusted to perform more flexible downsampling of the graph structure. Adaptive pooling allows nodes that are more distinctive or important in behavior recognition to be retained, while unimportant nodes are merged or eliminated. The third-layer graph convolution operation is performed on the adaptively downsampled graph structure, and the global graph representation is calculated using the attention-enhanced ChebNet convolution kernel. By introducing node-level and edge-level attention mechanisms, the model can pay more attention to the nodes and edge information that are important for the delivery behavior, improving the representation ability of graph features. The attention mechanism assigns different weights to different nodes and edges, making the model more efficient and accurate in processing complex spatiotemporal relationships. Based on the third-layer graph convolution output, global graph pooling is performed. This operation uses a hierarchical attention mechanism to perform weighted aggregation on graph representations of different scales. By integrating graph features from multiple scales in a hierarchical weighted manner, the model can capture the globality and locality of behavioral features and obtain multi-scale graph features. Multi-scale graph features are fused and normalized to ensure that graph features remain consistent and comparable in different dimensions, generating the final graph feature representation.
[0041] 105. Perform global re-detection and long-term behavior recognition based on the trained classification model to obtain behavior recognition results;
[0042] Specifically, the long-time video data of the garbage disposal site is obtained, and the long-time video data is divided into time windows to obtain multiple short-time video clips. The short-time video clips are input into the trained classification model to obtain the initial classification results. The initial classification results are processed for temporal consistency, and the jumps or mutations of short-time behaviors are eliminated by smoothing operations to generate smoothed behavior sequences. The long-time behavior units are divided based on the smoothed behavior sequences. By analyzing the continuous behavior clips in the video, different behavior units are identified and a preliminary long-time behavior representation is generated. The preliminary long-time behavior representation is globally re-detected to identify potential misclassified areas, locate those areas with inaccurate classification or disturbed behavior continuity, and mark the target areas that need to be re-detected. The re-detected target area is locally finely classified, the behavior labels of the corresponding areas are updated, and a more accurate long-time behavior representation is generated. The corrected long-time behavior representation is matched with a predefined long-time behavior template. The predefined template represents a typical garbage disposal behavior pattern. The identified behavior is compared with the existing behavior pattern through the matching process to generate a long-time behavior recognition result. In order to improve the reliability of the recognition results, the long-term behavior recognition results are subjected to short-term noise removal and similar behavior merging. Short-term noise removal is used to eliminate those short-term burst misclassifications to avoid their impact on the overall recognition results; similar behavior merging integrates adjacent and similar behaviors to optimize the performance of the results and ultimately generate garbage placement behavior recognition results.
[0043] 106. Based on the behavior recognition results, edge-cloud collaborative computing and reinforcement learning are performed on the trained classification model to obtain the target classification model.
[0044] Specifically, the credibility of the behavior recognition results is evaluated. By evaluating the credibility of the classification results, samples with low credibility are screened out to construct a sample set to be optimized. The sample set to be optimized is allocated to the garbage classification device and the cloud server for collaborative computing task division. By formulating a task allocation plan, computing tasks are effectively allocated between edge devices and cloud servers to ensure the optimal use of computing resources. The task allocation process takes into account the computing power, bandwidth, and data transmission delay of the device to ensure that the edge device and the cloud server can work together efficiently. According to the task allocation plan, feature extraction and preliminary classification are performed on the garbage classification device. The edge device quickly generates preliminary classification results by performing lightweight feature extraction tasks, and then transmits the edge classification results to the cloud server. The cloud server uses its computing power to further process the data, and fuses the results transmitted by the edge device with the prediction results of the cloud model to generate a comprehensive classification result. Through the combination of edge and cloud, the system can give full play to the respective advantages of edge and cloud to improve the accuracy and efficiency of overall classification. Based on the obtained comprehensive classification results, a reinforcement learning reward function is constructed. The design of the reward function is based on the accuracy of classification and the efficiency of resource utilization, and defines the state space and action space in reinforcement learning. The state space includes the classification results of the current model and its credibility evaluation, while the action space involves how to adjust the model parameters and task allocation strategy. In the constructed reinforcement learning environment, the trained classification model is optimized. By continuously interacting with the environment, the reinforcement learning algorithm can optimize the classification strategy of the model according to the reward function, update the model parameters, and gradually improve the performance of the model. The continuous learning and optimization process ensures that the model can continue to improve in the face of complex garbage disposal scenarios and obtain an optimized classification model. After reinforcement learning is completed, the optimized classification model is deployed to the garbage classification device for online reasoning testing. In this process, the system can evaluate the actual performance of the model in real time and perform performance evaluation based on the reasoning results of the garbage disposal device. By monitoring the performance of the model in real time, the classification effect of the model and the resource usage of the device are obtained. Based on the real-time performance evaluation results, the edge-cloud task allocation strategy is dynamically adjusted. The computing process of edge-cloud collaboration is continuously optimized through feedback loops to ensure that the system can always run efficiently when dealing with different types of garbage disposal behaviors. The target classification model is obtained, which not only has high accuracy, but also can flexibly adapt to the computing needs in different scenarios, ensuring the best coordination between garbage classification equipment and cloud servers.
[0045] In the embodiment of the present invention, the quality and diversity of training data are significantly improved by using a non-local mean algorithm for adaptive denoising and contrast enhancement, combining a generative adversarial network and a three-dimensional convolutional autoencoder for data augmentation, and the improved simulated feature point selection algorithm combined with a second-order channel attention mechanism and a regional space fusion module can more effectively capture the spatiotemporal characteristics of garbage disposal behavior and improve the discriminability and robustness of feature representation. A multi-branch deep neural network containing a graph attention mechanism and a multi-task learning strategy is used as a behavior classification model, which can handle multiple related tasks at the same time, thereby improving the generalization ability and recognition accuracy of the model. By performing temporal consistency processing and global re-detection on the initial classification results, combined with long-term behavior template matching, short-term misclassification phenomena are effectively reduced, and the accuracy of long-term behavior recognition is improved. The edge-cloud collaborative computing strategy is adopted, combined with reinforcement learning for model optimization, which not only improves the real-time performance of the system, but also can dynamically adjust task allocation according to actual application scenarios, thereby achieving continuous optimization and adaptability improvement of the model.
[0046] In a specific embodiment, the process of executing step 101 may specifically include the following steps:
[0047] Use high-definition smart cameras to collect video of garbage disposal points around the clock to obtain garbage disposal video data;
[0048] Timestamp the garbage disposal video data and associate it with the geographic location information to obtain the marked video data;
[0049] Performing video segmentation on the marked video data based on a scene change detection algorithm, dividing the continuous delivery behavior into independent video segments, and obtaining multiple video segments;
[0050] The non-local means algorithm is used to dynamically adjust the search window size and filter strength according to the video content, and multiple video clips are adaptively denoised to obtain the denoised video clips;
[0051] Performing contrast enhancement processing on the denoised video clip to obtain an enhanced video clip;
[0052] The enhanced video clips are processed into a unified data format to obtain a preprocessed data set.
[0053] Specifically, high-definition intelligent cameras are used to collect video of garbage disposal points around the clock, and garbage disposal behaviors are continuously recorded to obtain garbage disposal video data. The garbage disposal video data is timestamped and associated with geographic location information to obtain labeled video data. By embedding timestamp information in each frame of video data, it is ensured that subsequent analysis can accurately identify the specific time when the disposal behavior occurs. Geographic location information is associated through the camera's positioning device or preset position, and each disposal point has its unique geographic identifier. By combining time and location, garbage disposal behaviors in different areas can be effectively monitored and managed. Video segmentation is performed on the labeled video data based on the scene change detection algorithm, and continuous disposal behaviors are divided into independent video clips to obtain multiple video clips. Scene change detection is based on background modeling and foreground change detection. The background is modeled. When a large change is detected in the foreground, such as someone approaching the trash can and making a disposal action, these changes are recorded as a new event segment. It can be expressed in terms of formula:
[0054] ;
[0055] in, It's in time Moment Pixel The change detection value of represents the foreground pixel value in the video frame, and Represents the background pixel value. By calculating The value of determines whether the scene has changed, and thus decides whether to segment the video. The continuous delivery behavior is divided into multiple independent video clips, each of which corresponds to a complete garbage delivery process. Adaptive denoising is performed on multiple video clips. The non-local mean algorithm is used to denoise by comparing the similarity between pixels. The non-local mean algorithm can dynamically adjust the size of the search window and the filter strength according to the video content. The specific denoising process can be expressed by the formula:
[0056] ;
[0057] in, Represents the denoised pixel The value of is the starting pixel value, is a parameter that controls the degree of denoising. is a normalization factor used to ensure that the weights sum to 1. In this way, the key details in the video are retained while removing unnecessary noise to obtain the denoised video clips. The denoised video clips are subjected to contrast enhancement processing to improve the visualization of the video. For example, the histogram equalization technology is used to enhance the contrast by adjusting the pixel brightness distribution. The enhanced video clips are subjected to data format unification processing to ensure that the formats of all video clips are consistent, such as resolution, frame rate, and encoding format, to obtain the preprocessed data set.
[0058] In a specific embodiment, the process of executing step 102 may specifically include the following steps:
[0059] Perform time series analysis on the preprocessed data set, calculate the frequency distribution and periodic characteristics of the delivery behavior, and obtain the time feature matrix;
[0060] Based on the time feature matrix, the preprocessed data set is stratified sampled and divided into three subsets: high frequency, medium frequency and low frequency according to the frequency of delivery, thus obtaining stratified data subsets;
[0061] Applying an optical flow-based motion estimation algorithm to each video clip in the hierarchical data subset, calculating the pixel-level motion vector field and obtaining a motion feature map;
[0062] Perform cluster analysis on the hierarchical data subsets based on the motion feature graph, classify the delivery behaviors into different types, and obtain the behavior type labels;
[0063] Applying a generative adversarial network to the hierarchical data subset with behavior type labels to generate synthetic video clips consistent with the distribution of the original data, thereby obtaining a first data set;
[0064] Input the first data set into a three-dimensional convolutional autoencoder, reconstruct and interpolate the video clips, generate a sequence of intermediate state delivery behaviors, and obtain a second data set;
[0065] Apply data augmentation techniques to the second dataset, including random cropping, rotation, flipping, and adding Gaussian noise to obtain diverse data variants;
[0066] The diverse data variants are merged with the preprocessed dataset, and the data quality is evaluated through cross-validation method, and low-quality samples are eliminated to finally obtain the extended dataset.
[0067] Specifically, we conduct an in-depth time series analysis on the preprocessed data set, and calculate the frequency distribution and periodic characteristics of garbage disposal behavior from the time axis of the disposal behavior to reveal the user's garbage disposal habits. For example, a certain location may have high-frequency disposal behavior in specific time periods in the morning and evening, while it is relatively sparse in other time periods. In order to quantify these characteristics, we construct a time feature matrix to capture the frequency distribution of garbage disposal. and periodic patterns .in, Represents at time The delivery frequency within Represents the periodic changes in garbage disposal behavior. By analyzing the timestamp information of the video data, a time feature matrix is generated to help identify the disposal behavior patterns in different time periods. Based on the time feature matrix, the preprocessed data set is stratified and sampled, and the data set is divided into three subsets: high frequency, medium frequency, and low frequency according to the frequency of disposal. In the stratified data subset, for each video clip, the motion estimation algorithm based on optical flow is applied to calculate the pixel-level motion vector field. The optical flow algorithm calculates the direction and speed of movement of the object on the time axis by tracking the pixel changes in the video frame. This motion information can be described by the following formula:
[0068] ;
[0069] in, It's in time Moment Pixel The strength value of and Is the pixel in The optical flow algorithm calculates the motion vector field of each pixel by solving this equation. Through this calculation, a motion feature map is generated to capture the dynamic changes in the delivery behavior, such as hand movement and the trajectory of garbage delivery. Based on the generated motion feature map, cluster analysis is performed on the hierarchical data subset to classify similar delivery behaviors together in order to identify different types of delivery behaviors. By applying algorithms such as K-means or hierarchical clustering, the behavior features are classified and behavior type labels are generated. The behavior type label helps the system to distinguish different types of operation modes when facing complex delivery behaviors, thereby improving the recognition accuracy. The generative adversarial network is applied to the hierarchical data subset with behavior type labels to generate synthetic video clips that are consistent with the distribution of the original data. The generative adversarial network consists of two modules: the generator and the discriminator. The generator is responsible for generating realistic fake data, while the discriminator is responsible for distinguishing the true and false data. Through this adversarial training, the generator gradually learns how to generate synthetic video clips similar to the real data, thereby expanding the scale of the data set. The first data set generated contains a large amount of synthetic data that is consistent with the distribution of the original data, which enhances the system's generalization ability for delivery behaviors in different scenarios. The first dataset is input into a 3D convolutional autoencoder for reconstruction and interpolation. The 3D convolutional autoencoder is an unsupervised learning model that can capture the spatial and temporal features in the video through the encoding and decoding process. Through the reconstruction function of the autoencoder, a sequence of intermediate state delivery behaviors is generated to capture the dynamic changes in the delivery behaviors. The interpolation function can generate transition behavior fragments that are missing in the original dataset and enrich the temporal dimension of the dataset. Data augmentation techniques are applied to the generated second dataset, and the augmentation techniques include random cropping, rotation, flipping, and adding Gaussian noise. For example, the perspective of the delivery behavior is changed by random cropping, and delivery behaviors of different angles are generated by rotation and flipping. Adding Gaussian noise can simulate the noise scene captured by the camera in reality. The diverse data variants are merged with the original preprocessed dataset to form a larger extended dataset. In order to ensure the data quality, the extended dataset is evaluated by the cross-validation method. Cross-validation divides the dataset into multiple subsets, trains and verifies the model on different subsets, and ensures the generalization performance of the model to the entire dataset. For those samples with poor performance or low data quality, they are eliminated and finally the extended dataset is obtained.
[0070] In a specific embodiment, the process of executing step 103 may specifically include the following steps:
[0071] Applying the improved simulated feature point selection algorithm to each video clip in the extended dataset, the initial feature point set is obtained by calculating the local response function and the global consistency constraint;
[0072] A multi-scale pyramid structure is constructed based on the initial feature point set, and the SIFT descriptor is used to extract local features at each scale layer to obtain a multi-scale feature descriptor;
[0073] Perform dimensionality reduction processing on the multi-scale feature descriptors to obtain a feature matrix after dimensionality reduction;
[0074] The reduced feature matrix is input into the second-order channel attention module, and the channel attention map is obtained by calculating the covariance matrix and feature importance weights between feature channels;
[0075] Multiply the channel attention map and the feature matrix after dimension reduction element by element to obtain the channel enhanced feature representation;
[0076] The channel-enhanced feature representation is input into the regional spatial fusion module, and a multi-scale spatial feature map is obtained through adaptive receptive field and multi-path feature aggregation;
[0077] Convolution and pooling operations are performed on the multi-scale spatial feature map to obtain a spatiotemporal feature sequence, which is then vectorized to obtain a behavioral feature vector.
[0078] Specifically, feature points are detected and selected for each frame of the video clip. The selection of feature points is based on the local response function and the global consistency constraint. The local response function is used to measure the significance of the local area of the image, for example, by calculating the image gradient change to find the key points in the image. The global consistency constraint ensures that the selected feature points are not only locally meaningful, but also consistent in the entire image sequence by analyzing the consistency of the feature points in the entire video clip. The local response function can be expressed by the following formula:
[0079] ;
[0080] in, It is a feature point The response value of is the image at point The autocorrelation matrix at is the determinant of the matrix, is the trace of the matrix, is an empirical constant, usually taken as . Through the response function, the salient feature areas such as corners in the image are identified. A multi-scale pyramid structure is constructed based on the initial feature point set. By decomposing the image into multiple scale levels, each level corresponds to an image of different resolution, the feature points can be detected and described at different scales. The construction of the multi-scale pyramid structure can improve the robustness of the feature points, especially when the image is scaled or rotated, the feature points can still remain stable. In each scale layer, the SIFT (Scale Invariant Feature Transform) descriptor is used to extract features. SIFT captures the unique features of an object or scene by describing the local area of the image in a scale and rotation invariant manner. The generation process of the SIFT descriptor involves analyzing the gradient direction of the area around the feature point and constructing a 128-dimensional vector to describe the features of the local area. After the local features are processed at multiple scales, a multi-scale feature descriptor is obtained, which reflects the detailed information of the image at different scales. The multi-scale feature descriptor is subjected to dimensionality reduction processing to maintain important feature information while reducing unnecessary data redundancy. For example, by using principal component analysis, the dimension of the data is reduced to a lower level without significantly losing information by retaining the principal components with larger variance in the data. After dimensionality reduction, a simplified feature matrix is obtained, which contains the most representative feature information in the video clip. The reduced feature matrix is input into the second-order channel attention module. The channel attention mechanism captures the correlation between different feature channels by calculating the covariance matrix between feature channels. The covariance matrix can reflect the linear relationship between different feature channels and is defined as follows:
[0081] ;
[0082] in, Indicates and The covariance between feature channels, and They are Sample Channel and The value of the channel, and is the mean of the corresponding channel, is the number of samples. By calculating the covariance matrix, the importance weights between channels are obtained to generate the channel attention map. The channel attention map and the feature matrix after dimension reduction are multiplied element by element to obtain the channel-enhanced feature representation. By combining the weight information in the attention map, the important feature channels are strengthened. The channel-enhanced feature representation is input into the regional spatial fusion module, which improves the expressiveness of the features through adaptive receptive field and multi-path feature aggregation. The adaptive receptive field can dynamically adjust the size of the receptive field according to the different features of the input data, ensuring that the model has flexibility in capturing local information. Multi-path feature aggregation integrates information from different scales and different regions through multiple paths to generate richer multi-scale spatial feature maps. Convolution and pooling operations are performed on the multi-scale spatial feature map to extract spatiotemporal feature sequences, including the continuity and change information of garbage disposal behavior in time and space. The convolution operation processes the image or feature map through local filters to extract higher-level features, while the pooling operation is used to downsample the features to reduce the dimension of the feature map while retaining the most important information. The spatiotemporal feature sequence is transformed into a vector, and the spatiotemporal information is mapped into a vector space of fixed length to generate a behavior feature vector.
[0083] In a specific embodiment, the execution step applies the improved simulated feature point selection algorithm to each video clip in the extended data set, and the process of obtaining the initial feature point set by calculating the local response function and the global consistency constraint may specifically include the following steps:
[0084] Perform multi-scale decomposition on each video clip to obtain image pyramids of different scales;
[0085] Perform Harris corner detection on each layer of the image pyramid, calculate the corner response value of each pixel, and obtain the corner response matrix;
[0086] Based on the corner point response matrix, non-maximum suppression is performed on each scale layer to screen the local maximum points and obtain a preliminary feature point set;
[0087] Calculate the local descriptor for each feature point in the preliminary feature point set, generate a binary feature descriptor, and construct a feature descriptor set based on the binary feature descriptor;
[0088] Perform feature matching based on feature descriptor sets to obtain cross-scale feature correspondence;
[0089] According to the cross-scale feature correspondence, the global consistency constraint is calculated to obtain the processed feature point set;
[0090] The processed feature point set is analyzed for temporal continuity and spatial correlation to obtain a temporally and spatially consistent feature point sequence;
[0091] Based on the time-space consistent feature point sequence, the motion trajectory and local deformation of the feature points are calculated to obtain the initial feature point set.
[0092] Specifically, each video clip is decomposed into multiple scales, and the Gaussian pyramid method is used to generate different scale levels by continuously performing Gaussian blur processing on the image and gradually downsampling it. The image pyramid can be expressed as ,in represents the original image, and Indicates passing The image is blurred and downsampled. Harris corner detection is performed on each layer of the image pyramid. Harris corner detection calculates the grayscale changes of the local image and finds those points with significant changes, i.e. corners. Harris corner detection constructs the autocorrelation matrix through image gradients. , and then the corner point response value is calculated by the determinant and trace of the matrix. The calculation formula of the corner point response value is:
[0093] ;
[0094] in, Represents pixels The corner point response value, is the determinant of the autocorrelation matrix, which represents the change of pixels in the local area of the image. is the trace of the matrix, representing the grayscale gradient and constant of the local area The value is usually between 0.04 and 0.06. By calculating the corner response value of each pixel, a corner response matrix is obtained. Based on the corner response matrix, non-maximum suppression is performed. By screening out the pixel with the highest response value, the local maximum point is retained, and those minor points are removed. Non-maximum suppression compares a pixel with other points in its neighborhood. If the response value of the point is not the local maximum, the point will be suppressed, and only the local maximum point will be retained to obtain a preliminary feature point set. The preliminary feature point set is locally described to capture the local information around the feature point. For each feature point, the gradient direction and intensity of the surrounding area are calculated, and this information is encoded into a binary feature descriptor. The binary feature descriptor can effectively represent the local information of the feature point and is efficient in storage and matching. Feature matching is performed based on the constructed feature descriptor set. By comparing the feature descriptors at different scales, the corresponding feature points across scales in the same scene are found. By comparing the similarity of feature descriptors, the feature correspondence across scales is identified, and the image features of different scales are unified into the same feature space. Based on the feature correspondence across scales, the global consistency constraint is calculated. By analyzing the spatial relationship between different feature points, it is ensured that the selected feature points have consistent geometric relationships in the entire image sequence. The global consistency constraint can be implemented through a geometric transformation model, such as ensuring the spatial consistency of the feature point set in different images through affine transformation or homography transformation. Through this process, the feature point selection is optimized to obtain a processed feature point set. The processed feature point set is subjected to temporal continuity and spatial correlation analysis to obtain a temporally and spatially consistent feature point sequence. By tracking the changes of feature points in the temporal dimension, it is ensured that the selected feature points have continuity in the entire video clip. The spatial correlation analysis ensures that the spatial position of the feature points remains consistent between different time frames by comparing the position changes of feature points in different frames. Based on the temporally and spatially consistent feature point sequence, the motion trajectory and local deformation of the feature points are calculated. The motion trajectory can be calculated by the optical flow algorithm, which calculates the motion path of the feature points in the time series by tracking the motion direction and speed of pixels in the video frame. The basic formula of the optical flow algorithm is:
[0095] ;
[0096] in, Indicates time Moment Pixel The gray value of and Represents the pixel at time By solving the equation, the motion trajectory of each feature point is obtained. Local deformation analysis captures the deformation characteristics of the delivery behavior by comparing the shape changes of the area around the feature point. Combining the motion trajectory and local deformation, a complete set of initial feature points is generated, which contains not only spatial features but also dynamic information in time.
[0097] In a specific embodiment, the process of executing step 104 may specifically include the following steps:
[0098] Perform time series segmentation on the behavior feature vector to obtain a time series feature sequence of fixed length;
[0099] The temporal feature sequence is input into the spatiotemporal graph convolutional network, and the spatiotemporal relationship is extracted through multi-layer graph convolution operations to obtain graph feature representation; the spatiotemporal graph convolutional network includes 3 graph convolution layers, each layer uses the ChebNet convolution kernel, and a graph pooling operation is added after each layer;
[0100] A multi-head self-attention mechanism is applied to the graph feature representation to calculate the correlation between different time steps and obtain the attention-weighted feature matrix; the multi-head self-attention mechanism contains 8 attention heads, each of which independently calculates the linear projection of the query, key, and value;
[0101] The attention-weighted feature matrix is input into a multi-branch convolutional neural network, where each branch corresponds to a behavior classification task, to obtain a multi-task feature representation; the multi-branch convolutional neural network contains 4 parallel branches, each of which contains 3 convolutional layers and 2 fully connected layers;
[0102] A cross-task attention module is applied to the multi-task feature representation to learn the correlation between different tasks and obtain the interaction features between tasks; the cross-task attention module uses a bilinear pooling operation to calculate the similarity matrix between task pairs;
[0103] The interaction features between tasks are input into the dynamic weight network, and the weight of each task is adaptively adjusted according to the input features to obtain weighted task features; the dynamic weight network consists of two fully connected layers, and the output layer uses the softmax function to normalize the task weights;
[0104] Discretize the weighted task features, convert the continuous features into discrete behavior category probability distributions, and obtain the initial classification results;
[0105] According to the initial classification results, the label dependency of adjacent time steps is modeled, and sequence smoothing is performed to finally obtain the trained classification model.
[0106] Specifically, the behavior feature vector is temporally segmented into a temporal feature sequence of a fixed length. The temporal feature sequence is input into the spatiotemporal graph convolutional network. The spatiotemporal graph convolutional network is a neural network structure for processing spatiotemporal relationships, which captures the spatiotemporal dependencies between feature points through graph convolution operations. The temporal features are represented as nodes in the graph, each node representing a specific time step. In order to extract spatiotemporal relationships, the spatiotemporal graph convolutional network uses three layers of graph convolution, each layer using the ChebNet convolution kernel. ChebNet convolution is a graph convolution kernel based on Chebyshev polynomials, which can effectively approximate the Laplace features of the graph, thereby capturing the local and global relationships between nodes in the graph. The basic formula of the ChebNet convolution kernel is:
[0107] ;
[0108] in, is the graph convolution kernel, is the input feature vector, is the normalized graph Laplacian matrix, are Chebyshev polynomials, is the weight parameter to be learned, Represents the order of the polynomial. Through this formula, the system can perform convolution operations between features at different time steps to extract spatiotemporal relationships. After each layer of graph convolution, graph pooling is performed to reduce the complexity of the graph while retaining the most important spatiotemporal features. A multi-head self-attention mechanism is applied to the graph feature representation to calculate the correlation between different time steps in the sequence. Through the multi-head mechanism, the interdependencies between features are independently calculated on different feature dimensions to generate an attention-weighted feature matrix. The multi-head self-attention mechanism captures the interactive relationship at different time steps by calculating the linear projection of the query, key, and value. The linear projection formula for query, key, and value is:
[0109] ;
[0110] in, , and represent query, key and value matrices respectively, is the dimension of the key vector, and the softmax function is used to normalize the attention weights. Through this mechanism, different attention weights are assigned to each time step, highlighting those features that are most relevant to the classification task. The multi-head self-attention mechanism contains 8 attention heads, each of which independently calculates a set of query, key, and value projections, and merges the results to obtain the final attention-weighted feature matrix. The attention-weighted feature matrix is input into a multi-branch convolutional neural network. The multi-branch convolutional neural network consists of 4 parallel branches, each responsible for handling different behavior classification tasks. For example, one branch may be responsible for identifying the beginning of garbage disposal behavior, and another branch is responsible for identifying the end of the behavior. Each branch contains 3 convolutional layers and 2 fully connected layers. The convolutional layers are used to extract high-level behavior features, while the fully connected layers are used to convert these features into task-related outputs. Through this multi-branch structure, the system can process multiple tasks in parallel and improve the recognition ability of complex behaviors. After obtaining the multi-task feature representation, the cross-task attention module is applied to learn the correlation between different tasks, thereby improving the overall classification effect. This module calculates the similarity matrix between task pairs through bilinear pooling operations. The formula for bilinear pooling is:
[0111] ;
[0112] in, and are feature vectors from different tasks, is the learned similarity matrix. By calculating the similarity, the interaction information between different tasks is captured, and more accurate task interaction features are generated. The task interaction features are input into the dynamic weight network, which adaptively adjusts the weight of each task according to the input features. The dynamic weight network consists of two fully connected layers, and the output layer uses the softmax function to normalize the task weights. Through the adaptive weight adjustment mechanism, computing resources are flexibly allocated according to the importance of different tasks. For example, for some key tasks, such as identifying the occurrence of garbage disposal behavior, higher weights are assigned, while for other minor tasks, their weights may be reduced. The weighted task features are obtained. The weighted task features are discretized to convert continuous features into discrete behavior category probability distributions. By mapping the features into a fixed category space, the probability distribution of each behavior category is obtained. The discretized initial classification results represent the system's preliminary recognition of different disposal behaviors. Based on the initial classification results, the label dependency of adjacent time steps is modeled. By performing sequence smoothing on the classification labels of adjacent time steps, the jitter and discontinuity in the classification are reduced to ensure the stability and consistency of the behavior recognition results. Through sequence smoothing, we avoid making wrong classification decisions for short-term noise or abnormal behavior and obtain the trained classification model.
[0113] In a specific embodiment, the execution step inputs the temporal feature sequence into the spatiotemporal graph convolutional network, extracts the spatiotemporal relationship through multi-layer graph convolution operations, and obtains the graph feature representation; the spatiotemporal graph convolutional network includes 3 graph convolution layers, each layer uses the ChebNet convolution kernel, and the process of adding a graph pooling operation after each layer can specifically include the following steps:
[0114] Input the temporal feature sequence into the spatiotemporal graph structure, represent the features of each time step as nodes in the graph, and establish edge connections based on temporal and spatial proximity to obtain the initial graph representation;
[0115] Perform the first-layer graph convolution operation on the initial graph representation, use the K-order ChebNet polynomial kernel function to calculate the local feature aggregation of each node, and obtain the first-layer graph convolution output; the order K of the K-order ChebNet polynomial kernel function is set to 3;
[0116] Based on the output of the first layer of graph convolution, the graph pooling operation is performed, and the graph nodes are clustered and merged to obtain the downsampled graph structure;
[0117] Perform the second-layer graph convolution operation on the downsampled graph structure, use the recursive ChebNet convolution kernel to calculate the high-order relationship between nodes, and obtain the second-layer graph convolution output; the recursive depth of the recursive ChebNet convolution kernel is set to 2;
[0118] Based on the output of the second-layer graph convolution, an adaptive graph pooling operation is performed, and the pooling ratio is dynamically adjusted according to the node importance score to obtain an adaptive downsampled graph structure;
[0119] The third-layer graph convolution operation is performed on the adaptive downsampled graph structure, and the global graph representation is calculated using the attention-enhanced ChebNet convolution kernel to obtain the third-layer graph convolution output; the attention-enhanced ChebNet convolution kernel introduces node-level and edge-level attention mechanisms;
[0120] Based on the output of the third-layer graph convolution, a global graph pooling operation is performed, and a hierarchical attention mechanism is used to perform weighted aggregation on graph representations of different scales to obtain multi-scale graph features.
[0121] The multi-scale graph features are fused and normalized to obtain graph feature representation.
[0122] Specifically, the time series feature sequence is input into the spatiotemporal graph structure, and the features of each time step are represented as nodes in the graph. In time series data, each time step contains a specific feature vector, which can be represented as nodes. ,in Represents a time step. For example, video data of garbage disposal behavior will extract specific visual features or behavioral information at each time step, which can be modeled by nodes. In order to capture the relationship between these time steps, edges are established between nodes based on temporal and spatial proximity. Temporal proximity can be represented by connecting edges between adjacent time steps, while spatial proximity can be measured by the similarity between feature points. If the features of two time steps are very close in space, an edge can be established between them. In this way, an initial graph representation is generated. ,in is a node set, It is an edge set based on temporal and spatial proximity. The first layer of graph convolution is performed on the initial graph representation. The local feature aggregation of each node is calculated using the K-order ChebNet polynomial kernel function. ChebNet is an effective graph convolution method that approximates the graph Laplacian operator through Chebyshev polynomials to reduce the dependence on global neighbor information in the graph. The basic formula of the K-order ChebNet kernel function is:
[0123] ;
[0124] in, represents the graph convolution kernel, is the input feature vector of the node, is the normalized graph Laplacian matrix, It is Chebyshev polynomials of order, are polynomial coefficients. Through the convolution operation, nodes can aggregate information from their local neighbors. In this setting, the K value is set to 3, which means that each node can aggregate features from its third-order neighbors (i.e., nodes with a distance of 3) to obtain the output of the first layer of graph convolution. Based on the output of the first layer of graph convolution, a graph pooling operation is performed to downsample the nodes in the graph, reducing the number of nodes while retaining important structural information. By clustering the nodes, similar nodes are merged into one node to form a downsampled graph structure. The similarity of nodes can be measured based on their feature representation or position in the graph. Through this operation, a smaller graph structure is generated. The second layer of graph convolution operation is performed on the downsampled graph structure. This layer of convolution uses the recursive ChebNet convolution kernel, and the recursive depth is set to 2. Recursive ChebNet captures higher-order node relationships by recursively applying convolution operations. For example, through two layers of recursive convolution, nodes can not only aggregate information from their nearest neighbors, but also capture more distant contextual relationships. This operation helps to extract high-order relationships between nodes in the graph and improve the expressiveness of features. Based on the output of the second-layer graph convolution, an adaptive graph pooling operation is performed. Adaptive graph pooling dynamically adjusts the pooling ratio according to the importance score of each node. The importance score of a node can be calculated by the centrality or metric of the node. Important nodes are usually retained, while unimportant nodes may be merged or discarded. Through adaptive pooling, the structure of the graph is adjusted according to the contribution of the nodes, the most meaningful nodes are retained, and the representation of the graph is optimized. The third-layer graph convolution operation is performed on the graph structure after adaptive downsampling. In this layer, the attention-enhanced ChebNet convolution kernel is used. The attention mechanism makes the model pay more attention to the key parts of the graph by assigning different weights to nodes and edges. The node-level attention mechanism can adjust the weight according to the feature importance of the node, while the edge-level attention mechanism can adjust the influence of the connection according to the features of the edge (such as the weight of the edge or the strength of the connection). By introducing the attention mechanism, it is effective to focus on those nodes and edges that are critical to the classification task, and improve the global feature representation ability of the model. Global graph pooling operation is performed based on the output of the third-layer graph convolution. Global graph pooling generates a compact global graph representation by integrating the features of all nodes. In this process, a hierarchical attention mechanism is used to perform weighted aggregation of graph representations of different scales. For example, features from different convolutional layers or different graph pooling layers are assigned different weights to ensure that the model can extract useful information at multiple scales. Through this mechanism, the model generates multi-scale graph feature representations. Multi-scale graph features are subjected to feature fusion and normalization. Feature fusion integrates features from different levels and paths to generate a richer feature vector. Normalization ensures that the dimensions of features are consistent in different dimensions, thereby avoiding the problem of feature imbalance in subsequent classification or regression tasks.Normalization can be done through methods such as standardization or minimum and maximum scaling, and the final graph feature representation is used as the input for the subsequent action recognition task.
[0125] In a specific embodiment, the process of executing step 105 may specifically include the following steps:
[0126] Obtaining long-time video data of the garbage disposal site, and dividing the long-time video data into time windows to obtain multiple short-time video clips;
[0127] Input the short video clips into the trained classification model to obtain the initial classification results, and perform temporal consistency processing on the initial classification results to obtain a smoothed behavior sequence;
[0128] Based on the smoothed behavior sequence, long-term behavior units are divided to obtain a preliminary long-term behavior representation, and the preliminary long-term behavior representation is globally re-detected to identify potential misclassified areas and obtain the re-detection target area;
[0129] Perform local fine classification on the re-detected target area, update the behavior label of the corresponding area, and obtain the corrected long-term behavior representation;
[0130] The modified long-term behavior representation is matched with the predefined long-term behavior template to obtain the long-term behavior recognition result, and the short-term noise is removed and similar behaviors are merged for the long-term behavior recognition result to finally obtain the behavior recognition result.
[0131] Specifically, obtain long-time video data of garbage disposal sites, including multiple continuous disposal behaviors and related environmental changes. Divide the long-time video data into time windows, and cut the original long-time video into multiple shorter video clips, each of which corresponds to a fixed time window. Input the short-time video clips into a pre-trained classification model. After a lot of training, the classification model can recognize various patterns in garbage disposal behaviors. For each short-time video clip, the classification model will generate an initial classification result, marking the specific behaviors that occurred in the clip, such as garbage disposal, tidying up garbage bins, etc. In order to improve the stability of the classification results, the initial classification results are processed for temporal consistency. Temporal consistency processing reduces short-term fluctuations through smoothing operations to ensure that the behavior classification results remain continuous and consistent on the timeline. Common smoothing methods include weighted moving average or median filtering. Assume that the initial classification result sequence is , a new smoothed behavior sequence is obtained through smoothing ,in It is calculated based on the weighted average of the classification results of multiple time steps before and after. The smoothed behavior sequence not only reduces the jitter of classification, but also ensures the behavioral consistency of adjacent time periods. Based on the smoothed behavior sequence, long-term behavior units are divided. Long-term behavior units represent a continuous and complete behavior process, such as garbage disposal behavior from beginning to end. By analyzing the continuous behavior segments in the smoothed sequence, the complete long-term behavior unit is identified, and a preliminary representation that can reflect long-term behavior is obtained. Each long-term behavior unit may contain multiple short-term segments, thereby providing more complete behavior information. The preliminary long-term behavior representation is globally re-detected, and the possible misclassified areas are identified by analyzing the overall classification results of the long-term behavior unit. For example, in the process of garbage disposal behavior, some time periods may be mistakenly identified as other behaviors, such as "non-disposal" behavior, due to noise or light changes. Through global re-detection, the misclassified areas are located, and the re-detection target areas that need further processing are marked. Perform local fine classification on the re-detected target area, and re-update the behavior labels of these areas to the corrected long-term behavior representation by performing more detailed analysis of the video clips, combining contextual information and more complex classification algorithms. Match the corrected long-term behavior representation with the predefined long-term behavior template. The predefined behavior template is a standard behavior pattern summarized based on a large amount of historical data, such as "the garbage placement behavior ends after 5 seconds". By matching the corrected behavior with these templates, the correctness of the classification results is verified to ensure that each long-term behavior conforms to the expected pattern. In the matching process, algorithms such as dynamic time warping can be used to align and compare the shapes of the behavior sequence and calculate the similarity between the behavior sequence and the template. Perform short-term noise removal and similar behavior merging on the long-term behavior recognition results. The purpose of short-term noise removal is to filter out instantaneous misclassifications caused by external interference or sensor errors. For example, if a short "no behavior" interval appears in the long-term behavior, it can be regarded as noise and removed. Similar behavior merging is to process those continuous behaviors with similar patterns and merge them into a complete behavior unit. For example, multiple consecutive garbage placement behaviors can be merged into a longer placement process. This process can be completed by calculating the similarity between adjacent behaviors. The final behavior recognition result is generated by removing noise and merging similar behaviors.
[0132] In a specific embodiment, the process of executing step 106 may specifically include the following steps:
[0133] Conduct credibility assessment on behavior recognition results, filter out low-credibility samples, and obtain a sample set to be optimized;
[0134] Allocate the sample set to be optimized to the garbage classification equipment and cloud server, divide the collaborative computing tasks, and obtain the task allocation plan;
[0135] Based on the task allocation scheme, feature extraction and preliminary classification are performed on the garbage classification device to obtain edge classification results, which are then transmitted to the cloud server and integrated with the cloud model prediction results to obtain comprehensive classification results.
[0136] Construct a reinforcement learning reward function based on the comprehensive classification results, define the state space and action space, and obtain a reinforcement learning environment;
[0137] In the reinforcement learning environment, the trained classification model is optimized and the model parameters are updated to obtain the optimized classification model.
[0138] The optimized classification model is deployed to the garbage classification equipment for online inference testing to obtain real-time performance evaluation results. Based on the real-time performance evaluation results, the edge cloud task allocation strategy is dynamically adjusted to finally obtain the target classification model.
[0139] Specifically, the credibility of the behavior recognition results is analyzed. By analyzing the prediction confidence of the classification model for the behavior, samples with low classification confidence are screened out. The credibility is measured by the output probability of the model. For each behavior category, the model outputs a probability distribution ,in is the category, is the input feature. If the highest confidence Below a preset threshold , then the sample will be considered as a low-credibility sample and belongs to the object to be optimized. The selected low-credibility samples constitute the sample set to be optimized. The sample set to be optimized is allocated to the garbage sorting device (edge device) and the cloud server for collaborative computing task division. The collaborative computing task combines the advantages of edge computing and cloud computing, and improves the efficiency of the entire classification system by reasonably allocating computing tasks. The edge device handles tasks with small computational volume and high latency requirements, such as feature extraction and preliminary classification, while complex computing tasks are assigned to the cloud server. The task allocation scheme determines which side each sample performs tasks on by analyzing the characteristics and computing requirements of the sample to balance the computing load and optimize performance. Based on the task allocation scheme, feature extraction and preliminary classification are performed on the garbage sorting device. Due to its limited computing power, the edge device is usually only responsible for performing lightweight feature extraction and classification tasks. For example, the device can extract the basic behavioral features of the video clip, such as the movement trajectory of the object, the delivery angle, etc., and quickly obtain the edge classification results. The preliminary classification results provide a preliminary estimate of the garbage delivery behavior. In order to improve the accuracy of the classification results, the edge classification results are transmitted to the cloud server, and the cloud model further processes these results. In the cloud server, the powerful computing power of the cloud model is used to process the edge classification results. The cloud model predicts the edge results based on more complex features and global information, and fuses them with the edge classification results. The fusion strategy can use methods such as weighted average or stacking models to combine the prediction results of the cloud model and the edge model to obtain a more accurate comprehensive classification result. Assume that the cloud classification result is And the edge classification results are , then the comprehensive classification results It can be expressed as:
[0140] ;
[0141] in, is the weighting coefficient that controls the weight distribution of edge results and cloud results. Through fusion, the computing advantages of edge devices and cloud servers are fully utilized to generate more accurate classification results. Based on the comprehensive classification results, a reinforcement learning reward function is constructed, and the state space and action space are defined to obtain a reinforcement learning environment. The goal of reinforcement learning is to optimize the strategy of the classification model through interaction with the environment so that it performs better in future reasoning tasks. Among them, the state space Contains the current parameters and input features of the classification model, action space Contains the update direction of model parameters and task allocation strategy. Reward function It is defined based on the accuracy of the classification results and the utilization of computing resources. For example, if the classification accuracy is high and the computing resource utilization is efficient, the reward value is large; if the classification result is inaccurate or the resource utilization is inappropriate, the reward value is low. Reward function The form can be:
[0142] ;
[0143] in, and is the weight coefficient, Accuracy represents the classification accuracy, and Cost represents the computing resource overhead. Through reinforcement learning, the model parameters and task allocation strategy are continuously adjusted to maximize the cumulative reward. In the reinforcement learning environment, the classification model optimizes its behavior recognition ability by continuously trying and updating the strategy. Reinforcement learning algorithms, such as deep Q learning or policy gradient methods, update model parameters by evaluating the rewards of different state and action combinations. Each time the model performs a classification task, the system updates the reward value according to the classification results and resource utilization, and optimizes the model parameters accordingly. After multiple iterations, reinforcement learning can find the optimal classification strategy and task allocation scheme, thereby improving the overall performance of the model and obtaining an optimized classification model. The optimized classification model is deployed to the garbage classification device, and the system can perform online reasoning tests. In the online reasoning stage, the edge device uses the optimized model to perform real-time garbage classification behavior recognition. This process can quickly respond to garbage disposal behavior and make corresponding decisions based on the reasoning results. The results of the online reasoning test are recorded and used to further evaluate the performance of the model. Real-time performance evaluation includes indicators such as classification accuracy, response time, and efficiency of computing resource utilization. According to the real-time performance evaluation results, the edge cloud task allocation strategy is dynamically adjusted. If it is found during the online reasoning process that certain tasks can be processed more efficiently on edge devices, the system will automatically adjust the task allocation scheme. For example, if the performance of the edge device improves, more tasks can be assigned to the device, thereby reducing dependence on the cloud and reducing latency and bandwidth requirements. Through this dynamic adjustment, the system can adapt to different computing environments and maximize resource utilization while maintaining high-precision classification. After multiple iterations and performance optimization, a target classification model that can work efficiently between edge devices and cloud servers is obtained.
[0144] The above describes the method for identifying garbage classification and delivery behavior based on the AI algorithm in the embodiment of the present invention. The following describes the system for identifying garbage classification and delivery behavior based on the AI algorithm in the embodiment of the present invention. Figure 2 In one embodiment of the present invention, a garbage classification and placement behavior recognition system based on an AI algorithm includes:
[0145] The acquisition module 201 is used to acquire and preprocess the garbage placement video data to obtain a preprocessed data set;
[0146] A processing module 202 is used to perform data exploration and augmentation processing on the preprocessed data set to obtain an extended data set;
[0147] An extraction module 203 is used to use an improved simulation feature point selection algorithm, and introduce a second-order channel attention mechanism and a regional space fusion module to perform feature extraction and behavior representation on the extended data set to obtain a behavior feature vector;
[0148] A training module 204 is used to construct and train a behavior classification model according to the behavior feature vector to obtain a trained classification model, wherein the behavior classification model is a multi-branch deep neural network including a graph attention mechanism and a multi-task learning strategy;
[0149] The recognition module 205 is used to perform global re-detection and long-term behavior recognition based on the trained classification model to obtain a behavior recognition result;
[0150] The computing module 206 is used to perform edge-cloud collaborative computing and reinforcement learning on the trained classification model based on the behavior recognition results to obtain a target classification model.
[0151] Through the collaboration of the above components, the quality and diversity of training data are significantly improved by using the non-local mean algorithm for adaptive denoising and contrast enhancement, combining generative adversarial networks and three-dimensional convolutional autoencoders for data augmentation. The improved simulated feature point selection algorithm combined with the second-order channel attention mechanism and regional spatial fusion module can more effectively capture the spatiotemporal characteristics of garbage disposal behavior and improve the discriminability and robustness of feature representation. The multi-branch deep neural network containing graph attention mechanism and multi-task learning strategy is used as the behavior classification model, which can handle multiple related tasks at the same time, improving the generalization ability and recognition accuracy of the model. By performing temporal consistency processing and global re-detection on the initial classification results, combined with long-term behavior template matching, the short-term misclassification phenomenon is effectively reduced and the accuracy of long-term behavior recognition is improved. The edge-cloud collaborative computing strategy is adopted, combined with reinforcement learning for model optimization, which not only improves the real-time performance of the system, but also can dynamically adjust task allocation according to actual application scenarios, realizing continuous optimization and adaptability improvement of the model.
[0152] above Figure 2 The garbage classification and delivery behavior recognition system based on AI algorithm in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The garbage classification and delivery behavior recognition device based on AI algorithm in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0153] Figure 3It is a structural diagram of a garbage classification and delivery behavior recognition device based on an AI algorithm provided by an embodiment of the present invention. The garbage classification and delivery behavior recognition device 300 based on an AI algorithm may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage device terminals) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the garbage classification and delivery behavior recognition device 300 based on the AI algorithm. Furthermore, the processor 310 can be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the garbage classification and delivery behavior recognition device 300 based on the AI algorithm to implement the steps of the above-mentioned garbage classification and delivery behavior recognition method based on the AI algorithm.
[0154] The garbage classification and placement behavior recognition device 300 based on AI algorithm may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that Figure 3 The structure of the garbage classification and placement behavior recognition device based on the AI algorithm shown does not constitute a limitation of the garbage classification and placement behavior recognition device based on the AI algorithm provided by the present invention, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0155] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the method for identifying garbage classification and placement behavior based on an AI algorithm.
[0156] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0157] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0158] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying garbage classification and placement behavior based on AI algorithm, characterized in that: The method comprises: The video data of garbage disposal is collected and preprocessed to obtain a preprocessed data set; specifically, the method includes: collecting videos of garbage disposal points around the clock through high-definition intelligent cameras to obtain garbage disposal video data; timestamping the garbage disposal video data and associating it with geographic location information to obtain labeled video data; performing video segmentation on the labeled video data based on a scene change detection algorithm to divide continuous disposal behaviors into independent video clips to obtain multiple video clips; using a non-local mean algorithm to dynamically adjust the search window size and filter strength according to the video content, and performing adaptive denoising on the multiple video clips to obtain denoised video clips; performing contrast enhancement processing on the denoised video clips to obtain enhanced video clips; performing data format unification processing on the enhanced video clips to obtain a preprocessed data set; Performing data exploration and augmentation processing on the preprocessed data set to obtain an extended data set; An improved simulated feature point selection algorithm is adopted, and a second-order channel attention mechanism and a regional space fusion module are introduced to perform feature extraction and behavior characterization on the extended data set to obtain a behavior feature vector; Constructing and training a behavior classification model according to the behavior feature vector to obtain a trained classification model, wherein the behavior classification model is a multi-branch deep neural network including a graph attention mechanism and a multi-task learning strategy; Based on the trained classification model, global re-detection and long-term behavior recognition are performed to obtain a behavior recognition result; specifically, the method includes: obtaining long-term video data of the garbage disposal site, and dividing the long-term video data into time windows to obtain multiple short-term video clips; inputting the short-term video clips into the trained classification model to obtain an initial classification result, and performing time consistency processing on the initial classification result to obtain a smoothed behavior sequence; dividing the long-term behavior unit based on the smoothed behavior sequence to obtain a preliminary long-term behavior representation, and performing global re-detection on the preliminary long-term behavior representation to identify potential misclassified areas and obtain a re-detection target area; performing local fine classification on the re-detection target area, updating the behavior label of the corresponding area, and obtaining a revised long-term behavior representation; matching the revised long-term behavior representation with a predefined long-term behavior template to obtain a long-term behavior recognition result, and performing short-term noise removal and similar behavior merging on the long-term behavior recognition result to finally obtain a behavior recognition result; Based on the behavior recognition results, edge-cloud collaborative computing and reinforcement learning are performed on the trained classification model to obtain a target classification model.
2. The method for identifying garbage classification and placement behavior based on AI algorithm according to claim 1 is characterized in that: The data exploration and augmentation processing is performed on the preprocessed data set to obtain an extended data set, including: Performing time series analysis on the preprocessed data set, calculating the frequency distribution and periodicity characteristics of the delivery behavior, and obtaining a time feature matrix; Based on the time feature matrix, the preprocessed data set is subjected to stratified sampling, and divided into three subsets of high frequency, medium frequency and low frequency according to the frequency of delivery, so as to obtain stratified data subsets; Applying an optical flow-based motion estimation algorithm to each video clip in the hierarchical data subset, calculating a pixel-level motion vector field, and obtaining a motion feature map; Performing cluster analysis on the hierarchical data subsets according to the movement feature graph, dividing the delivery behaviors into different types, and obtaining behavior type labels; Applying a generative adversarial network to the hierarchical data subset with behavior type labels to generate synthetic video clips consistent with the distribution of the original data, thereby obtaining a first data set; Inputting the first data set into a three-dimensional convolutional autoencoder, reconstructing and interpolating the video clips, generating a sequence of intermediate state delivery behaviors, and obtaining a second data set; Applying data enhancement technology to the second data set, wherein the data enhancement technology includes random cropping, rotation, flipping and adding Gaussian noise to obtain diversified data variants; The diverse data variants are merged with the preprocessed data set, and the data quality is evaluated by a cross-validation method, low-quality samples are eliminated, and finally an extended data set is obtained.
3. The method for identifying garbage classification and placement behavior based on AI algorithm according to claim 1 is characterized in that: The improved simulation feature point selection algorithm is adopted, and the second-order channel attention mechanism and the regional space fusion module are introduced to perform feature extraction and behavior characterization on the extended data set to obtain the behavior feature vector, including: Applying an improved simulated feature point selection algorithm to each video clip in the extended data set, and obtaining an initial feature point set by calculating a local response function and a global consistency constraint; Constructing a multi-scale pyramid structure based on the initial feature point set, extracting local features for each scale layer using a SIFT descriptor to obtain a multi-scale feature descriptor; Performing dimensionality reduction processing on the multi-scale feature descriptor to obtain a feature matrix after dimensionality reduction; Input the reduced-dimensional feature matrix into a second-order channel attention module, and obtain a channel attention map by calculating the covariance matrix and feature importance weights between feature channels; Multiplying the channel attention map and the feature matrix after dimension reduction element by element to obtain a channel enhanced feature representation; The channel enhanced feature representation is input into a regional spatial fusion module, and a multi-scale spatial feature map is obtained through adaptive receptive field and multi-path feature aggregation; Convolution and pooling operations are performed on the multi-scale spatial feature map to obtain a spatiotemporal feature sequence, and vector conversion is performed on the spatiotemporal feature sequence to finally obtain a behavior feature vector.
4. The method for identifying garbage classification and placement behavior based on AI algorithm according to claim 3 is characterized in that: The improved simulated feature point selection algorithm is applied to each video clip in the extended data set to obtain an initial feature point set by calculating a local response function and a global consistency constraint, including: Perform multi-scale decomposition on each video clip to obtain image pyramids of different scales; Performing Harris corner point detection on each layer of the image pyramid, calculating the corner point response value of each pixel point, and obtaining a corner point response matrix; Based on the corner point response matrix, non-maximum suppression is performed on each scale layer, and local maximum points are screened to obtain a preliminary feature point set; Calculating a local descriptor for each feature point in the preliminary feature point set to generate a binary feature descriptor, and constructing a feature descriptor set based on the binary feature descriptor; Perform feature matching based on the feature descriptor set to obtain cross-scale feature correspondence; According to the cross-scale feature correspondence, a global consistency constraint is calculated to obtain a processed feature point set; Performing temporal continuity and spatial correlation analysis on the processed feature point set to obtain a temporally and spatially consistent feature point sequence; Based on the temporally and spatially consistent feature point sequence, the motion trajectory and local deformation of the feature points are calculated to obtain an initial feature point set.
5. The method for identifying garbage classification and placement behavior based on AI algorithm according to claim 1 is characterized in that: The behavior classification model is constructed and trained according to the behavior feature vector to obtain a trained classification model, wherein the behavior classification model is a multi-branch deep neural network, including a graph attention mechanism and a multi-task learning strategy, including: Performing time series segmentation on the behavior feature vector to obtain a time series feature sequence of fixed length; The temporal feature sequence is input into the spatiotemporal graph convolutional network, and the spatiotemporal relationship is extracted through multi-layer graph convolution operations to obtain a graph feature representation; the spatiotemporal graph convolutional network includes 3 graph convolution layers, each layer uses a ChebNet convolution kernel, and a graph pooling operation is added after each layer; Applying a multi-head self-attention mechanism to the graph feature representation, calculating the correlation between different time steps, and obtaining an attention-weighted feature matrix; the multi-head self-attention mechanism comprises 8 attention heads, each of which independently calculates the linear projection of the query, key, and value; Inputting the attention-weighted feature matrix into a multi-branch convolutional neural network, where each branch corresponds to a behavior classification task, to obtain a multi-task feature representation; the multi-branch convolutional neural network comprises 4 parallel branches, where each branch comprises 3 convolutional layers and 2 fully connected layers; Applying a cross-task attention module to the multi-task feature representation to learn the correlation between different tasks and obtain inter-task interaction features; the cross-task attention module uses a bilinear pooling operation to calculate a similarity matrix between task pairs; Input the task interaction features into a dynamic weight network, and adaptively adjust the weight of each task according to the input features to obtain weighted task features; the dynamic weight network consists of two fully connected layers, and the output layer uses a softmax function to normalize the task weights; Discretizing the weighted task features to convert continuous features into discrete behavior category probability distributions to obtain initial classification results; The label dependency relationship of adjacent time steps is modeled according to the initial classification results, and sequence smoothing is performed to finally obtain a trained classification model.
6. The method for identifying garbage classification and placement behavior based on AI algorithm according to claim 5 is characterized in that: The temporal feature sequence is input into a spatiotemporal graph convolutional network, and the spatiotemporal relationship is extracted through multi-layer graph convolution operations to obtain a graph feature representation; The spatiotemporal graph convolutional network includes three graph convolutional layers, each layer uses the ChebNet convolution kernel, and adds a graph pooling operation after each layer, including: Inputting the temporal feature sequence into a spatiotemporal graph structure, representing the features of each time step as nodes in the graph, and establishing edge connections based on temporal and spatial proximity to obtain an initial graph representation; Performing a first-layer graph convolution operation on the initial graph representation, using a K-order ChebNet polynomial kernel function to calculate the local feature aggregation of each node, and obtaining a first-layer graph convolution output; the order K of the K-order ChebNet polynomial kernel function is set to 3; Performing a graph pooling operation based on the output of the first-layer graph convolution, and clustering and merging graph nodes to obtain a downsampled graph structure; Performing a second-layer graph convolution operation on the downsampled graph structure, using a recursive ChebNet convolution kernel to calculate the high-order relationship between nodes, and obtaining a second-layer graph convolution output; the recursive depth of the recursive ChebNet convolution kernel is set to 2; Performing an adaptive graph pooling operation based on the output of the second-layer graph convolution, dynamically adjusting the pooling ratio according to the node importance score, and obtaining an adaptive downsampled graph structure; Performing a third-layer graph convolution operation on the adaptive downsampled graph structure, using an attention-enhanced ChebNet convolution kernel to calculate a global graph representation, and obtaining a third-layer graph convolution output; the attention-enhanced ChebNet convolution kernel introduces a node-level and edge-level attention mechanism; Based on the output of the third-layer graph convolution, a global graph pooling operation is performed, and a hierarchical attention mechanism is used to perform weighted aggregation on graph representations of different scales to obtain multi-scale graph features; The multi-scale graph features are subjected to feature fusion and normalization processing to obtain a graph feature representation.
7. The method for identifying garbage classification and placement behavior based on AI algorithm according to claim 1 is characterized in that: Based on the behavior recognition result, edge-cloud collaborative computing and reinforcement learning are performed on the trained classification model to obtain a target classification model, including: Performing credibility evaluation on the behavior recognition results, screening out low-credibility samples, and obtaining a sample set to be optimized; Allocate the sample set to be optimized to the garbage classification device and the cloud server, divide the collaborative computing tasks, and obtain a task allocation plan; Based on the task allocation scheme, feature extraction and preliminary classification are performed on the garbage classification device to obtain edge classification results, and the edge classification results are transmitted to the cloud server and integrated with the cloud model prediction results to obtain comprehensive classification results; Constructing a reinforcement learning reward function according to the comprehensive classification result, defining a state space and an action space, and obtaining a reinforcement learning environment; In the reinforcement learning environment, performing strategy optimization on the trained classification model, updating model parameters, and obtaining an optimized classification model; The optimized classification model is deployed to the garbage classification equipment to perform online inference testing to obtain real-time performance evaluation results. Based on the real-time performance evaluation results, the edge cloud task allocation strategy is dynamically adjusted to finally obtain the target classification model.
8. A garbage classification and placement behavior recognition system based on AI algorithm, characterized in that: Used to execute the method for identifying garbage classification and placement behavior based on an AI algorithm according to any one of claims 1 to 7, the system comprising: The acquisition module is used to collect and preprocess the garbage disposal video data to obtain a preprocessed data set; A processing module, used for performing data exploration and augmentation processing on the preprocessed data set to obtain an extended data set; An extraction module, used to use an improved simulation feature point selection algorithm, and introduce a second-order channel attention mechanism and a regional space fusion module to perform feature extraction and behavior representation on the extended data set to obtain a behavior feature vector; A training module, used to construct and train a behavior classification model according to the behavior feature vector to obtain a trained classification model, wherein the behavior classification model is a multi-branch deep neural network including a graph attention mechanism and a multi-task learning strategy; A recognition module, used for performing global re-detection and long-term behavior recognition based on the trained classification model to obtain a behavior recognition result; The computing module is used to perform edge-cloud collaborative computing and reinforcement learning on the trained classification model based on the behavior recognition results to obtain a target classification model.
Citation Information
Patent Citations
Space-time convolution traffic flow prediction method and system based on R-C-R structure
CN116959252A
File exporting method and system based on AI cloud computing
CN118312861A