Garbage classification method based on CNN algorithm and Internet of Things technology

Through the WeChat applet based on the CNN algorithm and the IoT smart trash can, combined with pressure sensors and distributed data storage systems, the problems of low garbage classification accuracy and high supervision costs have been solved, efficient garbage classification management and real-time monitoring have been achieved, and residents' enthusiasm for garbage classification has been improved.

CN120664239APending Publication Date: 2025-09-19ANHUI POLYTECHNIC UNIV MECHANICAL & ELECTRICAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511038911.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

The existing garbage classification method relies on low residents' self-awareness, has low accuracy, high manual supervision costs, lacks real-time monitoring and data analysis, and is difficult to achieve effective supervision and incentives. The existing system cannot handle massive garbage delivery data, has low accuracy in identifying complex garbage scenarios, and lacks intelligent management.

Method used

A WeChat applet based on the CNN algorithm is used for garbage identification, combined with IoT smart trash cans and edge device analysis, and pressure sensors are used to monitor weight changes. Real-time monitoring and penalty incentives are carried out through the background system. The distributed file system HDFS and Hive database are used for data storage and analysis to build a user credit system.

Benefits of technology

It improves the accuracy of garbage classification and residents' enthusiasm, realizes real-time monitoring and security, reduces system storage costs, improves data processing efficiency and management level, and promotes long-term garbage classification behavior.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120664239A_ABST
    Figure CN120664239A_ABST
Patent Text Reader

Abstract

The invention discloses a garbage classification method based on a CNN algorithm and an Internet of Things technology, and relates to the technical field of garbage classification, comprising the following steps: a user logs in a WeChat applet, and classifies garbage according to suggestions of the applet by photographing and identifying different garbage; the intelligent garbage can shoots garbage through a camera, a pressure sensor counts the change of the weight in the garbage can at the moment, edge equipment operates a CNN model to analyze the garbage, a user is reminded of classification errors through an applet, and safety information feedback of the intelligent garbage can is monitored in real time; and if a safety problem or a problem of loading and unloading overflow in the garbage can occurs, the system contacts corresponding management personnel for processing, and a system background counts user data and displays the information on a large visual screen in real time. The CNN algorithm model provided by the invention has relatively high robustness and accuracy, can effectively improve the accuracy of residential garbage classification, and reduces the situation of misclassification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of garbage classification, and in particular to a garbage classification method based on a CNN algorithm and Internet of Things technology. Background Art

[0002] With the acceleration of urbanization, the problem of urban domestic waste disposal is becoming increasingly prominent. Traditional waste sorting methods rely mainly on residents' self-consciousness and manual guidance, which has many drawbacks. First, residents' understanding of the standards and methods of waste sorting is insufficient, resulting in low accuracy of waste sorting. A large amount of waste is not properly sorted and processed, which not only wastes resources but also poses potential harm to the environment. Secondly, the cost of manual supervision is high, and it is impossible to provide 24-hour uninterrupted monitoring, making it difficult to effectively monitor residents' waste sorting behavior. In addition, the existing waste sorting system lacks the ability to monitor and analyze data at waste disposal points in real time, making it unable to promptly detect and address problems such as overflowing garbage and safety hazards. It also makes it difficult to effectively incentivize and constrain residents' waste sorting behavior in the long term.

[0003] In recent years, the development of IoT (Internet of Things), artificial intelligence (AI) algorithms, and big data processing technologies has provided new solutions for addressing these issues. However, some existing waste sorting solutions based on IoT and AI have limitations. For example, some rely solely on simple image recognition technology, resulting in low accuracy in complex waste scenarios and an inability to adapt to the diverse characteristics of different types of waste. Other solutions, while incorporating sensor technology, lack in-depth analysis and fusion processing of sensor data, making comprehensive monitoring and intelligent management of waste delivery behavior impossible. Furthermore, existing systems lack sufficient data processing capabilities to efficiently process massive amounts of waste delivery and sensor data, making it difficult to provide real-time feedback on waste sorting behavior and provide accurate decision support. Summary of the Invention

[0004] The purpose of the present invention is to provide a garbage classification method based on CNN algorithm and Internet of Things technology to overcome the above-mentioned defects in the prior art.

[0005] A garbage classification method based on CNN algorithm and Internet of Things technology includes the following steps:

[0006] S1. The user logs in to the WeChat mini-program and takes photos of different types of garbage to classify them according to the mini-program's suggestions.

[0007] S2. Use the mini program to locate the location closest to the user where garbage can be sorted and delivered;

