Method and apparatus for ion detection

By constructing a target model based on a convolutional neural network and utilizing the optical response image features of a liquid crystal sensor, the problems of slow speed and low accuracy in traditional liquid crystal optical detection methods are solved, enabling instantaneous and rapid detection and high-precision analysis of sodium ions.

CN119672427BActive Publication Date: 2025-11-18SOUTH CHINA NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional liquid crystal optical image processing methods suffer from slow detection speed, low accuracy, and unreliable results when detecting sodium ion concentration in solutions. In particular, grayscale quantitative methods cannot distinguish between different salinity levels and require waiting for the liquid crystal to reach a steady state before calculations can be performed.

Method used

A convolutional neural network-based approach is adopted to construct a target model architecture through bright-field and polarized light image processing. The optical response image features of the liquid crystal sensor are extracted using the RepVGG module and channel attention mechanism to achieve rapid detection of sodium ions.

Benefits of technology

It significantly improves the speed and accuracy of sodium ion detection, enabling detection to be completed within the first 5 seconds of liquid crystal response, reducing the influence of subjectivity and enhancing the reliability of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672427B_ABST
    Figure CN119672427B_ABST
Patent Text Reader

Abstract

The application provides an ion detection method and device, the method comprises: obtaining a target chip; liquid crystal filling is carried out to the target chip to form a liquid crystal optofluidic chip; a plurality of first test liquids with different sodium ion concentrations are obtained; a polarized microscope is used to collect optical images of the liquid crystal optofluidic chip before and after dropping into the first test liquid, and a plurality of groups of image data are obtained; the plurality of groups of image data are processed based on a bright field optical image processing flow and a polarized image data processing flow, and a processing result is obtained; a target model architecture is constructed; the target model architecture is trained based on the processing result, and a target model for detecting the sodium ion concentration in a solution is obtained; a polarized image of the liquid crystal optofluidic chip with the second test liquid dropped is collected; and the target model is used to process the polarized image to calculate and determine the sodium ion concentration in the second test liquid. The ion detection method can quickly and effectively detect the sodium ion in the solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ion detection technology, and in particular to an ion detection method and apparatus. Background Technology

[0002] Deep learning, a branch of machine learning, has played a central role in driving the development of artificial intelligence technology in recent years. It constructs multi-layered neural network models by simulating the complex connections and interactions between neurons in the human brain, enabling in-depth mining of the inherent patterns and hierarchical features of data. It can automatically learn and extract high-level abstract features from datasets without human intervention, greatly enhancing the machine's ability to handle complex tasks such as image recognition, speech recognition, and natural language processing. Among the many deep learning models, convolutional neural networks (CNNs) stand out in image and video processing due to their superior performance. By introducing structures such as convolutional and pooling layers, CNNs possess characteristics such as local connections, parameter sharing, and translation invariance. Their core idea is to extract features from input data through operations like convolution and pooling, mapping the input data to a high-dimensional feature space, and then using fully connected layers to classify or regress these features, effectively solving the curse of dimensionality problem faced by traditional neural networks when processing image data.

[0003] Liquid crystals are a state of matter between liquids and crystals, exhibiting highly sensitive responses to external stimuli. They can convert the molecular alignment resulting from physicochemical bonding events between molecules into optical signal outputs, which can be directly observed using a polarizing microscope and image acquired through an image acquisition system. Adding seawater samples of different salinities to a liquid crystal sensor along with sodium dodecyl sulfate (SDS) produces different optical response images.

[0004] Traditional liquid crystal optical image processing methods 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 darkness of an image, typically ranging from 0 to 1, where 0 represents white (brightest) and 1 represents black (darkest). In liquid crystal sensing, the arrangement of liquid crystal molecules changes between horizontal and vertical anchoring under external stimuli, manifesting macroscopically as changes in the brightness of the liquid crystal optical image. Therefore, calculating the average grayscale value of the liquid crystal optical image in steady state can be used to quantitatively represent the degree of external stimuli and establish a relationship with the salinity of the detected substance.

[0006] Relative brightness enhancement method: The principle is the same as the average gray value method, but it uses relative brightness enhancement. This establishes the relationship between the grayscale value and the salinity of the analyte. Here, I0 represents the grayscale value without the analyte, and I represents the grayscale value after adding analytes of different salinities.

