A method and device for quantitatively detecting seawater salinity

By combining a liquid crystal optofluidic chip with a high-efficiency convolutional neural network, the problem of insufficient stability and accuracy of liquid crystal sensors in marine salinity detection is solved, realizing automated and accurate seawater salinity detection, adapting to complex environments and simplifying operation.

CN119619016BActive Publication Date: 2025-10-28SOUTH CHINA NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411753455.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-10-28
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

Existing liquid crystal sensors are susceptible to environmental factors in marine salinity detection, resulting in insufficient stability and detection accuracy. Furthermore, sample pretreatment and posttreatment are complex, leading to high operational complexity.

Method used

Liquid crystal optical fluid control chip combined with polarizing microscope is used to acquire liquid crystal optical images. Image preprocessing and feature extraction are performed by target detection algorithm and efficient convolutional neural network. Seawater salinity is predicted by convolutional neural network with coordinate attention mechanism.

Benefits of technology

It enables automated and high-precision detection of seawater salinity, simplifies the operation process, improves the performance and reliability of the sensor, adapts to complex environments, and provides detailed and accurate detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119619016B_ABST
    Figure CN119619016B_ABST
Patent Text Reader

Abstract

This invention provides a method and apparatus for quantitative detection of seawater salinity. The method includes: obtaining a liquid crystal optical image to be detected, wherein the liquid crystal optical image is formed by acquiring a liquid crystal chip after being immersed in seawater using a polarizing microscope; preprocessing the liquid crystal optical image; extracting target units from the preprocessed liquid crystal optical image based on a target detection algorithm; inputting the extracted target units into a pre-trained target model for feature extraction and calculation of the extracted image features to generate a predicted seawater salinity value, wherein the target model is formed by a convolutional neural network incorporating a coordinate attention mechanism; and receiving the predicted seawater salinity value output by the target model. The method provided by this invention can automatically and accurately detect salinity values ​​in the marine environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of seawater salinity detection technology, and in particular to a method and apparatus for quantitative detection of seawater salinity. Background Technology

[0002] Liquid crystals represent a novel state of matter, existing between liquids and solids. In recent years, their optical birefringence and highly sensitive response to external stimuli have attracted widespread attention in the field of sensing. The working principle of liquid crystal sensors is primarily based on confining liquid crystals within a specific space. When exposed to environmental stimuli (such as temperature, pressure, physical or chemical interactions), the alignment of the liquid crystal molecules changes. This change in alignment can be observed using an orthogonal polarizing microscope, resulting in a series of optical images. Currently, nematic liquid crystals (5CB), due to their chemical stability and optical responsiveness, are frequently used as sensitive elements in biosensors, effectively reflecting subtle chemical changes in the environment. The design of liquid crystal sensors typically involves three key components: a functionalized substrate, a liquid crystal film, and a liquid-liquid crystal interface system for detecting specific biological or chemical substances. The functionalized substrate primarily provides a suitable platform for the attachment and alignment of liquid crystal molecules, usually achieved through chemical modification to achieve vertical or parallel alignment of the molecules on the substrate. The fabrication of the liquid crystal film requires controlling its thickness and uniformity. Flexible polydimethylsiloxane (PDMS) material can be used to fabricate optofluidic chips with microstructures. Liquid crystals are filled into the microstructures to confine the liquid crystals, and the size and thickness of the liquid crystal film can be controlled by controlling the size of the chip microstructures.

[0003] Despite recent advancements in liquid crystal sensor research, several technical challenges remain in the specific application of marine salinity detection. Firstly, the open system design of traditional sensors makes them susceptible to environmental factors such as temperature, humidity, and chemical contamination, affecting their stability and detection accuracy. Furthermore, the complex pre- and post-processing of samples, involving multiple steps such as sample collection, storage, and pretreatment, not only increases operational complexity but can also introduce additional errors due to improper handling. Therefore, developing liquid crystal sensors capable of automatically acquiring salinity readings to reduce human intervention is a major challenge in the current development of marine salinity sensors. Summary of the Invention

[0004] This invention provides a method and apparatus for quantitative detection of seawater salinity in a marine environment that can automatically and with high precision detect salinity values.

[0005] To address the aforementioned technical problems, embodiments of the present invention provide a method for quantitative detection of seawater salinity, comprising:

[0006] Obtain the liquid crystal optical image to be tested, which is formed by a polarizing microscope by acquiring a liquid crystal chip after it has been immersed in the seawater to be tested;