[0008] S3: The sorted garbage is placed into the bin according to the classification standards. The smart trash can uses a camera to take pictures of the garbage, and a pressure sensor to measure the weight change in the bin at that moment and record the user's operation information.

[0009] S4. The edge device in the smart trash can runs a CNN model to analyze the trash and alerts the user through the mini-program if they misclassify the trash. If the number of misclassifications exceeds a certain limit, the user will be penalized accordingly.

[0010] S5. Users can make adjustments based on feedback and file appeals against unreasonable penalties.

[0011] S6. The backend operation administrator will make reasonable judgments based on user complaints and monitor the safety information feedback of the smart trash can in real time;

[0012] S7. If there is a safety issue or the trash bin is overflowing, the system will contact the relevant management personnel for processing.

[0013] S8. The system background will collect user data and display the information on the large-screen visualization in real time. It will also sort and select the environmentally friendly families on a daily or monthly basis and contact relevant personnel to give rewards.

[0014] Preferably, in step S3, when the weight exceeds the rated value, the pressure sensor will transmit a signal to the main control board, and the main control board controls the warning light on the smart trash can to light up.

[0015] Preferably, the data processing of the CNN model in step S4 includes deduplication and denoising of data information, construction of a word segmentation index file, and data feature extraction. The collected data is filled with missing values, smoothed or deleted, and data inconsistencies are corrected to obtain standard continuous data. The data involving multiple data sources are then merged to generate a new data set, providing a unified data view for subsequent query and analysis processing.

[0016] Preferably, the data migration and analysis of the CNN model in step S4 includes the following steps:

[0017] 1. Import the processed data set into HDFS and use the Hive database based on the distributed file system to store the data;

[0018] 2. The data received by the server is stored in Hive, and the program will read the data through the Hive tool class;

[0019] 3. Data is shared from Hive to MySQL through Sqoop.

[0020] Preferably, the data modeling of the CNN model in step S4 includes the following steps:

[0021] 1. Use Python to analyze data that has been preprocessed;

[0022] Second, the prediction information is mainly modeled based on the selected data with greater correlation;

[0023] Preferably, in the data modeling of the CNN model, the data is divided into 75% training set and 25% test set. The selection of the training set and the test set is random, and then the data is standardized to ensure that the variance of the feature data in each dimension is 1 and the mean is 0.

[0024] Preferably, the result analysis of step S8 utilizes a large visual screen to systematically display the previously analyzed and processed data.

[0025] Preferably, the specific steps of result analysis include obtaining data from MySQL and displaying the data in a table form by constructing a visualization module using HTML+CSS+JS language.

[0026] Preferably, in step S6, the smart trash can is monitored in real time by a temperature sensor and a gas sensor.

[0027] The beneficial effects achieved by the present invention are:

[0028] 1. Users log in to the WeChat mini-program and take photos to identify garbage. Using a CNN algorithm, the system analyzes the garbage images and provides classification recommendations, accurately identifying different types of garbage. The CNN algorithm is trained on large-scale heterogeneous datasets (such as those from UCI, Tianchi, and Kaggle). After data preprocessing (including deduplication and denoising, imputing missing values, smoothing or removing outliers, and correcting data inconsistencies) and feature extraction, the model demonstrates high robustness and accuracy, effectively improving the accuracy of residents' garbage classification and reducing misclassifications.

[0029] 2. During the waste delivery process, the edge device in the smart trash can runs a CNN model in real time to analyze the waste and records weight changes within the can using a pressure sensor. If a user misclassifies, the mini program promptly reminds the user to make adjustments, further improving the accuracy of waste sorting. Furthermore, the mini program dynamically adjusts classification suggestions based on actual conditions to accommodate waste sorting standards and usage habits in different regions. Simultaneously, the backend system monitors the conditions within the can in real time using temperature and gas sensors, proactively analyzing and responding to potential hazards to ensure user safety. This real-time monitoring and early warning mechanism provides users with a safer and more reliable waste delivery environment.

[0030] 3. Data migration and analysis using the distributed file system HDFS and the Hive database are capable of storing and processing massive amounts of garbage collection and sensor data. Sharing data to MySQL via Sqoop enables efficient data storage and fast access, reducing system storage costs and data processing pressure. Furthermore, Hive's distributed architecture improves data processing efficiency and reliability, better supporting the system's real-time monitoring and data analysis capabilities.

[0031] 4. Establish a user credit system by recording user operations and classification errors. Penalties will be imposed for users who make classification errors more than a certain number of times. Users can also make adjustments or file appeals based on feedback. This incentive and constraint mechanism can effectively increase user enthusiasm for waste sorting, promote long-term adherence to waste sorting practices, and improve the overall system's operational efficiency and management level. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 This is a diagram of the basic functions of garbage classification in the present invention.