[0007] Brightness coverage method: The principle is the same as above, but it uses brightness coverage. To establish the relationship between salinity and the detected substance. Here, W and H represent the width and height of the liquid crystal optical response image in a single grid, BA represents the area of ​​the bright region in a single grid, and TA represents the total area in a single grid.

[0008] These methods are limited by grayscale values ​​in their quantitative range. When the grayscale values ​​of the liquid crystal optical response are equal at different salinities, they cannot be distinguished. Furthermore, calculations can only be performed after the liquid crystal has fully reached a steady state (generally around 10 minutes), resulting in a long reaction time. Additionally, the selection of representative optical response images for calculation is highly subjective, affecting the reliability of the calibration results. Summary of the Invention

[0009] This invention provides an ion detection method and apparatus that can rapidly and effectively detect sodium ions in solution.

[0010] To address the aforementioned technical problems, embodiments of the present invention provide an ion detection method, comprising:

[0011] Obtain the target chip;

[0012] The target chip is filled with liquid crystal to form a liquid crystal optofluidic chip;

[0013] Multiple first test solutions with different sodium ion concentrations were obtained;

[0014] Optical images of the liquid crystal optofluidic chip before and after the first test liquid was dropped into it were acquired using a polarizing microscope, and multiple sets of image data were obtained.

[0015] The multiple sets of image data are processed based on the bright-field optical image processing flow and the polarized image data processing flow to obtain the processing results;

[0016] Construct the target model architecture;

[0017] The target model architecture is trained based on the processing results to obtain a target model for detecting sodium ion concentration in solution;

[0018] The polarized image displayed by the liquid crystal optofluidic chip containing the second test liquid is collected;

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

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

[0021] The first optical image captured when the liquid crystal flow control chip was not dripped with the first test liquid;

[0022] The first optical image is preprocessed;

[0023] The preprocessed first optical image is divided into multiple analysis units;

[0024] The number of specified pixel units in the analysis unit is counted to obtain the distribution curve corresponding to the analysis unit;

[0025] The average grid size and grid gap of the liquid crystal optofluidic chip are calculated and determined based on the distribution curves of each of the analysis units.

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

[0027] The first optical image is subjected to threshold segmentation using the Otsu method;

[0028] The segmented first optical image is then subjected to morphological processing and Hough transform correction. In one embodiment, segmenting the preprocessed first optical image includes:

[0029] The first optical image is divided based on a specified number of grids, including four grids.

[0030] The step of counting the number of specified pixel units in the analysis unit includes:

[0031] The number of white pixels in each row or column of the analysis unit is counted using histogram statistics.

[0032] In one embodiment, the step of 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:

[0033] The distribution curve is differentiated, and the extreme points of the distribution curve are identified based on the differentiation result;

[0034] The size and spacing of the grid in the liquid crystal optofluidic chip are calculated based on the extreme points of the distribution curve.

[0035] The average grid size and grid gap are determined by calculating the mean value based on the grid size and grid gap corresponding to each distribution curve.

[0036] In one embodiment, the polarized image data processing flow includes:

[0037] Select a template frame image from the second optical image of the liquid crystal optofluidic chip with the first test liquid dropped on it;

[0038] The template frame image is preprocessed;

[0039] The preprocessed template frame image is filtered once to determine the grid with the specified size;

[0040] The identified grid is then further filtered.

[0041] Based on the results of the secondary screening, the remaining second optical images are cropped to obtain sample data;

[0042] The sample data is cleaned to obtain sample images containing a complete sequence of optical morphology changes within each grid.

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

[0044] The template frame image is subjected to binarization, morphological correction, and Hough transform.

[0045] In one embodiment, the step of filtering the preprocessed template frame image to determine a grid with a specified size includes:

[0046] Determine the first bounding rectangle of the grid filling the liquid crystal in the template frame image;

[0047] Based on the first circumscribed rectangle, the template frame image is filtered once to obtain the first grid whose aspect ratio meets the requirements and its position information;

[0048] The secondary filtering of the determined grid includes:

[0049] The position of the first grid is determined using a cross-shaped generation method to identify the second circumscribed rectangle corresponding to the first grid and its position.

[0050] Calculate the Euclidean distance between the first and second bounding rectangles corresponding to the same first grid;

