A method, system, device and storage medium for detecting microplastic abundance

By combining infrared spectrum detection and image acquisition, the microplastic detection process is simplified, the problem of complex and inaccurate detection in the existing technology is solved, and efficient and accurate microplastic abundance detection is achieved.

CN117554319BActive Publication Date: 2024-10-22GUANGDONG RES INST OF WATER RESOURCES & HYDROPOWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311368461.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2024-10-22
Estimated Expiration
2043-10-20

AI Technical Summary

Technical Problem

Existing microplastic detection methods are complex and inaccurate, require complex sample processing or professional laboratory conditions, and lack the ability to identify different types of microplastics, resulting in low identification accuracy.

Method used

Using a method that combines infrared spectrum detection and image acquisition, microplastic abundance detection is carried out by obtaining a comprehensive data set and inputting a trained recognition model, simplifying the sample processing process and improving detection accuracy.

Benefits of technology

It has simplified the sample processing process, improved the accuracy and efficiency of microplastic detection, and can accurately identify the abundance of different types of microplastic particles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117554319B_ABST
    Figure CN117554319B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, device and storage medium for detecting the abundance of microplastics. The method comprises the following steps: obtaining a water sample to be detected, flowing the detected water sample into a detection container according to a preset flow rate, starting a detection device to perform infrared spectrum detection and image acquisition on the detected water sample in the detection container, obtaining several comprehensive data sets of the detected water sample according to the obtained infrared spectrum detection data and image acquisition data, inputting the obtained comprehensive data sets into a trained recognition model, obtaining several recognition results of the detected water sample, superimposing the several recognition results of the detected water sample, and obtaining the abundance of microplastics in the water sample to be detected; combining different information sources to improve the accuracy of detection and analysis; flowing the collected water sample into the detection container for detection without additional processing, simplifying the sample processing flow before detection, and improving detection efficiency. The embodiments of the present invention can be widely used in the field of detection technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of detection technology, and in particular to a method, system, device and storage medium for detecting the abundance of microplastics. Background Art

[0002] Microplastic pollution will be generated when plastic products are processed. Plastic products will decompose into plastic particles at the micron level, posing a potential threat to aquatic ecosystems and human health. The widespread distribution and long-term accumulation of microplastic particles in the environment lead to pollution of water bodies and food chains. Therefore, many detection methods have emerged to detect the content of microplastic particles in water bodies; traditional microplastic detection methods require complex sample processing such as filtering and extraction, or require professional laboratory conditions for testing, or have strong recognition capabilities for a certain type of microplastic particles, but insufficient recognition capabilities for other types of microplastic particles, resulting in low overall recognition accuracy of the test samples. Summary of the invention

[0003] In view of this, an object of an embodiment of the present invention is to provide a method, system, device and storage medium for detecting the abundance of microplastics, which simplifies the sample processing process and has high accuracy.

[0004] In a first aspect, an embodiment of the present invention provides a method for detecting the abundance of microplastics, comprising the following steps:

[0005] Obtaining a test water sample, and flowing the test water sample into a test container according to a preset flow rate;

[0006] Testing the test water sample in the test container to obtain a plurality of comprehensive data sets; wherein the comprehensive data sets include infrared spectrum feature data and image feature data;

[0007] Inputting a plurality of the comprehensive data sets into the trained recognition model to obtain a plurality of recognition results of the detected water samples;

[0008] Several identification results are superimposed to obtain the abundance of the detected water sample.

[0009] Optionally, the test water sample in the test container is tested to obtain a plurality of comprehensive data sets, specifically including:

[0010] Performing infrared detection on the detection water sample in the detection container according to a preset frequency to obtain a plurality of infrared spectrum data;

[0011] According to the preset comments, an image of the test water sample in the test container is collected to obtain a plurality of image data;

[0012] A plurality of infrared spectrum data and a plurality of image data are acquired in sequence, and feature fusion is performed on the plurality of infrared spectrum data and the plurality of image data to obtain a plurality of comprehensive data sets of the detected water samples.

[0013] Optionally, the feature fusion of the plurality of infrared spectrum data and the plurality of image data to obtain the plurality of comprehensive data sets of the detected water samples specifically includes:

[0014] Preprocessing a plurality of the infrared spectrum data and a plurality of the image data;

