Sample tube row group visual identification method, system and chip

Through the combined visual recognition technology of QR code or barcode labels, the high cost and low applicability of the existing biological sample library management system is solved, and the low cost and high recognition rate sample tube arrangement management is realized, which meets user-defined rules and judgments, and significantly improves the efficiency and accuracy of sample identification and arrangement management.

CN120411665APending Publication Date: 2025-08-01WUXI APPTEC SUZHOU +1

Patent Information

Application Number
CN202510342288.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing biological sample library management system uses RFID tags and antenna matrix, resulting in high equipment costs, high maintenance costs and poor applicability, which cannot meet user-defined alignment rules judgments.

Method used

The visual recognition technology of QR code or barcode tag combination is used to realize the visual recognition of sample tube arrangement through image sampling equipment, control terminal, cloud server and user interaction module, including image preprocessing, visual recognition and arrangement algorithm, a sample-hole position mapping table is generated, and users can customize rules to judge sample arrangement.

Benefits of technology

It reduces equipment costs, improves recognition rate and applicability, adds verification and statistical functions, and improves the efficiency and accuracy of sample identification and arrangement management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411665A_ABST
    Figure CN120411665A_ABST
Patent Text Reader

Abstract

The invention discloses a visual identification method and system for a sample tube row group and a chip. The method comprises the following steps: acquiring image data of a sample according to a received control instruction; generating a mapping table according to image data processing; obtaining rule data; judging whether the mapping table meets the rule or not according to the rule data to obtain comparison data; the system comprises an image sampling device which is used for receiving a control instruction and carrying out image sampling according to the control instruction to obtain image data; the control terminal is used for communicating with the image sampling equipment to transmit a control instruction, receiving image data, communicating with the cloud server to obtain rule data, processing the image data to obtain a mapping table, obtaining the rule data and the mapping table, and comparing whether the mapping table meets the rule data or not to obtain comparison data; and the data recording and counting module is used for acquiring and storing the data and transmitting the data to the cloud server through the communication control module for storage and monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual recognition of sample tube rows, and specifically relates to a method, system and chip for visual recognition of sample tube rows. Background Art

[0002] Currently, in one or more sample containers, the arrangement of a group or multiple groups of samples is recognized in batches to generate a hole position - sample mapping diagram to verify whether the hole positions where the samples are located are correct, and whether the sorting of the samples in each direction meets the requirements is judged according to user - defined rules, and the recognized samples are counted. Compared with the prior art (the intelligent management system and its management method based on RFID with the patent number CN113762435A) which uses RFID tags and an antenna matrix, its disadvantages are high equipment cost, high maintenance cost, and poor applicability (the sample containers must be adapted to the antenna matrix). Therefore, it is necessary to innovate a visual recognition solution through a combination of two - dimensional code (or bar code) tags. On the premise of ensuring the recognition rate as much as possible, the above - mentioned disadvantages are compensated, and it is realized that users are allowed to define rules to judge whether the arrangement requirements are met. Summary of the Invention

[0003] The technical problem to be solved by the present invention is that the existing management system uses RFID tags and an antenna matrix, with disadvantages of high equipment cost, high maintenance cost, and poor applicability. The present invention provides a method for visual recognition of sample tube rows, and also provides a system for visual recognition of sample tube rows, which can reduce costs, improve applicability and recognition rate, while adding functions of verification, statistics and custom rules, significantly improving the efficiency and accuracy of sample recognition and arrangement management, so as to solve the defects caused by the prior art.

[0004] To solve the above - mentioned technical problems, the present invention provides the following technical solutions:

[0005] In the first aspect, a method for visual recognition of sample tube rows, which includes the following steps:

[0006] Obtain image data of the sample according to the received control instruction;

[0007] Generate a mapping table according to the image data processing;

[0008] Obtain rule data;

[0009] Judge whether the mapping table meets the rules according to the rule data to obtain comparison data.

[0010] The above - mentioned method for visual recognition of sample tube rows, wherein the specific method for generating a mapping table according to the image data processing is as follows:

[0011] Perform normalization processing on the image data to obtain pre - processed image data;

[0012] Perform visual recognition on the preprocessed image data to obtain the label information of the image;

[0013] Perform arrangement processing on the label information to obtain a mapping table.

[0014] The above-mentioned method for visual recognition of sample tube arrangement, wherein the standard formatting process includes format conversion, grayscale threshold sampling, effective area recognition, image horizontal correction, and cropping;

[0015] The label information includes image content data and geometric coordinate information of the image QR code / barcode;

[0016] The arrangement processing includes rasterizing the geometric coordinate information of the image QR code / barcode to determine the row and column where each sample is located, and outputting the mapping table of sample-hole positions.

[0017] In a second aspect, a visual recognition system for sample tube arrangement, which includes an image sampling device, a control terminal, a cloud server, and a user interaction module. A plurality of the image sampling devices are respectively connected to the control terminal to perform data interaction, a plurality of the control terminals are connected to the cloud server to perform data interaction, and the cloud server is connected to the user interaction module to perform data interaction;

