Swab placement method, device, electronic device and storage medium

Through image processing and robotic arm control, a method of efficiently placing swabs into target containers is realized, solving the problem of low swab placement efficiency in automatic nucleic acid sampling, and improving the efficiency and accuracy of nucleic acid detection.

CN114140523BActive Publication Date: 2024-08-23SHENZHEN LUOHU HOSPITAL GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111276534.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2024-08-23
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

In the process of automatic nucleic acid sampling, how to efficiently place swabs stained with cell samples into test tubes has become an urgent problem to be solved.

Method used

By acquiring and processing images in the container rack, the container in which the swab is not placed is determined, and the robotic arm is controlled to place the swab into the correct container based on the identity information on the target container.

Benefits of technology

It improves the efficiency and accuracy of swab placement and ensures the efficiency of the nucleic acid detection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114140523B
    Figure CN114140523B
Patent Text Reader

Abstract

The present application discloses a swab placement method, device, electronic device and storage medium. The method is applied to a swab placement device. The swab placement device includes a mechanical arm, the end of which is connected to a swab, and a cell sample of a collection object is collected on the swab. The method includes: obtaining a first image and a second image, the first image is an image in a first container rack before the mechanical arm is controlled to place the swab, and the second image is an image of at least one container in the second container rack; processing the second image to obtain a third image, the third image includes a container with the swab placed; determining the remaining containers in the first image according to the first image and the third image; controlling the mechanical arm to move to the top of the target container according to the position of the target container in the remaining containers on the first container rack, and controlling the mechanical arm to place the first swab in the target container. By implementing the embodiment of the present application, a swab stained with a cell sample of a collection object can be efficiently and accurately placed in a container.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field involved in the application of artificial intelligence in medical sample collection, and in particular to a swab placement method, device, electronic device and storage medium. Background Art

[0002] In recent years, people need to be tested for nucleic acid. For example, machines are used to automatically sample nucleic acid. It is understandable that after the automatic nucleic acid sampling is achieved by the machine, the swab with the cell sample of the collected object needs to be placed in a test tube. However, in this process, how to more efficiently place the swab with the cell sample of the collected object into the test tube has become a technical problem that needs to be solved at the current stage. Summary of the invention

[0003] The embodiments of the present application provide a swab placement method, device, electronic device, and storage medium, which enable a swab stained with a cell sample of a collection object to be placed in a test tube more efficiently.

[0004] The first aspect of the present application provides a swab placement method, comprising:

[0005] Acquire a first image and a second image, wherein the first image is an image of at least two containers in a first container rack before controlling the robotic arm to place the first swab, and at least one of the at least two containers has a swab placed therein, and the second image is an image of at least one container in a second container rack, and at least one of the second container rack has a swab placed therein;

[0006] Processing the second image to obtain a third image, wherein the third image includes a container in which the swab is placed;

[0007] Determine, according to the first image and the third image, a remaining container in the first image, wherein the remaining container is a container in which no swab is placed among the at least two containers;

[0008] Acquire the position of a target container in the remaining containers on the first container rack to obtain the target position information, wherein the target container is a container in the remaining containers with the identity information of the collection object attached thereto;

[0009] According to the target position information, the robotic arm is controlled to move above the target container, and the robotic arm is controlled to place the first swab into the target container.

[0010] In a first aspect, the present application provides a swab placement device, wherein a mechanical arm is installed on the device, and the end of the mechanical arm is connected to a first swab, and a cell sample of a collection object is collected on the first swab. The device includes a first acquisition module, a processing module, a determination module, a second acquisition module and a moving module.

[0011] The first acquisition module is used to acquire a first image and a second image, wherein the first image is an image of at least two containers in a first container rack before the robot arm is controlled to place the first swab, and at least one of the at least two containers has a swab placed therein, and the second image is an image of at least one container in a second container rack, and at least one of the second container rack has a swab placed therein;

[0012] The processing module is used to process the second image to obtain a third image, wherein the third image includes a container in which the swab is placed;

