Urine sample automatic detection method, device and equipment based on intelligent drug detection machine

Through the automatic detection method of urine sample of the intelligent drug detection machine, multi-channel quantitative allocation, optical feature extraction and neural network analysis are used to solve the problems of low efficiency and insufficient data analysis capabilities of traditional drug detection methods, and efficient, accurate and safe drug detection is achieved.

CN119470946BActive Publication Date: 2025-04-04SHENZHEN DEAO XINNUO ELECTRONIC CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510047413.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-04-04
Estimated Expiration
2045-01-13

AI Technical Summary

Technical Problem

Traditional urine drug detection methods rely on manual operation, are inefficient and susceptible to human factors. The existing automation equipment has problems such as incomplete sample pre-processing, single detection channels, and limited data analysis capabilities, especially in multimodal data fusion analysis and data security.

Method used

The automatic detection method of urine sample based on intelligent poison detection machines is adopted to achieve identity verification through biometric collection and comparison verification; the original urine sample is quantitatively allocated and parallel reactions are performed on multi-channel, the optical feature matrix is ​​extracted, and feature extraction, fusion and result integration are performed through the timing diagram neural network and the relationship inference network to generate drug detection results, and encrypted storage.

Benefits of technology

It realizes full automation of the inspection process, reduces manual operation costs, improves detection efficiency, ensures the accuracy and reliability of the inspection results, and enhances data security and legal effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119470946B_ABST
    Figure CN119470946B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, device and equipment for automatic urine sample detection based on an intelligent drug detection machine. The method: collect and compare the biometric characteristics of the person being tested to obtain identity verification results, and collect the original urine sample data of the person being tested; perform multi-channel quantitative distribution to obtain multiple detection channel samples; perform parallel reaction and optical feature extraction to obtain an optical feature matrix; perform feature extraction and fusion to obtain multiple fusion feature vectors; input a time series graph neural network for dynamic analysis to obtain multiple time series feature data, and perform feature mapping and result integration on the multiple time series feature data through a relational reasoning network to obtain drug detection results; associate and integrate the drug detection results with the identity verification results, generate a detection report, and upload the detection report to a database for encrypted storage. The implementation of the present invention realizes the full automation of the detection process, significantly reduces the cost of manual operation, and improves detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of drug detection, and in particular to a method, device and equipment for automatically detecting urine samples based on an intelligent drug detection machine. Background Art

[0002] With the increasing number of drug types and the increasing abuse, drug detection is facing huge challenges. Traditional urine drug detection methods mainly rely on manual operations, which are not only inefficient but also easily affected by human factors, making it difficult to ensure the accuracy and reliability of the test results. Especially in large-scale screening scenarios, manual detection methods are difficult to meet the needs of fast, accurate, and high-throughput detection.

[0003] At present, although there are some automated drug detection equipment on the market, these devices generally have problems such as incomplete sample pre-processing, single detection channel, and limited data analysis capabilities. Especially in the fusion analysis of multimodal data, existing technologies often use simple feature superposition or linear combination methods, which cannot fully explore the deep correlation between different modal data, affecting the accuracy of detection. In addition, the existing drug detection system also has many shortcomings in identity authentication, sample traceability, data security, etc. Due to the lack of a complete sample traceability mechanism and an effective data encryption storage solution, the reliability and legal effect of the test results are often questioned. At the same time, the adjustment of various parameters in the detection process mostly relies on experience settings, and lacks an intelligent adaptive adjustment mechanism, which also limits the improvement of detection efficiency to a certain extent. Summary of the invention

[0004] The main purpose of the present invention is to provide a method, device and equipment for automatic detection of urine samples based on an intelligent drug detection machine. The present invention realizes full automation of the detection process, significantly reduces manual operation costs, and improves detection efficiency.

[0005] To achieve the above object, the present invention provides a method for automatically detecting urine samples based on an intelligent drug detection machine, comprising the following steps:

[0006] Collect and compare the biometrics of the person being tested, obtain identity verification results, and collect the original urine sample of the person being tested;

[0007] Performing multi-channel quantitative distribution on the original urine sample to obtain samples of multiple detection channels;

[0008] Respectively performing parallel reaction and optical feature extraction on the multiple detection channel samples to obtain an optical feature matrix of each detection channel sample;

[0009] Feature extraction and fusion are performed on the optical feature matrix of each detection channel sample to obtain multiple fused feature vectors;

[0010] Input the multiple fused feature vectors into a time-series graph neural network for dynamic analysis to obtain multiple time-series feature data, and perform feature mapping and result integration on the multiple time-series feature data through a relational reasoning network to obtain a drug detection result;

[0011] The drug detection result is associated and integrated with the identity verification result to generate a detection report, and the detection report is uploaded to a database for encrypted storage.

[0012] The present invention also provides a urine sample automatic detection device based on an intelligent drug detection machine, comprising:

[0013] The verification module is used to collect and compare the biometrics of the person being tested, obtain the identity verification result, and collect the original urine sample of the person being tested;

[0014] A distribution module, used for performing multi-channel quantitative distribution on the original urine sample to obtain samples of multiple detection channels;

[0015] An extraction module, used to perform parallel reaction and optical feature extraction on the multiple detection channel samples respectively, to obtain an optical feature matrix of each detection channel sample;

[0016] A fusion module is used to extract and fuse the optical feature matrix of each detection channel sample to obtain multiple fused feature vectors;

[0017] An integration module, used for inputting the multiple fused feature vectors into a time series graph neural network for dynamic analysis to obtain multiple time series feature data, and performing feature mapping and result integration on the multiple time series feature data through a relational reasoning network to obtain a drug detection result;

[0018] A generation module is used to associate and integrate the drug detection result with the identity authentication result, generate a detection report, and upload the detection report to a database for encrypted storage.

[0019] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0020] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.

[0021] In summary, the technical solution provided by the present invention realizes the accurate authentication of the identity of the person being tested and the reliable tracking of the samples through the multimodal biometric fusion recognition and sample full traceability mechanism, effectively ensuring the standardization and results of the detection process; combined with the high-precision multi-channel liquid separation system, the adaptive and accurate distribution of samples is realized, which significantly improves the repeatability of the detection results; based on the immunochromatography technology and the multi-dimensional optical feature extraction method, the parallel detection of multiple drugs is realized, which greatly improves the detection throughput and efficiency; the multi-channel neural network is innovatively combined with the time series graph neural network, and the accurate detection in complex scenarios is realized through multi-level feature extraction and fusion; a relational reasoning network based on the message passing mechanism is designed to effectively capture the correlation features between different detection channels and improve the robustness of the detection; a complete data encryption storage and management system is constructed to ensure the security and traceability of the detection data; the overall solution realizes the full automation of the detection process, significantly reduces the manual operation cost, and improves the detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic diagram of the steps of a method for automatic urine sample detection based on an intelligent drug detection machine in one embodiment of the present invention;