[0051] The Euclidean distance and the sum data are compared, and the second circumscribed rectangle is further filtered based on the comparison results. The sum data is the sum of the side length and the gap of the first grid.

[0052] In one embodiment, constructing the target model architecture includes:

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

[0054] A global average pooling module is added after the feature extraction module.

[0055] Set the Dropout layer and the output layer as classifiers, with the output layer having 1 neuron.

[0056] The method further includes the following when training the target model architecture:

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

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

[0059] The first acquisition module is used to acquire the target chip;

[0060] A filling module is used to fill the target chip with liquid crystal to form a liquid crystal optofluidic chip.

[0061] The second acquisition module is used to obtain multiple first test solutions with different sodium ion concentrations;

[0062] The first acquisition module is used to acquire optical images of the liquid crystal optical fluid control chip before and after the first test liquid is dropped into it using a polarizing microscope, and obtain multiple sets of image data;

[0063] The first processing module is used to process the multiple sets of image data according to the bright field optical image processing flow and the polarized image data processing flow to obtain the processing result;

[0064] Builder modules are used to build the target model architecture;

[0065] The training module is used to train the target model architecture based on the processing results to obtain a target model for detecting sodium ion concentration in solution;

[0066] The second acquisition module is used to acquire the polarized image presented by the liquid crystal optofluidic chip with the second test liquid dropped on it;

[0067] 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 solution.

[0068] Based on the disclosure of the above embodiments, it can be understood 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 the liquid crystal sensor by optimizing and improving the convolutional network model, thereby realizing the instantaneous and rapid detection of sodium ions. Then, 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.

[0069] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.

[0070] The technical solution of this application will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0071] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0072] Figure 1 This is a schematic diagram of the ion detection method in an embodiment of the present invention.

[0073] Figure 2 This is a schematic diagram of the application process of the ion detection method in this embodiment of the invention.

[0074] Figure 3 This is a schematic diagram of another application process of the ion detection method in this embodiment of the invention.

[0075] Figure 4 This is a structural block diagram of the ion detection device in an embodiment of the present invention. Detailed Implementation

[0076] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings, but these are not intended to limit the scope of the invention.

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

[0078] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present disclosure and, together with the general description of the disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the disclosure.

[0079] These and other features of the invention will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.

[0080] It should also be understood that although the invention has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of the invention, which have the features described in the claims and are therefore all within the scope of protection defined herein.

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

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

[0083] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in still another embodiment,” all of which may refer to one or more of the same or different embodiments according to this disclosure.

[0084] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

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

[0086] S1: Obtain the target chip;

[0087] S2: Fill the target chip with liquid crystal to form a liquid crystal optofluidic chip;

[0088] S3: Obtain multiple first test solutions with different sodium ion concentrations;

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

[0090] S5: Process the multiple sets of image data based on the bright-field optical image processing flow and the polarized image data processing flow to obtain the processing results;

[0091] S6: Construct the target model architecture;

[0092] S7: Train the target model architecture based on the processing results to obtain a target model for detecting sodium ion concentration in solution;

[0093] S8: Acquire the polarized image presented by the liquid crystal optofluidic chip with the second test liquid dropped on it;

[0094] S9: Process the polarized image using the target model to calculate and determine the sodium ion concentration in the second test solution.

[0095] Based on the above, 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, thereby achieving real-time and rapid detection of sodium ions. Then, the concentration of sodium ions in each test liquid can be detected based on this target model, and the detection speed and detection accuracy are significantly improved.

[0096] This embodiment bypasses the traditional method of analyzing liquid crystal optical response images based solely on grayscale features. Instead, it extracts more in-depth feature information, including grayscale features, through a convolutional neural network. This rich feature information improves detection accuracy. Furthermore, multiple grid filtering avoids the subjectivity of sample data selection in traditional grayscale value quantification, enhancing the reliability of the detection results. Compared to traditional grayscale value quantification methods that require waiting for the liquid crystal response to stabilize (generally around 10 minutes) before calculation, this embodiment can achieve detection using only the first 5 seconds of optical response data, significantly improving detection speed.

