Ion detection method and device

By applying deep learning models in liquid crystal optical flow control chips and polarized microscope systems, the problems of slow detection speed and strong subjectivity of traditional liquid crystal optical image quantification methods are solved, and rapid and accurate detection of sodium ions in solution is achieved.

CN119672427AActive Publication Date: 2025-03-21SOUTH CHINA NORMAL UNIV

Patent Information

Application Number
CN202411753452.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-21
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

Traditional LCD optical image quantification methods have problems such as slow detection speed, strong subjectivity of results and limited distinction ability.

Method used

The optical image data is collected by a liquid crystal optical flow control chip combined with a polarized microscope, and the image data is processed through deep learning models (such as the RepVGG module and the channel attention mechanism), and a target model for detecting sodium ion concentration is constructed.

Benefits of technology

Real-time and rapid detection of sodium ions in the solution is achieved, which significantly improves the detection speed and accuracy and reduces the impact of subjectivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672427A_ABST
    Figure CN119672427A_ABST
Patent Text Reader

Abstract

The invention provides an ion detection method and device. The method comprises the following steps: obtaining a target chip; performing liquid crystal filling on the target chip to form a liquid crystal optical flow control chip; obtaining a plurality of first to-be-detected solutions with different sodium ion concentrations; acquiring optical images before and after the first to-be-detected liquid is dripped into the liquid crystal optical flow control chip by using a polarizing microscope to obtain a plurality of groups of image data; processing the multiple groups of image data based on a bright field optical image processing flow and a polarized light image data processing flow to obtain a processing result; constructing a target model architecture; training the target model architecture based on the processing result to obtain a target model for detecting the concentration of sodium ions in the solution; collecting a polarized light image presented by the liquid crystal optical flow control chip dripped with the second liquid to be detected; and processing the polarized light image by using the target model so as to calculate and determine the sodium ion concentration in the second to-be-detected liquid. The ion detection method disclosed by the invention can be used for rapidly and effectively detecting sodium ions in the solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of ion detection, and in particular to an ion detection method and device. Background Art

[0002] As a branch of machine learning, deep learning has played a core role in promoting the development of artificial intelligence technology in recent years. It simulates the complex connections and interactions between neurons in the human brain, builds a multi-level neural network model, and realizes deep mining of the intrinsic laws and hierarchical features of the data. It can automatically learn and extract high-level abstract features from data sets without human intervention, which greatly improves the ability of machines to handle complex tasks such as image recognition, speech recognition, and natural language processing. Among the many models of deep learning, convolutional neural networks stand out in the field of image and video processing due to their excellent performance. By introducing structures such as convolutional layers and pooling layers, convolutional neural networks have the characteristics of local links, parameter sharing, and translation invariance. The core idea is to extract the features of input data through operations such as convolution and pooling, map the input data to a high-dimensional feature space, and then classify or regress the features through the fully connected layer, which effectively solves the dimensionality disaster problem faced by traditional neural networks when processing image data.

[0003] Liquid crystal is a physical state between liquid and crystal. It has a highly sensitive response to external stimuli. It can convert the molecular arrangement caused by the physical and chemical binding events between molecules into optical signal output, and can be directly observed through a polarizing microscope and captured by an image acquisition system. When the seawater samples with different salinities are mixed with sodium dodecyl sulfate (SDS), different optical response images will be generated when they come into contact with the liquid crystal sensor.

[0004] Traditional quantitative methods for liquid crystal optical images include: average gray value method, relative brightness enhancement method and bright area coverage method.

[0005] Average grayscale value method: Grayscale value is a parameter used to measure the brightness or lightness of an image. Its range is usually described as 0-1, where 0 represents white (brightest) and 1 represents black (darkest). In liquid crystal sensing, liquid crystal molecules respond to external stimuli, resulting in changes in molecular orientation, which manifests as changes in the brightness of the liquid crystal optical image at the macro level. Therefore, by calculating the average grayscale value of the liquid crystal optical image in steady state, it can be used to quantitatively represent the degree of external condition stimulation and establish a relationship with the concentration of the object to be measured.

[0006] Relative brightness enhancement method: The principle is the same as the average gray value method, but the relative brightness enhancement method is used. To establish the relationship between the concentration of the analyte, where I0 represents the gray value when no analyte is added, and I represents the gray value after adding different concentrations of analyte.