[0023] Figure 2 It is a structural block diagram of a urine sample automatic detection device based on an intelligent drug detection machine in one embodiment of the present invention;

[0024] Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0025] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0027] Reference Figure 1 This embodiment provides a method for automatically detecting urine samples based on an intelligent drug detection machine, comprising the following steps:

[0028] S1, collect and compare the biometrics of the person being tested, obtain the identity verification result, and collect the original urine sample of the person being tested;

[0029] Among them, the biometric features of the person under examination are collected from multiple angles. The facial image of the person under examination is captured by a multi-angle camera device to generate a series of facial feature sequences. These images are processed to extract feature points and obtain facial feature vectors. At the same time, the fingerprint information of the person under examination is collected by a high-precision scanner to generate a fingerprint grayscale image. Texture enhancement technology is applied to improve the quality of the fingerprint image and extract the fingerprint feature vector. The facial feature vector and the fingerprint feature vector are feature fused to obtain a fused biometric feature. The fused biometric feature is similarly calculated with the feature template in the preset identity database. The calculated similarity score is compared with the pre-set threshold to determine the identity verification result of the person under examination. If the similarity score exceeds the threshold, it means that the identity verification is successful, and a sampling authorization instruction is generated and sent to the urine sample collection device to activate its anti-overflow structure to ensure that there will be no sample leakage during the sampling process. The sample capacity in the urine sample collection device is monitored in real time, and the capacity data is regularly obtained and compared with the preset sampling threshold to confirm the progress of sample collection. When the capacity data reaches the preset threshold, the system sends a sampling completion signal. The triggering of this signal activates the sealing mechanism of the urine sample collection device to ensure the safety and integrity of the sample after collection and prevent sample contamination or leakage. The sealed sampling result is encoded to generate a unique sample number for subsequent tracking and management. The identity verification result, sample number and sampling time are associated to generate sample traceability data. The sample traceability data is bound to the original urine sample to complete the sample filing and ensure the traceability of the sample throughout the entire testing process.

[0030] S2, performing multi-channel quantitative distribution on the original urine sample to obtain samples of multiple detection channels;

[0031] S3, performing parallel reaction and optical feature extraction on samples of multiple detection channels respectively, to obtain an optical feature matrix of the samples of each detection channel;

[0032] It should be noted that each detection channel sample is injected into the pre-loaded immunochromatographic test paper to obtain multiple initial reaction samples, including the drug components to be detected and their reaction products with specific antibodies on the test paper. In order to ensure the completeness and stability of the reaction, the initial reaction sample is processed to reach a steady state to obtain multiple steady-state reaction samples. Multiple steady-state reaction samples are optically scanned respectively, and dynamic color development data is obtained through high-precision optical equipment. By monitoring the color development reaction, the color changes in each sample are captured. The dynamic color development data is divided into regions to extract the key detection area and form a detection area image. The detection area image is background removed to eliminate the background information introduced by light, noise or other interference factors to obtain a pure color development image. The pure color development image is color standardized so that the color comparison between different samples is consistent, and standardized color development data is obtained. The standardized color development data is subjected to light intensity analysis, the intensity of color development in the sample is calculated, and color development intensity data is generated to reflect the concentration information of drugs in the sample. Perform uniformity analysis on the color intensity data, detect the distribution of color in the sample, and obtain color uniformity data. These data can reflect the stability and uniformity of the sample reaction. Perform edge extraction on the color uniformity data to obtain edge clarity data. Use image processing technology to extract edge information of the color area to evaluate the accuracy and quality of the color. Perform quality assessment on the edge clarity data to obtain the edge quality score. Combine the color intensity data, color uniformity data and edge quality score to form a comprehensive optical feature. Normalize and time-series process the comprehensive optical features to ensure that the features of different detection channels are effectively compared during dynamic analysis. Reconstruct the matrix of the time series feature sequence and associate it with the number of each detection channel to form the optical feature matrix of each detection channel sample.

[0033] S4, extracting and fusing the optical feature matrix of each detection channel sample respectively to obtain multiple fused feature vectors;

[0034] Specifically, the optical feature matrix of each detection channel sample is divided into color feature data and morphological feature data, and different types of features are analyzed and processed in a targeted manner to enhance the performance of subsequent models. The color feature data and morphological feature data are normalized separately to ensure that the standardized feature data of each detection channel sample has consistent dimensions and ranges, eliminating the impact caused by the difference in original data. The standardized feature data of each detection channel sample is input into the feature encoding layer for processing. The feature encoding layer consists of three convolution units, each of which contains a convolution layer, a batch normalization layer, and a ReLU activation function. This structure is designed to extract important information from the feature data, obtain the primary feature map of each detection channel sample, and capture the deep information of the color and morphological features in the sample. The primary feature map is input into the feature enhancement layer, which consists of two parallel branches. The first branch uses maximum pooling and a 1×1 convolution structure to extract the significant features of the sample; the second branch uses average pooling and a 3×3 convolution structure to obtain the overall features of the sample. Through multi-scale feature extraction, local and global information are captured simultaneously, and multi-scale feature data of each detection channel sample is generated to enhance the richness of feature expression. The multi-scale feature data is input into the channel attention module for processing. The channel attention module learns the dependency between different channels through the global pooling layer and two fully connected layers, dynamically adjusts the importance of each channel, and obtains the channel weighted features of each detection channel sample. The channel weighted features are input into the spatial attention module, which generates a spatial weight map through convolution operation and sigmoid function to weight different spatial positions of the feature map. Through the spatial weighting mechanism, the key areas in the feature map are focused on to obtain the spatial weighted features of each detection channel sample. The spatial weighted features of each detection channel sample are respectively input into the feature aggregation layer for processing. The feature aggregation layer contains three residual units, each of which consists of two convolutional layers and a skip connection, which not only retains the feature information but also enhances the learning ability of the model. Through this process, the aggregated feature data of each detection channel sample is obtained. The aggregated feature data is input into the feature decoding layer. The feature decoding layer contains two deconvolution units, each of which consists of a deconvolution layer and a LeakyReLU activation function. This process aims to upsample and reconstruct the features to obtain the decoded feature data of each detection channel sample. The decoded feature data is input into the feature fusion layer for processing. The feature fusion layer uses 1×1 convolution to reorganize the channels and adds residual connections for feature integration. This allows the feature vectors of multiple detection channel samples to be effectively fused to obtain multiple fused feature vectors.

[0035] S5, inputting multiple fused feature vectors into a time series graph neural network for dynamic analysis to obtain multiple time series feature data, and performing feature mapping and result integration on the multiple time series feature data through a relational reasoning network to obtain a drug detection result;