[0018] The image sampling device is used to receive a control instruction and perform image sampling according to the control instruction to obtain image data;

[0019] The control terminal includes a communication control module, a data processing module, a data management module, and a data recording and statistics module;

[0020] The communication control module is used to communicate with the image sampling device to transmit the control instruction, receive the image data, and is also used to communicate with the cloud server to obtain rule data;

[0021] The data processing module is used to process the image data to obtain a mapping table;

[0022] The data management module is used to obtain the rule data and the mapping table, and compare whether the mapping table meets the rule data to obtain comparison data;

[0023] The data recording and statistics module is used to obtain and store the image data, the rule data, the mapping table, and the comparison data, and transmit them to the cloud server through the communication control module for storage and monitoring;

[0024] The user interaction module is used for data interaction between the user and the cloud server;

[0025] The cloud server is used to synchronize historical data with each of the control terminals in real time.

[0026] In the above-mentioned visual recognition system for a sample tube row group, the data processing module includes an image preprocessing module, a visual recognition module, and a row group algorithm module;

[0027] The image preprocessing module is used to perform standard formatting processing on the image data to obtain image preprocessing data;

[0028] The visual recognition module is used to perform visual recognition on the image preprocessing data and output the label information of the image;

[0029] The row group algorithm module is used to perform row group processing on the label information to obtain a mapping table.

[0030] In the above-mentioned visual recognition system for a sample tube row group, the standard formatting processing includes grayscale threshold sampling and image horizontal correction and cropping;

[0031] The label information includes image content data and geometric coordinate information of the image QR code / barcode;

[0032] The row group processing includes rasterizing the layout of the geometric coordinate information of the image QR code / barcode to determine the row and column where each sample is located, and outputting the mapping table of sample-hole positions.

[0033] In the above-mentioned visual recognition system for a sample tube row group, the data recording and statistics module has a terminal status data module built in, and the image sampling device has a device status data module built in;

[0034] The terminal status data module is used to collect the terminal status data of the control terminal and store it in the data recording and statistics module. The terminal status data includes terminal operation logs, terminal running logs, and terminal exception data;

[0035] The device status data module is used to collect the device status data of the image sampling device and transmit it to the data recording and statistics module. The device status data includes device working status, device running logs, device operation logs, and device error warning information;

[0036] The data recording and statistics module is used to obtain the terminal status data and the device status data and upload them to the cloud server.

[0037] The above-mentioned visual recognition system for a sample tube row group, wherein the cloud server is built-in with a data storage module and a data monitoring module. The data storage module is used to obtain and store the image data, the rule data, the mapping table, the comparison data, the terminal status data, and the device status data. The data monitoring module is used to monitor the above data to obtain monitoring data.

[0038] The above-mentioned visual recognition system for a sample tube row group, wherein the communication control module includes a DSL compiler, a DSL bytecode interpreter, a basic communication program module, a hardware abstraction layer, and a remote communication program module;

[0039] The DSL compiler is used to read a DSL file and compile it into DSL bytecode, and the DSL bytecode is binary data;

[0040] The DSL bytecode interpreter records a processing scheme for interpreting and executing the manipulation data defined by the DSL file;

[0041] The basic communication program module is used to transmit the interpreted manipulation data to the image sampling device through a hardware interface;

[0042] The hardware abstraction layer is used to call the DSL bytecode and is also used to export fixed functions;

[0043] The remote communication program module is used to receive and update the DSL file distributed by the cloud server, and is also used to execute and respond to the control instructions issued by the cloud server and send the execution result of the instructions.

[0044] In a third aspect, a chip, wherein the chip stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0045] According to the technical solutions provided by the method, system, and chip for visual recognition of a sample tube row group of the present invention, the following technical effects are achieved:

[0046] Low cost: By means of two-dimensional code (or bar code) and visual recognition technology, the high-cost problems of RFID tags and antenna matrices in the prior art are avoided, and the equipment and maintenance costs are reduced; High applicability: There is no need for sample containers to adapt to specific equipment, improving the universality and flexibility of the technology; High recognition rate: On the premise of ensuring a high recognition rate, batch recognition of the sample arrangement method and generation of the hole position-sample mapping diagram are realized; Verification function: It can verify whether the sample hole positions are correct and judge whether the sample arrangement meets the requirements through user-defined rules, improving the accuracy and intelligence of the operation; Statistical function: It can perform statistics on the recognized samples, further enhancing the data processing ability; Flexibility: It allows users to define rules by themselves to meet diverse arrangement requirements, improving the practicality of the technology; In short, while reducing costs, improving applicability and recognition rate, the present invention adds functions of verification, statistics and self-defined rules, significantly improving the efficiency and accuracy of sample recognition and arrangement management. Description of the Drawings

[0047] Figure 1 It is a flow chart of a visual recognition method for a sample tube row group of the present invention;

[0048] Figure 2 It is a structural schematic diagram of a visual recognition system for a sample tube row group of the present invention;

