CN111650137A - Spectrum file generation method and device, computer equipment and storage medium - Google Patents

Spectrum file generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111650137A
CN111650137A CN202010338904.0A CN202010338904A CN111650137A CN 111650137 A CN111650137 A CN 111650137A CN 202010338904 A CN202010338904 A CN 202010338904A CN 111650137 A CN111650137 A CN 111650137A
Authority
CN
China
Prior art keywords
data
spectral
spectrum
spectrum data
detection object
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
CN202010338904.0A
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 Institute of Artificial Intelligence and Robotics
Chinese University of Hong Kong CUHK
Original Assignee
Shenzhen Institute of Artificial Intelligence and Robotics
Chinese University of Hong Kong CUHK
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 Artificial Intelligence and Robotics, Chinese University of Hong Kong CUHK filed Critical Shenzhen Institute of Artificial Intelligence and Robotics
Priority to CN202010338904.0A priority Critical patent/CN111650137A/en
Publication of CN111650137A publication Critical patent/CN111650137A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J3/00Spectrometry; Spectrophotometry; Monochromators; Measuring colours
    • G01J3/28Investigating the spectrum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J3/00Spectrometry; Spectrophotometry; Monochromators; Measuring colours
    • G01J3/28Investigating the spectrum
    • G01J2003/283Investigating the spectrum computer-interfaced
    • G01J2003/2833Investigating the spectrum computer-interfaced and memorised spectra collection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J3/00Spectrometry; Spectrophotometry; Monochromators; Measuring colours
    • G01J3/28Investigating the spectrum
    • G01J2003/283Investigating the spectrum computer-interfaced
    • G01J2003/2836Programming unit, i.e. source and date processing

Landscapes

  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)
  • Spectrometry And Color Measurement (AREA)

Abstract

The application relates to a spectral file generation method, a spectral file generation device, a computer device and a storage medium. The method comprises the following steps: acquiring spectral data corresponding to a detection object; preprocessing the spectral data to obtain processed spectral data; acquiring environmental spectrum data corresponding to the detection object, and correcting the processed spectrum data according to the environmental spectrum data to obtain target spectrum data; identifying spectral attributes according to the target spectral data to obtain attribute information corresponding to the spectral attributes; and acquiring a preset file generation strategy, and generating a spectrum file corresponding to the detection object according to the target spectrum data, the attribute information and the file generation strategy. By adopting the method, the analysis efficiency of the spectral data can be effectively improved.

Description

