Solid waste identification method, device, equipment and storage medium

By training a solid waste identification model based on elemental data of non-solid waste, the problems of high cost and long cycle of traditional detection methods are solved, and fast and low-cost solid waste identification and classification are achieved.

CN119739966BActive Publication Date: 2025-11-25GUANGDONG WATSON INFORMATION TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411725212.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-11-25
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

Traditional chemical testing methods for hazardous solid waste are costly and have long testing cycles, making it difficult to achieve rapid on-site testing.

Method used

A solid waste identification model based on elemental data of non-solid waste is used for iterative training. By acquiring elemental detection data of the waste to be identified, data vectorization, feature extraction and classification layer are used for classification to generate solid waste identification results.

Benefits of technology

It reduces the labor and time costs of solid waste identification, shortens the detection cycle, and enables rapid detection and efficient classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739966B_ABST
    Figure CN119739966B_ABST
Patent Text Reader

Abstract

The application discloses a solid waste identification method, device and equipment and a storage medium, relates to the technical field of waste identification, and comprises the following steps: acquiring element detection data corresponding to to-be-identified waste; inputting the element detection data into a solid waste identification model to obtain a solid waste identification result output by the solid waste identification model, wherein the solid waste identification model is obtained by iterative training based on first element data of a plurality of groups of non-solid waste objects; and determining a target waste category of the to-be-identified waste based on the solid waste identification result. The application reduces the artificial and time costs of solid waste identification by performing data analysis on the element detection data corresponding to the to-be-identified waste by using a large model, shortens the detection period, and thus realizes rapid detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of waste identification technology, and in particular to a method, apparatus, equipment and storage medium for solid waste identification. Background Technology

[0002] Solid waste is generated in various fields, including industrial production, daily life, and construction. This waste includes, but is not limited to, scrap metal, plastic products, paper, glass, and organic waste, each with its unique physical and chemical properties. For example, plastic products vary in melting point and heat resistance depending on their polymer type and additives. Even within the same type of solid waste, different sources, production processes, usage history, environmental exposure, and pollution levels can lead to drastically different physical and chemical characteristics, further complicating solid waste identification.

[0003] However, traditional chemical testing methods for hazardous solid waste usually require specialized laboratory equipment and technical personnel, which are costly, have long testing cycles, and are difficult to implement for rapid on-site testing. Summary of the Invention

[0004] The main purpose of this application is to provide a method, apparatus, equipment and storage medium for solid waste identification, which aims to solve the problems of high cost and long time required for chemical detection of solid waste.

[0005] To achieve the above objectives, this application proposes a solid waste identification method, the method comprising:

[0006] Obtain element detection data corresponding to the waste to be identified;

[0007] The element detection data is input into the solid waste identification model to obtain the solid waste identification result output by the solid waste identification model. The solid waste identification model is obtained by iterative training based on the first element data of several sets of non-solid waste bodies.

[0008] Based on the solid waste identification results, the target waste category of the waste to be identified is determined.

[0009] In one embodiment, the training process of the solid waste identification model includes:

[0010] Obtain the first element data of several sets of non-solid waste materials;

[0011] Randomly missing data for each of the first element data is processed to obtain several sets of second element data.

[0012] The data of each of the second elements are input into the initial solid waste identification model for iterative training to obtain the solid waste identification model.

[0013] In one embodiment, the step of randomly missing each of the first element data to obtain several sets of second element data includes:

[0014] Obtain the preset missing elements and the average value of the missing elements corresponding to the preset missing elements;

[0015] The first element data corresponding to the preset missing element is randomly removed, and the average value of the missing element is used to fill in the data to obtain several sets of second element data.

[0016] In one embodiment, the initial solid waste identification model includes a data vectorization layer, a feature extraction layer, and a classification layer;

[0017] The step of inputting the data of each of the second elements into the initial solid waste identification model for iterative training to obtain the solid waste identification model includes:

[0018] Each of the second element data is input into the data vectorization layer to obtain several sets of third element data output by the data vectorization layer;

[0019] The feature extraction layer extracts element data features from each of the third element data;

[0020] The element data features are input into the classification layer for classification, and the first predicted value of each object category is obtained from the output of the classification layer.

[0021] Based on the first predicted value, the solid waste identification model is obtained.

[0022] In one embodiment, the step of inputting the element data features into the classification layer for classification to obtain a first predicted value for each object category output by the classification layer includes:

[0023] The element data features are input into the fully connected layer in the classification layer for classification to obtain a second predicted value;

[0024] The second predicted value is then mapped to a category to obtain the probability distribution value of each object category;

[0025] The probability distribution values ​​are integrated to generate the first predicted value.

[0026] In one embodiment, obtaining the solid waste identification model based on the first predicted value includes:

[0027] The error value is obtained by calculating the first predicted value, the preset sample label value, and the preset weight matrix;

[0028] The error value is compared with the preset expected range;