[0036] In this process, multiple fused feature vectors are converted into graph structure sequences. In this conversion, each node represents the feature of a time point, and connections are established between nodes at adjacent time points to form multiple initial graph sequences. Time series information is effectively integrated into the feature representation, so that subsequent analysis can capture the characteristics of dynamic changes in time. Multiple initial graph sequences are input into the time series encoding layer for processing. The time series encoding layer consists of a position encoding unit and a time series embedding unit. Time series information is embedded into node features to enhance the sensitivity of features to the time dimension, and multiple encoded graph sequences are obtained. Through this processing, the changes in time series features are effectively captured. Multiple encoded graph sequences are input into the graph convolution layer for processing. The layer contains three spatial convolution units, each of which consists of a graph convolution operator and a ReLU activation function. In this layer, node features are aggregated for spatial information, and useful feature associations are extracted by exchanging information between adjacent nodes to obtain multiple node representation data. The node representation data are respectively input into the time series reasoning layer for processing. The time series reasoning layer consists of gated recurrent units, including update gates and reset gates, which are used to model the time series dependency of node features. Through this mechanism, the long-term and short-term dependencies in the time series are effectively captured, and multiple time series correlation features are obtained, reflecting the connection between different samples in the time dimension. Multiple time series correlation features are input into the multi-head attention layer, which contains 8 independent attention heads. Each attention head will calculate the three mapping matrices of query, key, and value respectively, so as to weight the time series features through the self-attention mechanism and generate multiple time series feature data. Relation encoding is performed on multiple time series feature data. The relationship encoding layer consists of three fully connected layers and a LayerNorm layer. Its goal is to encode the relationship between different time series features into a relationship vector to form feature relationship data, so that the system can effectively represent the relationship between features. After completing the relationship encoding, the feature relationship data is input into the relationship reasoning network. The network contains four reasoning units, each of which includes a relationship update layer and a node update layer. The relationship representation is iteratively updated through the message passing mechanism to obtain more accurate relationship reasoning results. In this process, the system continuously optimizes the expression of features, making the final relationship reasoning results more reliable. The relationship reasoning results are processed by the classification output layer. The classification output layer consists of two fully connected layers and a softmax function, which maps the features to the predefined drug category space to obtain drug detection results.

[0037] Initialize the relationship of feature relationship data, express the relationship between adjacent time series features as a relationship matrix, and clearly define the mutual connection between different features. Use the fully connected layer to reduce the dimension of the relationship matrix to obtain the initial relationship vector, reduce the dimension of the feature, help improve the computational efficiency, and reduce the impact of noise on subsequent processing. Input the initial relationship vector to the relationship update layer of the first reasoning unit for processing. In this layer, the relationship update layer transforms the relationship vector through the multi-layer perceptron to extract more representative feature information and obtain the first relationship update result. This process enhances the expressiveness of the feature by learning the combination of different relationship features. Input the first relationship update result to the node update layer of the first reasoning unit for further processing. In this layer, the node update layer aggregates the relationship information into the node feature to ensure that each node can fully consider the relationship between its neighboring nodes and obtain the first node update result. Through this aggregation mechanism, the system can capture the complex associations between features and improve the model's ability to understand time series data. Input the first node update result to the second reasoning unit. In this unit, message transmission is performed according to the relationship strength between nodes to generate a relationship message vector. Through this mechanism, the system can transfer important information from one node to another, forming an effective feature propagation. At the same time, the gating mechanism is used to select information from the relationship message vector, filter out irrelevant or low-quality information, and obtain the second relationship update result. The second relationship update result is processed by the third reasoning unit. In this layer, the third reasoning unit adopts a residual connection structure to fuse the input features with the update features to obtain the fused relationship features. The design of residual connection improves the learning ability of features, so that the model avoids loss during information transmission and ensures that important information is not forgotten. The fused relationship features are input into the fourth reasoning unit, and the different relationship features are weighted and aggregated through the attention mechanism, so that the model can adaptively focus on more important relationship features to obtain weighted relationship features. The weighted relationship features are nonlinearly transformed to enhance the complexity of the features so that they can better adapt to subsequent decoding tasks and obtain the target relationship features. The target relationship features are feature aggregated through the global pooling layer to obtain a global relationship representation. Through global pooling, the information is condensed into a global view, which is convenient for subsequent relationship decoding processing. The global relation representation is input into the relation decoding layer, and the relation features are restored to the original feature space through back projection to obtain the relation reasoning result.

[0038] S6, associates and integrates the drug test results with the identity verification results, generates a test report, and uploads the test report to the database for encrypted storage.

[0039] Specifically, the test results from the intelligent drug detection machine are received, including the detection of different drug components, concentration levels and other information. At the same time, the identity verification results are obtained, which confirm the identity of the person being tested, including name, ID number and other relevant information. The drug test results are matched with the identity verification results to ensure that each test result can be accurately attributed to the corresponding person being tested. The unique sample number is used as the key index to ensure the accuracy of data integration. The timestamp of each result is checked to confirm that the test and identity verification are carried out in the same time period to avoid any potential errors or data confusion. After successfully matching and confirming the data, a test report is generated. The test report includes the identity information of the person being tested, the test date, the test results and any relevant supplementary instructions. The report also includes all important parameters in the test process, such as sample processing methods, test methods, etc., so as to provide detailed basis when subsequent review or inquiry is required. After the report is generated, the test report is digitally signed to ensure the integrity and tamper-proofness of the report. A unique hash value is generated by hashing the content of the report, and then the value is attached to the report. The generated test report is uploaded to a dedicated database for encrypted storage. During the upload process, strong encryption algorithms such as AES (Advanced Encryption Standard) are used to encrypt the report content to prevent unauthorized access and data leakage. During the storage process, the database has an access control mechanism so that only authorized personnel and systems can access and view the report data.

[0040] In one example, the biometrics of the person being tested are collected and compared for verification, an identity verification result is obtained, and an original urine sample of the person being tested is collected, including:

[0041] The facial image of the examinee is collected from multiple angles to obtain a facial feature sequence, and feature points are extracted from the facial feature sequence to obtain a facial feature vector;

[0042] Scan and collect the fingerprint information of the examinee to obtain a fingerprint grayscale image, and perform texture enhancement on the fingerprint grayscale image to obtain a fingerprint feature vector;

[0043] The facial feature vector and the fingerprint feature vector are feature-fused to obtain a fused biometric feature, and the similarity between the fused biometric feature and the feature template in the preset identity database is calculated to obtain a similarity score;

[0044] The similarity score is compared with a preset threshold to obtain an identity authentication result, a sampling authorization instruction is generated according to the identity authentication result, and the sampling authorization instruction is sent to the urine sample collection device to activate the anti-overflow structure of the urine sample collection device;

[0045] Monitor the sample volume in the urine sample collection device in real time to obtain volume data, and compare the volume data with a preset sampling threshold to obtain a sampling completion signal;

[0046] The sealing mechanism of the urine sample collection device is triggered according to the sampling completion signal to obtain a sealing sampling result, and the sealing sampling result is encoded to obtain a sample number;