[0097] In this embodiment, during steps S1 to S3, the prepared optofluidic chip is placed in an evaporating dish and evacuated for 30 minutes. Then, 20 μL of liquid crystal is added, and the chip is placed on a hot plate at 40°C (above the clearing point of the liquid crystal) for 30 minutes. Next, the chip is tilted at a 30° angle, allowing excess liquid crystal to remain due to gravity, resulting in a liquid crystal optofluidic chip. To prepare the first test solution, at room temperature, equal volumes of standard seawater (or other sodium-containing solutions) with different salinities are mixed with 20 μM SDS solution to prepare a series of salinity gradient mixtures, i.e., various different first test solutions.

[0098] During image acquisition, under a polarizing microscope, video recording mode was activated. 840 μL of a mixed solution was dropped onto the liquid crystal optofluidic chip using an electronic pipette. The optical morphology changes resulting from the interaction between standard seawater at different salinities and the liquid crystal sensor were captured. The frame rate was 5 FPS, and the acquired image resolution was 4104 × 2174, with a total recording time of 1 minute. In this embodiment, a total of 21 different salinities were used, with each salinity repeated 6 times, resulting in a total of 126 sets of optical response image data.

[0099] like Figure 2 As shown, the bright-field optical image processing flow includes:

[0100] S10: The first optical image of the liquid crystal optical fluid control chip when the first test liquid has not been added;

[0101] S11: Preprocess the first optical image;

[0102] S12: Divide the preprocessed first optical image into multiple analysis units;

[0103] S13: Count the number of specified pixel units in the analysis unit to obtain the distribution curve corresponding to the analysis unit;

[0104] S14: Calculate and determine the average grid size and grid gap of the liquid crystal optofluidic chip based on the distribution curves of each of the analysis units.

[0105] The preprocessing of the first optical image includes:

[0106] S15: The first optical image is subjected to threshold segmentation using the Otsu method;

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

[0108] The step of dividing the preprocessed first optical image includes:

[0109] S17: Divide the first optical image based on a specified number of grids as a dividing condition, wherein the specified number includes four grids;

[0110] S18: The step of counting the number of specified pixel units in the analysis unit includes:

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

[0112] The calculation of 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:

[0113] S20: Differentiate the distribution curve to identify and determine the extreme points of the distribution curve based on the differentiation result;

[0114] S21: Calculate the size and grid spacing of the grid in the liquid crystal optofluidic chip based on the extreme points of the distribution curve;

[0115] S22: Calculate the mean value based on the grid size and grid gap corresponding to each of the distribution curves to determine the average grid size and grid gap.

[0116] For example, continue to combine Figure 2 As shown, after the chip is fabricated using photolithography, a bright-field optical image (OM image) of the chip is captured using a microscope. Preprocessing is performed using OTSU thresholding, morphological processing, and Hough transform correction. Subsequently, the chip image is divided into analysis units of four grids per group. Histogram statistics are used to count the number of white pixels (borders) in each row / column within each group, obtaining a distribution curve. The distribution curve is differentiated, and extreme points representing the boundaries are identified and located based on the differentiation results. The size and spacing of the chip grid can then be calculated based on these extreme points. Averaging the data from each group yields the average grid size and spacing of the entire chip, providing crucial parameters for subsequent precise sample extraction.

[0117] Furthermore, combined Figure 3 As shown, the polarized image data processing flow includes:

[0118] S23: Select a template frame image from the second optical image of the liquid crystal optofluidic chip with the first test liquid dropped on it;

[0119] S24: Preprocess the template frame image;

[0120] S25: Perform a screening on the preprocessed template frame image to determine the grid with the specified size;

[0121] S26: Perform secondary filtering on the determined grid;

[0122] S27: Based on the secondary screening results, the remaining second optical images are cropped to obtain sample data;

[0123] S28: Clean the sample data to obtain sample images containing a complete sequence of optical morphology changes within each grid.

[0124] The preprocessing of the template frame image includes:

[0125] S29: Perform binarization, morphological and Hough transform correction processing on the template frame image.

[0126] The step of filtering the preprocessed template frame image to determine grids of a specified size includes:

[0127] S30: Determine the first circumscribed rectangle of the grid filled with liquid crystal in the template frame image;

[0128] S31: Based on the first circumscribed rectangle, the template frame image is filtered once to obtain the first grid with the required aspect ratio and its position information;

[0129] The secondary filtering of the determined grid includes:

[0130] S32: Use the cross generation method to determine the second bounding rectangle corresponding to the first grid and its position;

