Sample introduction method and device, electronic equipment and storage medium
By automatically controlling the cleaning and sample injection process of the ultra-high resolution mass spectrometer, the similarity judgment of the solvent spectrum image is used to solve the problems of low cleaning efficiency and great influence of subjective judgment, and efficient and automatic mass spectrometry analysis is achieved .
Patent Information
- Application Number
- CN202311054602.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-02-21
AI Technical Summary
Ultra-high resolution mass spectrometers have a strong sensitivity to pollution, resulting in low efficiency in cleaning ion transmission pipelines, and subjective factors have a great impact on the judgment of the conformity of the background spectrum.
By acquiring the solvent spectrum image of the cleaning pipeline and determining its similarity with the preset standard spectrum image, the injection system is automatically controlled to continue cleaning or sample injection until the similarity threshold is met.
Automatic continuous sampling of ultra-high resolution mass spectrometry is realized, experimental efficiency is improved, subjective errors are reduced, and manual participation is required.
Smart Images

Figure CN119492796A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of organic compound analysis, and in particular to a sampling method and device, an electronic device and a storage medium. Background Art
[0002] Among the related technologies, ultra-high resolution mass spectrometry can be widely used in the analysis of environmental, geological, biological and other samples, and can realize the qualitative and quantitative analysis of ultra-trace compounds.
[0003] However, ultra-high-resolution mass spectrometers are extremely sensitive to contamination. On the one hand, background contaminants from dilution solvents cannot be removed; on the other hand, residues of previous samples in the transmission pipeline can easily affect the reliability of subsequent sample spectra. Therefore, after completing a sample test, it is necessary to continuously inject solvent into the mass spectrometer to flush the ion transmission pipeline, and only after ensuring that the blank spectrum is the same as the background sample can the next sample be analyzed. At present, this step requires the operator to continuously draw solvent for flushing and constantly observe the spectrum on the computer screen for judgment, which has the problems of low efficiency and large influence of human factors.
[0004] Therefore, it is urgent to solve the problems of low efficiency of ion transmission pipeline cleaning in ultra-high resolution mass spectrometry testing and the great influence of subjective factors on the qualification judgment of background spectra. Summary of the invention
[0005] In order to solve the above technical problems or at least partially solve the above technical problems, embodiments of the present disclosure provide a sampling method and device, an electronic device and a storage medium.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for injecting a sample, the method comprising:
[0007] Before the sample to be tested is injected, a spectrum image of the solvent used to clean the pipeline is obtained;
[0008] Determine the similarity between the spectrum image of the solvent and a preset standard spectrum image;
[0009] In response to the similarity being less than or equal to a preset similarity threshold, issuing an instruction to continue cleaning the pipeline, controlling the injection system to continue cleaning the pipeline, and returning to the step of acquiring a spectrum image of the solvent for cleaning the pipeline;
[0010] In response to the similarity being greater than a preset similarity threshold, a sample injection instruction is issued to control the sampling plate and the electronic valve of the injection system to inject the sample to be tested, and the sample to be tested is tested.
[0011] In a possible implementation manner, after the test of the current sample to be tested is completed, the method further includes:
[0012] According to the preset number of samples to be tested, determine whether there are any samples to be tested that have not completed the test;
[0013] In response to the presence of a sample to be tested that has not completed the test, before the next sample to be tested is injected, a pipeline cleaning instruction is issued to control the injection system to clean the pipeline, and a spectrum image of the solvent used to clean the pipeline is obtained.
[0014] In a possible implementation manner, determining whether there are any samples to be tested that have not been tested, according to a preset number of samples to be tested, includes:
[0015] Control the injection needle valve of the injection system to open, absorb the solvent and discharge it into the waste tank through the waste tank valve, complete the injection needle cleaning, and calculate whether the value of the number of samples left after the last sample is tested minus 1 is greater than 0;
[0016] In response to the value of the number of remaining samples to be tested minus 1 after the last sample to be tested is greater than 0, it is determined that there are samples to be tested that have not completed the test;
[0017] In response to the value of the number of remaining samples to be tested minus 1 being equal to 0 after the last sample to be tested has been tested, it is determined that there is no sample to be tested that has not been tested.
[0018] In a possible implementation, the control of the sample injection system cleaning pipeline includes:
[0019] The control injection system injects solvent into the ion transmission line at a set speed based on the cleaning line instruction to clean the line.
[0020] In a possible implementation, the determining the similarity between the spectral image of the solvent and a preset standard spectral image includes:
[0021] Processing the spectrum image of the solvent and the preset standard spectrum image into images of preset sizes respectively, and performing binarization processing on the images of the preset sizes;
[0022] The similarity between the solvent spectrum image and the preset standard spectrum image is calculated based on the grayscale value of the pixel points of the image after binarization processing.
[0023] In a possible implementation, the calculating the similarity between the spectral image of the solvent and a preset standard spectral image according to the grayscale values of the pixels of the binarized image includes:
[0024] For the solvent spectrum image and the standard spectrum image, the number of black pixels in each column of the binary processed image is counted to obtain the black pixel number vector [x1, x2, …, x n ] and [y1,y2,…,y n ];
[0025] Based on the black pixel number vector [x1,x2,…,x n ] and [y1,y2,…,y n ], the similarity between the spectrum image of the solvent and the preset standard spectrum image is calculated by the following expression:
[0026]
[0027] Among them, cosθ is the similarity between the spectrum image of the solvent and the preset standard spectrum image, x i is the number of black pixels in the i-th column of the binary image of the solvent spectrum, y i is the number of black pixels in the i-th column of the standard spectrogram image after binarization.
[0028] In a possible implementation, the method further includes:
[0029] In response to the similarity being less than or equal to a preset similarity threshold, counting the cleaning time;
[0030] In response to the cleaning time exceeding a preset time threshold, an alarm signal is issued.
[0031] In a possible implementation, the method further includes:
[0032] After issuing a command to continue cleaning the pipeline, the volume of the solvent is monitored in real time during the period when the sampling system is controlled to clean the pipeline;
[0033] In response to the volume of the solvent being less than a preset volume threshold, an alarm signal is issued.
[0034] In a possible implementation, the control of the sampling system to inject the sample to be tested into the sampling disk and the electronic valve includes:
[0035] Control the injection system to open the injection needle valve and sampling pump, absorb the sample to be tested according to the set parameters, then close the injection needle valve, open the mass spectrometer inlet channel valve, and inject the sample to be tested into the mass spectrometer for testing.
[0036] In a second aspect, an embodiment of the present disclosure provides a sample injection device, comprising:
[0037] An acquisition module, used for acquiring a spectrum image of the solvent used to clean the pipeline before the sample to be tested is injected;
[0038] A first determination module is used to determine the similarity between the spectrum image of the solvent and a preset standard spectrum image;
[0039] A first control module is used for, in response to the similarity being less than or equal to a preset similarity threshold, issuing an instruction to continue cleaning the pipeline, controlling the injection system to continue cleaning the pipeline, and returning to the step of acquiring a spectrum image of the solvent for cleaning the pipeline;
[0040] The second control module is used for issuing a sample injection instruction in response to the similarity being greater than a preset similarity threshold, controlling the sampling plate and the electronic valve of the injection system to inject the sample to be tested, and testing the sample to be tested.
[0041] In a possible implementation, the device further includes:
[0042] A second determination module is used to determine whether there are any samples to be tested that have not been tested after the test of the current sample to be tested is completed according to a preset number of samples to be tested;
[0043] The first control module is further used for: in response to the second determination module determining that there is a sample to be tested that has not completed the test, before the next sample to be tested is injected, issuing a pipeline cleaning instruction to control the injection system to clean the pipeline;
[0044] The acquisition module is used to acquire the spectrum image of the solvent for cleaning the pipeline before the next sample to be tested is injected.
[0045] In a possible implementation manner, the second determining module is specifically configured to:
[0046] After the current sample is tested, the injection needle valve of the injection system is controlled to open, the solvent is sucked and then discharged into the waste tank through the waste tank valve, the injection needle is cleaned, and the number of remaining samples minus 1 after the previous sample is tested is calculated to see whether it is greater than 0;
[0047] In response to the value of the number of remaining samples to be tested minus 1 after the last sample to be tested is greater than 0, it is determined that there are samples to be tested that have not completed the test;
[0048] In response to the value of the number of remaining samples to be tested minus 1 being equal to 0 after the last sample to be tested has been tested, it is determined that there is no sample to be tested that has not been tested.
[0049] In a possible implementation manner, the first control module is specifically configured to:
[0050] The control injection system injects solvent into the ion transmission line at a set speed based on the cleaning line instruction to clean the line.
[0051] In a possible implementation manner, the first determining module is specifically configured to:
[0052] Processing the spectrum image of the solvent and the preset standard spectrum image into images of preset sizes respectively, and performing binarization processing on the images of the preset sizes;
[0053] The similarity between the solvent spectrum image and the preset standard spectrum image is calculated based on the grayscale value of the pixel points of the image after binarization processing.
[0054] In a possible implementation manner, the first determining module is specifically configured to:
[0055] For the solvent spectrum image and the standard spectrum image, the number of black pixels in each column of the binary processed image is counted to obtain the black pixel number vector [x1, x2, …, x n ] and [y1,y2,…,y n ];
[0056] Based on the black pixel number vector [x1,x2,…,x n ] and [y1,y2,…,y n ], the similarity between the spectrum image of the solvent and the preset standard spectrum image is calculated by the following expression:
[0057]
[0058] Among them, cosθ is the similarity between the spectrum image of the solvent and the preset standard spectrum image, x i is the number of black pixels in the i-th column of the binary image of the solvent spectrum, y i is the number of black pixels in the i-th column of the standard spectrogram image after binarization.
[0059] In a possible implementation manner, the first control module is further configured to:
[0060] In response to the similarity being less than or equal to a preset similarity threshold, counting the cleaning time;
[0061] In response to the cleaning time exceeding a preset time threshold, an alarm signal is issued.
[0062] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0063] Memory, used to store computer programs;
[0064] The processor is used to implement the above-mentioned injection method when executing the program stored in the memory.
[0065] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned injection method when executed by a processor.
[0066] The above technical solution provided by the embodiment of the present disclosure has at least some or all of the following advantages compared with the prior art:
[0067] The injection method described in the embodiment of the present disclosure obtains a spectral image of the solvent for cleaning the pipeline before the sample to be tested is injected; determines the similarity between the spectral image of the solvent and a preset standard spectral image; in response to the similarity being less than or equal to a preset similarity threshold, issues an instruction to continue cleaning the pipeline, controls the injection system to continue cleaning the pipeline, and returns to execute the step of obtaining the spectral image of the solvent for cleaning the pipeline until the similarity is greater than the preset similarity threshold; in response to the similarity being greater than the preset similarity threshold, issues an injection instruction for the sample to be tested, controls the sampling plate and the electronic valve of the injection system to inject the sample to be tested, and tests the sample to be tested. When the background spectrum meets the set requirements, automatic and continuous sampling of ultra-high resolution mass spectrometry can be achieved, thereby improving experimental efficiency and reducing subjective errors. It not only does not require human intervention, but is also fast and accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0070] Figure 1 The schematic diagram of the flow chart of the sampling method according to the embodiment of the present disclosure is shown;
[0071] Figure 2 The schematic diagram of the connection structure of the injection system according to the embodiment of the present disclosure is shown schematically;
[0072] Figure 3 A schematic diagram of a structure of a sample injection device according to an embodiment of the present disclosure is shown; and
[0073] Figure 4 The structural block diagram of an electronic device according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0075] See also Figure 1 , an embodiment of the present disclosure provides a sampling method, the method comprising:
[0076] S1, before the sample to be tested is injected, a spectrum image of the solvent used to clean the pipeline is obtained.
[0077] In this embodiment, the spectrum image of the solvent may be a mass spectrum output by injecting the solvent as a sample into an ultra-high resolution mass spectrometer.
[0078] S2, determining the similarity between the spectrum image of the solvent and a preset standard spectrum image.
[0079] S3, in response to the similarity being less than or equal to a preset similarity threshold, issuing a command to continue cleaning the pipeline, controlling the injection system to continue cleaning the pipeline, and returning to execute the step of acquiring a spectrum image of the solvent for cleaning the pipeline until the similarity is greater than the preset similarity threshold.
[0080] In this embodiment, before sampling, a solvent (usually toluene, methanol, reagent water, or a mixed solution of several of them at different concentrations) is injected into the ion transfer line at a set speed until the similarity between the spectral image of the solvent and the preset standard spectral image is greater than a preset similarity threshold, and the sampling plate and the electronic valve of the injection system are controlled to inject the sample for analysis, and then return to the previous step to perform solvent cleaning of the ion transfer line, and this is repeated until all sample tests are completed.
[0081] In this embodiment, if Figure 2 As shown, the injection system includes a mass spectrometer injection port 1, a computer 2, an injection device 3, a sample tank 4, a solvent tank 5, a waste liquid tank 6 and a sampling pump. The sample tank 4 and the solvent tank 5 can be rotated to align the sample bottle carried with the sampling needle. A non-contact liquid level sensor 7 is provided in the liquid tank 8 of the sampling pump, which is used to determine whether the sample (solvent) in the liquid tank has reached the minimum injection volume; there are three inlets and outlets 9 with electronic valves at the bottom of the liquid tank 8, which are respectively connected to the ultra-high resolution mass spectrometer inlet, the waste liquid tank and the sampling needle, and are opened separately during injection, fine needle waste liquid release, and sample aspiration.
[0082] S4, in response to the similarity being greater than a preset similarity threshold, issuing a sample injection instruction to control the sampling plate and the electronic valve of the injection system to inject the sample to be tested, and testing the sample to be tested.
[0083] In this embodiment, after the test of the current sample is completed, the method further includes:
[0084] According to the preset number of samples to be tested, determine whether there are any samples to be tested that have not completed the test;
[0085] In response to the presence of a sample to be tested that has not completed the test, before the next sample to be tested is injected, a pipeline cleaning instruction is issued to control the injection system to clean the pipeline, and a spectrum image of the solvent used to clean the pipeline is obtained.
[0086] In this embodiment, the step of determining whether there are any samples to be tested that have not been tested, based on the preset number of samples to be tested, includes:
[0087] Control the injection needle valve of the injection system to open, absorb the solvent and discharge it into the waste tank through the waste tank valve, complete the injection needle cleaning, and calculate whether the value of the number of samples left after the last sample is tested minus 1 is greater than 0;
[0088] In response to the value of the number of remaining samples to be tested minus 1 after the last sample to be tested is greater than 0, it is determined that there are samples to be tested that have not completed the test;
[0089] In response to the value of the number of remaining samples to be tested minus 1 being equal to 0 after the last sample to be tested has been tested, it is determined that there is no sample to be tested that has not been tested.
[0090] In this embodiment, controlling the sample injection system to clean the pipeline and obtaining a spectrum image of the solvent cleaning the pipeline includes:
[0091] The sampling system is controlled to inject solvent into the ion transmission pipeline at a set speed based on the pipeline cleaning instruction, and a spectrum image of the solvent in the pipeline cleaning is obtained.
[0092] In this embodiment, in step S2, determining the similarity between the spectral image of the solvent and a preset standard spectral image includes:
[0093] Processing the spectrum image of the solvent and the preset standard spectrum image into images of preset sizes respectively, and performing binarization processing on the images of the preset sizes;
[0094] The similarity between the solvent spectrum image and the preset standard spectrum image is calculated based on the grayscale value of the pixel points of the image after binarization processing.
[0095] In this embodiment, the similarity between the spectrum image of the solvent and the preset standard spectrum image is calculated according to the grayscale value of the pixel points of the binary image, including:
[0096] For the spectrum image of the solvent and the standard spectrum image, the number of black pixels in each column of the binary processed image is counted to obtain the black pixel number vector [x1, x2, …, x n ] and [y1,y2,…,y n ];
[0097] Based on the black pixel number vector [x1,x2,…,x n ] and [y1,y2,…,y n ], the similarity between the spectrum image of the solvent and the preset standard spectrum image is calculated by the following expression:
[0098]
[0099] Among them, cosθ is the similarity between the spectrum image of the solvent and the preset standard spectrum image, x i is the number of black pixels in the i-th column of the binary image of the solvent spectrum, y i is the number of black pixels in the i-th column of the standard spectrogram image after binarization.
[0100] In this embodiment, the method further includes:
[0101] In response to the similarity being less than or equal to a preset similarity threshold, counting the cleaning time;
[0102] In response to the cleaning time exceeding the preset time threshold, an alarm signal is issued.
[0103] In this embodiment, the method further includes:
[0104] After issuing a command to continue cleaning the pipeline, the volume of the solvent is monitored in real time during the period when the sampling system is controlled to clean the pipeline;
[0105] In response to the volume of the solvent being less than a preset volume threshold, an alarm signal is issued.
[0106] In this embodiment, in step S4, the control of the sampling plate and the electronic valve of the sampling system to inject the sample to be tested includes:
[0107] Control the injection system to open the injection needle valve and sampling pump, absorb the sample to be tested according to the set parameters, then close the injection needle valve, open the mass spectrometer inlet channel valve, and inject the sample to be tested into the mass spectrometer for testing.
[0108] The injection method of this embodiment is Figure 2 The application process in the injection system shown includes:
[0109] Input the standard spectrum image, set the spectrum similarity threshold, set the number of samples to be tested and the corresponding turntable position, set the single injection flow rate and total flow rate of the solvent, and the single minimum injection volume;
[0110] Before the sample to be tested is injected, the solvent is injected into the mass spectrometer, the spectrum image of the solvent is read, and the similarity between the spectrum image of the solvent and the standard spectrum image is determined, wherein the similarity can be calculated by the following steps:
[0111] The spectrum image of the solvent and the standard spectrum image are respectively reduced to a preset size (m rows × n columns of pixels), and the spectrum image of the preset size is subjected to image binarization processing to remove spectrum details, thereby obtaining the binary processed images of the spectrum image of the solvent and the standard spectrum image;
[0112] The number of black pixels in each column of the binary processed images of the solvent spectrum image and the standard spectrum image are counted respectively. The statistical series of the solvent spectrum image and the standard spectrum image are [x1, x2, …, x n ],[y1,y2,…,y n ], the cosine similarity cosθ of the two statistical series calculated by the following expression is used as the similarity between the spectrum image of the solvent and the standard spectrum image:
[0113]
[0114] Among them, cosθ is the similarity between the spectrum image of the solvent and the preset standard spectrum image, x i is the number of black pixels in the i-th column of the binary image of the solvent spectrum, y i is the number of black pixels in the i-th column of the standard spectrogram image after binarization;
[0115] If the similarity is lower than the preset similarity threshold, the sampling system is controlled to open the injection needle valve, and the sampling pump draws the solvent (toluene, methanol, reagent water, or a mixture of several different concentrations) according to the set parameters (including flow rate and total flow), then closes the injection needle valve, and then opens the mass spectrometer inlet channel valve, and the sampling pump flushes the transmission pipeline according to the set flow rate and total flow, and repeats until the similarity threshold requirement is met. When the flushing time is too long or the solvent volume in the solvent tank is too low, the program alarms and the operator performs troubleshooting.
[0116] If the spectral image of the solvent meets the requirements, the injection system opens the injection needle valve and the sampling pump draws the sample to be tested according to the set parameters, then closes the injection needle valve, opens the mass spectrometer inlet channel valve and injects the sample into the mass spectrometer for testing;
[0117] After a single sample test is completed, the injection needle valve opens, absorbs the solvent and then discharges it into the waste tank through the waste tank valve, completing the injection needle cleaning. The number of samples to be tested is reduced by 1. If there are still samples to be tested, the sampling pump switches to a new sample when the turntable rotates. Continue to determine whether to perform pipeline cleaning based on the similarity between the spectrum image of the current solvent and the preset standard spectrum image, and repeat this process until all samples have completed the test.
[0118] See also Figure 3 , an embodiment of the present disclosure provides a sample injection device, comprising:
[0119] The acquisition module 11 is used to acquire the spectrum image of the solvent used to clean the pipeline before the sample to be tested is injected;
[0120] A first determination module 12 is used to determine the similarity between the spectrum image of the solvent and a preset standard spectrum image;
[0121] The first control module 13 is used for issuing a pipeline cleaning continuing instruction in response to the similarity being less than or equal to a preset similarity threshold, controlling the sampling system to continue cleaning the pipeline, and returning to the step of acquiring a spectrum image of the solvent for cleaning the pipeline;
[0122] The second control module 14 is used for issuing a sample injection instruction in response to the similarity being greater than a preset similarity threshold, controlling the sampling plate and the electronic valve of the injection system to inject the sample to be tested, and testing the sample to be tested.
[0123] In this embodiment, the device further includes:
[0124] A second determination module is used to determine whether there are any samples to be tested that have not been tested after the test of the current sample to be tested is completed according to a preset number of samples to be tested;
[0125] The first control module is further used for: in response to the second determination module determining that there is a sample to be tested that has not completed the test, before the next sample to be tested is injected, issuing a pipeline cleaning instruction to control the injection system to clean the pipeline;
[0126] The acquisition module is used to acquire the spectrum image of the solvent for cleaning the pipeline before the next sample to be tested is injected.
[0127] In this embodiment, the second determining module is specifically configured to:
[0128] After the current sample is tested, the injection needle valve of the injection system is controlled to open, the solvent is sucked and then discharged into the waste tank through the waste tank valve, the injection needle is cleaned, and the number of remaining samples minus 1 after the previous sample is tested is calculated to see whether it is greater than 0;
[0129] In response to the value of the number of remaining samples to be tested minus 1 after the last sample to be tested is greater than 0, it is determined that there are samples to be tested that have not completed the test;
[0130] In response to the value of the number of remaining samples to be tested minus 1 being equal to 0 after the last sample to be tested has been tested, it is determined that there is no sample to be tested that has not been tested.
[0131] In this embodiment, the first control module is specifically used for:
[0132] The control injection system injects solvent into the ion transmission line at a set speed based on the cleaning line instruction to clean the line.
[0133] In this embodiment, the first determining module is specifically configured to:
[0134] Processing the spectrum image of the solvent and the preset standard spectrum image into images of preset sizes respectively, and performing binarization processing on the images of the preset sizes;
[0135] The similarity between the solvent spectrum image and the preset standard spectrum image is calculated based on the grayscale value of the pixel points of the image after binarization processing.
[0136] In this embodiment, the first determining module is specifically configured to:
[0137] For the solvent spectrum image and the standard spectrum image, the number of black pixels in each column of the binary processed image is counted to obtain the black pixel number vector [x1, x2, …, x n ] and [y1,y2,…,y n ];
[0138] Based on the black pixel number vector [x1,x2,…,x n ] and [y1,y2,…,y n ], the similarity between the spectrum image of the solvent and the preset standard spectrum image is calculated by the following expression:
[0139]
[0140] Among them, cosθ is the similarity between the spectrum image of the solvent and the preset standard spectrum image, x i is the number of black pixels in the i-th column of the binary image of the solvent spectrum, y i is the number of black pixels in the i-th column of the standard spectrogram image after binarization.
[0141] In this embodiment, the first control module is further used for:
[0142] In response to the similarity being less than or equal to a preset similarity threshold, counting the cleaning time;
[0143] In response to the cleaning time exceeding a preset time threshold, an alarm signal is issued.
[0144] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0145] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.
[0146] In the above embodiment, any multiple of the acquisition module 11, the first determination module 12, the first control module 13 and the second control module 14 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. At least one of the acquisition module 11, the first determination module 12, the first control module 13 and the second control module 14 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by a proper combination of any of them. Alternatively, at least one of the acquisition module 11, the first determination module 12, the first control module 13 and the second control module 14 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0147] See also Figure 4 , an electronic device provided by an exemplary embodiment of the present disclosure includes a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 communicate with each other through the communication bus 1140;
[0148] Memory 1130, used for storing computer programs;
[0149] The processor 1110 is used to implement the following injection method when executing the program stored in the memory 1130:
[0150] Before the sample to be tested is injected, a spectrum image of the solvent used to clean the pipeline is obtained;
[0151] Determine the similarity between the spectrum image of the solvent and a preset standard spectrum image;
[0152] In response to the similarity being less than or equal to a preset similarity threshold, issuing an instruction to continue cleaning the pipeline, controlling the injection system to continue cleaning the pipeline, and returning to the step of acquiring a spectrum image of the solvent for cleaning the pipeline;
[0153] In response to the similarity being greater than a preset similarity threshold, a sample injection instruction is issued to control the sampling plate and the electronic valve of the injection system to inject the sample to be tested, and the sample to be tested is tested.
[0154] The communication bus 1140 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 1140 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0155] The communication interface 1120 is used for communication between the above electronic device and other devices.
[0156] The memory 1130 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory 1130 may also be at least one storage device located away from the processor 1110.
[0157] The above-mentioned processor 1110 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0158] The embodiment of the present disclosure further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned injection method is implemented.
[0159] The computer-readable storage medium may be included in the device / apparatus described in the above embodiment; or it may exist independently without being assembled into the device / apparatus. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the injection method according to the embodiment of the present disclosure is implemented.
[0160] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0161] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0162] The foregoing is merely a specific embodiment of the present disclosure, which enables those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. A sampling method, characterized in that: The method comprises: Before the sample to be tested is injected, a spectrum image of the solvent used to clean the pipeline is obtained; Determine the similarity between the spectrum image of the solvent and a preset standard spectrum image; In response to the similarity being less than or equal to a preset similarity threshold, issuing an instruction to continue cleaning the pipeline, controlling the injection system to continue cleaning the pipeline, and returning to the step of acquiring a spectrum image of the solvent for cleaning the pipeline; In response to the similarity being greater than a preset similarity threshold, a sample injection instruction is issued to control the sampling plate and the electronic valve of the injection system to inject the sample to be tested, and the sample to be tested is tested.
2. The method according to claim 1, characterized in that After the test of the current sample is completed, the method further includes: According to the preset number of samples to be tested, determine whether there are any samples to be tested that have not completed the test; In response to the presence of a sample to be tested that has not completed the test, before the next sample to be tested is injected, a pipeline cleaning instruction is issued to control the injection system to clean the pipeline, and a spectrum image of the solvent used to clean the pipeline is obtained.
3. The method according to claim 2, characterized in that The step of determining whether there are any samples to be tested that have not completed testing according to the preset number of samples to be tested includes: Control the injection needle valve of the injection system to open, absorb the solvent and discharge it into the waste tank through the waste tank valve, complete the injection needle cleaning, and calculate whether the value of the number of samples left after the last sample is tested minus 1 is greater than 0; In response to the value of the number of remaining samples to be tested minus 1 after the last sample to be tested is greater than 0, it is determined that there are samples to be tested that have not completed the test; In response to the value of the number of remaining samples to be tested minus 1 being equal to 0 after the last sample to be tested has been tested, it is determined that there is no sample to be tested that has not been tested.
4. The method according to claim 2, characterized in that: The control sampling system cleaning pipeline comprises: The control injection system injects solvent into the ion transmission line at a set speed based on the cleaning line instruction to clean the line.
5. The method according to claim 1, characterized in that The determining of the similarity between the spectral image of the solvent and a preset standard spectral image comprises: Processing the spectrum image of the solvent and the preset standard spectrum image into images of preset sizes respectively, and performing binarization processing on the images of the preset sizes; The similarity between the solvent spectrum image and the preset standard spectrum image is calculated based on the grayscale value of the pixel points of the image after binarization processing.
6. The method according to claim 5, characterized in that The method of calculating the similarity between the spectrum image of the solvent and the preset standard spectrum image according to the grayscale value of the pixel points of the binary processed image includes: For the solvent spectrum image and the standard spectrum image, the number of black pixels in each column of the binary processed image is counted to obtain the black pixel number vector [x1, x2, …, x n ] and [y1,y2,…,y n ]; Based on the black pixel number vector [x1,x2,…,x n ] and [y1,y2,…,y n ], the similarity between the spectrum image of the solvent and the preset standard spectrum image is calculated by the following expression: Among them, cosθ is the similarity between the spectrum image of the solvent and the preset standard spectrum image, x i is the number of black pixels in the i-th column of the binary image of the solvent spectrum, y i is the number of black pixels in the i-th column of the standard spectrogram image after binarization.
7. The method according to claim 1, characterized in that The method further comprises: In response to the similarity being less than or equal to a preset similarity threshold, counting the cleaning time; In response to the cleaning time exceeding a preset time threshold, an alarm signal is issued.
8. The method according to claim 1, characterized in that: The method further comprises: After issuing a command to continue cleaning the pipeline, the volume of the solvent is monitored in real time during the period when the sampling system is controlled to clean the pipeline; In response to the volume of the solvent being less than a preset volume threshold, an alarm signal is issued.
9. The method according to claim 1, characterized in that: The control sampling system of the sampling plate and the electronic valve to inject the sample to be tested comprises: Control the injection system to open the injection needle valve and sampling pump, absorb the sample to be tested according to the set parameters, then close the injection needle valve, open the mass spectrometer inlet channel valve, and inject the sample to be tested into the mass spectrometer for testing.
10. A sample injection device, characterized in that: include: An acquisition module, used for acquiring a spectrum image of the solvent used to clean the pipeline before the sample to be tested is injected; A first determination module is used to determine the similarity between the spectrum image of the solvent and a preset standard spectrum image; A first control module is used for, in response to the similarity being less than or equal to a preset similarity threshold, issuing an instruction to continue cleaning the pipeline, controlling the injection system to continue cleaning the pipeline, and returning to the step of acquiring a spectrum image of the solvent for cleaning the pipeline; The second control module is used for issuing a sample injection instruction in response to the similarity being greater than a preset similarity threshold, controlling the sampling plate and the electronic valve of the injection system to inject the sample to be tested, and testing the sample to be tested.
11. The device according to claim 10, characterized in that The device also includes: A second determination module is used to determine whether there are any samples to be tested that have not been tested after the test of the current sample to be tested is completed according to a preset number of samples to be tested; The first control module is further used for: in response to the second determination module determining that there is a sample to be tested that has not completed the test, before the next sample to be tested is injected, issuing a pipeline cleaning instruction to control the injection system to clean the pipeline; The acquisition module is used to acquire the spectrum image of the solvent for cleaning the pipeline before the next sample to be tested is injected.
12. The device according to claim 11, characterized in that The second determining module is specifically used for: After the current sample is tested, the injection needle valve of the injection system is controlled to open, the solvent is sucked and then discharged into the waste tank through the waste tank valve, the injection needle is cleaned, and the number of remaining samples minus 1 after the previous sample is tested is calculated to see whether it is greater than 0; In response to the value of the number of remaining samples to be tested minus 1 after the last sample to be tested is greater than 0, it is determined that there are samples to be tested that have not completed the test; In response to the value of the number of remaining samples to be tested minus 1 being equal to 0 after the last sample to be tested has been tested, it is determined that there is no sample to be tested that has not been tested.
13. The device according to claim 11, characterized in that The first control module is specifically used for: The control injection system injects solvent into the ion transmission line at a set speed based on the cleaning line instruction to clean the line.
14. The device according to claim 10, characterized in that The first determining module is specifically used for: Processing the spectrum image of the solvent and the preset standard spectrum image into images of preset sizes respectively, and performing binarization processing on the images of the preset sizes; The similarity between the solvent spectrum image and the preset standard spectrum image is calculated based on the grayscale value of the pixel points of the image after binarization processing.
15. The device according to claim 14, characterized in that The first determining module is specifically used for: For the solvent spectrum image and the standard spectrum image, the number of black pixels in each column of the binary processed image is counted to obtain the black pixel number vector [x1, x2, …, x n ] and [y1,y2,…,y n ]; Based on the black pixel number vector [x1,x2,…,x n ] and [y1,y2,…,y n ], the similarity between the spectrum image of the solvent and the preset standard spectrum image is calculated by the following expression: Among them, cosθ is the similarity between the spectrum image of the solvent and the preset standard spectrum image, x i is the number of black pixels in the i-th column of the binary image of the solvent spectrum, y i is the number of black pixels in the i-th column of the standard spectrogram image after binarization.
16. The device according to claim 10, characterized in that The first control module is also used for: In response to the similarity being less than or equal to a preset similarity threshold, counting the cleaning time; In response to the cleaning time exceeding a preset time threshold, an alarm signal is issued.
17. The device according to claim 10, characterized in that The first control module is also used for: After issuing a command to continue cleaning the pipeline, the volume of the solvent is monitored in real time during the period when the sampling system is controlled to clean the pipeline; In response to the volume of the solvent being less than a preset volume threshold, an alarm signal is issued.
18. The device according to claim 10, characterized in that The second control module is specifically used for: Control the injection system to open the injection needle valve and sampling pump, absorb the sample to be tested according to the set parameters, then close the injection needle valve, open the mass spectrometer inlet channel valve, and inject the sample to be tested into the mass spectrometer for testing.
19. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the sampling method according to any one of claims 1 to 9 when executing the program stored in the memory.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the sampling method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Gas chromatography-mass spectrogram retrieval method based on vector model
CN104572910A
Method of testing cleaning degree of equipment
CN106896165A
Method for detecting residues of tableware detergent after rinsing
CN111024464A
Sampling pretreatment method, spectrum detection equipment and storage medium
CN115452734A
Method of judging end of cleaning treatment and device for the cleaning treatment
US20040238005A1