[0047] The identity verification result, sample number and sampling time are associated to obtain the sample traceability data, and the sample traceability data and the original urine sample are bound to complete the sample filing.

[0048] In this example, the facial images of the examinee are collected from multiple angles to obtain rich facial feature data. By using a high-definition camera, the examinee's face is photographed at different angles to ensure that enough details can be captured, and a facial feature sequence is obtained. The sequence consists of multiple images from different angles. Feature point extraction is performed on these images to identify key points of facial features such as eyes, nose, mouth, and facial contours. Through feature point extraction, a facial feature vector is generated, which is mathematically expressed as ,in Indicates The extracted facial features, is the total number of feature points. At the same time, the fingerprint information of the person being examined is scanned and collected to obtain a grayscale image of the fingerprint. Texture enhancement technology is applied to the grayscale image of the fingerprint to improve the details in the fingerprint image, eliminate noise, and obtain a clearer fingerprint feature vector, which is expressed as ,in Indicates The extracted fingerprint features, is the total number of fingerprint features. For facial feature vector and fingerprint feature vector Perform feature fusion. The feature fusion process uses the weighted average method, which is defined as ,in and is the fusion weight, and Through feature fusion, the fused biological feature vector is obtained , including the comprehensive identity information of the person being examined. The similarity between the fused biometric features and the feature template in the preset identity database is calculated. The similarity calculation uses methods such as cosine similarity or Euclidean distance. Taking cosine similarity as an example, the calculation formula is:

[0049] ;

[0050] in is the similarity score, is the feature template vector in the database, dot product Represents the relationship between two vectors. and are the norms (lengths) of their respective vectors. The similarity score is used to determine the degree of match between the person being tested and the known identities in the database. The similarity score is compared with the preset threshold to obtain the identity verification result. It can be expressed in simple logic as:

[0051] if then the verification is passed else the verification fails;

[0052] in is the preset similarity threshold. If the verification is successful, a sampling authorization instruction is generated and sent to the urine sample collection device to activate the anti-overflow structure of the device to ensure the safety and smoothness of the sampling process. During the urine sample collection process, the sample volume in the urine sample collection device is monitored in real time. Through the sensor, real-time volume data is obtained. A comparison is performed to determine whether the expected sample volume has been reached. At this point, a sampling completion signal is issued, indicating that the sample has been collected. When the sampling completion signal is received, the sealing mechanism of the urine sample collection device is triggered to ensure the safe sealing of the sample. The sealed sampling result will be coded and a sample number will be generated. This process ensures that each sample can be uniquely identified. The identity verification result, sample number and sampling time are associated to generate sample traceability data. The traceability data is represented as ,in is the authentication result, It is the sampling time. Bind the sample traceability data with the original urine sample to complete the sample file.

[0053] In one example, multiple detection channel samples are subjected to parallel reaction and optical feature extraction, respectively, to obtain an optical feature matrix of each detection channel sample, including:

[0054] Injecting a plurality of detection channel samples into a preloaded immunochromatographic test strip respectively to obtain a plurality of initial reaction samples, and processing the plurality of initial reaction samples to obtain a plurality of steady-state reaction samples;

[0055] Optically scanning a plurality of steady-state reaction samples respectively to obtain dynamic color development data, and dividing the dynamic color development data into regions to obtain a detection region image;

[0056] Performing background removal on the detection area image to obtain a pure color image, and performing color standardization on the pure color image to obtain standardized color data;

[0057] Performing light intensity analysis on the standardized color development data to obtain color development intensity data, and performing uniformity analysis on the color development intensity data to obtain color development uniformity data;

[0058] Perform edge extraction on the color uniformity data to obtain edge clarity data, and perform quality assessment on the edge clarity data to obtain an edge quality score;

[0059] The color intensity data, the color uniformity data and the edge quality score are combined to obtain a comprehensive optical feature, and the comprehensive optical feature is normalized and time-series processed to obtain a time-series feature sequence;

[0060] The time series feature sequence is reconstructed into a matrix and associated with the detection channel number to obtain the optical feature matrix of each detection channel sample.

[0061] In this example, multiple detection channel samples are injected into the pre-loaded immunochromatographic test strips to obtain multiple initial reaction samples. Each sample forms a different color development result through the immune reaction of the test strip. These reaction samples are then processed to ensure the uniformity and stability of the reaction to obtain multiple steady-state reaction samples. The color intensity in the steady-state sample is positively correlated with the concentration of the substance to be tested in the sample. Dynamic color development data is obtained by optical scanning, and these data are captured in real time by an image sensor. The dynamic color development data is divided into regions to obtain a detection area image, and the region of interest (ROI), that is, the most obvious part of the color development, is extracted. The region division process is based on an image processing algorithm, such as a threshold-based method, which can effectively separate the color development area. The detection area image is subjected to background removal processing to ensure the accuracy of subsequent analysis by subtracting background noise. The pure color development image obtained after background removal better reflects the actual concentration of the target substance in the sample. The pure color development image is subjected to color standardization processing to eliminate the influence of factors such as light and sample background under different conditions on the color development result, and obtain standardized color development data. The standardized color development data is subjected to light intensity analysis to obtain color development intensity data. Color intensity is an important indicator of the concentration of the target substance, which is obtained by calculating the average light intensity of all pixels in the color area:

[0062] ;

[0063] in, is the total number of pixels in the color display area, It is The uniformity of the color intensity data is analyzed by calculating the standard deviation of the light intensity. Defined as:

[0064] ;

[0065] in, is the standard deviation of color intensity, is the average color intensity. The lower the color uniformity, the more uniform the color. Edge extraction is performed on the color uniformity data to obtain edge clarity data. Edge clarity is achieved by calculating the gradient change of the image, for example, using the Sobel operator for edge detection, and then performing quality assessment on the edge clarity data to obtain an edge quality score. By setting a threshold, for example:

[0066] ;

[0067] in, is a measure of edge sharpness, is a preset threshold. Combine color intensity data, color uniformity data and edge quality score to obtain comprehensive optical features . Using weighted average:

[0068] ;

[0069] in, is the weight coefficient of each feature and satisfies The comprehensive optical features are normalized and time-series processed to form a time-series feature sequence. The generation of the time-series feature sequence is helpful for the subsequent analysis of the change trend of each sample. The time-series feature sequence is reconstructed into a matrix and associated with the detection channel number to obtain the optical feature matrix of each detection channel sample.

[0070] In one example, feature extraction and fusion are performed on the optical feature matrix of each detection channel sample to obtain multiple fused feature vectors, including:

[0071] The optical characteristic matrix of each detection channel sample is divided into color characteristic data and morphological characteristic data, and the color characteristic data and the morphological characteristic data are normalized to obtain the standardized characteristic data of each detection channel sample;

[0072] The standardized feature data of each detection channel sample is input into the feature coding layer for processing. The feature coding layer contains three convolution units. Each convolution unit consists of a convolution layer, a batch normalization layer, and a ReLU activation function to obtain the primary feature map of each detection channel sample.