[0029] If the error value does not meet the preset expected range, the initial solid waste identification model is iteratively trained based on the error value to obtain the solid waste identification model.

[0030] In one embodiment, after comparing the error value with a preset expected range, the method further includes:

[0031] If the error value meets the preset expected range, then the initial solid waste identification model is used as the solid waste identification model.

[0032] Obtain the prediction accuracy and the actual number of samples corresponding to the solid waste identification model;

[0033] Based on the prediction accuracy and the actual number of samples, a confusion matrix and a statistical box plot are generated to optimize the solid waste identification model.

[0034] Furthermore, to achieve the above objectives, this application also proposes a solid waste identification device, which includes:

[0035] The acquisition module is used to acquire the element detection data corresponding to the waste to be identified;

[0036] The output module is used to input the element detection data into the solid waste identification model to obtain the solid waste identification result output by the solid waste identification model, wherein the solid waste identification model is obtained by iterative training based on several sets of conventional element data;

[0037] The classification module is used to determine the target waste category of the waste to be identified based on the solid waste identification results.

[0038] In addition, to achieve the above objectives, this application also proposes a solid waste identification device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the solid waste identification method as described above.

[0039] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the solid waste identification method described above.

[0040] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the solid waste identification method described above.

[0041] This application provides a solid waste identification method, apparatus, device, and storage medium. The solid waste identification method acquires element detection data corresponding to the waste to be identified, and then inputs the element detection data into a solid waste identification model to obtain the solid waste identification result output by the solid waste identification model. The solid waste identification model is obtained by iterative training based on the first element data of several sets of non-solid waste bodies. Based on the solid waste identification result, the target waste category of the waste to be identified is determined, thereby reducing the labor and time costs of solid waste identification, shortening the detection cycle, and achieving rapid detection. Attached Figure Description

[0042] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0043] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is a flowchart illustrating an embodiment of the solid waste identification method of this application.

[0045] Figure 2 This is a flowchart illustrating Embodiment 2 of the solid waste identification method of this application.

[0046] Figure 3 This is a flowchart illustrating Embodiment 3 of the solid waste identification method of this application;

[0047] Figure 4 A simplified flowchart illustrating the solid waste identification method of this application;

[0048] Figure 5 This is a schematic diagram of the module structure of the solid waste identification device according to an embodiment of this application;

[0049] Figure 6 This is a schematic diagram of the hardware operating environment involved in the solid waste identification method in this application embodiment.

[0050] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0051] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0052] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0053] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device, big data service platform, or solid waste identification system capable of realizing the above functions. The following description uses a solid waste identification system as an example to illustrate this embodiment and the subsequent embodiments.

[0054] Based on this, embodiments of this application provide a method for identifying solid waste, referring to... Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the solid waste identification method of this application.

[0055] In this embodiment, the solid waste identification method includes steps S11 to S13:

[0056] Step S11: Obtain the element detection data corresponding to the waste to be identified;

[0057] It should be noted that the waste to be identified refers to waste samples whose specific category needs to be determined. That is, they have not yet been classified and need to be tested and analyzed to determine whether they belong to solid waste, and if so, which category of solid waste the waste to be identified belongs to.

[0058] It should be further noted that the element detection data refers to the data of elements contained in the waste sample, including information such as the type, content, and proportion of elements, such as 'Fe', 'SiO2', 'CaO', 'Al2O3', 'MgO', 'TiO2', 'MnO', 'P', 'S', and 'FeO', which are used to characterize the chemical composition of the waste.

[0059] Specifically, elemental analysis is performed on the waste to be identified to obtain its chemical composition data, i.e., elemental detection data. This can be achieved through techniques such as spectral analysis and near-infrared spectroscopy, without limitation, to determine the content of various elements in the waste to be identified.

[0060] Step S12: Input the element detection data into the solid waste identification model to obtain the solid waste identification result output by the solid waste identification model. The solid waste identification model is obtained by iterative training based on the first element data of several sets of non-solid waste bodies.

[0061] It should be noted that the solid waste identification model is used to identify and classify solid waste based on the input element detection data. The solid waste identification result refers to the output of the solid waste identification model after analyzing the waste sample to be identified, including the waste classification label, such as metal, plastic, glass, etc., and possible confidence or probability scores.

[0062] It should be further noted that the term "non-solid waste" refers to substances or materials that do not belong to the category of solid waste. The first elemental data refers to the elemental data corresponding to the non-solid waste, which is used to iteratively train the solid waste identification model.

[0063] Step S13: Based on the solid waste identification results, determine the target waste category of the waste to be identified.

[0064] It should be noted that the target waste category refers to the specific classification or group to which the waste to be identified belongs after model analysis and judgment during the solid waste identification process, such as metal waste, glass waste, etc. There are no restrictions here, and it can be set according to the actual situation.

[0065] Specifically, based on the solid waste identification results, the target waste category of the waste to be identified is determined, that is, based on the solid waste identification results, it is determined whether the waste to be identified is solid waste, thereby achieving rapid detection of solid waste.