[0007] The liquid crystal optical image is preprocessed;

[0008] The target units are extracted from the preprocessed liquid crystal optical image based on the target detection algorithm;

[0009] The extracted target units are input into the pre-trained target model, which extracts features from the target units and calculates the extracted image features to generate a predicted seawater salinity value. The target model is formed by a convolutional neural network that incorporates a coordinate attention mechanism.

[0010] Receive the predicted seawater salinity value output by the target model.

[0011] In some embodiments, the preprocessing of the liquid crystal optical image includes:

[0012] The liquid crystal optical image is subjected to rotation correction and data cleaning processing.

[0013] In some embodiments, the liquid crystal optical image comprises multiple images, and the rotation correction and data cleaning processing of the liquid crystal optical image includes:

[0014] The dimensions of multiple liquid crystal optical images are unified to a target size, which matches the input requirements of the target model for the input data.

[0015] The liquid crystal optical image, after size adjustment, is randomly flipped horizontally and vertically within a specified angle range;

[0016] The flipped liquid crystal optical image is subjected to pixel value standardization processing so that the pixel mean and standard deviation of the processed liquid crystal optical image meet the input requirements.

[0017] In some embodiments, the extraction of target units from the preprocessed liquid crystal optical image based on the target detection algorithm includes:

[0018] The preprocessed liquid crystal optical image is subjected to target detection and segmentation based on a specified target detection algorithm. Low-quality images are filtered out based on the confidence level in the target detection algorithm, while high-quality images are retained. At the same time, the cell regions corresponding to each group of liquid crystals in the high-quality images are determined. The specified target detection algorithm includes the YOLO series of algorithms.

[0019] In some embodiments, the method further includes:

[0020] Recursively traverse all sub-modules in the efficient convolutional neural network model and introduce the coordinate attention mechanism into the efficient convolutional neural network, so that the coordinate attention mechanism replaces the channel attention mechanism in the efficient convolutional neural network;

[0021] Obtain the number of input features of the classifier in the efficient convolutional neural network, and set the last layer of the classifier based on the number of input features so that the classifier forms a linear layer;

[0022] The efficient convolutional neural network obtained from the current processing is determined as the initial model of the target model;

[0023] The initial model is trained to obtain the target model.

[0024] In some embodiments, training the initial model includes:

[0025] Obtain training data, which includes different salinity values ​​of seawater and target units of training liquid crystal optical images corresponding to seawater with different salinity values;

[0026] Based on the training data, the initial model is trained using the mean squared error as the loss function, a learning rate of 0.0001, and 100 iterations.

[0027] The generalization performance of the initial model after training was evaluated using 10-fold cross-validation.

[0028] In some embodiments, the method further includes:

[0029] The training data is divided into a training set and a validation set;

[0030] In each iteration of the calculation, all data batches are iterated based on the training set to calculate the loss;

[0031] The loss result is backpropagated, and the parameters of the initial model are updated accordingly.

[0032] Calculate and record R for each batch. 2 value.

[0033] In some embodiments, evaluating the generalization performance of the trained initial model using 10-fold cross-validation includes:

[0034] The 10-fold cross-validation method is used to evaluate the performance of the initial model after one iteration on the validation set, and the R-value of this performance evaluation is calculated and recorded. 2 value;

[0035] R during the verification phase 2 The value reaches a new high, or the R value during the training or validation phase.2 When the values ​​simultaneously reach new highs, the current model state is saved to obtain the target model.

[0036] In some embodiments, the liquid crystal chip is a liquid crystal optical fluid control chip, which includes the following components during fabrication:

[0037] Silicon wafer templates are prepared using photolithography technology;

[0038] Polydimethylsiloxane was used to mold the silicon wafer template to obtain a polydimethylsiloxane optofluidic chip.

[0039] The polydimethylsiloxane photofluid chip was placed in a vacuum and dry environment and liquid crystal was filled to obtain a liquid crystal photofluid chip.

[0040] The process of obtaining the liquid crystal optical image to be detected includes:

[0041] The liquid crystal optofluidic chip is placed under the polarizing microscope, and the liquid crystal optofluidic chip is immersed in seawater to be tested, so as to acquire multiple liquid crystal optical images that meet the time dimension through the polarizing microscope.

[0042] Another embodiment of the present invention also provides a seawater salinity quantitative detection device, comprising:

[0043] The acquisition module is used to acquire the liquid crystal optical image to be detected, which is formed by a polarizing microscope by acquiring the liquid crystal chip after it has been immersed in the seawater to be tested;