[0013] The determining module is used to determine the remaining container in the first image according to the first image and the third image, wherein the remaining container is a container in which no swab is placed among the at least two containers;

[0014] The second acquisition module is used to acquire the position of a target container in the remaining containers on the first container rack to obtain the target position information, wherein the target container is a container in the remaining containers with the identity information of the collection object attached thereto;

[0015] The moving module is used to control the robot arm to move above the target container according to the target position information, and control the robot arm to place the first swab into the target container.

[0016] A third aspect of the present application provides an electronic device for data query, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are generated to be executed by the processor to perform instructions for executing the steps in any one of the methods of the first aspect.

[0017] A third aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the stored computer program is executed by the processor to implement any method described in the first aspect.

[0018] It can be seen that in the above technical solution, by acquiring the first image and the second image, the first image is an image of at least two containers in the first container rack before the robot arm is controlled to place the first swab, and at least one of the two containers is placed with a swab, and the second image is an image of at least one container in the second container rack, and at least one container in the second container rack is placed with a swab, and by processing the second image, a third image of the container with the swab placed is obtained, and then the remaining containers in the first image without swabs placed can be quickly determined according to the first image and the third image, thereby improving the efficiency of determining the remaining containers. At the same time, the position of the target container in the remaining containers on the first container rack can be obtained, so that according to the position of the target container, after the robot arm is controlled to move to the top of the target container, the robot arm is controlled to place the first swab in the target container. It can be understood that since the efficiency of determining the remaining containers is improved, the swab stained with the cell sample of the collection object can be placed in the test tube more efficiently. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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.

[0020] in:

[0021] Figure 1A Shown is a schematic diagram of a swab placement system that can be applied to an embodiment of the present application;

[0022] Figure 1B The figure shows a hardware structure diagram of a swab placement device applicable to an embodiment of the present application;

[0023] Figure 2 It is a schematic diagram of a process of a swab placement method provided in an embodiment of the present application;

[0024] Figure 3 A schematic diagram of establishing a Cartesian coordinate system using the swab posture as a reference system provided in an embodiment of the present application;

[0025] Figure 4 A schematic diagram of a swab placement device provided in an embodiment of the present application;

[0026] Figure 5 A schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present application. DETAILED DESCRIPTION

[0027] 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.

[0028] The following are detailed descriptions of each.

[0029] The terms "first" and "second" in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0030] See also Figure 1A , Figure 1A The schematic diagram of a swab placement system applicable to an embodiment of the present application is shown. The swab placement system may include a swab placement device 110 and a container rack 120. A mechanical arm 1101 is installed on the swab placement device 110, and the end of the mechanical arm 1101 is connected to a swab 1102, and a target container 1201 is placed on the container rack 120. The swab placement device 110 can control the mechanical arm 1101 to move above the container rack 120, so that the swab 1102 connected to the end of the mechanical arm 1101 can be placed in the target container 1201.

[0031] See also Figure 1B , Figure 1B The hardware structure diagram of the swab placement device applicable to the embodiment of the present application is shown in FIG. The swab placement device includes at least one processor 101 , a communication line 102 , a memory 103 and at least one communication interface 104 .

[0032] The processor 101 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0033] The communication link 102 may include a pathway to transmit information between the above-mentioned components.

[0034] The communication interface 104 is any transceiver-like device (eg, antenna, etc.) used to communicate with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (WLAN), etc.

[0035] The memory 103 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory may be independent and connected to the processor via a communication line 102. The memory may also be integrated with the processor. The memory provided in the embodiment of the present application may generally have non-volatility. Among them, the memory 103 is used to store computer execution instructions for executing the scheme of the present application, and is controlled by the processor 101 for execution. The processor 101 is used to execute the computer-executable instructions stored in the memory 103, so as to implement the method provided in the following embodiments of the present application.

[0036] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

[0037] In a possible implementation, the processor 101 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 1B .