[0073] The primary feature map of each detection channel sample is input into the feature enhancement layer. The feature enhancement layer contains two parallel branches. The first branch uses maximum pooling and 1×1 convolution structure, and the second branch uses average pooling and 3×3 convolution structure to obtain multi-scale feature data of each detection channel sample.

[0074] The multi-scale feature data of each detection channel sample is input into the channel attention module for processing. The channel attention module includes a global pooling layer and two fully connected layers, which are used to learn the dependencies between different channels and obtain the channel weighted features of each detection channel sample.

[0075] The channel weighted features of each detection channel sample are input into the spatial attention module respectively. The spatial attention module generates a spatial weight map through convolution operation and sigmoid function, and weights different spatial positions of the feature map to obtain the spatial weighted features of each detection channel sample.

[0076] The spatial weighted features of each detection channel sample are input into the feature aggregation layer for processing. The feature aggregation layer contains three residual units, each of which contains two convolutional layers and a skip connection to obtain the aggregated feature data of each detection channel sample.

[0077] The aggregated feature data of each detection channel sample is input into the feature decoding layer respectively. The feature decoding layer contains two deconvolution units. Each deconvolution unit consists of a deconvolution layer and a LeakyReLU activation function. The features are upsampled and reconstructed to obtain the decoded feature data of each detection channel sample.

[0078] The decoded feature data of each detection channel sample is input into the feature fusion layer for processing. The feature fusion layer uses 1×1 convolution to reorganize the channels and add residual connection to integrate the features to obtain multiple fused feature vectors.

[0079] In this example, the optical feature matrix of each detection channel sample is divided into color feature data and morphological feature data. The color feature data reflects the light intensity and color change of the sample, while the morphological feature data contains the morphological information of the sample in spatial distribution. The color feature data and morphological feature data are normalized respectively to eliminate the influence of different dimensions and ranges to obtain standardized feature data. The standardized feature data of each detection channel sample is input into the feature encoding layer for processing. The feature encoding layer contains three convolution units, each of which consists of a convolution layer, a batch normalization layer, and a ReLU activation function. The convolution layer extracts local features through convolution operations, the batch normalization layer helps to accelerate model training and improve stability, and the ReLU activation function introduces nonlinear features, enabling the model to learn complex function mappings. Through these convolution units, the primary feature map of each detection channel sample is obtained. The convolution process is expressed as:

[0080] ;

[0081] in, is the output feature map, is the convolution kernel, is the input feature map, is the bias term, represents the activation function. The primary feature map of each detection channel sample is input into the feature enhancement layer. The feature enhancement layer contains two parallel branches. The first branch uses maximum pooling and 1 The convolution structure is used to extract the most significant features, while the second branch uses average pooling and 3 Convolution structure is used to obtain more comprehensive context information. Through the feature extraction of these two paths, multi-scale feature data of each detection channel sample is obtained. This process is expressed by the following formula:

[0082] ;

[0083] in, represents the enhanced features, * represents the convolution operation, Represents the concatenation of features. The multi-scale feature data of each detection channel sample is input into the channel attention module for processing. The channel attention module consists of a global pooling layer and two fully connected layers, which aims to learn the dependencies between different channels and generate channel weighted features. This weighting can highlight the features of important channels and suppress unimportant channels. Channel weighting is expressed by the following formula:

[0084] ;

[0085] in, represents element-wise multiplication, and is the weight of the fully connected layer. The channel weighted features of each detection channel sample are input into the spatial attention module. The spatial attention module generates a spatial weight map through convolution operation and sigmoid function, and weights different spatial positions of the feature map to obtain the spatial weighted features of each detection channel sample. The formula for spatial weighting is expressed as:

[0086] ;

[0087] in, Represents the convolution operation on the feature map to generate spatial weights. The spatial weighted features of each detection channel sample are input into the feature aggregation layer for processing. The feature aggregation layer contains three residual units, each of which consists of two convolutional layers and a jump connection. This design helps to alleviate the gradient vanishing problem in deep networks and improve the efficiency of feature transfer. The result of feature aggregation is expressed as:

[0088] ;

[0089] in, is the feature after convolution processing. The aggregated feature data of each detection channel sample is input into the feature decoding layer, which contains two deconvolution units. Each deconvolution unit consists of a deconvolution layer and a LeakyReLU activation function, which is used to upsample and reconstruct the features. The deconvolution process is expressed as:

[0090] ;

[0091] The spatial resolution of the feature is restored through the deconvolution layer. The decoded feature data of each detection channel sample is input into the feature fusion layer for processing. The feature fusion layer uses Convolution reorganizes channels and adds residual connections for feature integration. The final result of feature fusion is expressed as:

[0092] ;

[0093] Multiple fused feature vectors are obtained, which can provide rich representation information in subsequent classification and recognition tasks.

[0094] In one example, multiple fused feature vectors are input into a time-series graph neural network for dynamic analysis to obtain multiple time-series feature data, and feature mapping and result integration are performed on the multiple time-series feature data through a relational reasoning network to obtain drug detection results, including:

[0095] Convert multiple fused feature vectors into graph structure sequences respectively, each node represents the feature of a time point, and establish connections between nodes at adjacent time points to obtain multiple initial graph sequences;

[0096] Inputting multiple initial graph sequences into the temporal coding layer for processing respectively, the temporal coding layer includes a position coding unit and a temporal embedding unit, embedding the temporal information into the node features, and obtaining multiple coded graph sequences;

[0097] Multiple encoded graph sequences are input into the graph convolution layer respectively. The graph convolution layer contains three spatial convolution units. Each unit contains a graph convolution operator and a ReLU activation function. The spatial information of the node features is aggregated to obtain multiple node representation data.

[0098] The node representation data are input into the temporal reasoning layer for processing. The temporal reasoning layer is composed of gated recurrent units, including update gates and reset gates. The temporal dependency of node features is modeled to obtain multiple temporal correlation features.

[0099] Multiple time series related features are input into the multi-head attention layer respectively. The multi-head attention layer contains 8 attention heads. Each attention head independently calculates the three mapping matrices of query, key, and value to obtain multiple time series feature data.

[0100] Multiple time series feature data are processed through the relational encoding layer, which includes three fully connected layers and a LayerNorm layer. The relationship between different time series features is encoded into a relational vector to obtain feature relational data.

[0101] The feature relationship data is input into the relationship reasoning network. The relationship reasoning network contains four reasoning units. Each reasoning unit contains a relationship update layer and a node update layer. The relationship representation is iteratively updated through the message passing mechanism to obtain the relationship reasoning result.

[0102] The relational reasoning results are processed through the classification output layer, which contains two fully connected layers and a softmax function. The features are mapped to the predefined drug category space to obtain the drug detection results.