[0044] The preprocessing module is used to preprocess the liquid crystal optical image;

[0045] An extraction module is used to extract target units from the preprocessed liquid crystal optical image according to a target detection algorithm;

[0046] The input module is used to input the extracted target unit into the pre-trained target model, and the target model performs feature extraction on the target unit and calculates the extracted image features to generate a seawater salinity prediction value. The target model is formed by a convolutional neural network that introduces a coordinate attention mechanism.

[0047] A receiving module is used to receive the predicted seawater salinity value output by the target model.

[0048] Based on the disclosure of the above embodiments, it can be understood that the beneficial effects of the embodiments of the present invention include the ability to effectively identify and analyze subtle changes in liquid crystal images, accurately analyze data, simplify operation procedures, and improve the detection capability for subtle changes by combining target detection algorithms and efficient neural networks. This significantly improves the performance and reliability of the sensor, providing more detailed and accurate detection results for seawater salinity prediction. Furthermore, it enables the liquid crystal chip to better adapt to complex environments and changes in practical applications, further enhancing the overall performance and application scope of the prediction system.

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

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

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

[0052] Figure 1 This is a schematic flowchart of the seawater salinity quantitative detection method in an embodiment of the present invention.

[0053] Figure 2 This is a flowchart illustrating a method for quantitative detection of seawater salinity according to another embodiment of the present invention.

[0054] Figure 3 This is a feature selection map of a liquid crystal optical image in an embodiment of the present invention.

[0055] Figure 4 This is a structural block diagram of the seawater salinity quantitative detection device in an embodiment of the present invention. Detailed Implementation

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

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

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

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

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

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

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

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

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

[0065] like Figure 1 As shown, this embodiment of the invention provides a method for quantitative detection of seawater salinity, comprising:

[0066] S1: Obtain the liquid crystal optical image to be tested, which is formed by a polarizing microscope by collecting the liquid crystal chip after it has been immersed in the seawater to be tested;

[0067] S2: Preprocess the liquid crystal optical image;

[0068] S3: Extract target units from the preprocessed liquid crystal optical image based on the target detection algorithm;

[0069] S4: The extracted target unit is input into the pre-trained target model, and the target model performs feature extraction on the target unit and calculates the extracted image features to generate a seawater salinity prediction value. The target model is formed by a convolutional neural network that introduces a coordinate attention mechanism.

[0070] S5: Receive the predicted seawater salinity value output by the target model.

[0071] The method in this embodiment can be applied to a system model, which includes a target detection model and a target model. The target detection model is based on a target detection algorithm, such as, but not limited to, the YOLOv8 algorithm, or other YOLO series algorithms, or other types of target detection algorithms; the specific method is not unique. The liquid crystal optical image is obtained by a polarizing microscope by acquiring the image presented by a liquid crystal chip immersed in the seawater to be tested. After acquisition, the polarizing microscope saves the image for subsequent salinity prediction.

[0072] For example, the liquid crystal chip is a liquid crystal optical fluid control chip, which includes the following components during its fabrication:

[0073] Silicon wafer templates are prepared using photolithography technology;

[0074] Polydimethylsiloxane was used to mold the silicon wafer template to obtain a polydimethylsiloxane optofluidic chip.

[0075] The polydimethylsiloxane photofluid chip was placed in a vacuum and dry environment and liquid crystal was filled to obtain a liquid crystal photofluid chip.

[0076] The process of obtaining the liquid crystal optical image to be detected includes:

[0077] S6: Place the liquid crystal optofluidic chip under the polarizing microscope and immerse the liquid crystal optofluidic chip in the seawater to be tested, so as to acquire multiple liquid crystal optical images that meet the time dimension through the polarizing microscope.

[0078] Once the system model obtains the liquid crystal optical image, it performs image preprocessing. The preprocessed image is then input into the target detection model, which identifies and segments the target region to obtain each target unit within the liquid crystal optical image. This target unit is then input into the target model, which extracts and calculates image features to obtain the predicted seawater salinity value.

[0079] As can be seen from the above embodiments, by combining target detection algorithms and efficient neural networks, subtle changes in liquid crystal images can be effectively identified and analyzed, data can be accurately analyzed, operation procedures can be simplified, and the detection capability for subtle changes can be improved, thereby significantly enhancing the performance and reliability of the sensor and providing more detailed and accurate detection results for seawater salinity prediction. Furthermore, it enables the liquid crystal chip to better adapt to complex environments and changes in practical applications, further improving the overall performance and application range of the prediction system.

