CN109033185A - A kind of terahertz light modal data automatic input spectra database method and system - Google Patents

A kind of terahertz light modal data automatic input spectra database method and system Download PDF

Info

Publication number
CN109033185A
CN109033185A CN201810678903.3A CN201810678903A CN109033185A CN 109033185 A CN109033185 A CN 109033185A CN 201810678903 A CN201810678903 A CN 201810678903A CN 109033185 A CN109033185 A CN 109033185A
Authority
CN
China
Prior art keywords
file
spectrum
server
client
uploads
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.)
Granted
Application number
CN201810678903.3A
Other languages
Chinese (zh)
Other versions
CN109033185B (en
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.)
Institute of Automation Shandong Academy of Sciences
Original Assignee
Institute of Automation Shandong Academy of Sciences
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 Institute of Automation Shandong Academy of Sciences filed Critical Institute of Automation Shandong Academy of Sciences
Priority to CN201810678903.3A priority Critical patent/CN109033185B/en
Publication of CN109033185A publication Critical patent/CN109033185A/en
Application granted granted Critical
Publication of CN109033185B publication Critical patent/CN109033185B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention discloses terahertz light modal data automatic input spectra database method and system.Wherein, this method comprises: server-side initializes spectra database;Client is connected to the network with server-side, and startup file monitoring thread;File monitor thread detects the file information under preset spectrum file store path, and sends to server-side and upload file request;Client receives server-side and replies, and when replying is " OK ", client terminal start-up file uploads thread;When replying is " Busy ", continue to send upload request;Server-side receives the spectrum file that client uploads;Server-side extracts sample ID from spectrum file name, inquires the sample in spectra database with the presence or absence of initial configuration information, and if it exists, then from being parsed in correlation spectrum parameter and automatic input database in spectrum file;Otherwise, storage processing is not done;Until uploading in listed files does not have spectrum the file information.High degree of automation of the present invention, improves efficiency of inputting, and practicability is high.

Description