[0103] In this example, multiple fused feature vectors are converted into a graph structure sequence, where each node represents the feature of a time point. In this way, connections are established between nodes at adjacent time points to form multiple initial graph sequences. The establishment of a graph structure enables time series features to be effectively utilized in the form of a graph, and the connections between nodes reflect the temporal relationship between features. This process is expressed by the following formula:

[0104] ;

[0105] in, Representation diagram, is a collection of nodes, is a set of edges, and the establishment of edges reflects the connection between adjacent time nodes. Multiple initial graph sequences are input into the temporal coding layer for processing. The temporal coding layer contains a position coding unit and a temporal embedding unit. The combination of these two units can effectively embed temporal information into each node feature to reflect the influence of the time dimension. Position coding uses a combination of sine and cosine functions, and the formula is as follows:

[0106] ;

[0107] ;

[0108] Among them, pos represents the position of the node, represents the feature dimension index, is the total number of feature dimensions. In this way, multiple encoded graph sequences are obtained, and the features of each node contain its position information in the time series. The encoded graph sequence is input into the graph convolution layer for processing. The graph convolution layer consists of three spatial convolution units, each of which contains a graph convolution operator and a ReLU activation function. The design of this layer enables node features to aggregate spatial information and strengthen local features in the graph structure. The calculation of graph convolution is expressed as:

[0109] ;

[0110] in, Indicates The node characteristics of the layer, is the degree matrix, is the adjacency matrix, are learnable weights, is the activation function, usually ReLU. Through multiple graph convolution operations, multiple node representation data are obtained. The node representation data is input into the temporal reasoning layer for processing. The temporal reasoning layer is composed of a gated recurrent unit (GRU), which includes an update gate and a reset gate. This structure is used to model the temporal dependency between node features. The calculation of the update gate and the reset gate is expressed by the following formula:

[0111] ;

[0112] ;

[0113] ;

[0114] in, and are the outputs of the update gate and the reset gate, respectively. is the hidden state at the current moment, is the input feature at the current moment. In this way, GRU can effectively capture the temporal changes of features and obtain multiple temporal correlation features. The temporal correlation features are input into the multi-head attention layer. The multi-head attention layer contains 8 attention heads, and each head independently calculates the three mapping matrices of query, key, and value. Through the multi-head mechanism, the model can focus on different features from multiple angles and enhance the expressiveness of features. The calculation of multi-head attention is expressed as:

[0115] ;

[0116] in, , , are the matrix representations of query, key, and value, respectively. is the dimension of the key. After being processed by the multi-head attention mechanism, multiple time series feature data are obtained. The time series feature data is processed by the relation encoding layer. The relation encoding layer contains three fully connected layers and a LayerNorm layer, which are used to encode the relationship between different time series features into a relation vector. The calculation of this process is expressed as:

[0117] ;

[0118] ;

[0119] in, represents the relationship vector, , is the weight matrix of the fully connected layer, , is the bias. Through these processes, feature relation data is obtained. The feature relation data is input into the relational reasoning network. The relational reasoning network contains four reasoning units, each of which consists of a relation update layer and a node update layer. Through the message passing mechanism, the reasoning network can iteratively update the relation representation. The specific calculation process is expressed as:

[0120] ;

[0121] in, It is The relationship between the layers is represented by is the node feature of the current layer. In this way, the relational reasoning result is obtained, which contains rich information updated through multiple iterations. The relational reasoning result is processed by the classification output layer. The classification output layer contains two fully connected layers and a softmax function, which is used to map the features to the predefined drug category space and generate the final drug detection result. Its calculation is expressed as:

[0122] ;

[0123] in, is the class probability distribution, and are the weight and bias of the fully connected layer respectively. Through the above steps, the drug detection results based on feature relationships are finally obtained.

[0124] In one example, feature relationship data is input into a relationship reasoning network. The relationship reasoning network includes four reasoning units. Each reasoning unit includes a relationship update layer and a node update layer. The relationship representation is iteratively updated through a message passing mechanism to obtain a relationship reasoning result, including:

[0125] Initialize the relationship between feature relationship data, express the relationship between adjacent time series features as a relationship matrix, reduce the dimension of the relationship matrix through the fully connected layer, and obtain the initial relationship vector;

[0126] The initial relationship vector is input into the relationship update layer of the first reasoning unit, and the relationship update layer performs feature transformation on the relationship vector through a multi-layer perceptron to obtain a first relationship update result;

[0127] The first relationship update result is processed by the node update layer of the first reasoning unit, and the node update layer aggregates the relationship information into the node feature to obtain the first node update result;

[0128] The first node update result is input into the second reasoning unit, and the message is transmitted according to the relationship strength between the nodes to obtain a relationship message vector, and the relationship message vector is selected through the gating mechanism to obtain a second relationship update result;

[0129] The update result of the second relationship is processed by the third reasoning unit. The third reasoning unit adopts a residual connection structure to fuse the input feature with the update feature to obtain a fused relationship feature;

[0130] The fused relational features are input into the fourth reasoning unit, and different relational features are weighted and aggregated through the attention mechanism to obtain weighted relational features, and the weighted relational features are nonlinearly transformed to obtain target relational features;

[0131] The target relationship features are aggregated through the global pooling layer to obtain the global relationship representation, and the global relationship representation is input into the relationship decoding layer. The relationship features are restored to the original feature space through back projection to obtain the relationship reasoning result.

[0132] In this example, the feature relationship data is initialized and the relationship between adjacent time series features is represented as a relationship matrix. This process is expressed by the following formula:

[0133] ;

[0134] in, represents the relationship matrix, Indicates The time series characteristics and The degree of relationship between the time series features, is the number of time series features, is the number of feature dimensions. Through this representation, the correlation between features is captured. The relationship matrix is ​​reduced in dimension through the fully connected layer to obtain the initial relationship vector. This process is described by the following formula:

[0135] ;

[0136] in, is the initial relationship vector, is the weight matrix of the fully connected layer, is the bias. The purpose of dimensionality reduction is to transform the high-dimensional relationship matrix into a low-dimensional relationship vector, thereby reducing the computational complexity while retaining key information. The initial relationship vector is input into the relationship update layer of the first reasoning unit. The relationship update layer performs feature transformation on the relationship vector through a multi-layer perceptron to obtain the first relationship update result. This process is expressed as:

[0137] ;

[0138] in, is the first relation update result, is the weight matrix of the multilayer perceptron, is the bias, is an activation function, such as ReLU. Through this transformation, the model can learn more expressive relational features. The first relational update result is processed, and the relational information is aggregated into the node features through the node update layer of the first reasoning unit to obtain the first node update result. This process is expressed as:

[0139] ;

[0140] in, is the update result of the first node, is the original node feature, Aggregate Represents a function that integrates the relationship update information into the node features. In this way, the node features are enhanced to better reflect their position in the relationship. When the first node update result is input into the second reasoning unit, the message is passed according to the relationship strength between the nodes to obtain the relationship message vector. After the message vector is selected by the gating mechanism, the second relationship update result is obtained. The message passing process is expressed as:

[0141] ;

[0142] ;

[0143] in, is the relation message vector, Representation and Node The set of connected neighbor nodes, Indicates the strength of the relationship between nodes. Is the update result of the second relationship, Gate It is a gating mechanism used to selectively retain important information. The second relationship update result is processed, and the input feature and the update feature are fused through the third reasoning unit using a residual connection structure to obtain the fused relationship feature. The specific calculation is expressed as:

[0144] ;

[0145] in, It is a fusion relationship feature. The residual connection structure allows information to flow directly, reduces the gradient vanishing problem, and improves the convergence speed of the model. After the fusion relationship feature is input into the fourth reasoning unit, the different relationship features are weighted and aggregated through the attention mechanism to obtain the weighted relationship feature. Finally, the weighted relationship feature is nonlinearly transformed to obtain the target relationship feature. The process is expressed as:

[0146] ;

[0147] ;

[0148] In this formula, is the attention weight, is the weight matrix used to calculate attention, © represents element-by-element multiplication, and is the target relationship feature. Through this weighting mechanism, the model can dynamically focus on the importance of different relationships and enhance the ability of feature representation. The target relationship features are globally pooled to achieve feature aggregation, obtain the global relationship representation, and input the global relationship representation into the relationship decoding layer. The relationship features are restored to the original feature space through back projection to obtain the final relationship reasoning result. This process is expressed as:

[0149] ;

[0150] ;

[0151] in, is the global relation representation, is the result of relational reasoning, and are the weights and biases of the relation decoding layer. Through this series of operations, the system can effectively extract and utilize feature relations to obtain relational reasoning results.

[0152] Reference Figure 2 This embodiment provides a urine sample automatic detection device based on an intelligent drug detection machine, comprising:

[0153] Verification module 1, used to collect and compare the biometrics of the subject, obtain identity verification results, and collect the original urine sample of the subject;

[0154] The distribution module 2 is used for performing multi-channel quantitative distribution on the original urine sample to obtain samples of multiple detection channels;

[0155] Extraction module 3, used for performing parallel reaction and optical feature extraction on multiple detection channel samples respectively, to obtain an optical feature matrix of each detection channel sample;

[0156] Fusion module 4, used for extracting and fusing the optical feature matrix of each detection channel sample to obtain multiple fused feature vectors;

[0157] Integration module 5, used for inputting multiple fused feature vectors into a time series graph neural network for dynamic analysis to obtain multiple time series feature data, and performing feature mapping and result integration on the multiple time series feature data through a relational reasoning network to obtain drug detection results;

[0158] The generation module 6 is used to associate and integrate the drug detection results with the identity verification results, generate a detection report, and upload the detection report to the database for encrypted storage.

[0159] In this embodiment, for the specific implementation of each unit in the above device embodiment, please refer to the above method embodiment, which will not be repeated here.

[0160] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0161] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0162] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0163] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.

[0164] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0165] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for automatic urine sample detection based on an intelligent drug detection machine, characterized in that: The following steps are involved: Collect and compare the biometrics of the person being tested, obtain identity verification results, and collect the original urine sample of the person being tested; Performing multi-channel quantitative distribution on the original urine sample to obtain samples of multiple detection channels; Respectively performing parallel reaction and optical feature extraction on the multiple detection channel samples to obtain an optical feature matrix of each detection channel sample; Feature extraction and fusion are performed on the optical feature matrix of each detection channel sample to obtain multiple fused feature vectors; Input the multiple fused feature vectors into a time-series graph neural network for dynamic analysis to obtain multiple time-series feature data, and perform feature mapping and result integration on the multiple time-series feature data through a relational reasoning network to obtain a drug detection result; The drug detection result is associated and integrated with the identity verification result to generate a detection report, and the detection report is uploaded to a database for encrypted storage.

2. The method for automatic urine sample detection based on an intelligent drug detection machine according to claim 1, characterized in that: The biometrics of the subject are collected and compared for verification, identity verification results are obtained, and the original urine sample of the subject is collected, including: The facial image of the subject is collected at multiple angles to obtain a facial feature sequence, and feature points are extracted from the facial feature sequence to obtain a facial feature vector; Scanning and collecting the fingerprint information of the examinee to obtain a fingerprint grayscale image, and performing texture enhancement on the fingerprint grayscale image to obtain a fingerprint feature vector; Performing feature fusion on the facial feature vector and the fingerprint feature vector to obtain a fused biometric feature, and performing similarity calculation on the fused biometric feature and a feature template in a preset identity database to obtain a similarity score; Comparing the similarity score with a preset threshold value to obtain an identity authentication result, generating a sampling authorization instruction according to the identity authentication result, and sending the sampling authorization instruction to the urine sample collection device to activate the anti-overflow structure of the urine sample collection device; Performing real-time monitoring on the sample volume in the urine sample collection device to obtain volume data, and comparing the volume data with a preset sampling threshold to obtain a sampling completion signal; triggering the sealing mechanism of the urine sample collection device according to the sampling completion signal to obtain a sealing sampling result, and encoding the sealing sampling result to obtain a sample number; The identity verification result, the sample number and the sampling time are associated to obtain sample traceability data, and the sample traceability data and the original urine sample are bound to complete the sample archiving.

3. The automatic urine sample detection method based on the intelligent drug detection machine according to claim 1 is characterized in that: The step of performing parallel reaction and optical feature extraction on the plurality of detection channel samples respectively to obtain an optical feature matrix of each detection channel sample comprises: Respectively injecting the plurality of detection channel samples into pre-loaded immunochromatographic test strips to obtain a plurality of initial reaction samples, and processing the plurality of initial reaction samples to obtain a plurality of steady-state reaction samples; Optically scanning the plurality of steady-state reaction samples respectively to obtain dynamic color development data, and dividing the dynamic color development data into regions to obtain a detection region image; Performing background removal on the detection area image to obtain a pure color image, and performing color standardization processing on the pure color image to obtain standardized color data; Performing light intensity analysis on the standardized color development data to obtain color development intensity data, and performing uniformity analysis on the color development intensity data to obtain color development uniformity data; Performing edge extraction on the color uniformity data to obtain edge clarity data, and performing quality assessment on the edge clarity data to obtain an edge quality score; The color intensity data, the color uniformity data and the edge quality score are combined to obtain a comprehensive optical feature, and the comprehensive optical feature is normalized and time-series processed to obtain a time-series feature sequence; The time series feature sequence is reconstructed into a matrix and associated with the detection channel number to obtain an optical feature matrix of each detection channel sample.