[0080] In one embodiment, the preprocessing of the liquid crystal optical image includes:

[0081] S7: Perform rotation correction and data cleaning processing on the liquid crystal optical image.

[0082] Specifically, such as Figure 2 As shown, the liquid crystal optical image comprises multiple images, and the rotation correction and data cleaning processing of the liquid crystal optical image includes:

[0083] S8: Unify the size of multiple liquid crystal optical images to a target size, wherein the target size matches the input requirements of the target model for input data;

[0084] S9: Randomly flip the liquid crystal optical image, after size adjustment, horizontally and vertically within a specified angle range;

[0085] S10: Perform pixel value standardization processing on the flipped liquid crystal optical image so that the pixel mean and standard deviation of the processed liquid crystal optical image meet the input requirements.

[0086] For example, the image preprocessing process begins with image input preparation; in this embodiment, these images can be captured and saved using an orthogonal polarizing microscope. Subsequently, the image data enters an automatic correction stage, including steps such as adjusting image size and normalization, aiming to make the image conform to the input specifications of the subsequent target detection model and target model. Following this, data cleaning is performed to remove noise and irrelevant content from the image, ensuring the quality of the processed image.

[0087] The image processing algorithm used in this embodiment is transforms.Normalize(mean=[0.485,0.456,0.406],std=[0.229,0.224,0.225]), which is an image preprocessing method used to standardize the pixel values ​​of an image, including standardizing each color channel (red, green, and blue) separately. This algorithm makes the value distribution of each color channel in the image more consistent with the input distribution of the target model during training.

[0088] To enhance the overall generalization ability and robustness of the system model, this embodiment also employs a series of data augmentation techniques. These include uniformly adjusting all input image data to 224×224 pixels to meet the model's input requirements (different models have different input requirements, hence the different pixel adjustments; the 224×224 mentioned above is just one example); randomly flipping the pixel-adjusted images horizontally and vertically to increase data diversity, for example, randomly rotating the image within ±10 degrees to simulate different shooting angles; and finally, standardizing the image pixel values ​​to achieve a mean of [0.485, 0.456, 0.406] and a standard deviation of [0.229, 0.224, 0.225], satisfying the input data requirements of the subsequent target model and facilitating model recognition and processing.

[0089] In another embodiment, the extraction of target units from the preprocessed liquid crystal optical image based on the target detection algorithm includes:

[0090] S11: Perform target detection and segmentation processing on the preprocessed liquid crystal optical image based on the specified target detection algorithm, so as to filter out low-quality images and retain high-quality images based on the confidence level in the target detection algorithm, and at the same time determine the cell region corresponding to each group of liquid crystals in the high-quality image. The specified target detection algorithm includes the YOLO series algorithm.

[0091] For example, after completing the aforementioned data preprocessing, the YOLOv8 algorithm can be used, but is not limited to, to perform target detection and segmentation on the liquid crystal optical image, accurately identifying the small square regions corresponding to each group of liquid crystals in the liquid crystal optical image, i.e., the target units. This is equivalent to dividing the liquid crystal optical image into multiple unit regions. For details, please refer to... Figure 3 As shown. The YOLOv8 algorithm used in this embodiment is a target detection algorithm with real-time detection capabilities. It can accurately locate and identify targets in complex backgrounds, reducing the interference of environmental factors on detection. In addition, the system can also utilize the confidence level provided by YOLOv8 to directly filter out defective images with low confidence levels, improving data quality and the accuracy of subsequent analysis.

[0092] For the target model, it needs to be built and trained before application. In one embodiment, the method further includes:

[0093] S12: Recursively traverse all sub-modules in the efficient convolutional neural network model and introduce the coordinate attention mechanism into the efficient convolutional neural network, so that the coordinate attention mechanism replaces the channel attention mechanism in the efficient convolutional neural network;

[0094] S13: Obtain the number of input features of the classifier in the efficient convolutional neural network, and set the last layer of the classifier based on the number of input features so that the classifier forms a linear layer;

[0095] S14: Determine the efficient convolutional neural network obtained from the current processing as the initial model of the target model;

[0096] S15: Train the initial model to obtain the target model.