[0038] In one possible embodiment, the swab placement device may include multiple processors, such as Figure 1B 1 and 107. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0039] In a possible embodiment, the swab placement device may further include an output device 105 and an input device 106. The output device 105 communicates with the processor 101 and can display information in a variety of ways. For example, the output device 105 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 106 communicates with the processor 101 and can receive user input in a variety of ways. For example, the input device 106 may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0040] The above-mentioned swab placement device can be a general device or a special device. The embodiment of the present application does not limit the type of the swab placement device.

[0041] It should be noted that in the present application, a mechanical arm is installed on the swab placement device, and the end of the mechanical arm is connected to the swab. The mechanical arm can be a six-axis mechanical arm or a seven-axis mechanical arm, which is not limited here. Further, the mechanical arm can be a rotatable six-axis mechanical arm or a rotatable seven-axis mechanical arm.

[0042] See also Figure 2 , Figure 2 is a flow chart of a swab placement method provided in an embodiment of the present application. The method is applied to a swab placement device, on which a mechanical arm is installed, and the end of the mechanical arm is connected to the swab, such as Figure 2 As shown, the method may include:

[0043] 201. Acquire a first image and a second image, wherein the first image is an image of at least two containers in a first container rack before controlling a robotic arm to place a first swab, and at least one of the at least two containers has a swab placed therein; and the second image is an image of at least one container in a second container rack, and at least one of the second container rack has a swab placed therein.

[0044] The first container rack and the second container rack are container racks with the same shape, size, groove position, groove size, groove distribution, and groove depth. In addition, the shape, container rack size, groove position, groove size, groove distribution, and groove depth of the first container rack and the second container rack are not limited here. It can be understood that the pixel value corresponding to the first container rack in the first image is the same as the pixel value corresponding to the second container rack in the second image.

[0045] Exemplarily, the two container racks may be container racks with irregular shapes and unevenly distributed grooves.

[0046] In the present application, the container may be a test tube, and the container rack may be a test tube rack. For example, the first container rack is a first test tube rack, and the second container rack is a second test tube rack.

[0047] 202. Process the second image to obtain a third image, where the third image includes a container in which the swab is placed.

[0048] Optionally, the pixel corresponding to the container in which the swab is placed in the third image is the first pixel value, and the second image is processed to obtain the third image, including: obtaining other pixel values ​​except the first pixel value from the second image; determining the second pixel value according to the other pixel values ​​and the first pixel value; and processing other pixel values ​​in the second image according to the second pixel value to obtain the third image, wherein the other pixel values ​​in the third image are all the second pixel values.

[0049] The average value of the pixel values ​​of the pixels corresponding to the container where the swab is placed in the third image is the first pixel value.

[0050] Among them, the second pixel value is the pixel value with the largest difference between the other pixel values ​​and the first pixel value; or, the second pixel value is the sum of the average value of the other pixel values ​​and the first pixel value; or, the second pixel value is the difference between the maximum pixel value among the other pixel values ​​and the first pixel value; or, the second pixel value is the sum of the maximum pixel value among the other pixel values ​​and the first pixel value.

[0051] It can be seen that in the above technical solution, the second pixel value is determined according to the other pixel values ​​obtained in the second image except the first pixel value and the first pixel value, so that the other pixel values ​​in the second image can be processed according to the second pixel value to obtain the third image, and then the difference in pixel value between the pixel corresponding to the container where the swab is placed and other pixels in the third image can be made more obvious.

[0052] 203. Determine remaining containers in the first image according to the first image and the third image, where the remaining containers are containers in which no swabs are placed among the at least two containers.

[0053] Optionally, determining the remaining containers in the first image according to the first image and the third image includes: acquiring a pixel value of each pixel in the first image; and determining the remaining containers in the first image according to the pixel value of each pixel and a first pixel value and a second pixel value in the third image.

[0054] It can be seen that in the above technical solution, the remaining containers are determined according to the pixel value of each pixel in the first image, the first pixel value and the second pixel value in the third image. Since the difference between the first pixel value and the second pixel value in the third image is obvious, the remaining containers in the first image can be determined more accurately.