[0066] Furthermore, if the waste to be identified is not solid waste, the possible target waste category of the waste to be identified is output based on the solid waste identification result, so that the decision-maker can classify waste and treat solid waste according to the target waste category.

[0067] This embodiment obtains element detection data corresponding to the waste to be identified, and then inputs the element detection data into a solid waste identification model to obtain the solid waste identification result output by the solid waste identification model. The solid waste identification model is obtained by iterative training based on the first element data of several sets of non-solid waste bodies. Based on the solid waste identification result, the target waste category of the waste to be identified is determined, thereby reducing the labor and time costs consumed in solid waste identification, shortening the detection cycle, achieving rapid detection, and improving the efficiency and speed of waste treatment.

[0068] Based on this, embodiments of this application provide a method for identifying solid waste, referring to... Figure 2 , Figure 2 This is a flowchart illustrating Embodiment 2 of the solid waste identification method of this application.

[0069] In one feasible implementation, the training process of the solid waste identification model includes:

[0070] Step S21: Obtain the first element data of several sets of non-solid waste bodies;

[0071] Specifically, common non-solid waste materials in smelting waste can be obtained through online research and practical testing in research projects. Then, the first element data of these non-solid waste materials can be obtained through data collection and testing, such as arrays containing elements like 'Fe', 'SiO2', 'CaO', 'Al2O3', 'MgO', 'TiO2', 'MnO', 'P', 'S', and 'FeO'. For example, conventional steel generally contains the elements ['Fe', 'MnO', 'P', 'S', and 'FeO']. There are no restrictions on the acquisition method; it can be set according to the actual situation and depends on the classification requirements of solid waste.

[0072] Understandably, solid waste is identified by exploiting the overfitting behavior of the model to conventional data (i.e., the first element data of non-solid waste). In other words, after learning the features of conventional data, the model can accurately identify solid waste. Specifically, conventional data refers to normal, non-abnormal data samples that do not contain solid waste. This conventional data is used to train the deep learning model, enabling it to learn the features of normal states. Then, when the model encounters input data that is significantly different from this conventional data, such as data containing solid waste, the model will exhibit an abnormal response because the features of solid waste are inconsistent with the features of the conventional data the model has learned. This abnormal response is used to identify and distinguish solid waste, as the introduction of solid waste disrupts the normal pattern represented by the conventional data.

[0073] Therefore, conventional data serves as a benchmark for training and calibrating models. It helps models distinguish between normal and abnormal states (such as the presence of solid waste), thus eliminating the need for a large number of solid waste samples to train the model. Instead, existing conventional data models can be used to identify potential solid waste samples through sensitive detection of abnormal situations, thereby achieving an effective and resource-saving solid waste identification method.

[0074] Step S22: Randomly omit each of the first element data to obtain several sets of second element data;

[0075] It should be noted that the second element data refers to the dataset after random missing data processing.

[0076] Specifically, a preset missing element and the average value of the missing element corresponding to the preset missing element are obtained. Then, the first element data corresponding to the preset missing element is randomly removed, and the average value of the missing element is filled with data to obtain several sets of second element data.

[0077] Alternatively, the data for each of the second elements can be divided into a training set and a validation set in an 8:2 ratio. That is, 80% of the data is used to train the model so that it can learn and recognize the features of the element data, while the remaining 20% ​​of the data is used to validate the model's performance to ensure that the model has good generalization ability.

[0078] Step S23: Input the data of each of the second elements into the initial solid waste identification model for iterative training to obtain the solid waste identification model.

[0079] It should be noted that the initial solid waste identification model refers to the basic machine learning or deep learning model before the start of the training process. This initial model has not been trained, or it has some basic structure and parameter settings, but has not been iteratively trained with actual data.

[0080] Specifically, each of the second element data is input to the data vectorization layer to obtain several sets of third element data output by the data vectorization layer. Then, the element data features in each of the third element data are extracted by the feature extraction layer. The element data features are then input to the classification layer for classification to obtain the first predicted value of each object category output by the classification layer. Based on the first predicted value, the solid waste identification model is obtained.

[0081] This embodiment acquires first element data from several sets of non-solid waste materials, then randomly processes each set of first element data to obtain several sets of second element data. These second element data are then input into an initial solid waste identification model for iterative training to obtain the solid waste identification model. The random missing data processing simulates real-world data loss, enabling the model to learn how to make accurate predictions even with incomplete data, thereby improving its robustness. Simultaneously, the model can better adapt to new and unseen data, reducing the risk of overfitting and improving its generalization ability and adaptability. Ultimately, this leads to more accurate identification and classification of solid waste, enhancing identification accuracy.

[0082] In one feasible implementation, the step of randomly missing each of the first element data to obtain several sets of second element data includes:

[0083] Step S31: Obtain the preset missing element and the average value of the missing elements corresponding to the preset missing element;