[0049] Figure 3 It is a structural schematic diagram of a communication control module in a visual recognition system for a sample tube row group of the present invention;

[0050] Figure 4 It is a schematic diagram of the DSL compilation result;

[0051] Figure 5 It is a schematic diagram of the hardware abstraction layer call process;

[0052] Figure 6 It is a work flow chart of an image preprocessing module in a visual recognition system for a sample tube row group of the present invention;

[0053] Figure 7 It is an effect diagram after processing by an image preprocessing module in a visual recognition system for a sample tube row group of the present invention;

[0054] Figure 8 It is a work flow chart of a visual recognition module in a visual recognition system for a sample tube row group of the present invention;

[0055] Figure 9 It is a schematic diagram of the recognition result of a visual recognition module in a visual recognition system for a sample tube row group of the present invention;

[0056] Figure 10 It is a schematic diagram of the two-dimensional code recognition rectangular area;

[0057] Figure 11 This is the flowchart of the row group algorithm module in a visual recognition system for a sample tube row group of the present invention;

[0058] Figure 12 This is the schematic diagram of the result of the row group algorithm module in a visual recognition system for a sample tube row group of the present invention;

[0059] Figure 13 This is the final effect diagram;

[0060] Figure 14 This is the flowchart of the data management module in a visual recognition system for a sample tube row group of the present invention;

[0061] Figure 15 This is the description diagram showing only the lighting control part of the DSL file;

[0062] Figure 16 This is the description diagram showing only the lighting control part of the DSL file.

[0063] Among them, the reference numerals are as follows:

[0064] Image sampling device 100, control terminal 200, cloud server 300, user interaction module 400, communication control module 101, data processing module 102, data management module 103, data recording and statistics module 104, image preprocessing module 105, visual recognition module 106, row group algorithm module 107, DSL compiler 108, DSL bytecode interpreter 109, basic communication program module 110, hardware abstraction layer 111, remote communication program module 112, data storage module 301, data monitoring module 302. Detailed implementation manners

[0065] In order to make the technical means, creative features, achieved purposes and effects of the invention easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the specific drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments.

[0066] All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0067] It should be noted that the structures, proportions, sizes, etc. shown in the drawings of this specification are only used to cooperate with the content disclosed in the specification for those familiar with this technology to understand and read, and are not used to limit the conditions for the implementation of the present invention. Therefore, they do not have substantial technical significance. Any modification of the structure, change in the proportional relationship, or adjustment of the size, without affecting the efficacy that the present invention can produce and the purpose that can be achieved, should still fall within the scope that can be covered by the technical content disclosed in the present invention.

[0068] At the same time, the terms such as "upper", "lower", "left", "right", "middle", and "one" cited in this specification are only for the convenience of clear narration and are not used to limit the scope of implementation of the present invention. The change or adjustment of their relative relationship, without substantial change in the technical content, should also be regarded as the scope within which the present invention can be implemented.

[0069] The purpose of the present invention is to reduce costs, improve applicability and recognition rate, while adding functions of verification, statistics, and custom rules, significantly enhancing the efficiency and accuracy of sample recognition and arrangement management.

[0070] As Figure 1 shown, in the first embodiment, a method for visual recognition of a sample tube row group, which includes the following steps:

[0071] Obtain the image data of the sample according to the received control instruction;

[0072] Generate a mapping table according to the image data processing;

[0073] Obtain rule data;

[0074] Judge whether the mapping table meets the rules according to the rule data to obtain comparison data.

[0075] For the above-mentioned method for visual recognition of a sample tube row group, the specific method for generating a mapping table according to the image data processing is as follows:

[0076] Perform standardization processing on the image data to obtain image preprocessing data;

[0077] Perform visual recognition on the image preprocessing data to obtain the label information of the image;

[0078] Perform row group processing on the label information to obtain a mapping table.

[0079] For the above-mentioned method for visual recognition of a sample tube row group, the standard formatting processing includes format conversion, gray threshold sampling, effective area recognition, image horizontal correction, and cropping;

[0080] The label information includes image content data and geometric coordinate information of the image QR code / barcode;

[0081] The arrangement and grouping process includes rasterizing the geometric coordinate information of the image QR code / barcode to determine the rows and columns where each sample is located, and outputting a mapping table of sample-hole positions.

[0082] The second embodiment, as Figure 2 shown, is a visual recognition system for arranging and grouping sample tubes. Among them, it includes an image sampling device 100, a control terminal 200, a cloud server 300, and a user interaction module 400. Multiple image sampling devices 100 are respectively connected to the control terminal 200 to create data interaction. Multiple control terminals 200 are connected to the cloud server 300 to create data interaction. The cloud server 300 is connected to the user interaction module 400 to create data interaction;

[0083] The image sampling device 100 is used to receive control instructions and perform image sampling according to the control instructions to obtain image data;

[0084] The control terminal 200 includes a communication control module 101, a data processing module 102, a data management module 103, and a data recording and statistics module 104;