[0007] Bright area coverage method: The principle is the same as above, but the bright area coverage is used To establish the relationship with the concentration of the substance to be measured. Where W and H are the width and height of the liquid crystal optical response image in a single grid, BA is the area of ​​the bright area in a single grid, and TA is the total area in a single grid.

[0008] The quantitative range of these methods is limited by the grayscale value. When the grayscale values ​​of the liquid crystal optical response are equal under different concentrations of the analyte, they cannot be distinguished. In addition, calculations can only be performed after the liquid crystal reaches a steady state (generally about 10 minutes), which requires a long reaction time. At the same time, when selecting representative optical response images for calculation, there is a strong subjectivity, which affects the credibility of the calibration results. Summary of the invention

[0009] The present invention provides an ion detection method and device capable of quickly and effectively detecting sodium ions in a solution.

[0010] In order to solve the above technical problems, an embodiment of the present invention provides an ion detection method, comprising:

[0011] Obtain target chip;

[0012] Filling the target chip with liquid crystal to form a liquid crystal optofluidic chip;

[0013] Obtaining a plurality of first test solutions with different sodium ion concentrations;

[0014] Using a polarizing microscope to collect optical images of the liquid crystal optofluidic chip before and after the first test liquid is dropped into the chip, to obtain multiple sets of image data;

[0015] Processing the plurality of sets of image data based on a bright field optical image processing process and a polarized image data processing process to obtain processing results;

[0016] Build the target model architecture;

[0017] Training the target model framework based on the processing results to obtain a target model for detecting the concentration of sodium ions in a solution;

[0018] collecting a polarized image presented by a liquid crystal optofluidic chip dripped with a second test liquid;

[0019] The polarized image is processed using the target model to calculate and determine the sodium ion concentration in the second test liquid.

[0020] In one embodiment, the bright field optical image processing process includes:

[0021] A first optical image of the liquid crystal optofluidic chip when the first test liquid is not dropped into the chip;

[0022] Preprocessing the first optical image;

[0023] Dividing the preprocessed first optical image into multiple analysis units;

[0024] Counting the number of designated pixel units in the analysis unit to obtain a distribution curve corresponding to the number of pixel units in the analysis unit;

[0025] The average grid size and grid gap of the liquid crystal light control chip are determined by calculation based on the distribution curve of the number of pixel units in each of the analysis units.

[0026] In one embodiment, the preprocessing of the first optical image includes:

[0027] Performing threshold segmentation processing on the first optical image using Otsu threshold method;

[0028] The segmented first optical image is subjected to morphological processing and Hough transform correction processing.

[0029] In one embodiment, dividing the preprocessed first optical image includes:

[0030] dividing the first optical image based on a specified number of grids as a division condition, the specified number including four grids;

[0031] The counting of the number of designated pixel units in the analysis unit includes:

[0032] The histogram method is used to count the number of white pixels in each row or column of the analysis unit.

[0033] In one embodiment, the calculating and determining the average grid size and grid gap of the liquid crystal optofluidic chip based on the distribution curves of each of the analysis units includes:

[0034] Deriving the distribution curve to identify and determine the extreme points of the distribution curve based on the derivation result;

[0035] Calculating the size and grid gap of the grid in the liquid crystal optofluidic chip based on the extreme points of the distribution curve;

[0036] The average grid size and grid gap are determined based on the mean calculation of the grid size and grid gap corresponding to each of the distribution curves.

[0037] In one embodiment, the polarization image data processing process includes:

[0038] Selecting a template frame image from the collected second optical image of the liquid crystal flow light control chip dripping with the first test liquid;

[0039] Preprocessing the template frame image;

[0040] Screening the preprocessed template frame image once to determine a grid with a specified size;

[0041] Perform secondary screening on the determined grid;

[0042] Based on the secondary screening result, the remaining second optical images are intercepted and processed to obtain sample data;

[0043] The sample data is cleaned to obtain a sample image containing a complete sequence of optical morphological changes in each grid.

[0044] In one embodiment, the preprocessing of the template frame image includes:

[0045] The template frame image is subjected to binarization, morphology and Hough transform correction processing.

[0046] In one embodiment, screening the preprocessed template frame image once to determine a grid with a specified size includes:

[0047] Determine a first circumscribed rectangle of a grid filled with liquid crystal in the template frame image;

[0048] Screening the template frame image once based on the first circumscribed rectangle to obtain a first grid whose aspect ratio meets the requirement and its position information;

[0049] The second screening of the determined grids includes:

[0050] Using a cross generation method for the position of the first grid, a second circumscribed rectangle corresponding to the first grid and its position is determined;

[0051] Calculate the Euclidean distance between a first circumscribed rectangular box and a second circumscribed rectangular box corresponding to the same first grid;

[0052] The Euclidean distance and the sum data are compared, and the second circumscribed rectangular frame is screened a second time based on the comparison result, wherein the sum data is the sum of the side length and the gap of the first grid.

[0053] In one embodiment, the building of the target model architecture includes:

[0054] The RepVGG modules are stacked according to the structure of VGG16 to form a feature extraction module with 13 layers of multi-branch convolution, wherein a channel attention mechanism module is added after each of the RepVGG modules to perform channel weighting on the feature data obtained by convolution;

[0055] Adding a global average pooling module after the feature extraction module;

[0056] Set the Dropout layer and the output layer as classifiers, and the number of neurons in the output layer is 1;

[0057] When training the target model architecture, the method further includes:

[0058] The target model architecture is trained using early stopping and learning rate reduction methods.

[0059] Another embodiment of the present invention also provides an ion detection device, including:

[0060] A first acquisition module, used to obtain a target chip;

[0061] A filling module, used to fill the target chip with liquid crystal to form a liquid crystal optofluidic chip;

[0062] A second obtaining module is used to obtain a plurality of first test solutions with different sodium ion concentrations;

[0063] A first acquisition module is used to use a polarizing microscope to acquire optical images of the liquid crystal optofluidic chip before and after the first test liquid is dropped into the chip, to obtain multiple sets of image data;

[0064] A first processing module, used to process the plurality of sets of image data according to a bright field optical image processing flow and a polarized image data processing flow to obtain processing results;

[0065] Building modules, used to build the target model architecture;

[0066] A training module, used for training the target model framework according to the processing result to obtain a target model for detecting the sodium ion concentration in the solution;

[0067] A second acquisition module is used to acquire a polarized image presented by a liquid crystal optofluidic chip dripped with a second liquid to be tested;

[0068] The second processing module is used to process the polarized image using the target model to calculate and determine the sodium ion concentration in the second test liquid.

[0069] Based on the disclosure of the above embodiments, it can be known that the beneficial effects of the embodiments of the present invention include obtaining a target model that can analyze and process the optical response image generated by liquid crystal sensing and realize instant and rapid detection of sodium ions by optimizing and improving the convolutional network model. After that, the concentration of sodium ions in each test liquid can be detected based on the target model, and the detection speed and detection accuracy are significantly improved.

[0070] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings.

[0071] The technical solution of the present application is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0073] Figure 1 Schematic diagram of the ion detection method in an embodiment of the present invention.

[0074] Figure 2 Schematic diagram of the application process of the ion detection method in an embodiment of the present invention.

[0075] Figure 3 Schematic diagram of another application process of the ion detection method in an embodiment of the present invention.

[0076] Figure 4 4 is a structural block diagram of an ion detection device in an embodiment of the present invention. DETAILED DESCRIPTION

[0077] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings, but are not intended to limit the present invention.

[0078] It should be understood that various modifications may be made to the embodiments disclosed herein. Therefore, the following description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present disclosure will occur to those skilled in the art.

[0079] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the general description of the present disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the present disclosure.

[0080] These and other characteristics of the invention will become apparent from the following description of a preferred form of embodiment given as a non-limiting example, with reference to the accompanying drawings.

[0081] It should also be understood that, although the invention has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the invention that have the characteristics recited in the claims and are therefore within the scope of protection defined thereby.

[0082] The above and other aspects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.

[0083] Specific embodiments of the present disclosure are described hereinafter with reference to the accompanying drawings; however, it should be understood that the disclosed embodiments are merely examples of the present disclosure, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid obscuring the present disclosure with unnecessary or redundant details. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present disclosure in a variety of ways with substantially any suitable detailed structure.

[0084] This specification may use the phrases "in one embodiment," "in another embodiment," "in a further embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present disclosure.

[0085] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0086] like Figure 1 As shown, an embodiment of the present invention provides an ion detection method, comprising:

[0087] S1: Obtain the target chip;

[0088] S2: Filling the target chip with liquid crystal to form a liquid crystal optofluidic chip;

[0089] S3: obtaining a plurality of first test solutions with different sodium ion concentrations;

[0090] S4: using a polarizing microscope to collect optical images of the liquid crystal optofluidic chip before and after the first test liquid is dropped into the chip, to obtain multiple sets of image data;

