Specific embodiment
The exemplary embodiment that the present invention will be described in more detail below with reference to accompanying drawings.Although showing the present invention in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the present invention without should be by embodiments set forth here
It is limited.It is to be able to thoroughly understand the present invention on the contrary, providing these embodiments, and can be by the scope of the present invention
It is fully disclosed to those skilled in the art.
Fig. 1 shows the flow diagram of sample detection methods provided in an embodiment of the present invention, as shown in Figure 1, sample is examined
Survey method includes:
Step S11: scanning sample to be tested.
The sample detection methods of the embodiment of the present invention are applied to Raman detection equipment.The laser irradiation position of Raman detection equipment
Setting can move in a certain range according to fixed path, such as use MEMS (Microelectro Mechanical
Systems, MEMS) technology or rotate prism technique Raman product.Raman detection equipment itself has one in front of probe
For fixing the movable fixture of sample to be tested.It is mobile for fixing sample to be tested when needing mobile sample to be tested
Movable fixture.Sample to be tested is fixed on movable fixture by user can start detection.
In step s 11, scanning sample to be tested is quickly scanned to sample to be tested, and this time quickly scanning is not required to
Raman spectrum integral is done, as long as determining whether current point position has sample to be tested.
Quickly scanning can be Li Saru (Lissajous) graph scanning, and lattice scanning or any other mode are being worked as
The scanning carried out within the scope of preceding scanning area.As long as lissajous figures scans a cycle, as long as such as each point of lattice scanning
A very short time, such as 0.1s.In embodiments of the present invention, by taking the scanning mode of lissajous figures as an example, it is assumed that sample sack
In sample to be tested powder distribution it is uneven, there is partial region there is no the presence of sample to be tested in scanning area.Such as Fig. 2 institute
Show, laser adds up Raman according to the sample to be tested in lissajous figures track dynamic irradiating sample bag 10 on a sensor
Spectrum.There is sample to be tested powder 12 in region in scanning area 11 under dotted line, can obtain spectroscopic data, and the area on dotted line
Domain is in no signal condition because not having sample to be tested powder 12.In this case, compared with all can in scanning area 11
The case where being irradiated to sample to be tested, detection time will elongate, and the accuracy of testing result is because be irradiated to be detected
The covering surface of sample reduces, and also will receive certain influence, the identification especially for mixture and its ratio has an impact.
Step S12: obtaining the area of the empty region of the sample to be tested, wherein the empty region be without scanning to
The region of test sample.
Specifically, by the site setting of spectrum is not sky in current quickly scanning area;To currently quick scanning area
The interior adjacent point for sky is fused into an empty region, obtains the area of the empty region.
Step S13: when the area of the empty region is less than preset threshold, then the sample to be tested is detected.
If the area of empty region is less than preset threshold, illustrates that sample covering is qualified, can directly carry out sample to be tested
Detection.
Step S14: when the area of the empty region is greater than or equal to the preset threshold, then the test sample to be checked is moved
Product.
If the area of the empty region is greater than or equal to the preset threshold, as shown in figure 3, by Current Scan region 11
In empty region 110 and there is sample area 111 to be graphically presented to the user.The movement sample to be tested it
Before, record mobile number;And cache the current scan position of the sample to be tested, the area of the empty region and the shifting
Dynamic number.
In step S14, when the area of the empty region is greater than or equal to the preset threshold, and the mobile number is big
In or when being equal to preset times, the step of executing the detection sample to be tested in step S13;When the area of the empty region
More than or equal to the preset threshold, and when the mobile number is less than the preset times, the mobile sample to be tested, and
Be back to step S11, re-execute the steps S11-S14, until empty region area be greater than or equal to the preset threshold, or
The area of empty region is greater than or equal to preset threshold, and mobile number is greater than or equal to preset times.Preset times can be use
Family is pre-set or the maximum value of equipment default can prevent sample to be tested itself seldom, make by the way that preset times are arranged
At no matter how to move, the area coverage of sample to be tested is not up to standard.
In embodiments of the present invention, when mobile sample to be tested, according to the distribution of the empty region and preset algorithm
The mobile sample to be tested.According to the distribution of empty region and the scan position of preset algorithm adjustment sample to be tested, energy
Enough make it is mobile after there is the probability of the sample to be tested of bigger area coverage to increase in scanning area, can there are many calculate and movement side
Method, herein without limitation.Optionally, the position of centre of gravity that the empty region is calculated using Current Scan regional center point as origin is sat
Mark;Obtain the length of the origin to the position of centre of gravity coordinate line;The sample to be tested is controlled along the origin to institute
It states the distance of the preset percentage of the mobile length of position of centre of gravity coordinate line positive direction and quickly scans sample to be tested.Such as
Shown in Fig. 4, using Current Scan regional center point as origin O, horizontal axis is X-axis, and the longitudinal axis is Y-axis, this plane and sample to be tested
Locating plane coincidence or parallel.Calculating the position of centre of gravity A point coordinate (center) of empty region, it is assumed that A point coordinate is (x, y),
A referring to fig. 4.Sample to be tested drives sample sack to prolong the movement of OA positive direction, and moving distance is the preset percentage of OA length, specifically
Numerical value is set as needed, herein without limitation.Scanning area sample after movement covers b referring to fig. 4.
In embodiments of the present invention, before detecting the sample to be tested, according to the area of the empty region and institute
State the detection position that mobile number determines the sample to be tested;The sample to be tested is moved to the detection position.Tool
Body, when the area of empty region is less than the preset threshold, determine that the current scan position of the sample to be tested is to be checked
The detection position of sample.The area of empty region is less than the preset threshold, illustrates that the sample in Current Scan region covers
Lid is qualified, directly can carry out sample to be tested detection in present scanning position.If the mobile number is greater than or equal to institute
State preset times, select the area of the empty region it is the smallest it is primary described in the scan position of sample to be tested be test sample to be checked
The detection position of product.Mobile number is greater than or equal to preset times, illustrates not sweep once in defined preset times
The area for the empty region retouched is less than given threshold, in this way, the area of each scanning hollow region of selection caching is the smallest primary,
Obtain detection position of the scan position of the smallest single pass of area of empty region as sample to be tested.It will be described to be detected
Sample is moved to the detection position;Rescan sample to be tested using the preset face mode of sweeping, accumulate Raman spectrum with into
Row sample to be tested detects, and calls algorithmic match after the end of scan, and will test result and be presented to the user.For mixture sample
Product, testing result include each ingredient of mixture and the corresponding ratio of each ingredient.
The present invention fixes sample sack by the sample to be tested before a probe, sweeps carrying out one to sample to be tested
After retouching, area and the distribution of Current Scan region hollow region are determined.Mobile direction and distance are determined according to algorithm, and then are controlled
Sample to be tested processed is mobile, to have the covering of larger range of sample after movement, in scanning range.The embodiment of the present invention
Method passes through mobile sample to be tested, increases sample covering when sample to be tested detection, can shorten detection time, and mention
The intelligence of product testing has been risen, has also been improved under the scene of part to the accuracy of mixing analyte detection.
In embodiments of the present invention, more specifically, as shown in figure 5, sample detection methods include:
Step S100: starting detection.
Step S101: sample to be tested is quickly scanned.
Quickly scanning does not need to do Raman spectrum integral, as long as determining whether current point position has sample to be tested.
Step S102: the empty region area of Current Scan is obtained.
By the site setting of spectrum is not sky in current quickly scanning area;It will be adjacent in current quickly scanning area
It is fused into an empty region for empty point, obtains the area of empty region.
Step S103: judge whether the area of empty region is less than preset threshold.If it is, jumping to execution step
S110;If it is not, then continuing to execute step S104.
If the area of empty region is less than preset threshold, illustrate that sample covering is qualified, can directly be carried out in current location
Sample to be tested detection, and then step S110 is jumped directly to carry out sample to be tested detection.If the area of empty region is not
Less than preset threshold, that is, it is greater than or equal to preset threshold, illustrates that the covering of Current Scan region samples is unqualified, continue to execute step
S104 covers to obtain larger range of sample.
Step S104: graphically presenting in Current Scan region has sample area and empty region.
There are sample area and empty region by graphically presenting in Current Scan region, it being capable of more intuitive convenience
Ground determines direction and the distance of the movement of sample to be tested.
Step S105: the area and mobile number of the current scan position of caching sample to be tested, empty region.
By the current scan position of caching sample to be tested, the area and mobile number of empty region, facilitate it is subsequent into
The judgement of the mobile number of row, and search the detection position of reasonable sample to be tested.
Step S106: judge whether mobile number is greater than or equal to preset times.If it is, jumping to execution step
S108;If it is not, then continuing to execute step S107.
Preset times can be that user is pre-set or the maximum value of equipment default.If mobile number is less than default time
Number thens follow the steps S107, and mobile sample to be tested is to which after movement, scanning range is interior, and there is larger range of sample to cover
Lid.If whether mobile number is greater than or equal to preset times, illustrate that sample to be tested itself is seldom, it is likely that how to move,
The area coverage of sample to be tested is not up to standard.
Step S107: according to the distribution of empty region, the scan position of sample to be tested is adjusted.Then it returns to step
S101。
According to the distribution of empty region and the scan position of preset algorithm adjustment sample to be tested, to be scanned after movement
Have in region the sample to be tested of bigger area coverage probability increase, specifically can there are many calculate and moving method, herein not
It limits.
Return step S101 is quickly scanned after adjusting the scan position of sample to be tested, circulation step S101 to step
S107, until the area of empty region is jumped out and followed alternatively, whether mobile number is greater than or equal to preset times less than preset threshold
Ring.
Step S108: select the scan position of the smallest primary middle sample to be tested of the area of empty region to be detected to detect
The detection position of sample.
Whether mobile number is greater than or equal to preset times, illustrates in defined preset times, does not sweep quickly once
The area for the empty region retouched is less than given threshold, in this way, the area for quickly scanning hollow region for each time of selection caching is the smallest
Once, check bit of the smallest scan position once quickly scanned of area of empty region as detection sample to be tested is obtained
It sets.
Step S109: sample to be tested is moved to detection position.
Specifically, by the smallest scan position once quickly scanned of area that sample to be tested is moved to empty region.
Step S110: sample to be tested is rescaned using the preset face mode of sweeping, accumulation Raman spectrum is to be checked to carry out
Sample detection.
Specifically, sample to be tested is rescaned by the conventional face mode of sweeping of setting, accumulate Raman spectrum, after the end of scan
Algorithmic match is called, and will test result and be presented to the user.For blend sample, testing result includes each ingredient of mixture,
And the corresponding ratio of each ingredient.
The sample detection methods of the embodiment of the present invention include: scanning sample to be tested;Obtain the sky of the sample to be tested
The area in region, wherein the empty region is the region for arriving sample to be tested without scanning;When the area of the empty region is less than
When preset threshold, then the sample to be tested is detected;When the area of the empty region is greater than or equal to the preset threshold, then
The mobile sample to be tested, is capable of the coverage area of automatic lifting sample detection, improves the intelligence and standard of product testing
True property.
Fig. 6 shows the structural schematic diagram of the sample detection apparatus of the embodiment of the present invention, as shown in fig. 6, the sample detection
Equipment includes: scanning element 61, area acquiring unit 62, sample detection unit 63 and sample mobile unit 64.
Scanning element 61 is for scanning sample to be tested;Area acquiring unit 62 is used to obtain the sky of the sample to be tested
The area in region, wherein the empty region is the region for arriving sample to be tested without scanning;Sample detection unit 63 is for working as institute
When stating the area of empty region less than preset threshold, then the sample to be tested is detected;Sample mobile unit 64 is used to work as the sky
When the area in region is greater than or equal to the preset threshold, then the sample to be tested is moved.
In a kind of optional mode, area acquiring unit 62 is used for: by current quickly not no spectrum in scanning area
Site setting is sky;It is fused into an empty region for empty point by adjacent in current quickly scanning area, obtains the sky
The area in region.
In a kind of optional mode, sample mobile unit 64 is also used to: recording mobile number;Cache the test sample to be checked
The area and the mobile number of the current scan position of product, the empty region.
In a kind of optional mode: when the area of the empty region is greater than or equal to the preset threshold, and the shifting
When dynamic number is greater than or equal to preset times, sample detection unit 63 is for detecting the sample to be tested;When the empty region
Area be greater than or equal to the preset threshold, and the mobile number be less than the preset times when, sample mobile unit 64
For moving the sample to be tested, and it is back to the step of scanning element 61 scans sample to be tested.
In a kind of optional mode, sample mobile unit 64 is also used to: according to the distribution of the empty region and preset
The mobile sample to be tested of algorithm.
In a kind of optional mode, sample mobile unit 64 is also used to: using Current Scan regional center point as origin
Calculate the position of centre of gravity coordinate of the empty region;Obtain the length of the origin to the position of centre of gravity coordinate line;Control institute
State the preset percentage that sample to be tested moves the length along the origin to the position of centre of gravity coordinate line positive direction
Distance.
In a kind of optional mode, sample detection unit 63 is used for: according to the area of the empty region and the shifting
Dynamic number determines the detection position of the sample to be tested;The sample to be tested is moved to the detection position.
In a kind of optional mode, sample detection unit 63 is used for: when the area of the empty region is less than described preset
When threshold value, determine that the current scan position of the sample to be tested is the detection position of the sample to be tested;Such as
Mobile number described in fruit is greater than or equal to the preset times, select the area of the empty region it is the smallest it is primary described in it is to be checked
The scan position of sample is the detection position of the sample to be tested.
The sample detection methods of the embodiment of the present invention include;Scan sample to be tested;Obtain the sky of the sample to be tested
The area in region, wherein the empty region is the region for arriving sample to be tested without scanning;When the area of the empty region is less than
When preset threshold, then the sample to be tested is detected;When the area of the empty region is greater than or equal to the preset threshold, then
The mobile sample to be tested, is capable of the coverage area of automatic lifting sample detection, improves the intelligence and standard of product testing
True property.
The embodiment of the invention provides a kind of nonvolatile computer storage media, the computer storage medium is stored with
The sample detection methods in above-mentioned any means embodiment can be performed in an at least executable instruction, the computer executable instructions.
Executable instruction specifically can be used for so that processor executes following operation:
Scan sample to be tested;
The area of the empty region of the sample to be tested is obtained, wherein the empty region is to arrive sample to be tested without scanning
Region;
For when the area of the empty region is less than preset threshold, then detecting the sample to be tested;
When the area of the empty region is greater than or equal to the preset threshold, then the sample to be tested is moved.
In a kind of optional mode, the executable instruction makes the processor execute following operation:
By the site setting of spectrum is not sky in current quickly scanning area;
It is fused into an empty region for empty point by adjacent in current quickly scanning area, obtains the empty region
Area.
In a kind of optional mode, the executable instruction makes the processor execute following operation:
Record mobile number;
Cache the area and the mobile number of the current scan position of the sample to be tested, the empty region.
In a kind of optional mode, the executable instruction makes the processor execute following operation:
When the area of the empty region is greater than or equal to the preset threshold, and the mobile number be greater than or equal to it is default
When number, execute the detection sample to be tested the step of;
When the area of the empty region is greater than or equal to the preset threshold, and the mobile number is less than described default time
When number, the mobile sample to be tested, and the step of being back to the scanning sample to be tested.
In a kind of optional mode, the executable instruction makes the processor execute following operation:
According to the distribution of the empty region and the mobile sample to be tested of preset algorithm.
In a kind of optional mode, the executable instruction makes the processor execute following operation:
The position of centre of gravity coordinate of the empty region is calculated using Current Scan regional center point as origin;
Obtain the length of the origin to the position of centre of gravity coordinate line;
It controls the sample to be tested and moves the length along the origin to the position of centre of gravity coordinate line positive direction
Preset percentage distance.
In a kind of optional mode, the executable instruction makes the processor execute following operation:
The detection position of the sample to be tested is determined according to the area of the empty region and the mobile number;
The sample to be tested is moved to the detection position.
In a kind of optional mode, the executable instruction makes the processor execute following operation:
When the area of the empty region is less than the preset threshold, the current scanning of the sample to be tested is determined
Position is the detection position of the sample to be tested;
If the mobile number is greater than or equal to the preset times, select the area of the empty region the smallest primary
Described in sample to be tested the scan position be the sample to be tested the detection position.
The sample detection methods of the embodiment of the present invention include;Scan sample to be tested;Obtain the sky of the sample to be tested
The area in region, wherein the empty region is the region for arriving sample to be tested without scanning;When the area of the empty region is less than
When preset threshold, then the sample to be tested is detected;When the area of the empty region is greater than or equal to the preset threshold, then
The mobile sample to be tested, is capable of the coverage area of automatic lifting sample detection, improves the intelligence and standard of product testing
True property.
Fig. 7 shows the structural schematic diagram of present device embodiment, and the specific embodiment of the invention is not to the tool of equipment
Body realization limits.
As shown in fig. 7, the equipment may include: processor (processor) 702, communication interface (Communications
Interface) 704, memory (memory) 706 and communication bus 708.
Wherein: processor 702, communication interface 704 and memory 706 complete mutual lead to by communication bus 708
Letter.Communication interface 704, for being communicated with the network element of other equipment such as client or other servers etc..Processor 702 is used
In executing program 710, the correlation step in above-mentioned sample detection methods embodiment can be specifically executed.
Specifically, program 710 may include program code, which includes computer operation instruction.
Processor 702 may be central processor CPU or specific integrated circuit ASIC (Application
Specific Integrated Circuit), or be arranged to implement the integrated electricity of one or more of the embodiment of the present invention
Road.The one or more processors that equipment includes can be same type of processor, such as one or more CPU;It is also possible to
Different types of processor, such as one or more CPU and one or more ASIC.
Memory 706, for storing program 710.Memory 706 may include high speed RAM memory, it is also possible to further include
Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 710 specifically can be used for so that processor 702 executes following operation:
Scan sample to be tested;
The area of the empty region of the sample to be tested is obtained, wherein the empty region is to arrive sample to be tested without scanning
Region;
For when the area of the empty region is less than preset threshold, then detecting the sample to be tested;
When the area of the empty region is greater than or equal to the preset threshold, then the sample to be tested is moved.
In a kind of optional mode, described program 710 makes the processor execute following operation:
By the site setting of spectrum is not sky in current quickly scanning area;
It is fused into an empty region for empty point by adjacent in current quickly scanning area, obtains the empty region
Area.
In a kind of optional mode, described program 710 makes the processor execute following operation:
Record mobile number;
Cache the area and the mobile number of the current scan position of the sample to be tested, the empty region.
In a kind of optional mode, described program 710 makes the processor execute following operation:
When the area of the empty region is greater than or equal to the preset threshold, and the mobile number be greater than or equal to it is default
When number, execute the detection sample to be tested the step of;
When the area of the empty region is greater than or equal to the preset threshold, and the mobile number is less than described default time
When number, the mobile sample to be tested, and the step of being back to the scanning sample to be tested.
In a kind of optional mode, described program 710 makes the processor execute following operation:
According to the distribution of the empty region and the mobile sample to be tested of preset algorithm.
In a kind of optional mode, described program 710 makes the processor execute following operation:
The position of centre of gravity coordinate of the empty region is calculated using Current Scan regional center point as origin;
Obtain the length of the origin to the position of centre of gravity coordinate line;
It controls the sample to be tested and moves the length along the origin to the position of centre of gravity coordinate line positive direction
Preset percentage distance.
In a kind of optional mode, described program 710 makes the processor execute following operation:
The detection position of the sample to be tested is determined according to the area of the empty region and the mobile number;
The sample to be tested is moved to the detection position.
In a kind of optional mode, described program 710 makes the processor execute following operation:
When the area of the empty region is less than the preset threshold, the current scanning of the sample to be tested is determined
Position is the detection position of the sample to be tested;
If the mobile number is greater than or equal to the preset times, select the area of the empty region the smallest primary
Described in sample to be tested the scan position be the sample to be tested the detection position.
The sample detection methods of the embodiment of the present invention include;Scan sample to be tested;Obtain the sky of the sample to be tested
The area in region, wherein the empty region is the region for arriving sample to be tested without scanning;When the area of the empty region is less than
When preset threshold, then the sample to be tested is detected;When the area of the empty region is greater than or equal to the preset threshold, then
The mobile sample to be tested, is capable of the coverage area of automatic lifting sample detection, improves the intelligence and standard of product testing
True property.
Algorithm or display are not inherently related to any particular computer, virtual system, or other device provided herein.
Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system
Structure be obvious.In addition, the embodiment of the present invention is also not for any particular programming language.It should be understood that can benefit
Summary of the invention described herein is realized with various programming languages, and the description done above to language-specific is to drape over one's shoulders
Reveal preferred forms of the invention.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the present invention and help to understand one or more of the various inventive aspects,
Above in the description of exemplary embodiment of the present invention, each feature of the embodiment of the present invention is grouped together into individually sometimes
In embodiment, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: being wanted
Ask protection the present invention claims features more more than feature expressly recited in each claim.More precisely, such as
As following claims reflect, inventive aspect is all features less than single embodiment disclosed above.
Therefore, it then follows thus claims of specific embodiment are expressly incorporated in the specific embodiment, wherein each right is wanted
Ask itself all as a separate embodiment of the present invention.
In addition, it will be appreciated by those of skill in the art that although some embodiments in this include institute in other embodiments
Including certain features rather than other feature, but the combination of the feature of different embodiment means in the scope of the present invention
Within and form different embodiments.For example, in the following claims, embodiment claimed it is any it
One can in any combination mode come using.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability
Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch
To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame
Claim.Step in above-described embodiment should not be construed as the restriction to execution sequence in addition to having specified otherwise.