[0085] The communication control module 101 is used to communicate with the image sampling device 100 for transmitting control instructions, receive image data, and is also used to communicate with the cloud server 300 to obtain rule data;

[0086] The data processing module 102 is used to process the image data to obtain a mapping table;

[0087] The data management module 103 is used to obtain rule data and the mapping table, and compare whether the mapping table meets the rule data to obtain comparison data;

[0088] The data recording and statistics module 104 is used to obtain, store image data, rule data, the mapping table, and comparison data, and transmit them to the cloud server 300 through the communication control module 101 for storage and monitoring;

[0089] The user interaction module 400 is used for data interaction between the user and the cloud server 300, including a user interaction interface program. The user can control the image sampling device 100 through the user interaction module 400; the interface of the user interaction module 400 displays the scanning result, as well as warning or error information (if any) to the user; provides an interface for the user to query the historical record;

[0090] The cloud server 300 is used to synchronize historical data with each control terminal 200 in real time;

[0091] The cloud server 300 provides network data storage services, enabling terminals to synchronize data through network links. The cloud server 300 provides unified supervision services for users' terminals, including: version control of the programs on the terminal 200, including update checks and OTA upgrades; controlling the update, switching, and release of the device DSL files of the terminal 200; controlling the access rights of the users of the terminal 200; publishing and updating user rules; monitoring the status of the image sampling device 100, including remote fault location and remote control of the image sampling device 100.

[0092] As Figures 6-7 shown, the image processing module includes an image preprocessing module 105, a visual recognition module 106, and an arrangement algorithm module 107;

[0093] The image preprocessing module 105 (IPM) processes the image data transmitted back by the image sampling device 100 and is responsible for the following functions:

[0094] Standard format conversion: The format of the image data transmitted back by the image sampling device 100 is usually determined by the manufacturer. Common formats include 32bpp ARGB, 24bpp RGB, etc. To facilitate unified processing by downstream modules, the image preprocessing module 105 converts it into a unified standard format;

[0095] Gray-scale sampling: The image data transmitted back by the image sampling device 100 is usually a color picture. However, color pictures are not conducive to visual recognition and color data is not required either. Therefore, the image preprocessing module 105 converts it into a gray-scale image through gray-scale threshold sampling. It should be noted that to improve the recognition accuracy, usually the image preprocessing module 105 will perform multiple samplings according to different thresholds and then synthesize a gray-scale image. The exposure levels of different parts of the picture are different. For example, the part directly under the light source has much higher brightness than the surrounding parts due to reflection. If a fixed threshold is used for gray-scale sampling, some image data will be lost;

[0096] Horizontal correction and cropping: The original image may contain blank areas. A large amount of blank not only is not conducive to accurate recognition but also greatly affects the processing efficiency of downstream modules. Therefore, the image preprocessing module 105 will first perform edge scanning to identify the rectangular border of the largest effective area. In some cases, the rectangle may not be horizontal, so it is necessary to perform horizontal correction on the rectangular area to make it horizontal and then crop out the effective area;

[0097] As Figures 8-10As shown, the visual recognition module 106 (VRM) mainly functions to recognize all two-dimensional codes or barcodes in an image and collect the geometric coordinate information of the two-dimensional code area. Existing two-dimensional code products have low recognition accuracy for small-sized two-dimensional codes in complex images and cannot meet the requirements of existing business scenarios. To solve this problem, this solution uses multi-instance aggregation scanning technology (Mias) and region overlap merging technology (Rom) to greatly improve the recognition rate of two-dimensional codes. The implementation method is as follows:

[0098] Different recognition algorithms have different success rates in recognizing two-dimensional codes in different states. Therefore, Mias creates different instances for multiple algorithms and recognizes the image in parallel;

[0099] Different instance running parameters (such as zoom ratio, brightness or grayscale, edge sharpness, edge detection sensitivity, etc.) have different success rates in recognizing two-dimensional codes in different states. Therefore, Mias creates predefined parameter combinations for some common scenarios and creates an instance for each combination to recognize the image in parallel;

[0100] The results returned by the above parallel recognition are bound to be repeated. Therefore, through Rom technology, the result is traversed to detect and merge overlapping two-dimensional code areas. In principle, the recognition areas of two different two-dimensional codes or barcodes cannot overlap. For the effect diagram, see "Schematic Diagram of Recognition Results";

[0101] The visual recognition module 106 will finally output a result set, that is, label information, which contains all successfully recognized results and the geometric coordinate information of each result - the four vertices of the rectangular area of the two-dimensional code or barcode, as Figure 10 shown, the vertex identification in the schematic diagram of the two-dimensional code recognition rectangular area;

[0102] As Figures 11-13 shown, the permutation algorithm module 107 (GAM) mainly realizes the following functions: through the XY axis-cross-clustering technology (XY-ACC), it summarizes and identifies the permutation and combination layout of the result set output by VRM and creates a mapping table;

[0103] The implementation method of XY-ACC is as follows:

[0104] 1) Calculate the geometric center of each two-dimensional code rectangular area in the result set output by VRM;