[0084] Step S32: Randomly remove the first element data corresponding to the preset missing element, and fill the data with the average value of the missing element to obtain several sets of second element data.

[0085] It should be noted that the preset missing elements refer to elements (features) that may be missing in the dataset, which are determined in advance during the data preprocessing stage based on prior knowledge and understanding of the dataset. These elements may be data points missing due to measurement errors, incomplete data records, equipment failures, or other reasons. Therefore, identifying the preset missing elements helps to prepare processing strategies in advance, such as determining which features are important in the dataset and preparing appropriate processing methods to deal with their absence.

[0086] It should be further explained that the average value of missing elements refers to the average value of the elements appearing in the dataset when they are predefined missing elements. This average value is then used as the filler value. When these elements are missing in the actual data, their average value can be used to fill the missing elements and maintain the integrity of the data. For example, if the feature "humidity" is a predefined missing element in a dataset, then the average value of the missing elements for "humidity" is calculated, and when "humidity" data is missing, the average value of the missing elements is used to replace it.

[0087] Specifically, to address the issue of decreased model accuracy due to uncertain missing elements, random missing data is introduced into the input data. That is, during model training, a random element in the training input dataset (each first element data) is filled with the average value. During training, elements are randomly selected for missing data. Specifically, the first element data corresponding to the preset missing elements is randomly removed, and the average value of the missing elements is used to fill in the missing data, resulting in several sets of second element data. By determining fixed elements and potentially missing elements, the model simulates data missing data that may occur in the real world, thereby improving the model's accuracy.

[0088] This embodiment obtains a preset missing element and the average value of the missing elements corresponding to the preset missing element, then randomly removes the first element data corresponding to the preset missing element, and fills in the average value of the missing element to obtain several sets of second element data. By simulating data loss and filling, the model learns how to react when encountering incomplete data in real-world applications, thereby improving the model's robustness to data loss and its generalization ability when facing unknown data. At the same time, random removal and filling can reduce the bias caused by data loss, ensuring that model training is not affected by specific patterns, thus improving prediction accuracy.

[0089] Based on this, embodiments of this application provide a method for identifying solid waste, referring to... Figure 3 , Figure 3 This is a flowchart illustrating Embodiment 3 of the solid waste identification method of this application.

[0090] In one feasible implementation, the initial solid waste identification model includes a data vectorization layer, a feature extraction layer, and a classification layer; the step of inputting each of the second element data into the initial solid waste identification model for iterative training to obtain the solid waste identification model includes:

[0091] Step S41: Input each of the second element data into the data vectorization layer to obtain several sets of third element data output by the data vectorization layer;

[0092] It should be noted that the data vectorization layer refers to a layer in a deep learning model used to convert structured data into feature vectors. The feature extraction layer refers to the part of the model responsible for extracting useful features from the input data, which can be implemented through convolutional layers, pooling layers, or other types of network layers, thereby identifying patterns and features in the input data.

[0093] It should be further clarified that the classification layer refers to the part of the model responsible for mapping the extracted features to the final output category. In typical classification tasks, the classification layer can consist of a fully connected layer (also known as a dense layer) and an output layer, where the output layer typically uses the softmax function or other activation functions to generate the category probability distribution. The third element data refers to the data output after processing by the data vectorization layer.

[0094] Specifically, each of the second element data is input to the data vectorization layer to obtain several sets of third element data output by the data vectorization layer. After this embedded vectorization, discrete data can be represented by a continuous space. In one embodiment, in order to solve the problem that the number of features makes it difficult to fully vectorize and information fitting, 32 vectorized feature numbers are used.

[0095] Step S42: Extract element data features from each of the third element data through the feature extraction layer;

[0096] It should be noted that the element data features refer to useful information extracted from the third element data; these features represent the key attributes and patterns of the data. In deep learning models, the feature extraction layer automatically identifies and extracts these features for use in classification and other tasks.

[0097] Specifically, in one embodiment, the feature extraction layer employs a one-dimensional residual convolutional neural network. It takes 32 vectorized features as input, first passing them through input channel 1 (a convolutional layer 1 with a kernel size of 3×3 and a stride of 3), resulting in 16 output channels; then through a 3×3 max-downsampling pooling layer, also resulting in 16 output channels; finally, four residual network blocks are stacked, bringing the total output channels to 512. For each residual network block, staggered network layer 1 has 16 input channels, first passing through a 3×3 max-downsampling pooling operation with a stride of 2; then stacking three Bottleneck structures with a [1×1, 16; 3×3, 16; 1×1, 64] structure. This layer outputs 64 channels. Staggered network layer 2 has 64 input channels. First, the layer undergoes max-downsampling pooling with a 3×3 kernel and a stride of 2. Then, three Bottleneck structures of [1×1, 64; 3×3, 64; 1×1, 256] are stacked. This layer has 256 output channels. Staggered network layer 3 has 256 input channels. This layer then stacks four Bottleneck structures of [1×1, 128; 3×3, 128; 1×1, 512]. This layer has 512 output channels.