[0033] Figure 2 This is a flow chart of the garbage classification function implementation of the present invention.

[0034] Figure 3 Schematic diagram of the pressure sensor of the present invention.

[0035] Figure 4 This is a flow chart of data collection and preprocessing of the present invention.

[0036] Figure 5 Flowchart of data storage of the present invention.

[0037] Figure 6 Flowchart of the prediction module of the present invention.

[0038] Figure 7 This is a visualization diagram of the data of the present invention. DETAILED DESCRIPTION

[0039] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used in the specification of the application are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification, claims and drawings of this application are intended to cover non-exclusive inclusions.

[0041] References to "embodiments" herein mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase "embodiment" in various places in the specification does not necessarily refer to the same embodiment, nor does it necessarily refer to independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0042] like Figure 1-2 As shown, the present invention provides a garbage classification method based on CNN algorithm and Internet of Things technology, which includes the following steps:

[0043] 1. Users log in to the WeChat mini-program and take photos of different types of garbage to identify and categorize them based on the mini-program's suggestions.

[0044] 2. Use the mini program to locate the nearest location for garbage sorting and delivery;

[0045] 3. Put the classified garbage into the bin according to the classification standards. The smart trash can uses the camera to shoot the garbage, and the pressure sensor to count the weight changes in the bin at that moment and record the user's operation information. When the weight exceeds the rated value, the pressure sensor will transmit a signal to the main control board, and the main control board will control the warning light on the smart trash can to light up. Figure 3 As shown;

[0046] 4. Edge devices in smart trash cans run CNN models to analyze trash:

[0047] ①. Development environment selection: Use pycharm tools for development.

[0048] Data preprocessing: In the life cycle of platform development, data collection is the first step. Different data sets may have different structures and models, such as files, XML trees, relational tables, etc., which is manifested as data heterogeneity. For multiple heterogeneous data sets, further integration processing or integration preprocessing is required, such as Figure 4As shown in the figure, the datasets used in this algorithm are derived from the UCI dataset, the Tianchi dataset, and data downloaded from the Kaggle website. Data processing involves deduplication and denoising, constructing a word segmentation index file, and extracting data features. The collected data is then reconstructed into standardized, continuous data by filling missing values, smoothing or removing outliers, and correcting data inconsistencies. Data from multiple sources is then merged to generate a new dataset, providing a unified data view for subsequent query and analysis.

[0049] ②Data migration and analysis includes the following steps:

[0050] like Figure 5 As shown, the processed dataset is imported into HDFS. Due to the large amount of data required, a standard relational database is not used directly. Instead, the Hive database, based on a distributed file system, is used to store the data. Compared to other relational databases, Hive can store much larger amounts of data. Based on HDFS, Hive can store data across the entire cluster. Data received by the server is stored in Hive, and the program reads the data using Hive tools. Hive itself does not store or compute data; it can be considered a client tool. Therefore, data is shared from Hive to MySQL using Sqoop.

[0051] ③. Data modeling includes the following steps:

[0052] like Figure 6 As shown, Python is used to analyze the data that has been preprocessed and build a CNN model. The prediction information is mainly modeled based on the selected data with high correlation. The data is divided into 75% training set and 25% test set. The training set is used to train the model, and the test set is used to test the accuracy of the model. The selection of training set and test set is random, and then the data is standardized to ensure that the variance of the feature data of each dimension is 1 and the mean is 0, so that the prediction results will not be dominated by the feature values ​​of certain dimensions that are too large. The PMML model is then used to export the trained model, so that the model can be used across platforms. The project uses the model established by the CNN algorithm to classify the data entered by the user, and finally displays the prediction results on the page;

[0053] Use the mini program to remind users of incorrect classifications, and if the number of times exceeds a certain limit, the user will be punished accordingly;

[0054] 5. Users can make adjustments based on feedback and can also appeal unreasonable penalties;

[0055] 6. The backend operation administrator will make reasonable judgments based on user complaints and monitor the smart trash can in real time through temperature sensors and gas sensors. Since some of the garbage in the bin may react with other garbage due to certain substances, causing some dangerous situations, and considering that the main factors causing dangerous situations are temperature and gas, the corresponding temperature sensors and gas sensors will be installed in the smart trash can to achieve interconnection between the device and the visual monitoring terminal, monitor the situation in the bin in real time, make advance analysis and response to some factors that may cause danger, and promptly monitor and report potential risks that have begun to appear;