[0015] Performing feature extraction on the plurality of infrared spectrum data after preprocessing to obtain infrared spectrum features; performing feature extraction on the plurality of image data after preprocessing to obtain image features; wherein the infrared spectrum features include the position and intensity of the absorption peak, and the image features include the particle density, shape and distribution;

[0016] The infrared spectrum features and the image features are spliced ​​together to obtain a comprehensive data set.

[0017] Optionally, the preprocessing of the plurality of infrared spectrum data and the plurality of image data further includes:

[0018] Performing baseline correction on the infrared spectrum data to obtain first infrared data, performing a denoising operation on the first infrared data to obtain second infrared data, and normalizing the second infrared data to obtain preprocessed infrared spectrum data;

[0019] Background removal is performed on the image data to obtain first image data, impurities are removed from the first image data to obtain second image data, and image segmentation is performed on the second image data to obtain preprocessed image data.

[0020] Optionally, the method further comprises:

[0021] The abundance of the detected water sample is sent to a cloud server in real time, so that the cloud server stores the abundance of the detected water sample in a database.

[0022] Optionally, the training process of the recognition model is as follows:

[0023] Obtaining a number of test water samples, collecting infrared spectrum data and image data of the test water samples, and annotating the image data to obtain first data; wherein the first data includes the number of microplastic particles in the image data;

[0024] Determine a comprehensive feature data set according to the preprocessed plurality of infrared spectrum data and the preprocessed plurality of image data; wherein the comprehensive feature data set includes infrared spectrum data features and image data features;

[0025] Dividing the comprehensive feature data set according to a preset ratio to obtain a training set, a validation set, and a test set;

[0026] Input the training set into the machine learning model for training, input the validation set to determine the performance data of the trained machine learning model, compare the performance data with the preset index, and if the performance data is less than the preset index, continue to adjust the parameters, train and test the machine learning model until the performance data is greater than or equal to the preset index, and use the trained machine learning model as the first model;

[0027] The test set is input into the first model to obtain an output result, a first accuracy rate is determined according to the output result and the first data, the first accuracy rate is compared with a preset accuracy rate, and if the first accuracy rate is greater than or equal to the preset accuracy rate, the first model is used as a recognition model.

[0028] Optionally, the training process of the model further includes:

[0029] A first file is obtained from a cloud server, model parameters are obtained according to the first file, and the recognition model is called according to the model parameters.

[0030] In a second aspect, an embodiment of the present invention provides a system for detecting the abundance of microplastics, comprising:

[0031] A water sample collection module is used to collect test water samples and transport them to a sample processing unit;

[0032] The sample processing unit includes an infrared spectrum detection module and an image acquisition module, which are used to respectively collect infrared spectrum data and image data of the detected water sample, and send the infrared spectrum data and the image data to the data processing module;

[0033] A data processing module, used to receive the infrared spectrum data and the image data, and input them into a recognition model for recognition analysis to obtain the abundance of microplastics;

[0034] A data transmission module, used for receiving the microplastic abundance and sending the microplastic abundance to a cloud server;

[0035] The waste liquid treatment module is used to extract and discharge the detected water sample after detection.

[0036] In a third aspect, an embodiment of the present invention provides a device for detecting the abundance of microplastics, comprising:

[0037] at least one processor;

[0038] at least one memory for storing at least one program;

[0039] When the at least one program is executed by the at least one processor, the at least one processor implements the method described in the foregoing method embodiment.

[0040] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a program executable by a processor is stored, characterized in that the program executable by the processor is used to execute the method described in the previous method embodiment when executed by the processor.

[0041] Implementation of the embodiments of the present invention includes the following beneficial effects: The present embodiment provides a method for detecting the abundance of microplastics, comprising obtaining a test water sample, flowing the test water sample into a test container according to a preset flow rate, starting a detection device to perform infrared spectral detection and image acquisition on the test water sample in the test container, obtaining a number of comprehensive data sets based on the obtained infrared spectral detection data and image acquisition data, inputting the obtained comprehensive data sets into a trained recognition model to obtain a number of recognition results of the test water sample, superimposing the several recognition results of the test water sample to obtain the abundance of microplastics in the water sample to be detected; collecting infrared spectral data and image data of the test water sample, and performing data fusion, combining different information sources to improve the accuracy of detection and analysis; before detection, the water sample to be detected only needs to be divided into a number of test samples for detection, thereby simplifying the sample processing flow before detection and improving detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the steps of a method for detecting the abundance of microplastics provided by an embodiment of the present invention;