Spectrum file generation method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a spectrum file, a computer device, and a storage medium.
Background
The spectrometer is a device for measuring the intensities of different wavelength positions by using light detectors such as a photomultiplier tube, and can be used for measuring spectral data corresponding to different materials. Spectral data refers to the intensity at different wavelength positions. Spectral data, which can be used to characterize material substances and material properties, is one of the important data for analyzing chemical combinations and relative contents of substances and substances, is widely used in many fields such as material science.
In a conventional manner, the spectral data output by the spectrometer, or the spectral waveform corresponding to the spectral data, is usually directly displayed. When a user analyzes the spectral data, it also takes a long time to manually process the spectral data for many times, which results in a decrease in the efficiency of analyzing the spectral data.
Disclosure of Invention
In view of the above, it is necessary to provide a spectral file generation method, an apparatus, a computer device, and a storage medium for improving the analysis efficiency of spectral data by generating a spectral file that is easy to analyze.
A method of spectral file generation, the method comprising:
acquiring spectral data corresponding to a detection object;
preprocessing the spectral data to obtain processed spectral data;
acquiring environmental spectrum data corresponding to the detection object, and correcting the processed spectrum data according to the environmental spectrum data to obtain target spectrum data;
identifying spectral attributes according to the target spectral data to obtain attribute information corresponding to the spectral attributes;
and acquiring a preset file generation strategy, and generating a spectrum file corresponding to the detection object according to the target spectrum data, the attribute information and the file generation strategy.
In one embodiment, the acquiring the spectral data corresponding to the detection object includes:
acquiring a plurality of groups of sample spectrum data in a preset time period;
comparing the multiple groups of sample spectrum data to obtain spectrum similarity;
when the spectrum similarity is larger than a first threshold value, determining the sample spectrum data as reference spectrum data;
monitoring spectral data output by a spectrometer in real time;
and when the similarity between the output spectrum data and the reference spectrum data is smaller than a second threshold value, determining the output spectrum data as the spectrum data corresponding to the detection object.
In one embodiment, the preprocessing the spectral data to obtain processed spectral data includes:
reading respective corresponding wavelengths of the spectral data to obtain spectral bands corresponding to the spectral data;
determining the type of a spectrometer corresponding to the spectrometer according to the spectral band;
and acquiring compensation data corresponding to the type of the spectrograph, and performing compensation processing on the spectrum data according to the compensation data to obtain compensated spectrum data.
In one embodiment, the preprocessing the spectral data to obtain processed spectral data includes:
reading a spectral peak and a half-wave width from the spectral data;
determining a target wave band corresponding to the detection object according to the spectrum peak value and the half wave width;
and screening the spectral data according to the target waveband to obtain screened spectral data.
In one embodiment, the obtaining of the preset file generation policy includes:
displaying type identifications corresponding to the multiple file types;
acquiring a target type identifier determined from a plurality of type identifiers;
and acquiring a file generation strategy of the corresponding file type according to the target type identifier.
A spectral file generation apparatus, the apparatus comprising:
the data acquisition module is used for acquiring spectral data corresponding to the detection object;
the data processing module is used for preprocessing the spectral data to obtain processed spectral data; acquiring environmental spectrum data corresponding to the detection object, and correcting the processed spectrum data according to the environmental spectrum data to obtain target spectrum data;
the attribute identification module is used for identifying the spectral attributes according to the target spectral data to obtain attribute information corresponding to the spectral attributes;
and the file generation module is used for acquiring a preset file generation strategy and generating a spectrum file corresponding to the detection object according to the target spectrum data, the attribute information and the file generation strategy.
In one embodiment, the data acquisition module is further configured to acquire a plurality of sets of sample spectral data within a preset time period; comparing the multiple groups of sample spectrum data to obtain spectrum similarity; when the spectrum similarity is larger than a first threshold value, determining the sample spectrum data as reference spectrum data; monitoring spectral data output by a spectrometer in real time; and when the similarity between the output spectrum data and the reference spectrum data is smaller than a second threshold value, determining the output spectrum data as the spectrum data corresponding to the detection object.
In one embodiment, the data processing module is further configured to read respective wavelengths corresponding to the spectral data to obtain spectral bands corresponding to the spectral data; determining the type of a spectrometer corresponding to the spectrometer according to the spectral band; and acquiring compensation data corresponding to the type of the spectrograph, and performing compensation processing on the spectrum data according to the compensation data to obtain compensated spectrum data.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the spectral file generation method described above when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned spectral file generation method.
According to the spectrum file generation method, the spectrum file generation device, the computer equipment and the storage medium, the spectrum data corresponding to the detection object is obtained, the spectrum data are preprocessed to obtain the processed spectrum data, the environment spectrum data corresponding to the detection object is obtained, the processed spectrum data are corrected according to the environment spectrum data to obtain the target spectrum data, and the accuracy of the target spectrum data is improved. And identifying the spectral attributes according to the target spectral data to obtain attribute information corresponding to the spectral attributes, and generating a spectral file corresponding to the detection object according to the target spectral data, the attribute information and the obtained file generation strategy. The generated spectrum file can clearly and accurately reflect the spectrum data of the detection object, the spectrum analysis can be directly carried out according to the spectrum file, and the spectrum data does not need to be manually processed by spending more time, so that the analysis efficiency of the spectrum data is effectively improved.
Drawings
FIG. 1 is a diagram of an exemplary environment in which a spectral file generation method may be implemented;
FIG. 2 is a schematic flow chart diagram of a spectral file generation method in one embodiment;
FIG. 3 is a schematic illustration of spectral data in a spectral file generated in one embodiment;
FIG. 4 is a flowchart illustrating the steps of obtaining spectral data corresponding to a test object according to one embodiment;
FIG. 5 is a block diagram showing the structure of a spectrum file generating apparatus according to an embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The spectrum file generation method provided by the application can be applied to the application environment shown in fig. 1. Wherein a connection is established between the terminal 102 and the spectrometer 104, and the terminal 102 communicates with the spectrometer 104 through the connection. The connection established between the terminal 102 and the spectrometer 104 may be a wired or wireless connection. The terminal 102 acquires spectral data corresponding to the detection object through the spectrometer 104. The terminal 102 preprocesses the spectral data to obtain processed spectral data. The terminal 102 acquires the environmental spectrum data corresponding to the detection object through the spectrometer 104, and corrects the processed spectrum data according to the environmental spectrum data to obtain target spectrum data. The terminal 102 identifies the spectral attributes according to the target spectral data to obtain attribute information corresponding to the spectral attributes. The terminal 102 generates a spectrum file corresponding to the detection object according to the target spectrum data, the attribute information and the file generation strategy by acquiring a preset file generation strategy. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the spectrometer 104 is also called a spectrometer, and is a detection device that uses photodetectors such as photomultiplier tubes to measure intensities of different wavelength positions of spectral lines. The spectrometer 104 may specifically include, but is not limited to, a vacuum ultraviolet spectrometer, an ultraviolet spectrometer, a visible light spectrometer, a near infrared spectrometer, an infrared spectrometer, a far infrared spectrometer, and the like.
In one embodiment, as shown in fig. 2, a spectrum file generating method is provided, which is described by taking the method as an example applied to the terminal 102 in fig. 1, and includes the following steps:
step 202, acquiring spectral data corresponding to the detection object.
The detection object is an object whose spectrum data is measured by a detection device such as a spectrometer, and the terminal can acquire the spectrum data corresponding to the detection object. The spectrum is also called an optical spectrum, and refers to a spectrum in which monochromatic light dispersed after the monochromatic light is dispersed by the dispersing element is arranged in order according to the size of the wavelength. The dispersive component may specifically be a prism or a grating or the like. The spectral data refers to intensity data corresponding to monochromatic light with different wavelengths. The spectrum may specifically include an atomic spectrum and a molecular spectrum, where light waves are electromagnetic radiation generated by electrons during atomic motion, and the motion of electrons of different substances or the vibration and rotation of molecules are different. Therefore, the intensity of the light wave emitted by different substances at different wavelengths is also different, and the spectral data can be used for analyzing or identifying the detection object.
The terminal can establish communication connection with the spectrometer, and the spectrometer is used for detecting the detection object to acquire the spectral data corresponding to the detection object output by the spectrometer in real time. Specifically, the terminal may establish a communication link with the spectrometer through a port corresponding to the spectrometer, so as to communicate with the spectrometer. The port corresponding to the spectrometer can be a virtual port or a physical port, and the terminal can establish a communication link with the spectrometer in a wired connection or wireless connection mode corresponding to the spectrometer port, so that the spectral data output by the spectrometer can be acquired through connection. The terminal can be connected with a physical port of the spectrometer through a coaxial cable, a twisted pair or an optical fiber and the like, and wired connection between the terminal and the spectrometer is established. The terminal can also be connected with the virtual port of the spectrometer through wireless technologies such as a wireless local area network, a mobile network or a short-distance wireless technology, and the like, so as to establish wireless connection with the spectrometer.
In one embodiment, the spectrum data corresponding to the detection object may not be data detected in real time, and the terminal may acquire historical spectrum data obtained by detecting the detection object in history. The historical spectrum data can be spectrum data detected by a spectrometer in a historical time period, and the terminal can store the spectrum data output by the spectrometer in the historical time period into the memory so as to call the historical spectrum data. The terminal can also upload the spectrum data acquired historically to the corresponding server, so that the storage pressure of the terminal memory is reduced. The historical time period is a past time length compared with the time point of the terminal currently acquiring the spectral data. For example, the historical time period may be the last two weeks, one month, six months, or one year, etc. The terminal can also acquire the spectral data corresponding to the detection object from the server or the network, or receive the spectral data of the detection object sent by other terminals, so that the sources of the spectral data are enriched, and the flexibility of acquiring the spectral data is effectively improved.
And step 204, preprocessing the spectral data to obtain processed spectral data.
The terminal can preprocess the spectral data corresponding to the detection object to obtain the processed spectral data. The pre-processing of the spectral data by the terminal may include one or a combination of a plurality of processing approaches. Plural may mean two or more. Specifically, the terminal may perform curve fitting according to the spectral data corresponding to the detection object to obtain a spectral curve corresponding to the detection object. Each point in the spectral curve may represent an intensity corresponding to light at the corresponding wavelength location. The terminal can carry out smoothing processing on the spectral curve through various denoising algorithms to obtain a denoised spectral curve, and removes noise data in the spectral data through smoothing processing, so that the smoothing degree of the spectral curve obtained according to the spectral data is higher. In one embodiment, the terminal may also perform denoising processing on the spectral data directly without curve fitting the spectral data, so as to obtain denoised spectral data.
The terminal can adjust the smoothness of the smoothing processing through the smoothing scale. The smoothing scale refers to a parameter for determining the radial acting range of the spectral curve. The larger the smoothing scale, the wider the radial range of action of the spectral curve, and the higher the corresponding degree of smoothing. For example, the terminal may perform smoothing processing on the spectral curve through a filtering algorithm to obtain a processed spectral curve. The filtering algorithm may specifically include, but is not limited to, a median filtering algorithm, a mean filtering algorithm, a symmetric neighbor mean filtering algorithm, a smoothing filtering algorithm, and the like.
And step 206, acquiring the environmental spectrum data corresponding to the detection object, and correcting the processed spectrum data according to the environmental spectrum data to obtain target spectrum data.
The terminal can obtain the environmental spectrum data corresponding to the detection object. The environmental spectrum data is spectrum data corresponding to an environment in which the detection object is located. After the spectrometer is started, the intensity corresponding to a plurality of wavelength positions can be measured, and when a user does not put the detection object in the spectrometer, the spectrum data obtained by the spectrometer can be recorded as the environment spectrum data corresponding to the detection object. The environmental spectrum data may be spectrum data corresponding to a holding table for holding the detection object and air during detection. The user may specifically refer to a worker who operates the spectrometer to perform spectral measurement on the detection object. The environmental spectrum data can be obtained before the spectrometer starts to measure the detection object for the first time, and the corresponding environmental spectrum data can also be measured before the spectrum data corresponding to the detection object is measured every time, so that the accuracy of the environmental spectrum data is improved.
The terminal can correct the processed spectrum data according to the environment spectrum data, and the target spectrum data is obtained after correction. Specifically, the terminal may obtain the environmental intensity corresponding to each wavelength position according to the environmental spectrum data, and obtain the object intensity corresponding to each wavelength position according to the processed spectrum data. The terminal can match the wavelength positions corresponding to the plurality of environmental intensities with the wavelength positions corresponding to the object intensities, and correct the object intensities according to the environmental intensities at the same wavelength positions. The calibration process may specifically be to perform a difference operation on the object intensities at the same wavelength positions and the corresponding environment intensities, and record a difference operation result corresponding to each of the plurality of wavelength positions as the target intensity at the wavelength position, so as to obtain target spectrum data including the target intensities corresponding to the plurality of wavelength positions. When the spectrometer measures the spectral data corresponding to the detection object, the spectral data obtained by detection is interfered by the environmental factors corresponding to the detection object, the processed spectral data is corrected by obtaining the environmental spectral data, and the target spectral data corresponding to the detection object is obtained, so that the accuracy of the target spectral data corresponding to the detection object is effectively improved.
And 208, identifying the spectral attributes according to the target spectral data to obtain attribute information corresponding to the spectral attributes.
The terminal can identify one or more spectral attributes corresponding to the detection object according to the target spectral data to obtain attribute information corresponding to the spectral attributes. Specifically, the terminal can obtain a spectral waveform corresponding to the detection object according to the target spectral data through fitting, and the terminal can identify the spectral attribute corresponding to the spectral waveform through the target spectral data. The spectral property corresponding to the spectral waveform may specifically include, but is not limited to, a peak value, a half-wave width, a waveform trend, and the like corresponding to the spectral waveform. Where the peak refers to the highest point in the spectral waveform, i.e. at which wavelength position the maximum intensity is reached. The half-wave width is also called spectral line width, and refers to the wavelength interval corresponding to the spectral waveform. The terminal can identify the spectral attribute of the spectral waveform corresponding to the detection object through the target spectral data, so that attribute information corresponding to the spectral attribute is obtained.
Step 210, acquiring a preset file generation strategy, and generating a spectrum file corresponding to the detection object according to the target spectrum data, the attribute information and the file generation strategy.
The terminal may obtain a preset file generation policy, where the file generation policy may be a generation rule of a spectrum file preset according to an actual application requirement. The file generation strategy can be preset and configured in the terminal, so that the terminal can generate a corresponding spectrum file according to the file generation strategy.
In one embodiment, the terminal may generate the spectrum file of a fixed file type according to the file generation policy, and may generate the spectrum file of a different file type according to the actual application requirement. The terminal may preset a file generation policy corresponding to each of the plurality of file types. The file types may include image files, text files, table files, and the like. The file type may include a variety of file formats. For example, the file format corresponding to the image file may specifically include, but is not limited to, jpeg (joint Photographic Experts group) format, PNG (Portable network graphics) format, psd (photoshop document) format, and the like. The terminal can display the type identifications corresponding to the multiple file types through the corresponding display interface, so that a user can select the needed file type from the multiple type identifications according to actual application requirements. The terminal can acquire the target type identifier determined from the multiple type identifiers, and the file generation strategy corresponding to the file type is acquired according to the target type identifier, so that the spectrum file meeting the actual application requirement is generated according to the acquired file generation strategy, the flexibility of generating the spectrum file is improved, the spectrum file does not need to be manually subjected to type or format processing, the spectrum analysis can be directly performed according to the generated spectrum file, and the analysis efficiency of the spectrum data is effectively improved.
The terminal can generate a spectrum file corresponding to the detection object according to the target spectrum data and the attribute information corresponding to the spectrum attribute based on the acquired file generation strategy. For example, the file generation policy may specifically be an image file generation policy, and the terminal may generate a spectral waveform corresponding to the detection object according to the target spectral data according to the image file generation policy. The terminal can mark the spectral waveform according to the attribute information corresponding to the spectral attribute, so as to generate a spectral image file including the spectral waveform and marked with the attribute information.
In one embodiment, when the terminal generates the spectrum file, the terminal may further obtain target spectrum data corresponding to a plurality of detection objects, where the target spectrum data corresponding to the plurality of detection objects may be cached in a terminal memory after preprocessing and correcting the spectrum data of the detection objects, or may be stored in a server corresponding to the terminal. For example, as shown in FIG. 3, FIG. 3 is a diagram illustrating spectral data in a spectral file generated in one embodiment. The spectrum file is specifically an image file, and the spectrum file comprises spectrum waveforms corresponding to the three detection objects respectively. The terminal can generate an image file by the spectral waveform corresponding to the detection object and the corresponding wavelength-intensity coordinate system according to the target spectral data so as to display the spectral waveforms corresponding to the three detection objects respectively.
In this embodiment, the spectral data is preprocessed by obtaining the spectral data corresponding to the detection object to obtain the processed spectral data, and the processed spectral data is corrected according to the environmental spectral data by obtaining the environmental spectral data corresponding to the detection object to obtain the target spectral data, so that the accuracy of the target spectral data is improved. And identifying the spectral attributes according to the target spectral data to obtain attribute information corresponding to the spectral attributes, and generating a spectral file corresponding to the detection object according to the target spectral data, the attribute information and the obtained file generation strategy. The generated spectrum file can clearly and accurately reflect the spectrum data of the detection object, and a user can directly perform spectrum analysis and use according to the spectrum file without spending more time to manually process the spectrum data, so that the analysis efficiency of the spectrum data is effectively improved.
In an embodiment, as shown in fig. 4, the step of acquiring the spectral data corresponding to the detection object includes:
step 402, acquiring a plurality of groups of sample spectrum data within a preset time period.
And step 404, comparing the multiple groups of sample spectrum data to obtain spectrum similarity.
And step 406, when the spectral similarity is larger than a first threshold value, determining the sample spectral data as reference spectral data.
And step 408, monitoring the spectral data output by the spectrometer in real time.
And step 410, when the similarity between the output spectrum data and the reference spectrum data is smaller than a second threshold value, determining the output spectrum data as the spectrum data corresponding to the detection object.
The terminal can acquire a plurality of groups of sample spectrum data within a preset time period. The preset time period is a preset time length according to the actual application requirement. The preset time period may be a time period after the spectrometer is started for the first time, or a time period before the spectrometer detects the detection object. The terminal can obtain a plurality of groups of spectral data output by the spectrometer and the time point corresponding to each group of spectral data, and the terminal can record the spectral data corresponding to the time point in the preset time period as the sample spectral data. The terminal can also acquire the spectrum data output by the spectrometer within a preset time period, and the spectrum data acquired within the preset time period is recorded as the sample spectrum data.
The terminal can compare multiple groups of sample spectrum data in a preset time period to obtain the spectrum similarity between the sample spectrum data. Specifically, the terminal may compare the sample spectrum data of the adjacent time points with each other to obtain the spectrum similarity between the sample spectrum data. The terminal can directly compare the intensity difference values of the same wavelength position in the sample spectrum data, and determine the spectrum similarity between the sample spectrum data according to the intensity difference values of the same wavelength position. The terminal can also compare sample spectrum waveforms corresponding to the sample spectrum data to obtain the spectrum similarity.
The spectral similarity may express a degree of similarity between sample spectral data, and when the spectral similarity is high, it indicates that the degree of similarity between sample spectral data is high, and it may be determined that the content detected within the preset time period has not changed. The terminal may compare the spectral similarity to a first threshold. The first threshold is a preset similarity threshold. When the spectrum similarity is larger than the first threshold, the spectrum similarity is determined to be high, the spectrum data measured by the spectrometer is stable, and the terminal can determine the sample spectrum data as the reference spectrum data.
In one embodiment, the preset time period is a time period after the spectrometer is started for the first time, or a time period before the spectrometer detects the detection object, that is, the detection object is not placed in the preset time period for detection, and the spectrum data detected in the preset time period is spectrum data corresponding to the environment of the detection object. Therefore, the terminal can use the reference spectrum data as the environment spectrum data corresponding to the detection object.
The terminal can acquire the spectral data output by the spectrometer in real time and monitor the spectral data output by the spectrometer in real time. Specifically, the terminal can acquire the spectral data output by the spectrometer in real time, and compare the spectral data output by the spectrometer with the reference spectral data to obtain the similarity between the output spectral data and the reference spectral data. And when the similarity between the output spectrum data and the reference spectrum data is smaller than a second threshold value, the similarity between the output spectrum data and the reference spectrum data is smaller, the spectrum data corresponding to the environment is determined to be no longer detected by the spectrometer, and the user already puts the detection object into the detection object for detection. The terminal may determine the output spectral data as spectral data corresponding to the detection object. The "first" and "second" of the first threshold and the second threshold are similarity thresholds for distinguishing comparison with different similarities, and the first threshold and the second threshold may be the same or different.
In this embodiment, the terminal determines the sample spectrum data as the reference spectrum data by acquiring the sample spectrum data within a preset time period when the spectrum similarity between the sample spectrum data is greater than a first threshold. By detecting the spectrum data output by the spectrometer in real time, when the similarity between the output spectrum data and the reference spectrum data is smaller than a second threshold value, the detection object is determined to have been put into the spectrometer, the spectrum data is obtained by detecting the detection object, the terminal can automatically determine the output spectrum data as the spectrum data corresponding to the detection object, a user does not need to select the spectrum data corresponding to the detection object from multiple groups of spectrum data, and the efficiency of obtaining the spectrum data corresponding to the detection object is effectively improved.
In an embodiment, the step of preprocessing the spectral data to obtain processed spectral data includes: reading respective corresponding wavelengths of the spectral data to obtain spectral bands corresponding to the spectral data; determining the type of a spectrometer corresponding to the spectrometer according to the spectral band; and acquiring compensation data corresponding to the type of the spectrometer, and performing compensation processing on the spectral data according to the compensation data to obtain compensated spectral data.
The mode of preprocessing the spectral data by the terminal may include performing compensation processing on the spectral data, in addition to the denoising processing in the above embodiment. Specifically, the spectrum data includes intensity data corresponding to a plurality of wavelengths, and the terminal can read the wavelengths corresponding to the intensities to obtain the spectrum bands corresponding to the spectrum data. For example, the spectral data shown in fig. 3 corresponds to a spectral band of 350 nm to 850 nm.
The laser light used by different spectrometers is different and the corresponding spectral ranges are different. For example, the spectrometer may specifically include, but is not limited to, a vacuum ultraviolet spectrometer, an ultraviolet spectrometer, a visible light spectrometer, a near-infrared spectrometer, an infrared spectrometer, and a far-infrared spectrometer, where the vacuum ultraviolet spectrometer corresponds to a spectral range of 6 nm to 200 nm, the ultraviolet spectrometer corresponds to a spectral range of 185 nm to 400 nm, the visible light spectrometer corresponds to a spectral range of 380 nm to 780 nm, the near-infrared spectrometer corresponds to a spectral range of 780 nm to 2.5 μm, the infrared spectrometer corresponds to a spectral range of 2.5 μm to 50 μm, and the far-infrared spectrometer corresponds to a spectral range of 50 μm to 1 mm. The terminal can determine the spectrometer type corresponding to the spectrometer for measuring the spectral data according to the spectral band corresponding to the spectral data.
In one embodiment, the terminal can identify the spectrometer type corresponding to the spectrometer through a spectrometer port connected to the spectrometer. The terminal can also display a plurality of spectrometer types, directly acquire the spectrometer type determined by the user from the plurality of spectrometer types, and record the spectrometer type corresponding to the spectrometer for detecting the detection object.
In one embodiment, after the terminal acquires the spectrometer type selected by the user, the spectrometer type can be determined according to the spectrum band, and the spectrometer type selected by the user is verified according to the spectrometer type determined by the spectrum band, so that the accuracy of the spectrometer type acquired by the terminal is improved.
Different types of spectrometers can be subject to different errors based on the difference in the detection laser. The terminal may acquire compensation data corresponding to the spectrometer type. The compensation data includes intensity compensation parameters for wavelength positions corresponding to the spectrometer type, and the compensation data may specifically include positive compensation parameters and negative compensation parameters. The terminal can perform compensation processing on the spectral data corresponding to the detection object according to the compensation data to obtain the compensated spectral data.
In this embodiment, the terminal determines the spectrum band corresponding to the spectrum data by reading the wavelength corresponding to each of the spectrum data, and automatically identifies the spectrometer type corresponding to the spectrometer according to the spectrum band, without requiring a user to manually select the spectrometer type corresponding to the spectrum data. The compensation data corresponding to the spectrometer type are acquired, the spectrum data are compensated according to the compensation data, the compensated spectrum data are obtained, the accuracy of the compensated spectrum data is effectively improved, the spectrum file is generated according to the compensated spectrum data, a user can directly perform spectrum analysis according to the spectrum file, the spectrum data do not need to be compensated manually for a long time, and the efficiency of performing spectrum analysis through the generated spectrum file is effectively improved.
In an embodiment, the step of preprocessing the spectral data to obtain processed spectral data includes: reading a spectrum peak value and a half wave width from the spectrum data; determining a target waveband corresponding to the detection object according to the spectrum peak value and the half-wave width; and screening the spectral data according to the target waveband to obtain the screened spectral data.
The mode of preprocessing the spectral data by the terminal may include, in addition to the denoising processing and the compensation processing in the above embodiment, performing a screening process on the spectral data. Specifically, the terminal may generate a spectral waveform corresponding to the detection object according to the spectral data, and the terminal may read a spectral peak corresponding to the spectral waveform and a half-wave width corresponding to the spectral waveform from the spectral data. The spectral peak value and the half-wave width can accurately reflect the position of the spectral waveform in the wavelength, the terminal can determine the target waveband corresponding to the detection object according to the read spectral peak value and the read half-wave width, and the target waveband can comprise the wavelength position corresponding to the spectral waveform. The terminal can screen the spectral data corresponding to the detection object according to the target waveband, and screen out the spectral data corresponding to the target waveband, so as to obtain the screened spectral data.
In this embodiment, the terminal reads the spectrum peak and the half-wave width from the spectrum data, determines a target band of the spectrum waveform corresponding to the detection object according to the spectrum peak and the half-wave width, and screens the spectrum data corresponding to the detection object through the target band to obtain the screened spectrum data. The terminal automatically screens the spectral data by identifying the target waveband, the spectral data corresponding to the target waveband meaningful for spectral analysis is reserved, unnecessary spectral data are deleted, the operation resources of the terminal are saved, a user can directly perform spectral analysis according to the spectral file generated by the screened spectral data, more time is not needed for manually screening the spectral data, and the efficiency of performing spectral analysis through the generated spectral file is effectively improved.
It should be understood that although the steps in the flowcharts of fig. 2 and 4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 and 4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 5, there is provided a spectrum file generating apparatus including: a data acquisition module 502, a data processing module 504, an attribute identification module 506, and a file generation module 508, wherein:
the data obtaining module 502 is configured to obtain spectral data corresponding to the detection object.
A data processing module 504, configured to perform preprocessing on the spectral data to obtain processed spectral data; and acquiring environmental spectrum data corresponding to the detection object, and correcting the processed spectrum data according to the environmental spectrum data to obtain target spectrum data.
And the attribute identification module 506 is configured to identify the spectral attribute according to the target spectral data to obtain attribute information corresponding to the spectral attribute.
The file generating module 508 is configured to obtain a preset file generating policy, and generate a spectrum file corresponding to the detection object according to the target spectrum data, the attribute information, and the file generating policy.
In one embodiment, the data obtaining module 502 is further configured to obtain a plurality of sets of sample spectrum data within a preset time period; comparing the multiple groups of sample spectrum data to obtain spectrum similarity; when the spectrum similarity is larger than a first threshold value, determining sample spectrum data as reference spectrum data; monitoring spectral data output by a spectrometer in real time; when the similarity between the output spectral data and the reference spectral data is less than a second threshold, the output spectral data is determined as spectral data corresponding to the detection object.
In an embodiment, the data processing module 504 is further configured to read respective wavelengths corresponding to the spectral data to obtain spectral bands corresponding to the spectral data; determining the type of a spectrometer corresponding to the spectrometer according to the spectral band; and acquiring compensation data corresponding to the type of the spectrometer, and performing compensation processing on the spectral data according to the compensation data to obtain compensated spectral data.
In one embodiment, the data processing module 504 is further configured to read a spectral peak and a half-wave width from the spectral data; determining a target waveband corresponding to the detection object according to the spectrum peak value and the half-wave width; and screening the spectral data according to the target waveband to obtain the screened spectral data.
In an embodiment, the file generating module 508 is further configured to display type identifiers corresponding to a plurality of file types; acquiring a target type identifier determined from a plurality of type identifiers; and acquiring a file generation strategy of the corresponding file type according to the target type identifier.
For specific limitations of the spectrum file generation device, reference may be made to the above limitations of the spectrum file generation method, which are not described herein again. The modules in the spectrum file generation device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a spectral file generation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described spectral file generation method embodiments when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the above-mentioned spectral file generation method embodiment.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of spectral file generation, the method comprising:
acquiring spectral data corresponding to a detection object;
preprocessing the spectral data to obtain processed spectral data;
acquiring environmental spectrum data corresponding to the detection object, and correcting the processed spectrum data according to the environmental spectrum data to obtain target spectrum data;
identifying spectral attributes according to the target spectral data to obtain attribute information corresponding to the spectral attributes;
and acquiring a preset file generation strategy, and generating a spectrum file corresponding to the detection object according to the target spectrum data, the attribute information and the file generation strategy.
2. The method of claim 1, wherein the obtaining spectral data corresponding to the test object comprises:
acquiring a plurality of groups of sample spectrum data in a preset time period;
comparing the multiple groups of sample spectrum data to obtain spectrum similarity;
when the spectrum similarity is larger than a first threshold value, determining the sample spectrum data as reference spectrum data;
monitoring spectral data output by a spectrometer in real time;
and when the similarity between the output spectrum data and the reference spectrum data is smaller than a second threshold value, determining the output spectrum data as the spectrum data corresponding to the detection object.
3. The method of claim 1, wherein preprocessing the spectral data to obtain processed spectral data comprises:
reading respective corresponding wavelengths of the spectral data to obtain spectral bands corresponding to the spectral data;
determining the type of a spectrometer corresponding to the spectrometer according to the spectral band;
and acquiring compensation data corresponding to the type of the spectrograph, and performing compensation processing on the spectrum data according to the compensation data to obtain compensated spectrum data.
4. The method of claim 1, wherein preprocessing the spectral data to obtain processed spectral data comprises:
reading a spectral peak and a half-wave width from the spectral data;
determining a target wave band corresponding to the detection object according to the spectrum peak value and the half wave width;
and screening the spectral data according to the target waveband to obtain screened spectral data.
5. The method according to any one of claims 1 to 4, wherein the obtaining of the preset file generation policy comprises:
displaying type identifications corresponding to the multiple file types;
acquiring a target type identifier determined from a plurality of type identifiers;
and acquiring a file generation strategy of the corresponding file type according to the target type identifier.
6. A spectral file generation apparatus, the apparatus comprising:
the data acquisition module is used for acquiring spectral data corresponding to the detection object;
the data processing module is used for preprocessing the spectral data to obtain processed spectral data; acquiring environmental spectrum data corresponding to the detection object, and correcting the processed spectrum data according to the environmental spectrum data to obtain target spectrum data;
the attribute identification module is used for identifying the spectral attributes according to the target spectral data to obtain attribute information corresponding to the spectral attributes;
and the file generation module is used for acquiring a preset file generation strategy and generating a spectrum file corresponding to the detection object according to the target spectrum data, the attribute information and the file generation strategy.
7. The apparatus of claim 6, wherein the data acquisition module is further configured to acquire a plurality of sets of sample spectral data within a preset time period; comparing the multiple groups of sample spectrum data to obtain spectrum similarity; when the spectrum similarity is larger than a first threshold value, determining the sample spectrum data as reference spectrum data; monitoring spectral data output by a spectrometer in real time; and when the similarity between the output spectrum data and the reference spectrum data is smaller than a second threshold value, determining the output spectrum data as the spectrum data corresponding to the detection object.
8. The apparatus according to claim 6, wherein the data processing module is further configured to read respective wavelengths corresponding to the spectral data to obtain spectral bands corresponding to the spectral data; determining the type of a spectrometer corresponding to the spectrometer according to the spectral band; and acquiring compensation data corresponding to the type of the spectrograph, and performing compensation processing on the spectrum data according to the compensation data to obtain compensated spectrum data.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202010338904.0A 2020-04-26 2020-04-26 Spectrum file generation method and device, computer equipment and storage medium Pending CN111650137A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010338904.0A CN111650137A (en) 2020-04-26 2020-04-26 Spectrum file generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010338904.0A CN111650137A (en) 2020-04-26 2020-04-26 Spectrum file generation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111650137A true CN111650137A (en) 2020-09-11