[0098] Bottleneck refers to a specific network layer structure used to reduce the number of parameters and computational cost while maintaining network performance. A Bottleneck structure typically consists of three convolutional layers: a first 1x1 convolutional layer reduces the number of input channels and parameters; a next 3x3 convolutional layer extracts features; and a final 1x1 convolutional layer increases the number of output channels, providing more feature maps for the next layer. This structure reduces computational complexity and the number of parameters while maintaining network depth by reducing the dimensionality of intermediate feature maps (i.e., the "bottleneck").

[0099] Step S43: Input the element data features into the classification layer for classification, and obtain the first predicted value of each object category output by the classification layer;

[0100] It should be noted that the object category refers to the target category identified and classified by the model, which represents different types of objects or waste. In the solid waste identification model, the object category may include various types of solid waste, such as metal, plastic, glass, paper, organic waste, hazardous waste, etc., without limitation.

[0101] It should be further noted that the first predicted value refers to the preliminary prediction result given by the model based on the input data and extracted features. In one embodiment, the first predicted value is the category probability or score, which represents the model's confidence that each input sample belongs to each category.

[0102] Specifically, the element data features are input into the fully connected layer in the classification layer for classification to obtain a second predicted value. Then, the second predicted value is mapped to a category to obtain the probability distribution value of each object category. The probability distribution values ​​are then integrated to generate the first predicted value.

[0103] Step S44: Based on the first predicted value, obtain the solid waste identification model.

[0104] Specifically, the first predicted value, the preset sample label value, and the preset weight matrix are calculated to obtain an error value. The error value is then compared with a preset expected range. If the error value does not conform to the preset expected range, the initial solid waste identification model is iteratively trained based on the error value to obtain the solid waste identification model.

[0105] In this embodiment, each of the second element data is input into the data vectorization layer to obtain several sets of third element data output by the data vectorization layer. Then, the feature extraction layer extracts the element data features from each of the third element data, and inputs the element data features into the classification layer for classification to obtain the first predicted value of each object category output by the classification layer. Based on the first predicted value, the solid waste identification model is obtained, which helps the model to learn and identify patterns more effectively, enables the model to handle high-dimensional data, improves classification accuracy, and reduces the risk of model overfitting.

[0106] In one feasible implementation, the step of inputting the element data features into the classification layer for classification to obtain a first predicted value for each object category output by the classification layer includes:

[0107] Step S51: Input the element data features into the fully connected layer in the classification layer for classification to obtain the second predicted value;

[0108] It should be noted that the Fully Connected Layer (FCL) is a layer in a neural network where each neuron is connected to all neurons in the previous layer. In Convolutional Neural Networks (CNNs), fully connected layers are typically located at the end of the network and are used to map learned high-level features to the final output category. Furthermore, in a fully connected layer, each input feature is considered independently, and the contribution of each input feature to each output node is weighted. The second predicted value refers to the raw prediction result directly output by the fully connected layer.

[0109] Specifically, the element data features are input into the classification layer, which uses two fully connected layers and incorporates the dropout method to reduce overfitting, thereby obtaining a second predicted value.

[0110] Step S52: Map the second predicted value to a category to obtain the probability distribution value of each object category;

[0111] It should be noted that the probability distribution values ​​refer to the normalized predicted values, which represent the model's probability estimate of the input data belonging to each category.

[0112] Specifically, the second predicted value is mapped to the category space, for example, the output category is 33 categories. Then, the output of the fully connected layer is normalized using the Softmax function to obtain the probability distribution value of each category. This probability distribution value is then used directly as the confidence level. The normalization is usually achieved by the softmax function, which converts the second predicted value (logits) into a probability value so that the sum of the probabilities of all categories is 1.

[0113] Step S53: Integrate the probability distribution values ​​to generate the first predicted value.

[0114] This embodiment classifies the element data features by inputting them into a fully connected layer in the classification layer to obtain a second predicted value. The second predicted value is then mapped to a category to obtain the probability distribution value for each object category. These probability distribution values ​​are then integrated to generate the first predicted value. Furthermore, the fully connected layer learns the complex relationships between features, improving classification accuracy and ensuring that the output values ​​are on the same scale. This contributes to the model's stability and convergence, helping decision-makers understand the model's confidence level for each category and thus make better decisions.

[0115] In one feasible implementation, obtaining the solid waste identification model based on the first predicted value includes:

[0116] Step S61: Calculate the error value by taking the first predicted value, the preset sample label value, and the preset weight matrix;

[0117] It should be noted that the preset sample label value refers to the true category or value corresponding to each sample when training and testing the machine learning model, so that the model's prediction results can be compared with the label value to evaluate its performance.