[0043] Figure 2 This is a schematic flow chart of the steps for detecting microplastic abundance in a method provided by an embodiment of the present invention;

[0044] Figure 3 This is a schematic flow chart of the steps of data fusion in a method for detecting microplastic abundance provided by an embodiment of the present invention;

[0045] Figure 4 1 is a schematic diagram of the steps of another method for detecting the abundance of microplastics provided by an embodiment of the present invention;

[0046] Figure 5 It is a schematic flow chart of the steps of identification model training in a method for detecting microplastic abundance provided by an embodiment of the present invention;

[0047] Figure 6It is a schematic flow chart of another step of training an identification model in a method for detecting microplastic abundance provided by an embodiment of the present invention;

[0048] Figure 7 It is a structural block diagram of a water sample detection device in a specific embodiment provided by an embodiment of the present invention;

[0049] Figure 8 It is a schematic diagram of a step flow of a specific embodiment provided by an embodiment of the present invention;

[0050] Fig. 9 is a structural block diagram of a microplastic abundance detection system provided by an embodiment of the present invention;

[0051] Fig.10 It is a structural block diagram of a microplastic abundance detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only provided for the convenience of explanation and description, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0053] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0054] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.

[0055] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present invention have the same meanings as those commonly understood by those skilled in the art of the present invention. The terms used in the embodiments of the present invention are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.

[0056] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.

[0057] like Figure 1 As shown, an embodiment of the present invention provides a method for detecting the abundance of microplastics, which includes the steps as shown below.

[0058] S100, obtaining a test water sample, and flowing the test water sample into a test container according to a preset flow rate.

[0059] Specifically, obtain a water sample from the area where microplastic abundance detection is required, and let the water sample enter the detection device at a preset flow rate for detection; illustratively, use a motor water pump to extract 1 liter of water sample from the detection area, set the flow rate of the water sample to 2 cm per second, and use the motor water pump to flow the water sample into a transparent container for subsequent detection.

[0060] S200, testing the test water sample in the test container to obtain a plurality of comprehensive data sets; wherein the comprehensive data sets include infrared spectrum feature data and image feature data.

[0061] Specifically, when the test water sample flows into the transparent container, the infrared detection device and the image acquisition device are started to detect the test water sample in the transparent container, the infrared detection device starts the infrared light source to irradiate the test water sample on one side of the transparent container, and places the receiving device on the other side of the transparent container to obtain the infrared absorption spectrum data of the test water sample; at the same time, an image acquisition device is arranged above the transparent container to collect the image of the test water sample in the container; illustratively, the flow rate of the water pump is set to 2 cm per second, so that 1 liter of the test water sample flows into the transparent detection container, the infrared detection device arranged on one side of the transparent container and the image acquisition device arranged above the transparent container start to detect the test water sample according to the set frequency, and repeat several times to detect all the 1 liter of the test water sample.

[0062] S300, inputting a plurality of the comprehensive data sets into a trained recognition model to obtain a plurality of recognition results of the detected water samples.

[0063] Specifically, after detection, the infrared detection device and the image acquisition device send the infrared detection data and the collected image data of the detected water sample to the data processing module. The data processing module processes the infrared detection data and the image data, and then inputs the data into a pre-trained recognition model for analysis, and outputs the abundance recognition result of the detected water sample.

[0064] S400, superimposing a plurality of the identification results to obtain the abundance of the detected water sample.

[0065] Specifically, according to the content of step S200, the test water sample flows into the detection device at a fixed flow rate for detection, so the test water sample is divided into several parts for detection in turn, and the detection data is input into the recognition model to obtain several recognition results, and these several recognition results are superimposed to obtain the total detection result of the test water sample; illustratively, 1 liter of the test water sample is extracted, and the test water sample flows into the container at 2 cm per second. The detection device detects the test water sample in the container at a preset frequency to obtain several test data, and these several test data are input into the recognition model to obtain the corresponding number of recognition results, and these several recognition results are added to obtain the recognition result of this 1 liter of test water sample, that is, the abundance of microplastics.

[0066] Optionally, the test samples are tested in sequence to obtain a comprehensive data set of the test samples. The specific steps are as follows: Figure 2 As shown:

[0067] S210, performing infrared detection on the detection water sample in the detection container according to a preset frequency to obtain a plurality of infrared spectrum data.