[0097] In this embodiment, the preferred high-efficiency convolutional neural network is EfficientNetV2, but other neural networks can also be used; the specific choice is not unique. The EfficientNetV2 used in this embodiment introduces the Fused-MBConv module, which combines MBConv (inverted residual structure) with standard convolution. This significantly improves training speed by reducing redundant computation and optimizing memory usage. Simultaneously, EfficientNetV2-S finely tunes the original neural network architecture, introducing more advanced activation functions and regularization techniques, such as the SiLU activation function and DropPath regularization. These improvements not only enhance the model's expressive power but also strengthen its generalization performance. In this embodiment, the initial model is obtained by improving EfficientNetV2-S, for example, by introducing a coordinate attention mechanism instead of the original SE attention mechanism. This allows for more refined processing of spatial information in images, enabling the model to better distinguish key information even when processing images with complex backgrounds and diverse objects. In other words, the initial model prepared in this embodiment is a more efficient convolutional neural network architecture with higher accuracy and speed, suitable for deployment in resource-constrained environments. The network model optimizes its depth, width, and resolution using a composite scaling method, maintaining high performance while reducing computational costs. The introduced coordinate attention mechanism allows the model to focus on key areas in the image that best reflect salinity changes, improving its ability to recognize subtle salinity variations in liquid crystal images. After obtaining the initial model, it is trained to produce the target model. Once the target model is obtained, the system can directly input extracted features, such as the small square image mentioned above, into the target model to obtain the salinity value of the seawater being measured.

[0098] Specifically, in one embodiment, training the initial model includes:

[0099] S16: Obtain training data, which includes different salinity values ​​of seawater and target units of training liquid crystal optical images corresponding to seawater with different salinity values;

[0100] S17: Based on the training data, and using the mean squared error as the loss function, the initial model is trained in a standard manner with a learning rate of 0.0001 and 100 iterations.

[0101] S18: Use 10-fold cross-validation to evaluate the generalization performance of the initial model after training.

[0102] Furthermore, the method also includes:

[0103] S19: Divide the training data into a training set and a validation set;

[0104] S20: In each iteration of the calculation, all data batches are iterated based on the training set to calculate the loss;

[0105] S21: Backpropagate the loss result and update the parameters of the initial model accordingly;

[0106] S22: Calculate and record R for each batch. 2 value.

[0107] The method of evaluating the generalization performance of the initial model after training using 10-fold cross-validation includes:

[0108] S23: Using the 10-fold cross-validation method, the performance of the initial model after one iteration of computation is evaluated on the validation set. Simultaneously, the R-value of this performance evaluation is calculated and recorded. 2 value;

[0109] S24: R during the verification phase 2 The value reaches a new high, or the R value during the training or validation phase. 2 When the values ​​simultaneously reach new highs, the current model state is saved to obtain the target model.

[0110] For example, this embodiment uses a pre-trained EfficientNetV2-S model as the base network and makes two main improvements. First, the original Squeeze-and-Excitation (SE) attention module is replaced with a coordinate attention mechanism. The coordinate attention module enhances feature representation by encoding positional information in the spatial dimension. Specifically, a CoordAttention class can be defined, and all sub-modules of the model can be recursively traversed, replacing the SE module with the CoordAttention module. Second, since the task in this embodiment is a regression problem, the original classifier is replaced with a linear layer that outputs a single continuous value. Specifically, the number of input features num_features of the model classifier can be obtained, and the last layer of the classifier can be replaced with nn.Linear(num_features,1), thereby achieving the effect of converting the classifier into a linear layer.

[0111] During model training, this embodiment uses mean squared error (MSE) as the loss function to measure the difference between the predicted and actual concentrations. The optimizer is Adam, with a learning rate set to 0.0001, and the loss function is minimized by optimizing the model parameters. Training in this embodiment lasts for 100 epochs, and 10-fold K-Fold Cross Validation is used to evaluate the model's generalization performance. In each fold, the training dataset is divided into training and validation sets. The model is trained on the training set and evaluated on the validation set. Optionally, a batch size of 128 is used during both training and testing to balance training speed and memory consumption, and three worker threads (num_workers = 3) are used to accelerate the data loading process.

[0112] In each epoch, the model first iterates through all batches of data on the training set, calculates the loss, then backpropagates and updates the model parameters, while recording the MSE (mean squared error) and R value for each batch. 2 The model was then switched to evaluation mode to assess its performance on the validation set, and the MSE and R were calculated and recorded. 2 Value. The R value of the validation set. 2 The value reaches a new high, or the R value during the training or validation phase. 2 When the values ​​simultaneously reach new highs, the current state of the model is saved to ensure its optimal performance. Through the above training process, a target model with high-level processing capabilities for seawater salinity prediction tasks can be obtained.