[0118] It should be further clarified that the preset weight matrix refers to a matrix used in machine learning models, especially in classification problems, to adjust the weights of samples from different classes. The purpose of this weight matrix is ​​to address class imbalance or to give more attention to certain classes based on business needs. The error value refers to the difference or gap between the model's predicted value and the true label value.

[0119] Specifically, the error value is obtained by calculating the first predicted value and the preset sample label value according to the error value calculation formula. In one embodiment, in order to handle the case of sample imbalance, weights are introduced to balance the losses of different categories. The error value calculation formula is as follows:

[0120] H(p,q)=-∑ x ((γ l p(x)logq(x)))

[0121] Where H(p, q) is the cross-entropy loss between two probability distributions p and q, where p and q represent the model prediction and the actual label value, respectively, and γ l A fixed weight matrix will be calculated based on the actual amount of data for different categories. When the sample size is large, γ l This will reduce the number of imbalanced samples, thus achieving loss function feedback. p(x) is the true distribution (i.e., the true probability of each class; typically in classification problems, the probability of the correct class is 1, and the probability of other classes is 0), and q(x) is the predicted distribution, i.e., the probability of each class predicted by the model.

[0122] Step S62: Compare the error value with the preset expected range;

[0123] It should be noted that the preset expected range refers to an acceptable range or threshold set for error values ​​during model training, used to determine whether the model's performance has reached the expected standard. Specifically, if the error value meets the preset expected range, it indicates that the model is good enough, and training can be stopped or further adjustments made; if the error value does not meet the preset expected range, it indicates that the model needs further training or parameter adjustments.

[0124] Step S63: If the error value does not meet the preset expected range, then based on the error value, the initial solid waste identification model is iteratively trained to obtain the solid waste identification model.

[0125] It should be noted that if the error value does not meet the preset expected range, the initial solid waste identification model is iteratively trained based on the error value to obtain the solid waste identification model. In one embodiment, when the error value does not meet the preset expected range, the error value is fed back to the model, and the weights are updated according to the error value. This iterative training process continues until the error value meets the preset expected range. The initial solid waste identification model with the error value meeting the preset expected range is then used as the solid waste identification model, allowing the model to gradually learn the patterns and rules in the data, thereby improving the prediction accuracy of solid waste elements. The weight update uses a chain rule, that is, the partial derivative or deviation matrix of the weights is calculated, and the partial derivative value is added to the original weights to obtain a new weight matrix. Furthermore, the optimizer uses an adaptive time estimation method, which can estimate the step size of each parameter based on its historical gradient, thereby adaptively adjusting the learning rate to update the model parameters.

[0126] In addition, after determining the solid waste identification model, the performance of the model can be evaluated using validation set data, where evaluation metrics include accuracy, recall, F1 score, etc.

[0127] This embodiment calculates an error value by taking the first predicted value, the preset sample label value, and the preset weight matrix. The error value is then compared with a preset expected range. If the error value does not meet the preset expected range, the initial solid waste identification model is iteratively trained based on the error value to obtain the solid waste identification model. The model is then dynamically adjusted according to the actual error value to adapt to specific characteristics or changes in the data. This continuous iterative training gradually reduces the error between the predicted value and the true label, thereby improving classification accuracy. Simultaneously, it avoids overfitting the model to the training data, ensuring the model has good generalization ability.

[0128] In one feasible implementation, after comparing the error value with a preset expected range, the method further includes:

[0129] Step S71: If the error value meets the preset expected range, then the initial solid waste identification model is used as the solid waste identification model.

[0130] Specifically, after using the initial solid waste identification model as the solid waste identification model, in order to improve the reliability of the evaluation, a 10-fold cross-validation method is used to evaluate the solid waste identification model. Cross-validation is a statistical analysis method that divides the dataset into multiple parts and repeatedly trains and evaluates the model on each part to ensure the stability and accuracy of the evaluation results.

[0131] Step S72: Obtain the prediction accuracy and actual number of samples corresponding to the solid waste identification model;

[0132] It should be noted that the prediction accuracy refers to the proportion of samples correctly predicted by the model out of the total number of samples. The actual number of samples refers to the number of samples actually used in model training.

[0133] Step S73: Based on the prediction accuracy and the actual number of samples, generate a confusion matrix and a statistical box plot to optimize the solid waste identification model.

[0134] It should be noted that the confusion matrix is ​​used to show the relationship between the model's prediction results and the actual labels. It displays the correct and incorrect predictions for each category in matrix form. Each cell of the confusion matrix represents a combination of the actual category and the predicted category, such as true positive (TP), false positive (FP), true negative (TN), and false negative (FN). This helps to identify which categories the model performs well on, which categories need improvement, and whether the model has specific biases.

[0135] It should be further noted that the statistical box plot is a statistical chart used to display the distribution characteristics of the data, providing an intuitive display of the minimum, first quartile (Q1), median (Q2), third quartile (Q3), and maximum value of the data, and can also mark outliers in the data, thereby showing the distribution of the model's predicted values.