[0068] Specifically, the detection container is provided with an infrared detection device, the infrared light source of the infrared detection device is arranged on one side of the detection container, and the receiving device is arranged on the other side of the container. After receiving the detection command, the infrared detection device starts the infrared light source, and the light emitted by the infrared light source penetrates the detection water sample in the container. The microplastic particles in the detection water sample will partially absorb the infrared light penetrating the detection water sample, and the penetrated light is absorbed by the absorption device arranged on the other side of the container and analyzed to obtain infrared spectrum data of the detection water sample that has penetrated previously; exemplarily, the detection frequency of the infrared detection device is set to once per second, and the infrared detection device performs infrared detection on the detection water sample in the detection container at this frequency to obtain infrared spectrum data.

[0069] S220, collecting images of the test water sample in the test container according to the preset frequency to obtain a plurality of image data.

[0070] Specifically, an image acquisition device, such as a high-pixel CCD camera, is arranged above the detection container; after receiving the detection command, the image acquisition device starts to acquire images of the detection water sample in the detection container, and microplastic particles with larger diameters can be intuitively obtained through the acquired image data; illustratively, the acquisition frequency of the image acquisition device is set to once per second, and the image acquisition device takes pictures of the detection water sample in the container at this frequency to obtain image data.

[0071] S230, sequentially acquiring a plurality of the infrared spectrum data and the image data, and performing feature fusion on the plurality of the infrared spectrum data and the image data to obtain a plurality of comprehensive data sets of the detected water samples.

[0072] Specifically, if the abundance of microplastics is identified based solely on infrared spectral data or image data, the accuracy of the identification results will be affected to a certain extent. If the abundance is identified based solely on infrared spectral data, when the distance between two microplastic particles in a water sample is close, the light emitted by the infrared light source is absorbed by the microplastic particles, and may be reflected as one microplastic particle in the infrared spectral data. If the abundance is identified based on image data alone, the identification effect for microplastic particles with diameters that are too small is poor. Fusion of infrared spectral data and image data can fully reflect the microplastic particles of different diameters in the detected water sample, and abundance identification can be performed based on the fused data, with higher accuracy.

[0073] Optionally, the feature fusion of the plurality of infrared spectrum data and the plurality of image data is performed to obtain a plurality of comprehensive data sets of the detected water samples. The specific steps are as follows: Figure 3 As shown:

[0074] S231, pre-processing a plurality of the infrared spectrum data and a plurality of the image data.

[0075] Specifically, before the infrared spectral data and image data are fused, since the data formats of the infrared spectral data and the image data are different, and each of them also has certain interference data; for example, the absorption of light emitted by the infrared light source by the transparent container in the infrared spectral data; the image outside the water sample in the image data; therefore, the data needs to be cleaned, the features related to the abundance of microplastics in the infrared spectral data and the image data are enriched, and then the infrared spectral data and the image data are standardized for subsequent feature fusion operations.

[0076] S232, performing feature extraction on the preprocessed infrared spectrum data to obtain infrared spectrum features; performing feature extraction on the preprocessed image data to obtain image features; wherein the infrared spectrum features include the position and intensity of the absorption peak, and the image features include particle density, shape and distribution.

[0077] Specifically, after the data preprocessing of step S231, the features related to the abundance of microplastics are extracted from the infrared spectral data and the image data; the absorption peak position and intensity of the spectrum are extracted from the infrared spectral data, and the absorption peak position and intensity can reflect the type and diameter of the microplastic particles; visual features such as particle density, shape or distribution are extracted from the image data, and these features can be used to distinguish the spatial characteristics of microplastic particles, or assist in identifying the type and abundance of microplastic particles.

[0078] S233, splicing the infrared spectrum features and the image features of each of the detection samples to obtain a comprehensive data set of each of the detection samples.

[0079] Specifically, after extracting the features related to the abundance of microplastics from the infrared spectral data and image data, the corresponding features are simply spliced ​​together to obtain a comprehensive feature; for example, the features of the infrared spectral data obtained from the second detection and the features of the image data from the second image acquisition are spliced ​​and fused to obtain the comprehensive features of the second detection; after splicing the data features of all the detections, a comprehensive feature data set is obtained.

[0080] Optionally, the method further comprises: Figure 4 The steps shown are as follows:

[0081] S500, sending the abundance of the detected water sample to a cloud server in real time, so that the cloud server stores the abundance of the detected water sample in a database.