[0105] 2) Calculate the projections of the geometric center on the XY axis respectively. As Figure 12 shown in the schematic diagram of GAM results, the geometric center is projected onto the XY axis;

[0106] 2) Use the density scan clustering algorithm to cluster and summarize the projected coordinates of the X-axis (horizontal) and Y-axis (vertical) respectively, obtaining several clusters, as Figure 12 shown in the schematic diagram of the GAM result, the projections of the XY axes are clustered respectively to obtain clusters;

[0107] 3) Cross-compare the induction results of the two axes. The clusters obtained from the projection of the Y-axis can determine the row labels, and the clusters obtained from the projection of the X-axis can determine the column labels. Combining them can determine the hole position where each result is located, as Figure 12 shown in the schematic diagram of the GAM effect, the hole position coordinates are obtained by comparing the cluster numbers.

[0108] Standard formatting processing includes grayscale threshold sampling and image horizontal correction and cropping;

[0109] The label information includes the image content data and the geometric coordinate information of the image QR code / barcode;

[0110] The arrangement and grouping processing includes rasterizing the geometric coordinate information of the image QR code / barcode to determine the row and column where each sample is located, and outputting the mapping table of sample-hole positions.

[0111] As Figure 14 shown, the data management module 103 (URM) has the following functions:

[0112] 1) After obtaining the hole position mapping table, it is necessary to check whether the arrangement of the samples meets the conditions according to the rules defined by the user, and collect warning or error information (defined by the user);

[0113] 2) Query the mapping table data scanned previously. If there is any, judge whether each sample is consistent with the previous hole position. If not, generate warning or error information. If not, store the mapping table data scanned this time into the database (the storage method is specifically implemented by the data record and statistics module 104. Implementation method: One or more general scripting languages can be selected to allow the user to customize. Commonly used ones are JavaScript, Python, and VBS. If the designed rules are relatively simple, a plain text configuration file can be used to define. No matter which language is used to define the rules, a corresponding interpreter is required. The interpreter is responsible for interpreting the rules, reading the mapping table output by the GAM, judging, and then collecting information).

[0114] We have the following specific requirements for the data record and statistics module 104 (DRSM): The data record and statistics module 104 (DRSM) has the following functions:

[0115] Responsible for storing the mapping table data generated by the GAM; responsible for providing interfaces for querying historical records and sample statistical results; responsible for storing operation logs, including comparison results, error messages, and warning messages; responsible for transmitting the above data to the cloud server 300 via the network so that each terminal can process collaboratively; when the network is unavailable, the data is temporarily stored in the local queue, and when the network resumes, the data is retransmitted to the cloud server 300 in sequence.

[0116] The data recording and statistics module 104 has a terminal status data module built-in, and the image sampling device 100 has a device status data module built-in;

[0117] The terminal status data module is used to collect the terminal status data of the control terminal 200 and store it in the data recording and statistics module 104. The terminal status data includes terminal operation logs, terminal running logs, and terminal exception data;

[0118] The device status data module is used to collect the device status data of the image sampling device 100 and transmit it to the data recording and statistics module 104. The device status data includes device working status, device running logs, device operation logs, device error warning information, and device firmware version control;

[0119] The data recording and statistics module 104 is used to obtain the terminal status data and device status data and upload them to the cloud server 300.

[0120] The cloud server 300 has a data storage module 301 and a data monitoring module 302 built-in. The data storage module 301 is used to obtain image data, rule data, mapping tables, comparison data, terminal status data, and device status data and store them. The data monitoring module 302 is used to monitor the above data to obtain monitoring data.

[0121] As Figures 3-4 shown, the communication control module 101 includes a DSL compiler 108, a DSL bytecode interpreter 109, a basic communication program module 110, a hardware abstraction layer 111, and a remote communication program module 112;

[0122] The DSL compiler 108 is used to read the DSL file and compile it into DSL bytecode. The DSL bytecode is binary data;

[0123] The DSL bytecode interpreter 109 records a processing scheme for interpreting and executing the manipulation data defined by the DSL file;

[0124] The basic communication program module 110 is used to transmit the interpreted manipulation data to the image sampling device 100 through the hardware interface;

[0125] The hardware abstraction layer 111 is used to call the DSL bytecode and is also used to export fixed functions;

[0126] The remote communication program module 112 is used to receive the DSL file distributed by the cloud server 300 and update it, and is also used to execute and respond to the control instructions issued by the cloud server 300, and send the execution results of the instructions.

[0127] When the image sampling device 100 performs sampling, it is based on the label information of the QR code / barcode. In order to ensure the recognition accuracy and recognition precision of small QR codes (the effective area size is less than 8mm×8mm), the image sampling device 100 uses a super high-definition device (the imaging photo is greater than 20 million pixels). However, it should be clear that the super high-definition device is not necessary. In some scenarios (for example, on some large sampling tubes, the QR code labels are allowed to exceed the above size), the device specifications can be reduced;

[0128] The control terminal 200 can use a Windows PC device (but not limited to this). The control terminal 200 runs a core computer program that contains all the necessary program modules as follows:

[0129] As Figure 3 As shown, the communication control module (ECC module) is responsible for the underlying data transmission between the control terminal 200 and the image sampling device 100, and interprets the data according to the protocol described by DSL, so that the ECC program can correctly send instructions to the image sampling device 100 and make correct responses according to the received data; the ECC module reports the device operation status, event logs, and error warning information to the cloud server 300 regularly through the MQTT protocol; the supervision instructions of the cloud server 300 received by the ECC module include: the update of the DSL file, the status control of the device;

[0130] Related definitions:

[0131] As Figure 5 As shown, the hardware abstraction layer 111 (HAL) is a very mature technology in the traditional computer field and is commonly used for the interaction between computer operating systems and underlying hardware. The original design intention is to simplify the call of the underlying hardware by computer operating system programs. Its essence is the abstract encapsulation of hardware call interfaces, and the hardware manufacturer is responsible for the specific implementation of the interfaces; in this solution, the role of HAL is similar. In order for the program to correctly call the device functions, it is necessary to customize HAL. It is impossible to require all devices to implement the HAL interface. Therefore, to implement this function, it is necessary to combine DSL;

[0132] As Figures 15-16As shown, DSL, a domain-specific language, is essentially a custom programming language or scripting language. Different from general-purpose programming languages (such as C++ and Java), DSL is dedicated to specific business scenarios and is used to describe business data and business logic related to specific scenarios. In this solution, a custom DSL is used to describe the communication protocols of different devices;

[0133] The MQTT protocol, a network asynchronous communication protocol, is commonly used for communication between edge devices and hosts in the IoT field and has the characteristics of high efficiency, stability, and low energy consumption.

[0134] The image sampling device 100 must integrate an RS232 serial port or TTL communication hardware to receive control instructions from the control terminal 200 and transmit image data. The control commands include, but are not limited to, light control, focus control, focal length control, etc. However, since the communication protocols of each manufacturer are different, in order to achieve cost-minimized adaptation and integration, in this solution, the communication control module 101 in the control terminal 200 of the image sampling device 100 uses a hardware abstraction layer 111 (HAL, Hardware Abstract Layer) + domain-specific language (DSL, Domain Specific Language) to implement technically. The specific implementation theory is as follows:

[0135] 1. Basic communication program: Responsible for transmitting binary data to the hardware interface through a data link (wired or wireless);

[0136] 2. DSL file: That is, a communication protocol description file defined for a specific device;

[0137] 3. DSL compiler 108: When the program starts and when switching DSL files, it compiles the read DSL file into bytecode. Since the DSL file is a text file and the program interpretation execution efficiency is low, the compiler compiles it into bytecode to improve the interpretation execution efficiency; after compilation, a function table will be generated, and the function table contains the names of specific methods and the entry addresses of DSL bytecodes (as Figure 4 shown, the DSL compilation result schematic diagram);

[0138] 4. DSL bytecode: The binary data after compiling the DSL text, which is convenient for the DSL bytecode interpreter 109 to execute;

[0139] 5. DSL bytecode interpreter 109: Used to interpret and execute the methods of manipulating data defined by the DSL file, including but not limited to converting data, sending data, reading data, and interpreting data;

[0140] 6. HAL: The Hardware Abstraction Layer 111 is responsible for exporting fixed functions externally. Other modules control the device by calling the fixed functions exported by HAL. Based on this technology, ECC encapsulates and hides the details of the specific implementation of the communication protocol between the terminal and the device (the specific implementation is defined by DSL); internally, it is responsible for querying and calling specific DSL bytecodes. When HAL receives a call to a fixed exported function, it first finds the entry address corresponding to the function name in the function table internally. If the corresponding entry address is found, it notifies the DSL bytecode interpreter 109 to execute the bytecode at the corresponding address (as Figure 5 shown in the HAL call flow diagram);

[0141] 7. Fixed exported function: A standard function with unified parameters and unified return values.

[0142] Putting it in more popular terms: If ECC is a company, HAL is the reception room, the fixed exported function is the standard form formulated by the reception room, and DSL is the SOP (Standard Operating Procedure) within each department. When a customer (other program module) needs to submit a requirement to a certain department, there is no need to specifically understand how each department operates. Just fill in and submit the standard form to the reception room. The reception room will be responsible for passing the requirement to the specific department. After the department completes the work order according to the SOP, it returns the result data to the reception room, and the reception room then feedbacks it to the customer in a standard form.

[0143] Taking a simple example, to achieve the same function such as adjusting the device's light to the brightest:

[0144] As Figure 15 shown, in the device produced by manufacturer A, the instruction for adjusting the light intensity is as follows:

[0145]

[0146] Explanation: Bits 0 and 1 represent the frame header (in this example, a complete instruction is a frame, starting with the 2-byte fixed frame header A1A2). Bit 2 represents the length of the following data (in this example, the length of the following data is two bytes, i.e., C1FF). Bit 3 represents the specific command. In this example, C1 represents controlling the light. Bit 4 represents the brightness of the lighting lamp, with a value range of 00 to FF, where 00 is off and FF is the brightest.

