Detection liquid medicine sampling method
Patent Information
- Application Number
- CN202510216966.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-07-22
AI Technical Summary
[0005]针对现有技术的不足,本发明提供了一种检测药液取样方法,解决了未根据其药液的原始特征,在对应容器内进行分层取样的问题
[0021]The present invention generates a container model by using machine vision to perform multi-directional scanning on the container containing the liquid medicine, confirming the contour and center point of the scanned image based on the Sobel algorithm. This can not only intuitively present the shape and structure of the container, but also accurately divide the areas of different components in the container according to the model, determine the sampling calibration line, making the determination of the sampling position more scientific and accurate, and greatly improving the pertinence and accuracy of the sampling operation;
Smart Images

Figure CN120352190A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of liquid medicine sampling, and specifically to a method for detecting liquid medicine sampling. Background Art
[0002] The test liquid medicine is a kind of liquid reagent used for detecting, analyzing, and identifying the properties or contents of substances in multiple fields such as medicine, chemical industry, and food; it is widely used in scenarios such as drug quality control, environmental monitoring, and food safety detection, and plays a key role in ensuring product quality, maintaining public health and safety.
[0003] The application with the publication number CN117405463B discloses a sampling device and method for a liquid preparation tank in a biological laboratory; when the existing liquid preparation tank sampling device is used, it will increase the risk of liquid medicine oxidation, resulting in inaccurate data for sampling detection, thereby reducing the accuracy of the detection result; including support legs, several of the support legs are jointly connected to the liquid preparation tank, and a stirring efficiency improvement component is arranged on the liquid preparation tank; the stirring efficiency improvement component includes a connecting clamp seat arranged on the liquid preparation tank, two of the connecting clamp seats are jointly connected to a stirring motor, a stirring gear is installed on the output end of the stirring motor, the stirring gear is meshed with a rotating gear, and a rotating groove is arranged on the rotating gear, and the rotating groove is slidably connected with a rotating shaft; through the multi-point sampling unit, it can avoid the risk of liquid medicine oxidation caused by the contact of the liquid medicine in the liquid preparation tank with the outside world during sampling, so that the data of sampling detection is accurate and the accuracy of the detection is improved.
[0004] During the sampling process of the test liquid medicine, generally, the test liquid medicine to be sampled needs to be stirred in advance to mix various components inside the test liquid medicine, and then sampling is carried out. However, in the original such sampling method, due to the uncertainty during the stirring process, there will be a large deviation in the component ratio inside the sampled liquid medicine, and stratified sampling is not carried out in the corresponding container according to the original characteristics of the liquid medicine to ensure the accuracy of the corresponding sampled liquid medicine. Summary of the Invention
[0005] Aiming at the deficiencies of the prior art, the present invention provides a method for detecting liquid medicine sampling, which solves the problem of not carrying out stratified sampling in the corresponding container according to the original characteristics of the liquid medicine.
[0006] To achieve the above objectives, the present invention is realized through the following technical solutions: A method for detecting liquid medicine sampling includes the following steps:
[0007] Step 1: Confirm the internal components of the test liquid medicine, lock the component masses associated with the corresponding components based on the relevant molecular formulas associated with the corresponding components, and sort multiple groups of different components based on the locked component masses of different components to generate a component sorting set. The specific sub-steps are as follows:
[0008] S11. Calibrate different components associated with the test liquid medicine as CF i , where i represents different components. Based on the molecular formula associated with the corresponding component CF i , combined with the preset molecular mass table, confirm the total molecular mass associated with the corresponding molecular formula, and calibrate the confirmed total molecular mass as ZL i ;
[0009] S12. Based on the different ZL associated with different components in the test liquid medicine i , sort the associated components in ascending order of value, and confirm the component sorting set for this test liquid medicine;
[0010] Step 2. Conduct a visual scan of the container holding the test liquid medicine, confirm the multi-directional scan images of this container, and by confirming the image contour and the internal center point of the corresponding multi-directional scan images, combine the confirmed multi-directional scan images to generate a container model belonging to this container. The specific sub-steps are as follows:
[0011] S21. According to the preset scan angles, confirm the multi-directional scan images associated with the corresponding angles, and conduct contour confirmation on the confirmed multi-directional scan images. Use the Sobel algorithm to confirm the horizontal gradient and vertical gradient associated with the corresponding pixel points in the corresponding scan images, and lock the comprehensive gradient associated with the corresponding pixel points based on the associated horizontal gradient and vertical gradient. Calibrate the pixel points that satisfy the comprehensive gradient > Y1 as gradient pixel points, where Y1 is a preset value, and do not perform any calibration on the pixel points that do not satisfy the comprehensive gradient > Y1;
[0012] S22. Based on several groups of gradient pixel points confirmed from the corresponding multi-directional scan images, confirm the edge contour associated with the corresponding scan image, and confirm the center point inside this edge contour through a two-dimensional coordinate system. Then, based on the edge contours and center points confirmed from several multi-directional scan images, combine several groups of multi-directional scan images to confirm a set of model bodies, and then confirm the volume parameter of this model body, and calibrate the confirmed volume parameter of this model body as R k , where k represents different containers;
[0013] Step 3. Based on the volume ratio associated with the corresponding components of the test liquid medicine, confirm the specific areas where the corresponding components are located in the container model, and then select sampling calibration lines from the confirmed specific areas. The specific sub-steps are as follows:
[0014] S31. According to the ingredient ratio table associated with the corresponding test liquid medicine, where the ingredient ratio table is a preset table, confirm the volume values associated with the corresponding ingredients. Then, based on the confirmed ingredient sorting set, re - sort the volume values of different ingredients according to the sorting method of the ingredient sorting set to confirm the volume value sorting set;
[0015] S32. Based on the confirmed volume value sorting set, first confirm the container area associated with the last group of volume values in the container model, and determine the middle value of the height of this container area. Denote the horizontal line associated with this middle value as the sampling calibration line of this container area. After the first - group container area is confirmed, then, based on the penultimate - group volume value in this set, confirm another group of container areas above the first - group container area, and confirm the middle value of the height of the corresponding container area, so as to lock the second - group sampling calibration line. And so on, confirm one by one the container areas associated with the volume value sorting set in the container model, and calibrate one by one the associated sampling calibration lines;
[0016] S33. Record the position of the sampling calibration line in the container model, and at the same time record the specific position of the corresponding container area;
[0017] Step 4. Control the sampling needle to take samples, monitor the sampling process in real - time, based on the volume growth value associated with the sampling process, change the originally calibrated sampling calibration line, and take samples from the specified container area. The specific method is as follows:
[0018] S41. Based on the machine vision device, confirm the arrival area of the corresponding sampling needle, make the sampling needle reach the position where the calibrated sampling calibration line is located. First, take samples from the uppermost container area calibrated in the container model, confirm the specific volume of the sampling needle in this container area, denote the confirmed specific volume as the volume growth value, and increase it to this arrival area. Then, confirm the height of this arrival area again, so as to lock the sampling calibration line. Then, readjust the sampling needle and take samples at the position of the locked sampling calibration line. The volume parameter of the sampling is the set value;
[0019] S42. After sampling from the last - sampled container area, use the same method as in step S41 to sample the lower - level container area. And so on, sample the subsequent container areas that appear in turn until sampling from the lowermost container area is completed and then stop.
[0020] The present invention provides a method for sampling test liquid medicine. Compared with the prior art, it has the following beneficial effects:
[0021] The present invention generates a container model by using machine vision to perform multi-directional scanning on the container containing the liquid medicine, confirming the contour and center point of the scanned image based on the Sobel algorithm. This can not only intuitively present the shape and structure of the container, but also accurately divide the areas of different components in the container according to the model, determine the sampling calibration line, making the determination of the sampling position more scientific and accurate, and greatly improving the pertinence and accuracy of the sampling operation;
[0022] During the sampling process, the position of the sampling needle and the growth value of the sampling volume are monitored in real time based on the machine vision device, and the sampling calibration line is dynamically adjusted; at the same time, the PLC controller controls the hydraulic telescopic rod to drive the sampling needle to move according to the container model, realizing the accurate locking of the sampling area and the standard line, and completing the automatic sampling operation; this intelligent and automated control method reduces the interference of human factors, ensures the stability and accuracy of the sampling process, and meets the diverse sampling needs of different test liquid medicines. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic flow chart of the method of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0024] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0025] Please refer to Figure 1 , the present application provides a method for sampling test liquid medicine, including the following steps:
[0026] Step 1: Confirm the internal components of the test liquid medicine, lock the component mass associated with the corresponding component based on the relevant molecular formula associated with the corresponding component, and sort multiple groups of different components based on the locked component masses of different components to generate a component sorting set. Specifically, each different component has a corresponding chemical molecular formula, and each different molecule has a preset molecular mass, so that the total molecular mass associated with the corresponding component can be locked. When the test liquid medicine is placed inside the container for a long time, due to the different molecular masses of the internal components, sedimentation will occur, resulting in a large error in the sampling accuracy during sampling. Therefore, it is necessary to perform layer-by-layer analysis and confirmation based on the molecular mass of the components;
[0027] Among them, the specific sub-steps for generating the component sorting set are:
[0028] S11: Calibrate the different components associated inside the test liquid medicine as CF i, where i represents different components, based on the corresponding component CF i associated molecular formula, combined with the preset molecular mass table, confirm the total molecular mass associated with the corresponding molecular formula, and label the confirmed total molecular mass as ZL i ;
[0029] S12. Based on the different ZLs associated with different components in the test liquid i , sort the associated components in ascending order of values, confirm the component sorting set for this test liquid. Suppose there are three components in a group of test liquids, namely water (H2O), sodium chloride (NaCl), and glucose (C6H 12 O6). The atomic mass of H is 1, and the atomic mass of O is 16. Therefore, the molecular mass of the confirmed water (H2O) is 18. The atomic mass of sodium is 23, and the atomic mass of chlorine is 35.5. The total molecular mass of the confirmed sodium chloride is 58.5. For glucose, the atomic mass of C is 12, the atomic mass of H is 1, and the atomic mass of O is 16. Therefore, the total molecular mass of the confirmed glucose is 180;
[0030] Step 2. Conduct a visual scan on the container containing the test liquid, confirm the multi-directional scan images of this container, and combine the confirmed multi-directional scan images by confirming the image contour and the internal center point of the corresponding multi-directional scan images to generate a container model for this container. The specific sub-steps for generating the container model are as follows:
[0031] S21. According to the preset scan angles, confirm the multi-directional scan images associated with the corresponding angles, and conduct contour confirmation on the confirmed multi-directional scan images. Use the Sobel algorithm to confirm the horizontal gradient and vertical gradient associated with the corresponding pixel points in the corresponding scan images, and lock the comprehensive gradient associated with the corresponding pixel points based on the associated horizontal gradient and vertical gradient. Label the pixel points that satisfy the comprehensive gradient > Y1 as gradient pixel points, where Y1 is a preset value, and its specific value is determined by the operator according to experience. Do not perform any calibration on the pixel points that do not satisfy the comprehensive gradient > Y1;
[0032] S22. Based on several groups of gradient pixel points confirmed from the corresponding multi-directional scanned images, confirm the edge contour associated with the corresponding scanned image, and through a two-dimensional coordinate system, confirm the central point inside this edge contour (there are several contour points inside the edge contour, and the contour points correspond to different point coordinates. Perform an average value process on several groups of point coordinates associated with the corresponding edge contour to confirm the average coordinate. Based on the confirmed average coordinate, the corresponding central point can be locked inside the edge contour, and thus the determined central point is the central point associated with the corresponding scanned image). Then, based on the edge contours and central points confirmed from several multi-directional scanned images, combine several groups of multi-directional scanned images to confirm a set of model bodies, then confirm the volume parameter of this model body, and calibrate the confirmed volume parameter of this model body as R k , where k represents different containers;
[0033] During the visual scanning process of its machine vision terminal, there will be multiple visual images in different directions. Each visual image can confirm the corresponding image contour and the associated central point. Based on the confirmed central point and the visual images at the corresponding angles, several groups of visual images can be integrated, and thus several groups of visual images can be combined into the corresponding container model. The visual image associated with the container model at the corresponding direction is consistent with the confirmed visual image.
[0034] Step 3. Based on the volume ratio associated with the detected liquid medicine components, confirm the specific area where the corresponding components are located inside the container model, and then select a sampling calibration line from the confirmed specific area. The specific sub-steps for selecting the sampling calibration line are as follows:
[0035] S31. According to the component ratio table associated with the corresponding detected liquid medicine, and the component ratio table is a preset table, confirm the volume value associated with the corresponding component. Then, based on the confirmed component sorting set, re-sort the volume values of different components according to the sorting method of the component sorting set to confirm the volume value sorting set;
[0036] S32. Based on the confirmed volume value sorting set, first confirm the container area associated with the last group of volume values in this set inside the container model, and determine the middle value of the height of this container area. Denote the horizontal line associated with this middle value as the sampling calibration line of this container area (the horizontal line is parallel to the bottom plane of the container model). After the first group of container areas are confirmed, then based on the penultimate group of volume values in this set, confirm another group of container areas above the first group of container areas, and confirm the middle value of the height of the corresponding container area, thereby locking the second group of sampling calibration lines. And so on, confirm one by one the container areas associated with the volume value sorting set inside the container model, and calibrate one by one the associated sampling calibration lines;
[0037] S33. Record the position of the sampling calibration line within the container model, and also record the specific position of the corresponding container area.
[0038] To facilitate the specific sampling process, during the sampling process, place the corresponding sampling needle at the corresponding sampling calibration line for sampling to ensure the sampling accuracy of the corresponding liquid medicine and achieve a more accurate confirmation effect.
[0039] Step 4. Control the sampling needle to perform sampling, monitor the sampling process in real time, change the originally calibrated sampling calibration line based on the volume growth value associated with the sampling process, and sample the specified container area. The specific sampling method is as follows:
[0040] S41. Based on the machine vision device, confirm the arrival area of the corresponding sampling needle, make the sampling needle reach the position where the calibrated sampling calibration line is located, first sample the uppermost container area calibrated within the container model, confirm the specific volume of the sampling needle in this container area, record the confirmed specific volume as the volume growth value, and increase it to this arrival area based on this volume growth value, and then confirm the height of this arrival area again, so as to lock the sampling calibration line, and then readjust the sampling needle to perform sampling at the locked sampling calibration line position. The sampling volume parameter is a set value. For different components, the specific volume parameters to be collected are all preset values, which are set in advance by the operator.
[0041] S42. After sampling the uppermost container area last time, sample the lower container area in the same way as in step S41, and so on, sample the subsequent container areas that appear in turn, and stop when sampling the lowermost container area is completed.
[0042] Specifically, the sampling needle is driven by the corresponding hydraulic telescopic rod to move, and is controlled by a specific PLC controller. The controller locks the specific sampling area and the sampling standard line according to the determined container model, and then performs actual sampling. According to the preset sampling parameters, the overall sampling process of the corresponding test liquid medicine is completed.
[0043] Some of the data in the above formula are numerically calculated after removing their dimensions, and the content not described in detail in this specification belongs to the prior art well-known to those skilled in the art.
[0044] The above embodiments are only used to illustrate the technical method of the present invention and not to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical method of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A method for sampling liquid medicine, characterized in that, It includes the following steps: Step 1: Confirm the internal components of the test liquid medicine. Based on the relevant molecular formulas associated with the corresponding components, lock the component masses associated with the corresponding components. And based on the locked component masses of different components, sort multiple groups of different components to generate a component sorting set; Step 2: Conduct a visual scan of the container holding the test liquid medicine, confirm the multi-directional scan images of this container, and combine the confirmed multi-directional scan images by confirming the image contours and internal center points of the corresponding multi-directional scan images to generate a container model belonging to this container; Step 3: Based on the volume ratio associated with the corresponding components of the test liquid medicine, confirm the specific areas where the corresponding components are located in the container model, and then select a sampling calibration line from the confirmed specific areas; Step 4: Control the sampling needle to take samples, monitor the sampling process in real time, change the originally calibrated sampling calibration line based on the volume growth value associated with the sampling process, and take samples from the specified container area.
2. The method for sampling a liquid medicine for detection according to claim 1, wherein In the said Step 1, the specific sub-steps for generating the component sorting set are: S11. Calibrate different components associated with the detection liquid medicine as CF i , where i represents different components. Based on the molecular formula associated with the corresponding component CF i , combined with the preset molecular mass table, confirm the total molecular mass associated with the corresponding molecular formula, and calibrate the confirmed total molecular mass as ZL i ; S12. Based on different ZLs associated with different components in the detected liquid medicine i , sort the associated components in ascending order of values to confirm the component sorting set for this detected liquid medicine.
3. The method for detecting liquid medicine sampling according to claim 1, wherein In the said Step 2, the specific sub-steps for generating the container model are: S21. According to a preset scanning angle, confirm the multi-directional scanning images associated with the corresponding angle, and perform contour confirmation on the confirmed multi-directional scanning images. Use the Sobel algorithm to confirm the horizontal gradient and vertical gradient associated with the corresponding pixel points in the corresponding scanning images, and lock the comprehensive gradient associated with the corresponding pixel points based on the associated horizontal gradient and vertical gradient. Among them, Calibrate the pixel points that satisfy the comprehensive gradient > Y1 as gradient pixel points, where Y1 is a preset value; S22. Based on several sets of gradient pixel points confirmed from corresponding multi-directional scanned images, confirm the edge contour associated with the corresponding scanned image, and confirm the center point inside this edge contour through a two-dimensional coordinate system. Then, based on the edge contours and center points confirmed from several multi-directional scanned images, combine several sets of multi-directional scanned images to confirm a set of model bodies. Next, confirm the volume parameter of this model body, and calibrate the confirmed volume parameter of this model body as R k , where k represents different containers.
4. A method for sampling a liquid medicine for detection according to claim 3, characterized in that, In the said step S21, no calibration is performed on the pixel points that do not meet the comprehensive gradient > Y1.
5. A method for sampling a liquid medicine for detection according to claim 1, characterized in that, In the said Step 3, the specific sub-steps for selecting the sampling calibration line are: S31: According to the component ratio table associated with the corresponding test liquid medicine, which is a preset table, confirm the volume values associated with the corresponding components. Then, based on the confirmed component sorting set, re-sort the volume values of different components according to the sorting method of the component sorting set to confirm the volume value sorting set; S32: Based on the confirmed volume value sorting set, first confirm the container area associated with the last group of volume values in this set within the container model, and determine the middle value of the height of this container area. Denote the horizontal line associated with this middle value as the sampling calibration line of this container area. After the first group of container areas are confirmed, then based on the penultimate group of volume values in this set, confirm another group of container areas above the first group of container areas, and confirm the middle value of the height of the corresponding container area, so as to lock the second sampling calibration line. And so on, confirm one by one the container areas associated with the volume value sorting set within the container model, and calibrate one by one the associated sampling calibration lines; S33: Record the position of the sampling calibration line within the container model, and at the same time record the specific position of the corresponding container area.
6. The method for sampling a liquid medicine for detection according to claim 1, wherein In the said Step 4, the specific way of taking samples is: S41: Based on the machine vision device, confirm the arrival area of the corresponding sampling needle, make the sampling needle reach the position where the calibrated sampling calibration line is located, first take samples from the uppermost container area calibrated within the container model, confirm the specific volume of the sampling needle in this container area, denote the confirmed specific volume as the volume growth value, and increase this volume growth value to this arrival area, and then confirm the height of this arrival area again, so as to lock the sampling calibration line, and then readjust the sampling needle, and take samples at the locked sampling calibration line position, and the volume parameter of the sampling is the set value; S42. After the sampling of the last container area is completed, sample the container area below in the same manner as in step S41, and so on, sample the subsequent container areas that appear in sequence, and stop when the sampling of the lowermost container area is completed.
Citation Information
Patent Citations
A sampling device and method for a pharmaceutical preparation tank in a biological laboratory
CN117405463B