A kind of terahertz light modal data automatic input spectra database method and system
Technical field
The invention belongs to data processing field more particularly to a kind of terahertz light modal data automatic input spectra database sides Method and system.
Background technique
Terahertz light spectral technology is a kind of emerging coherent detection technology, has very high detection signal-to-noise ratio and wider spy Measuring tape is wide, and detectivity is higher.The resonant frequency of many large biological molecule vibrations and rotational frequency is in terahertz wave band (frequency: 0.1~10THz, wavelength: 330um~3mm), determining the absorption coefficients of many substances, there are bright in terahertz wave band Aobvious characteristic peak forms distinctive dactylogram.
The exclusive spectra database of Terahertz is established, terahertz light spectral technology and data library technical application can be known to substance Other field, especially material composition identification, authenticity verification, whether in terms of be with a wide range of applications.In recent years, state Interior scientific research institution's research emphasis is terahertz light spectrometry and identification field mostly, in tera-hertz spectra Database side Face is still at an early stage.
Currently, after measurement tera-hertz spectra mainly uses terahertz time-domain spectroscopy system, system to complete measurement, calculate, It needs for spectrum to be entered into database.Existing spectrum typing mode suffers from the drawback that
(1) it is mostly completed using manual operation, by data copy, one by one manually imported in database;
(2) it needs to classify to spectroscopic data, the editing and processing such as parameter extraction, could correctly be entered into database;
(3) when test large sample, large batch of terahertz light time spectrum, spectroscopic data capacity is larger, cumbersome, efficiency compared with It is low.
Therefore, a kind of efficient tera-hertz spectra data entry method is needed.
In addition, existing tera-hertz spectra database is not sought unity of standard, general lack of the data structure of map storage, enter The spectral information of library sample is imperfect, is much provided solely for absorption spectra or spectrum of refractive index, lacks sample time domain, frequency domain, delustring The basic detection information such as the more complete spectrogram information such as coefficient and the sample place of production, classification, detection environment.
Summary of the invention
In order to solve the deficiencies in the prior art, the first object of the present invention is to provide a kind of terahertz light modal data and records automatically Enter spectra database method, can be realized terahertz light modal data upload automatically, automatic input spectroscopic data library facility;Spectrum Data handling procedure is reliable and stable, high degree of automation, promotes efficiency of inputting, has very high practicability.
It is described from server-side and client, a kind of terahertz light modal data automatic input spectra database side of the invention Method, comprising:
Step 1: server-side initializes spectra database, and state flag bit Flag is set 0;
Step 2: client is connected to the network with server-side, and startup file monitoring thread;
Step 3: file monitor thread detects the file information under preset spectrum file store path, if detecting Newly-increased file then obtains file name, and confirmation is added in upload listed files after belonging to spectrum file, while sending out to server-side Serve transmitting file request;
Step 4: after server-side receives upload file request, sends and reply to client, when replying is " OK ", client Startup file uploads thread;When replying is " Busy ", step 3 is repeated;
Step 5: server-side receives the spectrum file that client uploads, and state flag bit Flag is set 1;
Step 6: server-side extracts sample ID from received spectrum file name, inquires the sample in spectroscopic data It whether there is initial configuration information in library, and if it exists, correlation spectrum parameter and automatic input are then parsed from spectrum file In database, typing terminates, and state flag bit Flag is set 0;Otherwise, storage processing is not done, and state flag bit Flag is set 0;
Step 7: repeating step 4 to step 6, until uploading in listed files does not have spectrum the file information, tera-hertz spectra Storage terminates.
Further, the step 3 specifically includes:
Step 3-1: whether have under the preset spectrum file store path of client file monitoring thread real-time detection " file addition " and " file modification " two events occur simultaneously;
Step 3-2: when two events occur simultaneously, newly-increased file name is obtained, compared with default spectrum file name Compared with if meeting preset format, it is determined that belong to spectrum file, be added to and upload in listed files;Conversely, then belonging to other File is not dealt with, and returns to step 3-1;
Step 3-3: client sends to server-side and uploads file request.
File under the preset spectrum file store path of client file monitoring thread real-time detection of the invention, It can be accurately judged to newly-increased file and determine whether to belong to spectrum file, and then determine whether that server-side sends upper transmitting file Request improves the accuracy of file transmission.
Further, in the step 4, when it is " OK " that client, which receives server-side to reply:
Client traversal uploads listed files, first upload file name in read list, and obtains first upload The size of file;
According to file size dynamic definition buffer area, file content is read in binary form, file content is sent into slow Rush area;
Buffer contents are sent to server-side by Socket socket;
It is sent, closes current file, delete the file name sent in uploading listed files.
When it is " OK " that client, which receives server-side to reply, client traversal uploads listed files and successively uploads related text Part avoids program obstruction, unordered upload, improves efficiency of transmission.
It is described from server-side, a kind of terahertz light modal data automatic input spectra database method of the invention, comprising:
Step a: state flag bit Flag is set 0 by initialization spectra database;
Step b: it is connected to the network with client;
Step c: when the file monitor thread of client detect under preset spectrum file store path have it is newly-increased File and belong to spectrum file and be added to upload listed files when, receive client transmission come upload file request;
Step d: after server-side receives the upload file request of client, judge system mode:, can as Flag=0 To receive, reply customer side " OK ";As Flag=1, rejection is replied client " Busy ", repeats step c;
Step e: the spectrum file that client uploads is received, state flag bit Flag is set 1;
Step f: extracting sample ID from received spectrum file name, and inquire the sample is in spectra database No there are initial configuration information, and if it exists, correlation spectrum parameter and automatic input database are then parsed from spectrum file In, typing terminates, and state flag bit Flag is set 0;Otherwise, storage processing is not done, and state flag bit Flag is set 0;
Step g: repeating step d to step f, until uploading in listed files does not have spectrum the file information, tera-hertz spectra Storage terminates.
It is described from client, a kind of terahertz light modal data automatic input spectra database method of the invention, comprising:
Step A: being connected to the network with server-side, and startup file monitoring thread;
Step B: the file monitor thread of client detects the file information under preset spectrum file store path, If detecting newly-increased file, file name is obtained, confirmation is added in upload listed files after belonging to spectrum file, while to Server-side, which is sent, uploads file request;
Step C: receiving server-side and reply, and when replying is " OK ", startup file uploads thread, and uploads spectrum file extremely Server-side;
When replying is " Busy ", step B is repeated.
Further, the step B is specifically included:
Step B-1: whether have under the preset spectrum file store path of client file monitoring thread real-time detection " file addition " and " file modification " two events occur simultaneously;
Step B-2: when two events occur simultaneously, newly-increased file name is obtained, compared with default spectrum file name Compared with if meeting preset format, it is determined that belong to spectrum file, be added to and upload in listed files;Conversely, then belonging to other File is not dealt with, and returns to step B-1;
Step B-3: client sends to server-side and uploads file request.
Further, in the step C, when it is " OK " that client, which receives server-side to reply:
Client traversal uploads listed files, first upload file name in read list, and obtains first upload The size of file;
According to file size dynamic definition buffer area, file content is read in binary form, file content is sent into slow Rush area;
Buffer contents are sent to server-side by Socket socket;
It is sent, closes current file, delete the file name sent in uploading listed files.
The second object of the present invention is to provide a kind of terahertz light modal data automatic input spectra database system.
A kind of terahertz light modal data automatic input spectra database system of the invention, including server-side and client;
The server-side, is configured as: state flag bit Flag is set 0 by initialization spectra database;
The client, is configured as: being connected to the network with server-side, and startup file monitoring thread;
File monitor thread detects the file information under preset spectrum file store path, if detecting newly-increased text Part then obtains file name, and confirmation is added in upload listed files after belonging to spectrum file, while sending and uploading to server-side File request;
Server-side answer is received, when replying is " OK ", startup file uploads thread, and uploads spectrum file to service End;
The server-side is also configured to receive the spectrum file that client uploads, state flag bit Flag is set 1;
Sample ID is extracted from received spectrum file name, inquire the sample whether there is in spectra database Initial configuration information, and if it exists, then from being parsed in spectrum file in correlation spectrum parameter and automatic input database, typing Terminate, state flag bit Flag is set 0;Otherwise, storage processing is not done, and state flag bit Flag is set 0;
Until uploading does not have spectrum the file information in listed files, tera-hertz spectra storage terminates.
Further, the client, is also configured to
Whether have that " file adds under the preset spectrum file store path of client file monitoring thread real-time detection Add " and " file modification " two events while occurring;
When two events occur simultaneously, newly-increased file name is obtained, compared with default spectrum file name, if meeting Preset format, it is determined that belong to spectrum file, be added to and upload in listed files;Conversely, then belonging to alternative document, do not make Processing, return continue to test;
It is sent to server-side and uploads file request.
Further, the client, is also configured to
When it is " OK " that client, which receives server-side to reply, traversal uploads listed files, first upload in read list File name, and obtain the size of first upper transmitting file;
According to file size dynamic definition buffer area, file content is read in binary form, file content is sent into slow Rush area;
Buffer contents are sent to server-side by Socket socket;
It is sent, closes current file, delete the file name sent in uploading listed files.
Compared with prior art, the beneficial effects of the present invention are:
(1) present invention realize terahertz light modal data upload automatically, automatic input spectroscopic data library facility, substitution is artificial Copy, editing and processing, spectral classification, typing etc. operates one by one;High degree of automation, efficiency of inputting are obviously improved, and are had very high Practicability.
(2) tera-hertz spectra database of the invention extends the spectral information and test information of storage sample, so that Tera-hertz spectra is more abundant, complete.
Detailed description of the invention
The accompanying drawings constituting a part of this application is used to provide further understanding of the present application, and the application's shows Meaning property embodiment and its explanation are not constituted an undue limitation on the present application for explaining the application.
Fig. 1 is client and server-side of the invention;
Fig. 2 is tera-hertz spectra database of the invention;
Fig. 3 is that terahertz light modal data of the invention uploads storage process automatically;
Fig. 4 is terahertz light modal data automatic input spectra database process of the invention;
Fig. 5 (a) is sparteine and reference signal Time Domain Spectrum;
Fig. 5 (b) is sparteine and reference signal frequency domain spectra;
Fig. 5 (c) is sparteine absorption spectra;
Fig. 5 (d) is sparteine spectrum of refractive index;
Fig. 5 (e) is sparteine extinction coefficient spectrum.
Specific embodiment
It is noted that following detailed description is all illustrative, it is intended to provide further instruction to the application.Unless another It indicates, all technical and scientific terms used herein has usual with the application person of an ordinary skill in the technical field The identical meanings of understanding.
It should be noted that term used herein above is merely to describe specific embodiment, and be not intended to restricted root According to the illustrative embodiments of the application.As used herein, unless the context clearly indicates otherwise, otherwise singular Also it is intended to include plural form, additionally, it should be understood that, when in the present specification using term "comprising" and/or " packet Include " when, indicate existing characteristics, step, operation, device, component and/or their combination.
It selects Chinese medical extract sparteine as test sample, is carried out by taking the absorption spectra in Terahertz spectrum types as an example Spectrum storage.It before test tera-hertz spectra needs that drug is first fabricated to chip solid sample, specific method is first by drug Grind into powder is then placed in tablet press machine, and drug is pressed into diameter 13mm, the circle of thickness 1mm or so under 5MPa pressure Shape print.
Embodiment one
It is described from server-side and client, a kind of terahertz light modal data automatic input spectra database side of the present embodiment Method.Wherein, as shown in Figure 1, client is mounted on terahertz time-domain spectroscopy component computer, terahertz light modal data is automatic It is uploaded to server-side.
Server-side is mounted on the server where spectra database, realizes that database initial configuration, spectroscopic data connect Receipts and automatic input database function.
Client and server-side pass through wide area network or LAN connection.
As shown in figure 3, the terahertz light modal data automatic input spectra database method of the present embodiment, comprising:
Step 1: server-side initializes spectra database, and state flag bit Flag is set 0;
In specific implementation, start server-side, create Socket socket, state flag bit Flag sets 0, completes spectrum number According to library initialization.
As shown in Fig. 2, spectra database includes initial configuration table, sample test information table, spectral information table.
Initial configuration table includes the fields such as sample number into spectrum, sample ID, sample classification, the sample place of production.
When sample test information table includes sample number into spectrum, spectrum types, test temperature, testing humidity, testing time, storage Between, the fields such as spectrum table name.
Spectrum types includes Time Domain Spectrum, frequency domain spectra, absorption spectra, spectrum of refractive index, extinction coefficient spectrum.
Time Domain Spectrum includes the information such as sampling time, signal amplitude;Frequency domain spectra includes the information such as frequency, power magnitude;It absorbs Spectrum includes the information such as frequency, absorption intensity;Spectrum of refractive index includes the information such as frequency, refractive index;Extinction coefficient spectrum includes frequency, disappears The information such as backscatter extinction logarithmic ratio.
Sample number into spectrum is spectra database major key, and all points of tables are effectively connected.
Such as: spectra database initialization includes input test sample ID: sparteine, sample classification: traditional Chinese medicine, sample The product place of production: Shaanxi, after input determines, system distributes sample number into spectrum HQHJ20080601 automatically.
Step 2: client is connected to the network with server-side, and startup file monitoring thread;
In specific implementation, start terahertz time-domain spectroscopy system, while starting client;
Spectrum file store path, test sample title, sample are preset on terahertz time-domain spectroscopy system interface Thickness, such as setting store path are " C: THzData ", and sample ID is " sparteine _ 1 ", thickness of sample " 1mm ".Its In, the serial number 1 in " sparteine _ 1 " represents first test sample of sparteine.
IP address, the port numbers of server are inputted on client end interface, setting monitors file path:, create Socket Socket;Wherein, monitoring the spectrum file store path set in file path and terahertz time-domain spectroscopy system is mutually all “C:\\THzData”。
Client trial is connected to the network with server-side, if successful connection, client end interface prompt has connected service Device restarts terahertz time-domain spectroscopy system after solving network communication failure if it fails to connect, then prompting network communication abnormal Start client simultaneously.
Client terminal start-up file monitor thread, for monitoring file change under the path " C: THzData ".
Experimenter operates terahertz time-domain spectroscopy system, and after the completion of test, terahertz light modal data is with specific spectrum File name is saved under the path " C: THzData ", concrete operations are as follows:
Wherein, the serial number 1 in " sparteine _ 1 " represents first test sample of sparteine.
Firstly, measuring terahertz time-domain signal i.e. reference signal when not being put into sparteine, it is denoted as Er(t), such as Fig. 5 (a) It is shown;
Then, sparteine is put on terahertz time-domain spectroscopy system sample frame, measures terahertz time-domain letter at this time Number i.e. sample signal, be denoted as Es(t), as shown in Fig. 5 (a);
To time-domain signal Er(t)、Es(t)Fourier transformation is carried out respectively, obtains its frequency-region signal Er(ω)、Es(ω), such as Fig. 5 (b) shown in;
According to optical parameter model, is compared by sample frequency-region signal and with reference to frequency-region signal, obtain affixture machine Function H (ω) is indicated are as follows:
Wherein, A: the quotient of amplitudes of sample signal and reference signal, ω: THz wave frequency, φ: sample signal and reference Signal phase difference.
When experimental situation medium is nitrogen, in the case where sample weak absorbing, refractive index n (ω), the absorption coefficient a of sample (ω) and extinction coefficient k (ω) calculation formula are as follows:
Wherein, d: thickness of sample, c: the light velocity.
The absorption coefficient of sample, refractive index and extinction coefficient, such as Fig. 5 under each frequency point are successively calculated according to above-mentioned formula (c), shown in Fig. 5 (d), Fig. 5 (e);
Newly-built text file, the parameter values such as write-in test temperature, testing humidity, thickness of sample in first trip, adjacent two Separator is done using ", " among a parameter;
In next line, according to different spectrum parameter types, since initial frequency or starting acquisition time line by line The parameter values of above-mentioned calculating are written, use ", " to do separator among two neighboring parameter.It is by absorption spectra of spectrum types Example, line by line write frequency, the parameters such as absorptive amplitude;
Previous step is repeated, until cutoff frequency or cut-off acquisition time, circulation, which is recorded, to be terminated;
By text file with default spectrum file name format storage to preset spectrum file store path " C: Under THzData ".
Such as: spectrum file name format is preset for " sample ID _ serial number _ testing time _ spectrum types ", in embodiment Sparteine absorption spectra text file is entitled: " sparteine _ 1_20180601_ absorption spectra ".
Step 3: file monitor thread detects the file information under preset spectrum file store path, if detecting Newly-increased file then obtains file name, and confirmation is added in upload listed files after belonging to spectrum file, while sending out to server-side Serve transmitting file request.
Specifically, the step 3 specifically includes:
Step 3-1: whether have under the preset spectrum file store path of client file monitoring thread real-time detection " file addition " and " file modification " two events occur simultaneously;
Such as: under the monitoring file path " C: THzData " of client file monitoring thread real-time detection setting whether There are " file addition " and " file modification " two events while occurring;
Step 3-2: when two events occur simultaneously, newly-increased file name is obtained, compared with default spectrum file name Compared with if meeting preset format, it is determined that belong to spectrum file, be added to and upload in listed files;Conversely, then belonging to other File is not dealt with, and returns to step 3-1;
Specifically, after the completion of terahertz time-domain system testing, monitoring thread detects newly-increased file, obtains file name " sparteine _ 1_20180601_ absorption spectra " meets default spectrum file name format, and determination belongs to spectrum file, added It is added to and uploads in listed files;Conversely, then belonging to alternative document, do not deal with, returns to step 3-1;
Step 3-3: client sends to server-side and uploads file request.
Text under the preset spectrum file store path of client file monitoring thread real-time detection of the present embodiment Part can be accurately judged to newly-increased spectrum file and determine whether to belong to spectrum file, and then determine whether that server-side is sent out Transmitting file request is served, the accuracy of file transmission is improved.
Step 4: after server-side receives upload file request, sends and reply to client, when replying is " OK ", client Startup file uploads thread;When replying is " Busy ", step 3 is repeated;
In specific implementation, after server-side receives the upload file request of client, judge system mode: working as Flag= When 0, system is idle, can receive, and replys customer side " OK ";As Flag=1, system is busy, and client is replied in rejection "Busy";
Client receives server-side and replies, and when judging to reply as " OK ", startup file uploads thread;Judgement replies When " Busy ", client sends to server-side again and uploads file request;
Client, which traverses, uploads listed files, first upload file name in read list sequence, i.e., " sparteine _ 1_20180601_ absorption spectra ";
This document is opened, file size is obtained;
According to file size dynamic definition buffer area, file content is read in binary form, file content is sent into slow Rush area;
Buffer contents are sent to server-side by Socket socket;
It is sent, closes file, delete the file name sent in uploading listed files.
When it is " OK " that client, which receives server-side to reply, client traversal uploads listed files and successively uploads related text Part avoids program obstruction, unordered upload, improves efficiency of transmission.
Step 5: server-side receives the spectrum file that client uploads, and state flag bit Flag is set 1;
Step 6: server-side extracts sample ID from received spectrum file name, inquires the sample in spectroscopic data It whether there is initial configuration information in library, and if it exists, correlation spectrum parameter and automatic input are then parsed from spectrum file In database, record library terminates, and state flag bit Flag is set 0;Otherwise, storage processing is not done, and state flag bit Flag is set 0;
In specific implementation, as shown in figure 4, step 6 includes:
Step (6-1): from the file name of received spectrum file, " sparteine _ 1_20180601_ absorbs server-side Sample ID is extracted in spectrum ": " sparteine ", the testing time: " 20180601 ", spectrum types: the parameters such as " absorption spectra ", together When obtain system time as entry time;
Step (6-2): the configuration record of " sparteine " is inquired in the initial configuration table of spectra database;
Step (6-3): the configuration record of sparteine if it exists is then inquired, is read and the matched sample of sparteine is compiled Number;Configuration record if it does not exist, then be not processed, and state flag bit Flag is set 0, executes step 7.
Step (6-4): " sparteine " is inquired in the sample test information table of spectra database with the presence or absence of test note Record, test record, reads spectral information table name field information if it exists;Test record if it does not exist, then dynamic creation goldspink Flower alkali spectral information table, spectral information table name be known as " sparteine " combined with " absorption spectra " information in the Chinese phonetic alphabet lead-in It is female i.e.: " JQHJSYP ";
Step (6-5): opening spectrum file, reads first trip information, is stored in character string, is successively mentioned with ", " as separator Take out the information such as test temperature, testing humidity, thickness of sample;
Step (6-6): continuing to read next row information, be stored in character string, according to spectrum types, is used as separator with ", " Relevant parameter is successively extracted, by taking spectrum types is absorption spectra as an example, extracts frequency, absorptive amplitude parameter;
Step (6-7): relevant parameter is deposited into spectral information table;
Step (6-8): repeating step (6-6) to step (6-7), until reading spectrum file footline, end loop;
Step (6-9): in sample test information table be stored in sample number into spectrum, spectrum types, test temperature, testing humidity, The information such as testing time, entry time, spectral information table name;
Step (6-10): storage is completed, and state flag bit Flag is set 0.
Step 7: repeating step 4 to step 6, until uploading in listed files does not have spectrum the file information, tera-hertz spectra Storage terminates.
The present embodiment realize terahertz light modal data upload automatically, automatic input spectroscopic data library facility, substitution is artificial Copy, editing and processing, spectral classification, typing etc. operates one by one;High degree of automation, efficiency of inputting are obviously improved, and are had very high Practicability.
The tera-hertz spectra database of the present embodiment extends the spectral information of storage sample, test information, so that terahertz Hereby spectrum is more abundant, complete.
Embodiment two
The present embodiment describes terahertz light modal data automatic input spectra database method from server-side.
The terahertz light modal data automatic input spectra database method of the present embodiment, comprising:
Step a: state flag bit Flag is set 0 by initialization spectra database;
As shown in Fig. 2, spectra database includes initial configuration table, sample test information table, spectral information table.
Initial configuration table includes the fields such as sample number into spectrum, sample ID, sample classification, the sample place of production.
When sample test information table includes sample number into spectrum, spectrum types, test temperature, testing humidity, testing time, storage Between, the fields such as spectrum table name.
Spectrum types includes Time Domain Spectrum, frequency domain spectra, absorption spectra, spectrum of refractive index, extinction coefficient spectrum.
Time Domain Spectrum includes the information such as sampling time, signal amplitude;Frequency domain spectra includes the information such as frequency, power magnitude;It absorbs Spectrum includes the information such as frequency, absorption intensity;Spectrum of refractive index includes the information such as frequency, refractive index;Extinction coefficient spectrum includes frequency, disappears The information such as backscatter extinction logarithmic ratio.
Sample number into spectrum is spectra database major key, and all points of tables are effectively connected.
Such as: spectra database initialization includes input test sample ID: sparteine, sample classification: traditional Chinese medicine, sample The product place of production: Shaanxi, after input determines, system distributes the sample number into spectrum of sparteine: HQHJ20080601 automatically.
Step b: it is connected to the network with client;
As shown in Figure 1, client is mounted on terahertz time-domain spectroscopy component computer, terahertz light modal data is automatic It is uploaded to server-side.
Server-side is mounted on the server where spectra database, realizes that database initial configuration, spectroscopic data connect Receipts and automatic input database function.
Client and server-side pass through wide area network or LAN connection.
Step c: when the file monitor thread of client detect under preset spectrum file store path have it is newly-increased File and belong to spectrum file and be added to upload listed files when, receive client transmission come upload file request;
In specific implementation, start terahertz time-domain spectroscopy system, while starting client;It is inputted on client end interface IP address, the port numbers of server, setting monitoring file path, such as: supervised path is set as " C: THzData ", creation Socket socket.
Client trial is connected to the network with server-side, if successful connection, client end interface prompt has connected service Device restarts terahertz time-domain spectroscopy system after solving network communication failure if it fails to connect, then prompting network communication abnormal Start client simultaneously.
Client terminal start-up file monitor thread, for monitoring file change under the path " C: THzData ".
Experimenter presets spectrum file store path, the test specimens name of an article on terahertz time-domain spectroscopy system interface Claim, thickness of sample, such as setting store path is " C: THzData ", sample ID is " sparteine _ 1 ", thickness of sample "1mm".Wherein, the serial number 1 in " sparteine _ 1 " represents first test sample of sparteine.After the completion of test, terahertz Hereby spectroscopic data is saved in specific spectrum file name under the path " C: THzData ", concrete operations are as follows:
Firstly, measuring terahertz time-domain signal i.e. reference signal when not being put into sparteine, it is denoted as Er(t), such as Fig. 5 (a) It is shown;
Then, sparteine is put on terahertz time-domain spectroscopy system sample frame, measures terahertz time-domain letter at this time Number i.e. sample signal, be denoted as Es(t), as shown in Fig. 5 (a);
To time-domain signal Er(t)、Es(t)Fourier transformation is carried out respectively, obtains its frequency-region signal Er(ω)、Es(ω), such as Fig. 5 (b) shown in;
According to optical parameter model, is compared by sample frequency-region signal and with reference to frequency-region signal, obtain affixture machine Function H (ω) is indicated are as follows:
Wherein, A: the quotient of amplitudes of sample signal and reference signal, ω: THz wave frequency, φ: sample signal and reference Signal phase difference.
When experimental situation medium is nitrogen, in the case where sample weak absorbing, refractive index n (ω), the absorption coefficient a of sample (ω) and extinction coefficient k (ω) calculation formula are as follows:
Wherein, d: thickness of sample, c: the light velocity.
The absorption coefficient of sample, refractive index and extinction coefficient, such as Fig. 5 under each frequency point are successively calculated according to above-mentioned formula (c), shown in Fig. 5 (d), Fig. 5 (e);
Newly-built text file, the parameter values such as write-in test temperature, testing humidity, thickness of sample in first trip, adjacent two Separator is done using ", " among a parameter;
In next line, according to different spectrum parameter types, since initial frequency or starting acquisition time line by line The parameter values of above-mentioned calculating are written, use ", " to do separator among two neighboring parameter.It is by absorption spectra of spectrum types Example, line by line write frequency, the parameters such as absorptive amplitude;
Previous step is repeated, until cutoff frequency or cut-off acquisition time, circulation, which is recorded, to be terminated;
By text file with default spectrum file name format storage to preset spectrum file store path " C: Under THzData ".
Such as: spectrum file name format is preset for " sample ID _ serial number _ testing time _ spectrum types ", in embodiment Sparteine absorption spectra text file is entitled: " sparteine _ 1_20180601_ absorption spectra ".
Step d: after server-side receives the upload file request of client, judge system mode:, can as Flag=0 To receive, reply customer side " OK ";As Flag=1, rejection is replied client " Busy ", repeats step c;
In specific implementation, after server-side receives the upload file request of client, judge system mode: working as Flag= When 0, system is idle, can receive, and replys customer side " OK ";As Flag=1, system is busy, and client is replied in rejection "Busy";
Client receives server-side and replies, and when judging to reply as " OK ", startup file uploads thread;Judgement replies When " Busy ", client sends to server-side again and uploads file request;
Client, which traverses, uploads listed files, first upload file name in read list sequence, i.e., " sparteine _ 1_20180601_ absorption spectra ";
This document is opened, file size is obtained;
According to file size dynamic definition buffer area, file content is read in binary form, file content is sent into slow Rush area;
Buffer contents are sent to server-side by Socket socket;
It is sent, closes file, delete the file name sent in uploading listed files.
When it is " OK " that client, which receives server-side to reply, client traversal uploads listed files and successively uploads related text Part avoids program obstruction, without uploading, improves efficiency of transmission.
Step e: the spectrum file that client uploads is received, state flag bit Flag is set 1;
Step f: extracting sample ID from received spectrum file name, and inquire the sample is in spectra database No there are initial configuration information, and if it exists, correlation spectrum parameter and automatic input database are then parsed from spectrum file In, record library terminates, and state flag bit Flag is set 0;Otherwise, storage processing is not done, and state flag bit Flag is set 0;
In specific implementation, as shown in figure 4, step 6 includes:
Step (6-1): from the file name of received spectrum file, " sparteine _ 1_20180601_ absorbs server-side Sample ID is extracted in spectrum ": " sparteine ", the testing time: " 20180601 ", spectrum types: the parameters such as " absorption spectra ", together When obtain system time as entry time;
Step (6-2): the configuration record of " sparteine " is inquired in the initial configuration table of spectra database;
Step (6-3): the configuration record of sparteine if it exists is then inquired, is read and the matched sample of sparteine is compiled Number;Configuration record if it does not exist, then be not processed, and executes step 7.
Step (6-4): " sparteine " is inquired in the sample test information table of spectra database with the presence or absence of test note Record, test record, reads spectral information table name field information if it exists;Test record if it does not exist, then dynamic creation goldspink Flower alkali spectral information table, spectral information table name be known as " sparteine " combined with " absorption spectra " information in the Chinese phonetic alphabet lead-in It is female i.e.: " JQHJSYP ";
Step (6-5): opening spectrum file, reads first trip information, is stored in character string, is successively mentioned with ", " as separator Take out the information such as test temperature, testing humidity, thickness of sample;
Step (6-6): continuing to read next row information, be stored in character string, according to spectrum types, is used as separator with ", " Relevant parameter is successively extracted, by taking spectrum types is absorption spectra as an example, extracts frequency, absorptive amplitude parameter;
Step (6-7): relevant parameter is deposited into spectral information table;
Step (6-8): repeating step (6-6) to step (6-7), until reading spectrum file footline, end loop;
Step (6-9): in sample test information table be stored in sample number into spectrum, spectrum types, test temperature, testing humidity, The information such as testing time, entry time, spectral information table name;
Step (6-10): storage is completed, and state flag bit Flag is set 0.
Step g: repeating step d to step f, until uploading in listed files does not have spectrum the file information, tera-hertz spectra Storage terminates.
The present embodiment realize terahertz light modal data upload automatically, automatic input spectroscopic data library facility, substitution is artificial Copy, editing and processing, spectral classification, typing etc. operates one by one;High degree of automation, efficiency of inputting are obviously improved, and are had very high Practicability.
Embodiment three
The present embodiment describes terahertz light modal data automatic input spectra database method from client.
The terahertz light modal data automatic input spectra database method of the present embodiment, comprising:
Step A:, client is connected to the network with server-side, and startup file monitoring thread;
As shown in Fig. 2, spectra database includes initial configuration table, sample test information table, spectral information table.
Initial configuration table includes the fields such as sample number into spectrum, sample ID, sample classification, the sample place of production.
When sample test information table includes sample number into spectrum, spectrum types, test temperature, testing humidity, testing time, storage Between, the fields such as spectrum table name.
Spectrum types includes Time Domain Spectrum, frequency domain spectra, absorption spectra, spectrum of refractive index, extinction coefficient spectrum.
Time Domain Spectrum includes the information such as sampling time, signal amplitude;Frequency domain spectra includes the information such as frequency, power magnitude;It absorbs Spectrum includes the information such as frequency, absorption intensity;Spectrum of refractive index includes the information such as frequency, refractive index;Extinction coefficient spectrum includes frequency, disappears The information such as backscatter extinction logarithmic ratio.
Sample number into spectrum is spectra database major key, and all points of tables are effectively connected.
Such as: spectra database initialization includes input test sample ID: sparteine, sample classification: traditional Chinese medicine, sample The product place of production: Shaanxi, after input determines, system distributes sparteine sample number into spectrum: HQHJ20080601 automatically.
In specific implementation, start terahertz time-domain spectroscopy system, while starting client, inputted on client end interface IP address, the port numbers of server, setting monitoring file path, such as: it is set as " C: THzData ", creation Socket set Connect word.
Client trial is connected to the network with server-side, if successful connection, client end interface prompt has connected service Device restarts terahertz time-domain spectroscopy system after solving network communication failure if it fails to connect, then prompting network communication abnormal Start client simultaneously.
Client terminal start-up file monitor thread, for monitoring file change under the path " C: THzData ".
Experimenter operates terahertz time-domain spectroscopy system, and setting " C: THzData " is spectrum file store path, surveys After the completion of examination, terahertz light modal data is saved under the path " C: THzData " with specific spectrum file name.
Step B: the file monitor thread of client detects the file information under preset spectrum file store path, If detecting newly-increased file, file name is obtained, confirmation is added in upload listed files after belonging to spectrum file, while to Server-side, which is sent, uploads file request;
Wherein, the step B is specifically included:
Step B-1: whether have under the preset spectrum file store path of client file monitoring thread real-time detection " file addition " and " file modification " two events occur simultaneously;
Such as: under the monitoring file path " C: THzData " of client file monitoring thread real-time detection setting whether There are " file addition " and " file modification " two events while occurring;
Step B-2: when two events occur simultaneously, newly-increased file name is obtained, compared with default spectrum file name Compared with if meeting preset format, it is determined that belong to spectrum file, be added to and upload in listed files;Conversely, then belonging to other File is not dealt with, and returns to step B-1;
Such as: spectrum file name format is preset for " sample ID _ serial number _ testing time _ spectrum types ", in embodiment Sparteine absorption spectra text file is entitled: " sparteine _ 1_20180601_ absorption spectra "
Specifically, after the completion of terahertz time-domain system testing, monitoring thread detects newly-increased file, obtains file name " sparteine _ 1_20180601_ absorption spectra " meets default spectrum file name format, and determination belongs to spectrum file, added It is added to and uploads in listed files;Conversely, then belonging to alternative document, do not deal with, returns to step B-1;
Step B-3: client sends to server-side and uploads file request.
Step C: receiving server-side and reply, and when replying is " OK ", startup file uploads thread, and uploads spectrum file extremely Server-side, and when the sample ID in spectrum file in spectra database there are when initial configuration information, in spectrum file In correlation spectrum parameter automatic input database;
When replying is " Busy ", step B is repeated.
Wherein, in the step C, when it is " OK " that client, which receives server-side to reply:
Client traversal uploads listed files, first upload file name in read list, and obtains first upload The size of file;
According to file size dynamic definition buffer area, file content is read in binary form, file content is sent into slow Rush area;
Buffer contents are sent to server-side by Socket socket;
It is sent, closes current file, delete the file name sent in uploading listed files.
The present embodiment realize terahertz light modal data upload automatically, automatic input spectroscopic data library facility, substitution is artificial Copy, editing and processing, spectral classification, typing etc. operates one by one;High degree of automation, efficiency of inputting are obviously improved, and are had very high Practicability.
Example IV
Present embodiments provide a kind of terahertz light modal data automatic input spectra database system.
As shown in Figure 1, a kind of terahertz light modal data automatic input spectra database system of the present embodiment, including service End and client.
Wherein, the server-side, is configured as: state flag bit Flag is set 0 by initialization spectra database;
The client, is configured as: being connected to the network with server-side, and startup file monitoring thread;
File monitor thread detects the file information under preset spectrum file store path, if detecting newly-increased text Part then obtains file name, and confirmation is added in upload listed files after belonging to spectrum file, while sending and uploading to server-side File request;
Server-side answer is received, when replying is " OK ", startup file uploads thread, and uploads spectrum file to service End;
The server-side is also configured to receive the spectrum file that client uploads, state flag bit Flag is set 1;
Sample ID is extracted from received spectrum file name, inquire the sample whether there is in spectra database Initial configuration information, and if it exists, then from being parsed in spectrum file in correlation spectrum parameter and automatic input database, typing Terminate, state flag bit Flag is set 0;Otherwise, storage processing is not done, and state flag bit Flag is set 0;
Until uploading does not have spectrum the file information in listed files, tera-hertz spectra storage terminates.
As shown in figure 4, the treatment process of server-side includes:
Server-side is extracted from the file name " sparteine _ 1_20180601_ absorption spectra " of received spectrum file Sample ID: " sparteine ", the testing time: " 20180601 ", spectrum types: the parameters such as " absorption spectra ", while obtaining system Time is as entry time;
The configuration record of " sparteine " is inquired in the initial configuration table of spectra database;
The configuration record of sparteine if it exists, then inquire, read and the matched sample number into spectrum of sparteine;If it does not exist Configuration record, then be not processed.
" sparteine " is inquired in the sample test information table of spectra database whether there is test record, survey if it exists Trial record reads spectral information table name field information;Test record if it does not exist, then the spectrum of dynamic creation sparteine is believed Cease table, spectral information table name be known as " sparteine " combined with " absorption spectra " information in the Chinese phonetic alphabet initial i.e.: "JQHJSYP";
Spectrum file is opened, first trip information is read, is stored in character string, test temperature is successively extracted as separator with ", " The information such as degree, testing humidity, thickness of sample;
Continue to read next row information, be stored in character string, according to spectrum types, is successively extracted with ", " as separator Correlation spectrum parameter extracts frequency, absorptive amplitude parameter so that spectrum types is absorption spectra as an example;
Relevant parameter is deposited into spectral information table;
Continue to read next row information, be stored in character string, until reading spectrum file footline, end loop;
It is stored in sample number into spectrum in sample test information table, spectrum types, test temperature, testing humidity, the testing time, enters The information such as library time, spectral information table name;
Tera-hertz spectra storage is completed.
In specific implementation, the client, is also configured to
(1) whether there is " file under the preset spectrum file store path of client file monitoring thread real-time detection Addition " and " file modification " two events occur simultaneously;
Such as: under the monitoring file path " C: THzData " of client file monitoring thread real-time detection setting whether There are " file addition " and " file modification " two events while occurring;
(2) when two events occur simultaneously, newly-increased file name is obtained, compared with default spectrum file name, if Meet preset format, it is determined that belong to spectrum file, be added to and upload in listed files;Conversely, then belong to alternative document, It does not deal with, return continues to test;
Such as: spectrum file name format is preset for " sample ID _ serial number _ testing time _ spectrum types ", in embodiment Sparteine absorption spectra text file is entitled: " sparteine _ 1_20180601_ absorption spectra "
Specifically, after the completion of terahertz time-domain system testing, monitoring thread detects newly-increased file, obtains file name " sparteine _ 1_20180601_ absorption spectra " meets default spectrum file name format, and determination belongs to spectrum file, added It is added to and uploads in listed files;Conversely, then belonging to alternative document, do not deal with.
(3) it is sent to server-side and uploads file request.
In specific implementation, the client, is also configured to
When it is " OK " that client, which receives server-side to reply, traversal uploads listed files, first upload in read list File name, and obtain the size of first upper transmitting file;
According to file size dynamic definition buffer area, file content is read in binary form, file content is sent into slow Rush area;
Buffer contents are sent to server-side by Socket socket;
It is sent, closes current file, delete the file name sent in uploading listed files.
The present embodiment realize terahertz light modal data upload automatically, automatic input spectroscopic data library facility, substitution is artificial Copy, editing and processing, spectral classification, typing etc. operates one by one;High degree of automation, efficiency of inputting are obviously improved, and are had very high Practicability.
The tera-hertz spectra database of the present embodiment extends the spectral information of storage sample, test information, so that terahertz Hereby spectrum is more abundant, complete.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, the shape of hardware embodiment, software implementation or embodiment combining software and hardware aspects can be used in the present invention Formula.Moreover, the present invention, which can be used, can use storage in the computer that one or more wherein includes computer usable program code The form for the computer program product implemented on medium (including but not limited to magnetic disk storage and optical memory etc.).
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random AccessMemory, RAM) etc..
Above-mentioned, although the foregoing specific embodiments of the present invention is described with reference to the accompanying drawings, not protects model to the present invention The limitation enclosed, those skilled in the art should understand that, based on the technical solutions of the present invention, those skilled in the art are not Need to make the creative labor the various modifications or changes that can be made still within protection scope of the present invention.

