Solid waste feature extraction method and device
By extracting and fusion the various spectral data of solid waste, the problem of the inability to fully extract the resource and environmental characteristics of solid waste in the prior art is solved, and the accurate characteristic characterization of solid waste is achieved.
Patent Information
- Application Number
- CN202411984322.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is difficult to fully extract the resource and environmental characteristics of solid waste, resulting in the inability to accurately characterize solid waste.
By obtaining various types of spectrum data groups, pre-processing and inputting them into the feature extraction model, extracting the resource and environmental feature groups of each spectrum data group, and inputting these feature groups into the feature fusion model, and fusing them into the resource and environmental feature set of solid waste to be detected.
A comprehensive feature extraction of solid waste is achieved, and the resource and environmental characteristics of solid waste can be accurately characterized.
Smart Images

Figure CN119988931A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of solid waste detection, and in particular to a method and device for extracting features of solid waste. Background Art
[0002] Solid waste refers to solid and semi-solid waste materials generated by humans in production, consumption, life and other activities. The composition of solid waste is extremely complex. It is crucial to accurately extract the resource and environmental characteristics of solid waste and recycle solid waste resources based on the resource and environmental characteristics of solid waste.
[0003] At present, it is usually necessary to first collect one of the spectral data, acoustic spectrum data, spectral data or energy spectrum data corresponding to solid waste, and then use the corresponding extraction algorithm to perform feature extraction processing on the collected spectral data to obtain the resource and environmental characteristics corresponding to the solid waste. However, feature extraction processing of a single type of spectral data can only extract some resource and environmental characteristics corresponding to the solid waste, and thus cannot accurately characterize the solid waste. Summary of the invention
[0004] The embodiments of the present application provide a method and device for extracting characteristics of solid waste, the main purpose of which is to comprehensively extract the resource and environmental characteristics of solid waste.
[0005] In order to solve the above technical problems, the embodiments of the present application provide the following technical solutions:
[0006] In a first aspect, the present application provides a method for extracting features of solid waste, the method comprising:
[0007] Obtaining a spectrum data set corresponding to the solid waste to be detected, wherein the spectrum data set includes a plurality of spectrum data groups, the plurality of spectrum data included in each spectrum data group are spectrum data of the same type, and the spectrum data included in any two spectrum data groups are spectrum data of different types;
[0008] Preprocessing the multiple spectrum data contained in each spectrum data group;
[0009] Inputting the plurality of preprocessed spectrogram data contained in each of the spectrogram data groups into a feature extraction model respectively, so that the feature extraction model outputs a resource environment feature group corresponding to each of the spectrogram data groups;
[0010] The resource and environmental feature groups corresponding to the multiple spectral data groups are input into the feature fusion model so that the feature fusion model outputs the resource and environmental feature sets corresponding to the solid waste to be detected.
[0011] In a second aspect, the present application further provides a solid waste feature extraction device, the device comprising:
[0012] An acquisition unit, used for acquiring a spectrum data set corresponding to the solid waste to be detected, wherein the spectrum data set includes a plurality of spectrum data groups, the plurality of spectrum data included in each spectrum data group are spectrum data of the same type, and the spectrum data included in any two spectrum data groups are spectrum data of different types;
[0013] A processing unit, used for preprocessing the multiple spectrogram data contained in each of the spectrogram data groups;
[0014] A first input unit is used to input a plurality of preprocessed spectrogram data contained in each of the spectrogram data groups into a feature extraction model, so that the feature extraction model outputs a resource environment feature group corresponding to each of the spectrogram data groups;
[0015] The second input unit is used to input the resource and environmental feature groups corresponding to the multiple spectrum data groups into the feature fusion model, so that the feature fusion model outputs the resource and environmental feature set corresponding to the solid waste to be detected.
[0016] In a third aspect, an embodiment of the present application provides a storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the feature extraction method of solid waste described in the first aspect.
[0017] In a fourth aspect, an embodiment of the present application provides a device for extracting characteristics of solid waste, the device comprising a storage medium; and one or more processors, the storage medium being coupled to the processor, the processor being configured to execute program instructions stored in the storage medium; when the program instructions are executed, the method for extracting characteristics of solid waste described in the first aspect is executed.
[0018] By means of the above technical solution, the technical solution provided by this application has at least the following advantages:
[0019] The present application provides a method and device for extracting features of solid waste. The present application can obtain the spectral data set corresponding to the solid waste to be detected by the staff using multiple acquisition devices, and store the collected spectral data of multiple types as the spectral data set corresponding to the solid waste to be detected in the local storage space of the target terminal device. The spectral data set corresponding to the solid waste to be detected is obtained by the feature extraction application in the local storage space corresponding to the target terminal device, and after preprocessing the multiple spectral data contained in each spectral data group, the multiple preprocessed spectral data contained in each spectral data group are respectively input into the feature extraction model, so as to obtain the resource and environmental feature group corresponding to each spectral data group, and the resource and environmental feature groups corresponding to the multiple spectral data groups are input into the feature fusion model, so as to obtain the resource and environmental feature set corresponding to the solid waste to be detected. Since, in the present application, the spectral data of multiple types corresponding to the solid waste to be detected are subjected to feature extraction processing, and the extracted multiple resource and environmental feature groups are subjected to fusion processing, the resource and environmental features of the solid waste to be detected can be fully extracted.
[0020] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0022] Figure 1 A flow chart of a method for extracting features of solid waste provided in an embodiment of the present application is shown;
[0023] Figure 2 A flow chart of another method for extracting features of solid waste provided in an embodiment of the present application is shown;
[0024] Figure 3 A block diagram of a solid waste feature extraction device provided in an embodiment of the present application is shown;
[0025] Figure 4 A block diagram of another solid waste feature extraction device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0027] In addition, the words “first”, “second” and the like used in the present application do not indicate any order, quantity or importance, but are only used to distinguish different parts.
[0028] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.
[0029] At present, it is usually necessary to first collect one of the spectral data, acoustic spectrum data, spectral data or energy spectrum data corresponding to solid waste, and then use the corresponding extraction algorithm to perform feature extraction processing on the collected spectral data to obtain the resource and environmental characteristics corresponding to the solid waste. However, feature extraction processing of a single type of spectral data can only extract some resource and environmental characteristics corresponding to the solid waste, and thus cannot accurately characterize the solid waste.
[0030] Therefore, in order to comprehensively extract the resource and environmental characteristics of solid waste, the present application embodiment provides a method for extracting characteristics of solid waste, such as Figure 1 As shown, the method at least includes 101-104.
[0031] 101. Obtain a spectrum data set corresponding to the solid waste to be detected.
[0032] Among them, the solid waste to be detected is the solid waste that needs to be feature extracted; wherein the spectrum data set contains multiple spectrum data groups, each spectrum data group contains multiple spectrum data of the same type of spectrum data, and any two spectrum data groups contain spectrum data of different types of spectrum data. The multiple spectrum data groups can be but are not limited to: ultrasonic spectrum data groups, image data groups, high-spectrum spectrum data groups, terahertz spectrum data groups, energy spectrum text data groups and infrared spectrum data groups, etc.; wherein the embodiment of the present application does not specifically limit the number of spectrum data contained in each spectrum data group.
[0033] In the embodiment of the present application, the execution subject in each step is a feature extraction application running in the target terminal device, wherein the target terminal device can be but is not limited to: a computer, a tablet computer, a laptop computer, etc.
[0034] When the staff needs to extract the resource and environmental characteristics corresponding to a certain solid waste (i.e., the solid waste to be detected), the staff needs to first use a variety of acquisition devices to collect multiple types of spectral data corresponding to the solid waste to be detected, for example, use a high-definition camera to collect multiple image data corresponding to the solid waste to be detected, use a hyperspectrometer to collect multiple high-spectral graph data corresponding to the solid waste to be detected, use an attenuated total reflection Fourier infrared spectrometer to collect multiple infrared spectrum data corresponding to the solid waste to be detected, use an energy spectrometer to collect multiple energy spectrum text data corresponding to the solid waste to be detected, and so on, and store the collected multiple types of spectral data as a spectral data set corresponding to the solid waste to be detected in the local storage space of the target terminal device; when the staff sends the corresponding instruction to the feature extraction application, the feature extraction application can obtain the spectral data set corresponding to the solid waste to be detected in the local storage space corresponding to the target terminal device.
[0035] 102. Preprocess the multiple spectrum data included in each spectrum data group.
[0036] After obtaining the spectral data set corresponding to the solid waste to be detected, the feature extraction application can pre-process the multiple spectral data contained in each spectral data set in turn.
[0037] 103. Input the plurality of pre-processed spectrum data contained in each spectrum data group into the feature extraction model respectively, so that the feature extraction model outputs the resource environment feature group corresponding to each spectrum data group.
[0038] Among them, for any spectral data group, its corresponding resource and environmental characteristic group includes parameter values corresponding to one or more characteristic parameters such as phase composition, crystal structure, low calorific value, activation energy, element type, density, water content, heavy metal type, organic solvent type, volatile organic matter, formaldehyde, sulfur oxides, nitrogen oxides and so on.
[0039] After the feature extraction application preprocesses the multiple spectrum data contained in each spectrum data group in turn, it is necessary to input the multiple preprocessed spectrum data contained in each spectrum data group into the feature extraction model respectively, so that the feature extraction model outputs the resource and environment feature group corresponding to each spectrum data group, that is, firstly input the multiple preprocessed spectrum data contained in the first spectrum data group into the feature extraction model, so that the feature extraction model outputs the resource and environment feature group corresponding to the first spectrum data group, and then input the multiple preprocessed spectrum data contained in the second spectrum data group into the feature extraction model, so that the feature extraction model outputs the resource and environment feature group corresponding to the second spectrum data group...Finally, input the multiple preprocessed spectrum data contained in the last spectrum data group into the feature extraction model, so that the feature extraction model outputs the resource and environment feature group corresponding to the last spectrum data group.
[0040] 104. Input resource and environmental feature groups corresponding to the multiple spectrum data groups into a feature fusion model so that the feature fusion model outputs a resource and environmental feature set corresponding to the solid waste to be detected.
[0041] Because after feature extraction processing is performed on different types of spectral data, the types of feature parameters obtained are also different, and when feature extraction processing is performed on different types of spectral data, when the parameter value corresponding to a certain feature parameter can be obtained, the obtained parameter value may also be different. Therefore, after the feature extraction application obtains the resource and environmental feature group corresponding to each spectral data group, it is also necessary to fuse multiple resource and environmental feature groups, that is, input the resource and environmental feature groups corresponding to multiple spectral data groups into the feature fusion model, so that the feature fusion model outputs the resource and environmental feature set corresponding to the solid waste to be detected.
[0042] The embodiment of the present application provides a method for extracting features of solid waste. The embodiment of the present application can obtain the spectral data set corresponding to the solid waste to be detected by the staff using multiple acquisition devices, and store the collected spectral data of multiple types as the spectral data set corresponding to the solid waste to be detected in the local storage space of the target terminal device. After that, the feature extraction application obtains the spectral data set corresponding to the solid waste to be detected in the local storage space corresponding to the target terminal device, and after preprocessing the multiple spectral data contained in each spectral data group, the multiple preprocessed spectral data contained in each spectral data group are respectively input into the feature extraction model, so as to obtain the resource and environmental feature group corresponding to each spectral data group, and the resource and environmental feature groups corresponding to the multiple spectral data groups are input into the feature fusion model, so as to obtain the resource and environmental feature set corresponding to the solid waste to be detected. Since, in the embodiment of the present application, the spectral data of multiple types corresponding to the solid waste to be detected are subjected to feature extraction processing, and the extracted multiple resource and environmental feature groups are subjected to fusion processing, the resource and environmental features of the solid waste to be detected can be fully extracted.
[0043] To explain in more detail below, the present application embodiment provides another method for extracting features of solid waste, specifically: Figure 2 As shown, the method includes at least 201-205.
[0044] 201. Train a first deep learning model based on a first training sample set to obtain a feature extraction model, and train a second deep learning model based on a second training sample set to obtain a feature fusion model.
[0045] In order to ensure that the feature extraction application can accurately determine the resource and environmental feature set corresponding to a solid waste based on the spectral data set corresponding to the solid waste after obtaining the spectral data set corresponding to the solid waste, it is necessary to pre-train the feature extraction model and feature fusion model. The following will explain in detail how to train the feature extraction model and feature fusion model.
[0046] (1) Obtain a first training sample set and a second training sample set; wherein the first training sample set includes a plurality of first training samples, and for any one of the first training samples, the first training sample includes a sample spectrum data group and a resource and environmental feature set corresponding to the sample spectrum data group, and the sample spectrum data group may be, but is not limited to, any one of: an ultrasonic spectrum data group, an image data group, a hyperspectral data group, a terahertz spectrum data group, an energy spectrum text data group, and an infrared spectrum data group; and for any one of the second training samples, the second training sample set includes a plurality of sample resource and environmental feature groups and a sample resource and environmental feature set corresponding to the plurality of sample resource and environmental feature groups, wherein the plurality of sample resource and environmental feature groups are obtained by performing feature extraction processing on a plurality of types of spectrum data groups corresponding to the same sample solid waste, and the sample resource and environmental feature set corresponding to the plurality of sample resource and environmental feature groups is the resource and environmental feature set corresponding to the sample solid waste.
[0047] (2) Training the first deep learning model based on the first training sample set until the loss function corresponding to the first deep learning model converges to obtain a feature extraction model.
[0048] Among them, the first deep learning model can be a deep learning model established according to any existing deep learning algorithm, and the embodiment of the present application does not specifically limit this.
[0049] The first deep learning model is iteratively trained based on a first training sample set including multiple first training samples; wherein, after each round of training, it is determined whether the loss function of the first deep learning model converges; if the loss function converges, the first deep learning model obtained after this round of training is determined as the feature extraction model; if the loss function does not converge, the model parameters of the first deep learning model are optimized and adjusted according to the loss function, and the next round of training is entered based on the optimized and adjusted first deep learning model.
[0050] That is, after performing multiple rounds of iterative training on the first deep learning model based on the first training sample set, when the loss function of the first deep learning model converges, it is determined that the first deep learning model at this time is a feature extraction model.
[0051] It should be noted that, in actual application, before training the first deep learning model based on the first training sample set, it is necessary to preprocess each sample spectrum data in the sample spectrum data group contained in each first training sample. The specific process can refer to the relevant description in step 203.
[0052] Because, in certain specific cases, even after a large number of iterative trainings, the loss function of the first deep learning model will not converge. Therefore, in order to avoid the iterative training of the first deep learning model from continuing endlessly, when it is determined that the loss function of the first deep learning model obtained after the current round of training has not converged, the following two methods may be used for processing, but are not limited to:
[0053] 1. If the loss function of the first deep learning model has not converged, determine whether the current cumulative iterative training time of the iterative training of the first deep learning model based on the training sample set reaches a preset time threshold.
[0054] If the current cumulative iterative training time reaches the preset time threshold, it means that the iterative training time has met the requirement. At this time, the iterative training can be stopped, and the first deep learning model obtained after this round of training is determined as the feature extraction model.
[0055] If the current cumulative iterative training time does not reach the preset time threshold, the step of optimizing and adjusting the model parameters of the first deep learning model according to the loss function of the first deep learning model and entering the next round of training based on the optimized and adjusted first deep learning model can be entered.
[0056] 2. If the loss function of the first deep learning model has not converged, determine whether the current cumulative number of iterative training of the first deep learning model based on the training sample set has reached a preset number threshold.
[0057] If the current cumulative number of iterative training times reaches the preset threshold, it means that the number of iterative training times has reached the requirement. At this time, the iterative training can be stopped, and the first deep learning model obtained after this round of training is determined as the feature extraction model.
[0058] If the current cumulative number of iterative training times does not reach the preset threshold, the step of optimizing and adjusting the model parameters of the first deep learning model according to the loss function of the first deep learning model and entering the next round of training based on the optimized and adjusted first deep learning model can be entered.
[0059] (3) Training the second deep learning model based on the second training sample set until the loss function corresponding to the second deep learning module converges to obtain a feature fusion model.
[0060] Among them, the second deep learning model can be a deep learning model established according to any existing deep learning algorithm, and the embodiment of the present application does not specifically limit this.
[0061] The second deep learning model is iteratively trained based on a second training sample set including multiple second training samples; wherein, after each round of training, it is determined whether the loss function of the second deep learning model converges; if the loss function converges, the second deep learning model obtained after this round of training is determined as a feature fusion model; if the loss function does not converge, the model parameters of the second deep learning model are optimized and adjusted according to the loss function, and the next round of training is entered based on the optimized and adjusted second deep learning model.
[0062] That is, after performing multiple rounds of iterative training on the second deep learning model based on the second training sample set, when the loss function of the second deep learning model converges, it is determined that the second deep learning model at this time is a feature fusion model.
[0063] In certain specific cases, even after a large number of iterative trainings, the loss function of the second deep learning model will not converge. Therefore, in order to avoid the iterative training of the second deep learning model from continuing endlessly, when it is determined that the loss function of the second deep learning model obtained after the current round of training has not converged, the following two methods may be used for processing, but are not limited to:
[0064] 1. If the loss function of the second deep learning model has not converged, determine whether the current cumulative iterative training time of the iterative training of the second deep learning model based on the training sample set reaches a preset time threshold.
[0065] If the current cumulative iterative training time reaches the preset time threshold, it means that the iterative training time has met the requirement. At this time, the iterative training can be stopped, and the second deep learning model obtained after this round of training is determined as the feature fusion model.
[0066] If the current cumulative iterative training time does not reach the preset time threshold, the step of optimizing and adjusting the model parameters of the second deep learning model according to the loss function of the second deep learning model and entering the next round of training based on the optimized and adjusted second deep learning model can be performed.
[0067] 2. If the loss function of the second deep learning model has not converged, determine whether the current cumulative number of iterative training of the second deep learning model based on the training sample set has reached a preset number threshold.
[0068] If the current cumulative number of iterative training times reaches the preset threshold, it means that the number of iterative training times has met the requirement. At this time, the iterative training can be stopped, and the second deep learning model obtained after this round of training can be determined as the feature fusion model.
[0069] If the current cumulative number of iterative training times does not reach the preset threshold, the step of optimizing and adjusting the model parameters of the second deep learning model according to the loss function of the second deep learning model and entering the next round of training based on the optimized and adjusted second deep learning model can be performed.
[0070] 202. Obtain a spectrum data set corresponding to the solid waste to be detected.
[0071] Among them, regarding step 202, obtaining a spectrum data set corresponding to the solid waste to be detected, reference may be made to the relevant description of the above-mentioned step 101, and the embodiment of the present application will not be repeated here.
[0072] 203. Preprocess the multiple spectrum data included in each spectrum data group.
[0073] After obtaining the spectral data set corresponding to the solid waste to be detected, the feature extraction application can pre-process the multiple spectral data contained in each spectral data group in turn. The specific process is: for any spectral data, when the spectral data is specifically text, the spectral data is directly normalized; when the spectral data is specifically an image, the spectral data is denoised, smoothed and normalized in turn.
[0074] 204. Input the plurality of pre-processed spectrum data contained in each spectrum data group into the feature extraction model respectively, so that the feature extraction model outputs the resource environment feature group corresponding to each spectrum data group.
[0075] Among them, regarding step 204, the multiple preprocessed spectrum data contained in each spectrum data group are respectively input into the feature extraction model, so that the feature extraction model outputs the resource environment feature group corresponding to each spectrum data group. Please refer to the relevant description of the above step 103, and the embodiment of the present application will not be repeated here.
[0076] 205. Input resource and environmental feature groups corresponding to the multiple spectrum data groups into a feature fusion model so that the feature fusion model outputs a resource and environmental feature set corresponding to the solid waste to be detected.
[0077] Among them, regarding step 205, inputting the resource and environmental feature groups corresponding to multiple spectral data groups into the feature fusion model, so that the feature fusion model outputs the resource and environmental feature set corresponding to the solid waste to be detected, you can refer to the relevant description of the above-mentioned step 104, and the embodiment of the present application will not be repeated here.
[0078] Furthermore, as a response to the above Figure 1 and Figure 2In order to realize the method shown in the figure, another embodiment of the present application also provides a solid waste feature extraction device. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. This device is used to comprehensively extract the resource and environmental characteristics of solid waste, specifically as follows Figure 3 As shown, the device comprises:
[0079] An acquisition unit 31 is used to acquire a spectrum data set corresponding to the solid waste to be detected, wherein the spectrum data set includes multiple spectrum data groups, the multiple spectrum data included in each spectrum data group are spectrum data of the same type, and the spectrum data included in any two spectrum data groups are spectrum data of different types;
[0080] A processing unit 32, used for preprocessing the multiple spectrogram data included in each of the spectrogram data groups;
[0081] A first input unit 33, used for inputting the plurality of pre-processed spectrogram data contained in each of the spectrogram data groups into the feature extraction model, so that the feature extraction model outputs a resource environment feature group corresponding to each of the spectrogram data groups;
[0082] The second input unit 34 is used to input the resource and environmental feature groups corresponding to the multiple spectrum data groups into the feature fusion model, so that the feature fusion model outputs the resource and environmental feature set corresponding to the solid waste to be detected.
[0083] Further, such as Figure 4 As shown, the device also includes:
[0084] The training unit 35 is used to obtain a first training sample set and a second training sample set before the acquisition unit 31 obtains the spectral data set corresponding to the solid waste to be detected, wherein the first training sample set includes multiple first training samples, the first training sample includes a sample spectral data group and a resource and environmental feature set corresponding to the sample spectral data group, and the second training sample set includes multiple sample resource and environmental feature groups and multiple sample resource and environmental feature sets corresponding to the sample resource and environmental feature groups; based on the first training sample set, a first deep learning model is trained until the loss function corresponding to the first deep learning model converges to obtain the feature extraction model; based on the second training sample set, a second deep learning model is trained until the loss function corresponding to the second deep learning module converges to obtain the feature fusion model.
[0085] Further, such as Figure 4As shown, the training unit 35 is specifically used to: iteratively train the first deep learning model based on the first training sample set; wherein, after each round of training, determine whether the loss function of the first deep learning model converges; if the loss function converges, determine the first deep learning model obtained after this round of training as the feature extraction model; if the loss function does not converge, optimize and adjust the model parameters of the first deep learning model according to the loss function, and enter the next round of training based on the optimized and adjusted first deep learning model.
[0086] Further, such as Figure 4 As shown, the training unit 35 is specifically used to: iteratively train the second deep learning model based on the second training sample set; wherein, after each round of training, determine whether the loss function of the second deep learning model converges; if the loss function converges, determine the second deep learning model obtained after this round of training as the feature fusion model; if the loss function does not converge, optimize and adjust the model parameters of the second deep learning model according to the loss function, and enter the next round of training based on the optimized and adjusted second deep learning model.
[0087] Further, such as Figure 4 As shown, the processing unit 32 is specifically used to: when the spectrogram data is text, perform normalization processing on the spectrogram data; when the spectrogram data is an image, perform noise reduction processing, smoothing processing and normalization processing on the spectrogram data.
[0088] Further, such as Figure 4 As shown, the training unit 35 is also used for: if the loss function has not converged, then determining whether the current cumulative iterative training time reaches a preset time threshold and whether the current cumulative iterative training times reaches a preset times threshold; if the preset time threshold is reached or the preset times threshold is reached, then determining the first deep learning model obtained after this round of training as the feature extraction model; if the preset time threshold is not reached and the preset times threshold is not reached, then entering the step of optimizing and adjusting the model parameters of the first deep learning model according to the loss function, and entering the next round of training based on the optimized and adjusted first deep learning model.
[0089] Further, such as Figure 4As shown, the training unit 35 is also used to: if the loss function has not converged, determine whether the current cumulative iterative training time reaches a preset time threshold and whether the current cumulative iterative training times reaches a preset number threshold; if the preset time threshold is reached or the preset number threshold is reached, determine the second deep learning model obtained after this round of training as the feature fusion model; if the preset time threshold is not reached and the preset number threshold is not reached, enter the step of optimizing and adjusting the model parameters of the second deep learning model according to the loss function, and enter the next round of training based on the optimized and adjusted second deep learning model.
[0090] The embodiment of the present application provides a method and device for extracting features of solid waste. The embodiment of the present application can obtain the spectral data set corresponding to the solid waste to be detected by the staff using multiple acquisition devices, and store the collected spectral data of multiple types as the spectral data set corresponding to the solid waste to be detected in the local storage space of the target terminal device. After that, the feature extraction application obtains the spectral data set corresponding to the solid waste to be detected in the local storage space corresponding to the target terminal device, and after preprocessing the multiple spectral data contained in each spectral data group, the multiple preprocessed spectral data contained in each spectral data group are respectively input into the feature extraction model, so as to obtain the resource and environmental feature group corresponding to each spectral data group, and the resource and environmental feature groups corresponding to the multiple spectral data groups are input into the feature fusion model, so as to obtain the resource and environmental feature set corresponding to the solid waste to be detected. Since, in the embodiment of the present application, the spectral data of multiple types corresponding to the solid waste to be detected are subjected to feature extraction processing, and the extracted multiple resource and environmental feature groups are subjected to fusion processing, the resource and environmental features of the solid waste to be detected can be fully extracted.
[0091] An embodiment of the present application provides a storage medium, which includes a stored program, wherein when the program is executed, a device where the storage medium is located is controlled to execute the above-mentioned method for extracting characteristics of solid waste.
[0092] The storage medium may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0093] An embodiment of the present application also provides a solid waste feature extraction device, which includes a storage medium; and one or more processors, wherein the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the solid waste feature extraction method described above is executed.
[0094] The embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented:
[0095] Obtaining a spectrum data set corresponding to the solid waste to be detected, wherein the spectrum data set includes a plurality of spectrum data groups, the plurality of spectrum data included in each spectrum data group are spectrum data of the same type, and the spectrum data included in any two spectrum data groups are spectrum data of different types;
[0096] Preprocessing the multiple spectrum data contained in each spectrum data group;
[0097] Inputting the plurality of preprocessed spectrogram data contained in each of the spectrogram data groups into a feature extraction model respectively, so that the feature extraction model outputs a resource environment feature group corresponding to each of the spectrogram data groups;
[0098] The resource and environmental feature groups corresponding to the multiple spectral data groups are input into the feature fusion model so that the feature fusion model outputs the resource and environmental feature sets corresponding to the solid waste to be detected.
[0099] Furthermore, before obtaining the spectrum data set corresponding to the solid waste to be detected, the method further includes:
[0100] Obtain a first training sample set and a second training sample set, wherein the first training sample set includes a plurality of first training samples, the first training sample includes a sample spectrogram data group and a resource environment feature set corresponding to the sample spectrogram data group, and the second training sample set includes a plurality of sample resource environment feature groups and a plurality of sample resource environment feature sets corresponding to the sample resource environment feature groups;
[0101] Training a first deep learning model based on the first training sample set until a loss function corresponding to the first deep learning model converges, so as to obtain the feature extraction model;
[0102] The second deep learning model is trained based on the second training sample set until the loss function corresponding to the second deep learning module converges to obtain the feature fusion model.
[0103] Furthermore, the step of training the first deep learning model based on the first training sample set until the loss function corresponding to the first deep learning model converges to obtain the feature extraction model includes:
[0104] The first deep learning model is iteratively trained based on the first training sample set; wherein,
[0105] After each round of training, determining whether the loss function of the first deep learning model converges;
[0106] If the loss function converges, determining the first deep learning model obtained after this round of training as the feature extraction model;
[0107] If the loss function has not converged, the model parameters of the first deep learning model are optimized and adjusted according to the loss function, and the next round of training is entered based on the optimized and adjusted first deep learning model.
[0108] Furthermore, the training of the second deep learning model based on the second training sample set until the loss function corresponding to the second deep learning module converges to obtain the feature fusion model includes:
[0109] The second deep learning model is iteratively trained based on the second training sample set; wherein,
[0110] After each round of training, determining whether the loss function of the second deep learning model converges;
[0111] If the loss function converges, determining the second deep learning model obtained after this round of training as the feature fusion model;
[0112] If the loss function has not converged, the model parameters of the second deep learning model are optimized and adjusted according to the loss function, and the next round of training is entered based on the optimized and adjusted second deep learning model.
[0113] Furthermore, the preprocessing of the plurality of spectrum data contained in each spectrum data group includes:
[0114] When the spectrogram data is text, normalizing the spectrogram data;
[0115] When the spectrogram data is an image, noise reduction, smoothing and normalization are performed on the spectrogram data.
[0116] Furthermore, the method further comprises:
[0117] If the loss function has not converged, determine whether the current cumulative iterative training duration has reached a preset duration threshold and whether the current cumulative number of iterative training times has reached a preset number threshold;
[0118] If the preset time threshold is reached or the preset number threshold is reached, the first deep learning model obtained after this round of training is determined as the feature extraction model;
[0119] If the preset time threshold is not reached and the preset number threshold is not reached, the step of optimizing and adjusting the model parameters of the first deep learning model according to the loss function, and entering the next round of training based on the optimized and adjusted first deep learning model is entered.
[0120] Furthermore, the method further comprises:
[0121] If the loss function has not converged, determine whether the current cumulative iterative training duration has reached a preset duration threshold and whether the current cumulative number of iterative training times has reached a preset number threshold;
[0122] If the preset time threshold is reached or the preset number threshold is reached, the second deep learning model obtained after this round of training is determined as the feature fusion model;
[0123] If the preset time threshold is not reached and the preset number threshold is not reached, the step of optimizing and adjusting the model parameters of the second deep learning model according to the loss function, and entering the next round of training based on the optimized and adjusted second deep learning model is performed.
[0124] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program code that initializes the following method steps: obtaining a spectral data set corresponding to the solid waste to be detected, wherein the spectral data set contains multiple spectral data groups, and the multiple spectral data contained in each of the spectral data groups are spectral data of the same type, and the spectral data contained in any two of the spectral data groups are spectral data of different types; preprocessing the multiple spectral data contained in each of the spectral data groups; inputting the multiple preprocessed spectral data contained in each of the spectral data groups into a feature extraction model, so that the feature extraction model outputs a resource and environmental feature group corresponding to each of the spectral data groups; inputting the resource and environmental feature groups corresponding to the multiple spectral data groups into a feature fusion model, so that the feature fusion model outputs the resource and environmental feature set corresponding to the solid waste to be detected.
[0125] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0126] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0127] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0129] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0130] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0131] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0132] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0133] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0134] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for extracting features of solid waste, characterized in that: The method comprises: Obtaining a spectrum data set corresponding to the solid waste to be detected, wherein the spectrum data set includes a plurality of spectrum data groups, the plurality of spectrum data included in each spectrum data group are spectrum data of the same type, and the spectrum data included in any two spectrum data groups are spectrum data of different types; Preprocessing the multiple spectrum data contained in each spectrum data group; Inputting the plurality of preprocessed spectrogram data contained in each of the spectrogram data groups into a feature extraction model respectively, so that the feature extraction model outputs a resource environment feature group corresponding to each of the spectrogram data groups; The resource and environmental feature groups corresponding to the multiple spectral data groups are input into the feature fusion model so that the feature fusion model outputs the resource and environmental feature sets corresponding to the solid waste to be detected.
2. The method according to claim 1, characterized in that Before obtaining the spectrum data set corresponding to the solid waste to be detected, the method further includes: Obtain a first training sample set and a second training sample set, wherein the first training sample set includes a plurality of first training samples, the first training sample includes a sample spectrogram data group and a resource environment feature set corresponding to the sample spectrogram data group, and the second training sample set includes a plurality of sample resource environment feature groups and a plurality of sample resource environment feature sets corresponding to the sample resource environment feature groups; Training a first deep learning model based on the first training sample set until a loss function corresponding to the first deep learning model converges, so as to obtain the feature extraction model; The second deep learning model is trained based on the second training sample set until the loss function corresponding to the second deep learning module converges to obtain the feature fusion model.
3. The method according to claim 2, characterized in that The step of training the first deep learning model based on the first training sample set until the loss function corresponding to the first deep learning model converges to obtain the feature extraction model includes: The first deep learning model is iteratively trained based on the first training sample set; wherein, After each round of training, determining whether the loss function of the first deep learning model converges; If the loss function converges, determining the first deep learning model obtained after this round of training as the feature extraction model; If the loss function has not converged, the model parameters of the first deep learning model are optimized and adjusted according to the loss function, and the next round of training is entered based on the optimized and adjusted first deep learning model.
4. The method according to claim 2, characterized in that: The step of training the second deep learning model based on the second training sample set until the loss function corresponding to the second deep learning module converges to obtain the feature fusion model includes: The second deep learning model is iteratively trained based on the second training sample set; wherein, After each round of training, determining whether the loss function of the second deep learning model converges; If the loss function converges, determining the second deep learning model obtained after this round of training as the feature fusion model; If the loss function has not converged, the model parameters of the second deep learning model are optimized and adjusted according to the loss function, and the next round of training is entered based on the optimized and adjusted second deep learning model.
5. The method according to claim 1, characterized in that The preprocessing of the plurality of spectrum data contained in each spectrum data group comprises: When the spectrogram data is text, normalizing the spectrogram data; When the spectrogram data is an image, noise reduction, smoothing and normalization are performed on the spectrogram data.
6. The method according to claim 3, characterized in that The method further comprises: If the loss function has not converged, determine whether the current cumulative iterative training duration has reached a preset duration threshold and whether the current cumulative number of iterative training times has reached a preset number threshold; If the preset time threshold is reached or the preset number threshold is reached, the first deep learning model obtained after this round of training is determined as the feature extraction model; If the preset time threshold is not reached and the preset number threshold is not reached, the step of optimizing and adjusting the model parameters of the first deep learning model according to the loss function, and entering the next round of training based on the optimized and adjusted first deep learning model is performed.
7. The method according to claim 4, characterized in that The method further comprises: If the loss function has not converged, determine whether the current cumulative iterative training duration has reached a preset duration threshold and whether the current cumulative number of iterative training times has reached a preset number threshold; If the preset time threshold is reached or the preset number threshold is reached, the second deep learning model obtained after this round of training is determined as the feature fusion model; If the preset time threshold is not reached and the preset number threshold is not reached, the step of optimizing and adjusting the model parameters of the second deep learning model according to the loss function, and entering the next round of training based on the optimized and adjusted second deep learning model is performed.
8. A solid waste feature extraction device, characterized in that: The device comprises: An acquisition unit, used for acquiring a spectrum data set corresponding to the solid waste to be detected, wherein the spectrum data set includes a plurality of spectrum data groups, the plurality of spectrum data included in each spectrum data group are spectrum data of the same type, and the spectrum data included in any two spectrum data groups are spectrum data of different types; A processing unit, used for preprocessing the multiple spectrogram data contained in each of the spectrogram data groups; A first input unit is used to input a plurality of preprocessed spectrogram data contained in each of the spectrogram data groups into a feature extraction model, so that the feature extraction model outputs a resource environment feature group corresponding to each of the spectrogram data groups; The second input unit is used to input the resource and environmental feature groups corresponding to the multiple spectrum data groups into the feature fusion model, so that the feature fusion model outputs the resource and environmental feature set corresponding to the solid waste to be detected.
9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the feature extraction method for solid waste according to any one of claims 1 to 7.
10. A solid waste feature extraction device, characterized in that: The device includes a storage medium; and one or more processors, the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the feature extraction method for solid waste described in any one of claims 1 to 7 is executed.