[0147] As Figure 16 shown, in the device produced by manufacturer B, the instruction for adjusting the light intensity is as follows:

[0148]

[0149] Explanation: The 0th bit represents the frame header (in this example, a complete instruction is a frame, starting with a fixed 1-byte frame header FE). The 1st bit represents the total frame length. The 2nd bit represents the specific command. In this example, 0D represents controlling the light. The 3rd bit represents the brightness of the lighting fixture, with a value range of 00 to 64 (i.e., 0 to 100 in decimal, representing the brightness as a percentage), and FF means off. The last two bits are the CRC16 checksum value (a data verification algorithm used to check whether the data is distorted during transmission).

[0150] In addition, the responses of the device to the instructions are also different, which will not be elaborated here.

[0151] Thus, it can be seen that the communication protocols and control instructions for devices by different manufacturers can vary greatly. If traditional general-purpose programming languages are used for development, a large amount of effort is required for adaptation, and new devices cannot be changed at any time. Using the HAL+DSL technology in this solution, only relatively simple DSL definitions need to be made for the two devices respectively, and the program can correctly call the device's light adjustment function through the fixed functions exported by HAL. Because the DSL file can be dynamically compiled during program operation, there is no need to re-develop and debug the program every time a device is replaced. Only the corresponding DSL file needs to be switched to adapt to the device.

[0152] Third Embodiment, a chip, wherein the chip stores a computer program, and when the computer program is executed by a processor, the steps of any one of the methods in the first embodiment are implemented.

[0153] For example, the memory may include random access memory, flash memory, read-only memory, programmable read-only memory, non-volatile memory, or registers, etc.;

[0154] The processor may be a central processing unit (CPU), etc., or a graphic processing unit (GPU). The memory can store executable instructions;

[0155] The processor can execute the executable instructions stored in the memory, thereby implementing the various processes described herein.

[0156] It can be understood that the memory in this embodiment can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory;

[0157] Among them, the non-volatile memory can be ROM (Read-Only Memory), PROM (Programmable ROM), EPROM (Erasable PROM), EEPROM (Electrically EPROM), or flash memory.

[0158] The volatile memory can be RAM (Random Access Memory), which is used as an external cache.

[0159] By way of example but not limitation, many forms of RAM are available, such as SRAM (Static RAM), DRAM (Dynamic RAM), SDRAM (Synchronous DRAM), DDR SDRAM (Double Data Rate SDRAM), ESDRAM (Enhanced SDRAM), SLDRAM (Synchlink DRAM), and DRRAM (Direct Rambus RAM). The memories described herein are intended to include, but are not limited to, these and any other suitable types of memories 205.

[0160] In some embodiments, the memory stores elements such as an upgrade package, an executable unit, or a data structure, or subsets or supersets thereof: an operating system and application programs.

[0161] Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., and is used to implement various basic services and handle hardware-based tasks.

[0162] The application programs include various application programs and are used to implement various application services. The program for implementing the method of the embodiment of the present invention may be included in the application programs.

[0163] Those skilled in the art can understand that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of software and electronic hardware.

[0164] Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0165] Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0166] In the embodiments of this application, the disclosed systems, devices, and methods can be implemented in other ways;

[0167] For example, the division of units or modules is only a logical function division, and there can be other division methods in actual implementation;

[0168] For example, multiple units, modules, or components can be combined or integrated into another system;

[0169] In addition, each functional unit or module in the embodiments of this application can be integrated into one processing unit or module, or can exist separately physically, etc.

[0170] It should be understood that in various embodiments of this application, the magnitudes of the sequence numbers of the processes do not mean the order of execution is prior or subsequent. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application.

[0171] If the described function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a machine-readable storage medium;

[0172] Therefore, the technical solution of this application can be embodied in the form of a software product, which can be stored in a machine-readable storage medium. It can include several instructions to enable an electronic device to execute all or part of the processes of the technical solution described in the embodiments of this application;

[0173] The above storage medium can include various media such as ROM, RAM, removable disks, hard disks, magnetic disks, or optical discs that can store program codes.

[0174] In summary, a method, system, and chip for visual recognition of a sample tube row group according to the present invention can increase the functions of verification, statistics, and custom rules while reducing costs, improving applicability, and recognition rate, and significantly improve the efficiency and accuracy of sample recognition and arrangement management.

[0175] The specific embodiments of the invention have been described above. It should be understood that the invention is not limited to the above specific implementation manners. The devices and structures not described in detail should be understood to be implemented in the ordinary manner in the art; those skilled in the art can make various deformations or modifications within the scope of the claims, make several simple deductions, deformations, or substitutions, which do not affect the essence of the invention.

Claims

1. A visual recognition method for a sample tube row group, characterized in that, It includes the following steps: Obtain the image data of the sample according to the received control instruction; Generate a mapping table according to the processing of the image data; Obtain the rule data; Judge whether the mapping table meets the rules according to the rule data to obtain comparison data.