Claims (10)

1. a kind of terahertz light modal data automatic input spectra database method characterized by comprising
Step 1: server-side initializes spectra database, and state flag bit Flag is set 0;
Step 2: client is connected to the network with server-side, and startup file monitoring thread;
Step 3: file monitor thread detects the file information under preset spectrum file store path, if detecting newly-increased File then obtains file name, and confirmation is added in upload listed files after belonging to spectrum file, while sending to server-side Transmitting file request;
Step 4: after server-side receives upload file request, sends and reply to client, when replying is " OK ", client terminal start-up File uploads thread;When replying is " Busy ", step 3 is repeated;
Step 5: server-side receives the spectrum file that client uploads, and state flag bit Flag is set 1;
Step 6: server-side extracts sample ID from received spectrum file name, inquires the sample in spectra database With the presence or absence of initial configuration information, and if it exists, then parse correlation spectrum parameter and automatic input data from spectrum file In library, typing terminates, and state flag bit Flag is set 0;Otherwise, storage processing is not done, and state flag bit Flag is set 0;
Step 7: repeating step 4 to step 6, until uploading does not have spectrum the file information in listed files, tera-hertz spectra is put in storage Terminate.
2. a kind of terahertz light modal data automatic input spectra database method as described in claim 1, which is characterized in that institute Step 3 is stated to specifically include:
Step 3-1: whether there is " file under the preset spectrum file store path of client file monitoring thread real-time detection Addition " and " file modification " two events occur simultaneously;
Step 3-2: when two events occur simultaneously, obtaining newly-increased file name, compared with default spectrum file name, if Meet preset format, it is determined that belong to spectrum file, be added to and upload in listed files;Conversely, then belong to alternative document, It does not deal with, returns to step 3-1;
Step 3-3: client sends to server-side and uploads file request.
3. a kind of terahertz light modal data automatic input spectra database method as described in claim 1, which is characterized in that In the step 4, when it is " OK " that client, which receives server-side to reply:
Client traversal uploads listed files, first upload file name in read list, and obtains first upper transmitting file Size;
According to file size dynamic definition buffer area, file content is read in binary form, and file content is sent into buffer area;
Buffer contents are sent to server-side by Socket socket;
It is sent, closes current file, delete the file name sent in uploading listed files.
4. a kind of terahertz light modal data automatic input spectra database method, this method is suitable for server-side, which is characterized in that Include:
Step a: state flag bit Flag is set 0 by initialization spectra database;
Step b: it is connected to the network with client;
Step c: when the file monitor thread of client detects under preset spectrum file store path there is newly-increased file And when belonging to spectrum file and being added to upload listed files, the upload file request that client transmission comes is received;
Step d: after server-side receives the upload file request of client, judge system mode: as Flag=0, Ke Yijie It receives, replys customer side " OK ";As Flag=1, rejection is replied client " Busy ", repeats step c;
Step e: the spectrum file that client uploads is received, state flag bit Flag is set 1;
Step f: sample ID is extracted from received spectrum file name, inquires whether the sample is deposited in spectra database In initial configuration information, and if it exists, then from being parsed in spectrum file in correlation spectrum parameter and automatic input database, record Enter to terminate, state flag bit Flag is set 0;Otherwise, storage processing is not done, and state flag bit Flag is set 0;
Step g: repeating step d to step f, until uploading does not have spectrum the file information in listed files, tera-hertz spectra storage Terminate.
5. a kind of terahertz light modal data automatic input spectra database method, this method is suitable for client, which is characterized in that Include:
Step A: being connected to the network with server-side, and startup file monitoring thread;
Step B: the file monitor thread of client detects the file information under preset spectrum file store path, if inspection Newly-increased file is measured, then obtains file name, confirmation, which belongs to after spectrum file to be added to, to be uploaded in listed files, while to service End, which is sent, uploads file request;
Step C: receiving server-side answer, and when replying is " OK ", startup file uploads thread, and uploads spectrum file to service End;
When replying is " Busy ", step B is repeated.
6. a kind of terahertz light modal data automatic input spectra database method as claimed in claim 5, which is characterized in that institute Step B is stated to specifically include:
Step B-1: whether there is " file under the preset spectrum file store path of client file monitoring thread real-time detection Addition " and " file modification " two events occur simultaneously;
Step B-2: when two events occur simultaneously, obtaining newly-increased file name, compared with default spectrum file name, if Meet preset format, it is determined that belong to spectrum file, be added to and upload in listed files;Conversely, then belong to alternative document, It does not deal with, returns to step B-1;
Step B-3: client sends to server-side and uploads file request.
7. a kind of terahertz light modal data automatic input spectra database method as claimed in claim 5, which is characterized in that In the step C, when it is " OK " that client, which receives server-side to reply:
Client traversal uploads listed files, first upload file name in read list, and obtains first upper transmitting file Size;
According to file size dynamic definition buffer area, file content is read in binary form, and file content is sent into buffer area;
Buffer contents are sent to server-side by Socket socket;
It is sent, closes current file, delete the file name sent in uploading listed files.
8. a kind of terahertz light modal data automatic input spectra database system, which is characterized in that including server-side and client;
The server-side, is configured as: state flag bit Flag is set 0 by initialization spectra database;
The client, is configured as: being connected to the network with server-side, and startup file monitoring thread;
File monitor thread detects the file information under preset spectrum file store path, if detecting newly-increased file, File name is then obtained, confirmation is added in upload listed files after belonging to spectrum file, while sending to server-side and uploading text Part request;
It receives server-side to reply, when replying is " OK ", startup file uploads thread, and uploads spectrum file to server-side;
The server-side is also configured to receive the spectrum file that client uploads, state flag bit Flag is set 1;
Sample ID is extracted from received spectrum file name, inquires the sample in spectra database with the presence or absence of initial Change configuration information, and if it exists, then from being parsed in spectrum file in correlation spectrum parameter and automatic input database, typing knot State flag bit Flag is set 0 by beam;Otherwise, storage processing is not done, and state flag bit Flag is set 0;
Until uploading does not have spectrum the file information in listed files, tera-hertz spectra storage terminates.
9. a kind of terahertz light modal data automatic input spectra database system as claimed in claim 8, which is characterized in that institute Client is stated, is also configured to
Whether have under the preset spectrum file store path of client file monitoring thread real-time detection " file addition " and " file modification " two events occur simultaneously;
When two events occur simultaneously, newly-increased file name is obtained, compared with default spectrum file name, if meeting default Format, it is determined that belong to spectrum file, be added to and upload in listed files;Conversely, then belonging to alternative document, do not make to locate Reason, return continue to test;
It is sent to server-side and uploads file request.
10. a kind of terahertz light modal data automatic input spectra database system as claimed in claim 8, which is characterized in that The client, is also configured to
When it is " OK " that client, which receives server-side to reply, traversal uploads listed files, first upper transmitting file in read list Title, and obtain the size of first upper transmitting file;
According to file size dynamic definition buffer area, file content is read in binary form, and file content is sent into buffer area;
Buffer contents are sent to server-side by Socket socket;
It is sent, closes current file, delete the file name sent in uploading listed files.
CN201810678903.3A 2018-06-27 2018-06-27 Method and system for automatically recording terahertz spectrum data into spectrum database Active CN109033185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810678903.3A CN109033185B (en) 2018-06-27 2018-06-27 Method and system for automatically recording terahertz spectrum data into spectrum database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810678903.3A CN109033185B (en) 2018-06-27 2018-06-27 Method and system for automatically recording terahertz spectrum data into spectrum database