[0055] Optionally, determining the remaining containers in the first image according to the pixel value of each pixel, the first pixel value and the second pixel value in the third image includes: determining the difference between the pixel value of each pixel and the first pixel value according to the pixel value of each pixel and the first pixel value; determining the difference between the pixel value of each pixel and the second pixel value according to the pixel value of each pixel and the second pixel value; if there is a first difference less than or equal to a first threshold value in the difference between the pixel value of each pixel and the first pixel value, and the difference between the pixel value of the pixel corresponding to the first difference and the second pixel value is greater than or equal to the second threshold value, then determining the remaining containers in the first image according to the pixel value of the pixel corresponding to the first difference.

[0056] The first threshold and the second threshold may be the same or different, and there is no limitation here.

[0057] Among them, the difference between the pixel value of each pixel and the first pixel value can be the absolute value of the difference between the pixel value of each pixel and the first pixel value; the difference between the pixel value of each pixel and the second pixel value can be the absolute value of the difference between the pixel value of each pixel and the second pixel value, which is not limited here.

[0058] It can be seen that in the above technical solution, by respectively determining the difference between the pixel value of each pixel and the first pixel value and the second pixel value, the remaining container can be determined more accurately according to the difference, thereby avoiding mistakenly determining the container with the swab placed as the remaining container.

[0059] 204. Obtain the position of a target container in the remaining containers on the first container rack to obtain target position information. The target container is a container in the remaining containers with identity information of the collection object attached thereto.

[0060] The identity information of the collected object may be a barcode, which is not limited here.

[0061] 205. According to the target position information, control the robotic arm to move to above the target container, and control the robotic arm to place the first swab into the target container.

[0062] The top of the target container may be directly above the target container.

[0063] Optionally, before controlling the robot arm to place the first swab into the target container, the method further includes: obtaining the orientation of the first swab; determining the angle between the orientation of the first swab and the vertical direction according to the orientation of the first swab; determining the rotation angle of the robot arm according to the angle; and controlling the robot arm to rotate according to the rotation angle to adjust the orientation of the first swab to the vertical direction. It can be understood that the vertical direction can be the direction in which the target container is placed vertically, that is, the vertical direction is perpendicular to the plane where the mouth of the target container is located.

[0064] The orientation of the first swab is the orientation of the head of the first swab.

[0065] Optionally, controlling the robotic arm to place the first swab into the target container includes: controlling the robotic arm to move so that the head of the first swab moves forward in the target container; respectively obtaining the force and torque of the head of the first swab in a first direction, a second direction, and a third direction when the first swab moves forward in the target container, wherein the first direction is the direction in which the first swab moves forward, and the first direction, the second direction, and the third direction are perpendicular to each other; controlling the head of the first swab to reach the target position of the target container according to the reaction force of the head of the first swab in the first direction, the torque of the head of the first swab in the opposite direction of the first direction, the force and torque of the head of the first swab in the second direction, and the force and torque of the head of the first swab in the third direction.

[0066] Among them, the second direction is different from the third direction. It can be understood that in the present application, a Cartesian coordinate system can be established with the swab posture as the reference system. Specifically, when the swab head reaches the top of the target container, a Cartesian coordinate system can be established with the center point of the target container as the origin, wherein the center point of the target container can be the center of the target container mouth, the second direction can be a right direction perpendicular to the first direction, and the third direction can be a downward direction perpendicular to the first direction; or, the second direction can be a left direction perpendicular to the first direction, and the third direction can be an upward direction perpendicular to the first direction, which is not limited here.

[0067] Wherein, the target position of the target container is the bottom of the target container. It can be understood that the target container can be a test tube.

[0068] For example, see Figure 3 , Figure 3 The schematic diagram of establishing a Cartesian coordinate system with the swab posture as the reference system provided in the embodiment of the present application. Figure 3 As shown, the target container is a test tube 301. At the entrance of the test tube 301, taking the arrival of the head of the swab at the center point of the above container as the origin as an example, the first direction (the positive direction of the z-axis) can be the forward direction of the swab, the second direction (the positive direction of the x-axis) can be the rightward direction perpendicular to the first direction, and the third direction (the positive direction of the y-axis) can be the downward direction perpendicular to the first direction.