[0082] Specifically, after the abundance of the test water sample is obtained through the identification model, the real-time data of this test is transmitted to the cloud server for storage through data transmission; illustratively, after completing the test of a test water sample, the abundance of microplastics in the test water sample is obtained, and the result is transmitted to the cloud server of the research center in real time through the 5G module. The cloud server stores the result data in the corresponding database to monitor the microplastic situation in the test area.

[0083] Optionally, the specific steps of the training of the recognition model are as follows: Figure 5 As shown:

[0084] S610. Obtain several test water samples, collect infrared spectrum data and image data of several of the test water samples, annotate the image data, and obtain first data; wherein the first data includes the number of microplastic particles in the image data.

[0085] Specifically, a certain number of test water samples are collected, and the test water samples are input into the detection device for infrared detection and image acquisition, and the collected data are numbered; for example, 2000 test water samples are obtained for detection, and each test water sample is numbered, and then the test water samples are detected by using the detection device, and the detection data obtained are: water sample number: #0567, infrared spectrum data: [(650nm, 0.12), (700nm, 0.14), ...], image data file: "sample_0567.jpg"; then, use Use image annotation tools to manually mark each microplastic particle in the image data, and use the laboratory to perform infrared spectroscopy on the test water samples. Specifically, the microplastics in the test water samples are filtered and digested, and visually inspected through an optical microscope. The chemical composition of the microplastics is identified using Fourier transform infrared spectroscopy. Quantitative analysis is performed based on the identification results to obtain the number of microplastic particles in the test water samples, and the results are marked in the image data; for example, in "sample_0567.jpg", 18 microplastic particles are marked.

[0086] S620. Determine a comprehensive feature data set according to the preprocessed infrared spectrum data and the preprocessed image data; wherein the comprehensive feature data set includes infrared spectrum data features and image data features.

[0087] Specifically, after obtaining the test data of the test sample, data processing is required to eliminate the interference data therein; for infrared spectral data, due to the noise in the detection instrument itself, the background absorption of the test water sample and other factors, the infrared spectrum may be affected by the baseline drift, so the infrared spectral data needs to be baseline corrected and noise removed; for image data, background removal and impurity removal are required to remove the interference data in the image data. Since there may be overlapping microplastic particles in the image data, the overlapping microplastic particles in the image also need to be processed, and the semantic segmentation of the image is performed through the image segmentation algorithm to ensure that each microplastic particle can be correctly identified; then the feature fusion of steps S232-S233 is performed to obtain a comprehensive feature data set.

[0088] S630. Divide the comprehensive feature data set according to a preset ratio to obtain a training set, a validation set, and a test set.

[0089] Specifically, after obtaining the comprehensive feature data set, the comprehensive feature data set is divided into a training set, a validation set and a test set, wherein the training set is used to train the machine learning model, and the validation set is used to evaluate the performance of the trained model, and the model is adjusted according to the evaluation results. When the model performance is stable and reaches the preset performance indicators, the model is finally evaluated through the test set to determine the recognition model for identifying the abundance of microplastics; illustratively, a convolutional neural network (CNN) framework is used for model training, and the comprehensive feature data set is divided into a training set, a validation set and a test set in a ratio of 8:1:1.

[0090] S640. Input the training set into the machine learning model for training, input the validation set to determine the performance data of the trained machine learning model, compare the performance data with the preset index, if the performance data is less than the preset index, continue to adjust parameters, train and test the machine learning model until the performance data is greater than or equal to the preset index, and use the trained machine learning model as the first model.

[0091] Specifically, the training set divided in step S640 is input into the machine learning model, and the model is trained by forward propagation, loss calculation and back propagation. The weight parameters of each layer in the model are adjusted and updated to a certain extent. When the machine learning model performs stably on the training set, the validation set is input into the machine learning model at this time to evaluate the performance data of the model at this time, and the performance data is compared with the preset first indicator. According to the comparison result, the hyperparameters of the machine learning model are adjusted, such as learning rate, batch size, etc.; the machine learning model after the hyperparameter adjustment is input into the training set for training, and then after the machine learning model after the hyperparameter adjustment performs stably on the training set, the validation set is input again to evaluate the performance of the model, until the performance of the model is greater than or equal to the preset first indicator, and the machine learning model at this time is used as the first model for the final evaluation later.