[0136] Specifically, a confusion matrix is ​​created by combining the accuracy and the number of actual samples in the validation set. In one embodiment, the X-axis of the confusion matrix represents the actual class, the Y-axis represents the predicted class, and the diagonal represents the correctly predicted class. This allows the model's performance to be visualized by plotting the confusion matrix, showing the model's prediction accuracy for the waste to be identified.

[0137] This embodiment uses the initial solid waste identification model as the solid waste identification model if the error value meets the preset expected range. It then obtains the prediction accuracy and actual sample number corresponding to the solid waste identification model. Based on the prediction accuracy and actual sample number, it generates a confusion matrix and a statistical box plot to optimize the solid waste identification model. This ensures that the model's performance meets the expected standards. The confusion matrix visually displays the model's performance in each category, including the number of correct and incorrect classifications, helping to identify which categories the model performs poorly in and providing direction for model optimization. Furthermore, if the model is found to perform poorly in certain categories, it can guide the collection of more data in those categories to improve the model.

[0138] For example, to help understand the implementation process of the solid waste identification method, please refer to... Figure 4 , Figure 4 A simplified flowchart illustrating the solid waste identification method of this application.

[0139] It should be noted that the examples in the figure are only for understanding this application and do not constitute a limitation on the solid waste identification method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0140] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0141] This application also provides a solid waste identification device; please refer to... Figure 5 The solid waste identification device includes:

[0142] The acquisition module 51 is used to acquire the element detection data corresponding to the waste to be identified;

[0143] Output module 52 is used to input the element detection data into the solid waste identification model to obtain the solid waste identification result output by the solid waste identification model, wherein the solid waste identification model is obtained by iterative training based on several sets of conventional element data;

[0144] The classification module 53 is used to determine the target waste category of the waste to be identified based on the solid waste identification results.

[0145] The solid waste identification device is also used for:

[0146] Obtain the first element data of several sets of non-solid waste materials;

[0147] Randomly missing data for each of the first element data is processed to obtain several sets of second element data.

[0148] The data of each of the second elements are input into the initial solid waste identification model for iterative training to obtain the solid waste identification model.

[0149] The solid waste identification device is also used for:

[0150] Obtain the preset missing elements and the average value of the missing elements corresponding to the preset missing elements;

[0151] The first element data corresponding to the preset missing element is randomly removed, and the average value of the missing element is used to fill in the data to obtain several sets of second element data.

[0152] The solid waste identification device is also used for:

[0153] Each of the second element data is input into the data vectorization layer to obtain several sets of third element data output by the data vectorization layer;

[0154] The feature extraction layer extracts element data features from each of the third element data;

[0155] The element data features are input into the classification layer for classification, and the first predicted value of each object category is obtained from the output of the classification layer.

[0156] Based on the first predicted value, the solid waste identification model is obtained.

[0157] The solid waste identification device is also used for:

[0158] The element data features are input into the fully connected layer in the classification layer for classification to obtain a second predicted value;

[0159] The second predicted value is then mapped to a category to obtain the probability distribution value of each object category;

[0160] The probability distribution values ​​are integrated to generate the first predicted value.

[0161] The solid waste identification device is also used for:

[0162] The error value is obtained by calculating the first predicted value, the preset sample label value, and the preset weight matrix;

[0163] The error value is compared with the preset expected range;

[0164] If the error value does not meet the preset expected range, the initial solid waste identification model is iteratively trained based on the error value to obtain the solid waste identification model.

[0165] The solid waste identification device is also used for:

[0166] If the error value meets the preset expected range, then the initial solid waste identification model is used as the solid waste identification model.

[0167] Obtain the prediction accuracy and the actual number of samples corresponding to the solid waste identification model;

[0168] Based on the prediction accuracy and the actual number of samples, a confusion matrix and a statistical box plot are generated to optimize the solid waste identification model.

[0169] The solid waste identification device provided in this application, employing the solid waste identification method in the above embodiments, can solve the technical problems mentioned in the background art. Compared with the prior art, the beneficial effects of the solid waste identification device provided in this application are the same as those of the solid waste identification method provided in the above embodiments, and other technical features in the solid waste identification device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0170] This application provides a solid waste identification device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the solid waste identification method in Embodiment 1 above.

[0171] The following is for reference. Figure 6 The diagram illustrates a structural schematic suitable for implementing the solid waste identification device of the embodiments of this application. The solid waste identification device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), vehicle terminals (e.g., vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The solid waste identification device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.

[0172] like Figure 6As shown, the solid waste identification device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the solid waste identification device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the solid waste identification device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show solid waste identification devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0173] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0174] The solid waste identification device provided in this application, employing the solid waste identification method in the above embodiments, can solve the technical problems mentioned in the background art. Compared with the prior art, the beneficial effects of the solid waste identification device provided in this application are the same as those of the solid waste identification method provided in the above embodiments, and other technical features of the solid waste identification device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0175] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0176] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0177] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the solid waste identification method in the above embodiments.