[0091] S5: Processing the plurality of sets of image data based on a bright field optical image processing process and a polarized image data processing process to obtain processing results;

[0092] S6: Build the target model architecture;

[0093] S7: training the target model framework based on the processing result to obtain a target model for detecting the sodium ion concentration in the solution;

[0094] S8: collecting a polarized image presented by the liquid crystal optofluidic chip dripped with the second test liquid;

[0095] S9: Processing the polarized image using the target model to calculate and determine the sodium ion concentration in the second test liquid.

[0096] Based on the above content, it can be seen that this embodiment optimizes and improves the convolutional network model to obtain a target model that can analyze and process the optical response image generated by the liquid crystal sensor to achieve instant and rapid detection of sodium ions. After that, the concentration of sodium ions in each test liquid can be detected based on the target model, and the detection speed and detection accuracy are significantly improved.

[0097] In this embodiment, the traditional method of analyzing the optical response image of liquid crystal based only on grayscale features is bypassed, and more in-depth feature information including grayscale features is extracted through a convolutional neural network. The accuracy of detection is improved through rich feature information. In addition, a large amount of sample data is used to avoid the subjectivity of sample data selection in the traditional grayscale value quantification process, and the credibility of the detection results is improved. Compared with the traditional grayscale value quantification process, the method used in this embodiment needs to wait until the liquid crystal response is stable (generally about 10 minutes) before calculation. In this embodiment, only the data of the first 5 seconds of the optical response can be used to achieve detection, which significantly improves the detection speed.

[0098] In this embodiment, when executing steps S1 to S3, the prepared optofluidic chip is placed in an evaporating dish and evacuated for 30 minutes, then filled with 20 μL of liquid crystal, and placed on a hot plate at 40°C (higher than the clearing point of the liquid crystal) for 30 minutes. Then the chip is tilted at an angle of 30° so that the excess liquid crystal relies on gravity to stay, and finally a liquid crystal optofluidic chip is obtained. When preparing the first test liquid, standard seawater of different salinities (or other sodium ion solutions) and 20 μM SDS solution are mixed in equal volumes at room temperature to prepare a series of salinity gradient mixed solutions, that is, a variety of different first test liquids.

[0099] When performing image acquisition, under a polarizing microscope, the video mode is turned on, and 840 μL of the mixed solution is dripped onto the liquid crystal optofluidic chip with an electronic pipette to obtain the optical morphology change process caused by the interaction between standard seawater of different salinities and the liquid crystal sensor. The frame rate is 5FPS, the image resolution of the acquired image is 4104×2174, and the total recording time is 1 minute. In this embodiment, there are 21 different salinities, each salinity is repeated 6 times, and a total of 126 sets of optical response image data are obtained.

[0100] like Figure 2 As shown, the bright field optical image processing process includes:

[0101] S10: collecting a first optical image of the liquid crystal optofluidic chip when the first test liquid is not dropped into the chip;

[0102] S11: preprocessing the first optical image;

[0103] S12: dividing the preprocessed first optical image into multiple analysis units;

[0104] S13: Counting the number of designated pixel units in the analysis unit to obtain a distribution curve corresponding to the number of pixel units in the analysis unit;

[0105] S14: calculating and determining an average grid size and a grid gap of the liquid crystal light control chip based on a distribution curve of the number of pixel units in each of the analysis units.

[0106] Wherein, the preprocessing of the first optical image includes:

[0107] S15: performing threshold segmentation processing on the first optical image using the Otsu method;

[0108] S16: performing morphological processing and Hough transform correction processing on the segmented first optical image.

[0109] The step of dividing the preprocessed first optical image comprises:

[0110] S17: dividing the first optical image based on a specified number of grids as a division condition, where the specified number includes four grids;

[0111] S18: Counting the number of designated pixel units in the analysis unit includes:

[0112] S19: Using a histogram method to count the number of white pixels in each row or column of the analysis unit.

[0113] The calculating and determining the average grid size and grid gap of the liquid crystal optofluidic chip based on the distribution curves of each of the analysis units includes:

[0114] S20: deriving the distribution curve to identify and determine the extreme points of the distribution curve based on the derivation result;

[0115] S21: Calculating the size and grid gap of the grid in the liquid crystal optofluidic chip based on the extreme value points of the distribution curve;

[0116] S22: performing mean calculation based on the grid size and grid gap corresponding to each of the distribution curves to determine the average grid size and grid gap.