[0113] After training, the optimized deep learning model can be deployed in the system model for analyzing real-time acquired liquid crystal images. The specific steps include inputting the optical image captured by the liquid crystal photofluidic chip into the trained system model, and the model outputting the corresponding seawater salinity value. This method allows for real-time monitoring of salinity changes in the marine environment without requiring manual data processing of the reacted liquid crystal sensor, making it simple and quick to operate. Simultaneously, this method avoids the time-consuming and labor-intensive problems of traditional data processing, reduces the influence of subjective factors on the detection results, and ensures the objectivity and reliability of the detection results. Experimental results show that the model achieves optimal R-values ​​on the test set. 2 The value reached 0.992, indicating that the proposed method has superior performance and broad application prospects in seawater salinity detection.

[0114] In summary, the method proposed in this embodiment has at least the following advantages compared with existing solutions:

[0115] High degree of automation

[0116] The system achieves automatic detection of seawater salinity through deep learning algorithms, eliminating the tedious manual data processing steps of traditional methods and improving detection efficiency and consistency. Furthermore, the system can operate stably in various environments, further reducing reliance on manual operation and realizing a truly fully automated detection process.

[0117] High detection accuracy

[0118] The optimized deep learning model can accurately analyze the optical images generated by the liquid crystal optofluidic chip, enabling precise quantification of seawater salinity. This is significantly superior to traditional methods that rely on visual observation or simple image processing based on grayscale values ​​and response time. By learning from a large number of samples, the deep learning algorithm captures minute optical changes, thereby improving the sensitivity and accuracy of detection and ensuring the reliability of the results.

[0119] Easy and quick to operate

[0120] The entire testing process requires no complex operations or specialized knowledge. Users only need to prepare simple samples and operate the equipment to complete the salinity test, lowering the barrier to entry. At the same time, the system interface is user-friendly and the operation process is clear, allowing even non-professionals to easily get started, greatly simplifying the operation steps and improving the user experience.

[0121] Save time and labor costs

[0122] The automated testing process reduces human intervention and data processing time, significantly shortening the testing cycle while reducing reliance on operators and lowering labor costs. Compared to traditional methods, this embodiment can complete the testing of a large number of samples in a shorter time, improving work efficiency and making it suitable for large-scale marine environmental monitoring needs.

[0123] Reduce subjective error

[0124] By automatically analyzing optical images through algorithms, subjective errors caused by human judgment are avoided, improving the objectivity and reliability of detection results. Deep learning models, based on data-driven analysis, ensure consistency and accuracy in each detection, reducing fluctuations caused by human factors and thus providing more stable and reliable detection data.

[0125] like Figure 4 As shown, another embodiment of the present invention also provides a seawater salinity quantitative detection device, comprising:

[0126] The acquisition module is used to acquire the liquid crystal optical image to be detected, which is formed by a polarizing microscope by acquiring the liquid crystal chip after it has been immersed in the seawater to be tested;

[0127] The preprocessing module is used to preprocess the liquid crystal optical image;

[0128] An extraction module is used to extract target units from the preprocessed liquid crystal optical image according to a target detection algorithm;

[0129] The input module is used to input the extracted target unit into the pre-trained target model, and the target model performs feature extraction on the target unit and calculates the extracted image features to generate a seawater salinity prediction value. The target model is formed by a convolutional neural network that introduces a coordinate attention mechanism.

[0130] The receiving module is used to receive the predicted seawater salinity values ​​output by the target model.

[0131] In some embodiments, the preprocessing of the liquid crystal optical image includes:

[0132] The liquid crystal optical image is subjected to rotation correction and data cleaning processing.

[0133] In some embodiments, the liquid crystal optical image comprises multiple images, and the rotation correction and data cleaning processing of the liquid crystal optical image includes:

[0134] The dimensions of multiple liquid crystal optical images are unified to a target size, which matches the input requirements of the target model for the input data.

[0135] The liquid crystal optical image, after size adjustment, is randomly flipped horizontally and vertically within a specified angle range;

[0136] The flipped liquid crystal optical image is subjected to pixel value standardization processing so that the pixel mean and standard deviation of the processed liquid crystal optical image meet the input requirements.

[0137] In some embodiments, the extraction of target units from the preprocessed liquid crystal optical image based on the target detection algorithm includes:

[0138] The preprocessed liquid crystal optical image is subjected to target detection and segmentation based on a specified target detection algorithm. Low-quality images are filtered out based on the confidence level in the target detection algorithm, while high-quality images are retained. At the same time, the cell regions corresponding to each group of liquid crystals in the high-quality images are determined. The specified target detection algorithm includes the YOLO series of algorithms.

[0139] In some embodiments, the apparatus further includes:

[0140] The recursive module is used to recursively traverse all sub-modules in the efficient convolutional neural network model and introduce the coordinate attention mechanism into the efficient convolutional neural network, so that the coordinate attention mechanism replaces the channel attention mechanism in the efficient convolutional neural network.

[0141] The acquisition module is used to acquire the number of input features of the classifier in the high-efficiency convolutional neural network, and to set the last layer of the classifier based on the number of input features so that the classifier forms a linear layer;

[0142] The determination module is used to determine the efficient convolutional neural network obtained from the current processing as the initial model of the target model;

[0143] The training module is used to train the initial model to obtain the target model.

[0144] In some embodiments, training the initial model includes:

[0145] Obtain training data, which includes different salinity values ​​of seawater and target units of training liquid crystal optical images corresponding to seawater with different salinity values;

[0146] Based on the training data, the initial model is trained using the mean squared error as the loss function, a learning rate of 0.0001, and 100 iterations.

[0147] The generalization performance of the initial model after training was evaluated using 10-fold cross-validation.

[0148] In some embodiments, the method further includes:

[0149] The training data is divided into a training set and a validation set;

[0150] In each iteration of the calculation, all data batches are iterated based on the training set to calculate the loss;

[0151] The loss result is backpropagated, and the parameters of the initial model are updated accordingly.

[0152] Calculate and record R for each batch. 2 value.

[0153] In some embodiments, evaluating the generalization performance of the trained initial model using 10-fold cross-validation includes:

[0154] The 10-fold cross-validation method is used to evaluate the performance of the initial model after one iteration on the validation set, and the R-value of this performance evaluation is calculated and recorded. 2 value;

[0155] R during the training and validation phases 2 When the values ​​simultaneously reach new highs, the current model state is saved to obtain the target model.

[0156] In some embodiments, the liquid crystal chip is a liquid crystal optical fluid control chip, which includes the following components during fabrication:

[0157] Silicon wafer templates are prepared using photolithography technology;

[0158] Polydimethylsiloxane was used to mold the silicon wafer template to obtain a polydimethylsiloxane optofluidic chip.

[0159] The polydimethylsiloxane photofluid chip was placed in a vacuum and dry environment and liquid crystal was filled to obtain a liquid crystal photofluid chip.

[0160] The process of obtaining the liquid crystal optical image to be detected includes:

[0161] The liquid crystal optofluidic chip is placed under the polarizing microscope, and the liquid crystal optofluidic chip is immersed in seawater to be tested, so as to acquire multiple liquid crystal optical images that meet the time dimension through the polarizing microscope.

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

[0163] One or more processors;

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

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

[0166] Furthermore, one embodiment of the present invention also provides a storage medium storing a computer program, which, when executed by a processor, implements the seawater salinity quantitative 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.

[0167] Furthermore, embodiments of the present invention also provide a computer program product, which is tangibly stored on a computer-readable medium and includes computer-readable instructions that, when executed, cause at least one processor to perform a seawater salinity quantitative detection method as described in the embodiments above.

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

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

[0170] 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 flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts 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, 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 flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.

[0171] 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 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0172] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of protection of this application is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this application as described above, which are not provided in detail for the sake of brevity.

Claims

1. A method for quantitative detection of seawater salinity, characterized in that, include: Obtain the liquid crystal optical image to be tested, which is formed by a polarizing microscope by acquiring a liquid crystal chip after it has been immersed in the seawater to be tested; The liquid crystal optical image is preprocessed; Extracting target units from the preprocessed liquid crystal optical image based on a target detection algorithm includes: performing target detection and segmentation processing on the preprocessed liquid crystal optical image based on a specified target detection algorithm, filtering out low-quality images based on the confidence level in the target detection algorithm, retaining high-quality images, and simultaneously determining the cell regions corresponding to each group of liquid crystals in the high-quality images. The specified target detection algorithm includes the YOLO series algorithms. The extracted target units are input into the pre-trained target model, which extracts features from the target units and calculates the extracted image features to generate a predicted seawater salinity value. The target model is formed by a convolutional neural network that incorporates a coordinate attention mechanism. Receive the predicted seawater salinity value output by the target model; The method further includes: Recursively traverse all sub-modules in the efficient convolutional neural network model and introduce the coordinate attention mechanism into the efficient convolutional neural network, so that the coordinate attention mechanism replaces the channel attention mechanism in the efficient convolutional neural network; Obtain the number of input features of the classifier in the efficient convolutional neural network, and set the last layer of the classifier based on the number of input features so that the classifier forms a linear layer; The efficient convolutional neural network obtained from the current processing is determined as the initial model of the target model; The initial model is trained to obtain the target model.