[0178] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0179] The aforementioned computer-readable storage medium may be included in the solid waste identification device; or it may exist independently and not assembled into the solid waste identification device.

[0180] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the solid waste identification device, cause the solid waste identification device to:

[0181] Obtain element detection data corresponding to the waste to be identified;

[0182] The element detection data is input into the solid waste identification model to obtain the solid waste identification result output by the solid waste identification model. The solid waste identification model is obtained by iterative training based on the first element data of several sets of non-solid waste bodies.

[0183] Based on the solid waste identification results, the target waste category of the waste to be identified is determined.

[0184] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0185] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0186] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0187] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described solid waste identification method, and is capable of solving the technical problems described in the background art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the solid waste identification method provided in the above embodiments, and will not be repeated here.

[0188] This application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the solid waste identification method described above.

[0189] The computer program product provided in this application can solve the technical problems described in the background section. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as the beneficial effects of the solid waste identification method provided in the above embodiments, and will not be repeated here.

[0190] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for identifying solid waste, characterized in that, include: Obtain element detection data corresponding to the waste to be identified; The element detection data is input into the solid waste identification model to obtain the solid waste identification result output by the solid waste identification model. The solid waste identification model is obtained by iterative training based on the first element data of several sets of non-solid waste bodies. Based on the solid waste identification results, the target waste category of the waste to be identified is determined; The training process of the solid waste identification model includes: Acquire first element data of several sets of non-solid waste bodies; randomly delete each set of first element data to obtain several sets of second element data; input each set of second element data into an initial solid waste identification model for iterative training to obtain the solid waste identification model, wherein the initial solid waste identification model includes a data vectorization layer, a feature extraction layer and a classification layer; Each of the second element data is input into the data vectorization layer to obtain several sets of third element data output by the data vectorization layer; the element data features in each of the third element data are extracted by the feature extraction layer; the element data features are input into the classification layer for classification to obtain the first predicted value of each object category output by the classification layer; based on the first predicted value, the solid waste identification model is obtained.

2. The solid waste identification method as described in claim 1, characterized in that, The step of randomly missing each of the first element data to obtain several sets of second element data includes: Obtain the preset missing elements and the average value of the missing elements corresponding to the preset missing elements; The first element data corresponding to the preset missing element is randomly removed, and the average value of the missing element is used to fill in the data to obtain several sets of second element data.

3. The solid waste identification method as described in claim 1, characterized in that, The step of inputting the element data features into the classification layer for classification, and obtaining the first predicted value of each object category output by the classification layer, includes: The element data features are input into the fully connected layer in the classification layer for classification to obtain a second predicted value; The second predicted value is then mapped to a category to obtain the probability distribution value of each object category; The probability distribution values ​​are integrated to generate the first predicted value.

4. The solid waste identification method as described in claim 1, characterized in that, The solid waste identification model obtained based on the first predicted value includes: The error value is obtained by calculating the first predicted value, the preset sample label value, and the preset weight matrix; The error value is compared with the preset expected range; If the error value does not meet the preset expected range, the initial solid waste identification model is iteratively trained based on the error value to obtain the solid waste identification model.

5. The solid waste identification method as described in claim 4, characterized in that, After comparing the error value with the preset expected range, the method further includes: If the error value meets the preset expected range, then the initial solid waste identification model is used as the solid waste identification model. Obtain the prediction accuracy and the actual number of samples corresponding to the solid waste identification model; Based on the prediction accuracy and the actual number of samples, a confusion matrix and a statistical box plot are generated to optimize the solid waste identification model.

6. A solid waste identification device, characterized in that, include: The acquisition module is used to acquire the element detection data corresponding to the waste to be identified; The output module is used to input the element detection data into the solid waste identification model to obtain the solid waste identification result output by the solid waste identification model, wherein the solid waste identification model is obtained by iterative training based on several sets of conventional element data; The classification module is used to determine the target waste category of the waste to be identified based on the solid waste identification results; The training module is used to acquire first element data of several sets of non-solid waste bodies; randomly missing each set of first element data to obtain several sets of second element data; input each set of second element data into an initial solid waste identification model for iterative training to obtain the solid waste identification model, wherein the initial solid waste identification model includes a data vectorization layer, a feature extraction layer and a classification layer; The training module is further configured to input each of the second element data into the data vectorization layer to obtain several sets of third element data output by the data vectorization layer; extract element data features from each of the third element data through the feature extraction layer; input the element data features into the classification layer for classification to obtain a first predicted value for each object category output by the classification layer; and obtain the solid waste identification model based on the first predicted value.

7. A solid waste identification device, characterized in that, The solid waste identification device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the solid waste identification method as described in any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the solid waste identification method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data classification method and device, computer device and storage medium

    CN110196908A

  • Solid waste identification method based on spectral image

    CN115600087A