Publications (2)

Publication Number Publication Date
CN109033185A true CN109033185A (en) 2018-12-18
CN109033185B CN109033185B (en) 2020-10-30

Family

ID=64611168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810678903.3A Active CN109033185B (en) 2018-06-27 2018-06-27 Method and system for automatically recording terahertz spectrum data into spectrum database

Country Status (1)

Country Link
CN (1) CN109033185B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930312A (en) * 2012-09-25 2013-02-13 北京农产品质量检测与农田环境监测技术研究中心 Method for storing spectral information in product label and application of product label
US20130176836A1 (en) * 2012-01-06 2013-07-11 University Of Southampton Magnetic field generator
CN103473707A (en) * 2013-09-17 2013-12-25 山东大学 Method for establishing urban river network water body spectrum library and application
CN103731483A (en) * 2013-12-25 2014-04-16 侯金涛 Virtual file system based on cloud computing
CN105429783A (en) * 2015-10-30 2016-03-23 上海帝联信息科技股份有限公司 Edge node server, log file processing method and log file processing system
CN105512430A (en) * 2015-12-31 2016-04-20 深圳市芭田生态工程股份有限公司 Shared input and output system of spectroscopic data and chemical detection data
CN107390636A (en) * 2017-08-28 2017-11-24 德阳杰创科技有限公司 A kind of numerical control device operational monitoring method and maintaining method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130176836A1 (en) * 2012-01-06 2013-07-11 University Of Southampton Magnetic field generator
CN102930312A (en) * 2012-09-25 2013-02-13 北京农产品质量检测与农田环境监测技术研究中心 Method for storing spectral information in product label and application of product label
CN103473707A (en) * 2013-09-17 2013-12-25 山东大学 Method for establishing urban river network water body spectrum library and application
CN103731483A (en) * 2013-12-25 2014-04-16 侯金涛 Virtual file system based on cloud computing
CN105429783A (en) * 2015-10-30 2016-03-23 上海帝联信息科技股份有限公司 Edge node server, log file processing method and log file processing system
CN105512430A (en) * 2015-12-31 2016-04-20 深圳市芭田生态工程股份有限公司 Shared input and output system of spectroscopic data and chemical detection data
CN107390636A (en) * 2017-08-28 2017-11-24 德阳杰创科技有限公司 A kind of numerical control device operational monitoring method and maintaining method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张卓勇 等: "基于BS结构的太赫兹光谱数据库的设计与实现", 《光谱学与光谱分析》 *