[0117] For example, continue to combine Figure 2 As shown in the figure, after the chip is made by photolithography, the chip bright field optical image (OM image for short) of the chip is taken by microscope, and preprocessed by Otsu threshold segmentation, morphological processing and Hough transform correction. Subsequently, the chip image is divided into analysis units with four grids as a group, and the number of white pixels (borders) in each row / column in the group is counted by histogram statistics to obtain the distribution curve. The distribution curve is derived, and the extreme points representing the boundaries are identified and located based on the derivative results. The size and gap of the chip grid can then be calculated based on the extreme points. The average grid size and gap of the entire chip can be obtained by averaging the data obtained in each group, which provides the key parameter basis for the subsequent accurate sample interception.

[0118] Furthermore, combined with Figure 3 As shown, the polarization image data processing flow includes:

[0119] S23: selecting a template frame image from the collected second optical image of the liquid crystal flow light control chip dripping with the first test liquid;

[0120] S24: preprocessing the template frame image;

[0121] S25: Screening the preprocessed template frame image to determine a grid with a specified size;

[0122] S26: performing secondary screening on the determined grid;

[0123] S27: Based on the secondary screening result, intercept the remaining second optical images to obtain sample data;

[0124] S28: Cleaning the sample data to obtain a sample image containing a complete sequence of optical morphological changes in each grid.

[0125] Wherein, the preprocessing of the template frame image includes:

[0126] S29: performing binarization, morphology and Hough transform correction processing on the template frame image.

[0127] The step of screening the preprocessed template frame image to determine a grid having a specified size includes:

[0128] S30: determining a first circumscribed rectangle of a grid filled with liquid crystal in the template frame image;

[0129] S31: Screening the template frame image based on the first circumscribed rectangle to obtain a first grid whose aspect ratio meets the requirement and its position information;

[0130] The second screening of the determined grids includes:

[0131] S32: using a cross generation method for the position of the first grid to determine a second circumscribed rectangle corresponding to the first grid and its position;

[0132] S33: calculating the Euclidean distance between the second circumscribed rectangular frame and each first circumscribed rectangular frame;

[0133] S34: Compare the Euclidean distance and the sum data, and perform secondary screening on the second circumscribed rectangular frame based on the comparison result, wherein the sum data is the sum of the side length and the gap of the first grid.

[0134] For example, continue to combine Figure 3As shown, a set of image data is taken out, exported by frame, and a frame image of the middle and late response is randomly selected as a processing template. The template frame image is subjected to preprocessing operations such as binarization, morphological processing, and Hough transform correction. Then, the CV2 library of the image processing tool can be called to detect the first circumscribed rectangle of the liquid crystal grid contour, screen the grid (first grid) with an aspect ratio of approximately 1, and use it as the center, the measured grid size is the side length, and the grid position information is obtained. In order to ensure the accuracy and efficiency of detection, this embodiment uses the cross generation method for each detected first grid and its position to generate a new circumscribed rectangular frame (second circumscribed rectangle), and then calculates the Euclidean distance between the newly generated rectangular frame and all detected rectangular frames. If there is a very small distance, it means that the position has been detected before and it is skipped; if the distance is greater than the sum of the side length and the gap, it means that the position is missed and the position information is saved; if it is between the two, it means that there is a deviation in the detection before, and the deviation is combined to decide whether to replace the original detected grid based on the newly detected grid, or to take the average of the two grids as the newly detected grid. According to the detection results on the template frame, it is applied to other frames in the entire video data to batch extract the optical morphology change process in each grid. Repeat the above operation to intercept all the data, and an average of 200+ sample data can be obtained for each group of data. After the interception is completed, the data is cleaned to delete abnormal data caused by physical defects of the grid, experimental operation and other problems to ensure the accuracy and completeness of the data. Then the remaining data is sorted into corresponding folders according to the number. Each folder contains a complete sequence of optical morphology change images in a grid. Through the above steps, a complete and diverse database is finally constructed.

[0135] In another embodiment, constructing the target model architecture includes:

[0136] S35: stacking the RepVGG modules according to the structure of VGG16 to form a feature extraction module with 13 layers of multi-branch convolution, wherein a channel attention mechanism module is added after each of the RepVGG modules to perform channel weighting on the feature data obtained by the convolution;

[0137] S36: Add a global average pooling module after the feature extraction module;

[0138] S37: Setting the Dropout layer and the output layer as classifiers, wherein the number of neurons in the output layer is 1;