[0069] It should be noted that Figure 3 In the figure, the positive direction of the x-axis is the second direction, the positive direction of the y-axis is the third direction, and the positive direction of the z-axis is the first direction.

[0070] It can be seen that in the above technical scheme, by respectively obtaining the forces and torques of the head of the first swab in the first direction, the second direction and the third direction when the first swab moves forward in the target container, the head of the swab can be controlled to reach the target position of the target container according to the reaction force of the head of the swab in the first direction, the torque of the head of the swab in the opposite direction of the first direction, the force and torque of the head of the swab in the second direction, and the force and torque of the head of the swab in the third direction, so as to achieve accurate determination that the swab has reached the target position of the target container when the swab is placed in the container, thereby avoiding the problem of the swab falling from the target container due to the swab not being completely placed in the target position of the target container.

[0071] Among them, if the robotic arm is a six-axis robotic arm, an end-type six-axis force sensor is installed on the end effector of the robotic arm, and the force and torque of the head of the first swab in the first direction, the second direction and the third direction are respectively obtained when the first swab moves forward in the target container. It can include: obtaining the force and torque of the head of the first swab in the first direction, the second direction and the third direction respectively when the first swab moves forward in the target container through the end-type six-axis force sensor.

[0072] If the robot arm is a seven-axis robot arm, the force and torque of the head of the first swab in the first direction, the second direction and the third direction satisfy the following formula: w = (J T ) -1 τ; wherein w includes the force and torque vector of the head of the first swab in the first direction, the second direction and the third direction, J T is the transpose of the Jacobian matrix, and τ contains the vector of torques for each axis of the robot.

[0073] Among them, τ includes the vector of the torque of each axis of the robotic arm, which can be understood as: τ includes the vector of the torque of each axis of the seven axes of the robotic arm.

[0074] It should be noted that in the present application, a force sensor is installed on each axis of the seven-axis robotic arm.

[0075] For example, Among them, x is the force in the second direction, y is the force in the third direction, z is the force in the first direction, γ x is the torque in the second direction, r y is the torque in the third direction, r z is the torque in the first direction.

[0076] Another example, Among them, τ1 to τ6 are the vectors of torques of each axis of the robot arm.

[0077] Optionally, controlling the robot arm to move so that the head of the first swab moves forward in the target container includes: when the first swab is oriented in a vertical direction, controlling the robot arm to move so that the head of the first swab moves forward in the target container.

[0078] Optionally, before respectively obtaining the force and torque applied to the head of the first swab in the first direction, the second direction and the third direction when the first swab moves forward in the target container, the method further includes: adjusting the direction in which the first swab moves forward in the target container according to the force and torque applied to the head of the first swab in the second direction and the force and torque applied to the head of the first swab in the third direction, to obtain the adjusted direction in which the first swab moves forward in the target container; and controlling the movement of the robotic arm to make the head of the first swab move forward in the target container, including: controlling the movement of the robotic arm to control the first swab to move forward in the target container according to the adjusted direction in which the first swab moves forward in the target container.

[0079] See also Figure 4 , Figure 4 A schematic diagram of a swab placement device provided in an embodiment of the present application. Figure 4 As shown, a swab placement device 400 provided in an embodiment of the present application is equipped with a robotic arm, the end of the robotic arm is connected to the swab, and the swab placement device 400 includes a first acquisition module 401, a processing module 402, a determination module 403, a second acquisition module 404, and a moving module 405.

[0080] Among them, the first acquisition module 401 is used to acquire the first image and the second image, the first image is an image of at least two containers in the first container rack before controlling the robotic arm to place the first swab, and at least one of the at least two containers has a swab placed therein, and the second image is an image of at least one container in the second container rack, and at least one of the second container rack has a swab placed therein; the processing module 402 is used to process the second image to obtain a third image, and the third image includes the container with the swab placed therein; the determination module 403 is used to determine the remaining containers in the first image according to the first image and the third image, and the remaining containers are containers in which no swab is placed among the at least two containers; the second acquisition module 404 is used to obtain the position of the target container in the remaining containers on the first container rack to obtain the target position information, and the target container is a container in the remaining containers with the identity information of the collection object attached thereto; the moving module 405 is used to control the robotic arm to move to the top of the target container according to the target position information, and control the robotic arm to place the first swab into the target container.