2. The method for quantitative detection of seawater salinity according to claim 1, characterized in that, The preprocessing of the liquid crystal optical image includes: The liquid crystal optical image is subjected to rotation correction and data cleaning processing.

3. The method for quantitative detection of seawater salinity according to claim 2, characterized in that, The liquid crystal optical image comprises multiple images, and the rotation correction and data cleaning processing of the liquid crystal optical image includes: The dimensions of multiple liquid crystal optical images are unified to a target size, which matches the input requirements of the target model for the input data. The liquid crystal optical image, after size adjustment, is randomly flipped horizontally and vertically within a specified angle range; The flipped liquid crystal optical image is subjected to pixel value standardization processing so that the pixel mean and standard deviation of the processed liquid crystal optical image meet the input requirements.

4. The method for quantitative detection of seawater salinity according to claim 1, characterized in that, Training the initial model includes: Obtain training data, which includes different salinity values ​​of seawater and target units of training liquid crystal optical images corresponding to seawater with different salinity values; Based on the training data, the initial model is trained using the mean squared error as the loss function, a learning rate of 0.0001, and 100 iterations. The generalization performance of the initial model after training was evaluated using 10-fold cross-validation.

5. The method for quantitative detection of seawater salinity according to claim 4, characterized in that, The method further includes: The training data is divided into a training set and a validation set; In each iteration of the calculation, all data batches are iterated based on the training set to calculate the loss result; The loss result is backpropagated, and the parameters of the initial model are updated accordingly. Calculate and record R for each batch. 2 value.

6. The method for quantitative detection of seawater salinity according to claim 5, characterized in that, The method of evaluating the generalization performance of the initial model after training using 10-fold cross-validation includes: The 10-fold cross-validation method is used to evaluate the performance of the initial model after one iteration on the validation set, and the R-value of this performance evaluation is calculated and recorded. 2 value; R during the verification phase 2 The value reaches a new high, or the R value during the training or validation phase. 2 When the values ​​simultaneously reach new highs, the current model state is saved to obtain the target model.

7. The method for quantitative detection of seawater salinity according to claim 1, characterized in that, The liquid crystal chip is a liquid crystal optical fluid control chip, and the liquid crystal optical fluid control chip includes the following components during its fabrication: Silicon wafer templates are prepared using photolithography technology; Polydimethylsiloxane was used to mold the silicon wafer template to obtain a polydimethylsiloxane optofluidic chip. The polydimethylsiloxane photofluid chip was placed in a vacuum and dry environment and liquid crystal was filled to obtain a liquid crystal photofluid chip. The process of obtaining the liquid crystal optical image to be detected includes: The liquid crystal optofluidic chip is placed under the polarizing microscope, and the liquid crystal optofluidic chip is immersed in seawater to be tested, so as to acquire multiple liquid crystal optical images that meet the time dimension through the polarizing microscope.

8. A seawater salinity quantitative detection device for use in the seawater salinity quantitative detection method according to claim 1, characterized in that, include: The acquisition module is used to acquire the liquid crystal optical image to be detected, which is formed by a polarizing microscope by acquiring the liquid crystal chip after it has been immersed in the seawater to be tested; The preprocessing module is used to preprocess the liquid crystal optical image; The extraction module is used to extract the target region from the preprocessed liquid crystal optical image according to the target detection algorithm; The input module is used to input the extracted target unit into the pre-trained target model, and the target model performs feature extraction on the target unit and calculates the extracted image features to generate a seawater salinity prediction value. The target model is formed by a convolutional neural network that introduces a coordinate attention mechanism. A receiving module is used to receive the predicted seawater salinity value output by the target model.

Citation Information

Patent Citations

  • Liquid crystal sensor for visually detecting organophosphorus pesticide and detection method thereof

    CN114414481A

  • Liquid crystal alignment layer evaluating device

    JP2002365637A