[0131] S33: Calculate the Euclidean distance between the second bounding rectangle and each of the first bounding rectangles;

[0132] S34: Compare the Euclidean distance and the sum data, and perform a second filtering on the second circumscribed rectangle based on the comparison results. The sum data is the sum of the side length and the gap of the first grid.

[0133] For example, continue to combine Figure 3As shown, a set of image data is extracted, exported frame by frame, and a frame image from the later stages of the response is randomly selected as the processing template. Preprocessing operations such as binarization, morphological processing, and Hough transform correction are performed on the template frame image. Then, the CV2 library, a powerful image processing tool, is called to detect the first circumscribed rectangle of the liquid crystal grid outline. Grids with an aspect ratio of approximately 1 (the first grid) are selected, and the grid size is measured as the side length, centered on the first grid, and the grid position information is obtained. To ensure detection accuracy and efficiency, this embodiment uses a cross-generation method to generate a new circumscribed rectangle (the second circumscribed rectangle) for each detected first grid and its position. Then, the Euclidean distance between the newly generated rectangle and all detected rectangles is calculated. If the distance is very small, it indicates that the position has already been detected and is skipped; if the distance is greater than the side length plus the gap, it indicates that the position was missed and the position information is saved; if the distance is between the two, it indicates that there was a detection deviation. Based on the deviation, it is decided to replace the original detected grid with the newly detected grid, or take the average of the two grids as the new detected grid. Based on the detection results on the template frame, the results are applied to other frames in the entire video data to batch extract the optical morphology changes in each grid. This process is repeated for all data, yielding an average of 200+ samples per group. After extraction, the data is cleaned to remove abnormal data caused by grid physical defects or experimental issues, ensuring accuracy and completeness. The remaining data is then organized into corresponding folders by number, with each folder containing a complete sequence of optical morphology changes within a grid. Through these steps, a complete and diverse database is ultimately constructed.

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

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

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

[0137] S37: Set the Dropout layer and the output layer as classifiers, and the output layer has 1 neuron.

[0138] The method further includes the following when training the target model architecture:

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

[0140] For example, this embodiment uses a model based on an improved design of the VGG16 network and RepVGG module structure. The RepVGG modules are stacked according to the VGG16 structure to form a feature extraction module with 13 layers of multi-branch convolutions. After feature extraction, a global average pooling layer, a dropout layer, and an output layer are added as classifiers, and the output of the feature extractor is used for regression. 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. Simultaneously, to capture information in the temporal dimension, this embodiment extends the temporal dimension, expanding the original 2D convolutions into 3D convolutions. Three salinities are randomly selected from the created database, and the remaining data are divided according to a training set:validation set:test set ratio of 8:1:1. The actual salinity of seawater is used as the label, and it is input into the model along with the sample data for training. 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 is reduced by an order of magnitude; when it does not decrease for 20 consecutive epochs, model training is stopped to avoid overfitting. Simultaneously, a channel attention mechanism (SE) module is added after each RepVGG module to weight the feature data obtained from convolution by channel, highlighting the expressive power of important channels. The model is tested using the test set and three selected salinity datasets. Finally, the model structure and weight parameters are saved for field deployment and detection.

[0141] To facilitate on-site testing, this embodiment also developed a corresponding graphical user interface, which includes a log output area and a function implementation area. The collected test data is processed sequentially according to the order of the function implementation area to obtain the processed optical response image data. The change process in the first 5 seconds is input into the trained model to obtain the salinity value of the sample to be tested.

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

[0143] The first acquisition module is used to acquire the target chip;

[0144] A filling module is used to fill the target chip with liquid crystal to form a liquid crystal optofluidic chip.

[0145] The second acquisition module is used to obtain multiple first test solutions with different sodium ion concentrations;

[0146] The first acquisition module is used to acquire optical images of the liquid crystal optical fluid control chip before and after the first test liquid is dropped into it using a polarizing microscope, and obtain multiple sets of image data;

[0147] The first processing module is used to process the multiple sets of image data according to the bright field optical image processing flow and the polarized image data processing flow to obtain the processing result;

[0148] Builder modules are used to build the target model architecture;

[0149] The training module is used to train the target model architecture based on the processing results to obtain a target model for detecting sodium ion concentration in solution;