[0081] It can be seen that in the above technical scheme, the third image is obtained by processing the acquired second image, and then the remaining containers in the first image are determined according to the acquired first image and the third image, and the position of the target container in the remaining containers on the first container rack is obtained, and then the target position information is obtained. According to the target position information, the robotic arm is controlled to move above the target container, and the robotic arm is controlled to place the swab into the target container to achieve more efficient placement of the swab, thereby increasing the placement efficiency and ensuring the efficiency of the entire nucleic acid detection process.

[0082] Optionally, when processing the second image to obtain a third image, the processing module 402 is used to obtain other pixel values ​​except the first pixel value from the second image; determine the second pixel value based on the other pixel values ​​and the first pixel value; and process other pixel values ​​in the second image based on the second pixel value to obtain a third image, wherein the other pixel values ​​in the third image are all the second pixel values.

[0083] The second pixel may be determined by calculating the pixel value with the largest difference from the first pixel among other pixels, or by calculating the sum of the average value of other pixel values ​​and the first pixel value, or by calculating the difference between the maximum pixel value among other pixel values ​​and the first pixel value. The method for determining the second pixel value is not limited here.

[0084] It can be seen that in the above technical solution, by obtaining other pixel values ​​except the first pixel value from the second image, determining the second pixel value according to the other pixel values ​​and the first pixel value, and processing the other pixel values ​​in the second image according to the second pixel value, the third image is obtained by using the pixel difference. At the same time, by determining the second pixel value according to the other pixels except the first pixel obtained in the second image and the first pixel value, the second image can be processed according to the second pixel value to obtain the third image, thereby making the difference in pixel values ​​between the pixel corresponding to the container for placing the swab and other pixels in the third image more obvious.

[0085] Optionally, when determining the remaining containers in the first image according to the first image and the third image, the determination module 403 is used to determine the difference between the pixel value of each pixel and the first pixel value according to the pixel value of each pixel and the first pixel value; and is also used to determine the difference between the pixel value of each pixel and the second pixel value according to the pixel value of each pixel and the second pixel value. If there is a first difference less than or equal to a first threshold value in the difference between the pixel value of each pixel and the first pixel value, and the difference between the pixel value of the pixel corresponding to the first difference and the second pixel value is greater than or equal to the second threshold value, then the remaining containers in the first image are determined according to the pixel value of the pixel corresponding to the first difference.

[0086] It can be seen that in the above technical solution, by respectively determining the difference between each pixel value and the first pixel value and the second pixel value, the remaining container can be determined more accurately based on the difference, thereby avoiding mistakenly determining the container with the swab placed as the remaining container. Thus, the accuracy of swab placement is ensured.

[0087] Optionally, when obtaining the position of the target container in the remaining containers on the first container rack and obtaining the target position information, the second acquisition model 404 is used to obtain the position of the target container in the remaining containers on the first container rack and obtain the target position information, and the target container is the container in the remaining containers with the identity information of the collection object attached thereto.

[0088] Optionally, the robot arm is controlled to place the first swab into the target container, and the moving module 405 is used to control the robot arm to move above the target container according to the target position information, and control the robot arm to place the first swab into the target container.

[0089] See also Figure 5 , Figure 5 A schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present application.

[0090] The embodiment of the present application provides an electronic device for swab placement, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the processor to execute instructions including the steps in any one of the swab placement methods. Figure 5 As shown, the electronic device of the hardware operating environment involved in the embodiment of the present application may include:

[0091] Processor 501, such as CPU.

[0092] Memory 502, optionally, the memory may be a high-speed RAM memory, or a stable memory, such as a disk memory.