Family

ID=72342919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010338904.0A Pending CN111650137A (en) 2020-04-26 2020-04-26 Spectrum file generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111650137A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114935313A (en) * 2022-04-26 2022-08-23 香港中文大学(深圳) Film thickness measuring method, device, equipment and computer program product
WO2022217486A1 (en) * 2021-04-14 2022-10-20 长光禹辰信息技术与装备(青岛)有限公司 Correction method for spectral imaging device, and spectral imaging device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101059426A (en) * 2007-05-29 2007-10-24 浙江大学 Method for non-destructive measurement for tea polyphenol content of tea based on near infrared spectrum technology
CN101504362A (en) * 2009-03-18 2009-08-12 哈尔滨商业大学 Fast detection of trans-fatty acid content in edible fat based on near infrared spectrum technology
CN102279168A (en) * 2011-07-20 2011-12-14 浙江大学 Near-infrared spectroscopic technology-based method for fast and undamaged analysis of nutritional quality of whole cottonseed
CN107014770A (en) * 2017-05-15 2017-08-04 崔哲 A kind of leather lossless detection method and its system based on spectrum analysis
CN110320165A (en) * 2019-08-08 2019-10-11 华南农业大学 The Vis/NIR lossless detection method of banana soluble solid content

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101059426A (en) * 2007-05-29 2007-10-24 浙江大学 Method for non-destructive measurement for tea polyphenol content of tea based on near infrared spectrum technology
CN101504362A (en) * 2009-03-18 2009-08-12 哈尔滨商业大学 Fast detection of trans-fatty acid content in edible fat based on near infrared spectrum technology
CN102279168A (en) * 2011-07-20 2011-12-14 浙江大学 Near-infrared spectroscopic technology-based method for fast and undamaged analysis of nutritional quality of whole cottonseed
CN107014770A (en) * 2017-05-15 2017-08-04 崔哲 A kind of leather lossless detection method and its system based on spectrum analysis
CN110320165A (en) * 2019-08-08 2019-10-11 华南农业大学 The Vis/NIR lossless detection method of banana soluble solid content

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
中国食品药品检定研究院: "《药品检验仪器操作规程及使用指南》", 中国医药科技出版社, pages: 298 - 300 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022217486A1 (en) * 2021-04-14 2022-10-20 长光禹辰信息技术与装备(青岛)有限公司 Correction method for spectral imaging device, and spectral imaging device
CN114935313A (en) * 2022-04-26 2022-08-23 香港中文大学(深圳) Film thickness measuring method, device, equipment and computer program product
CN114935313B (en) * 2022-04-26 2023-09-15 香港中文大学(深圳) Film thickness measurement method, apparatus, device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN108334417B (en) Method and device for determining data exception
US11657644B2 (en) Automatic ruler detection
CN111650137A (en) Spectrum file generation method and device, computer equipment and storage medium
US20200257885A1 (en) High speed reference point independent database filtering for fingerprint identification
Baisantry et al. Change vector analysis using enhanced PCA and inverse triangular function-based thresholding
Rissati et al. Hyperspectral image classification using random forest and deep learning algorithms
Rajaratnam et al. Influence diagnostics for high-dimensional lasso regression
Fernandes et al. Early skin cancer detection using computer aided diagnosis techniques
KR20180045473A (en) System, method and computer program for melanoma detection using image analysis
Stoney et al. Occurrence and associative value of non-identifiable fingermarks
Schlett et al. Considerations on the evaluation of biometric quality assessment algorithms
Jiang et al. Extracting sensitive spectrum bands of rapeseed using multiscale multifractal detrended fluctuation analysis
CN114739980B (en) Element information prediction method, device, equipment and medium
Sanchez-Reillo et al. Forensic validation of biometrics using dynamic handwritten signatures
US20230351045A1 (en) Scan surface reduction for sensitive information scanning
CN113299342B (en) Copy number variation detection method and detection device based on chip data
US8830032B2 (en) Biometric-based identity confirmation
US20210063274A1 (en) Signature recognition on optical-fiber connector endfaces
US12014291B2 (en) System and method for processing distorted or inaccurate input data obtained from an environment
CN114913079A (en) Regional ecological risk evaluation system and method based on hyperspectral image
CN112613340A (en) Archive auditing method and device, computer equipment and storage medium
CN109923584B (en) Method and device for determining flatness value of hairstyle
Rosario et al. Streak detection in mottled and noisy images
CN111929720A (en) Neutron detector performance detection method, device and system and computer equipment
CN111768511A (en) Staff information recording method and device based on cloud temperature measurement equipment

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