[0139] When training the target model architecture, the method further includes:

[0140] S38: Use early stopping and learning rate reduction methods to train the target model architecture.

[0141] For example, the model used in this embodiment is based on the improved design of the VGG16 network and the RepVGG module structure. The RepVGG module is stacked according to the structure of VGG16 to form a feature extraction module with 13 layers of multi-branch convolution. After feature extraction, a global average pooling layer, a Dropout layer and an output layer are added as classifiers to regress the output of the feature extractor. Since it is a linear regression task, the number of neurons in the output layer is 1, and the output is the predicted concentration of seawater salinity. At the same time, in order to capture information on the time dimension, this embodiment expands the time dimension and expands the original 2D convolution into a 3D convolution. Three salinities are randomly selected from the prepared database, and the remaining data is divided according to the ratio of training set: validation set: test set = 8:1:1. The actual salinity of seawater is used as a label and input into the model together with the sample data for training. The early stopping and learning rate reduction methods are used to optimize the training process. When the loss does not decrease for 10 consecutive epochs, the learning rate decreases by one order of magnitude. When it does not decrease for 20 consecutive epochs, the model training is stopped to avoid overfitting. At the same time, the SE module channel attention mechanism is added after each RepVGG module to perform channel weighting on the feature data obtained by convolution to highlight the expressive power of important channels. The test set and the three selected salinity data are used for testing respectively, and finally the structure and weight parameters of the model are saved for field deployment and detection.

[0142] In order to facilitate on-site detection, the present embodiment also develops a corresponding graphical operation interface, which includes a log output area and a function implementation area. The collected test data are processed in sequence according to the function implementation area to obtain the processed optical response image data. The change process of the first 5 seconds is input into the trained model to obtain the salinity value of the sample to be tested.

[0143] like Figure 4 As shown, another embodiment of the present invention also provides an ion detection device, including:

[0144] A first acquisition module, used to obtain a target chip;

[0145] A filling module, used to fill the target chip with liquid crystal to form a liquid crystal optofluidic chip;

[0146] A second obtaining module is used to obtain a plurality of first test solutions with different sodium ion concentrations;

[0147] A first acquisition module is used to use a polarizing microscope to acquire optical images of the liquid crystal optofluidic chip before and after the first test liquid is dropped into the chip, to obtain multiple sets of image data;

[0148] A first processing module, used to process the plurality of sets of image data according to a bright field optical image processing flow and a polarized image data processing flow to obtain processing results;

[0149] Building modules, used to build the target model architecture;

[0150] A training module, used for training the target model framework according to the processing result to obtain a target model for detecting the sodium ion concentration in the solution;

[0151] A second acquisition module is used to acquire a polarized image presented by a liquid crystal optofluidic chip dripped with a second liquid to be tested;

[0152] The second processing module is used to process the polarized image using the target model to calculate and determine the sodium ion concentration in the second test liquid.

[0153] In one embodiment, the bright field optical image processing process includes:

[0154] A first optical image of the liquid crystal optofluidic chip when the first test liquid is not dropped into the chip;

[0155] Preprocessing the first optical image;

[0156] Dividing the preprocessed first optical image into multiple analysis units;

[0157] Counting the number of designated pixel units in the analysis unit to obtain a distribution curve corresponding to the number of pixel units in the analysis unit;

[0158] The average grid size and grid gap of the liquid crystal light control chip are determined by calculation based on the distribution curve of the number of pixel units in each of the analysis units.

[0159] In one embodiment, the preprocessing of the first optical image includes:

[0160] Performing threshold segmentation processing on the first optical image by using Otsu method;

[0161] The segmented first optical image is subjected to morphological processing and Hough transform correction processing.

[0162] In one embodiment, dividing the preprocessed first optical image includes:

[0163] dividing the first optical image based on a specified number of grids as a division condition, the specified number including four grids;

[0164] The counting of the number of designated pixel units in the analysis unit includes:

[0165] The histogram method is used to count the number of white pixels in each row or column of the analysis unit.

[0166] In one embodiment, the calculating and determining the average grid size and grid gap of the liquid crystal optofluidic chip based on the distribution curves of each of the analysis units includes:

[0167] Deriving the distribution curve to identify and determine the extreme points of the distribution curve based on the derivation result;

[0168] Calculating the size and grid gap of the grid in the liquid crystal optofluidic chip based on the extreme points of the distribution curve;