[0092] S650. Input the test set into the first model to obtain an output result, determine a first accuracy rate according to the output result and the first data, compare the first accuracy rate with a preset accuracy rate, and if the first accuracy rate is greater than or equal to the preset accuracy rate, use the first model as a recognition model.

[0093] Specifically, after obtaining the first model through step S640, the first model is finally evaluated through the test set, and the test set is input into the first model to obtain the output result of the first model; the output result of the model is compared with the annotation result in step S610 to judge the detection performance of the first model; if the detection model of the first model does not meet the preset requirements, the training process in step S640 is repeated according to the training set and the verification set; if the detection model of the first model meets the preset requirements, the first model is used as a recognition model for identifying the abundance of microplastics in practical applications; illustratively, the test set is input into the first model, and the output result is that on "sample_0567.jpg", the model predicts 19 microplastic particles, and the labeled microplastic particles are 18, the calculated model accuracy is 94.4%, and the preset accuracy is 90%, then the first model can be used as a recognition model.

[0094] Optionally, the preprocessing of the plurality of infrared spectrum data and the plurality of image data further includes the following steps:

[0095] S621. Perform baseline correction on the infrared spectrum data to obtain first infrared data, perform denoising on the first infrared data to obtain second infrared data, and normalize the second infrared data to obtain preprocessed infrared spectrum data.

[0096] Specifically, since the infrared detection device is affected by instrument noise, background absorption of the test water sample itself, etc., the infrared spectrum data will have baseline drift. The purpose of baseline correction of infrared spectrum data is to reduce the influence of non-target signals such as background absorption of the test water sample itself, so as to obtain the true infrared spectrum absorption characteristics of the test water sample; for example, the original infrared spectrum data is (700nm, 0.30), and the infrared spectrum data obtained by baseline correction is (700nm, 0.15); in addition to baseline correction, the interference of instrument noise, electronic noise, etc. on the infrared spectrum data needs to be denoised, such as through smoothing, wavelet denoising, etc. The operation is used to denoise the infrared spectrum data; for example, the infrared spectrum data before the denoising operation is (750nm, 0.14), and the infrared spectrum data after denoising is (750nm, 0.13); in addition to the influence of baseline drift and noise on the infrared spectrum, objective factors such as sample concentration and instrument differences will also affect the infrared spectrum data. Therefore, the infrared spectrum data needs to be normalized to eliminate the influence of objective factors such as sample concentration and instrument differences on the infrared spectrum data. For example, the infrared spectrum data before normalization is (800nm, 0.25), and the infrared spectrum data after normalization is (800nm, 0.8).

[0097] S622, performing background removal on the image data to obtain first image data, performing impurity removal on the first image data to obtain second image data, and performing image segmentation on the second image data to obtain preprocessed image data.

[0098] Specifically, similar to infrared spectral data, there are many influencing factors in image data. If the original image data is not processed and input into the machine learning model for training, it will take a long time for the machine learning model to obtain stable output after training, and the output results of the model are not accurate. Therefore, it is necessary to process the original image data to remove the interference data and remove the background data in the image data through the image difference method so that only the data related to microplastic particles is retained in the image data. Increasing the average intensity of microplastic particles in the image can improve the training efficiency and accuracy of the model. In addition to the image background, there may be interfering objects similar to microplastic particles in the detected water samples, such as microorganisms in the water. Filters are used to remove interference data in the image data. For overlapping microplastic particles, image segmentation algorithms are used to perform semantic segmentation of the image to ensure that each microplastic particle is correctly identified.

[0099] Optionally, the training process of the model further includes: Figure 6 The steps shown are as follows:

[0100] S660. Obtain a first file from a cloud server, obtain model parameters according to the first file, and call the recognition model according to the model parameters.

[0101] Specifically, after training, the weights and parameters of the model are saved as a file, usually a binary file or a weight file, and then this binary file or weight file is sent to the cloud server. Other terminal devices call this binary file or weight file through the cloud server and can directly use the trained recognition model, thereby realizing the migration of the recognition model; other devices or apparatuses only need to add the operating environment or database related to the recognition model to the storage to reproduce the recognition model without retraining.