[0093] The communication interface 503 is used to realize the connection and communication between the processor 501 and the memory 502 .

[0094] Those skilled in the art will understand that Figure 5 The structure of the electronic device shown in the figure does not constitute a limitation thereto, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0095] like Figure 5As shown, the memory 502 may include an operating system, a network communication module, and one or more programs. The operating system is a program that manages and controls server hardware and software resources and supports the operation of one or more programs. The network communication module is used to realize communication between components inside the memory 502, and communication with other hardware and software inside the electronic device.

[0096] exist Figure 5 In the electronic device shown, the processor 501 is used to execute one or more programs in the memory 502 to implement the following steps:

[0097] Acquire a first image and a second image, wherein the first image is an image of at least two containers in a first container rack before controlling the robotic arm to place a first swab, wherein one of the at least two containers has a swab placed therein, and the second image is an image of at least one container in a second container rack, wherein the at least one container in the second container rack has a swab placed therein;

[0098] Processing the second image to obtain a third image, wherein the third image includes a container in which the swab is placed;

[0099] Determine, according to the first image and the third image, a remaining container in the first image, where the remaining container is a container in which no swab is placed among the at least two containers;

[0100] Obtain the position of the target container in the remaining containers on the first container rack to obtain target position information, where the target container is a container in the remaining containers with identity information of the collection object attached thereto;

[0101] According to the target position information, the robotic arm is controlled to move above the target container, and the robotic arm is controlled to place the first swab into the target container.

[0102] The specific implementation of the electronic device involved in the present application can be found in the various embodiments of the above-mentioned swab placement method, which will not be described in detail here.

[0103] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the stored computer program is executed by the processor to implement the following steps:

[0104] Acquire a first image and a second image, wherein the first image is an image of at least two containers in a first container rack before controlling the robotic arm to place a first swab, wherein one of the at least two containers has a swab placed therein, and the second image is an image of at least one container in a second container rack, wherein the at least one container in the second container rack has a swab placed therein;

[0105] Processing the second image to obtain a third image, wherein the third image includes a container in which the swab is placed;

[0106] Determine, according to the first image and the third image, a remaining container in the first image, where the remaining container is a container in which no swab is placed among the at least two containers;

[0107] Obtain the position of the target container in the remaining containers on the first container rack to obtain target position information, where the target container is a container in the remaining containers with identity information of the collection object attached thereto;

[0108] According to the target position information, the robotic arm is controlled to move above the target container, and the robotic arm is controlled to place the first swab into the target container.

[0109] The specific implementation of the computer-readable storage medium involved in the present application can be found in the various embodiments of the above-mentioned swab placement method, which will not be described in detail here.

[0110] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0111] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A swab placement method, characterized in that: The method is applied to a swab placement device, the swab placement device includes a mechanical arm, the end of the mechanical arm is connected to a first swab, and a cell sample of a collection object is collected on the first swab. The method includes: Acquire a first image and a second image, wherein the first image is an image of at least two containers in a first container rack before controlling the robotic arm to place the first swab, and at least one of the at least two containers has a swab placed therein, and the second image is an image of at least one container in a second container rack, and at least one of the second container rack has a swab placed therein; Processing the second image to obtain a third image, wherein the third image includes a container in which the swab is placed; Determine, according to the first image and the third image, a remaining container in the first image, wherein the remaining container is a container in which no swab is placed among the at least two containers; Acquire the position of a target container in the remaining containers on the first container rack to obtain target position information, wherein the target container is a container in the remaining containers with the identity information of the collection object attached thereto; According to the target position information, controlling the robotic arm to move to above the target container, and controlling the robotic arm to place the first swab into the target container; The pixel corresponding to the container in which the swab is placed in the third image is a first pixel value, and the processing of the second image to obtain the third image includes: Acquire other pixel values ​​except the first pixel value from the second image; Determine a second pixel value according to the other pixel values ​​and the first pixel value; According to the second pixel value, the other pixel values ​​in the second image are processed to obtain the third image, and the other pixel values ​​in the third image are all the second pixel values; The second pixel value is a pixel value having the largest difference with the first pixel value among the other pixel values; or The second pixel value is the sum of the average value of the other pixel values ​​and the first pixel value; or, The second pixel value is a difference between a maximum pixel value among the other pixel values ​​and the first pixel value; The step of determining remaining containers in the first image according to the first image and the third image includes: Obtaining a pixel value of each pixel in the first image; The remaining containers in the first image are determined according to the pixel value of each pixel, the first pixel value and the second pixel value in the third image.