[0169] The average grid size and grid gap are determined based on the mean calculation of the grid size and grid gap corresponding to each of the distribution curves.

[0170] In one embodiment, the polarization image data processing process includes:

[0171] Selecting a template frame image from the collected second optical image of the liquid crystal flow light control chip dripping with the first test liquid;

[0172] Preprocessing the template frame image;

[0173] Screening the preprocessed template frame image once to determine a grid with a specified size;

[0174] Perform secondary screening on the determined grid;

[0175] Based on the secondary screening result, the remaining second optical images are intercepted and processed to obtain sample data;

[0176] The sample data is cleaned to obtain a sample image containing a complete sequence of optical morphological changes in each grid.

[0177] In one embodiment, the preprocessing of the template frame image includes:

[0178] The template frame image is subjected to binarization, morphology and Hough transform correction processing.

[0179] In one embodiment, screening the preprocessed template frame image once to determine a grid with a specified size includes:

[0180] Determine a first circumscribed rectangle of a grid filled with liquid crystal in the template frame image;

[0181] Screening the template frame image once based on the first circumscribed rectangle to obtain a first grid whose aspect ratio meets the requirement and its position information;

[0182] The second screening of the determined grids includes:

[0183] Using a cross generation method for the position of the first grid, a second circumscribed rectangle corresponding to the first grid and its position is determined;

[0184] Calculate the Euclidean distance between a first circumscribed rectangular box and a second circumscribed rectangular box corresponding to the same first grid;

[0185] The Euclidean distance and the sum data are compared, and the second circumscribed rectangular frame is screened a second time based on the comparison result, wherein the sum data is the sum of the side length and the gap of the first grid.

[0186] In one embodiment, the building of the target model architecture includes:

[0187] The RepVGG modules are stacked according to the structure of VGG16 to form a feature extraction module with 13 layers of multi-branch convolution, wherein a channel attention mechanism module is added after each of the RepVGG modules to perform channel weighting on the feature data obtained by convolution;

[0188] Adding a global average pooling module after the feature extraction module;

[0189] Set the Dropout layer and the output layer as classifiers, and the number of neurons in the output layer is 1;

[0190] When training the target model architecture, the training module is also used to:

[0191] The target model architecture is trained using early stopping and learning rate reduction methods.

[0192] Another embodiment of the present invention further provides an electronic device, comprising:

[0193] one or more processors;

[0194] a memory configured to store one or more programs;

[0195] When the one or more programs are executed by the one or more processors, the one or more processors implement the ion detection method as described in any one of the embodiments above.

[0196] Furthermore, an embodiment of the present invention also provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the ion detection method described above is implemented. It should be understood that each scheme in this embodiment has the corresponding technical effect in the above method embodiment, which will not be repeated here.

[0197] Furthermore, an embodiment of the present invention also provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer-readable instructions, which, when executed, enable at least one processor to perform an ion detection method such as that in the embodiment described above.

[0198] It should be noted that the computer storage medium of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate or transmit a program configured to be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, antenna, optical cable, RF, etc., or any suitable combination of the above.

[0199] In addition, it will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0200] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0201] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0202] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0203] The above embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention. The protection scope of the present invention is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.

Claims

1. An ion detection method, characterized in that: include: Obtain target chip; Filling the target chip with liquid crystal to form a liquid crystal optofluidic chip; Obtaining a plurality of first test solutions with different sodium ion concentrations; Using a polarizing microscope to collect optical images of the liquid crystal optofluidic chip before and after the first test liquid is dropped into the chip, to obtain multiple sets of image data; Processing the plurality of sets of image data based on a bright field optical image processing process and a polarized image data processing process to obtain processing results; Build the target model architecture; Training the target model framework based on the processing results to obtain a target model for detecting the concentration of sodium ions in a solution; collecting a polarized image presented by a liquid crystal optofluidic chip dripped with a second test liquid; The polarized image is processed using the target model to calculate and determine the sodium ion concentration in the second test liquid.

2. The ion detection method according to claim 1, characterized in that: The bright field optical image processing process comprises: Collecting a first optical image of the liquid crystal optofluidic chip when the first test liquid is not dropped into the chip; Preprocessing the first optical image; Dividing the preprocessed first optical image into multiple analysis units; Counting the number of designated pixel units in the analysis unit to obtain a distribution curve corresponding to the number of pixel units in the analysis unit; The average grid size and grid gap of the liquid crystal light control chip are determined by calculation based on the distribution curve of the number of pixel units in each of the analysis units.

