CN110751230A - Substance classification method, substance classification device, terminal device and storage medium - Google Patents

Substance classification method, substance classification device, terminal device and storage medium Download PDF

Info

Publication number
CN110751230A
CN110751230A CN201911042826.3A CN201911042826A CN110751230A CN 110751230 A CN110751230 A CN 110751230A CN 201911042826 A CN201911042826 A CN 201911042826A CN 110751230 A CN110751230 A CN 110751230A
Authority
CN
China
Prior art keywords
domain data
neural network
matrix
substance
network model
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
CN201911042826.3A
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.)
Shenzhen Huaxun Ark Photoelectric Technology Co ltd
Shenzhen Institute of Terahertz Technology and Innovation
Original Assignee
Shenzhen Institute of Terahertz Technology and Innovation
Shenzhen Huaxun Ark Technology Co Ltd
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 Shenzhen Institute of Terahertz Technology and Innovation, Shenzhen Huaxun Ark Technology Co Ltd filed Critical Shenzhen Institute of Terahertz Technology and Innovation
Priority to CN201911042826.3A priority Critical patent/CN110751230A/en
Publication of CN110751230A publication Critical patent/CN110751230A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2135Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
    • 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/3581Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using far infrared light; using Terahertz radiation
    • G01N21/3586Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using far infrared light; using Terahertz radiation by Terahertz time domain spectroscopy [THz-TDS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Toxicology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention is suitable for the technical field of material classification, and provides a material classification method, a device, terminal equipment and a storage medium, wherein the method comprises the steps of measuring terahertz time-domain spectral data of a material to be classified as first time-domain data; calculating an optical parameter matrix of the substances to be classified according to the first time domain data; performing dimensionality reduction processing on the optical parameter matrix according to a principal component analysis method to obtain a low-dimensional matrix; and inputting the low-dimensional matrix into a feedforward neural network model, and outputting a substance classification result corresponding to the first time domain data. The matrix features after PCA dimension reduction processing are concentrated, the parameter setting of the BP neural network is simple, the classification result has higher accuracy and stronger stability, and the problem of poor stability of the material classification result in the prior art is solved.

Description

Substance classification method, substance classification device, terminal device and storage medium
Technical Field
The invention belongs to the technical field of material classification, and particularly relates to a material classification method, a material classification device, terminal equipment and a storage medium.
Background
At present, the material classification technology mainly comprises Raman spectrum detection and terahertz spectrum detection. The Raman spectrum detection needs to irradiate laser on an article to obtain the Raman spectrum, so that the article is high in destructiveness, nondestructive detection and classification cannot be achieved, and the classification precision is low. The existing terahertz spectrum detection can realize nondestructive detection classification, and a substance classification model constructed by adopting a neural network can improve classification precision, but the feature matrix extracted by the existing substance classification model is not concentrated and the parameter setting is complex, so that the result stability is poor.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for substance classification, a terminal device, and a storage medium, so as to solve the problem in the prior art that the stability of a substance classification result is poor.
A first aspect of an embodiment of the present invention provides a substance classification method, including:
measuring terahertz time-domain spectral data of a substance to be classified as first time-domain data;
calculating an optical parameter matrix of the substances to be classified according to the first time domain data;
performing dimensionality reduction processing on the optical parameter matrix according to a principal component analysis method to obtain a low-dimensional matrix;
and inputting the low-dimensional matrix into a feedforward neural network model, and outputting a substance classification result corresponding to the first time domain data.
A second aspect of an embodiment of the present invention provides a substance sorting apparatus, including:
the measuring module is used for measuring terahertz time-domain spectral data of the substances to be classified as first time-domain data;
the calculation module is used for calculating an optical parameter matrix of the substance to be classified according to the first time domain data;
the dimensionality reduction module is used for carrying out dimensionality reduction on the optical parameter matrix according to the principal component analysis method to obtain a low-dimensional matrix;
and the output module is used for inputting the low-dimensional matrix into a feedforward neural network model and outputting a substance classification result corresponding to the first time domain data.
A third aspect of the embodiments of the present invention provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned substance classification method when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned substance classification method.
According to the embodiment of the invention, the optical parameter spectrum of a substance to be detected in a terahertz wave band is obtained, and the PCA extracts the characteristic matrix of the optical parameter spectrum of different substances in the terahertz wave band; and classifying by using the BP neural network according to the characteristic matrix. The method can directly test the substance to be tested without complex pretreatment, has the characteristics of high safety, simple operation, high efficiency, no damage and online monitoring, has centralized matrix characteristics after PCA dimension reduction treatment, has simple parameter setting of the BP neural network, realizes that the classification result has higher accuracy and stronger stability, and solves the problem of poor stability of the substance classification result in the prior art.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart of a method for classifying substances according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a substance classification method according to another embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating an interaction flow of a substance classification method according to another embodiment of the present invention;
FIG. 4 is a schematic view of a substance sorting apparatus provided in an embodiment of the present invention;
fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 illustrates a substance classification method provided by an embodiment of the present invention. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 1, a substance classification method includes steps S101-S104.
S101, measuring terahertz time-domain spectral data of the substance to be classified as first time-domain data.
In the embodiment of the invention, the terahertz time-domain spectroscopy of the substance to be classified is measured by the terahertz time-domain spectrometer, a data sequence consisting of terahertz time-domain spectroscopy data of a plurality of time-domain delay points (frequency points) is obtained, and all the data sequences form a data matrix.
S102, calculating an optical parameter matrix of the substance to be classified according to the first time domain data.
In the embodiment of the invention, the optical parameters of each frequency point in the data sequence formed by the terahertz time-domain spectral data are respectively calculated by a Fresnel formula, the optical parameters of all the frequency points are formed into the data sequence, and all the data sequences are formed into the optical parameter matrix.
Optionally, the calculating an optical parameter matrix of the substance to be classified according to the first time domain data includes:
acquiring terahertz time-domain spectral data of a preset reference object as second time-domain data; performing fast Fourier transform on the first time domain data and the second time domain data to obtain first frequency domain data corresponding to the first time domain data and second frequency domain data corresponding to the second time domain data; and calculating an optical parameter matrix of the substances to be classified through a Fresnel formula according to the first frequency domain data and the second frequency domain data.
In this embodiment, the terahertz time-domain spectroscopy of the preset reference object is measured by the terahertz time-domain spectroscopy to obtain second time-domain data.
In one embodiment, the predetermined reference is nitrogen, and the time-domain waveform (second time-domain data) E of nitrogen is usedM(t) as a reference signal, with a time-domain waveform (first time-domain data) E of the substance to be classifiedS(t) as sample signal, by fast Fourier transform, to obtain ES(t) corresponding first frequency domain waveform ES(ω), and EM(t) corresponding second frequency domain waveform EM(ω). Specifically, the method comprises the following steps:
EM(ω)=AM(ω)exp[-iφM(ω)]=∫EM(t)exp(-iωt)dt;
ES(ω)=AS(ω)exp[-iφS(ω)]=∫ES(t)exp(-iωt)dt;
wherein A isM(ω) is the amplitude of the reference signal, AS(ω) is the amplitude of the sample signal, φM(omega) is the phase of the reference signal, phiSAnd (ω) is the phase of the sample signal.
Further, the calculating the optical parameter matrix of the substance to be classified according to the first frequency domain data and the second frequency domain data includes:
calculating the ratio of the first frequency domain data to the second frequency domain data to obtain a complex transmission coefficient; calculating the optical parameters of each frequency point in the substances to be classified according to the complex transmission coefficient; and forming an optical parameter matrix by the optical parameters of all the frequency points.
The complex transmission coefficient is
Figure BDA0002253321550000051
Wherein rho (omega) is the amplitude ratio of the sample signal (the substance to be classified) to the reference signal (the preset reference), and phi (omega) is the phase difference between the sample signal and the reference signal.
Optionally, the above optical parameters include refractive index n (ω) and absorption coefficient α (ω), specifically,
Figure BDA0002253321550000052
where ω is the frequency point, c is the speed of light in vacuum, and d is the thickness of the material to be classified.
S103, performing dimensionality reduction on the optical parameter matrix according to a principal component analysis method to obtain a low-dimensional matrix.
The Principal Component Analysis (PCA) is a method of converting a set of high-dimensional variables, which may have correlation, into a set of linearly uncorrelated low-dimensional variables through orthogonal transformation, and the set of converted variables is the principal component. In this embodiment, the optical parameters in the optical parameter matrix are projected to a low-dimensional subspace to achieve dimension reduction. After the PCA is used for reducing the dimension of the optical parameter matrix, the matrix characteristics are concentrated, and therefore the trained neural network model has better performance.
Specifically, the performing the dimensionality reduction on the optical parameter matrix according to the principal component analysis method to obtain the low-dimensional matrix includes:
acquiring optical parameters of a specified frequency interval in the optical parameter matrix and carrying out normalization processing on the optical parameters to obtain an effective matrix; calculating a correlation coefficient matrix of the effective matrix, and calculating an eigenvalue and an eigenvector of the correlation coefficient matrix; calculating the accumulated contribution rate of the principal component according to the characteristic value, and determining the quantity of the characteristic vector according to the accumulated contribution rate; and determining all the feature vectors according to the number of the feature vectors, and forming a low-dimensional matrix by using all the determined feature vectors.
In the embodiment of the invention, the optical parameters are normalized to form an effective matrix, and a correlation coefficient matrix of the effective matrix is calculated as follows:
Figure BDA0002253321550000061
calculating the eigenvalue and eigenvector of the correlation coefficient matrix:
Figure BDA0002253321550000062
wherein a is a matrix of correlation coefficients,
Figure BDA0002253321550000063
is the eigenvector, λ is the eigenvalue.
It should be noted that A does not necessarily exist
Figure BDA0002253321550000064
And λ, if A is present
Figure BDA0002253321550000065
And λ, then there is a pair for each dimension of A
Figure BDA0002253321550000066
And λ. And sorting according to the size of the eigenvalues, wherein the eigenvector corresponding to the largest eigenvalue is the first principal component, the eigenvector corresponding to the second largest eigenvalue is the second principal component, and so on.
Further, sorting the eigenvalues from large to small according to the magnitude of the eigenvalues, and calculating the contribution rate of the ith principal component according to the eigenvalues
Figure BDA0002253321550000067
And when the accumulated contribution rate reaches a preset threshold (for example, 80%), and the accumulated contribution rate obtained by adding the contribution rates of the plurality of principal components is 80%, determining the number of the corresponding plurality of principal components (namely the number of eigenvectors), and forming a low-dimensional matrix by all the determined eigenvectors.
And S104, inputting the low-dimensional matrix into a feedforward neural network model, and outputting a substance classification result corresponding to the first time domain data.
The feedforward neural network model is a back propagation neural network model (BPNN). The low-dimensional matrix is firstly normalized, and characteristic parameters in the normalization operation are obtained by training samples in the normalization process.
The method can directly test the substance to be tested without complex pretreatment, has the characteristics of high safety, simple operation, high efficiency, no damage and online monitoring, has centralized matrix characteristics after PCA dimension reduction treatment, has simple parameter setting of a BP neural network model, realizes that the classification result has higher accuracy and stronger stability, and solves the problem of poor stability of the substance classification result in the prior art.
On the basis of the embodiment shown in fig. 1, fig. 2 shows a flow chart of another implementation of the substance classification method. As shown in fig. 2, steps S201-S203 are also included before step S104 in the embodiment shown in fig. 1. It should be noted that the steps that are the same as those in the embodiment of fig. 1 are not repeated herein, please refer to the foregoing description.
S201, inputting a training sample into a preset feedforward neural network model, and outputting a prediction output value;
s202, calculating a prediction error corresponding to the preset feedforward neural network model according to the predicted output value and an expected output value, wherein the expected output value is a preset expected value corresponding to the training sample;
s203, adjusting the weight and the threshold of the feedforward neural network model according to the prediction error, wherein the adjusted preset feedforward neural network model is used as the feedforward neural network model.
In the above S201, the output layer outputs the prediction output value
Figure BDA0002253321550000071
H is the hidden layer output, omegajkThe output layer weight, b is the output layer threshold, m is the number of output layer nodes, and j is 1,2, …, l.
Specifically, in step S201, inputting a training sample into the feedforward neural network model, and outputting a prediction output value, includes: inputting the training sample into an input layer of the preset feedforward neural network model, and outputting a hidden layer output value through a hidden layer of the feedforward neural network model, wherein the node number of the hidden layer is determined according to the node numbers of the input layer and the output layer of the feedforward neural network model; and taking the hidden layer output value as the input of the output layer, and outputting the prediction output value through the output layer.
The above hidden layer output value
Figure BDA0002253321550000072
Where f is the excitation function of the hidden layer, l is the number of nodes in the hidden layer, ωijAnd b, a is a hidden layer weight, a is a hidden layer threshold, x is an output of the input layer of the BP neural network model, namely an input of the hidden layer, and i is 1,2, …, n is n, and n is the number of nodes of the input layer.
Optionally, the calculation formula of the optimal number of hidden layer nodes is l<n-1,
Figure BDA0002253321550000081
l=log2n; wherein a is a constant between 1 and 10.
In S202, the expected output value is an expected value Y set in advance based on a training samplekThen the prediction error is ek=Yk-Qk,k=1,2,…,m。
In S203, an additive momentum method and a gradient correction method may be adopted as the learning algorithm of the weight and the threshold. Adjusting weight omega of hidden layerijOutput layer weight omegajkHidden layer threshold ajAnd output layer threshold bkAnd finishing the training of the neural network until the iteration of the neural network algorithm is finished. Specifically, the method comprises the following steps:ωjk=ωjk′+ηHjek
Figure BDA0002253321550000083
bk=b′k+ekwherein η is a learning rate.
On the basis of the embodiment shown in fig. 2, fig. 3 shows a flow chart of another implementation of the substance classification method. As shown in FIG. 3, steps S301-S303 are also included prior to step S201 in the embodiment shown in FIG. 2. It should be noted that the steps that are the same as those in the embodiment of fig. 2 are not repeated herein, please refer to the foregoing description.
S301, randomly selecting a specified number of data in the low-dimensional matrix, wherein the specified number is greater than or equal to half of the total number in the low-dimensional matrix;
s302, performing normalization operation on the randomly selected data to serve as the training sample;
and S303, normalizing the residual data in the low-dimensional matrix according to the normalization operation, and then taking the normalized data as the low-dimensional matrix input into the feedforward neural network model.
In the embodiment of the invention, data which is more than or equal to half of the total amount is selected as training samples, and the rest data is used as test data, so that the neural network model obtained by real-time training is more consistent with the classification of the corresponding substances to be classified. The test data (namely the low-dimensional matrix of the input feedforward neural network model) and the training sample are normalized separately, and the characteristic parameters of the test data for normalization are obtained when the training sample is normalized, so that the test data is prevented from knowing the spatial characteristics of the dimensionality reduction space in advance, and the classification result is more accurate.
The effect of the present invention will be further described with reference to simulation experiments. It should be noted that the description is only exemplary and should not be construed as limiting the invention.
Specifically, four coffee classifications of different roast levels are exemplified for details. The material 1, the material 2, the material 3 and the material 4 are light-roasted, raw bean, medium-roasted and deep-roasted coffee in sequence. The terahertz time-domain spectroscopy model is THz-TDS, and a transmission-type terahertz light path is adopted to work at room temperature. 120 sets of spectral data were measured for each material, 70 of which were randomly selected as training data and 50 of which were selected as test data.
And acquiring the principal component score (the number of eigenvectors) when the accumulated contribution rate is more than or equal to 99.5 percent to obtain a principal component score matrix. Table 1 shows the principal component scores corresponding to the cumulative contribution rate of 99.5% or more.
Number of major components 1 2 3 4 5 6
Rate of contribution 0.8508 0.1144 0.0211 0.0055 0.0021 0.0017
Cumulative contribution rate 0.8508 0.9652 0.9863 0.9919 0.9940 0.9957
The hidden layer excitation function is selected as:
Figure BDA0002253321550000091
the BP neural network classification accuracy table is shown in table 2.
Classes of coffee Shallow baking Raw beans Middle drying Deep baking
Accuracy of classification 0.7818 0.8393 0.6809 1.0000
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 4 shows a substance sorting apparatus provided by an embodiment of the present invention. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 4, the substance sorting apparatus 400 includes: .
The measuring module 401 is configured to measure terahertz time-domain spectral data of a substance to be classified as first time-domain data;
a calculating module 402, configured to calculate an optical parameter matrix of the substance to be classified according to the first time domain data;
a dimension reduction module 403, configured to perform dimension reduction processing on the optical parameter matrix according to a principal component analysis method to obtain a low-dimensional matrix;
and an output module 404, configured to input the low-dimensional matrix into a feed-forward neural network, and output a substance classification result corresponding to the first time-domain data.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, modules and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50, such as a program for performing a dimension reduction process on a matrix of optical parameters. The processor 50, when executing the computer program 52, implements the steps in the various material classification method embodiments described above, such as the steps 101 to 104 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 51 to 54 shown in fig. 5.
Illustratively, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the terminal device 5. For example, the computer program 52 may be divided into a measurement module, a calculation module, a dimension reduction module, and an output module (module in a virtual device), and the specific functions of each module are as follows: the measuring module is used for measuring terahertz time-domain spectral data of the substances to be classified as first time-domain data; the calculation module is used for calculating an optical parameter matrix of the substance to be classified according to the first time domain data; the dimensionality reduction module is used for carrying out dimensionality reduction on the optical parameter matrix according to a principal component analysis method to obtain a low-dimensional matrix; and the output module is used for inputting the low-dimensional matrix into the trained feedforward neural network and outputting a substance classification result.
The terminal device 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is merely an example of a terminal device 5 and does not constitute a limitation of terminal device 5 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing the computer program and other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A method of classifying a substance, comprising:
measuring terahertz time-domain spectral data of a substance to be classified as first time-domain data;
calculating an optical parameter matrix of the substances to be classified according to the first time domain data;
performing dimensionality reduction processing on the optical parameter matrix according to a principal component analysis method to obtain a low-dimensional matrix;
and inputting the low-dimensional matrix into a feedforward neural network model, and outputting a substance classification result corresponding to the first time domain data.
2. The method according to claim 1, wherein the calculating an optical parameter matrix of the substance to be classified according to the first time domain data comprises:
acquiring terahertz time-domain spectral data of a preset reference object as second time-domain data;
performing fast Fourier transform on the first time domain data and the second time domain data to obtain first frequency domain data corresponding to the first time domain data and second frequency domain data corresponding to the second time domain data;
and calculating an optical parameter matrix of the substances to be classified through a Fresnel formula according to the first frequency domain data and the second frequency domain data.
3. The substance classification method according to claim 2, wherein the calculating an optical parameter matrix of the substance to be classified by a fresnel formula according to the first frequency domain data and the second frequency domain data includes:
calculating the ratio of the first frequency domain data to the second frequency domain data to obtain a complex transmission coefficient;
calculating the optical parameters of each frequency point in the substances to be classified according to the complex transmission coefficient;
and forming an optical parameter matrix by the optical parameters of all the frequency points.
4. The method for classifying a substance according to claim 1, wherein the performing a dimensionality reduction process on the optical parameter matrix according to a principal component analysis method to obtain a low-dimensional matrix comprises:
acquiring optical parameters of a specified frequency interval in the optical parameter matrix, and carrying out normalization processing on the optical parameters to obtain an effective matrix;
calculating a correlation coefficient matrix of the effective matrix, and calculating an eigenvalue and an eigenvector of the correlation coefficient matrix;
calculating the accumulative contribution rate of the feature vector according to the feature value, and determining the number of the feature vector according to the accumulative contribution rate;
and determining the characteristic vectors according to the quantity of the characteristic vectors, and forming a low-dimensional matrix by all the determined characteristic vectors.
5. The method according to claim 1, wherein before inputting the low-dimensional matrix into a feedforward neural network model and outputting the material classification result corresponding to the first time domain data, the method further comprises:
inputting the training sample into a preset feedforward neural network model, and outputting a prediction output value;
calculating a prediction error corresponding to the preset feedforward neural network model according to the predicted output value and an expected output value, wherein the expected output value is a preset expected value corresponding to the training sample;
and adjusting the weight and the threshold of the preset feedforward neural network model according to the prediction error, and taking the adjusted preset feedforward neural network model as the feedforward neural network model.
6. The method for classifying a substance according to claim 5, wherein the inputting of the training samples into the preset feedforward neural network model and the outputting of the prediction output value comprise:
inputting the training sample into an input layer of the preset feedforward neural network model, and outputting a hidden layer output value through a hidden layer of the preset feedforward neural network model, wherein the node number of the hidden layer is determined according to the node numbers of the input layer and the output layer of the preset feedforward neural network model;
and taking the hidden layer output value as the input of the output layer, and outputting the prediction output value through the output layer.
7. The method for classifying a substance according to claim 5, wherein before inputting the training samples into the preset feedforward neural network model and outputting the predicted output value, the method further comprises:
randomly selecting a specified number of data in the low-dimensional matrix, wherein the specified number is greater than or equal to half of the total number in the low-dimensional matrix;
normalizing the randomly selected data to be used as the training sample;
and normalizing the residual data in the low-dimensional matrix according to the normalization operation, and then taking the normalized data as the low-dimensional matrix input into the feedforward neural network model.
8. A substance sorting device, comprising:
the measuring module is used for measuring terahertz time-domain spectral data of the substances to be classified as first time-domain data;
the calculation module is used for calculating an optical parameter matrix of the substance to be classified according to the first time domain data;
the dimensionality reduction module is used for carrying out dimensionality reduction on the optical parameter matrix according to a principal component analysis method to obtain a low-dimensional matrix;
and the output module is used for inputting the low-dimensional matrix into a feedforward neural network and outputting a substance classification result corresponding to the first time domain data.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201911042826.3A 2019-10-30 2019-10-30 Substance classification method, substance classification device, terminal device and storage medium Pending CN110751230A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911042826.3A CN110751230A (en) 2019-10-30 2019-10-30 Substance classification method, substance classification device, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911042826.3A CN110751230A (en) 2019-10-30 2019-10-30 Substance classification method, substance classification device, terminal device and storage medium

Publications (1)

Publication Number Publication Date
CN110751230A true CN110751230A (en) 2020-02-04

Family

ID=69281184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911042826.3A Pending CN110751230A (en) 2019-10-30 2019-10-30 Substance classification method, substance classification device, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN110751230A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111986740A (en) * 2020-09-03 2020-11-24 平安国际智慧城市科技股份有限公司 Compound classification method and related equipment
WO2022271098A3 (en) * 2021-06-21 2023-03-02 Anor Technologies Pte. Ltd. Method and apparatus for identifying a chemical compound
WO2023179593A1 (en) * 2022-03-23 2023-09-28 华为技术有限公司 Data processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102283243A (en) * 2011-06-29 2011-12-21 中国计量学院 Solid bactericide pesticide classification method
CN106815652A (en) * 2016-12-16 2017-06-09 国家电网公司 A kind of distribution network reliability Forecasting Methodology based on big data correlation analysis
CN108458989A (en) * 2018-04-28 2018-08-28 江苏建筑职业技术学院 A kind of Coal-rock identification method based on Terahertz multi-parameter spectrum

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102283243A (en) * 2011-06-29 2011-12-21 中国计量学院 Solid bactericide pesticide classification method
CN106815652A (en) * 2016-12-16 2017-06-09 国家电网公司 A kind of distribution network reliability Forecasting Methodology based on big data correlation analysis
CN108458989A (en) * 2018-04-28 2018-08-28 江苏建筑职业技术学院 A kind of Coal-rock identification method based on Terahertz multi-parameter spectrum

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
MATTEO PERENZONI 等: "太赫兹辐射物理及应用", vol. 2017, 30 June 2017, 华中科技大学出版社, pages: 199 - 201 *
吴勤 等: "太赫兹技术发展与应用", vol. 2018, 31 August 2018, 中国宇航出版社, pages: 102 - 105 *
孙冰 等: "锚杆锚固系统的瞬态动力相应特性", vol. 2015, 31 October 2015, 哈尔滨工业大学出版社, pages: 93 - 105 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111986740A (en) * 2020-09-03 2020-11-24 平安国际智慧城市科技股份有限公司 Compound classification method and related equipment
CN111986740B (en) * 2020-09-03 2024-05-14 深圳赛安特技术服务有限公司 Method for classifying compounds and related equipment
WO2022271098A3 (en) * 2021-06-21 2023-03-02 Anor Technologies Pte. Ltd. Method and apparatus for identifying a chemical compound
WO2023179593A1 (en) * 2022-03-23 2023-09-28 华为技术有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
Au Uncertainty law in ambient modal identification—Part I: Theory
CN110751230A (en) Substance classification method, substance classification device, terminal device and storage medium
Doran et al. A Permutation-Based Kernel Conditional Independence Test.
Chen et al. Compressive sensing for fast analysis of wide-angle monostatic scattering problems
CN112989266A (en) Periodicity detection and cycle length estimation in a time series
CN112070357A (en) Radar radiation source threat assessment method based on improved BP neural network
Imakura et al. Error bounds of Rayleigh–Ritz type contour integral-based eigensolver for solving generalized eigenvalue problems
CN107632010B (en) Method for quantifying steel sample by combining laser-induced breakdown spectroscopy
CN106483561B (en) A kind of wavelet decomposition method of frequency domain
Gupta et al. An alternative method for computing system-length distributions of BMAP/R/1 and BMAP/D/1 queues using roots
Kozłowski A Survey Length for AGN Variability Studies
White et al. Including parameter dependence in the data and covariance for cosmological inference
Li et al. Variable selection for fixed effects varying coefficient models
Dudek et al. PARMA models with applications in R
Lifshits et al. Approximation of additive random fields based on standard information: Average case and probabilistic settings
Tjoa et al. Harmonic variable-size dictionary learning for music source separation
Gandy et al. QuickMMCTest: quick multiple Monte Carlo testing
CN109241937B (en) Terahertz wave-based identification method and device and storage medium
Reynolds et al. On generalized Gaussian quadratures for bandlimited exponentials
Ferenc Clustering methods for ordinal variables
Hu et al. Modal Identification of damped vibrating systems by iterative smooth orthogonal decomposition method
JP2022538731A (en) A Sensory Evaluation Method for Spectral Data of Mainstream Cigarette Smoke
CN116318470B (en) Method and device for estimating communication interference signal power under non-Gaussian noise
Hong et al. Recent developments in high dimensional covariance estimation and its related issues, a review
Lemke et al. Stretched-exponential behavior and random walks on diluted hypercubic lattices

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230711

Address after: 408, Building 37, Chentian Industrial Zone, Chentian Community, Xixiang Street, Bao'an District, Shenzhen City, Guangdong Province, 518000

Applicant after: SHENZHEN INSTITUTE OF TERAHERTZ TECHNOLOGY AND INNOVATION Co.,Ltd.

Applicant after: Shenzhen Huaxun ark Photoelectric Technology Co.,Ltd.

Address before: 518000 East, 2nd floor, building 37, chentian Industrial Zone, Baotian 1st Road, Xixiang street, Bao'an District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN INSTITUTE OF TERAHERTZ TECHNOLOGY AND INNOVATION Co.,Ltd.

Applicant before: CHINA COMMUNICATION TECHNOLOGY Co.,Ltd.