CN116994117A - Training method, device, equipment and storage medium of target spectrum analysis model - Google Patents

Training method, device, equipment and storage medium of target spectrum analysis model Download PDF

Info

Publication number
CN116994117A
CN116994117A CN202311016817.3A CN202311016817A CN116994117A CN 116994117 A CN116994117 A CN 116994117A CN 202311016817 A CN202311016817 A CN 202311016817A CN 116994117 A CN116994117 A CN 116994117A
Authority
CN
China
Prior art keywords
spectrum
spectral
target
data
analysis 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
CN202311016817.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 Xianwen Technology Co ltd
Original Assignee
Shenzhen Xianwen 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 Xianwen Technology Co ltd filed Critical Shenzhen Xianwen Technology Co ltd
Priority to CN202311016817.3A priority Critical patent/CN116994117A/en
Publication of CN116994117A publication Critical patent/CN116994117A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • 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/39Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using tunable lasers
    • 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/0464Convolutional networks [CNN, ConvNet]
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/766Arrangements for image or video recognition or understanding using pattern recognition or machine learning using regression, e.g. by projecting features on hyperplanes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Optics & Photonics (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of laser spectrum analysis and discloses a training method, device and equipment of a target spectrum analysis model and a storage medium. The training method of the target spectrum analysis model comprises the following steps: acquiring spectral characteristic data of various different kinds of substances; processing the spectrum characteristic data to obtain spectrum intensities of all substances under different spectrum wavelengths; recording the spectrum intensity of each spectrum wavelength to obtain the spectrum line corresponding to each spectrum intensity; and combining the spectral lines to obtain a spectral matrix. The invention can generate accurate and reliable spectrum characteristic prediction by using a ridge regression algorithm and a machine learning model. And the color chart is utilized to visualize the data, so that the data analysis result is more visual and easy to understand. The invention provides a rapid, accurate and low-cost spectrum data processing and analyzing mode, and can be widely applied to scientific research and industrial production.

Description

Training method, device, equipment and storage medium of target spectrum analysis model
Technical Field
The present invention relates to the field of laser spectrum analysis technologies, and in particular, to a training method, apparatus, device, and storage medium for a target spectrum analysis model.
Background
Spectroscopic analysis is a powerful tool that can be used to study the properties of different substances. By studying the way substances emit or absorb light, important information about their structure, composition and physical properties can be obtained.
Existing spectroscopic analysis methods rely primarily on large amounts of experimental data and often require specialized software and expertise to perform the analysis. Furthermore, some commonly used data processing and analysis methods, such as linear regression, are not effective in processing large complex data sets. Thus, there is a need for a more efficient and accurate way to process and analyze spectral data.
Disclosure of Invention
The invention provides a training method, a training device, training equipment and a storage medium of a target spectrum analysis model, which are used for solving the problem of how to process and analyze spectrum data in a more efficient and more accurate mode provided by a machine learning model.
The first aspect of the present invention provides a training method of a target spectrum analysis model, the training method of the target spectrum analysis model comprising:
acquiring spectral characteristic data of various different kinds of substances; the spectrum characteristic data are stored in a spectrum library in advance;
Processing the spectrum characteristic data to obtain spectrum intensities of all substances under different spectrum wavelengths;
recording the spectrum intensity of each spectrum wavelength to obtain the spectrum line corresponding to each spectrum intensity; combining the spectral lines to obtain a spectral matrix; wherein the spectral line comprises at least one continuous or discrete sequence from a shortest spectral wavelength to a longest spectral wavelength; the rows of the spectrum matrix represent different observation positions or different observation time points, and the columns of the spectrum matrix represent different spectrum wavelengths;
carrying out statistical analysis on the spectrum matrix through a preset ridge regression algorithm to generate a regression coefficient; the regression coefficient is used for representing the corresponding relation between each spectrum wavelength and each spectrum intensity;
calculating the score of each spectral line according to the regression coefficient and the spectral intensity to generate a score result; mapping the scoring result to a preset color chart to generate a scoring image;
inputting the score image into a preset original model for training to obtain a target spectrum analysis model; the target spectrum analysis model is used for carrying out predictive analysis on spectrum characteristic data in the spectrum library.
Optionally, in a first implementation manner of the first aspect of the present invention, before the step of acquiring the spectral feature data of the substances of different kinds, the method includes:
creating a spectrum folder, creating a data table in the spectrum folder, and storing the spectrum characteristic data in the data table;
randomly selecting a target letter from an alphabet stored in a preset database; wherein, an alphabet is prestored in the preset database, and the alphabet comprises a plurality of different English capital letters and/or a plurality of different English lowercase letters;
transmitting the target letter to a spectrum library management terminal; the spectrum library management terminal generates a corresponding encryption password based on the target letter;
and receiving the encryption password returned by the spectrum library management terminal, and encrypting the data table of the spectrum folder according to the encryption password to obtain an encrypted data table.
Optionally, in a second implementation manner of the first aspect of the present invention, before the step of acquiring the spectral feature data of the substances of different kinds, the method includes:
creating a spectrum folder, creating a data table in the spectrum folder, and storing the spectrum characteristic data in the data table;
Initializing the data table, and converting the data table into a plurality of partition tables according to a preset partition rule; wherein the partitioning rule is generated according to different added partitioning values;
respectively carrying out hash processing on each partition table to obtain corresponding hash values, and carrying out character string splicing processing on the hash values corresponding to each partition table to obtain a first character string;
adding the first character string to a corresponding picture in a preset color picture layer, and storing the picture into the spectrum folder;
acquiring the number of characters of an identification field, and matching corresponding character segmentation modes according to the number of the characters; the identification field is stored in a preset database; the corresponding relation between the number of characters and the character segmentation mode is prestored in a preset database;
dividing the identification field based on the matched character dividing mode to obtain a plurality of sequentially ordered character intervals;
acquiring initial letters of all the character intervals, and selecting target character intervals with the initial letters as preset characters; acquiring characters in the target character interval as a specified identifier;
transmitting the specified identifier to a spectrum library management terminal; the spectrum library management terminal generates a corresponding encryption password based on the appointed identifier;
And receiving the encryption password returned by the spectrum library management terminal, and encrypting the spectrum folder according to the encryption password to obtain the encrypted spectrum folder.
Optionally, in a third implementation manner of the first aspect of the present invention, the inputting the score image into a preset original model for training to obtain a target spectrum analysis model includes:
establishing a multi-scale feature fusion structure, wherein the multi-scale feature fusion structure is used for fusing different-scale spectrum feature data;
extracting spectral feature data output by the third to fifth modules, wherein the spectral data feature data output is represented by { C3, C4, C5 }, and each output represents 256 feature score images generated by 1×1 convolution;
after the corresponding 3-layer convolution structure is represented as { M3, M4, M5 }, performing bottom-up fusion on each layer of feature score images to obtain fused spectral feature data; the target spectrum analysis model backbone network comprises 5 modules, wherein the last 4 modules of the 5 modules consist of a plurality of different types of residual blocks;
and inputting the fused spectral characteristic data into a preset original model for training to obtain a trained target spectral analysis model.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the bottom-up fusion of the feature score images of each layer includes the specific steps of:
the characteristic score image scale of the M5 layer of the convolution structure is expanded to be the same as the characteristic score image scale of the M4 layer of the convolution structure through up-sampling;
the up-sampling characteristic information and the characteristic score image of the convolution structure M4 are fused, and the fused characteristic score image passes through an up-sampling layer and the corresponding scale is expanded to be the same as that of the convolution structure M3 layer;
the up-sampling information after fusion is fused with a convolution structure M3, and finally the spectrum characteristic data after fusion is obtained; and generating a predictive analysis result of the target spectrum analysis model on each substance based on the fused spectrum characteristic data.
The second aspect of the present invention provides a training device for a target spectrum analysis model, the training device for a target spectrum analysis model comprising:
the acquisition module is used for acquiring spectral characteristic data of various different substances; the spectrum characteristic data are stored in a spectrum library in advance;
the processing module is used for processing the spectrum characteristic data to obtain the spectrum intensity of each substance under different spectrum wavelengths;
The combination module is used for recording the spectrum intensity of each spectrum wavelength and obtaining the spectrum line corresponding to each spectrum intensity; combining the spectral lines to obtain a spectral matrix; wherein the spectral line comprises at least one continuous or discrete sequence from a shortest spectral wavelength to a longest spectral wavelength; the rows of the spectrum matrix represent different observation positions or different observation time points, and the columns of the spectrum matrix represent different spectrum wavelengths;
the statistical analysis module is used for carrying out statistical analysis on the spectrum matrix through a preset ridge regression algorithm to generate a regression coefficient; the regression coefficient is used for representing the corresponding relation between each spectrum wavelength and each spectrum intensity;
the calculation module is used for calculating the score of each spectral line according to the regression coefficient and the spectral intensity to generate a score result; mapping the scoring result to a preset color chart to generate a scoring image;
the generating module is used for inputting the score image into a preset original model for training to obtain a target spectrum analysis model; the target spectrum analysis model is used for carrying out predictive analysis on spectrum characteristic data in the spectrum library.
A third aspect of the present invention provides a training apparatus for a target spectral analysis model, comprising: a memory and at least one processor, the memory having instructions stored therein; the at least one processor invokes the instructions in the memory to cause the training device of the target spectral analysis model to perform the training method of the target spectral analysis model described above.
A fourth aspect of the invention provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the above-described training method of a target spectral analysis model.
In the technical scheme provided by the invention, the beneficial effects are as follows: the invention provides a training method, a training device, training equipment and a training storage medium of a target spectrum analysis model, which are used for acquiring spectrum characteristic data of various different substances; processing the spectrum characteristic data to obtain spectrum intensities of all substances under different spectrum wavelengths; recording the spectrum intensity of each spectrum wavelength to obtain the spectrum line corresponding to each spectrum intensity; combining the spectral lines to obtain a spectral matrix; carrying out statistical analysis on the spectrum matrix through a preset ridge regression algorithm to generate a regression coefficient; calculating the score of each spectral line according to the regression coefficient and the spectral intensity to generate a score result; mapping the scoring result to a preset color chart to generate a scoring image; inputting the score image into a preset original model for training to obtain a target spectrum analysis model; the training of the preset original model can generate accurate prediction of the scores of all the spectral lines, and the accuracy of analysis results is greatly improved. And the application of the target spectrum analysis model can be used for predictive analysis of spectrum characteristic data in any spectrum library, thereby providing wide application possibilities. The invention realizes the extraction of useful information from complex spectrum data, obtains accurate and reliable spectrum characteristic prediction, and greatly improves the efficiency and accuracy of spectrum analysis.
Drawings
FIG. 1 is a schematic diagram of one embodiment of a training method of a target spectrum analysis model in an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of a training apparatus for a target spectrum analysis model according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a training method, device and equipment for a target spectrum analysis model and a storage medium. The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For ease of understanding, a specific flow of an embodiment of the present invention is described below, referring to fig. 1, and one embodiment of a training method for a target spectrum analysis model in an embodiment of the present invention includes:
101. acquiring spectral characteristic data of various different kinds of substances; the spectrum characteristic data are stored in a spectrum library in advance;
it can be understood that the execution subject of the present invention may be a training device of the target spectrum analysis model, and may also be a terminal or a server, which is not limited herein. The embodiment of the invention is described by taking a server as an execution main body as an example.
Specifically, the implementation method for acquiring the spectrum characteristic data of different substances and storing the spectrum characteristic data in a spectrum library is as follows:
and (3) selecting equipment: a suitable spectral acquisition device, such as a spectrometer or spectrometer, is selected to acquire spectral signature data of the substance. For example, infrared spectrometers are used to measure fat content in food products.
Sample preparation: samples of different species to be measured are prepared. For example, for spectral signature measurement of plant leaves, different kinds of plants may be selected and leaf samples thereof prepared.
Spectral measurement: spectral measurements were performed on each sample using the selected spectral acquisition device. For example, a food sample is placed in an infrared spectrometer and the spectral intensities of the sample at different wavelengths are recorded.
Data processing and feature extraction: the measured spectral data is processed and features extracted. For example, background correction and noise filtering are performed, and then the absorption peak intensity at a specific wavelength is extracted.
Spectrum library construction and storage: the extracted spectral feature data is stored in a spectral library. For example, a database is created, one entry for each substance, storing its corresponding spectral signature data. For example, entries may be created for apples, bananas and oranges and their spectral feature data associated therewith.
102. Processing the spectrum characteristic data to obtain spectrum intensities of all substances under different spectrum wavelengths;
specifically, the processing of the spectral characteristic data is realized, the intensity of each substance under each spectral wavelength is obtained, and the specific steps are as follows:
and (3) spectrum data acquisition, namely acquiring spectrum performance of the substance by a spectrometer. For example, a sample of the compound is subjected to raman or infrared spectroscopy, and complete spectroscopic data is recorded.
Spectrum decomposition, namely discretizing original continuous spectrum data, and acquiring the light intensity under each wavelength according to the specific wavelength of the light absorbed or emitted by the substance. For example, a certain wavelength is represented by λ, and the corresponding spectral intensity is represented by I (λ).
And (3) recording the spectrum intensity, namely recording the spectrum intensity at each wavelength to form a numerical sequence of the spectrum intensity. Taking a unit of every 10 nm, for example a wavelength from 400 nm to 800 nm, a recording is made every 10 nm, thus obtaining a light intensity sequence of 40 a length.
And forming a spectrum data characteristic, namely organizing the recorded light intensity series of each substance to form a spectrum characteristic matrix, wherein rows represent different substances, columns represent different wavelengths, and element values represent corresponding spectrum intensities.
103. Recording the spectrum intensity of each spectrum wavelength to obtain the spectrum line corresponding to each spectrum intensity; combining the spectral lines to obtain a spectral matrix; wherein the spectral line comprises at least one continuous or discrete sequence from a shortest spectral wavelength to a longest spectral wavelength; the rows of the spectrum matrix represent different observation positions or different observation time points, and the columns of the spectrum matrix represent different spectrum wavelengths;
specifically, the steps of recording the spectrum intensity under each spectrum wavelength, forming the spectrum line and forming the spectrum matrix are as follows:
spectral intensity recording, namely measuring the spectral intensity of a specific substance at each spectral wavelength by using a spectrometer, and recording to obtain a series of data. For example, the light intensity values may be recorded every 0.1 nm in the range of 200-800 nm, forming a discrete or continuous spectral line from shortest to longest wavelength.
And (3) organizing the spectrum lines, namely orderly organizing the measured spectrum intensity points, wherein each spectrum intensity point corresponds to a specific wavelength on the spectrum line, and thus, the corresponding spectrum intensity and wavelength can form a spectrum line.
And constructing a spectrum matrix, namely combining each spectrum line according to the measured observation position or the observation time point to form a two-dimensional spectrum matrix. The rows of the spectral matrix represent different observation positions or different observation time points, the columns represent different spectral wavelengths, and at each element position of the spectral matrix are the spectral intensity values of the corresponding observation position or time point, spectral wavelength.
104. Carrying out statistical analysis on the spectrum matrix through a preset ridge regression algorithm to generate a regression coefficient; the regression coefficient is used for representing the corresponding relation between each spectrum wavelength and each spectrum intensity;
specifically, the statistical analysis of the spectrum matrix through a preset ridge regression algorithm is realized, and the step of generating regression coefficients is as follows:
pretreatment: the spectrum matrix is first subjected to necessary pretreatment including denoising, normalization and other operations, so that the data is suitable for high-efficiency ridge regression analysis.
Ridge regression analysis: the processed spectral matrix is subjected to Ridge regression analysis using a predetermined Ridge regression algorithm, for example using the Ridge class in the scikit-learn library. In ridge regression analysis, it is often necessary to set an appropriate regularization coefficient.
Generating regression coefficients: after the ridge regression operation is finished, a regression coefficient vector is obtained, and the vector contains a plurality of regression coefficients. Each regression coefficient corresponds to a spectral wavelength and represents the impact weight of the spectral intensity at that spectral wavelength on the final output.
For example, if the resulting coefficient vector for a certain ridge regression is [0.5, -0.2, 0.3], it represents the correspondence of the spectral intensities at the corresponding wavelengths, e.g., the spectral intensity at the first wavelength has a positive effect, the spectral intensity at the second wavelength has a negative effect, and the spectral intensity at the third wavelength has a positive effect.
105. Calculating the score of each spectral line according to the regression coefficient and the spectral intensity to generate a score result; mapping the scoring result to a preset color chart to generate a scoring image;
specifically, the steps of calculating the score of each spectral line according to the regression coefficient and the spectral intensity and generating a score image are as follows:
calculate the score for each spectral line: for each spectral line, there is a series of spectral intensity values, together with a pre-calculated or given regression coefficient for the corresponding wavelength. The score for each spectral line can be obtained by multiplying the spectral intensity of each wavelength by a corresponding regression coefficient and then summing all the products. That is, score=Σ (spectral intensity×regression coefficient for the corresponding wavelength).
Generating a scoring result: the above operation is performed on each spectral line, and a scoring result corresponding to all spectral lines is obtained.
Mapping generates a score image: and mapping the scoring result to a preset color chart, wherein each scoring value corresponds to one color in the color chart, so that a scoring image can be generated. For example, assuming that the preset color map is a thermodynamic diagram, a high score may be mapped to red and a low score to blue, in this way the scoring result may be represented in the scoring image.
106. Inputting the score image into a preset original model for training to obtain a target spectrum analysis model; the target spectrum analysis model is used for carrying out predictive analysis on spectrum characteristic data in the spectrum library.
Specifically, the step of inputting the score image into a preset original model for training and obtaining a target spectrum analysis model is as follows:
pretreatment: first, the score image is subjected to necessary preprocessing. The image typically needs to be converted into a numerical matrix or tensor form suitable for model learning. For example, when using deep learning models such as Convolutional Neural Networks (CNNs), images are typically converted into three-dimensional tensors (height, width, color channels).
Setting a model: a pre-set raw model is defined, the type of model depending on the specific task and data type. For example, if it is image data, a model that may be selected is a Convolutional Neural Network (CNN).
Training a model: the score image data is input to the original model for training. Training a preset original model by using the score image to obtain a target spectrum analysis model, wherein the model can be used for carrying out predictive analysis on spectrum characteristic data in a spectrum library.
Another embodiment of the training method of the target spectrum analysis model in the embodiment of the invention comprises the following steps:
before the step of acquiring the spectral feature data of the various different kinds of substances, the method comprises the following steps:
creating a spectrum folder, creating a data table in the spectrum folder, and storing the spectrum characteristic data in the data table;
randomly selecting a target letter from an alphabet stored in a preset database; wherein, an alphabet is prestored in the preset database, and the alphabet comprises a plurality of different English capital letters and/or a plurality of different English lowercase letters;
transmitting the target letter to a spectrum library management terminal; the spectrum library management terminal generates a corresponding encryption password based on the target letter;
And receiving the encryption password returned by the spectrum library management terminal, and encrypting the data table of the spectrum folder according to the encryption password to obtain an encrypted data table.
Specifically, the steps of obtaining the spectrum characteristic data of different substances and performing related encryption operation are as follows:
creating a spectrum folder and a data table: first, a spectrum folder is created on a local or server, and a data table named as a table name of a substance is created in the folder, and spectrum characteristic data of the corresponding substance is stored in the data table.
Selecting a target letter: in the predetermined database, there is a pre-stored alphabet comprising a plurality of different english-case letters. One letter is randomly selected from the table as the target letter.
Generating and receiving an encrypted password: and sending the selected target letter to a spectrum library management terminal, and generating a corresponding encryption password based on the received target letter by the terminal and returning the corresponding encryption password. The specific operation needs to be performed with the spectrum library management terminal through a preset communication protocol.
Encrypted data table: and after receiving the encryption password returned by the spectrum library management terminal, carrying out encryption operation on the data table of the spectrum folder by using the password.
Another embodiment of the training method of the target spectrum analysis model in the embodiment of the invention comprises the following steps: before the step of acquiring the spectral feature data of the various different kinds of substances, the method comprises the following steps:
creating a spectrum folder, creating a data table in the spectrum folder, and storing the spectrum characteristic data in the data table;
initializing the data table, and converting the data table into a plurality of partition tables according to a preset partition rule; wherein the partitioning rule is generated according to different added partitioning values;
respectively carrying out hash processing on each partition table to obtain corresponding hash values, and carrying out character string splicing processing on the hash values corresponding to each partition table to obtain a first character string;
adding the first character string to a corresponding picture in a preset color picture layer, and storing the picture into the spectrum folder;
acquiring the number of characters of an identification field, and matching corresponding character segmentation modes according to the number of the characters; the identification field is stored in a preset database; the corresponding relation between the number of characters and the character segmentation mode is prestored in a preset database;
Dividing the identification field based on the matched character dividing mode to obtain a plurality of sequentially ordered character intervals;
acquiring initial letters of all the character intervals, and selecting target character intervals with the initial letters as preset characters; acquiring characters in the target character interval as a specified identifier;
transmitting the specified identifier to a spectrum library management terminal; the spectrum library management terminal generates a corresponding encryption password based on the appointed identifier;
and receiving the encryption password returned by the spectrum library management terminal, and encrypting the spectrum folder according to the encryption password to obtain the encrypted spectrum folder.
In particular, for example, consider the acquisition of spectral signature data for substances such as oxygen and nitrogen. First, a spectrum folder is created and a data table is created to save the data. After initializing the data table, the data table is divided into a plurality of partition tables using a preset rule such as date or substance type. Then, each partition table is processed to obtain hash values, and all the hash values are spliced into one character string. The character string is added to a preset color layer to generate a picture and stored in a spectrum folder.
Then, the identification field of the preset database is checked, the first letter of O is classified into a first area, and the first letter of N is classified into a second area. Then dividing according to preset character dividing mode, for example, selecting all the fields with letters being lowercase, dividing them into one zone, and dividing the fields with letters being uppercase into two zones.
And finding out a target character interval with the initial meeting the preset requirement in all character intervals, for example, a character interval with the initial of 'O', and acquiring characters from the target character interval as identifiers. These assigned identifiers are then sent to the spectral library management terminal.
And after receiving the identifier, the spectrum library management terminal generates a corresponding encryption password and returns the corresponding encryption password. And finally, encrypting the spectrum folder by utilizing the password to obtain the final encrypted spectrum folder.
Another embodiment of the training method of the target spectrum analysis model in the embodiment of the invention comprises the following steps:
inputting the score image into a preset original model for training to obtain a target spectrum analysis model, wherein the method comprises the following steps of:
establishing a multi-scale feature fusion structure, wherein the multi-scale feature fusion structure is used for fusing different-scale spectrum feature data;
extracting spectral feature data output by the third to fifth modules, wherein the spectral data feature data output is represented by { C3, C4, C5 }, and each output represents 256 feature score images generated by 1×1 convolution;
After the corresponding 3-layer convolution structure is represented as { M3, M4, M5 }, performing bottom-up fusion on each layer of feature score images to obtain fused spectral feature data; the target spectrum analysis model backbone network comprises 5 modules, wherein the last 4 modules of the 5 modules consist of a plurality of different types of residual blocks;
and inputting the fused spectral characteristic data into a preset original model for training to obtain a trained target spectral analysis model.
Specifically, the following is a specific explanation of the contents of the present embodiment:
multiscale feature fusion structure: in this embodiment, the multi-scale feature fusion structure is used to integrate and fuse spectral feature data of different scales. Meaning that the model integrates feature data of different resolutions and scales, enabling the model to capture both local detailed information (from smaller scales) and global context information (from larger scales) at the same time.
And (3) a module: according to the technical scheme, a target spectrum analysis model backbone network is divided into 5 modules, and each module can be understood as a characteristic extraction part of an independent task.
Spectral feature data: in this embodiment, the feature data are extracted from the third to fifth modules of the backbone network, and the output of each module is subjected to a 1×1 convolution operation to generate 256 feature score images, which are the spectral feature data.
1x1 convolution: here, a 1x1 convolution is used to convert the output of each module, generating 256 feature score images. This is a feature dimension conversion approach that does not affect spatial resolution, is beneficial to preserving the original spatial information,
fused spectral feature data: in the scheme, bottom-up feature fusion refers to sequentially fusing the feature score image of each layer with the features of the upper layer, and the obtained result is fused spectral feature data which contains the spectral feature information of all modules.
Presetting an original model: in this embodiment, this is a predefined neural network model as a training starting model. Training and updating are carried out by inputting the fused spectral characteristic data.
Target spectral analysis model: the neural network model obtained after training and optimizing in certain steps has better spectrum analysis capability. In the technical scheme, the model obtained by training the fused spectral feature data is input in particular.
Residual block: in the target spectrum analysis model backbone network of the technical scheme, the last 4 modules consist of a plurality of different kinds of residual blocks. Each residual block consists of a number of convolutional layers and non-linear operations, which help solve training problems that deep neural networks are prone to experience, such as gradient extinction or explosion, by adding a jump connection.
Another embodiment of the training method of the target spectrum analysis model in the embodiment of the invention comprises the following steps:
the method for fusing the feature score images of each layer from bottom to top comprises the following specific steps:
the characteristic score image scale of the M5 layer of the convolution structure is expanded to be the same as the characteristic score image scale of the M4 layer of the convolution structure through up-sampling;
the up-sampling characteristic information and the characteristic score image of the convolution structure M4 are fused, and the fused characteristic score image passes through an up-sampling layer and the corresponding scale is expanded to be the same as that of the convolution structure M3 layer;
the up-sampling information after fusion is fused with a convolution structure M3, and finally the spectrum characteristic data after fusion is obtained; and generating a predictive analysis result of the target spectrum analysis model on each substance based on the fused spectrum characteristic data.
Specifically, the following is an explanation and specific content of each step:
feature score image upsampling for the convolutions M5 layer: upsampling, otherwise known as upsampling or interpolation, is the expansion of image data from a smaller scale to a larger scale, similar to the "magnification" of an image. Here, the scale of the M5 layer feature score image is enlarged to the same scale size as the M4 layer feature score image. Thus, the feature score images of the M5 layer and the M4 layer can be directly fused.
Fusing the M5 layer up-sampling feature and the M4 layer feature: this fusion process is by simple element-level addition, e.g., concatenating feature maps and fusing by convolution. The feature information of different layers can be combined together through fusion, and the performance of the model is improved.
A second upsampling is performed and fused with the M3 layer features: and (3) up-sampling the feature score image fused in the previous step, expanding the scale to the same scale as that of the M3 layer of the convolution structure, and fusing the up-sampled feature image with the feature score image of the M3 layer to obtain the feature image fused with the feature information of all layers.
Generating model predictions based on the fused spectral feature data: and finally, the obtained fused spectral feature data are injected into a preset original model for training, and then a prediction result is generated based on the trained models. Such predictive analysis enables assessment of the spectral characteristics of various substances and their possible distribution.
The training method of the target spectrum analysis model in the embodiment of the present invention is described above, and the training device of the target spectrum analysis model in the embodiment of the present invention is described below, referring to fig. 2, one embodiment of the training device 1 of the target spectrum analysis model in the embodiment of the present invention includes:
An acquisition module 11 for acquiring spectral feature data of various different kinds of substances; the spectrum characteristic data are stored in a spectrum library in advance;
the processing module 12 is configured to process the spectral feature data to obtain spectral intensities of each substance at different spectral wavelengths;
the combination module 13 is used for recording the spectrum intensity of each spectrum wavelength and obtaining the spectrum line corresponding to each spectrum intensity; combining the spectral lines to obtain a spectral matrix; wherein the spectral line comprises at least one continuous or discrete sequence from a shortest spectral wavelength to a longest spectral wavelength; the rows of the spectrum matrix represent different observation positions or different observation time points, and the columns of the spectrum matrix represent different spectrum wavelengths;
the statistical analysis module 14 is configured to perform statistical analysis on the spectrum matrix through a preset ridge regression algorithm, so as to generate a regression coefficient; the regression coefficient is used for representing the corresponding relation between each spectrum wavelength and each spectrum intensity;
a calculation module 15, configured to calculate a score of each spectral line according to the regression coefficient and the spectral intensity, and generate a score result; mapping the scoring result to a preset color chart to generate a scoring image;
The generating module 16 is configured to input the score image into a preset original model for training, so as to obtain a target spectrum analysis model; the target spectrum analysis model is used for carrying out predictive analysis on spectrum characteristic data in the spectrum library.
In this embodiment, for specific implementation of each module in the training device embodiment of the target spectrum analysis model, please refer to the description in the training method embodiment of the target spectrum analysis model, and no further description is given here.
The invention also provides a training device of the target spectrum analysis model, which comprises a memory and a processor, wherein the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, cause the processor to execute the steps of the training method of the target spectrum analysis model in the above embodiments.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and may also be a volatile computer readable storage medium, where instructions are stored in the computer readable storage medium, which when executed on a computer, cause the computer to perform the steps of the training method of the target spectral analysis model.
The beneficial effects are that: the invention provides a training method, a training device, training equipment and a training storage medium of a target spectrum analysis model, which are used for acquiring spectrum characteristic data of various different substances; processing the spectrum characteristic data to obtain spectrum intensities of all substances under different spectrum wavelengths; recording the spectrum intensity of each spectrum wavelength to obtain the spectrum line corresponding to each spectrum intensity; combining the spectral lines to obtain a spectral matrix; carrying out statistical analysis on the spectrum matrix through a preset ridge regression algorithm to generate a regression coefficient; calculating the score of each spectral line according to the regression coefficient and the spectral intensity to generate a score result; mapping the scoring result to a preset color chart to generate a scoring image; inputting the score image into a preset original model for training to obtain a target spectrum analysis model; the training of the preset original model can generate accurate prediction of the scores of all the spectral lines, and the accuracy of analysis results is greatly improved. And the application of the target spectrum analysis model can be used for predictive analysis of spectrum characteristic data in any spectrum library, thereby providing wide application possibilities. The invention realizes the extraction of useful information from complex spectrum data, obtains accurate and reliable spectrum characteristic prediction, and greatly improves the efficiency and accuracy of spectrum analysis.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method of training a target spectral analysis model, comprising:
acquiring spectral characteristic data of various different kinds of substances; the spectrum characteristic data are stored in a spectrum library in advance;
processing the spectrum characteristic data to obtain spectrum intensities of all substances under different spectrum wavelengths;
recording the spectrum intensity of each spectrum wavelength to obtain the spectrum line corresponding to each spectrum intensity; combining the spectral lines to obtain a spectral matrix; wherein the spectral line comprises at least one continuous or discrete sequence from a shortest spectral wavelength to a longest spectral wavelength; the rows of the spectrum matrix represent different observation positions or different observation time points, and the columns of the spectrum matrix represent different spectrum wavelengths;
Carrying out statistical analysis on the spectrum matrix through a preset ridge regression algorithm to generate a regression coefficient; the regression coefficient is used for representing the corresponding relation between each spectrum wavelength and each spectrum intensity;
calculating the score of each spectral line according to the regression coefficient and the spectral intensity to generate a score result; mapping the scoring result to a preset color chart to generate a scoring image;
inputting the score image into a preset original model for training to obtain a target spectrum analysis model; the target spectrum analysis model is used for carrying out predictive analysis on spectrum characteristic data in the spectrum library.
2. The method of claim 1, wherein prior to the step of obtaining spectral feature data for each of the different species, comprising:
creating a spectrum folder, creating a data table in the spectrum folder, and storing the spectrum characteristic data in the data table;
randomly selecting a target letter from an alphabet stored in a preset database; wherein, an alphabet is prestored in the preset database, and the alphabet comprises a plurality of different English capital letters and/or a plurality of different English lowercase letters;
Transmitting the target letter to a spectrum library management terminal; the spectrum library management terminal generates a corresponding encryption password based on the target letter;
and receiving the encryption password returned by the spectrum library management terminal, and encrypting the data table of the spectrum folder according to the encryption password to obtain an encrypted data table.
3. The method of claim 1, wherein prior to the step of obtaining spectral feature data for each of the different species, comprising:
creating a spectrum folder, creating a data table in the spectrum folder, and storing the spectrum characteristic data in the data table;
initializing the data table, and converting the data table into a plurality of partition tables according to a preset partition rule; wherein the partitioning rule is generated according to different added partitioning values;
respectively carrying out hash processing on each partition table to obtain corresponding hash values, and carrying out character string splicing processing on the hash values corresponding to each partition table to obtain a first character string;
adding the first character string to a corresponding picture in a preset color picture layer, and storing the picture into the spectrum folder;
Acquiring the number of characters of an identification field, and matching corresponding character segmentation modes according to the number of the characters; the identification field is stored in a preset database; the corresponding relation between the number of characters and the character segmentation mode is prestored in a preset database;
dividing the identification field based on the matched character dividing mode to obtain a plurality of sequentially ordered character intervals;
acquiring initial letters of all the character intervals, and selecting target character intervals with the initial letters as preset characters; acquiring characters in the target character interval as a specified identifier;
transmitting the specified identifier to a spectrum library management terminal; the spectrum library management terminal generates a corresponding encryption password based on the appointed identifier;
and receiving the encryption password returned by the spectrum library management terminal, and encrypting the spectrum folder according to the encryption password to obtain the encrypted spectrum folder.
4. The training method according to claim 1, wherein the inputting the score image into a preset original model for training to obtain a target spectrum analysis model includes:
Establishing a multi-scale feature fusion structure, wherein the multi-scale feature fusion structure is used for fusing different-scale spectrum feature data;
extracting spectral feature data output by the third to fifth modules, wherein the spectral data feature data output is represented by { C3, C4, C5 }, and each output represents 256 feature score images generated by 1×1 convolution;
after the corresponding 3-layer convolution structure is represented as { M3, M4, M5 }, performing bottom-up fusion on each layer of feature score images to obtain fused spectral feature data; the target spectrum analysis model backbone network comprises 5 modules, wherein the last 4 modules of the 5 modules consist of a plurality of different types of residual blocks;
and inputting the fused spectral characteristic data into a preset original model for training to obtain a trained target spectral analysis model.
5. The training method according to claim 4, wherein the step of performing bottom-up fusion on each layer of feature score image comprises the following specific steps:
the characteristic score image scale of the M5 layer of the convolution structure is expanded to be the same as the characteristic score image scale of the M4 layer of the convolution structure through up-sampling;
the up-sampling characteristic information and the characteristic score image of the convolution structure M4 are fused, and the fused characteristic score image passes through an up-sampling layer and the corresponding scale is expanded to be the same as that of the convolution structure M3 layer;
The up-sampling information after fusion is fused with a convolution structure M3, and finally the spectrum characteristic data after fusion is obtained; and generating a predictive analysis result of the target spectrum analysis model on each substance based on the fused spectrum characteristic data.
6. A training device for a target spectrum analysis model, characterized in that the training device for a target spectrum analysis model comprises:
the acquisition module is used for acquiring spectral characteristic data of various different substances; the spectrum characteristic data are stored in a spectrum library in advance;
the processing module is used for processing the spectrum characteristic data to obtain the spectrum intensity of each substance under different spectrum wavelengths;
the combination module is used for recording the spectrum intensity of each spectrum wavelength and obtaining the spectrum line corresponding to each spectrum intensity; combining the spectral lines to obtain a spectral matrix; wherein the spectral line comprises at least one continuous or discrete sequence from a shortest spectral wavelength to a longest spectral wavelength; the rows of the spectrum matrix represent different observation positions or different observation time points, and the columns of the spectrum matrix represent different spectrum wavelengths;
the statistical analysis module is used for carrying out statistical analysis on the spectrum matrix through a preset ridge regression algorithm to generate a regression coefficient; the regression coefficient is used for representing the corresponding relation between each spectrum wavelength and each spectrum intensity;
The calculation module is used for calculating the score of each spectral line according to the regression coefficient and the spectral intensity to generate a score result; mapping the scoring result to a preset color chart to generate a scoring image;
the generating module is used for inputting the score image into a preset original model for training to obtain a target spectrum analysis model; the target spectrum analysis model is used for carrying out predictive analysis on spectrum characteristic data in the spectrum library.
7. A training apparatus for a target spectral analysis model, characterized in that the training apparatus for a target spectral analysis model comprises: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the training device of the target spectral analysis model to perform the training method of the target spectral analysis model according to any one of claims 1-5.
8. A computer readable storage medium having instructions stored thereon, which when executed by a processor, implement a method of training a target spectral analysis model according to any of claims 1-5.
CN202311016817.3A 2023-08-14 2023-08-14 Training method, device, equipment and storage medium of target spectrum analysis model Pending CN116994117A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311016817.3A CN116994117A (en) 2023-08-14 2023-08-14 Training method, device, equipment and storage medium of target spectrum analysis model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311016817.3A CN116994117A (en) 2023-08-14 2023-08-14 Training method, device, equipment and storage medium of target spectrum analysis model

Publications (1)

Publication Number Publication Date
CN116994117A true CN116994117A (en) 2023-11-03

Family

ID=88526515

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311016817.3A Pending CN116994117A (en) 2023-08-14 2023-08-14 Training method, device, equipment and storage medium of target spectrum analysis model

Country Status (1)

Country Link
CN (1) CN116994117A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117236261A (en) * 2023-11-15 2023-12-15 深圳市深鸿盛电子有限公司 Method, device, equipment and storage medium for constructing MOS tube parameter model
CN117454200A (en) * 2023-12-22 2024-01-26 天津启赋贝康医疗科技有限公司 Neonatal jaundice screening method based on cloud computing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117236261A (en) * 2023-11-15 2023-12-15 深圳市深鸿盛电子有限公司 Method, device, equipment and storage medium for constructing MOS tube parameter model
CN117236261B (en) * 2023-11-15 2024-03-08 深圳市深鸿盛电子有限公司 Method, device, equipment and storage medium for constructing MOS tube parameter model
CN117454200A (en) * 2023-12-22 2024-01-26 天津启赋贝康医疗科技有限公司 Neonatal jaundice screening method based on cloud computing
CN117454200B (en) * 2023-12-22 2024-04-02 天津启赋贝康医疗科技有限公司 Neonatal bilirubin concentration prediction method based on cloud computing

Similar Documents

Publication Publication Date Title
Kang et al. Dual-path network-based hyperspectral image classification
CN116994117A (en) Training method, device, equipment and storage medium of target spectrum analysis model
CN110852227A (en) Hyperspectral image deep learning classification method, device, equipment and storage medium
Moreno et al. Extreme learning machines for soybean classification in remote sensing hyperspectral images
CN111680176B (en) Remote sensing image retrieval method and system based on attention and bidirectional feature fusion
Nolan et al. Automated detection and segmentation of vine rows using high resolution UAS imagery in a commercial vineyard
CN112129741B (en) Insulating oil aging analysis method and device, computer equipment and storage medium
US11380422B2 (en) Identification and assignment of rotational spectra using artificial neural networks
Younis et al. Detection and annotation of plant organs from digitised herbarium scans using deep learning
CN111351757B (en) Method and system for predicting quantitative measures of oil doping of edible oil samples
US20210190679A1 (en) Spectral analysis apparatus and spectral analysis method
CN111783884A (en) Unsupervised hyperspectral image classification method based on deep learning
CN114937173A (en) Hyperspectral image rapid classification method based on dynamic graph convolution network
Arshed et al. A light weight deep learning model for real world plant identification
Bogdal et al. Recognition of gasoline in fire debris using machine learning: Part II, application of a neural network
CN115147721A (en) Remote sensing inversion method and device for forest accumulation
CN111797396B (en) Malicious code visualization and variant detection method, device, equipment and storage medium
CN111125629B (en) Domain-adaptive PLS regression model modeling method
Nechikkat et al. Variational mode feature-based hyperspectral image classification
Dai et al. MDC-Net: A multi-directional constrained and prior assisted neural network for wood and leaf separation from terrestrial laser scanning
CN112001410A (en) Vibration spectrum dimension reduction method and system
Chen et al. Convolutional neural network-based pure paint pigment identification using hyperspectral images
US20130197813A1 (en) Similarity evaluating method, similarity evaluating program, and similarity evaluating device for collective data
CN114003493A (en) Test data processing method, device, equipment and storage medium
CN113011949A (en) XGboost financial product recommendation method based on customer information completion

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