[0102] In a specific embodiment, water sample detection is performed by a water sample detection device, which includes a water sample collection module, a sample processing unit, a data processing module, an output transmission module, and a waste liquid treatment module. The sample processing unit is provided with an infrared spectrum detection module and an image acquisition module. The data processing module integrates a machine learning model for data analysis. The structure of the device is connected as follows: Figure 7 As shown; install this device in the area where microplastic abundance needs to be detected. For example, if a river needs to be tested, install the device at a location with a water depth of more than 1 meter on the bank of the river and perform the following Figure 8The steps shown in the flow chart are used to detect water samples; first, the device power is turned on for initialization and self-test, and the sampling frequency of the device is set to once every 60 minutes. When the detection time comes, the motor water pump is started to extract 1 liter of water sample from the river and store it in the designated container of the device; the flow rate of the water sample is set to 2 cm per second, and the water sample flows from the designated container to the transparent container in the sample processing unit for water sample processing; the detection frequency of the infrared spectrum detection module and the image acquisition module in the sample processing unit is set to once per second, and the 1 liter water sample is detected 500 times to obtain 500 sets of infrared spectrum data and image data; these data are input into the data processing module, and the data processing module obtains infrared spectrum data and image data from the infrared spectrum The characteristic data of the position and intensity of the absorption peak are extracted from the data, and the characteristics such as particle density, shape and distribution are extracted from the image data. These features are merged and input into a pre-trained machine learning model for analysis and identification to obtain the identification results of the 500 data. The identification results of the 500 data are then added together to obtain the microplastic abundance result of 1 liter of water sample. The microplastic abundance result is then sent to the data transmission module. The data transmission module transmits the microplastic abundance result to the server in real time through the 5G module for storage. The 1 liter of water sample that has completed the test is input into the waste liquid treatment module. The waste liquid treatment module controls the set valves and vacuum pumps to discharge the 1 liter of water sample into the original river channel.

[0103] Implementation of the embodiments of the present invention includes the following beneficial effects: The present embodiment provides a method for detecting the abundance of microplastics, including obtaining a water sample to be detected, dividing the water sample to be detected into a preset number of detection samples, performing infrared spectral detection and image acquisition on the divided detection samples in turn, obtaining a comprehensive data set of each detection sample in the detection water sample according to the obtained infrared spectral detection data and image acquisition data, inputting the obtained comprehensive data set into a trained recognition model for recognition, obtaining a recognition result of each detection sample, superimposing the recognition results of each detection sample to obtain the abundance of microplastics in the water sample to be detected; collecting infrared spectral data and image data of the detection water sample, and performing data fusion, combining different information sources, to improve the accuracy of detection and analysis; before detection, the water sample to be detected only needs to be divided into several detection samples for detection, which simplifies the sample processing process before detection and improves detection efficiency.

[0104] like Fig. 9 As shown, an embodiment of the present invention further provides a system for detecting the abundance of microplastics, comprising:

[0105] A water sample collection module is used to collect test water samples and transport them to a sample processing unit;

[0106] The sample processing unit includes an infrared spectrum detection module and an image acquisition module, which are used to respectively collect infrared spectrum data and image data of the detected water sample, and send the infrared spectrum data and the image data to the data processing module;

[0107] A data processing module, used to receive the infrared spectrum data and the image data, and input them into a recognition model for recognition analysis to obtain the abundance of microplastics;

[0108] A data transmission module, used for receiving the microplastic abundance and sending the microplastic abundance to a cloud server;

[0109] The waste liquid treatment module is used to extract and discharge the detected water sample after detection.

[0110] It can be seen that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0111] like Fig.10 As shown, an embodiment of the present invention further provides a microplastic abundance detection device, comprising:

[0112] at least one processor;

[0113] at least one memory for storing at least one program;

[0114] When the at least one program is executed by the at least one processor, the at least one processor implements the microplastic abundance detection method steps described in the previous method embodiment.

[0115] Among them, the memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. The memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a remote memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0116] It can be seen that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0117] In addition, the embodiment of the present application also discloses a computer program product or a computer program, and the computer program product or the computer program is stored in a computer-readable storage medium. The processor of the computer device can read the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the above method. Similarly, the contents in the above method embodiment are all applicable to the storage medium embodiment, and the functions specifically implemented by the storage medium embodiment are the same as those in the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above method embodiment.

[0118] An embodiment of the present invention further provides a computer-readable storage medium, which stores a program executable by a processor. The program executable by the processor is used to implement the above method when executed by the processor.

