Automatic garbage classification and recovery device and method based on natural language processing
阅读说明:本技术 一种基于自然语言处理的垃圾自动分类回收装置与方法 (Automatic garbage classification and recovery device and method based on natural language processing ) 是由 穆安乐 张文玮 吴红巧 于 2019-09-18 设计创作,主要内容包括:本发明公开了一种基于自然语言处理的垃圾自动分类回收装置,在上箱体的声音采集孔旁装有声音采集器,声音采集孔下方固定有喇叭;上箱体的顶板前后两侧分别开有垃圾投放口,在上箱体的内壁装有信息处理器;上箱体的内壁还安装有WiFi模块与电机驱动模块;下箱体通过多个挡板分隔为多个垃圾舱室,每个垃圾舱室上部分别装有一个红外传感器;在下箱体上部设置有机械传动机构,包括与滚珠丝杠模块配套的滚珠丝杠滑块,滚珠丝杠滑块向上与自动分类机构中的载物平台固定连接,载物平台底部开口安装有一对开合板。本发明还公开了一种基于自然语言处理的垃圾自动分类回收方法。本发明的装置及方法,识别效率高,自动化程度高。(The invention discloses an automatic garbage classification and recovery device based on natural language processing.A sound collector is arranged beside a sound collecting hole of an upper box body, and a loudspeaker is fixed below the sound collecting hole; the front side and the rear side of a top plate of the upper box body are respectively provided with a garbage throwing port, and the inner wall of the upper box body is provided with an information processor; the inner wall of the upper box body is also provided with a WiFi module and a motor driving module; the lower box body is divided into a plurality of garbage cabins by a plurality of baffles, and the upper part of each garbage cabin is respectively provided with an infrared sensor; the upper part of the lower box body is provided with a mechanical transmission mechanism which comprises a ball screw sliding block matched with the ball screw module, the ball screw sliding block is upwards fixedly connected with a carrying platform in the automatic classification mechanism, and a pair of opening plates are installed at the bottom opening of the carrying platform. The invention also discloses a garbage automatic classification and recovery method based on natural language processing. The device and the method have the advantages of high identification efficiency and high automation degree.)
1. The utility model provides a rubbish automatic classification recovery unit based on natural language handles which characterized in that: the sound collection box comprises an upper box body (4) and a lower box body (9), wherein a top plate of the upper box body (4) is provided with a sound collection hole (19), a sound collector (1) is arranged beside the sound collection hole (19), and a loudspeaker (18) is fixed below the sound collection hole (19); the upper box body (4) is provided with a garbage throwing opening, and the inner wall of the upper box body (4) is provided with an information processor (16); the WiFi module (3) and the motor driving module (17) are further mounted on the inner wall of the upper box body (4);
the lower box body (9) is divided into a plurality of garbage cabins, the upper part of each garbage cabin is respectively provided with an infrared sensor, and all the infrared sensors are called as an infrared sensor module (8) together;
a mechanical transmission mechanism and an automatic sorting mechanism are arranged in the lower box body (9).
2. The automatic garbage classification and recycling device based on natural language processing according to claim 1, characterized in that: the mechanical transmission mechanism is arranged at the upper part of the lower box body (9), and the mechanical transmission mechanism has the specific structure that the mechanical transmission mechanism comprises a ball screw module (5), a ball screw sliding block (11) is matched on a sliding rail in the ball screw module (5), and the ball screw sliding block (11) is upwards fixedly connected with an object carrying platform (6) in the automatic sorting mechanism; the ball screw in the ball screw module (5) is in transmission connection with the stepping motor (13), and the stepping motor (13) is in control connection with the motor driving module (17).
3. The automatic garbage classification and recycling device based on natural language processing according to claim 1, characterized in that: the automatic classification mechanism is structurally characterized by comprising an object carrying platform (6), wherein the bottom of the object carrying platform (6) is provided with an opening, a pair of opening plates (10) are arranged on two sides of the opening through hinge (12), one opening plate (10) for each measurement is in transmission connection with one steering engine (7), and the two steering engines (7) are fixedly connected with the object carrying platform (6).
4. The automatic garbage classification and recycling device based on natural language processing according to claim 1, characterized in that: the information processor (16) internally comprises a microprocessor (20) and a microcontroller (21) which are mutually connected, the output end of the sound collector (1) is connected with the input end of the microprocessor (20), the first output end of the microprocessor (20) is connected with the loudspeaker (18), and the second output end of the microprocessor (20) is connected with the input end of the microcontroller (21) through a DuPont wire; the first output end of the microcontroller (21) is connected with the two steering engines (7) simultaneously, the second output end of the microcontroller (21) is connected with the motor driving module (17), and the output end of the motor driving module (17) is in signal connection with the stepping motor (13).
5. The automatic garbage classification and recycling device based on natural language processing according to claim 4, characterized in that: the microprocessor (20) is preset with a garbage speech recognition model based on a deep neural network and a garbage classification rule model, and the two models are called as a natural language processing and recognition module together.
6. The automatic garbage classification and recycling device based on natural language processing according to claim 1, characterized in that: the loading platform (6) extends into the space of the upper box body (4), and the loading platform (6) is opposite to the garbage throwing openings on the front side and the rear side of the top plate of the upper box body (4) at the initial position.
7. The automatic garbage classification and recycling device based on natural language processing according to claim 1, characterized in that: the solar energy power generation device is characterized in that a solar energy power generation mechanism (15) is arranged on the upper surface of a top plate of the upper box body (4), a storage battery (2) is arranged on the lower surface of the top plate of the upper box body (4), and the solar energy power generation mechanism (15) is connected with the storage battery (2).
8. An automatic garbage classification and recovery method based on natural language processing, which utilizes the automatic garbage classification and recovery device based on natural language processing according to any one of claims 1 to 7, and is characterized by comprising the following steps:
step 1, a garbage thrower firstly throws garbage into an object carrying platform (6), then sends a voice instruction, after the voice instruction is collected by a sound collector (1), a sound signal is transmitted to an information processor (16), and a microprocessor (20) in the information processor (16) starts to perform model matching;
step 2, when the model matching fails, the microprocessor (20) transmits a warning signal to the loudspeaker (18), the loudspeaker (18) immediately carries out voice broadcasting, and a garbage thrower is prompted to speak the garbage name again;
when the model matching is successful, after the microprocessor (20) identifies the garbage type, the microprocessor (20) sends a throwing action signal to the microcontroller (21), the microcontroller (21) sends a signal to the motor driving module (17), the motor driving module (17) drives the stepping motor (13) to rotate, the ball screw module (5) acts to enable the ball screw sliding block (11) to move transversely, and the carrying platform (6) moves to the position above the garbage cabin corresponding to the identification to stop; then, the microcontroller (21) controls the steering engine (7) to rotate for a certain angle, the opening plates (10) at the lower part of the object carrying platform (6) are opened simultaneously, and the garbage in the object carrying platform (6) falls into the corresponding garbage cabins to finish classification;
and 3, when the garbage in a certain garbage bin is full, the infrared sensor arranged in the garbage bin obtains a signal, the infrared sensor module (8) sends the signal to the microprocessor (20) through a DuPont wire, and the microprocessor (20) is connected to a remote terminal through the WiFi module (3) after being processed, so that related personnel are informed to timely clear and manage the garbage bin.
Technical Field
The invention belongs to the technical field of environmental protection, relates to an automatic garbage classification and recovery device based on natural language processing, and further relates to an automatic garbage classification and recovery method based on natural language processing.
Background
With the development of urbanization, garbage is increasing year by year. At present, the incineration disposal mode is still commonly used in the household garbage treatment, which not only causes resource waste, but also causes the problems of environmental pollution and the like. In recent years, garbage bins used in daily life have been changed from the original one garbage bin (all garbage is thrown into one garbage bin) to four garbage bins (classified into dry garbage, wet garbage, harmful garbage, recyclable garbage) for garbage classification. Although the purpose of garbage classification and recovery is achieved, due to the fact that the related garbage types are complex and various, at present, many garbage throwers are lack of garbage classification knowledge, correct classification of each garbage is difficult to make, and even some people are often not good for garbage classification due to factors such as busy and the like.
The design of the machine vision garbage can utilize a camera to collect garbage pictures, and classification and identification are carried out on the garbage pictures through a trained neural network model, so that garbage can be automatically classified; however, on one hand, the technology using vision is greatly influenced by light, and on the other hand, many kinds of garbage (such as chafing dish soup base) cannot be judged through machine vision.
Therefore, aiming at some practical problems in the current garbage classification and recovery and the defects of the machine vision garbage can, a more accurate, reliable and environment-friendly automatic garbage classification and recovery device and a corresponding method thereof are urgently needed to be developed.
Disclosure of Invention
The invention aims to provide an automatic garbage classification and recovery device based on natural language processing, which solves the problems that the garbage types are complex and various and the public garbage classification knowledge is deficient (referring to the current four classification garbage bins) under the prior art; when the vision is used for identifying the garbage, a lot of garbage cannot be automatically identified (the machine vision garbage can).
The invention also aims to provide a garbage automatic classification and recovery method based on natural language processing.
The invention adopts the technical scheme that the automatic garbage classification and recovery device based on natural language processing comprises an upper box body and a lower box body, wherein a top plate of the upper box body is provided with a sound acquisition hole, a sound collector is arranged beside the sound acquisition hole, and a loudspeaker is fixed below the sound acquisition hole; the upper box body is provided with a garbage throwing port, and the inner wall of the upper box body is provided with an information processor; the inner wall of the upper box body is also provided with a WiFi module and a motor driving module;
the lower box body is divided into a plurality of garbage cabins, the upper part of each garbage cabin is respectively provided with an infrared sensor, and all the infrared sensors are called as infrared sensor modules together;
the lower box body is internally provided with a mechanical transmission mechanism and an automatic sorting mechanism.
The invention adopts another technical scheme that the automatic garbage classifying and recycling method based on natural language processing is implemented by utilizing the automatic garbage classifying and recycling device based on natural language processing according to the following steps:
step 1, a garbage thrower firstly throws garbage into an object carrying platform and then sends a voice instruction, a sound collector collects the voice instruction and then transmits a sound signal to an information processor, and a microprocessor in the information processor starts to perform model matching;
step 2, when the model matching fails, the microprocessor transmits a warning signal to the loudspeaker, and the loudspeaker immediately carries out voice broadcasting to prompt a garbage thrower to speak the garbage name again;
when the model matching is successful, after the microprocessor identifies the garbage type, the microprocessor sends a throwing action signal to the microcontroller, the microcontroller sends a signal to the motor driving module, the motor driving module drives the stepping motor to rotate, the ball screw module acts to enable the ball screw sliding block to transversely move, and the carrying platform moves to the position above the garbage cabin corresponding to the identification and stops; then, the microcontroller controls the steering engine to rotate for a certain angle, a pair of opening plates at the lower opening of the carrying platform are opened simultaneously, and the garbage in the carrying platform falls into a corresponding garbage bin to finish classification;
and 3, when the garbage in one garbage bin is full, the infrared sensor arranged in the garbage bin obtains a signal, the infrared sensor module sends the signal to the microprocessor through a DuPont wire, and the microprocessor is connected to a remote terminal through a WiFi module after processing, so that related personnel are informed to timely clear and manage the garbage bin.
The beneficial effects of the invention comprise the following aspects:
1) the garbage sorting device realizes automatic sorting of garbage, a user only needs to send a voice command to the garbage can and then directly throw the garbage into the carrying platform (garbage throwing transfer box), the operation is simple, and compared with the traditional manual garbage sorting, the garbage sorting device is convenient and efficient.
2) The invention adopts natural language processing technology as the core, realizes fuzzy recognition of semanteme, has good classification effect under the condition of more classified garbage names and more objects, and is more intelligent compared with general speech recognition.
3) The invention combines the internet of things cloud technology, realizes the purpose of acquiring the full load information of each garbage bin in real time, transmitting the full load information of each garbage bin to the microprocessor for data processing, and transmitting the full load information of each garbage bin to the terminal through the WiFi module, and the garbage recycling department can arrange staff to clean in time according to actual conditions, thereby improving the pertinence and the efficiency of garbage classification recycling.
4) The intelligent voice automatic garbage sorting device has the advantages of small volume, light weight, energy conservation, environmental protection and novel appearance, and can also be called as an intelligent voice automatic garbage sorting device based on the Internet of things.
Drawings
FIG. 1 is a schematic diagram of the structure of the apparatus of the present invention;
FIG. 2 is a schematic block diagram of the model matching of the present invention;
fig. 3 is a block diagram of the overall control operation of the apparatus of the present invention.
In the figure, the sound collector is 1, the storage battery is 2, the WiFi module is 3, the upper box body is 4, the ball screw module is 5, the carrying platform is 6, the steering engine is 7, the infrared sensor module is 8, the lower box body is 9, the opening and closing plate is 10, the ball screw sliding block is 11, the folding hinge is 12, the stepping motor is 13, the bolt is 14, the solar power generation mechanism is 15, the information processor is 16, the motor driving module is 17, the loudspeaker is 18, the sound collection hole is 19, the microprocessor is 20, and the microcontroller is 21.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
Referring to fig. 1 and 3, the garbage can has the structure and principle that the garbage can comprises an upper box body 4 and a lower box body 9, wherein the upper box body 4 and the lower box body 9 are buckled up and down to form the whole garbage can, a solar power generation mechanism 15 is arranged on the upper surface of a top plate of the upper box body 4, a storage battery 2 is arranged on the lower surface of the top plate of the upper box body 4, and the solar power generation mechanism 15 is connected with the storage battery 2 to charge the storage battery 2; go up the roof left and right sides of box 4 and open respectively and have a sound collection hole 19 (these two
a plurality of baffles are vertically arranged in the inner cavity of the lower box body 9, the baffles divide the lower box body 9 into a plurality of garbage cabins (so as to meet the requirement of respective storage according to garbage classification rules, the garbage cabins can be designed into cabins with different sizes according to the number required by actual garbage classification), the upper part of each garbage cabin is respectively provided with an infrared sensor, all the infrared sensors are called as an infrared sensor module 8 together, and each infrared sensor is used for transmitting a detected full-load signal to the microprocessor 20 when the garbage cabin is fully loaded;
a mechanical transmission mechanism and an automatic sorting mechanism are arranged in the lower box body 9 and are called as throwing equipment together;
the mechanical transmission mechanism is arranged at the upper part of the lower box body 9, the specific structure of the mechanical transmission mechanism is that the mechanical transmission mechanism comprises a
Step motor 13 and
The automatic classification mechanism is structurally characterized by comprising an object carrying platform 6 (used for throwing garbage preliminarily classified by a throwing person), wherein the bottom of the object carrying platform 6 is open, a pair of
A garbage speech recognition model based on a deep neural network and a garbage classification rule model are preset in the microprocessor 20, and the two models are collectively called a natural language processing and recognition module (in fig. 2, referred to as a natural language processing algorithm for short). In the early training process, various garbage nouns are converted into vector representations by using Word2Vec during training input, corresponding garbage category attribute labels are represented, and a trained garbage speech recognition model is obtained through operations such as multiple convolution, pooling and the like. When the voice signal of the garbage name is collected by the sound collector 1, the garbage category attribute label is judged by the trained garbage voice recognition model, and then the classification result is defined by the garbage classification rule model (the garbage classification rule sets classification items according to needs, such as dry garbage, wet garbage, recoverable garbage, kitchen garbage, harmful garbage, other garbage, and the like). (see article: Recent Trends in Deep Learning Based Natural Language Processing, website: https:// axiv. org/pdf/1708.02709. pdf).
The garbage speech recognition model based on the deep neural network in the natural language processing and recognition module comprises a garbage classification corpus, a garbage classification module and a garbage named entity extraction module (NER); marking a garbage classification corpus in a manual or semi-automatic mode, wherein data in the garbage classification corpus can be divided into training, verifying and testing data; the garbage classification module carries out deep learning by training, verifying and testing labeled garbage information of the garbage classification corpus; the garbage named entity extraction module is a deep learning model based on a Bi-LSTM-CRF neural network, a CRF layer is accessed behind an LSTM layer to predict sentence-level labels, the neural network firstly conducts forward propagation in the training process, values are transmitted through the network to generate results, a group of weighted values are obtained, then error backward propagation is conducted, and a gradient descent algorithm is used for iterative optimization of model errors to minimize errors and maximize a log-likelihood function. And (3) solving the optimal path by using a Viterbi algorithm of dynamic programming when the model obtained by training is used in a garbage category prediction process (decoding), and finally obtaining the optimized garbage speech recognition model based on the neural network. (see article: 1.Huang Z, Xu W, Yu K. bidirectional LSTM-CRF models for sequence tagging [ J ]. arXiv preprint arXiv:1508.01991,2015.
2.Lample G,Ballesteros M,Subramanian S,et al.Neural Architectures for Named Entity Recognition[C]//Proceedings of NAACL-HLT.2016:260-270。)
The garbage classification module is used for deep learning by training, verifying and testing labeled garbage information of the garbage classification corpus, and the garbage classification rule model sets classification items of garbage classification rules according to needs, such as dry garbage, wet garbage, recyclable garbage, kitchen garbage, harmful garbage, other garbage and the like, wherein the classification items and the classification items belong to different concepts.
The information processor 16 internally comprises a microprocessor 20 (embedded structure) and a microcontroller 21 which are connected with each other, the output end of the sound collector 1 is connected with the input end of the microprocessor 20, the first output end of the microprocessor 20 is connected with the
Infrared sensor module 8 comprises the infrared sensor who installs in every independent rubbish cabin, and every infrared sensor all adopts the dupont line to be connected with microprocessor 20, and microprocessor 20 third output is connected with wiFi module 3, and wiFi module 3 and remote terminal signal connection, wiFi module 3 and remote terminal are called thing networking cloud module together. When rubbish in a certain rubbish cabin is about to fill up, the infrared sensor arranged in the rubbish cabin transmits a full load signal to the microprocessor 20, the microprocessor 20 sends full load information to the remote terminal through the WiFi module 3, and related personnel can conveniently clear and transport and manage the dustbin in time.
The output end of the solar power generation mechanism 15 is connected with the storage battery 2, the storage battery 2 is connected with each electric device in the whole dustbin, power supply for the electric devices in the whole dustbin is achieved, and the solar power generation mechanism 15 and the storage battery 2 are called as a power supply module together.
The working principle of the device is as follows:
1) as shown in fig. 2, the principle of natural language processing speech recognition (referred to as natural language processing algorithm in fig. 2) is that "wake Word + speech instruction" issued by a garbage thrower (user), the speech instruction refers to a name of garbage thrown in, after the sound collector 1 collects the "wake Word + speech instruction" issued by the garbage thrower (user), the sound signal is transmitted to the information processor 16, the information processor 16 converts the Word into vector representation by using Word2Vec, and then matches the vector representation with a garbage speech recognition model trained by a deep neural network, selects a garbage category attribute corresponding to a model vector closest to the speech instruction vector, and recognizes and obtains the type of garbage thrown in this time by matching with a garbage classification rule model. When the model matching fails, the microprocessor 20 transmits an alarm signal to the
2) as shown in fig. 2, when the model matching is successful at this time, after the microprocessor 20 identifies the type of the garbage, the microprocessor 20 sends a classified putting signal to the microcontroller 21, the microcontroller 21 controls the
3) With the internet of things technology, the infrared sensor module 8 arranged in each independent garbage bin detects that the garbage bin is filled with garbage, the infrared sensor module 8 sends a signal to the information processor 16, and the information processor 16 sends data to the remote terminal through the WiFi module 3 to help related personnel manage the garbage bin and clear the garbage bin in time.
4) The solar power generation mechanism 15 converts solar energy into electric energy to be stored in the storage battery 2, and the storage battery 2 supplies power to the electric equipment in the whole garbage can.
Referring to fig. 3, the working process of the device of the present invention is implemented by using the above automatic garbage sorting and recycling device based on natural language processing according to the following steps:
step 1, a garbage thrower firstly throws garbage into an object carrying platform 6, and then sends out a wake-up word and a voice instruction, for example, a garbage can and the banana peel exist in the garbage can, after the voice collector 1 collects the wake-up word and the voice instruction, a voice signal is transmitted to an information processor 16, and a microprocessor 20 in the information processor 16 starts to carry out model matching so as to identify the type of the thrown garbage;
step 2, when the model matching fails, the microprocessor 20 transmits a warning signal to the
when the model matching is successful, after the microprocessor 20 identifies the garbage type, the microprocessor 20 sends a throwing action signal to the microcontroller 21, the microcontroller 21 sends a signal to the
and 3, when the garbage in one garbage bin is full, the infrared sensor arranged in the garbage bin obtains a signal, the infrared sensor module 8 sends the signal to the microprocessor 20 through a DuPont wire, the microprocessor 20 is connected to a remote terminal through the WiFi module 3 after processing, and related personnel are informed to timely clear and manage the garbage bin.