Also Published As

Publication number Publication date
CN109033185B (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN106092959B (en) A kind of near-infrared food quality monitoring system based on cloud platform
CN203233450U (en) Near-infrared food safety identification system
CN106248610B (en) Dynamic, multiple spot grass cultivar identification and authentication method based on terahertz time-domain spectroscopy
Raymond et al. Nondestructive sampling of Eucalyptus globulus and E. nitens for wood properties. III. Predicted pulp yield using near infrared reflectance analysis
CN103237078A (en) Near-infrared food safety identification system
CN106776806A (en) The methods of marking and system of call center's quality inspection voice
CN106484610A (en) A kind of Beta method and apparatus
CN104062263A (en) Near-infrared universal model detection method for quality indexes of fruits with similar optical and physical properties
CN102636450A (en) Method for detecting wolfberry polyose content in Chinese wolfberry in a nondestructive way based on near infrared spectrum technology
CN108780048A (en) A kind of method, detection device and the readable storage medium storing program for executing of determining detection device
CN109211829A (en) A method of moisture content in the near infrared spectroscopy measurement rice based on SiPLS
CN110309498A (en) The implementation method and device of examination report, and the method for generating examination report using it are generated based on parameter
CN109001149A (en) Double light path fruit nondestructive detection system and method based near infrared spectrum
CN112104613A (en) Honey net testing system based on data flow packet analysis and testing method thereof
CN105606610A (en) Bio-speckle technology based method for nondestructive detection of apple internal quality
CN112540971B (en) Full-information online acquisition system and method based on tobacco leaf characteristics
CN109033185A (en) A kind of terahertz light modal data automatic input spectra database method and system
Gordon et al. A novel cell fixation method that greatly enhances protein identification in microproteomic studies using laser capture microdissection and mass spectrometry
CN104865151B (en) A kind of detection method of raw silks of fresh cocoons
CN105611018B (en) A kind of MIPI LP signal test systems and method
CN205506679U (en) Portable near infrared spectroscopy detecting system
CN102187334A (en) Shape parameter for hematology instruments
TW201743070A (en) Logic analyzer, method of retrieving data of the same, and method of performance testing
CN109238973A (en) A method of detection apple soluble solid content and water content
Li et al. Study on a two‐dimensional correlation visible–near infrared spectroscopy kinetic model for the moisture content of fresh walnuts stored at room temperature

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
GR01 Patent grant
GR01 Patent grant