3. The ion detection method according to claim 2, characterized in that: The preprocessing of the first optical image comprises: Performing threshold segmentation processing on the first optical image by using Otsu method; The segmented first optical image is subjected to morphological processing and Hough transform correction processing.

4. The ion detection method according to claim 2, characterized in that: The step of dividing the preprocessed first optical image comprises: dividing the first optical image based on a specified number of grids as a division condition, the specified number including four grids; Counting the number of designated pixel units in the analysis unit includes: The histogram method is used to count the number of white pixels in each row or column of the analysis unit.

5. The ion detection method according to claim 2, characterized in that: The calculating and determining the average grid size and grid gap of the liquid crystal optofluidic chip based on the distribution curves of each of the analysis units includes: Deriving the distribution curve to identify and determine the extreme points of the distribution curve based on the derivation result; Calculating the size and grid gap of the grid in the liquid crystal optofluidic chip based on the extreme points of the distribution curve; The average grid size and grid gap are determined based on the mean calculation of the grid size and grid gap corresponding to each of the distribution curves.

6. The ion detection method according to claim 1, characterized in that: The polarization image data processing process includes: Selecting a template frame image from the collected second optical image of the liquid crystal flow light control chip dripping with the first test liquid; Preprocessing the template frame image; Screening the preprocessed template frame image once to determine a grid with a specified size; Perform secondary screening on the determined grid; Based on the secondary screening result, the remaining second optical images are intercepted and processed to obtain sample data; The sample data is cleaned to obtain a sample image containing a complete sequence of optical morphological changes in each grid.

7. The ion detection method according to claim 6, characterized in that: The preprocessing of the template frame image comprises: The template frame image is subjected to binarization, morphology and Hough transform correction processing.

8. The ion detection method according to claim 6, characterized in that ,The ,preprocessed template frame image is screened once to determine a grid with a specified size, including: Determine a first circumscribed rectangle of a grid filled with liquid crystal in the template frame image; Screening the template frame image once based on the first circumscribed rectangle to obtain a first grid whose aspect ratio meets the requirement and its position information; The second screening of the determined grids includes: Using a cross generation method for the position of the first grid, a second circumscribed rectangle corresponding to the first grid and its position is determined; Calculating the Euclidean distance between the second circumscribed rectangular frame and each first circumscribed rectangular frame; The Euclidean distance and the sum data are compared, and the second circumscribed rectangular frame is screened a second time based on the comparison result, wherein the sum data is the sum of the side length and the gap of the first grid.

9. The ion detection method according to claim 1, characterized in that: The target model architecture is constructed, including: The RepVGG modules are stacked according to the structure of VGG16 to form a feature extraction module with 13 layers of multi-branch convolution, wherein a channel attention mechanism module is added after each of the RepVGG modules to perform channel weighting on the feature data obtained by convolution; Adding a global average pooling module after the feature extraction module; Set the Dropout layer and the output layer as classifiers, and the number of neurons in the output layer is 1; When training the target model architecture, the method further includes: The target model architecture is trained using early stopping and learning rate reduction methods.

10. An ion detection device, characterized in that: include: A first acquisition module, used to obtain a target chip; A filling module, used to fill the target chip with liquid crystal to form a liquid crystal optofluidic chip; A second obtaining module is used to obtain a plurality of first test solutions with different sodium ion concentrations; A first acquisition module is used to use a polarizing microscope to acquire optical images of the liquid crystal optofluidic chip before and after the first test liquid is dropped into the chip, to obtain multiple sets of image data; A first processing module, used to process the plurality of sets of image data according to a bright field optical image processing flow and a polarized image data processing flow to obtain processing results; Building modules, used to build the target model architecture; A training module, used for training the target model framework according to the processing result to obtain a target model for detecting the sodium ion concentration in the solution; A second acquisition module is used to acquire a polarized image presented by a liquid crystal optofluidic chip dripped with a second liquid to be tested; The second processing module is used to process the polarized image using the target model to calculate and determine the sodium ion concentration in the second test liquid.

Citation Information

Patent Citations

  • Method for realizing gas specificity quantitative detection by using liquid crystal sensor

    CN113866125A

  • Protein sensor

    KR1020150012794A

  • Methods, systems, and media for detecting the presence of an analyte

    US20190108421A1

  • Efficient training and accuracy improvement of imaging based assay

    WO2021108732A1

Cited By

  • Ion detection method

    CN119595553A