[0056] 7. If there is a safety issue or the trash bin is overflowing, the system will contact the relevant management personnel for processing

[0057] 8. If Figure 7 As shown, the system background will count user data and display the information in real time on the visualization screen. The result analysis uses the visualization screen to systematically display the previously analyzed and processed data. The specific steps include obtaining data from MySQL, displaying the data in the form of a table through HTML+CSS+JS language to build a visualization module, sorting and screening out daily or monthly environmentally friendly families and contacting relevant personnel to give rewards. The data visualization display mainly uses a real-time summary and analysis of residents' daily garbage classification data and provides visual feedback by drawing corresponding feedback charts. The specific feedback content includes the display of residents' daily garbage category recycling indicators, the ranking of residents' daily garbage classification contributions, the operation of smart garbage bins at each disposal point, daily key environmental protection related information broadcasts, and relevant policy reforms and program maintenance information announcements. Relevant media equipment is placed at garbage classification disposal points and the general dispatch room for corresponding publicity and real-time regulation.

[0058] The above-described embodiments of the present invention do not limit the scope of protection of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A garbage classification method based on CNN algorithm and Internet of Things technology, characterized by: The following steps are involved: S1. The user logs in to the WeChat mini-program and takes photos of different types of garbage to classify them according to the mini-program's suggestions. S2. Use the mini program to locate the location closest to the user where garbage can be sorted and delivered; S3: The sorted garbage is placed into the bin according to the classification standards. The smart trash can uses a camera to take pictures of the garbage, and a pressure sensor to measure the weight change in the bin at that moment and record the user's operation information. S4. The edge device in the smart trash can runs a CNN model to analyze the trash and alerts the user through the mini-program if they misclassify the trash. If the number of misclassifications exceeds a certain limit, the user will be penalized accordingly. S5. Users can make adjustments based on feedback and file appeals against unreasonable penalties. S6. The backend operation administrator will make reasonable judgments based on user complaints and monitor the safety information feedback of the smart trash can in real time; S7. If there is a safety issue or the trash bin is overflowing, the system will contact the relevant management personnel for processing. S8. The system background will collect user data and display the information on the large-screen visualization in real time. It will also sort and select the environmentally friendly families on a daily or monthly basis and contact relevant personnel to give rewards.

2. The garbage classification method based on CNN algorithm and Internet of Things technology according to claim 1 is characterized by: In step S3, when the weight exceeds the rated value, the pressure sensor will transmit a signal to the main control board, and the main control board will control the warning light on the smart trash can to light up.

3. The garbage classification method based on CNN algorithm and Internet of Things technology according to claim 1 is characterized by: The data processing of the CNN model in step S4 includes deduplication and denoising of data information, construction of word segmentation index files, and data feature extraction. The collected data is filled with missing values, smoothed or deleted, and data inconsistencies are corrected to obtain standard continuous data. The data involving multiple data sources are then merged to generate a new data set, providing a unified data view for subsequent query and analysis processing.

4. The garbage classification method based on CNN algorithm and Internet of Things technology according to claim 1 is characterized by: The data migration and analysis of the CNN model in step S4 includes the following steps:

1. Import the processed data set into HDFS and use the Hive database based on the distributed file system to store the data; 2. The data received by the server is stored in Hive, and the program will read the data through the Hive tool class; 3. Data is shared from Hive to MySQL through Sqoop.

5. The garbage classification method based on CNN algorithm and Internet of Things technology according to claim 1 is characterized by: The data modeling of the CNN model in step S4 includes the following steps:

1. Use Python to analyze data that has been preprocessed; Second, the prediction information is mainly modeled based on the selected data with greater correlation.

6. The garbage classification method based on CNN algorithm and Internet of Things technology according to claim 5 is characterized by: In the data modeling of the CNN model, the data is divided into 75% training set and 25% test set. The selection of training set and test set is random, and then the data is standardized to ensure that the variance of the feature data in each dimension is 1 and the mean is 0.

7. The garbage classification method based on CNN algorithm and Internet of Things technology according to claim 1 is characterized by: In step S6, the smart trash can is monitored in real time through the temperature sensor and the gas sensor.

8. The garbage classification method based on CNN algorithm and Internet of Things technology according to claim 1 is characterized by: The result analysis in step S8 uses a large visual screen to systematically display the previously analyzed and processed data.

9. The garbage classification method based on CNN algorithm and Internet of Things technology according to claim 8 is characterized by: The specific steps of result analysis include obtaining data from MySQL and then displaying the data in a table by building a visualization module using HTML+CSS+JS language.