[0119] It is understood that all or some steps and systems in the disclosed method above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0120] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A method for detecting the abundance of microplastics, It is characterized in that The following steps are involved: Obtaining a test water sample, and flowing the test water sample into a test container according to a preset flow rate; Performing infrared detection on the detection water sample in the detection container according to a preset frequency to obtain a plurality of infrared spectrum data, and performing image acquisition on the detection water sample in the detection container according to the preset frequency to obtain a plurality of image data; Sequentially acquiring a plurality of infrared spectrum data and a plurality of image data, preprocessing the plurality of infrared spectrum data and the plurality of image data, extracting features from the preprocessed plurality of infrared spectrum data to obtain infrared spectrum features, and extracting features from the preprocessed plurality of image data to obtain image features; wherein the infrared spectrum features include the position and intensity of the absorption peak, and the image features include the particle density, shape and distribution; The infrared spectrum characteristics and the image characteristics are combined to obtain a plurality of comprehensive data sets of the detected water samples; wherein the comprehensive data sets include infrared spectrum characteristic data and image characteristic data; Inputting a plurality of the comprehensive data sets into a preset recognition model to obtain a plurality of recognition results of the detected water samples; wherein the preset recognition model is obtained by training a machine learning model based on infrared spectrum detection data and image data; The training process is as follows: obtaining a number of test water samples, collecting infrared spectrum data and image data of a number of the test water samples, annotating the image data, and obtaining first data; wherein the first data includes the number of microplastic particles in the image data; Determine a comprehensive feature data set according to the preprocessed plurality of infrared spectrum data and the preprocessed plurality of image data; wherein the comprehensive feature data set includes infrared spectrum data features and image data features; Dividing the comprehensive feature data set according to a preset ratio to obtain a training set, a validation set, and a test set; Input the training set into the machine learning model for training, input the validation set to determine the performance data of the trained machine learning model, and compare the performance data with the preset index; If the performance data is less than the preset index, continue to adjust parameters, train and test the machine learning model until the performance data is greater than or equal to the preset index, and use the trained machine learning model as the first model; Inputting the test set into the first model to obtain an output result, and determining a first accuracy rate according to the output result and the first data; Comparing the first accuracy rate with a preset accuracy rate, and if the first accuracy rate is greater than or equal to the preset accuracy rate, using the first model as a recognition model; Several identification results are superimposed to obtain the abundance of the detected water sample.

2. The method according to claim 1, It is characterized in that The preprocessing of the plurality of infrared spectrum data and the plurality of image data further includes: Performing baseline correction on the infrared spectrum data to obtain first infrared data, performing a denoising operation on the first infrared data to obtain second infrared data, and normalizing the second infrared data to obtain preprocessed infrared spectrum data; Background removal is performed on the image data to obtain first image data, impurities are removed from the first image data to obtain second image data, and image segmentation is performed on the second image data to obtain preprocessed image data.

3. The method according to claim 1, It is characterized in that The method further comprises: The abundance of the detected water sample is sent to a cloud server in real time, so that the cloud server stores the abundance of the detected water sample in a database.

4. The method according to claim 1, It is characterized in that The training process of the model also includes: A first file is obtained from a cloud server, model parameters are obtained according to the first file, and the recognition model is called according to the model parameters.

5. A detection system for microplastic abundance, It is characterized in that The method for implementing any one of claims 1 to 4 comprises: A water sample collection module is used to collect test water samples and transport the test water samples to a sample processing unit according to a preset frequency; The sample processing unit includes an infrared spectrum detection module and an image acquisition module, which are respectively used to collect infrared spectrum data and image data of the detected water sample according to a preset frequency, and send the infrared spectrum data and the image data to the data processing module; A data processing module is used to receive the infrared spectrum data and the image data, preprocess the infrared spectrum data and the image data, perform feature extraction on the preprocessed infrared spectrum data to obtain infrared spectrum features, perform feature extraction on the preprocessed image data to obtain image features, splice the infrared spectrum features and the image features to obtain a comprehensive data set, and input the recognition model trained according to the test water sample to perform recognition analysis to obtain the abundance of microplastics; A data transmission module, used for receiving the microplastic abundance and sending the microplastic abundance to a cloud server; The waste liquid treatment module is used to extract and discharge the detected water sample after detection.

6. A device for detecting the abundance of microplastics, It is characterized in that include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 4.

7. A computer-readable storage medium having a processor-executable program stored therein, It is characterized in that The processor-executable program is used to perform the method according to any one of claims 1 to 4 when executed by the processor.