2. The visual recognition method for a sample tube row group according to claim 1, characterized in that, The specific method for generating a mapping table according to the image data is as follows: Perform standardization processing on the image data to obtain preprocessed image data; Perform visual recognition on the preprocessed image data to obtain the label information of the image; Perform arrangement processing on the label information to obtain a mapping table.

3. The visual recognition method for a sample tube row group according to claim 1, wherein The standard formatting processing includes format conversion, gray threshold sampling, valid area recognition, image horizontal correction, and cropping; The label information includes image content data and geometric coordinate information of the image QR code / barcode; The arrangement processing includes rasterizing the layout of the geometric coordinate information of the image QR code / barcode to determine the row and column where each sample is located, and outputting the mapping table of the sample-hole position.

4. A visual recognition system for a sample tube row group, characterized in that, It includes an image sampling device, a control terminal, a cloud server, and a user interaction module. A plurality of the image sampling devices are respectively connected to the control terminal to perform data interaction. A plurality of the control terminals are connected to the cloud server to perform data interaction. The cloud server is connected to the user interaction module to perform data interaction; The image sampling device is used to receive a control instruction and perform image sampling according to the control instruction to obtain image data; The control terminal includes a communication control module, a data processing module, a data management module, and a data recording and statistics module; The communication control module is used to communicate with the image sampling device to transmit the control instruction, receive the image data, and is also used to communicate with the cloud server to obtain rule data; The data processing module is used to process the image data to obtain a mapping table; The data management module is used to obtain the rule data and the mapping table, and compare whether the mapping table meets the rule data to obtain comparison data; The data recording and statistics module is used to obtain and store the image data, the rule data, the mapping table, and the comparison data, and transmit them to the cloud server through the communication control module for storage and monitoring; The user interaction module is used for data interaction between the user and the cloud server; The cloud server is used to synchronize historical data with each control terminal in real time.

5. The visual recognition system for a sample tube row group according to claim 4, wherein The data processing module includes an image preprocessing module, a visual recognition module, and an arrangement algorithm module; The image preprocessing module is used to perform standard formatting processing on the image data to obtain preprocessed image data; The visual recognition module is used to perform visual recognition on the preprocessed image data and output the label information of the image; The arrangement algorithm module is used to perform arrangement processing on the label information to obtain a mapping table.

6. The visual recognition system for a sample tube row group according to claim 5, wherein The standard formatting processing includes gray threshold sampling, image horizontal correction and cropping; The label information includes image content data and geometric coordinate information of the image QR code / barcode; The arrangement and processing includes rasterizing the geometric coordinate information of the image QR code / barcode to determine the row and column where each sample is located, and outputting the mapping table of the sample-hole positions.

7. The visual recognition system for a sample tube row group according to claim 6, wherein The data recording and statistics module is built-in with a terminal status data module, and the image sampling device is built-in with a device status data module; The terminal status data module is used to collect the terminal status data of the control terminal and store it in the data recording and statistics module. The terminal status data includes terminal operation logs, terminal running logs, and terminal exception data; The device status data module is used to collect the device status data of the image sampling device and transmit it to the data recording and statistics module. The device status data includes device working status, device running logs, device operation logs, and device error warning information; The data recording and statistics module is used to obtain the terminal status data and the device status data and upload them to the cloud server.

8. The visual recognition system for a sample tube row group according to claim 7, characterized in that, The cloud server is built-in with a data storage module and a data monitoring module. The data storage module is used to obtain and store the image data, the rule data, the mapping table, the comparison data, the terminal status data, and the device status data. The data monitoring module is used to monitor the above data to obtain monitoring data.

9. The visual recognition system for a sample tube row group according to claim 4, wherein The communication control module includes a DSL compiler, a DSL bytecode interpreter, a basic communication program module, a hardware abstraction layer, and a remote communication program module; The DSL compiler is used to read the DSL file and compile it into DSL bytecode, and the DSL bytecode is binary data; The DSL bytecode interpreter records a processing scheme for interpreting and executing the manipulation data defined by the DSL file; The basic communication program module is used to transmit the interpreted manipulation data to the image sampling device through a hardware interface; The hardware abstraction layer is used to call the DSL bytecode and is also used to export fixed functions; The remote communication program module is used to receive the DSL file distributed by the cloud server and update it, and is also used to execute and respond to the control instructions issued by the cloud server and send the execution results of the instructions.

10. A chip, characterized in that, The chip stores a computer program, and when the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Barcode tag detection in side view sample tube images for laboratory automation

    CN107206384A

  • Visual identification method for bar codes of blood-collecting vessels in sample rack

    CN110119799A

  • Biological reagent position identification method, device and system based on image acquisition

    CN111121622A

  • Method and device for assessing the suitability of a sample tube for use in a laboratory automation system

    CN112992297A

  • Sample information identification method, computer readable storage medium and identification device

    CN115825459A

Cited By

  • Sample image processing method and device based on multi-channel sample tube recognition model

    CN121095104A