2. The method according to claim 1, characterized in that: The determining the remaining containers in the first image according to the pixel value of each pixel, the first pixel value and the second pixel value in the third image comprises: Determine, according to the pixel value of each pixel and the first pixel value, a difference between the pixel value of each pixel and the first pixel value; Determine, according to the pixel value of each pixel and the second pixel value, a difference between the pixel value of each pixel and the second pixel value; If there is a first difference value less than or equal to a first threshold value in the difference values ​​between the pixel value of each pixel and the first pixel value, and the difference between the pixel value of the pixel corresponding to the first difference value and the second pixel value is greater than or equal to a second threshold value, the remaining containers in the first image are determined according to the pixel value of the pixel corresponding to the first difference value.

3. The method according to claim 1, characterized in that The controlling the robotic arm to place the first swab into the target container includes: Controlling the movement of the robot arm to move the head of the first swab forward in the target container; respectively obtaining the force and torque of the head of the first swab in a first direction, a second direction, and a third direction when the first swab moves forward in the target container, wherein the first direction is the direction in which the first swab moves forward, and the first direction, the second direction, and the third direction are perpendicular to each other; The head of the first swab is controlled to reach a target position of the target container according to the reaction force of the head of the first swab in the first direction, the torque of the head of the first swab in the direction opposite to the first direction, the force and torque of the head of the first swab in the second direction, and the force and torque of the head of the first swab in the third direction.

4. A swab placement device, characterized in that: The device is equipped with a mechanical arm, the end of which is connected to a first swab, on which a cell sample of a collection object is collected, and the device comprises a first acquisition module, a processing module, a determination module, a second acquisition module and a moving module; The first acquisition module is used to acquire a first image and a second image, wherein the first image is an image of at least two containers in a first container rack before the robot arm is controlled to place the first swab, and at least one of the at least two containers has a swab placed therein, and the second image is an image of at least one container in a second container rack, and at least one of the second container rack has a swab placed therein; The processing module is used to process the second image to obtain a third image, wherein the third image includes a container in which the swab is placed; The determining module is used to determine the remaining container in the first image according to the first image and the third image, wherein the remaining container is a container in which no swab is placed among the at least two containers; The second acquisition module is used to acquire the position of a target container in the remaining containers on the first container rack to obtain target position information, wherein the target container is the remaining container with the identity information of the collection object attached thereto; The moving module is used to control the robot arm to move to above the target container according to the target position information, and control the robot arm to place the first swab into the target container; The pixel corresponding to the container in which the swab is placed in the third image is the first pixel value. When the second image is processed to obtain the third image, the processing module is used to Acquire other pixel values ​​except the first pixel value from the second image; Determine a second pixel value according to the other pixel values ​​and the first pixel value; Processing the other pixel values ​​in the second image according to the second pixel value to obtain the third image; The second pixel value is a pixel value having the largest difference with the first pixel value among the other pixel values; or The second pixel value is the sum of the average value of the other pixel values ​​and the first pixel value; or, The second pixel value is a difference between a maximum pixel value among the other pixel values ​​and the first pixel value; When determining the remaining containers in the first image according to the first image and the third image, the determining module is used to obtain a pixel value of each pixel in the first image; The determination module is further configured to determine remaining containers in the first image according to the pixel value of each pixel, the first pixel value and the second pixel value in the third image.

5. An electronic device for placing a swab, characterized in that: The method comprises a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and are used to generate instructions for the steps of the method according to any one of claims 1 to 3 by the processor.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 3.