Sample positioning method and device, sample detection equipment and storage medium
By identifying the position of the swab in the sample tube and adjusting the suction position of the pipette head, the problem of the swab being taken out or blocked when the pipette head is absorbed is solved, achieving higher sample detection accuracy and safety sex.
Patent Information
- Application Number
- CN202411301856.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-20
AI Technical Summary
During the automated sample detection process, the pipette tip is prone to take out the swab when sucking liquid samples, resulting in increased environmental pollution and operator infection risk, or the pipette tip is blocked by the swab, affecting the accuracy of the detection.
Use a camera to collect the sample tube image, identify the swab position, and calculate the distance between the swab position and the preset suction position. If the distance is less than the preset value, control the pipetting head to avoid the swab being taken out. , make sure that the distance between the suction position and the swab is greater than or equal to the preset distance, and avoid touching.
It improves the accuracy and safety of sample absorption, reduces the risks of sample pollution and environmental pollution, reduces the infection risk of operators, and enhances the accuracy and efficiency of sample detection.
Smart Images

Figure CN119165185A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical detection technology, and in particular to a sample positioning method, device, sample detection equipment and storage medium. Background Art
[0002] With the development of automation technology, more and more links in sample testing are beginning to be replaced by automated instruments, which not only improves the accuracy and work efficiency of testing, but also effectively reduces the risk of infection for personnel. However, in the process of extracting samples from purified swabs by automated instruments, when the pipette performs sampling and addition operations on the sample tube, the pipette tip may be inserted into the swab when probing downward, or the pipette tip may absorb the swab during the sampling process, causing the swab to be taken out and causing environmental pollution, increasing the risk of infection for operators, or the pipette tip may be blocked by the swab, etc. Therefore, how to accurately absorb samples has become a problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present application disclose a sample positioning method, device, sample detection equipment and storage medium, which can prevent the pipette head from bringing out the swab when sucking the liquid sample, thereby improving the accuracy of the pipette head sucking the liquid sample.
[0004] In a first aspect, an embodiment of the present application discloses a sample positioning method, which is applied to a sample detection device, wherein the sample detection device includes a camera, a pipetting device, and a placement component, wherein the placement component is used to place a sample tube; a liquid sample and a swab are stored in the sample tube; the camera is arranged above the placement component; the pipetting device includes a pipetting head, wherein the pipetting head is used to extend into the sample tube to absorb the liquid sample; the method includes:
[0005] Acquire a sample tube image obtained by acquiring an image of the sample tube by the camera;
[0006] Identifying a sample tube in the sample tube image to determine a swab position of a swab in the sample tube;
[0007] Calculating a first distance between the swab position and a preset liquid aspiration position; the preset liquid aspiration position is a position where the pipette head extends into the sample tube to aspirate the liquid sample;
[0008] If the first distance is greater than or equal to a preset distance, controlling the pipetting head to extend into the sample tube to absorb the liquid sample;
[0009] If the first distance is less than the preset distance, the pipetting head is controlled to move, and the moved pipetting head is controlled to extend into the sample tube to absorb the liquid sample; the distance between the aspiration position of the moved pipetting head and the swab position is greater than or equal to the preset distance.
[0010] As an optional embodiment, in the first aspect of the embodiment of the present application, if the first distance is less than the preset distance, the pipetting head is controlled to move, including: if the first distance is less than the preset distance, obtaining the avoidance distance range and the displaceable range corresponding to the pipetting head; wherein the avoidance distance range refers to the distance range in which the aspiration position of the pipetting head in the sample tube will not collide with the swab when the swab is at the edge of the sample tube; the displaceable range refers to the aspiration range of the pipetting head in the sample tube; according to the displaceable range, the swab position and the avoidance distance range, determining the target offset point within the displaceable range, the target offset point being an offset point whose distance from the swab position is within the avoidance distance range; controlling the pipetting head to move to the target offset point.
[0011] As an optional embodiment, in a first aspect of an embodiment of the present application, the placement component is used to place N sample tubes; the pipetting device includes N pipetting heads; the N sample tubes correspond one-to-one to the N pipetting heads, and N is a positive integer; the sample tubes in the sample tube image are identified to determine the swab position of the swab in the sample tube, including: identifying the sample tubes in the sample tube image to determine the sample tube centers corresponding to the N sample tubes, and the swab positions of the swabs in each sample tube relative to the sample tube center; if the first distance is greater than or equal to the preset distance, controlling the pipetting head to extend into the sample tube to absorb the liquid sample, including: if the first distances between the preset aspiration position and the swab positions corresponding to the N sample tubes are both greater than is greater than or equal to the preset distance, controlling the N pipetting heads to extend into the corresponding sample tubes respectively to absorb liquid samples; if the first distance is less than the preset distance, controlling the pipetting heads to move, including: if there is a first distance between the preset aspiration position and the swab position corresponding to any sample tube that is less than the preset distance, obtaining the avoidance distance range and the deflectable range corresponding to the pipetting head; according to the N swab positions, the avoidance distance range and the deflectable range, calculating a common offset point within the deflectable range, and taking the common offset point as the target offset point, the common offset point being an offset point whose distances from the N swab positions are greater than or equal to the same avoidance distance, and the same avoidance distance is within the avoidance distance range; controlling the N pipetting heads to move to the target offset point.
[0012] As an optional implementation, in the first aspect of the embodiment of the present application, the calculation of the common offset point within the deflectable range according to the N swab positions, the avoidance distance range and the deflectable range includes: determining the current avoidance distance within the avoidance distance range according to the first step length and the previous avoidance distance; determining the current offset point within the deflectable range according to the second step length and the previous offset point; respectively calculating the second distances between the current offset point and the N swab positions, and if each of the second distances is greater than or equal to the current avoidance distance, taking the current offset point as the common offset point; and if there is at least one If the second distance is less than the current avoidance distance, the current offset point is taken as the previous offset point, and the step of determining the current offset point within the deflectable range according to the second step length and the previous offset point is re-executed; if within the deflectable range, there is no offset point whose second distances with the N swab positions are greater than or equal to the current avoidance distance, the current avoidance distance is taken as the previous avoidance distance, and the step of determining the current avoidance distance within the avoidance distance range according to the first step length and the previous avoidance distance is re-executed until a common offset point corresponding to the N pipetting heads is obtained or it is determined that the common offset point does not exist.
[0013] As an optional implementation, in the first aspect of the embodiment of the present application, determining the current avoidance distance within the avoidance distance range according to the first step length and the previous avoidance distance includes:
[0014] Within the avoidance distance range, starting from the maximum avoidance distance, in order of avoidance distances from large to small, the previous avoidance distance is subtracted from the first step length to obtain the current avoidance distance; within the deflectable range, the current offset point is determined according to the second step length and the previous offset point, including: within the deflectable range, starting from the minimum offset point, in order of the horizontal coordinates of the offset points from small to large, the horizontal coordinate of the previous offset point is added with the second step length to obtain the horizontal coordinate of the current offset point; the horizontal coordinate of the minimum offset point is the minimum value of the deflectable range.
[0015] As an optional implementation, in the first aspect of the embodiment of the present application, the method further includes: if it is determined that the common offset point does not exist, then respectively calculating the target offset points corresponding to the N pipetting heads, and controlling the N pipetting heads to move to the corresponding target offset points respectively.
[0016] As an optional embodiment, in the first aspect of the embodiment of the present application, the avoidance distance range is determined based on the diameter of the sample tube, the radius of the swab and the radius of the pipette head; the deflectable range is determined based on the radius of the sample tube and the radius of the pipette head.
[0017] In the second aspect, the embodiment of the present application discloses a sample positioning device, wherein the sample detection device comprises a camera, a pipetting device and a placement component, wherein the placement component is used to place a sample tube; a liquid sample and a swab are stored in the sample tube; the camera is arranged above the placement component; the pipetting device comprises a pipetting head, wherein the pipetting head is used to extend into the sample tube to absorb the liquid sample; the device comprises:
[0018] An image acquisition module, used to acquire an image of the sample tube obtained by the camera acquiring an image of the sample tube;
[0019] a position determination module, used for identifying the sample tube in the sample tube image to determine the swab position of the swab in the sample tube;
[0020] A distance calculation module, used for calculating a first distance between the swab position and a preset liquid aspiration position; the preset liquid aspiration position is a position where the pipette head extends into the sample tube to aspirate the liquid sample;
[0021] A control module is used to control the pipetting head to extend into the sample tube to absorb the liquid sample if the first distance is greater than or equal to a preset distance; and to control the pipetting head to move and control the moved pipetting head to extend into the sample tube to absorb the liquid sample if the first distance is less than the preset distance; the distance between the aspiration position of the moved pipetting head and the swab position is greater than or equal to the preset distance.
[0022] In a third aspect, an embodiment of the present application discloses a sample detection device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method described in any of the above embodiments.
[0023] In a fourth aspect, an embodiment of the present application discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
[0024] The sample positioning method, device, sample detection equipment and storage medium disclosed in the embodiments of the present application obtain a sample tube image obtained by a camera collecting an image of the sample tube; identify the sample tube in the sample tube image to determine the swab position of the swab in the sample tube; calculate the first distance between the swab position and the preset liquid aspiration position; the preset liquid aspiration position is the position where the pipette head extends into the sample tube to aspirate the liquid sample; if the first distance is greater than or equal to the preset distance, the pipette head is controlled to extend into the sample tube to aspirate the liquid sample; if the first distance is less than the preset distance, the pipette head is controlled to move, and the moved pipette head is controlled to extend into the sample tube to aspirate the liquid sample; the distance between the aspiration position of the moved pipette head and the swab position is greater than or equal to the preset distance. In an embodiment of the present application, an image of the sample tube is captured by a camera, and the position of the swab in the sample tube is automatically identified through the image of the sample tube. The first distance between the swab position and the preset liquid aspiration position can be calculated. If the first distance is less than the preset distance, it means that there is a risk of bringing out the swab when the pipette head absorbs the liquid sample according to the preset liquid aspiration position. The movement of the pipette head can be controlled so that the distance between the liquid aspiration position corresponding to the moved pipette head and the swab position is greater than or equal to the preset distance. The liquid aspiration position of the pipette head in the sample tube can be accurately controlled to avoid the pipette head touching the swab when it is inserted into the sample tube to absorb the liquid sample, thereby preventing the sample from being contaminated by the sample. Accurate aspiration of liquid samples is achieved, thereby improving the accuracy and safety of sample detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1a is a schematic diagram of the structure of a sample detection device in one embodiment;
[0027] Figure 1b A schematic diagram of a sample tube, a swab position, and a corresponding aspiration position of a pipetting head in one embodiment;
[0028] Figure 2 is a flow chart of a sample positioning method in one embodiment;
[0029] Figure 3a A flow chart of controlling the movement of a pipetting head in one embodiment;
[0030] Figure 3b A schematic diagram of an embodiment when the minimum avoidance distance is taken;
[0031] Figure 3cA schematic diagram of an embodiment when the maximum avoidance distance is taken;
[0032] Figure 3d A schematic diagram of the deflectable range when the pipetting head moves only in the diameter direction of the sample tube in one embodiment;
[0033] Figure 4 A flow chart of a sample positioning method in another embodiment;
[0034] Figure 5 A flowchart of calculating a common offset point within an offsettable range in one embodiment;
[0035] Figure 6 is a block diagram of a sample positioning device in one embodiment;
[0036] Figure 7 FIG. 4 is a structural block diagram of a sample detection device in an embodiment. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0039] It is understood that the terms "first", "second", etc. used in this application can be used in this article to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first step length can be referred to as a second step length, and similarly, a second step length can be referred to as a first step length. Both the first step length and the second step length are step lengths, but they can be the same step length or different step lengths.
[0040] In the related art, the pipetting device is generally operated manually. The swab position in the sample tube is first determined by the human eye, and then the pipette head is manually inserted into the sample tube to the pipetting position where it will not touch the swab, and the pipette head is controlled to absorb the liquid sample in the sample tube. However, since the sizes of the sample tube, the swab and the pipette head are not large, and hand shaking is prone to manual pipetting, and manual fatigue is prone to occur after repeating the same operation for a long time, the manual operation of the pipette device to absorb liquid samples cannot guarantee the accuracy of the absorbed samples. Due to various subjective or objective factors, the pipette head is prone to touch the swab, causing the swab to be taken out and cause environmental pollution, or the pipette head is blocked, thereby causing sample contamination, environmental pollution, operator infection, etc., which can not only fail to guarantee the safety of the operation, but also reduce the efficiency of the entire sample detection process.
[0041] The embodiments of the present application disclose a sample positioning method, device, sample detection equipment and storage medium, which can avoid contact with the swab when aspirating a liquid sample, thereby ensuring the accuracy of sample aspiration.
[0042] The sample positioning method provided in this application can be applied to Figure 1a In the sample detection device 100 shown. Figure 1a As shown, the sample detection device 100 may include a camera 110, a liquid transfer device 120, and a placement component 130. The placement component 130 is used to place a sample tube 140, in which a liquid sample and a swab 150 are stored; the camera 110 is arranged above the placement component 130, and is used to take a bird's-eye view of the sample tube 140 in the placement component 130; the liquid transfer device 120 includes a liquid transfer head 160, and the liquid transfer head 160 is used to extend into the sample tube 140 to absorb the liquid sample.
[0043] The shooting field of the camera 110 is from top to bottom toward the placement component 130 to take a bird's-eye view of the sample tube 140, so that the camera 110 can capture a sample tube image of the sample tube 140, which includes the swab position of the swab 150 and the corresponding aspiration position of the pipette head 160.
[0044] Optionally, the camera 110 may be located at the center of the liquid aspiration of the pipetting head 160, and move with the movement of the pipetting head 160, so that the corresponding liquid aspiration position of the pipetting head 160 is centered in the collected sample tube image. Optionally, the camera 110 may also be fixed at a position corresponding to the placement component 130 in the pipetting device 120, and will not move with the movement of the pipetting head 160, so that the sample tube 140 is always fixed at the center of the collected sample tube image. Optionally, the camera 110 may also be located at any position of the pipetting device 120 above the placement component 130 to photograph at least one sample tube placed in the placement component 130, so that at least one sample tube can be included in one sample tube image.
[0045] In some embodiments, the sample detection device 100 can determine the swab position of the swab 150 in the sample tube 140 according to the sample tube image captured by the camera 110, and map the swab position of the swab 150 in the sample tube 140 to the XX coordinate system, and can also map the corresponding aspiration position of the pipetting device 120 to the XX coordinate system. The XX coordinate system can be a plane coordinate system corresponding to the sample tube 140, and the following can be obtained: Figure 1b As shown in the schematic diagram, the swab position of the swab 150 and the aspiration position corresponding to the pipetting head 160 of the pipetting device 120 are both located within the plane diameter range of the sample tube 140. Therefore, in order to allow the sample tube 140 to simultaneously accommodate the swab position of the swab 150 and the aspiration position corresponding to the pipetting head 160, and to prevent the swab 150 and the pipetting head 160 from touching each other, the diameter of the sample tube 140 must be greater than the sum of the radius of the swab 150 and the radius of the pipetting head 160. The minimum avoidance distance is the distance at which the pipetting head 160 does not touch the swab 150 when aspirating the liquid sample.
[0046] Optionally, the liquid aspiration position corresponding to the pipetting head 160 of the pipetting device 120 needs to be within the sample tube 140, so the sample detection device 100 can limit the moving position or direction of the pipetting head 160. Specifically, the pipetting head 160 can move in a first direction, and the first direction can be as follows: Figure 1b The direction is shown by the dashed line.
[0047] In some embodiments, the placement component 130 may include a clamping component for clamping the sample tube 140, and the clamping component may include but is not limited to a robotic arm, a spring clamp, a pneumatic or electric clamp, etc.; alternatively, the placement component 130 may include a groove that matches the shape of the sample tube 140 to ensure that the sample tube 140 can be accurately placed therein; the placement component 130 may also include other components that can place sample tubes, which are not limited here.
[0048] In some embodiments, the placement component 130 of the sample detection device 100 can also be used to place a sample storage tube (not shown). The sample storage tube corresponds to the sample tube 140 one by one and is adjacent to the corresponding sample tube 140. The sample storage tube is used to store the liquid sample of the corresponding sample tube 140 sucked by the pipette head 160. After the sample detection device 100 controls the pipette head 160 to extend into the sample tube 140 to suck the liquid sample, the sucked sample is injected into the corresponding sample storage tube, so that the detection personnel at the sample detection site can directly perform subsequent biological tests on the liquid sample in the sample storage tube.
[0049] In some embodiments, the placement component 130 can be used to place N sample tubes 140; the pipetting device 120 includes N pipetting heads 160; the N sample tubes 140 correspond to the N pipetting heads 160 one by one, and N is a positive integer; then the sample detection device 100 can control the N pipetting heads 160 to simultaneously extend into the corresponding sample tubes 140 to absorb the liquid sample. Among them, the shapes of the N sample tubes are the same, the radii of the N pipetting heads 160 are equal, and the radii of the swabs respectively stored in the N sample tubes 140 are equal.
[0050] Optionally, the aspiration positions corresponding to the N pipetting heads 160 of the sample detection device 100 may be the same, or each pipetting head 160 may be controlled to move to a different aspiration position to aspirate the liquid sample in the corresponding sample tube 140 .
[0051] Optionally, if the sample detection device 100 has only one camera 110 for simultaneously photographing N sample tubes, the obtained sample tube image contains N samples. Optionally, the sample detection device 100 may have N cameras 110, which are respectively located above the N sample tubes 140 and correspond one-to-one with the sample tubes 140, for respectively acquiring sample tube images of the corresponding sample tubes 140.
[0052] In some embodiments, the target user can go to the sample collection site for sample collection according to the doctor's instructions or his own needs. The collection method is swab collection, which may include but is not limited to nasal swabs, throat swabs, etc. The collector at the sample collection site inserts the swab into the target user's nasal cavity or throat to collect the target user's nasal mucosa or saliva, and stores the collected swab in a sample tube containing a sampling preservation liquid, so that the nasal mucosa or saliva on the swab combines with the sampling preservation liquid to form a liquid sample; the sampling preservation liquid can be used to inactivate viruses, protect the nucleic acid stability of the sample, prolong the sample storage time, monitor the sample status, and facilitate operation and transportation. Its specific components and functions vary depending on the sampling purpose and detection requirements. The sample collection site transports the sample tube containing the liquid sample and swab to the sample testing site for sample testing.
[0053] When performing sample testing, the sample testing device 100 at the sample testing site only needs to suck the liquid sample in the sample tube and perform biological testing on the liquid sample to obtain the sample testing result of the target user. The testing personnel at the sample testing site place the sample tube of the target user to be sucked at the placement component 130 of the sample testing device 100 and start the sample testing device 100. The sample detection device 100 obtains a sample tube image obtained by the camera 110 performing image acquisition on the sample tube 140; identifies the sample tube 140 in the sample tube image to determine the swab position of the swab 150 in the sample tube 140; calculates a first distance between the swab position and a preset liquid aspiration position; the preset liquid aspiration position is a position where the pipette head 160 extends into the sample tube 140 to aspirate the liquid sample; determines whether the first distance is greater than or equal to the preset distance; if the first distance is greater than or equal to the preset distance, controls the pipette head 160 to extend into the sample tube 140 to aspirate the liquid sample; if the first distance is less than the preset distance, controls the pipette head 160 to move, and controls the moved pipette head 160 to extend into the sample tube 140 to aspirate the liquid sample; the distance between the aspiration position of the moved pipette head 160 and the swab position is greater than or equal to the preset distance to prevent the pipette head from touching the swab in the sample tube.
[0054] like Figure 2 As shown, in one embodiment, a sample positioning method is provided, which can be applied to the above sample detection device. The method may include the following steps 210 to 260.
[0055] Step 210, obtaining an image of the sample tube obtained by capturing an image of the sample tube by a camera.
[0056] The inspector at the sample testing site places the sample tube on the placement component and starts the sample testing equipment. The sample testing equipment controls the camera located above the placement component to take a bird's-eye view of the sample tube to obtain an image of the sample tube, which includes the sample tube and the swab. In order to ensure that the pipette head does not touch the swab when it is inserted into the sample tube to absorb the liquid sample, causing the swab to block the pipette head, or the pipette head absorbs the swab and affects the sample detection, the sample testing equipment can first analyze and determine whether the pipette head will collide with the swab after it is inserted into the sample tube based on the sample tube image, so as to ensure the smooth absorption of the liquid sample.
[0057] In some embodiments, the sample detection device also includes a light-emitting component, which can be located above the placement component or next to the camera, and is used to supplement lighting when the camera captures an image of the sample tube, so that the sample tube image captured by the camera is clearer and easier to identify.
[0058] Step 220 , identifying the sample tube in the sample tube image to determine the swab position of the swab in the sample tube.
[0059] Optionally, the position of the swab in the sample tube may be represented by the distance of the swab relative to the center of the sample tube, or the coordinates of the swab relative to the center of the sample tube.
[0060] In some embodiments, after acquiring the sample tube image, the sample detection device can identify the sample tube, swab and pipette head contained in the sample tube image to obtain the position of the sample tube in the sample tube image, the swab position in the sample tube and the position of the pipette head in the sample tube image, so that the sample detection device can determine whether the swab and the pipette head may touch each other.
[0061] In some embodiments, the sample detection device may match the sample tube image with a preset image to determine the swab position of the swab in the sample tube, where the preset image is the swab image. Specifically, the sample detection device may use the preset image as a template, use a template matching function (such as cv2.matchTemplate) in an image processing library such as OpenCV, slide the template on the sample tube image, and calculate the similarity score of each area; based on the similarity scores of each area, find the area with the highest score as the swab position where the swab is located.
[0062] Optionally, the sample detection device may also identify the swab position of the swab in the sample tube from the sample tube image by threshold segmentation or circle fitting method.
[0063] In some embodiments, the sample detection device may obtain the outline of the swab in the sample tube image according to an edge detection algorithm; and calculate the geometric center of the swab as the swab position according to the shape rule of the swab (such as a cylinder).
[0064] Optionally, when identifying the sample tube, the sample detection device may segment the area containing the sample tube from the sample tube image to remove the influence of the background area on subsequent processing.
[0065] In some embodiments, when identifying the sample tube, the sample detection device may identify the diameter of the sample tube, the radius of the swab, and the radius of the pipetting head in the sample tube image for subsequent calculations.
[0066] Step 230, calculating a first distance between the swab position and a preset liquid aspiration position.
[0067] The preset aspiration position is a preset position where the pipette head is inserted into the sample tube to aspirate the liquid sample. The preset aspiration position can also be the position of the pipette head relative to the sample tube when the sample detection device controls the camera to collect the current sample tube image, so as to avoid the pipette head failing to move back to the preset aspiration position after completing the last liquid sample aspiration, so that the actual aspiration position of the pipette head is different from the preset aspiration position.
[0068] In some embodiments, the sample detection device may first map the swab position of the swab in the sample tube and the preset aspiration position corresponding to the liquid transfer device to the same plane coordinate system, and then use the Euclidean distance formula to calculate the first distance between the swab position and the preset aspiration position. The Euclidean distance formula is: Among them, (x 1 ,y 1 ) is the swab position, (x 2 ,y 2 ) is the preset liquid aspiration position, and d is the first distance.
[0069] In some embodiments, the preset aspiration position may be the center position of the sample tube. In this case, the first distance between the swab position and the preset aspiration position is equivalent to the distance between the swab position and the center of the sample tube. The sample detection device may construct a sample tube coordinate system with the center of the sample tube as the origin. In the process of identifying the sample tube in the sample tube image, the distance from the swab to the center of the sample tube is determined as the first distance. Specifically, in the sample tube coordinate system with the sample tube as the origin, assuming that the swab coordinates are (3, 4), the first distance between the swab position and the center of the sample tube can be calculated to be 5.
[0070] Optionally, the pipetting device of the sample detection device may further include a position detection sensor for detecting whether the pipetting head is located at a preset aspiration position. The position detection sensor may include but is not limited to a proximity sensor, a photoelectric sensor, or a magnetic sensor. When the pipetting head is located at the preset aspiration position, the position detection sensor may trigger a signal, which is used to indicate that the pipetting head has reached the preset aspiration position.
[0071] In some embodiments, before calculating the first distance between the swab position and the preset aspiration position, the sample detection device may first detect whether the pipette head is currently located at the preset aspiration position; if the pipette head is not at the preset aspiration position, the pipette head is controlled to move to the preset aspiration position; if the pipette head is currently at the preset aspiration position, the first distance between the swab position and the preset aspiration position is calculated, so that the sample detection device can selectively re-identify the position of the pipette head in the sample tube image when calculating the first distance, thereby improving the efficiency of liquid samples.
[0072] In some embodiments, the sample detection device may further include an identification camera, located on the side of the pipetting device, for collecting an image of a pipetting head of the pipetting device, which may include a pipetting head and a background area (sample tube) of the pipetting device. The sample detection device may obtain an image of a pipetting head collected by the identification camera; identify the pipetting head in the pipetting head image to determine the relative position relationship between the pipetting head and the background area in the pipetting head image. This enables the sample detection device to know the actual position of the pipetting head. When the pipetting head is not in the preset aspiration position, the actual position of the pipetting head can be directly used as the preset aspiration position, thereby eliminating the need to move the pipetting head.
[0073] Step 240 , determining whether the first distance is greater than or equal to a preset distance; if so, executing step 250 ; if not, executing step 260 .
[0074] After the sample detection device obtains the first distance between the swab position in the sample tube image and the preset liquid aspiration position, the sample detection device needs to determine whether the first distance is greater than or equal to the preset distance, so as to avoid the pipetting head from touching the swab when the pipetting head is inserted into the sample tube. Therefore, it is necessary to determine whether the first distance is greater than or equal to the preset distance. Optionally, the preset distance needs to be greater than or equal to the radius of the swab to avoid the swab blocking the pipetting head or taking the swab away from the sample tube to cause contamination.
[0075] Step 250, control the pipetting head to extend into the sample tube to absorb the liquid sample.
[0076] If the sample detection device detects that the first distance between the swab position and the preset liquid aspiration position is greater than or equal to the preset distance, it means that the pipette head will not touch the swab when it enters the sample tube at this time, and the sample detection device can directly control the pipette head to extend into the sample tube to absorb the liquid sample.
[0077] Step 260, controlling the pipetting head to move, and controlling the moved pipetting head to extend into the sample tube to absorb the liquid sample.
[0078] If the sample detection device detects that the first distance between the swab position and the preset liquid aspiration position is less than the preset distance, it means that extending the pipette head into the sample tube to absorb the sample will touch the swab, affecting the absorption of the liquid sample. Therefore, when the sample detection device determines that the first distance is less than the preset distance, it is necessary to control the pipette head to move so that the distance between the liquid aspiration position of the moved pipette head and the swab position is greater than or equal to the preset distance. Only then will the moved pipette head be controlled to extend into the sample tube to absorb the liquid sample to ensure smooth absorption of the liquid sample.
[0079] In some embodiments, when the sample detection device detects that the first distance is less than a preset distance, it can obtain a circular area with the swab position as the center and the preset distance as the radius, and control the pipetting head to move to any position outside the circular area, so that the distance between the aspiration position of the pipetting head and the swab position after movement is greater than or equal to the preset distance.
[0080] In the embodiment of the present application, the sample tube is imaged by a camera, and the swab position in the sample tube is automatically identified by the sample tube image, and the first distance between the swab position and the preset liquid aspiration position can be calculated. If the first distance is less than the preset distance, it means that there is a risk of bringing out the swab when the pipette head absorbs the liquid sample according to the preset liquid aspiration position. Then, the movement of the pipette head can be controlled so that the distance between the liquid aspiration position of the moved pipette head and the swab position is greater than or equal to the preset distance, and the liquid aspiration position of the pipette head in the sample tube can be accurately controlled to avoid the pipette head touching the swab when extending into the sample tube to absorb the liquid sample, causing sample contamination, thereby achieving accurate absorption of the liquid sample and improving the accuracy and safety of sample detection. At the same time, the liquid aspiration position of the movable pipette head makes the sample detection device have strong adaptability and flexibility, reduces the manual operation of the detection personnel, and can avoid errors caused by human factors. Moreover, during the entire liquid sample aspiration process, testers do not need to directly touch sample tubes, swabs, and pipetting devices, reducing direct contact with potential sources of contamination, thereby reducing the risk of personal infection. This non-contact method is particularly important, especially when handling infectious samples.
[0081] In some embodiments, Figure 3a As shown, the steps of controlling the movement of the pipetting head may include steps 302 to 306.
[0082] Step 302, obtaining the avoidance distance range and the deflection range corresponding to the pipetting head.
[0083] When the first distance between the swab position and the preset liquid aspiration position is less than the preset distance, in order to avoid the pipette head from touching the swab when it is inserted into the sample tube to aspirate the liquid sample, the sample detection device can first obtain the avoidance distance range and the offset range corresponding to the pipette head, and then calculate the corresponding position of the moved pipette head, and the distance between the liquid aspiration position corresponding to the moved pipette head and the swab position is greater than or equal to the preset distance.
[0084] Among them, the avoidance distance range refers to the distance range within which the aspiration position of the pipette head in the sample tube will not collide with the swab when the swab is at the edge of the sample tube; the deflectable range refers to the aspiration range of the pipette head in the sample tube.
[0085] In some embodiments, the avoidance distance range is determined based on the diameter of the sample tube, the radius of the swab, and the radius of the pipette head; the deflectable range is determined based on the radius of the sample tube and the radius of the pipette head.
[0086] In some embodiments, Figure 3b As shown, in the sample tube 140, in order to ensure that the swab 150 does not touch the pipette head 160, the minimum avoidance distance in the avoidance distance range is the swab radius, or it can be the swab radius plus a preset constant. Figure 3c As shown, since the swab position and the aspiration position corresponding to the pipette head must both be located in the sample tube 140, the farthest distance between the swab position and the aspiration position may be when the swab 150 and the pipette head 160 are respectively located at the two ends of the diameter of the sample tube 140, then the maximum avoidance distance in the avoidance distance range may be the diameter of the sample tube 140 minus the radius of the swab 150 minus the radius of the pipette head 160.
[0087] For example, assuming that the diameter of the sample tube is 26 mm, the radius of the swab is 3 mm, the radius of the pipette head is 2 mm, and the preset constant is 1 mm, the maximum avoidance distance in the avoidance distance range corresponding to the pipette head can be 26-3-2=21 mm, and the maximum avoidance distance can be 4 mm.
[0088] In some embodiments, assuming that the pipette head can only move in the diameter direction of the sample tube, the sample detection device can use the sample tube center as the origin, the movable direction of the pipette head 160 in the sample tube 140 as the X-axis sample tube coordinate system, and determine the corresponding deflection range of the pipette head according to the radius of the sample tube and the radius of the swab. Figure 3d As shown, each offset point included in the offset range is located on the X-axis. Then, in the offset range, the X-axis value range of each offset point can be from x1 to x2, where x1 and x2 are the X-axis values when the pipette head 160 is located at the two ends of the center of the sample tube and is farthest from the center of the sample tube.
[0089] Specifically, when the pipette head moves only in the diameter direction of the sample tube, the X-axis value range of each offset point in the deflectable range corresponding to the pipette head may be from -(sample tube radius - pipette head radius) to (sample tube radius - pipette head radius). For example, assuming that the radius of the sample tube is 13 mm and the radius of the pipette head is 3 mm, then in the above sample tube coordinate system, the deflectable range corresponding to the pipette head may be from (-10, 0) along the X-axis to (10, 0).
[0090] In other embodiments, the pipetting head can move in any direction in the sample tube, and the deflectable range of the pipetting head may include any position on or within a circle with the center of the sample tube as the center and the difference between the radius of the sample tube and the radius of the pipetting head as the radius. Specifically, in a coordinate system with the center of the sample tube as the origin, the deflectable range is (x, y), where x 2 +y 2 ≤(Rr) 2 , R is the radius of the sample tube, and r is the radius of the pipette head.
[0091] Step 304, determining a target offset point within the offset range according to the offset range, the swab position and the avoidance distance range.
[0092] The target offset point is an offset point whose distance from the swab position is within the avoidance distance range. In other words, if the pipetting head absorbs the liquid sample at the target offset point, it will not collide with the swab.
[0093] In some embodiments, the closer the distance between the target offset point and the swab position is to the maximum avoidance distance in the avoidance distance range, the smoother the pipette head can absorb the liquid sample. Therefore, the sample detection device can start from the maximum avoidance distance in the avoidance distance range to find the target offset point.
[0094] Optionally, the sample detection device may start from the maximum avoidance distance in the avoidance distance range, take the maximum avoidance distance as the current avoidance distance, take any offset point in the deflectable range as the current offset point, and calculate whether the distance between the current offset point and the swab position is greater than or equal to the current avoidance distance. If it is greater than or equal to the current avoidance distance, the current offset point is used as the target offset point; if it is less than the current avoidance distance, any offset point in the deflectable range that is not used as the current offset point is used as the new current offset point, and re-judgment is made whether the distance between the current offset point and the swab position is greater than or equal to the current avoidance distance, until all offset points in the deflectable range have passed the current offset point, then the current avoidance distance is reduced to obtain a new current offset distance, and any offset point in the deflectable range is used as the current offset point again, and calculation is made whether the distance between the current offset point and the swab position is greater than or equal to the current avoidance distance, until the current avoidance distance is the minimum avoidance distance in the avoidance distance range.
[0095] Optionally, when the sample detection device determines the current offset point, the offset point with the smallest x value in the offset range may be used as the current offset point. If a new current offset point needs to be determined, the x value may be kept unchanged, and the y value may be increased until the y value is the maximum y value in the offset range. Then the x value may be increased, and the x value may be kept unchanged, and the y value may be increased repeatedly until the y value is the maximum y value in the offset range. The increase amplitudes of the x value and the y value may be the same or different.
[0096] Optionally, since the radius of the swab and the radius of the pipette head are both smaller than the radius of the sample tube, and the radius of the sample tube is larger than the sum of the radius of the swab and the radius of the pipette head, the target offset point can be found so that the distance between the target offset point and the swab position is within the avoidance distance range.
[0097] Step 306, controlling the pipetting head to move to the target offset point.
[0098] After determining the target offset point that will not touch the swab, the sample detection device controls the pipetting head to move to the target offset point so that the pipetting head will not collide with the swab when it extends into the sample tube at the target offset point to absorb the liquid sample, thereby smoothly absorbing the liquid sample.
[0099] In the embodiment of the present application, the target offset point is obtained by using the avoidance distance range and the deflection range, which ensures that after the pipette head moves to the target offset point, it will not collide with the swab when it is inserted into the sample tube to absorb the liquid sample, thereby avoiding sample contamination and improving the accuracy and reliability of sample detection; and, by considering different sample tube diameters, swab radii and pipette head radii, the avoidance distance range and the deflection range are determined, so that the sample detection equipment can be applicable to sample tubes and swabs of various specifications, thereby enhancing the flexibility and adaptability of the sample detection equipment.
[0100] like Figure 4 As shown, in one embodiment, a sample positioning method is provided, which can be applied to the above sample detection device. The method may include the following steps 402 to 420.
[0101] Step 402, respectively obtain sample tube images obtained by collecting images of N sample tubes by cameras.
[0102] Step 404 , identifying the sample tubes in the sample tube image to determine the sample tube centers corresponding to the N sample tubes, respectively, and the swab position of the swab in each sample tube relative to the sample tube center.
[0103] The relevant descriptions in steps 402 to 404 may refer to the relevant descriptions in the above steps 210 to 220, which will not be repeated here.
[0104] Step 406, calculating the first distance between each swab position and the preset liquid aspiration position.
[0105] In some embodiments, the preset aspiration position may be the center position of the sample tube, and the distance from the swab in each sample tube to the center of the sample tube is the first distance between each swab position and the preset aspiration position.
[0106] The description related to calculating the first distance in step 406 may refer to the description related to calculating the first distance in the above step 230, which will not be repeated here.
[0107] Step 408, determining whether the first distances between the preset aspiration position and the swab positions corresponding to the N sample tubes are greater than or equal to the preset distances; if so, executing step 410; if not, executing step 412.
[0108] When N sample tubes are placed simultaneously in the placement component of the sample detection device, the sample detection device needs to determine whether the first distance between the preset aspiration position in each sample tube and the corresponding swab position is greater than or equal to the preset distance, so as to determine whether the pipette heads in the N sample tubes will touch the swab during aspiration.
[0109] In some embodiments, the sample detection device may first judge each first distance and then determine whether to move the pipetting head, so as to be able to synchronously control N sample tubes at the same time, thereby reducing the waste of individual control.
[0110] Step 410, controlling N pipetting heads to extend into corresponding sample tubes to absorb liquid samples.
[0111] If the sample detection device detects that the first distances between the preset liquid aspiration position and the swab positions corresponding to the N sample tubes are greater than or equal to the preset distance, it means that the N pipette heads will not touch the swabs when they are respectively extended into the corresponding sample tubes. The sample detection device can directly control the N pipette heads to extend into the corresponding sample tubes to absorb liquid samples.
[0112] Step 412, obtaining the avoidance distance range and the deflection range corresponding to the pipetting head.
[0113] If the sample detection device detects that the first distance between the preset aspiration position and the swab position corresponding to any sample tube is less than the preset distance, it means that at least one pipette head will touch the swab when it is inserted into the corresponding sample tube, and the sample detection device needs to move the N pipette heads. In order to facilitate the control of the N pipette heads and reduce the waste of resources of controlling the N pipette heads separately, the sample detection device can first determine whether there is a common offset point, so that when the N pipette heads are inserted into the corresponding sample tube at the common offset point, they will not touch the swab.
[0114] The description of obtaining the avoidance distance range and the deflectable range corresponding to the pipetting head in step 412 can refer to the description of the above step 302, which will not be repeated here.
[0115] Step 414, according to the N swab positions, the avoidance distance range and the deflectable range, a common deflection point within the deflectable range is calculated, and the common deflection point is used as a target deflection point.
[0116] The common offset point is an offset point whose distances from the N swab positions are greater than or equal to the same avoidance distance, and the same avoidance distance is within the avoidance distance range.
[0117] In some embodiments, the sample detection device takes the center position of the sample tube as the origin, and the movable direction of the pipette head in the sample tube as the X-axis, constructs a sample tube coordinate system, and maps the N swab positions to the sample tube coordinate system; in the sample tube coordinate system, according to the N swab positions, the avoidance distance range and the offset range, calculates the common offset point within the offset range, and uses the common offset point as the target offset point.
[0118] In some embodiments, the steps of calculating a common offset point within the deflectable range according to N swab positions, the avoidance distance range and the deflectable range include steps 502 to 518 .
[0119] Step 502, within the avoidance distance range, determine the current avoidance distance according to the first step length and the previous avoidance distance.
[0120] In some embodiments, the sample detection device can, within the avoidance distance range, start from the maximum avoidance distance, and in the order of avoidance distances from large to small, subtract the first step length from the previous avoidance distance to obtain the current avoidance distance. The first step length can be determined according to the radius of the actual sample tube, the radius of the swab, and the radius of the pipetting head. The larger the radius of the sample tube, the larger the first step length; the larger the radius of the swab and the radius of the pipetting head, the smaller the first step length.
[0121] For example, assuming that the first step length is 0.1 mm, the maximum avoidance distance in the avoidance distance range is 20 mm, and the minimum avoidance distance is 4 mm; then the sample detection equipment can first use 20 mm as the first current avoidance distance; when it is necessary to determine the second current avoidance distance, use the current avoidance distance 20 mm as the previous avoidance distance of the second current avoidance distance, then subtract the first step length 0.1 mm from the previous avoidance distance 20 mm to obtain the second current avoidance distance 19.9 mm; and so on, the last current avoidance distance is the minimum avoidance distance of 4 mm.
[0122] Step 504: Determine the current offset point within the offset range according to the second step length and the previous offset point.
[0123] In some embodiments, the sample detection device may, within the deflectable range, start from the minimum deflection point and, in the order of the deflection points' deflection coordinates from small to large, add the second step length to the deflection coordinate of the previous deflection point to obtain the deflection coordinate of the current deflection point; the deflection coordinate of the minimum deflection point is the minimum value of the deflectable range. The second step length may be the same as or different from the first step length.
[0124] Step 506: Calculate the second distances between the current offset point and the N swab positions respectively.
[0125] For the description related to calculating the second distance in step 506 , reference may be made to the description related to calculating the first distance in step 230 , which will not be repeated here.
[0126] Step 508 , determining whether each second distance is greater than or equal to the current avoidance distance; if so, executing step 510 ; if not, executing step 512 .
[0127] Step 510: Use the current offset point as a common offset point.
[0128] The second distances between the current offset point and the N swab positions are greater than or equal to the current avoidance distance, indicating that when the N pipette heads extend into the corresponding sample tubes at the current offset point to absorb liquid samples, they will not touch the swabs. Therefore, the sample detection device can use the current offset point as a common offset point.
[0129] Step 512, determine whether the current offset point is the last offset point in the offset range; if not, execute step 514; if yes, execute step 516.
[0130] If there is at least one swab position and the second distance between the current offset point is less than the current avoidance distance, it means that at least one pipette head extends into the corresponding sample tube at the current offset point to absorb the liquid sample and touches the swab. In this case, the current offset point cannot be used as a common offset point and it is necessary to find the common offset point again. The sample detection device can first determine whether the current offset point is the last offset point in the offset range to determine whether there may be other offset points in the offset range that can become common offset points.
[0131] Step 514, taking the current offset point as the previous offset point, and re-execute step 504.
[0132] If it is detected that the current offset point is not the last offset point in the offset range, the sample detection device can use the current offset point as the previous offset point and re-determine the current offset point within the offset range according to the second step length and the previous offset point until all offset points in the offset range have been traversed.
[0133] Step 516, determining whether the current avoidance distance is the last avoidance distance in the avoidance distance range; if so, executing step 518; if not, executing step 502.
[0134] If it is detected that the current offset point is the last offset point in the offset range, it means that there is no offset point whose second distances with the N swab positions are greater than or equal to the current avoidance distance, and all offset points in the offset range cannot make the second distance greater than or equal to the current avoidance distance, then the sample detection device needs to change the current avoidance distance. In addition, before changing the current avoidance distance, the sample detection device needs to determine whether the current avoidance distance is the last avoidance distance in the avoidance distance range.
[0135] Step 518, determine that there is no common offset point.
[0136] If the sample detection device detects that the current avoidance distance is the last avoidance distance in the avoidance distance range, that is, the sample detection device cannot find a common offset point within the offset range whose distances from the N swab positions are greater than or equal to the same avoidance distance, and the same avoidance distance is within the avoidance distance range, it means that there is no common offset point.
[0137] If the sample detection device detects that the current avoidance distance is not the last avoidance distance in the avoidance distance range, the current avoidance distance is changed, that is, the sample detection device is again within the avoidance distance range, and determines the current avoidance distance based on the first step length and the previous avoidance distance; until the sample detection device determines that there is no common offset point.
[0138] In the embodiment of the present application, by calculating the common offset point between multiple sample tubes, it is possible to simultaneously control N sample tubes synchronously, reducing the waste of individual control, thereby further improving the efficiency of the sample detection equipment.
[0139] Step 416, determine whether there is a common offset point; if so, execute step 418; if not, execute step 420.
[0140] Step 418, controlling the N pipetting heads to move to the target offset point, and controlling the moved pipetting heads to extend into the sample tube to absorb the liquid sample.
[0141] If there is a common offset point, it means that the N pipette heads will not touch the swab when they extend into the corresponding sample tube at the common offset point. The sample detection equipment can simultaneously control the N pipette heads to move to the target offset point, and control the moved pipette heads to extend into the sample tube to absorb the liquid sample, so as to reduce the waste of resources caused by separately calculating the target offset points corresponding to the N pipette heads, and can further reduce time, thereby improving the efficiency of the sample detection equipment while ensuring smooth and accurate sample absorption.
[0142] Step 420 , respectively calculating the target offset points corresponding to the N pipetting heads, and controlling the N pipetting heads to move to the corresponding target offset points.
[0143] If there is no common offset point, it means that the second distance between any offset point and the N swab positions is greater than or equal to the current avoidance distance. The sample detection equipment needs to respectively determine the target offset points corresponding to the N pipetting heads, and control the N pipetting heads to move to the corresponding target offset points respectively.
[0144] In some embodiments, the sample detection device may control a pipetting head to move to the corresponding target offset point after calculating the target offset point corresponding to the pipetting head; or may control each pipetting head to move to the corresponding target offset point after calculating the target offset points corresponding to all pipetting heads.
[0145] In the embodiment of the present application, by calculating the common offset point between multiple sample tubes, the sample detection device can realize simultaneous synchronous control of N sample tubes. When there is a common offset point, all pipetting heads can be moved to the common offset point at one time to absorb the liquid sample, avoiding the waste of time and resources caused by individually calculating and controlling the target offset point corresponding to each pipetting head, thereby significantly improving the efficiency of the sample detection device. Moreover, in the case where the common offset point cannot be found, the sample detection device will calculate the target offset point corresponding to each pipetting head separately, ensuring that the sample detection device can accurately absorb the liquid sample in the sample tube.
[0146] In a specific embodiment, assuming that N is 4, the diameter of the sample tube is 26 mm, the radius of the swab is 3 mm, the radius of the pipette head is 3 mm, and the preset constant is 1 mm; the preset aspiration position is the center position (0, 0) of the sample tube, the preset distance is 7 mm, the first step length is 0.1 mm, and the second step length is 0.1 mm. The maximum avoidance distance in the avoidance distance range can be 26-3-3=20 mm, and the minimum avoidance distance can be 4 mm; the pipette head only moves in the diameter direction of the sample tube, and the offset range is from (-10, 0) along the X-axis to (10, 0).
[0147] The sample detection equipment obtains sample tube images obtained by the camera for image acquisition of 4 sample tubes respectively; identifies the sample tube in the sample tube image, and takes the center position of the sample tube as the origin and the movable direction of the pipette head in the sample tube as the X-axis to construct a sample tube coordinate system, and maps the positions of 4 swabs (swab A, swab B, swab C and swab D) to the sample tube coordinate system, and determines that the positions of the swabs in the three sample tubes are swab A (-2.61, -8.14), swab B (3.62, 5.95), swab C (-2.16, -6.83) and swab D (7.19, -1.04) respectively; calculates the first distance between each swab position and the preset liquid aspiration position respectively, and the first distance corresponding to swab B is less than the preset distance of 7 mm, then the avoidance distance range and the offset range corresponding to the pipette head are obtained.
[0148] Starting from the maximum avoidance distance of 20 mm and from the offset point with the smallest horizontal coordinate (-10, 0), calculate the second distances between (-10, 0) and swab A, swab B, swab C and swab D respectively. The second distances between the four swabs and (-10, 0) are all less than 20. Therefore, when the current avoidance distance is 20 mm, (-10, 0) is not a common offset point. Then, within the deflectable range, (-9.9, 0) is taken as the current offset point, and the second distances between the current offset point and swab A, swab B, swab C and swab D are calculated to determine whether each second distance is greater than or equal to the current avoidance distance of 20 mm; if so, the current offset point is taken as the common offset point; if not, the abscissa of the current offset point is subtracted by 0.1 mm to obtain a new current avoidance distance, until there is no second distance between any offset point and the four swab positions within the deflectable range that is greater than or equal to the current avoidance distance, then within the avoidance distance, the current avoidance distance is subtracted by 0.1 mm (20-0.1=19.9 mm) as the new current avoidance distance, and the step of calculating the second distances between (-10, 0) and swab A, swab B, swab C and swab D is performed again from the offset point with the smallest abscissa (-10, 0) until a common offset point is found or the current avoidance distance is the last avoidance distance in the avoidance distance range (determining that there is no common offset point). Finally, the sample testing equipment can obtain that when the common avoidance distance is 10 mm and the current offset point is (-10, 0), the distances from swab A, swab B, swab C and swab D to the common offset point are 11 mm, 14.9 mm, 10.4 mm and 17.2 mm respectively, which are all greater than the current avoidance distance of 10 mm. It is determined that when the common avoidance distance is 10 mm, the common offset point of the four swabs is (-10, 0).
[0149] The sample detection device controls the four pipetting heads to move to a common offset point (-10, 0), and controls the moved pipetting heads to extend into corresponding sample tubes to absorb liquid samples.
[0150] In an embodiment of the present application, an image of the sample tube is captured by a camera, and the position of the swab in the sample tube is automatically identified by the characteristics of the sample tube. The first distance between the swab position and the preset liquid aspiration position can be calculated. If the first distance is less than the preset distance, it means that there is a risk of bringing out the swab when the pipette head absorbs the liquid sample according to the preset liquid aspiration position. The movement of the pipette head can be controlled so that the distance between the liquid aspiration position corresponding to the moved pipette head and the swab position is greater than or equal to the preset distance. The position of the pipette head in the sample tube can be accurately controlled to avoid the pipette head touching the swab when it is inserted into the sample tube to absorb the liquid sample, thereby preventing the sample from being contaminated by the sample. Accurate aspiration of liquid samples is achieved, thereby improving the accuracy and safety of sample detection.
[0151] like Figure 6 As shown, in one embodiment, a sample positioning device 600 is provided, which can be applied to the above-mentioned sample detection equipment. The sample positioning device 600 may include an image acquisition module 610, a position determination module 620, a distance calculation module 630 and a control module 640.
[0152] The image acquisition module 610 is used to acquire the sample tube image obtained by the camera performing image acquisition on the sample tube.
[0153] The position determination module 620 is used to identify the sample tube in the sample tube image to determine the swab position of the swab in the sample tube.
[0154] The distance calculation module 630 is used to calculate the first distance between the swab position and the preset liquid aspiration position; the preset liquid aspiration position is the position where the pipette head extends into the sample tube to aspirate the liquid sample.
[0155] The control module 640 is used to control the pipette head to extend into the sample tube to absorb the liquid sample if the first distance is greater than or equal to the preset distance; and to control the pipette head to move and control the moved pipette head to extend into the sample tube to absorb the liquid sample if the first distance is less than the preset distance; the distance between the aspiration position of the pipette head after movement and the swab position is greater than or equal to the preset distance.
[0156] In some embodiments, the sample positioning device 600 further includes an offset point calculation module.
[0157] The offset point calculation module is used to obtain the avoidance distance range and the deflectable range corresponding to the pipette head if the first distance is less than the preset distance; wherein the avoidance distance range refers to the distance range within which the aspiration position of the pipette head in the sample tube will not collide with the swab when the swab is at the edge of the sample tube; the deflectable range refers to the aspiration range of the pipette head in the sample tube; based on the deflectable range, the swab position and the avoidance distance range, the target offset point within the deflectable range is determined, and the target offset point is an offset point whose distance from the swab position is within the avoidance distance range.
[0158] Optionally, the control module 640 is also used to control the pipetting head to move to the target offset point.
[0159] In some embodiments, the placement component is used to place N sample tubes; the pipetting device includes N pipetting heads; the N sample tubes correspond one-to-one to the N pipetting heads, and N is a positive integer.
[0160] Optionally, the position determination module 620 is further used to identify the sample tubes in the sample tube image to determine the sample tube centers corresponding to the N sample tubes, respectively, and the swab position of the swab in each sample tube relative to the sample tube center.
[0161] In some embodiments, the control module 640 is also used to control the N pipetting heads to extend into the corresponding sample tubes to absorb liquid samples if the first distances between the preset aspiration position and the swab positions corresponding to the N sample tubes are greater than or equal to the preset distances.
[0162] Optionally, the offset point calculation module is also used to obtain the avoidance distance range and the offset range corresponding to the pipetting head if the first distance between the preset aspiration position and the swab position corresponding to any sample tube is less than the preset distance; calculate the common offset point within the offset range according to the N swab positions, the avoidance distance range and the offset range, and use the common offset point as the target offset point, the common offset point being an offset point whose distances from the N swab positions are greater than or equal to the same avoidance distance, and the same avoidance distance is within the avoidance distance range.
[0163] Optionally, the control module 640 is further configured to control the N pipetting heads to move to the target offset point.
[0164] In some embodiments, the offset point calculation module is also used to determine the current avoidance distance within the avoidance distance range according to the first step length and the previous avoidance distance; determine the current offset point within the deflectable range according to the second step length and the previous offset point; calculate the second distances between the current offset point and the N swab positions respectively, if each second distance is greater than or equal to the current avoidance distance, then use the current offset point as the common offset point; if there is at least one second distance less than the current avoidance distance, then use the current offset point as the previous offset point, and re-execute the step of determining the current offset point within the deflectable range according to the second step length and the previous offset point; if within the deflectable range, there is no second distance between any offset point and the N swab positions that is greater than or equal to the current avoidance distance, then use the current avoidance distance as the previous avoidance distance, and re-execute the step of determining the current avoidance distance within the avoidance distance range according to the first step length and the previous avoidance distance, until a common offset point corresponding to the N pipetting heads is obtained or it is determined that there is no common offset point.
[0165] Optionally, the offset point calculation module is also used to, within the avoidance distance range, start from the maximum avoidance distance and, in descending order of avoidance distances, subtract the first step length from the previous avoidance distance to obtain the current avoidance distance.
[0166] Optionally, the offset point calculation module is also used to, within the offset range, start from the minimum offset point, and in the order of the horizontal coordinates of the offset points from small to large, add the second step size to the horizontal coordinate of the previous offset point to obtain the horizontal coordinate of the current offset point; the horizontal coordinate of the minimum offset point is the minimum value of the offset range.
[0167] In some embodiments, the offset point calculation module is further used to calculate the target offset points corresponding to the N pipetting heads respectively if it is determined that there is no common offset point, and control the N pipetting heads to move to the corresponding target offset points respectively.
[0168] Optionally, the avoidance distance range is determined based on the diameter of the sample tube, the radius of the swab and the radius of the pipette head; the deflectable range is determined based on the radius of the sample tube and the radius of the pipette head.
[0169] In an embodiment of the present application, an image of the sample tube is captured by a camera, and the position of the swab in the sample tube is automatically identified through the image of the sample tube. The first distance between the swab position and the preset liquid aspiration position can be calculated. If the first distance is less than the preset distance, it means that there is a risk of bringing out the swab when the pipette head absorbs the liquid sample according to the preset liquid aspiration position. The movement of the pipette head can be controlled so that the distance between the liquid aspiration position corresponding to the moved pipette head and the swab position is greater than or equal to the preset distance. The position of the pipette head in the sample tube can be accurately controlled to avoid the pipette head touching the swab when it is inserted into the sample tube to absorb the liquid sample, thereby preventing the sample from being contaminated by the sample. Accurate aspiration of liquid samples is achieved, thereby improving the accuracy and safety of sample detection.
[0170] Figure 7 FIG. 1 is a structural block diagram of a sample detection device in one embodiment. Figure 7 As shown, the sample detection device 700 may include one or more of the following components: a processor 710, and a memory 720 coupled to the processor 710, wherein the memory 720 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the above embodiments when executed by one or more processors 710.
[0171] The processor 710 may include one or more processing cores. The processor 710 uses various interfaces and lines to connect the various parts of the entire sample detection device 700, and executes various functions and processes data of the sample detection device 700 by running or executing instructions, programs, code sets or instruction sets stored in the memory 720, and calling data stored in the memory 720. Optionally, the processor 710 can be implemented in at least one hardware form of digital signal processing (Digital Signall Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 710 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 710, and can be implemented separately through a communication chip.
[0172] The memory 720 may include a random access memory (RAM) or a read-only memory (ROM). The memory 720 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 720 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the sample detection device 700 during use, etc.
[0173] It can be understood that the sample detection device 700 may include more or fewer structural elements than those in the above structural block diagram, for example, including a power supply, input buttons, cameras, speakers, screens, RF (Radio Frequency) circuits, Wi-Fi (Wireless Fidelity) modules, Bluetooth modules, sensors, etc., and no limitation is made here.
[0174] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program implements the method described in the above embodiments when executed by a processor.
[0175] The embodiments of the present application disclose a computer program product, including a computer program, and the computer program can be executed by a processor to implement the methods described in the above embodiments.
[0176] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM), etc.
[0177] As used herein, any reference to memory, storage, database, or other medium may include nonvolatile and / or volatile memory. Suitable nonvolatile memory may include ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), or Flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus direct RAM (RDRAM), and direct memory bus dynamic RAM (DRDRAM).
[0178] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.
[0179] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0180] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0181] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0182] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0183] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above-mentioned methods of various embodiments of the present application.
[0184] The above is a detailed introduction to a sample positioning method, device, sample detection equipment and storage medium disclosed in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those of ordinary skill in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A sample positioning method, characterized in that: The invention is applied to a sample detection device, the sample detection device comprises a camera, a liquid transfer device and a placement component, the placement component is used to place a sample tube; a liquid sample and a swab are stored in the sample tube; the camera is arranged above the placement component; the liquid transfer device comprises a liquid transfer head, the liquid transfer head is used to extend into the sample tube to absorb the liquid sample; the method comprises: Acquire a sample tube image obtained by acquiring an image of the sample tube by the camera; Identifying a sample tube in the sample tube image to determine a swab position of a swab in the sample tube; Calculating a first distance between the swab position and a preset liquid aspiration position; the preset liquid aspiration position is a position where the pipette head extends into the sample tube to aspirate the liquid sample; If the first distance is greater than or equal to a preset distance, controlling the pipetting head to extend into the sample tube to absorb the liquid sample; If the first distance is less than the preset distance, the pipetting head is controlled to move, and the moved pipetting head is controlled to extend into the sample tube to absorb the liquid sample; the distance between the aspiration position of the moved pipetting head and the swab position is greater than or equal to the preset distance.
2. The method according to claim 1, characterized in that If the first distance is less than the preset distance, controlling the pipetting head to move comprises: If the first distance is less than the preset distance, the avoidance distance range and the deflectable range corresponding to the pipetting head are obtained; wherein the avoidance distance range refers to the distance range within which the aspiration position of the pipetting head in the sample tube will not collide with the swab when the swab is at the edge of the sample tube; the deflectable range refers to the aspiration range of the pipetting head in the sample tube; Determine a target offset point within the offset range according to the offset range, the swab position and the avoidance distance range, wherein the target offset point is an offset point whose distance from the swab position is within the avoidance distance range; The pipetting head is controlled to move to the target offset point.
3. The method according to claim 2, characterized in that The placement component is used to place N sample tubes; the pipetting device includes N pipetting heads; the N sample tubes correspond to the N pipetting heads one by one, and N is a positive integer; The identifying the sample tube in the sample tube image to determine the swab position of the swab in the sample tube includes: Identify the sample tubes in the sample tube image to determine sample tube centers corresponding to the N sample tubes, respectively, and a swab position of a swab in each of the sample tubes relative to the sample tube center; If the first distance is greater than or equal to a preset distance, controlling the pipetting head to extend into the sample tube to absorb the liquid sample comprises: If the first distances between the preset liquid aspiration position and the swab positions corresponding to the N sample tubes are greater than or equal to the preset distances, the N pipetting heads are controlled to extend into the corresponding sample tubes to aspirate liquid samples; If the first distance is less than the preset distance, controlling the pipetting head to move comprises: If a first distance between the preset aspiration position and a swab position corresponding to any sample tube is smaller than the preset distance, obtaining a avoidance distance range and a deflectable range corresponding to the pipetting head; According to the N swab positions, the avoidance distance range and the deflectable range, a common offset point within the deflectable range is calculated, and the common offset point is used as a target offset point, wherein the common offset point is an offset point whose distance from the N swab positions is greater than or equal to the same avoidance distance, and the same avoidance distance is within the avoidance distance range; The N pipetting heads are controlled to move to the target offset point.
4. The method according to claim 3, characterized in that The calculating of a common offset point within the deflectable range according to the N swab positions, the avoidance distance range and the deflectable range includes: Within the avoidance distance range, determining the current avoidance distance according to the first step length and the previous avoidance distance; Determine the current offset point within the offset range according to the second step length and the previous offset point; Calculate the second distances between the current offset point and the N swab positions respectively, and if each of the second distances is greater than or equal to the current avoidance distance, use the current offset point as a common offset point; If there is at least one of the second distances that is smaller than the current avoidance distance, the current offset point is used as the previous offset point, and the step of determining the current offset point within the offset range according to the second step length and the previous offset point is re-executed; If, within the deflectable range, there is no second distance between any offset point and the N swab positions that is greater than or equal to the current avoidance distance, the current avoidance distance is used as the previous avoidance distance, and the step of determining the current avoidance distance within the avoidance distance range based on the first step length and the previous avoidance distance is re-executed until a common offset point corresponding to the N pipetting heads is obtained or it is determined that the common offset point does not exist.
5. The method according to claim 4, characterized in that Determining the current avoidance distance within the avoidance distance range according to the first step length and the previous avoidance distance includes: Within the avoidance distance range, starting from the maximum avoidance distance, in descending order of avoidance distances, the previous avoidance distance is subtracted from the first step length to obtain the current avoidance distance; Determining the current offset point within the offsettable range according to the second step length and the previous offset point includes: Within the deflectable range, starting from the minimum offset point, in the order of the horizontal coordinates of the offset points from small to large, the horizontal coordinate of the previous offset point is added with the second step size to obtain the horizontal coordinate of the current offset point; the horizontal coordinate of the minimum offset point is the minimum value of the deflectable range.
6. The method according to claim 3, characterized in that: The method further comprises: If it is determined that the common offset point does not exist, the target offset points corresponding to the N pipetting heads are calculated respectively, and the N pipetting heads are controlled to move to the corresponding target offset points respectively.
7. The method according to any one of claims 2 to 6, characterized in that: The avoidance distance range is determined according to the diameter of the sample tube, the radius of the swab and the radius of the pipetting head; The deflectable range is determined according to the radius of the sample tube and the radius of the pipetting head.
8. A sample positioning device, characterized in that: Applied to sample detection equipment, the sample detection equipment includes a camera, a liquid transfer device and a placement component, the placement component is used to place a sample tube; the sample tube contains a liquid sample and a swab; the camera is arranged above the placement component; the liquid transfer device includes a liquid transfer head, the liquid transfer head is used to extend into the sample tube to absorb the liquid sample; the device includes: An image acquisition module, used to acquire an image of the sample tube obtained by the camera acquiring an image of the sample tube; a position determination module, used for identifying the sample tube in the sample tube image to determine the swab position of the swab in the sample tube; A distance calculation module, used for calculating a first distance between the swab position and a preset liquid aspiration position; the preset liquid aspiration position is a position where the pipette head extends into the sample tube to aspirate the liquid sample; A control module is used to control the pipetting head to extend into the sample tube to absorb the liquid sample if the first distance is greater than or equal to a preset distance; and to control the pipetting head to move and control the moved pipetting head to extend into the sample tube to absorb the liquid sample if the first distance is less than the preset distance; the distance between the aspiration position of the moved pipetting head and the swab position is greater than or equal to the preset distance.
9. A sample detection device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