[0150] The second acquisition module is used to acquire the polarized image presented by the liquid crystal optofluidic chip with the second test liquid dropped on it;

[0151] 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 solution.

[0152] In one embodiment, the bright-field optical image processing flow includes:

[0153] The first optical image captured when the liquid crystal optofluidic chip was not dropped into the first test liquid;

[0154] The first optical image is preprocessed;

[0155] The preprocessed first optical image is divided into multiple analysis units;

[0156] The number of specified pixel units in the analysis unit is counted to obtain the distribution curve corresponding to the analysis unit;

[0157] The average grid size and grid gap of the liquid crystal optofluidic chip are calculated and determined based on the distribution curves of each of the analysis units.

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

[0159] The first optical image is subjected to threshold segmentation using the Otsu method;

[0160] The segmented first optical image is then subjected to morphological processing and Hough transform correction. In one embodiment, segmenting the preprocessed first optical image includes:

[0161] The first optical image is divided based on a specified number of grids, including four grids.

[0162] The step of counting the number of specified pixel units in the analysis unit includes:

[0163] The number of white pixels in each row or column of the analysis unit is counted using histogram statistics.

[0164] In one embodiment, the step of 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:

[0165] The distribution curve is differentiated, and the extreme points of the distribution curve are identified based on the differentiation result;

[0166] The size and spacing of the grid in the liquid crystal optofluidic chip are calculated based on the extreme points of the distribution curve.

[0167] The average grid size and grid gap are determined by calculating the mean value based on the grid size and grid gap corresponding to each distribution curve.

[0168] In one embodiment, the polarized image data processing flow includes:

[0169] Select a template frame image from the second optical image of the liquid crystal optofluidic chip with the first test liquid dropped on it;

[0170] The template frame image is preprocessed;

[0171] The preprocessed template frame image is filtered once to determine the grid with the specified size;

[0172] The identified grid is then further filtered.

[0173] Based on the results of the secondary screening, the remaining second optical images are cropped to obtain sample data;

[0174] The sample data is cleaned to obtain sample images containing a complete sequence of optical morphology changes within each grid.

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

[0176] The template frame image is subjected to binarization, morphological correction, and Hough transform.

[0177] In one embodiment, the step of filtering the preprocessed template frame image to determine a grid with a specified size includes:

[0178] Determine the first bounding rectangle of the grid filling the liquid crystal in the template frame image;

[0179] Based on the first circumscribed rectangle, the template frame image is filtered once to obtain the first grid whose aspect ratio meets the requirements and its position information;

[0180] The secondary filtering of the determined grid includes:

[0181] The position of the first grid is determined using a cross-shaped generation method to identify the second circumscribed rectangle corresponding to the first grid and its position.

[0182] Calculate the Euclidean distance between the first and second bounding rectangles corresponding to the same first grid;

[0183] The Euclidean distance and the sum data are compared, and the second circumscribed rectangle is further filtered based on the comparison results. The sum data is the sum of the side length and the gap of the first grid.

[0184] In one embodiment, constructing the target model architecture includes:

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

[0186] A global average pooling module is added after the feature extraction module.

[0187] Set the Dropout layer and the output layer as classifiers, with the output layer having 1 neuron.

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

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

[0190] Another embodiment of the present invention also provides an electronic device, comprising:

[0191] One or more processors;

[0192] Memory, configured to store one or more programs;

[0193] 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 of the embodiments above.

[0194] Furthermore, one embodiment of the present invention also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the ion detection method as described above. It should be understood that the various solutions in this embodiment have the corresponding technical effects in the above-described method embodiments, and will not be repeated here.

[0195] Furthermore, embodiments of the present invention also provide a computer program product tangibly stored on a computer-readable medium and comprising computer-readable instructions that, when executed, cause at least one processor to perform an ion detection method such as those described in the embodiments above.

[0196] It should be noted that the computer storage medium of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having 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 thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program configured for use by or in connection with an instruction execution system, system, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, antenna, optical fiber, RF, etc., or any suitable combination thereof.

[0197] Furthermore, those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0198] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.

[0199] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction set implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0200] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0201] The above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the present invention. The scope of protection of the present invention is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to the present invention within its spirit and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of the present invention.

Claims