4. The method for automatic urine sample detection based on an intelligent drug detection machine according to claim 1, characterized in that: The optical feature matrix of each detection channel sample is extracted and fused to obtain multiple fused feature vectors, including: The optical characteristic matrix of each detection channel sample is divided into color characteristic data and morphological characteristic data, and the color characteristic data and the morphological characteristic data are normalized to obtain standardized characteristic data of each detection channel sample; The standardized feature data of each detection channel sample is respectively input into the feature coding layer for processing, wherein the feature coding layer comprises three convolution units, each of which is composed of a convolution layer, a batch normalization layer and a ReLU activation function, so as to obtain a primary feature map of each detection channel sample; The primary feature map of each detection channel sample is respectively input into the feature enhancement layer, and the feature enhancement layer comprises two parallel branches, the first branch adopts maximum pooling and 1×1 convolution structure, and the second branch adopts average pooling and 3×3 convolution structure, so as to obtain multi-scale feature data of each detection channel sample; The multi-scale feature data of each detection channel sample is respectively input into the channel attention module for processing. The channel attention module includes a global pooling layer and two fully connected layers, which are used to learn the dependency relationship between different channels and obtain the channel weighted features of each detection channel sample; The channel weighted features of each detection channel sample are respectively input into the spatial attention module, and the spatial attention module generates a spatial weight map through convolution operation and sigmoid function, and weights different spatial positions of the feature map to obtain the spatial weighted features of each detection channel sample; The spatial weighted features of each detection channel sample are respectively input into the feature aggregation layer for processing, wherein the feature aggregation layer comprises three residual units, each residual unit comprises two convolutional layers and a skip connection, and the aggregated feature data of each detection channel sample is obtained; The aggregated feature data of each detection channel sample is respectively input into the feature decoding layer, wherein the feature decoding layer comprises two deconvolution units, each of which is composed of a deconvolution layer and a LeakyReLU activation function, and the features are upsampled and reconstructed to obtain the decoded feature data of each detection channel sample; The decoded feature data of each detection channel sample is respectively input into the feature fusion layer for processing. The feature fusion layer uses 1×1 convolution to reorganize the channels and add residual connection to integrate the features to obtain multiple fused feature vectors.

5. The automatic urine sample detection method based on the intelligent drug detection machine according to claim 1 is characterized in that: The multiple fused feature vectors are input into the time series graph neural network for dynamic analysis to obtain multiple time series feature data, and the multiple time series feature data are feature mapped and integrated through the relational reasoning network to obtain drug detection results, including: The multiple fused feature vectors are respectively converted into graph structure sequences, each node represents a feature of a time point, and connections are established between nodes at adjacent time points to obtain multiple initial graph sequences; The multiple initial graph sequences are respectively input into a temporal coding layer for processing, wherein the temporal coding layer comprises a position coding unit and a temporal embedding unit, and the temporal information is embedded into the node features to obtain multiple coded graph sequences; The multiple encoded graph sequences are respectively input into a graph convolution layer, wherein the graph convolution layer comprises three spatial convolution units, each unit comprises a graph convolution operator and a ReLU activation function, and spatial information aggregation is performed on node features to obtain multiple node representation data; The node representation data are respectively input into the time series reasoning layer for processing, wherein the time series reasoning layer is composed of a gated recurrent unit, including an update gate and a reset gate, and the time series dependency modeling is performed on the node features to obtain multiple time series correlation features; The multiple time series correlation features are respectively input into a multi-head attention layer, where the multi-head attention layer includes 8 attention heads, and each attention head independently calculates three mapping matrices of query, key, and value to obtain multiple time series feature data; The plurality of time series feature data are processed through a relation coding layer, wherein the relation coding layer includes three fully connected layers and a LayerNorm layer, and the relationship between different time series features is encoded into a relation vector to obtain feature relation data; Inputting the feature relationship data into a relationship reasoning network, wherein the relationship reasoning network comprises four reasoning units, each of which comprises a relationship update layer and a node update layer, and iteratively updating the relationship representation through a message passing mechanism to obtain a relationship reasoning result; The relationship reasoning result is processed through a classification output layer, which includes two fully connected layers and a softmax function, and the features are mapped to a predefined drug category space to obtain drug detection results.

6. The method for automatic urine sample detection based on an intelligent drug detection machine according to claim 5, characterized in that: The feature relationship data is input into a relationship reasoning network, wherein the relationship reasoning network comprises four reasoning units, each of which comprises a relationship update layer and a node update layer, and the relationship representation is iteratively updated through a message passing mechanism to obtain a relationship reasoning result, including: Initializing the relationship of the feature relationship data, expressing the relationship between adjacent time series features as a relationship matrix, reducing the dimension of the relationship matrix through a fully connected layer, and obtaining an initial relationship vector; Inputting the initial relationship vector into the relationship update layer of the first reasoning unit, wherein the relationship update layer performs feature transformation on the relationship vector through a multi-layer perceptron to obtain a first relationship update result; The first relationship update result is processed by a node update layer of a first reasoning unit, wherein the node update layer aggregates the relationship information into node features to obtain a first node update result; Inputting the first node update result into the second reasoning unit, performing message transmission according to the relationship strength between the nodes to obtain a relationship message vector, performing information selection on the relationship message vector through a gating mechanism to obtain a second relationship update result; The second relationship update result is processed by a third reasoning unit, wherein the third reasoning unit adopts a residual connection structure to fuse the input feature with the update feature to obtain a fused relationship feature; Inputting the fused relationship features into the fourth reasoning unit, performing weighted aggregation on different relationship features through an attention mechanism to obtain weighted relationship features, performing nonlinear transformation on the weighted relationship features to obtain target relationship features; The target relationship features are aggregated through a global pooling layer to obtain a global relationship representation, and the global relationship representation is input into a relationship decoding layer, and the relationship features are restored to the original feature space through back projection to obtain a relationship reasoning result.

7. A urine sample automatic detection device based on an intelligent drug detection machine, characterized in that: For implementing the steps of the method according to any one of claims 1 to 6, the urine sample automatic detection device based on the intelligent drug detection machine comprises: The verification module is used to collect and compare the biometrics of the person being tested, obtain the identity verification result, and collect the original urine sample of the person being tested; A distribution module, used for performing multi-channel quantitative distribution on the original urine sample to obtain samples of multiple detection channels; An extraction module, used to perform parallel reaction and optical feature extraction on the multiple detection channel samples respectively, to obtain an optical feature matrix of each detection channel sample; A fusion module is used to extract and fuse the optical feature matrix of each detection channel sample to obtain multiple fused feature vectors; An integration module, used for inputting the multiple fused feature vectors into a time series graph neural network for dynamic analysis to obtain multiple time series feature data, and performing feature mapping and result integration on the multiple time series feature data through a relational reasoning network to obtain a drug detection result; A generation module is used to associate and integrate the drug detection result with the identity authentication result, generate a detection report, and upload the detection report to a database for encrypted storage.

8. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Non-skin direct contact type dynamic continuous blood pressure monitoring system

    CN114767081A

  • Lightweight gas classification method based on electronic nose equipment

    CN116992358A