CN110398473A - A kind of rapid test paper detection method and system - Google Patents

A kind of rapid test paper detection method and system Download PDF

Info

Publication number
CN110398473A
CN110398473A CN201910676639.4A CN201910676639A CN110398473A CN 110398473 A CN110398473 A CN 110398473A CN 201910676639 A CN201910676639 A CN 201910676639A CN 110398473 A CN110398473 A CN 110398473A
Authority
CN
China
Prior art keywords
detected
agricultural
near infrared
samples
spectrum
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910676639.4A
Other languages
Chinese (zh)
Inventor
钱丽丽
关海鸥
左锋
马晓丹
张东杰
宋雪健
王璐
赵晶雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Heilongjiang Bayi Agricultural University
Original Assignee
Heilongjiang Bayi Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Heilongjiang Bayi Agricultural University filed Critical Heilongjiang Bayi Agricultural University
Priority to CN201910676639.4A priority Critical patent/CN110398473A/en
Publication of CN110398473A publication Critical patent/CN110398473A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/359Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/02Agriculture; Fishing; Forestry; Mining

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • Immunology (AREA)
  • Agronomy & Crop Science (AREA)
  • Animal Husbandry (AREA)
  • Marine Sciences & Fisheries (AREA)
  • Mining & Mineral Resources (AREA)
  • Biochemistry (AREA)
  • Economics (AREA)
  • Analytical Chemistry (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Pathology (AREA)
  • General Business, Economics & Management (AREA)
  • Chemical & Material Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The embodiment of the present invention provides a kind of rapid test paper detection method and system, this method comprises: judging the state of the agricultural samples to be detected according to the near infrared spectrum of agricultural samples to be detected;The near infrared spectrum of the agricultural samples to be detected is pre-processed;From the characteristic spectrum extracted in the pretreated near infrared spectrum of agricultural samples to be detected within the scope of preset wavelength;By the BP neural network after the characteristic spectrum input training of the agricultural samples to be detected, the place of production information of the agricultural product to be detected is obtained.A kind of rapid test paper detection method and system provided in an embodiment of the present invention, the corresponding relationship between the characteristic spectrum of agricultural product and place of production information is established by BP neural network, high degree simplifies original model, realizes the quick and non-destructive testing of rapid test paper information.

Description

A kind of rapid test paper detection method and system
Technical field
The present invention relates to field of computer technology more particularly to a kind of rapid test paper detection methods and system.
Background technique
China is production estimation big country, and the quality of crop growth directly affects the yield of crops, wherein the place of production It traces to the source its yield and the food safety place of production with outstanding meaning to as the important environmental factor for influencing crop growth.
Zhang Xieguang etc. is based on IRMS combination element analysis technology, is used to the differentiation to the rice place of production using C stable isotope. LIU etc. has collected the wheat samples with 3 kinds of genotype from 3 areas in China, selects isotope method measurement wholemeal, grinding δ 13C and δ 15N value in classification and extract is come the wheat place of production of tracing to the source.Lu Xichun is based on fatty acid fingerprint pattern technology, passes through Content of fatty acid detects Soybean origin.
In recent years, people have done numerous studies to the crops place of production, but above by chemistry and biotechnology etc. It works crops Provenance research in the prevalence of the problems such as cumbersome, detection time is long.
Near-infrared spectrum technique has many advantages, such as quick, easy, relatively accurate, pollution-free, therefore is widely used in farming In detecting to produce.Therefore, a kind of rapid test paper lossless detection method and system based on NIR spectra wave number is needed.
Summary of the invention
In view of the above-mentioned problems, the embodiment of the present invention provides a kind of rapid test paper detection method and system.
In a first aspect, the embodiment of the present invention provides a kind of rapid test paper detection method, comprising:
According to the near infrared spectrum of agricultural samples to be detected, the state of the agricultural samples to be detected is judged;
The near infrared spectrum of the agricultural samples to be detected is pre-processed;
From the feature extracted in the pretreated near infrared spectrum of agricultural samples to be detected within the scope of preset wavelength Spectrum, the preset wavelength range are determined by the state of the agricultural samples to be detected;
By the BP neural network after the characteristic spectrum input training of the agricultural samples to be detected, obtain described to be detected The model structure of the place of production information of agricultural product, the BP neural network after training is true according to the state of the agricultural samples to be detected It is fixed.
Second aspect, the embodiment of the present invention provide a kind of rapid test paper detection system, comprising:
Judgment module judges the agricultural product sample to be detected for the near infrared spectrum according to agricultural samples to be detected The state of product;
Preprocessing module is pre-processed for the near infrared spectrum to the agricultural samples to be detected;
Extraction module, for extracting preset wavelength from the pretreated near infrared spectrum of agricultural samples to be detected Characteristic spectrum in range, the preset wavelength range are determined by the state of the agricultural samples to be detected;
Detection module, for the characteristic spectrum of the agricultural samples to be detected to be inputted to the BP neural network after training, The place of production information of the agricultural product to be detected is obtained, the model structure of the BP neural network after training is according to the agricultural production to be detected The state of product sample determines.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, comprising:
At least one processor, at least one processor, communication interface and bus;Wherein,
The processor, memory, communication interface complete mutual communication by the bus;
The communication interface is for the information transmission between the test equipment and the communication equipment of display device;
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to refer to Enable a kind of rapid test paper detection method that first aspect offer is provided.
Fourth aspect, the embodiment of the present invention provide a kind of non-transient computer readable storage medium, which is characterized in that described Non-transient computer readable storage medium stores computer instruction, and the computer instruction makes the computer execute first aspect A kind of rapid test paper detection method provided.
A kind of rapid test paper detection method and system provided in an embodiment of the present invention, establish agricultural production by BP neural network Corresponding relationship between the characteristic spectrum and place of production information of product, high degree simplify original model, realize rapid test paper The quick and non-destructive testing of information.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow chart of rapid test paper detection method provided in an embodiment of the present invention;
Fig. 2 is the near infrared spectrum of powdered the mung bean training sample and mung bean test sample that acquire in the embodiment of the present invention Figure;
Fig. 3 is the near infrared spectrum of the seed shape mung bean training sample and mung bean test sample that acquire in the embodiment of the present invention Figure;
Fig. 4 is to carry out the pretreated near infrared spectrum of MSC to powdered mung bean training sample in the embodiment of the present invention to show It is intended to;
Fig. 5 is to carry out the pretreated near infrared spectrum of MSC to seed shape mung bean training sample in the embodiment of the present invention to show It is intended to;
Fig. 6 is the adaptive weight weighting algorithm specific flow chart of competitiveness provided in the embodiment of the present invention;
Fig. 7 is that competitive adaptive weight weighting algorithm is utilized to extract powdered mung bean training sample spy in the embodiment of the present invention Levy the calculating process schematic diagram of wave number;
Fig. 8 is that competitive adaptive weight weighting algorithm is utilized to extract seed shape mung bean training sample spy in the embodiment of the present invention Levy the calculating process schematic diagram of wave number;
Fig. 9 is that the benefit structure of opening up of the initial BP neural network model in the embodiment of the present invention for the building of powdered mung bean is shown It is intended to;
Figure 10 is to open up benefit structure for the initial BP neural network of seed shape mung bean training sample in the embodiment of the present invention Schematic diagram;
Figure 11 is the flow chart of mung bean place of production detection in the embodiment of the present invention;
Figure 12 is the model performance schematic diagram in the embodiment of the present invention to powdered mung bean test sample;
Figure 13 is to return schematic diagram to the model of powdered mung bean test sample in the embodiment of the present invention;
Figure 14 is the model performance schematic diagram in the embodiment of the present invention to seed shape mung bean test sample;
Figure 15 is to return schematic diagram to the model of seed shape mung bean test sample in the embodiment of the present invention;
Figure 16 is a kind of structural schematic diagram of the rapid test paper detection system provided in the embodiment of the present invention;
Figure 17 is the entity structure schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Fig. 1 is a kind of flow chart of rapid test paper detection method provided in an embodiment of the present invention, as shown in Figure 1, the party Method includes:
S1 judges the state of the agricultural samples to be detected according to the near infrared spectrum of agricultural samples to be detected;
S2 pre-processes the near infrared spectrum of the agricultural samples to be detected;
S3, from the spy extracted in the pretreated near infrared spectrum of agricultural samples to be detected within the scope of preset wavelength Spectrum is levied, the preset wavelength range is determined by the state of the agricultural samples to be detected;
S4, by the BP neural network after the input training of the characteristic spectrums of the agricultural samples to be detected, obtain it is described to The place of production information of agricultural product is detected, the model structure of the BP neural network after training is according to the shapes of the agricultural samples to be detected State determines.
Mung bean has plantation throughout our country, and wherein the Northeast in China is one of mung bean major production areas.Mung bean is in State has the cultivation history in more than 2000 years, because of its nutritive and medicinal value with higher, referred to as " the green pearl " in grain, There is important economic value for China.But two kinds of shapes of northern Green Gram Seed and seed are studied based on near-infrared spectrum technique The total system research of state is less.Therefore, in the embodiment of the present invention, using mung bean as agricultural product to be detected for be illustrated.
The near infrared spectrum of mung bean sample to be detected is obtained first, specifically, detects instrument used near infrared spectrum Using the II type Fourier Transform Near Infrared instrument of TENSOR that German Brooker manufactures, the wave number model of the test apparatus It encloses: 10995.25-3998.793cm-1, resolution ratio: 8cm-1, scanning times: 64 times.Instrument parameter is the gold-plated integral of diffusing reflection Ball, InGaAs detector, testing locating environment temperature is (25 ± 1) DEG C, and relative humidity is 20%~30%.
Before the near infrared spectrum for measuring mung bean sample to be detected using II type Fourier Transform Near Infrared instrument of TENSOR, It needs that the spectrometer is first preheated 30min, mung bean sample to be detected is scanned using OPUS7.5 software, is believed by checking Number, save peak position, scanning background single channel spectrum (at interval of 1h run-down), the measurement operation such as sample single channel spectrum comes The interference for eliminating external information improves the precision of acquisition data.
Then mung bean sample to be detected is poured into glass, it is with sample-pressing device that mung bean sample surfaces to be detected processing is flat Whole, compacting, the diffusing reflection number of Lai Tisheng near infrared light more extract effective information, the acquisition of measurement sample single channel to Detect the near infrared spectrum of mung bean sample.
In general, mung bean is there are two types of state, one is powdered, one is seed shape, different conditions mung bean it is close red External spectrum is different, and therefore, according to the near infrared spectrum of mung bean sample to be detected, judges mung bean sample to be detected to be powdered Or seed shape.
Since the two states of mung bean to be detected are that powder and seed may for both states of mung bean to be detected In the presence of since distribution of particles is uneven and granular size is different, and the case where generate scattering, therefore, it is necessary to mung bean sample to be detected Product are pre-processed, and the noise in mung bean sample near infrared spectrum to be detected is eliminated.
Then, since mung bean to be detected is either in powdered or under seed shape two states, near infrared spectrum Data are more, and therefore, it is necessary to screen to pretreated near infrared spectrum, it is small to select synteny, lengthy and jumbled less and to include There is the characteristic spectrum of main effective information, reduce the interference of garbage, there is a few features spectrum preferably come out to replace original Thousands of near infrared spectrums, and establish neural network model, improve model calculation efficiency.
If judging in the first step, mung bean sample to be detected is powdered, the powdered corresponding preset wavelength model of selection It encloses, within the scope of the preset wavelength, extracts the characteristic spectrum in mung bean sample near infrared spectrum to be detected.
If judging in the first step, mung bean sample to be detected is seed shape, selects the corresponding preset wavelength model of seed shape It encloses, within the scope of the preset wavelength, extracts the characteristic spectrum in mung bean sample near infrared spectrum to be detected.
Similarly, BP neural network knot corresponding to powdered mung bean sample to be detected and seed shape mung bean sample to be detected Structure is different.If judging in the first step, mung bean sample to be detected is powdered, the BP mind after selecting powdered corresponding training Through network, if judging in the first step, mung bean sample to be detected is seed shape, the BP mind after selecting the corresponding training of seed shape Through network.
After the characteristic spectrum for extracting mung bean sample to be detected, the characteristic spectrum of mung bean sample to be detected is input to training In BP neural network afterwards, using the BP neural network after training, the place of production information of mung bean sample to be detected is predicted.
A kind of rapid test paper detection method and system provided in an embodiment of the present invention, establish agricultural production by BP neural network Corresponding relationship between the characteristic spectrum and place of production information of product, high degree simplify original model, realize rapid test paper The quick and non-destructive testing of information.
Specifically, detailed process is as follows for training BP neural network:
Firstly the need of establishing mung bean training sample set, in the embodiment of the present invention, using the high-quality mung bean in the north as research object, In Three provinces in the northeast of China obtain the powder and seed that Baicheng, the three kinds of places of production Du Meng and Old Taylor with geographic representation all correspond to mung bean within the border Two states training sample.
Test in harvest time in 2018, using 3 field stochastical sampling modes in Baicheng of the Northeast, Du Meng and Thailand Come three proving grounds and carry out sample collections, the mung beans of three proving grounds is educated in entire growth interim is all made of identical cultivation Mode periodically carries out artificial weeding and Capsicum yield to mung bean, it is ensured that test is without human interference.
Testing equipment is using the FW100 high speed Universal pulverizer and Germany's Brooker by Tianjin Stettlen instrument manufacturing The II type Fourier Transform Near Infrared instrument of TENSOR of manufacture.
The mung bean of acquisition training sample is carried out unified sunning, shelling, selected by test, and is pulverized, and 100 mesh are crossed Sieve, it is spare.The two states of the mung bean training sample obtained from three proving grounds and near infrared spectrometer are placed on same room It is stood under interior environment, to guarantee that environmental condition locating for the mung bean training sample under two states and instrument environments are consistent.
In order to guarantee the consistency of mung bean training sample, from the mung bean for cultivating identical three proving grounds of situation In, 219 Green Gram Seed shape samples of acquisition and 242 mung bean seed shape samples are amounted to three proving grounds, in the ratio of 2:1 Divide mung bean training sample set and mung bean test sample collection.
That is, under pulverulence mung bean training sample set include 146 groups of powdered mung bean training samples, this 146 groups Powdered training sample specifically includes 58 groups of Baicheng, 58 groups of Du Meng and 30 groups of Old Taylor.
Mung bean test sample collection includes 73 groups of powdered mung bean test samples under pulverulence, this 73 groups powdered mung beans are surveyed Sample originally specifically includes 29 groups of Baicheng, 29 groups of Du Meng and 15 groups of Old Taylor.
It includes 161 groups of seed shape mung bean training samples, this 161 groups of seeds that mung bean training sample under mung bean seed state, which is concentrated, Granular mung bean training sample specifically includes 60 groups of Baicheng, 58 groups of Du Meng and 43 groups of Old Taylor.
It includes 81 groups of seed shape mung bean test samples, this 81 groups of conducts that mung bean test sample under mung bean seed state, which is concentrated, Seed shape mung bean test sample collection specifically includes 30 groups of Baicheng, 29 groups of Du Meng, 22 groups of Old Taylor.
Fig. 2 is the near infrared spectrum of powdered the mung bean training sample and mung bean test sample that acquire in the embodiment of the present invention Scheme, abscissa indicates wave number, unit cm in Fig. 2-1, ordinate expression absorbance value, Fig. 3 is to acquire in the embodiment of the present invention The atlas of near infrared spectra of seed shape mung bean training sample and mung bean test sample, abscissa indicates wave number, unit cm in Fig. 3-1, Ordinate indicates absorbance value, as shown in Figures 2 and 3, since there is loud noises at head and the tail both ends, only near infrared light Spectrum wave-number range is 10105.37-4078.655cm-1It is analyzed.
The sample that powdered mung bean training sample set and seed shape mung bean training sample are concentrated in the embodiment of the present invention into The method of row processing is identical, is illustrated by taking powdered mung bean training sample set as an example.
It is pre-processed using near infrared spectrum of the multiplicative scatter correction method to every group of powdered mung bean training sample, Curve of spectrum baseline caused by the above-mentioned influence scattered due to the curve of spectrum and other instruments noise and dark current etc. can be eliminated The influence to the curve of spectrum such as drift and background factor.
The principle of multiplicative scatter correction is:
Every group of mung bean training sample curve of spectrum is averaging processing first, obtains standard spectrum, standard spectrum is Averaged spectrum, then the spectrum of every group of mung bean training sample and average quasi-optical spectrum are subjected to one-variable linear regression, just obtain every group The regression coefficient and regression constant of mung bean training sample, next, allowing the initial spectrum regression constant of every group of mung bean training sample Subtract each other, and divided by regression coefficient, it is therefore an objective to which the relative tilt for correcting spectrum baseline can marked after such processing The signal-to-noise ratio of original spectrum is corrected and improved to the lower needle position misalignment for making each spectrum of the reference of quasi-optical spectrum.
In multiplicative scatter correction, if X1*mThe spectrum of every group of mung bean training sample is represented, then averaged spectrum is Then to X,Linear regression is done, formula (1) is obtained:
In formula, X1*mIn 1 represent single mung bean sample .m spectral variables that m represents 1,2 ....
By seeking β using least square method0After the value of β, to the original near infrared spectrum of every group of mung bean training sample Curve carries out operation, and the original near infrared light spectral curve that every group of mung bean training sample can be obtained is pre-processed by multiplicative scatter correction Scattering equation are as follows:
XmscIndicate pretreated near infrared spectrum.
By figure 2 above and Fig. 3 it is found that due to being contained under mung bean two states since distribution of particles is uneven and granular size Difference is also easy to produce situations such as scattering, causes to contain more lengthy and jumbled information and stray light etc. within the scope of the curve of spectrum of acquisition.
And mung bean two states are respectively powder and seed, for mung bean both states, there may be due to distribution of particles Situations such as uneven and granular size difference is also easy to produce scattering, thus using multiplicative scatter correction algorithm respectively to Green Gram Seed and Seed two states are pre-processed,
Two states by pretreatment after respectively by corresponding significance test method obtain assume probability P-value with The effect of error is compared, to show more preferable by the spectrum effects after pretreatment.
When being pre-processed using multiplicative scatter correction method to powdered mung bean training sample set, setting spectrum is polynary The average value of scatter correction curveParameter is set as 0.3680.
Table 1
Table 1 is to carry out the effect after MSC pretreatment to powdered mung bean training sample in the embodiment of the present invention, in table 1 RAW expression near infrared spectrum is handled in the prior art, MSC-RAW indicate the embodiment of the present invention near infrared spectrum into Row processing can be seen that spectrum distribution of particles is uneven and there are the shadows such as noise due to reducing after pretreatment by table 1 It rings, error is made to drop to 3.20 from 12.87, and obtain assuming that probability P-value levels off to 0 and small according to significance test method Reach significant correlation in 0.01, improves the signal-to-noise ratio of original spectrum.
Table 2
When carrying out multiplicative scatter correction pretreatment to mung bean seed original spectrum curve (RAW), setting spectrum is polynary to be dissipated Average value (MSC-mean) parameter for penetrating calibration curve is 0.8245, and table 2 is in the embodiment of the present invention to the training of seed shape mung bean Sample carries out the effect after MSC pretreatment, and RAW expression is in the prior art handled near infrared spectrum in table 2, MSC- RAW indicates to handle near infrared spectrum in the embodiment of the present invention, can be seen that after pretreatment by table 2 due to reducing Spectrum distribution of particles is uneven and there are noises etc. to influence, and so that error is dropped to 27.73 from 153.04, and according to significance test Method obtains assuming that probability P-value levels off to 0 and respectively less than 0.01 reaching significant correlation, improves the noise of original spectrum Than.
Fig. 4 is to carry out the pretreated near infrared spectrum of MSC to powdered mung bean training sample in the embodiment of the present invention to show It is intended to, abscissa indicates wave number, unit cm in Fig. 4-1, ordinate expression absorbance value, Fig. 5 is in the embodiment of the present invention to seed Granular mung bean training sample carries out the pretreated near infrared spectrum schematic diagram of MSC, and abscissa indicates that wave number, unit are in Fig. 5 cm-1, ordinate indicates absorbance value, as can be seen that therefrom can intuitively find out by pretreated two kinds of shapes from Fig. 4 and Fig. 5 Phenomena such as pretreated more original near infrared spectrum of near infrared light spectral curve of state reduces noise and stray light, pass through reduction Noise improves spectral signal-noise ratio, the curve of spectrum is made to have reached a kind of comparatively ideal state compared with concentration, is point of the subsequent curve of spectrum Analysis and extraction provide advantageous methods, keep model more stable.
Since the pretreated near infrared spectrum variable under mung bean two states is more, the original near infrared light of mung bean is coped with Spectral curve data are selected, and pick out that synteny is small, it is lengthy and jumbled less and include main effective information wave number, that is, select tool Representational characteristic spectrum reduces the interference of garbage, replaces original thousands of wave numbers to build with preferred a small number of wave numbers Vertical intelligent measurement mung bean place of production model, improves model calculation efficiency.
Therefore, powdered mung bean training sample set is extracted using competitive adaptive weight weighting algorithm in the embodiment of the present invention In every group of training sample characteristic spectrum and seed shape mung bean training sample concentrate the characteristic spectrum of every group of training sample.
Competitive adaptive weight weighting algorithm (Competitive Adaptive Reweighted Sampling, abbreviation It CARS) is a kind of combination Monte Carlo sampling (Monte Carlo Sampling, abbreviation MCS) and PLS model regression coefficient The method of preferred feature variable simulates the principle of " survival of the fittest " in darwinian evolution theory.
It, can be by every in CARS algorithm since near infrared spectrum variable pretreated under mung bean two states is more It is secondary to carry out returning system in adaptive weighted sampling (Adaptive Reweighted Sampling, abbreviation ARS) reservation PLS model The biggish point of number absolute value weight deletes the lesser point of weight, is then based on new subset and establishes PLS mould as new subset Type is repeatedly calculated, and selects the wave number in PLS model validation-cross root-mean-square error (RMSECV) the smallest subset as feature Wave number.
Fig. 6 is the adaptive weight weighting algorithm specific flow chart of competitiveness provided in the embodiment of the present invention, as shown in fig. 6, It can be seen that because its precision extracts the characteristics of wave number can preferably represent raw spectroscopic data, so that the wave number preferably gone out is established model and have more Robustness, thus it is appropriate with CARS algorithm for mung bean two states.
Using competitive adaptive weight weighting algorithm (Competitive Adaptive ReweightedSampling, letter Claim CARS) pretreated near infrared spectrum characteristic waves under Green Gram Seed and seed two states are preferably established, it is competitive Adaptive weight weighting algorithm (CARS) is the side of a preferred feature wave number based on Monte Carlo sampling and PLS regression coefficient Method.
The calibration set sample that CARS uses Monte Carlo sampling to select first establishes corresponding PLS model, to the secondary sampling The absolute value weight of middle wave number regression coefficient is calculated, and deletes the lesser wave number variable of absolute value, and utilize damped expoential method (EDF) come determine deletion wave number variable number, be based on remaining mung bean two states spectrum wave number variable on the basis of, Select wave number to establish PLS model by adaptively weighing weight sampling (ARS) respectively, the corresponding wave number of PLS model RMSECV most On the basis of small, the characteristic waves for being able to detect the mung bean place of production are as selected.
Using competitive adaptive weight weighting algorithm to powdered mung bean training sample set and seed in the embodiment of the present invention The process that shape mung bean test sample collection is handled is identical, and the embodiment of the present invention is carried out by taking powdered mung bean training sample set as an example Explanation.
(1) the sampling number N of Monte Carlo (Monte Carlo, abbreviation MC) is set as 50 times in the embodiment of the present invention, if The various dimensions spectrum matrix for the mung bean training sample surveyed is X (m × n), and m is mung bean number of training, and n is spectral variables number, It is y (m × 1) that the true value matrix of variable, which is arranged, in mung bean corresponding with the various dimensions curve of spectrum place of production, then PLS regression model are as follows:
Y=Xb+e (3)
In formula, b represents the mung bean pixel points vector of n dimension;The prediction residual of e expression PLS regression model.
(2) decaying exponential function (Exponentially Decreasing Function, abbreviation EDF) is selected to delete by force Except the relatively small mung bean curve of spectrum wave number point of regression coefficient absolute value.In i-th sampling, obtain determining according to EDF green The retention rate R of beans curve of spectrum wave number pointiAre as follows:
Ri=μ e-ki, (4)
In formula, μ and k are constants, can be calculated according to following situation:
In formula, in the 1st sampling, R1=1, n indicate that the near infrared spectrum wave number variable of mung bean training sample both participates in Modeling;In n-th sampling, RN=2/n only remains 2 variables and participates in modeling, and N is sampling number.
(3) evaluation is passed through based on adaptive weight weight sampling technology (ARS) | wi| it is the near infrared light of mung bean training sample The weight of i-th of variable of spectral curve carries out the screening of relevant variable, and the foundation of weighted value is as follows:
Wherein, n is spectral variables, biFor the absolute value of i-th of spectral variables in b | bi| (1≤i≤n) represents i-th of value Contribution to the detection of the identification place of production.
(4) n times sampling complete after, by calculate and select wave number variable subset corresponding to RMSECV minimum value for Characteristic waves indicate that selected characteristic waves are optimal variable subsets when detecting the mung bean place of production.After obtaining characteristic waves, so that it may Accordingly to find out the preset wavelength range of characteristic spectrum.
Fig. 7 is that competitive adaptive weight weighting algorithm is utilized to extract powdered mung bean training sample spy in the embodiment of the present invention The calculating process schematic diagram of wave number is levied, the abscissa of (a), (b) and (c) indicates number of run, the ordinate table of (a) in Fig. 7 Show regression coefficient path, (b) indicate cross validation root-mean-square error, (c) indicate variable number, as shown in fig. 7, (a), (b) and (c) it is illustrated respectively in 1 CARS algorithm operation with the increase of sampling number (it is 50 times that sampling number is arranged in this research), The variation of mung bean spectral variables number, cross-validation RMSECV value and each variable regression coefficient.
By Fig. 7 (a) it can be found that Green Gram Seed shape spectral variables number gradually declines, and downward trend is from fast to slow;Fig. 7 (b) the RMSECV value in shows the prediction effect of the PLS model based on the adaptive weighted characteristic waves building for sampling selection; Every line represents the variation tendency of each wave number variable regression coefficient in Fig. 7 (c), and wherein No. * representative possesses minimum RMSECV value Optimal variable subset position, RMSECV value is begun to ramp up after No. *, indicate some effective spectral variables be deleted to The model accuracy for identifying producing region is caused to be deteriorated.
RMSECV value in Fig. 7 (b) reaches minimum 0.1395, and corresponding * point is set to Fig. 7 (c) operation time at this time 22 in number, prediction related coefficient r are 0.9316, therefore minimum for RMSECV value on the position of * point 22 for Green Gram Seed It is preferable with preferred feature wave number effect, it altogether include 107 variables.
Table 3 is by the characteristic waves of the powdered mung bean training sample of CARS algorithms selection in the embodiment of the present invention, such as Shown in table 3, after the characteristic waves range for determining powdered mung bean training sample, so that it may further obtain preset wavelength model It encloses, and then determines the characteristic spectrum of powdered mung bean training sample.
Table 3
Fig. 8 is that competitive adaptive weight weighting algorithm is utilized to extract seed shape mung bean training sample spy in the embodiment of the present invention The calculating process schematic diagram of wave number is levied, the abscissa of (a), (b) and (c) indicates number of run, the ordinate table of (a) in Fig. 8 Show regression coefficient path, (b) indicate cross validation root-mean-square error, (c) indicate variable number, as shown in figure 8, being based on various dimensions Spectrum utilizes the calculating process of the characteristic waves under the preferred mung bean seed state of CARS algorithm, can embody and be expressed as Fig. 8 institute Show, (a), (b) and (c) are illustrated respectively in 1 CARS algorithm operation as (sampling number is arranged in this research is sampling number 50 times) increase, the variation of mung bean spectral variables number, cross-validation RMSECV value and each variable regression coefficient.
By Fig. 8 (a) it can be found that mung bean seed shape spectral variables number gradually declines, and downward trend is from fast to slow;Fig. 8 (b) the RMSECV value in shows the prediction effect of the PLS model based on the adaptive weighted characteristic waves building for sampling selection; Every line represents the variation tendency of each wave number variable regression coefficient in Fig. 8 (c), and wherein No. * representative possesses minimum RMSECV value Optimal variable subset position, RMSECV value is begun to ramp up after No. *, indicate some effective spectral variables be deleted to The model accuracy for identifying producing region is caused to be deteriorated.
RMSECV value in Fig. 8 (b) reaches minimum 0.2624, and corresponding * point is set to Fig. 8 (c) operation time at this time 26 in number, prediction related coefficient r are 0.6907, therefore minimum for RMSECV value on the position of * point 26 for mung bean seed It is preferable with preferred feature wave number effect, it altogether include 61 variables, table 4 is to pass through CARS algorithms selection seed in the embodiment of the present invention The characteristic waves of shape mung bean training sample, as shown in table 4, after the characteristic waves range for determining seed shape mung bean training sample, Preset wavelength range can be further obtained, and then determines the characteristic spectrum of seed shape mung bean training sample.
Table 4
Extract the characteristic spectrum and seed shape mung bean training sample of every group of mung bean training sample of powdered mung bean training sample set After this concentrates the characteristic spectrum of every group of mung bean training sample, for the mesh for accurately identifying the place of production under mung bean two states can be reached , have error reversed using reverse transmittance nerve network (back propagation neural network, abbreviation BPNN) The mechanism of propagation algorithm, by the continuous corrective networks connection weight of error back propagation, make to identify the real output value in the place of production with Error between prediction output valve can reach the smallest characteristic, carry out the detection of the mung bean place of production for it and provide theoretical and technology base Plinth.Therefore the mapping principle between the mung bean place of production and spectral signature wave number can be established using BP neural network, completes mung bean and produces Automatically quick detection model realizes process on ground.
For powdered mung bean training sample, the back propagation artificial neural network model for constructing the powdered mung bean detection place of production is closed Key is the determination of network structure and parameter, in the embodiment of the present invention that tan-sigmoid saturation tangent function is refreshing as hidden layer Function through member establishes the reverse transmittance nerve network being made of input layer, hidden layer and output layer.
According to mung bean provenance, Green Gram Seed state selects 3 elements to be predicted, therefore is directed to Green Gram Seed, Fig. 9 is opens up benefit structural schematic diagram for the initial BP neural network model of powdered mung bean building in the embodiment of the present invention, such as Shown in Fig. 9, which is by containing 107 input layers, 2 hidden layers and n output layer, wherein first is implicit Layer and the second hidden layer are respectively 128 and 46 neurons.
On the basis of input layer, hidden layer shown in Fig. 9 and output layer parameter setting, created using newff function Establishing network, wherein the function of input layer to hidden layer is all made of tan-sigmoid saturation tangent function, and hidden layer is equal to output layer Using purelin linear transfer function, train epochs are set as 50 in terms of network training parameter, and repetition training number is 300000 Step, target error precision are 0.001.
For seed shape mung bean training sample, the back propagation artificial neural network model for constructing the seed shape mung bean detection place of production is closed Key is the determination of network structure and parameter, and the embodiment of the present invention is using tan-sigmoid saturation tangent function as hidden layer nerve The function of member establishes the reverse transmittance nerve network being made of input layer, hidden layer and output layer.
According to mung bean provenance, mung bean seed state selects 3 elements to be predicted, Figure 10 is in the embodiment of the present invention Benefit structural schematic diagram is opened up for the initial BP neural network of seed shape mung bean training sample, as shown in Figure 10, initial BP mind Through network by 61 input layers, 3 hidden layers and n output layer composition, wherein the first hidden layer, the second hidden layer and third are hidden It is respectively 138,46 and 50 neurons containing layer.
On the basis of above-mentioned input layer, hidden layer and output layer parameter setting, using newff function creation network, Wherein the function of input layer to hidden layer is all made of tan-sigmoid saturation tangent function, and hidden layer is all made of to output layer Purelin linear transfer function, network training parameter aspect train epochs are set as 50, and repetition training number is 300000 steps, Target error precision is 0.001.
The process being trained using mung bean training sample to initial BP neural network is as follows:
(1) weight and threshold value ω of mung bean BP neural network are initializedij(0)、θj(0)。
(2) learning sample of input is enabled are as follows:
Opj=f (∑ ωjiOij), (8)
In formula, input vector OpThe output of (p=1,2 ..., p) and target is Tp(p=1,2 ..., p).
(3) reality output of initial BP neural network model and hidden neuron constructed under mung bean two states is calculated State, Green Gram Seed construct one and contain 107 input layers, the initial BP neural network mould of 2 hidden layers and n output layer Type, wherein the first hidden layer and the second hidden layer are respectively 128 and 46 neurons;
Seed construct one contain 61 input layers, the initial BP neural network model of 3 hidden layers and n output layer, Wherein the first hidden layer, the second hidden layer and third hidden layer are respectively 138,46 and 50 neurons;
The transmission function of input layer to hidden layer under mung bean two states is all made of tan-sigmoid saturation tangent letter Number, hidden layer to output layer are all made of purelin linear transfer function.
(4) training error is calculated.
Wherein output layer are as follows:
δpj=Opj(1-Opj)(tpj-Opj), (9)
Hidden layer are as follows:
δpj=Opj(1-Opj)∑δpkωjk, (10)
In formula, tpjIndicate that the desired output of each output node, k are the node numbers of one layer of the upper surface of layer where j node.
(5) threshold value and weight are modified.
θj(t+1)=θj(t)+ηδj+α(θj(t)-θj(t-1)), (11)
ωji(t+1)=ωji(t)+ηδjOpi+α(ωji(t)-ωji(t-1)), (12)
(6) when p is after 1-p, whether judge index meets required precision E, here E < ε, wherein E=∑ Ep, EP=∑ (tpj-Opj)^2/2.(7) are gone to if meeting the requirements, and otherwise go to (3).
(7) stop, terminating operation.
The above are the training process of BP neural network, after having trained BP neural network, for the BP after powdered training Neural network tests the BP neural network after the training using powdered mung bean test sample collection, obtains every group of mung bean Prediction place of production information and practical place of production information are compared test sample corresponding prediction place of production information, if utilizing BP mind Accuracy rate through neural network forecast result is greater than preset threshold, illustrates the proper of the parameter setting of the BP neural network, if It is less than preset threshold using the accuracy rate of BP neural network prediction result, illustrates not conforming to for the parameter setting of the BP neural network It is suitable, it needs again to be trained initial BP neural network, be greater than in advance until using the accuracy rate of BP neural network prediction result If until threshold value.
Seed shape mung bean test sample collection is to the test process of BP neural network and the survey of powdered mung bean test sample collection Examination process is identical, and details please refer to the test process of above-mentioned powdered mung bean test sample collection.
On the basis of the above embodiments, it is preferable that described to utilize multiplicative scatter correction method to the agricultural product to be detected The near infrared spectrum of sample is pre-processed, and is specifically included:
The near infrared spectrum of the agricultural samples to be detected is averaging processing, the agricultural product sample to be detected is obtained The averaged spectrum of product;
To the averaged spectrum of the near infrared spectrums of the agricultural samples to be detected and the agricultural samples to be detected into Row one-variable linear regression obtains the regression coefficient and regression constant of the agricultural samples to be detected;
By the regression constant phase of the near infrared spectrum of the agricultural samples to be detected and the agricultural samples to be detected Subtract, by the result after subtracting each other divided by the regression coefficient of the agricultural samples to be detected, obtains the agricultural samples to be detected Pretreated near infrared spectrum.
Pretreated process and powdered mung bean training sample are carried out to mung bean sample to be detected using multiplicative scatter correction method This concentrates the preprocessing process of every group of mung bean training sample identical, and details please refer to above-mentioned powdered mung bean training sample and concentrate often The preprocessing process of group mung bean training sample.
On the basis of the above embodiments, it is preferable that the preset wavelength range is by the agricultural samples to be detected State determines, specifically includes:
For any state of the agricultural samples to be detected, the corresponding agricultural product training sample of any state is obtained This concentrates the near infrared spectrum of each agricultural product training sample, and it includes several groups from difference that the agricultural product training sample, which is concentrated, The agricultural product training sample in the place of production;
It is pre-processed, is obtained each using near infrared spectrum of the multiplicative scatter correction method to each agricultural product training sample The pretreated near infrared spectrum of agricultural product training sample;
By competitive adaptive weight weighting algorithm, the corresponding preset wavelength range of each agricultural product training sample is obtained.
Specifically, if mung bean sample to be detected be it is powdered, to powdered mung bean training sample carry out characteristic spectrum extraction During, it is determined through experimentation preset wavelength range, when carrying out characteristic spectrum extraction to mung bean sample to be detected, directly Extract the characteristic spectrum within the scope of preset wavelength.
If mung bean sample to be detected is seed shape, the process of characteristic spectrum extraction is carried out to seed shape mung bean training sample In, it is determined through experimentation preset wavelength range, when carrying out characteristic spectrum extraction to mung bean sample to be detected, is directly extracted pre- If the characteristic spectrum in wave-length coverage.
In order to verify a kind of accuracy of rapid test paper detection method provided in an embodiment of the present invention, the embodiment of the present invention Mung bean test sample known to the practical place of production is detected, Figure 11 is the process of mung bean place of production detection in the embodiment of the present invention Figure obtains the near infrared spectrum data of mung bean test sample first, then determines that the curve of spectrum state of acquisition is powder or seed Grain carries out multiplicative scatter correction method pretreatment original spectrum according to the state determined automatically according to the relevant parameter being correspondingly arranged Curve;Then characteristic spectrum is extracted by using competitive adaptive weight weighting algorithm, calls corresponding BP detection model, calculates Before neural network model to output y value, by comparing export network before to the maximum value in y value come construct output valve to encode to Amount.
If Max (y1、y2、…、yn) in Max=yi, then yi=1, remaining is 0, and y coding vector is parsed to place of production name Claim, achievees the purpose that adaptively detect the multiple places of production of agricultural product.For example, if as the three value y exported1> y2And y1> y3When, then three y values are exported as a result, y1=1, y2=y3=0;Otherwise verify output three values whether y2> y1And y2> y3When, If it is three y values are exported as a result, y2=1, y1=y3=0;Otherwise then verify output three values whether y3> y1And y3 > y2When, three y values are if it is exported as a result, y3=1, y2=y1=0;Y coding vector is parsed to place of production title, wherein 001 represents Baicheng, 010 represents Du Menghe 100 and represent Old Taylor, finally exports the place of production result of detection.
In order to which the accuracy rate to the mung bean place of production detection method provided in the embodiment of the present invention is verified, Figure 12 is this To the model performance schematic diagram of powdered mung bean test sample in inventive embodiments, abscissa is step-length in Figure 12, and ordinate is Mean square error, Figure 13 are to return schematic diagram to the model of powdered mung bean test sample in the embodiment of the present invention, and table 5 is the present invention Influence of the different models to the prediction result of powdered mung bean test sample in embodiment, as shown in table 5:
Table 5
In table 5, RAW-BP and MSC-BP indicate two kinds of detection methods in the prior art, and MSC-CARS-BP indicates this hair The detection method that bright embodiment provides, in conjunction with Figure 12 and Figure 13, the present invention is first on the basis of MSC is pre-processed, Green Gram Seed shape State carries out preferably 107 NIR spectra wave numbers of CARS algorithm, then carries out BP modeling, it can be seen that CARS under Green Gram Seed state The more original wave band number (2114) of the preferred wave band number of algorithm greatly reduces, green on the basis of preferred by CARS algorithm Bean powder last current state reduces 94.94% by wave band sum.Model accuracy of identification reaches 90% or more and thinks to belong to preferable model, MSC-CARS-BP model accuracy of identification under Green Gram Seed state is 98.63%, and reaching 95% or more can be obtained the practical place of production The precision of non-destructive testing and the mean square error and related coefficient of the forecast set under Green Gram Seed state be respectively 0.00099999, 0.99775。
Table 6
Figure 14 is the model performance schematic diagram in the embodiment of the present invention to seed shape mung bean test sample, abscissa in Figure 14 For step-length, ordinate is mean square error, and Figure 15 is to return signal to the model of seed shape mung bean test sample in inventive embodiments Figure, table 6 are influence of the different models to the prediction result of seed shape mung bean test sample in the embodiment of the present invention, as shown in table 6:
In table 6, RAW-BP and MSC-BP indicate two kinds of detection methods in the prior art, and MSC-CARS-BP indicates this hair The detection method that bright embodiment provides, in conjunction with Figure 14 and Figure 15, the embodiment of the present invention is first on the basis of MSC is pre-processed, mung bean Seed state carries out preferably 61 NIR spectra wave numbers of CARS algorithm, then carries out BP modeling, it can be seen that under mung bean seed state The more original wave band number (2114) of the preferred wave band number of CARS algorithm greatly reduces, preferably basic by CARS algorithm On, mung bean seed state reduces 97.11% by wave band sum.The precision in the model identification mung bean place of production reaches 90% or more and recognizes To belong to preferable model, practical production is can be obtained for 92.59% in the MSC-CARS-BP model accuracy of identification under mung bean seed state The precision of ground non-destructive testing and the mean square error and related coefficient of the forecast set under mung bean seed state be respectively 0.001, 0.99775。
Figure 16 is a kind of structural schematic diagram of the rapid test paper detection system provided in the embodiment of the present invention, such as Figure 16 institute Show, which includes: judgment module 1601, preprocessing module 1602, extraction module 1603 and detection module 1604, in which:
Judgment module 1601 is used for the near infrared spectrum according to agricultural samples to be detected, judges the agricultural product to be detected The state of sample;
Preprocessing module 1602 is for pre-processing the near infrared spectrum of the agricultural samples to be detected;
Extraction module 1603 is used to extract from the pretreated near infrared spectrum of agricultural samples to be detected default Characteristic spectrum in wave-length coverage, the preset wavelength range are determined by the state of the agricultural samples to be detected;
Detection module 1604 is used for the BP nerve net after the characteristic spectrum input training by the agricultural samples to be detected Network obtains the place of production information of the agricultural product to be detected, and the model structure of the BP neural network after training is according to described to be detected The state of agricultural samples determines.
The specific implementation procedure of this system embodiment and the specific implementation procedure of above method embodiment are identical, and details please join Above method embodiment is examined, details are not described herein for this system embodiment.
Figure 17 is the entity structure schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention, as shown in figure 17, the clothes Business device may include: processor (processor) 1710, communication interface (Communications Interface) 1720, deposit Reservoir (memory) 1730 and bus 1740, wherein processor 1710, communication interface 1720, memory 1730 pass through bus 1740 complete mutual communication.Processor 1710 can call the logical order in memory 1730, to execute following method:
According to the near infrared spectrum of agricultural samples to be detected, the state of the agricultural samples to be detected is judged;
The near infrared spectrum of the agricultural samples to be detected is pre-processed;
From the feature extracted in the pretreated near infrared spectrum of agricultural samples to be detected within the scope of preset wavelength Spectrum, the preset wavelength range are determined by the state of the agricultural samples to be detected;
By the BP neural network after the characteristic spectrum input training of the agricultural samples to be detected, obtain described to be detected The model structure of the place of production information of agricultural product, the BP neural network after training is true according to the state of the agricultural samples to be detected It is fixed.
In addition, the logical order in above-mentioned memory 1730 can be realized by way of SFU software functional unit and conduct Independent product when selling or using, can store in a computer readable storage medium.Based on this understanding, originally Substantially the part of the part that contributes to existing technology or the technical solution can be in other words for the technical solution of invention The form of software product embodies, which is stored in a storage medium, including some instructions to So that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation of the present invention The all or part of the steps of example the method.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various It can store the medium of program code.
On the other hand, the embodiment of the present invention also provides a kind of non-transient computer readable storage medium, is stored thereon with meter Calculation machine program, the computer program are implemented to carry out the transmission method of the various embodiments described above offer when being executed by processor, such as Include:
According to the near infrared spectrum of agricultural samples to be detected, the state of the agricultural samples to be detected is judged;
The near infrared spectrum of the agricultural samples to be detected is pre-processed;
From the feature extracted in the pretreated near infrared spectrum of agricultural samples to be detected within the scope of preset wavelength Spectrum, the preset wavelength range are determined by the state of the agricultural samples to be detected;
By the BP neural network after the characteristic spectrum input training of the agricultural samples to be detected, obtain described to be detected The model structure of the place of production information of agricultural product, the BP neural network after training is true according to the state of the agricultural samples to be detected It is fixed.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. a kind of rapid test paper detection method characterized by comprising
According to the near infrared spectrum of agricultural samples to be detected, the state of the agricultural samples to be detected is judged;
The near infrared spectrum of the agricultural samples to be detected is pre-processed;
From in the pretreated near infrared spectrum of agricultural samples to be detected extract preset wavelength within the scope of characteristic spectrum, The preset wavelength range is determined by the state of the agricultural samples to be detected;
By the BP neural network after the characteristic spectrum input training of the agricultural samples to be detected, the agricultural production to be detected is obtained The model structure of the place of production information of product, the BP neural network after training is determined according to the state of the agricultural samples to be detected.
2. method according to claim 1, which is characterized in that the near infrared spectrum to the agricultural samples to be detected It is pre-processed, is specifically included:
It is pre-processed using near infrared spectrum of the multiplicative scatter correction method to the agricultural samples to be detected, it is described polynary scattered The parameter for penetrating correction method is determined according to the state of the agricultural samples to be detected.
3. method according to claim 2, which is characterized in that described to utilize multiplicative scatter correction method to the agricultural production to be detected The near infrared spectrum of product sample is pre-processed, and is specifically included:
The near infrared spectrum of the agricultural samples to be detected is averaging processing, the agricultural samples to be detected are obtained Averaged spectrum;
The averaged spectrum of near infrared spectrum and the agricultural samples to be detected to the agricultural samples to be detected carries out one First linear regression obtains the regression coefficient and regression constant of the agricultural samples to be detected;
The near infrared spectrum of the agricultural samples to be detected and the regression constant of the agricultural samples to be detected are subtracted each other, it will Result after subtracting each other obtains the agricultural samples pretreatment to be detected divided by the regression coefficient of the agricultural samples to be detected Near infrared spectrum afterwards.
4. method according to claim 1, which is characterized in that the preset wavelength range is by the agricultural samples to be detected State determine, specifically include:
For any state of the agricultural samples to be detected, the corresponding agricultural product training sample set of any state is obtained In each agricultural product training sample near infrared spectrum, it includes that several groups come from different sources that the agricultural product training sample, which is concentrated, Agricultural product training sample;
It is pre-processed using near infrared spectrum of the multiplicative scatter correction method to each agricultural product training sample, obtains each agricultural production The pretreated near infrared spectrum of product training sample;
By competitive adaptive weight weighting algorithm, the corresponding preset wavelength range of each agricultural product training sample is obtained.
5. method according to claim 4, which is characterized in that the BP neural network after the training obtains in the following way :
It is extracted within the scope of the preset wavelength from each pretreated near infrared spectrum of agricultural product training sample and extracts feature Spectrum;
Using the characteristic spectrum of each agricultural product training sample and the practical place of production of each agricultural product training sample, by adjusting first Corresponding relationship between the output layer number of nodes and the practical place of production of beginning BP neural network increases the agricultural product spectral signature in the new place of production It is added to the training sample to concentrate, initial BP neural network adjusted is trained again using new training sample set, BP neural network after obtaining training.
6. method according to claim 5, which is characterized in that the BP neural network obtained after training, later further include:
Obtain the near infrared spectrum that the corresponding agricultural product test sample of any state concentrates each agricultural product test sample, institute Stating agricultural product test sample and concentrating includes agricultural product test sample of the several groups from different sources;
It is pre-processed, is obtained each using near infrared spectrum of the multiplicative scatter correction method to each agricultural product test sample The pretreated near infrared spectrum of agricultural product test sample;
The characteristic light within the scope of the preset wavelength is extracted from each pretreated near infrared spectrum of agricultural product test sample Spectrum;
By in the BP neural network after the characteristic spectrum input training of each agricultural product test sample, each agricultural product test is obtained The prediction place of production of sample, and by each agricultural product test sample prediction the place of production and each agricultural product test sample the practical place of production It is compared, obtains accuracy rate, if the accuracy rate is less than preset threshold, the initial BP neural network is instructed again Practice, until the accuracy rate that the agricultural product test sample is concentrated is greater than the preset threshold.
7. method according to claim 1, which is characterized in that BP neural network input layer after the training to hidden layer Transmission function is saturation tangent function, and the excitation function between hidden layer is saturation tangent function, hidden layer to output layer Transmission function is linear transfer function.
8. a kind of rapid test paper detection system characterized by comprising
Judgment module judges the agricultural samples to be detected for the near infrared spectrum according to agricultural samples to be detected State;
Preprocessing module is pre-processed for the near infrared spectrum to the agricultural samples to be detected;
Extraction module, for extracting preset wavelength range from the pretreated near infrared spectrum of agricultural samples to be detected Interior characteristic spectrum, the preset wavelength range are determined by the state of the agricultural samples to be detected;
Detection module is obtained for the BP neural network after the characteristic spectrum input training by the agricultural samples to be detected The place of production information of the agricultural product to be detected, the model structure of the BP neural network after training is according to the agricultural product sample to be detected The state of product determines.
9. a kind of electronic equipment including memory, processor and stores the calculating that can be run on a memory and on a processor Machine program, which is characterized in that the processor realizes the agricultural product as described in any one of claim 1 to 7 when executing described program The step of place of production detection method.
10. a kind of non-transient computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer It is realized when program is executed by processor as described in any one of claim 1 to 7 the step of rapid test paper detection method.
CN201910676639.4A 2019-07-25 2019-07-25 A kind of rapid test paper detection method and system Pending CN110398473A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910676639.4A CN110398473A (en) 2019-07-25 2019-07-25 A kind of rapid test paper detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910676639.4A CN110398473A (en) 2019-07-25 2019-07-25 A kind of rapid test paper detection method and system

Publications (1)

Publication Number Publication Date
CN110398473A true CN110398473A (en) 2019-11-01

Family

ID=68324999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910676639.4A Pending CN110398473A (en) 2019-07-25 2019-07-25 A kind of rapid test paper detection method and system

Country Status (1)

Country Link
CN (1) CN110398473A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488851A (en) * 2020-04-17 2020-08-04 成都曙光光纤网络有限责任公司 Traceability detection method, device, equipment and medium for fruit production place
CN112950766A (en) * 2021-03-16 2021-06-11 吉林大学 Geometric modeling method for cyperus esculentus seeds
CN113514586A (en) * 2021-03-31 2021-10-19 广州海关技术中心 Soybean origin tracing identification method based on combination of MALDI-TOF/TOF and multi-element analysis technology
CN113607681A (en) * 2021-07-19 2021-11-05 黑龙江八一农垦大学 Pleurotus eryngii mycelium detection method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1831515A (en) * 2006-04-03 2006-09-13 浙江大学 Method for nondistructive discriminating crop seed variety using visible light and near-infrared spectrum technology
CN101738373A (en) * 2008-11-24 2010-06-16 中国农业大学 Method for distinguishing varieties of crop seeds
CN202854844U (en) * 2012-09-04 2013-04-03 北京农产品质量检测与农田环境监测技术研究中心 Agricultural-product tracing apparatus
CN105021562A (en) * 2015-07-06 2015-11-04 黑龙江八一农垦大学 Traceable method for rice origin and application thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1831515A (en) * 2006-04-03 2006-09-13 浙江大学 Method for nondistructive discriminating crop seed variety using visible light and near-infrared spectrum technology
CN101738373A (en) * 2008-11-24 2010-06-16 中国农业大学 Method for distinguishing varieties of crop seeds
CN202854844U (en) * 2012-09-04 2013-04-03 北京农产品质量检测与农田环境监测技术研究中心 Agricultural-product tracing apparatus
CN105021562A (en) * 2015-07-06 2015-11-04 黑龙江八一农垦大学 Traceable method for rice origin and application thereof

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
周子立 等: "基于近红外光谱技术的大米品种快速鉴别方法", 《农业工程学报》 *
夏荣盛: "近红外光谱维数约简和特征波长选择方法研究及应用", 《万方学位论文》 *
王丽君 等: "绿豆主要营养品质近红外预测模型的构建与验证", 《植物遗传资源学报》 *
赵刘 等: "面向大米分类的高光谱特征波长提取方法", 《江苏农业科学》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488851A (en) * 2020-04-17 2020-08-04 成都曙光光纤网络有限责任公司 Traceability detection method, device, equipment and medium for fruit production place
CN112950766A (en) * 2021-03-16 2021-06-11 吉林大学 Geometric modeling method for cyperus esculentus seeds
CN113514586A (en) * 2021-03-31 2021-10-19 广州海关技术中心 Soybean origin tracing identification method based on combination of MALDI-TOF/TOF and multi-element analysis technology
CN113514586B (en) * 2021-03-31 2023-09-19 广州海关技术中心 Soybean origin tracing identification method based on combination of MALDI-TOF/TOF and multi-element analysis technology
CN113607681A (en) * 2021-07-19 2021-11-05 黑龙江八一农垦大学 Pleurotus eryngii mycelium detection method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110398473A (en) A kind of rapid test paper detection method and system
CN113192117B (en) Method for improving estimation of leaf area index of early growth stage of wheat based on Sentinel-2 satellite image red edge band
CN101881726B (en) Nondestructive detection method for comprehensive character living bodies of plant seedlings
Li et al. Discriminating varieties of tea plant based on Vis/NIR spectral characteristics and using artificial neural networks
Zhang et al. Noise reduction in the spectral domain of hyperspectral images using denoising autoencoder methods
CN105181642B (en) A kind of near infrared detection method of peanut quality and application
Xiaobo et al. Independent component analysis in information extraction from visible/near-infrared hyperspectral imaging data of cucumber leaves
CN108663339A (en) Corn online test method of going mouldy based on spectrum and image information fusion
CN113049530B (en) Single-seed corn seed moisture content detection method based on near-infrared hyperspectrum
Mao et al. Nondestructive measurement of total nitrogen in lettuce by integrating spectroscopy and computer vision
CN110907393B (en) Method and device for detecting saline-alkali stress degree of plants
Pang et al. Hyperspectral imaging coupled with multivariate methods for seed vitality estimation and forecast for Quercus variabilis
Gupta et al. Bistatic measurements for the estimation of rice crop variables using artificial neural network
Yan et al. Recognition of different Longjing fresh tea varieties using hyperspectral imaging technology and chemometrics
CN110118732A (en) Soil moisture content detection method and device
CN109470648A (en) A kind of single grain crop unsound grain quick nondestructive determination method
Li et al. Optical techniques in non-destructive detection of wheat quality: A review
CN110779875B (en) Method for detecting moisture content of winter wheat ear based on hyperspectral technology
Meng et al. Fine hyperspectral classification of rice varieties based on self-attention mechanism
Fu et al. Nondestructive evaluation of Zn content in rape leaves using MSSAE and hyperspectral imaging
CN110186871A (en) A kind of method of discrimination in the fresh tea leaves place of production
CN110320164A (en) A kind of method for building up of romaine lettuce total nitrogen content EO-1 hyperion inverse model and its application
CN110231302A (en) A kind of method of the odd sub- seed crude fat content of quick measurement
CN105891130B (en) A method of the different spectral informations of correction determine material information error
He et al. Model updating of hyperspectral imaging data for variety discrimination of maize seeds harvested in different years by clustering algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191101