Json parameter configuration method for IVD detection
Through the Json parameter configuration method, the parameter configuration and control process of the operator of the IVD detection system are directly read from the Json file, which solves the problem of code modification and compilation in the existing technology, and realizes the flexibility and configurability of the system, which facilitates the deployment and debugging of different scenarios.
Patent Information
- Application Number
- CN202311658023.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-05
- Publication Date
- 2025-06-06
AI Technical Summary
The existing IVD detection system based on machine vision requires code modification and compilation when deploying in different scenarios, resulting in long preliminary preparations and is not conducive to maintenance and on-site debugging.
Using the Json parameter configuration method, by setting the main case layer, sub-case layer and parameter layer, the operator's parameter configuration and control process are directly read from the Json file, and the input data, processing flow and output results of the algorithm are adjusted according to different needs and scenarios, without modifying and recompiling the code.
It realizes the easy adjustment of the input data, processing flow and output results of the algorithm in different scenarios, improves the flexibility and configurability of the system, and facilitates maintenance, deployment and on-site debugging.
Smart Images

Figure CN120104202A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of IVD detection, and in particular to a Json parameter configuration method for IVD detection. Background Art
[0002] In vitro diagnosis, or IVD (In Vitro Diagnosis), refers to a diagnostic method that obtains clinical diagnostic information by testing samples such as human body fluids, cells and tissues in vitro, and then determines the disease or body function. It plays an important role in disease prevention, diagnosis, and treatment. Currently, more than 80% of clinical disease diagnosis can be completed by IVD. It includes sample pre-treatment, multi-row rapid sample injection, multi-turn turntable sample barcode high-speed reading, etc., which are applied to automated test lines, test tube sorting, blood bag management, coagulation, immunity, urine, biochemistry, luminescence platforms, etc.
[0003] The IVD vision industry plays an important role in the field of medical diagnosis, especially when it comes to the processing and classification of blood types. The traditional manual blood bag blood typing method is labor-intensive, time-consuming, and prone to human errors. Existing machine vision-based solutions require code modification and compilation when deployed in different scenarios, which results in long preparatory work and is not conducive to maintenance and on-site debugging. Summary of the invention
[0004] The object of the present invention is to provide a Json parameter configuration method for IVD detection.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A Json parameter configuration method for IVD detection, performing the following steps:
[0007] S1: Setting a main case layer, wherein the main case layer indicates an application direction, limits the application field of the configuration file, and also determines the file name of the configuration file;
[0008] S2: Setting a sub-case layer, wherein the sub-case layer represents a sub-direction under the main case application direction;
[0009] S3: Set the parameter layer, which indicates the parameter configuration of the operator in the specific application.
[0010] S4: Save the settings and enter the detection process.
[0011] In the step S1, the main case layer is divided into barcode detection, OCR detection, liquid level detection, etc.
[0012] In the step S2, the sub-case layer includes blood bag OCR detection, test tube barcode detection, vertical tube judgment, horizontal tube judgment, liquid level detection, etc.
[0013] In the step S3, the keyword of the parameter layer is composed of the structure name defined in the algorithm library header file plus an optional suffix.
[0014] In the step S3, the specific parameter items under the parameter layer are variable type, variable name and value structure.
[0015] In the S3 step, the Json configuration file of the parameter layer contains various parameters in the algorithm, including filter type, threshold, window size, etc.
[0016] In the S3 step, the Json configuration file of the parameter layer defines the path, format and other related information of the input data required by the algorithm.
[0017] In the S3 step, a Json configuration file is used to perform simple validation and error handling on input parameters.
[0018] Compared with the prior art, the present invention has the beneficial effect of directly reading the operator's parameter configuration and control flow from the Json file, and easily adjusting the algorithm's input data, processing flow and output results before field deployment according to different needs and scenarios without modifying or recompiling the code. Such flexibility and configurability can make the algorithm easier to maintain, deploy and adapt to different scenarios, and facilitate debugging by field personnel. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 An IVD detection flow chart of an embodiment of the present invention; DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] Example 1
[0022] like Figure 1 As shown, a Json parameter configuration method for IVD detection performs the following steps:
[0023] S1: Setting a main case layer, wherein the main case layer indicates an application direction, limits the application field of the configuration file, and also determines the file name of the configuration file;
[0024] S2: Setting a sub-case layer, wherein the sub-case layer represents a sub-direction under the main case application direction;
[0025] S3: Set the parameter layer, which indicates the parameter configuration of the operator in the specific application.
[0026] S4: Save the settings and enter the detection process.
[0027] In the step S1, the main case layer is divided into barcode detection, OCR detection, liquid level detection, etc.
[0028] In the step S2, the sub-case layer includes blood bag OCR detection, test tube barcode detection, vertical tube judgment, horizontal tube judgment, liquid level detection, etc.
[0029] In the step S3, the keyword of the parameter layer is composed of the structure name defined in the algorithm library header file plus an optional suffix.
[0030] In the step S3, the specific parameter items under the parameter layer are variable type, variable name and value structure.
[0031] In the S3 step, the Json configuration file of the parameter layer contains various parameters in the algorithm, including filter type, threshold, window size, etc.
[0032] In the S3 step, the Json configuration file of the parameter layer defines the path, format and other related information of the input data required by the algorithm.
[0033] In the S3 step, a Json configuration file is used to perform simple validation and error handling on input parameters.
[0034] Example 2
[0035] The process control Json (Workflow) defines the entire computing topology. An algorithm SDK is built by reading the Workflow configuration file. The file content is a Json string that defines a complete Workflow topology.
[0036] 1.1.1.Workflow skeleton structure
[0037] The following is an example workflow configuration:
[0038] Its backbone structure is as follows:
[0039]
[0040]
[0041] (1) type=workflow indicates that the current node is a workflow. It is used to distinguish type=node nodes.
[0042] (2) unique_name defines the workflow name. It can be omitted by default and a unique name will be automatically generated internally.
[0043] (3)inputs / outputs defines all input and output names.
[0044] (4)thread_count defines the number of threads that execute the workflow (different threads perform different tasks).
[0045] (5) The workflow defines the structure of the entire topology, which consists of multiple Nodes or Workflow objects (sub-workflows). Data dependencies are established between nodes through the inputs and outputs fields.
[0046] Inputs / outputs definitions
[0047] Inputs defines all input names, usually input images and operator operation parameters. Outputs defines all output names (consisting of the unique_name of the corresponding Node or sub-workflow + "#" + variable name), usually output images and operator operation results. In addition, during the calculation process of the workflow, some intermediate methods may generate some intermediate outputs, and these intermediate fields may also become the input of other intermediate methods. For ease of use, these intermediate outputs can also be placed in the outputs field of the entire workflow.
[0048] Node definition
[0049] Node is a computing unit that encapsulates the configuration and definition of Method. Its backbone structure is as follows:
[0050]
[0051] (1) type=node indicates that the current node is a single Node of the Method type. It is used to distinguish type=workflow sub-workflow type nodes. For details, see 1.1.1 definition.
[0052] (2) thread_id represents the thread id that runs this Node object. Different Node objects can use different threads to execute in parallel to speed up the process.
[0053] (3)method_type: the name of the Method used by the current Node.
[0054] (4) unique_name is used to uniquely identify a MethodInstance object instance.
[0055] (5) inputs / outputs define the input and output names of the Method, where the name in outputs is composed of the unique_name of the Node + "#" + the variable name.
[0056] Sub-workflow definition
[0057] In some complex business scenarios, we can represent a Node as a Workflow and implement Workflow nesting through the function of sub-Workflow.
[0058] Example 3
[0059] IVD algorithm configuration and process control based on Json have the following characteristics:
[0060] (1) Flexible parameter configuration: The Json configuration file can contain various parameters in the algorithm, such as filter type, threshold, window size, etc. By modifying the parameters in the Json file, the behavior of the algorithm can be easily adjusted without rewriting or modifying the code.
[0061] (2) Input data description: The Json configuration file can define the path, format, and other related information of the input data required by the algorithm. This makes it very convenient to run the algorithm on different data sets or data sources.
[0062] (3) Algorithm processing flow: The Json configuration file can describe the algorithm processing flow, including the order of different processing steps and parameter settings. This design allows changes in the algorithm flow to be achieved by modifying the configuration file instead of modifying the code.
[0063] (4) Output result settings: The Json configuration file can specify the output path and format of the algorithm processing results. This ensures that the results are output to the correct location, facilitating subsequent analysis and use.
[0064] (5) Readability and maintainability: The Json configuration file is a human-readable data format that is easy to read and modify, making the algorithm configuration more intuitive and easier to manage.
[0065] (6) Cross-platform and cross-language: Json is a cross-platform and cross-language data exchange format, which means that Json configuration files can be used and parsed on different programming languages and operating systems.
[0066] (7) Reusability: Separating the algorithm’s configuration and control flow allows the same algorithm to be reused in different application scenarios without having to reimplement it.
[0067] (8) Parameter validation and error handling: Using the Json configuration file, you can perform simple validation and error handling on the input parameters to ensure that the algorithm obtains valid input before execution.
[0068] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention in the form of a ring-shaped light source. Therefore, the embodiments should be considered exemplary and non-restrictive in every sense, and the scope of the invention is defined by the appended claims rather than the above description, and it is intended that all changes within the meaning and range of equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0069] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A Json parameter configuration method for IVD detection, It is characterized in that Perform the following steps: S1: Setting a main case layer, wherein the main case layer indicates an application direction, limits the application field of the configuration file, and also determines the file name of the configuration file; S2: Setting a sub-case layer, wherein the sub-case layer represents a sub-direction under the main case application direction; S3: Set the parameter layer, which indicates the parameter configuration of the operator in the specific application. S4: Save the settings and enter the detection process.
2. A Json parameter configuration method for IVD detection according to claim 1, It is characterized in that In the step S1, the main case layer is divided into barcode detection, OCR detection, liquid level detection, etc.
3. A Json parameter configuration method for IVD detection according to claim 1, It is characterized in that In the step S2, the sub-case layer includes blood bag OCR detection, test tube barcode detection, vertical tube judgment, horizontal tube judgment, liquid level detection, etc.
4. A Json parameter configuration method for IVD detection according to claim 1, It is characterized in that In the step S3, the keyword of the parameter layer is composed of the structure name defined in the algorithm library header file plus an optional suffix.
5. A Json parameter configuration method for IVD detection according to claim 4, It is characterized in that In the step S3, the specific parameter items under the parameter layer are variable type, variable name and value structure.
6. A Json parameter configuration method for IVD detection according to claim 1, It is characterized in that In the S3 step, the Json configuration file of the parameter layer contains various parameters in the algorithm, including filter type, threshold, window size, etc.
7. A Json parameter configuration method for IVD detection according to claim 1, It is characterized in that In the S3 step, the Json configuration file of the parameter layer defines the path, format and other related information of the input data required by the algorithm.
8. A Json parameter configuration method for IVD detection according to claim 1, It is characterized in that In the S3 step, a Json configuration file is used to perform simple validation and error handling on input parameters.