1. An ion detection method, characterized in that, include: Obtain the target chip; The target chip is filled with liquid crystal to form a liquid crystal optofluidic chip; Multiple first test solutions with different sodium ion concentrations were obtained; Optical images of the liquid crystal optofluidic chip before and after the first test liquid was dropped into it were acquired using a polarizing microscope, and multiple sets of image data were obtained. The multiple sets of image data are processed based on the bright-field optical image processing flow and the polarized image data processing flow to obtain the processing results; Construct the target model architecture, wherein the target model is a convolutional network model; The target model architecture is trained based on the processing results to obtain a target model for detecting sodium ion concentration in solution; The polarized image displayed by the liquid crystal optofluidic chip containing the second test liquid is collected; The polarized image is processed using the target model to calculate and determine the sodium ion concentration in the second test solution; The bright-field optical image processing flow includes: Acquire a first optical image of the liquid crystal optical fluid control chip when no first test liquid has been added; The first optical image is preprocessed; The preprocessed first optical image is divided into multiple analysis units; The number of specified pixel units in the analysis unit is counted to obtain the distribution curve corresponding to the analysis unit; The average grid size and grid gap of the liquid crystal optofluidic chip are calculated and determined based on the distribution curves of each of the analysis units. The polarized image data processing flow includes: Select a template frame image from the second optical image of the liquid crystal optofluidic chip with the first test liquid dropped on it; The template frame image is preprocessed; The preprocessed template frame image is filtered once to determine the grid with the specified size; The identified grid is then further filtered. Based on the results of the secondary screening, the remaining second optical images are cropped to obtain sample data; The sample data is cleaned to obtain sample images containing a complete sequence of optical morphology changes within each grid. The step of filtering the preprocessed template frame image to determine grids of a specified size includes: Determine the first bounding rectangle of the grid filling the liquid crystal in the template frame image; Based on the first circumscribed rectangle, the template frame image is filtered once to obtain the first grid whose aspect ratio meets the requirements and its position information; The secondary filtering of the determined grid includes: The position of the first grid is determined using a cross-shaped generation method to identify the second circumscribed rectangle corresponding to the first grid and its position. Calculate the Euclidean distances between the second bounding rectangle and each of the first bounding rectangles; The Euclidean distance and the sum data are compared, and the second circumscribed rectangle is further filtered based on the comparison results. The sum data is the sum of the side length and the gap of the first grid.

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

3. The ion detection method according to claim 1, characterized in that, The step of dividing the preprocessed first optical image includes: The first optical image is divided based on a specified number of grids, including four grids. The step of counting the number of specified pixel units in the analysis unit includes: The number of white pixels in each row or column of the analysis unit is counted using histogram statistics.

4. The ion detection method according to claim 1, characterized in that, The calculation of 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: The distribution curve is differentiated, and the extreme points of the distribution curve are identified based on the differentiation result; The size and spacing of the grid in the liquid crystal optofluidic chip are calculated based on the extreme points of the distribution curve. The average grid size and grid gap are determined by calculating the mean value based on the grid size and grid gap corresponding to each distribution curve.

5. The ion detection method according to claim 1, characterized in that, The preprocessing of the template frame image includes: The template frame image is subjected to binarization, morphological correction, and Hough transform.

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

7. An ion detection device applying the ion detection method according to any one of claims 1 to 6, characterized in that, include: The first acquisition module is used to acquire the target chip; A filling module is used to fill the target chip with liquid crystal to form a liquid crystal optofluidic chip. The second acquisition module is used to obtain multiple first test solutions with different sodium ion concentrations; The first acquisition module is used to acquire optical images of the liquid crystal optical fluid control chip before and after the first test liquid is dropped into it using a polarizing microscope, and obtain multiple sets of image data; The first processing module is used to process the multiple sets of image data according to the bright field optical image processing flow and the polarized image data processing flow to obtain the processing result; The building module is used to build the target model architecture, whereby the target model is a convolutional network model. The training module is used to train the target model architecture based on the processing results to obtain a target model for detecting sodium ion concentration in solution; The second acquisition module is used to acquire the polarized image presented by the liquid crystal optofluidic chip with the second test liquid dropped on it; 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 solution.

Citation Information

Patent Citations

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

    CN113866125A

  • Efficient training and accuracy improvement of imaging based assay

    WO2021108732A1