Intelligent auxiliary diagnosis detection method and system based on comparative learning
By combining attention-gated recurrent networks, peacock optimization algorithm, and contrastive learning technique, the problems of feature extraction and parameter optimization of multimodal medical data are solved, achieving efficient and accurate medical auxiliary diagnosis and improving the system's diagnostic capabilities and robustness in complex cases.
Patent Information
- Application Number
- CN202511770028.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing medical auxiliary diagnostic systems have shortcomings in multimodal medical data processing, temporal feature extraction, and parameter optimization, making it difficult to achieve efficient and accurate diagnosis, especially in complex cases and marginal samples.
By combining attention-gated recurrent networks, the peacock optimization algorithm, and contrastive learning techniques, sample pairs are constructed and features are extracted through unified preprocessing of multimodal medical data. The peacock optimization algorithm is then used for adaptive parameter adjustment, enabling end-to-end joint training and optimization.
It significantly improves the model's diagnostic accuracy, robustness, and generalization ability, enabling it to quickly adapt to new medical data, provide efficient and interpretable diagnostic support, and improve the diagnostic accuracy and consistency of complex cases.
Smart Images

Figure CN121601209A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent medical diagnostic technology, and in particular to an intelligent assisted diagnostic detection method and system based on contrastive learning. Background Technology
[0002] With the continuous advancement of medical informatization, the types and scale of medical data have experienced explosive growth. Currently, hospitals and medical institutions have accumulated a vast amount of multimodal medical data, including medical images, pathological slides, electronic medical records, genomic data, physiological parameters, laboratory reports, and basic patient information. This rich medical data not only provides a solid foundation for disease diagnosis and treatment but also creates vast opportunities for the application of artificial intelligence in the medical field. In recent years, artificial intelligence technology, especially deep learning, has demonstrated enormous potential in the field of medical-assisted diagnosis. Significant progress has been made in areas such as medical image analysis based on deep neural networks, electronic medical record analysis based on natural language processing, and disease risk prediction based on multimodal data fusion.
[0003] Traditional medical auxiliary diagnostic systems mostly rely on rule engines, conventional machine learning, or shallow neural networks. These methods have limited expressive power over data, making it difficult to fully exploit the complex temporal relationships and high-dimensional feature structures within medical data. Taking medical image diagnosis as an example, although convolutional neural networks have achieved significant results in image classification and segmentation, single static image analysis often lacks the ability to fuse patient historical data, temporal changes, and multi-source information. Furthermore, for structured or semi-structured text data such as electronic medical records and laboratory reports, conventional feature engineering and shallow classifiers are easily affected by noise, data inconsistencies, and insufficient semantic understanding. In addition, facing practical challenges such as imbalanced samples, difficulties in data annotation, and high-dimensional low-sample conditions in medical data, existing methods exhibit significant deficiencies in generalization ability and robustness.
[0004] Traditional medical auxiliary diagnostic systems mostly rely on rule engines, conventional machine learning, or shallow neural networks. These methods have limited expressive power over data, making it difficult to fully exploit the complex temporal relationships and high-dimensional feature structures within medical data. Taking medical image diagnosis as an example, although convolutional neural networks have achieved significant results in image classification and segmentation, single static image analysis often lacks the ability to fuse patient historical data, temporal changes, and multi-source information. Furthermore, for structured or semi-structured text data such as electronic medical records and laboratory reports, conventional feature engineering and shallow classifiers are easily affected by noise, data inconsistencies, and insufficient semantic understanding. In addition, facing practical challenges such as imbalanced samples, difficulties in data annotation, and high-dimensional low-sample conditions in medical data, existing methods exhibit significant deficiencies in generalization ability and robustness.
[0005] In recent years, recurrent neural networks (RNNs) and their variants, such as long short-term memory (LSTM) networks and gated recurrent units (GRUs), have been widely introduced into medical time-series data modeling, enabling them to capture temporal dependencies to some extent. However, traditional RNNs still face problems such as vanishing gradients, information loss, and limited ability to model long-distance dependencies. To address these issues, attention mechanisms have been gradually introduced into neural network structures. By assigning different weights to different time segments or key features, the model's ability to focus on important medical information has been improved. Nevertheless, the parameter optimization of existing attention-gated recurrent networks in medical auxiliary diagnosis still mainly relies on conventional optimization algorithms such as gradient descent, which are prone to getting trapped in local optima and have limited adaptability to complex multimodal data.
[0006] Contrastive learning, as an unsupervised or semi-supervised feature learning method that has emerged in recent years, effectively improves the model's ability to discriminate key features by maximizing the feature similarity of positive sample pairs and minimizing the feature distance of negative sample pairs. Contrastive learning has proven to have significant application value in medical scenarios characterized by small sample sizes, high data diversity, and scarce annotations. However, in medical assisted diagnosis, how to construct high-quality sample pairs, how to efficiently integrate with existing neural network structures, and how to achieve end-to-end joint optimization remain key issues that current technologies urgently need to address.
[0007] Furthermore, intelligent optimization algorithms such as genetic algorithms, particle swarm optimization, and ant colony optimization have been applied to some extent in neural network parameter optimization. These algorithms, by simulating biological evolution or swarm intelligence, can escape the local optimum dilemma of conventional gradient optimization. However, traditional intelligent optimization algorithms often fail to consider the special distribution and characteristics of medical data, resulting in limited adaptability and optimization efficiency for multimodal and time-series medical data. The Peacock Optimization algorithm, a novel intelligent optimization method proposed in recent years, possesses stronger global search and collaborative optimization capabilities by simulating the foraging and exploration behavior of peacocks. However, in the field of medical auxiliary diagnosis, existing Peacock Optimization algorithms have not yet been specifically optimized for the diversity of medical data, the high-dimensional complexity of the feature space, and the comparative learning feedback mechanism, making it difficult to fully realize their theoretical potential.
[0008] In summary, existing medical auxiliary diagnostic methods still have many shortcomings in data preprocessing, feature representation, temporal modeling, and parameter optimization. First, the lack of a unified and efficient mechanism for constructing and preprocessing multimodal medical data sample pairs leads to low data utilization and inconsistent sample quality. Second, traditional neural network structures struggle to simultaneously handle temporal state input, feature representation, and key feature extraction capabilities, resulting in lower diagnostic accuracy and interpretability in complex medical scenarios. Third, existing contrastive learning methods fail to organically synergize with temporal neural networks and intelligent optimization algorithms, leading to a disconnect between feature distance feedback and parameter optimization, hindering end-to-end closed-loop optimization. Finally, the application of intelligent optimization algorithms in the medical field largely focuses on parameter fine-tuning, lacking adaptive mechanisms for the multimodal, temporal, and high-noise characteristics of medical data, resulting in limited optimization efficiency and model generalization ability.
[0009] Therefore, how to provide an intelligent assisted diagnostic detection method and system based on contrastive learning is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0010] One objective of this invention is to propose an intelligent assisted diagnostic detection method and system based on contrastive learning. This invention combines attention-gated recurrent networks, the Peacock Optimization algorithm, and contrastive learning techniques. Through unified preprocessing and sample pair construction of multimodal medical data, the attention-gated recurrent network enables in-depth mining of medical temporal features and dynamic extraction of key diagnostic information. A contrastive learning mechanism is introduced to enhance the model's ability to discriminate features from different cases. The system innovatively employs the Peacock Optimization algorithm for adaptive global optimization of network parameters and model structure, integrating contrastive feature distance feedback during parameter optimization to ensure that parameter updates better align with real-world medical diagnostic needs. The synergistic effect of these multiple technologies not only significantly improves the model's diagnostic accuracy, robustness, and generalization ability but also provides efficient and scalable technical support for intelligent assisted diagnostic detection in complex medical scenarios, possessing continuous optimization and intelligent adaptability.
[0011] An intelligent assisted diagnostic detection method based on contrastive learning according to an embodiment of the present invention includes the following steps: S1. Collect medical data and preprocess it to generate medical data sample pairs; S2. Construct an attention-gated recurrent network to model medical data sample pairs as neural network units with temporal state input and feature expression capabilities. Each gated recurrent unit receives the input state at the current time and the hidden state at the previous time, extracts key features related to assisted diagnosis, and generates feature representations of sample pairs. S3. Perform comparative learning on the feature representations of sample pairs, calculate the feature distance between positive and negative sample pairs, and output the parameters of the initially trained attention-gated recurrent network. S4. Using the peacock optimization algorithm, each peacock individual is configured with an exploration and foraging behavior simulation sub-unit. Based on the foraging paths and exploration behaviors of all peacock individuals, an optimized attention-gated recurrent network is generated. S5. Jointly train the optimized attention-gated recurrent network with the contrastive learning unit, and continuously update and optimize the attention-gated recurrent network using newly added medical data samples to obtain the final attention-gated recurrent network. S6. Input the medical data to be detected, and output the diagnostic category probability and key feature localization results through the final attention-gated recurrent network.
[0012] Optionally, the medical data may specifically include medical images, pathological slides, electronic medical records, genomic data, physiological parameters, test reports, and basic patient information.
[0013] Optionally, the attention-gated recurrent network parameters specifically include the network weight matrix, bias terms, gating unit parameters, attention weights, hidden layer state parameters, and inter-layer connection parameters.
[0014] Optionally, S2 specifically includes: S21. Perform time-series segmentation on the medical data sample pairs, dividing each pair of medical data samples into multiple continuous time segments to obtain segmented time-series medical data segments. S22. Perform feature standardization processing on the segmented time-series medical data fragments, including normalization and denoising operations, to obtain standardized time-series medical data fragments. S23. Input standardized time-series medical data segments into gated recurrent neural network units. Each gated recurrent neural network unit sequentially receives the input state of the current time segment and the hidden state of the previous time segment, and outputs the hidden feature state sequence of the current time segment. S24. An attention mechanism is introduced to assign weights to the hidden feature state sequences of each time segment, and the hidden feature states of all time segments are weighted and fused to obtain a weighted fused temporal feature representation. S25. Input the weighted and fused temporal feature representation into the feature extraction unit to further extract key features related to assisted diagnosis; S26. Output the feature representation of the sample pairs.
[0015] Optionally, S3 specifically includes: S31. Receive key feature representations of medical data sample pairs and construct a set of feature representations for sample pairs; S32. Construct a contrastive learning task, group the sample pair feature representation set according to positive sample pairs and negative sample pairs, and generate positive sample pair feature groups and negative sample pair feature groups. S33. Perform feature encoding on the feature groups of positive sample pairs and negative sample pairs respectively to obtain the feature encoding results of positive sample pairs and negative sample pairs; S34. Based on the feature encoding results, a contrastive learning method is used to calculate the feature distance between positive sample pairs and the feature distance between negative sample pairs, forming a set of contrastive feature distances: ; in, The total feature distance between all positive and negative sample pairs. The number of positive sample pairs. The number of negative sample pairs. The feature encoding for the i-th positive sample pair. Let i be the feature encoding of the j-th negative sample pair, where i is the number of the positive sample pair and j is the number of the negative sample pair. S35. Using the set of contrastive feature distances, the feature distance between positive sample pairs and negative sample pairs is used as the optimization target to optimize and adjust the parameters of the attention-gated recurrent network, and the optimized network parameters are output. S36. Use the optimized network parameters as the parameters for the initial training of the attention-gated recurrent network.
[0016] Optionally, S4 specifically includes: S41. Using the peacock optimization algorithm, initialize the peacock individual group, assign initial foraging paths and exploration behavior parameters to each peacock individual, and form a peacock individual parameter set; S42. Based on the individual parameter set of the peacock, configure the exploration behavior simulation sub-unit for each individual peacock to obtain the peacock exploration behavior set; S43. Combine the set of peacock exploration behaviors with the set of individual peacock parameters to simulate the foraging behavior of all individual peacocks and generate a set of peacock foraging paths. S44. Based on the set of peacock foraging paths, calculate the performance of each individual peacock during the foraging process to form a set of individual peacock performances; S45. The Peacock Optimization Algorithm, based on the Peacock Algorithm, optimizes the parameter adaptive adjustment mechanism. It updates the individual peacock parameter set and the peacock exploration behavior set based on the individual peacock performance set, resulting in the updated individual peacock parameter set and exploration behavior set. ; in, Let be the parameters of the k-th peacock individual in the t-th iteration. For learning rate, The total number of individual peacocks. The total feature distance between all positive and negative sample pairs. The regularization coefficient is . The number of peacock individuals participating in the collaborative update is given by , k is the number of the kth peacock individual, t is the number of iterations, p is the index of the summation of all peacock individuals, and q is the number of the peacock individual used in the regularization term to collaboratively update with individual k. S46. Using the updated set of individual peacock parameters and the set of peacock exploration behaviors, optimize the parameters of the attention-gated recurrent network to generate an optimized attention-gated recurrent network.
[0017] Optionally, S5 specifically includes: S51. Obtain the optimized attention-gated recurrent network and prepare the contrastive learning unit. Combine the two for the initialization of joint training. S52. Input the new medical data sample and feed it into the optimized attention-gated recurrent network and contrastive learning unit respectively to obtain the initial joint feature expression set. S53. Based on the initial joint feature expression set, calculate the set of comparative feature distances for newly added medical data samples, and generate the feature distance output for the current round; S54. Using the feature distance output, jointly update the parameter set of the attention-gated recurrent network and the parameter set of the contrastive learning unit to obtain the jointly updated parameter set: ; in, Let be the value of the 'a'-th joint training parameter in the 'u'-th iteration. Let be the value of the 'a'-th joint training parameter in the (u+1)th iteration. The learning rate coefficient for joint training. The total number of medical data samples participating in the joint training. The ID of the s-th medical data sample, In the u-th iteration, the gradient value of the a-th joint training parameter with respect to the feature distance is... , Regularization coefficients of the joint training parameter set, The total number of parameters in the joint training parameter set, Parameter numbers in the joint training parameter set, No. The value of the r-th parameter during round iteration. The total number of parameters in the peacock individual parameter set, r The index of the r-th parameter in the set of individual peacock parameters; S55. Using newly added medical data samples, continuously iterate and optimize the jointly updated parameter set to generate a continuously optimized parameter set. S56. Extract the optimized attention-gated recurrent network parameters from the continuously optimized parameter set, and output the final attention-gated recurrent network.
[0018] Optionally, S6 specifically includes: S61. Input the medical data sample to be tested into the final attention-gated recurrent network to obtain preliminary feature extraction results; S62. Based on the preliminary feature extraction results, perform feature fusion processing to obtain fused feature representation data; S63. Utilize the fused feature representation data, and output the preliminary diagnostic category probability through the classification unit of the final attention-gated recurrent network; S64. Based on the fused feature representation data, key feature localization information is obtained through the localization unit of the final attention-gated recurrent network; S65. Integrate the preliminary diagnostic category probability with the key feature localization information, and output the final diagnostic category probability and key feature localization results.
[0019] According to an embodiment of the present invention, an intelligent assisted diagnostic detection method system based on contrastive learning includes the following modules: The medical data acquisition and preprocessing module is used to acquire medical data and preprocess it to generate medical data sample pairs. The neural network unit module models medical data sample pairs as neural network units with temporal state input and feature expression capabilities; The contrastive learning training module performs contrastive learning on the feature representations of sample pairs. The peacock optimization algorithm module generates an optimized attention-gated recurrent network based on the foraging paths and exploration behaviors of all individual peacocks. The joint training module will jointly train the optimized attention-gated recurrent network and the contrastive learning unit. The auxiliary diagnostic reasoning module outputs diagnostic category probabilities and key feature localization results through a final attention-gated recurrent network.
[0020] The beneficial effects of this invention are: This invention addresses the practical needs of intelligent analysis and assisted diagnosis of medical data by proposing a comprehensive solution integrating medical data acquisition and preprocessing, neural network temporal modeling, contrastive learning training, the Peacock Optimization algorithm, joint training, and diagnostic inference. By introducing a contrastive learning mechanism, the model's ability to identify the homogeneity and heterogeneity of medical samples is effectively improved, enhancing feature representation while increasing diagnostic accuracy. The adaptive parameter adjustment and individual co-evolution mechanism of the Peacock Optimization algorithm further optimize the parameter convergence speed and global optimization capability of the attention-gated recurrent network, effectively enhancing the model's generalization and stability in complex medical data scenarios. The joint training approach allows the optimized network to continuously adapt to new medical samples, significantly improving its responsiveness to changes in medical data. Finally, by outputting diagnostic category probabilities and key feature localization information through the attention-gated recurrent network, the collaborative output of diagnostic results and interpretable features is achieved, providing more comprehensive, accurate, and efficient technical support for clinical decision support and greatly enhancing the practical value of intelligent medical diagnostic systems. Attached Figure Description
[0021] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0022] Figure 1 This is a flowchart of an intelligent assisted diagnostic detection method based on contrastive learning proposed in this invention; Figure 2 This is a schematic diagram of an intelligent assisted diagnostic detection method based on contrastive learning proposed in this invention; Figure 3 This is a data flow diagram of an intelligent assisted diagnostic detection system based on contrastive learning proposed in this invention. Detailed Implementation
[0023] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0024] refer to Figure 1-2 A method for intelligent assisted diagnosis and detection based on contrastive learning includes the following steps: S1. Collect medical data and preprocess it to generate medical data sample pairs; S2. Construct an attention-gated recurrent network to model medical data sample pairs as neural network units with temporal state input and feature expression capabilities. Each gated recurrent unit receives the input state at the current time and the hidden state at the previous time, extracts key features related to assisted diagnosis, and generates feature representations of sample pairs. S3. Perform comparative learning on the feature representations of sample pairs, calculate the feature distance between positive and negative sample pairs, and output the parameters of the initially trained attention-gated recurrent network. S4. Using the peacock optimization algorithm, each peacock individual is configured with an exploration and foraging behavior simulation sub-unit. Based on the foraging paths and exploration behaviors of all peacock individuals, an optimized attention-gated recurrent network is generated. S5. Jointly train the optimized attention-gated recurrent network with the contrastive learning unit, and continuously update and optimize the attention-gated recurrent network using newly added medical data samples to obtain the final attention-gated recurrent network. S6. Input the medical data to be detected, and output the diagnostic category probability and key feature localization results through the final attention-gated recurrent network.
[0025] This invention effectively improves the identification capability of key features in medical data by constructing a joint training framework of attention-gated recurrent network and contrastive learning, and introducing the Peacock Optimization algorithm to dynamically optimize the feature extraction unit, thereby achieving high accuracy and robustness in assisted diagnosis. This method can continuously and adaptively update without frequent manual intervention, significantly enhancing the level of intelligent diagnosis of complex cases.
[0026] In this embodiment, the medical data specifically includes medical images, pathological slides, electronic medical records, genomic data, physiological parameters, test reports, and basic patient information.
[0027] This invention integrates medical images, pathological slides, electronic medical records, genomic data, physiological parameters, laboratory reports, and basic patient information to construct a multidimensional feature representation space, enabling comprehensive perception and analysis of a patient's health status. Through multimodal information fusion, it significantly improves the accuracy and adaptability of diagnosis and substantially enhances the ability to identify complex diseases.
[0028] In this embodiment, the attention-gated recurrent network parameters specifically include the network weight matrix, bias terms, gating unit parameters, attention weights, hidden layer state parameters, and inter-layer connection parameters.
[0029] This invention performs fine-tuning on the network weight matrix, bias terms, gating unit parameters, attention weights, hidden layer state parameters, and inter-layer connection parameters of attention-gated recurrent networks. Through multi-parameter collaborative adjustment, it enhances the model's ability to perceive the temporal characteristics and key information of medical data, effectively improving the accuracy and generalization ability of assisted diagnosis.
[0030] In this embodiment, S2 specifically includes: S21. Perform time-series segmentation on the medical data sample pairs, dividing each pair of medical data samples into multiple continuous time segments to obtain segmented time-series medical data segments. S22. Perform feature standardization processing on the segmented time-series medical data fragments, including normalization and denoising operations, to obtain standardized time-series medical data fragments. S23. Input standardized time-series medical data segments into gated recurrent neural network units. Each gated recurrent neural network unit sequentially receives the input state of the current time segment and the hidden state of the previous time segment, and outputs the hidden feature state sequence of the current time segment. S24. An attention mechanism is introduced to assign weights to the hidden feature state sequences of each time segment, and the hidden feature states of all time segments are weighted and fused to obtain a weighted fused temporal feature representation. S25. Input the weighted and fused temporal feature representation into the feature extraction unit to further extract key features related to assisted diagnosis; S26. Output the feature representation of the sample pairs.
[0031] This invention improves the quality and consistency of medical data fragments through temporal segmentation, standardization, and denoising. By combining a gated recurrent neural network with an attention mechanism, it achieves dynamic weighted fusion of key temporal features, enhancing the accuracy and comprehensiveness of feature extraction. This method effectively improves the identification capability of diagnostically relevant features in complex medical data.
[0032] In this embodiment, S3 specifically includes: S31. Receive key feature representations of medical data sample pairs and construct a set of feature representations for sample pairs; S32. Construct a contrastive learning task, group the sample pair feature representation set according to positive sample pairs and negative sample pairs, and generate positive sample pair feature groups and negative sample pair feature groups. S33. Perform feature encoding on the feature groups of positive sample pairs and negative sample pairs respectively to obtain the feature encoding results of positive sample pairs and negative sample pairs; S34. Based on the feature encoding results, a contrastive learning method is used to calculate the feature distance between positive sample pairs and the feature distance between negative sample pairs, forming a set of contrastive feature distances: ; in, The total feature distance between all positive and negative sample pairs. The number of positive sample pairs. The number of negative sample pairs. The feature encoding for the i-th positive sample pair. Let i be the feature encoding of the j-th negative sample pair, where i is the number of the positive sample pair and j is the number of the negative sample pair. S35. Using the set of contrastive feature distances, the feature distance between positive sample pairs and negative sample pairs is used as the optimization target to optimize and adjust the parameters of the attention-gated recurrent network, and the optimized network parameters are output. S36. Use the optimized network parameters as the parameters for the initial training of the attention-gated recurrent network.
[0033] This invention uses a contrastive learning task to divide medical data sample pairs into positive and negative groups, and utilizes feature encoding and feature distance measurement to achieve accurate differentiation of key information. By optimizing the parameters of the attention-gated recurrent network through the comparison of feature distance sets, the model's ability to identify homogeneity and heterogeneity in medical data is effectively enhanced, thereby improving the accuracy and generalization ability of the assisted diagnostic system.
[0034] In this embodiment, S4 specifically includes: S41. Using the peacock optimization algorithm, initialize the peacock individual group, assign initial foraging paths and exploration behavior parameters to each peacock individual, and form a peacock individual parameter set; S42. Based on the individual parameter set of the peacock, configure the exploration behavior simulation sub-unit for each individual peacock to obtain the peacock exploration behavior set; S43. Combine the set of peacock exploration behaviors with the set of individual peacock parameters to simulate the foraging behavior of all individual peacocks and generate a set of peacock foraging paths. S44. Based on the set of peacock foraging paths, calculate the performance of each individual peacock during the foraging process to form a set of individual peacock performances; S45. The Peacock Optimization Algorithm, based on the Peacock Algorithm, optimizes the parameter adaptive adjustment mechanism. It updates the individual peacock parameter set and the peacock exploration behavior set based on the individual peacock performance set, resulting in the updated individual peacock parameter set and exploration behavior set. ; in, Let be the parameters of the k-th peacock individual in the t-th iteration. For learning rate, The total number of individual peacocks. The total feature distance between all positive and negative sample pairs. The regularization coefficient is . The number of peacock individuals participating in the collaborative update is given by , k is the number of the kth peacock individual, t is the number of iterations, p is the index of the summation of all peacock individuals, and q is the number of the peacock individual used in the regularization term to collaboratively update with individual k. S46. Using the updated set of individual peacock parameters and the set of peacock exploration behaviors, optimize the parameters of the attention-gated recurrent network to generate an optimized attention-gated recurrent network.
[0035] This invention dynamically simulates individual foraging and exploration behaviors based on the peacock optimization algorithm, and employs an adaptive parameter adjustment mechanism to achieve efficient global optimization of the parameters of the attention-gated recurrent network. Through the co-evolution of multiple peacock individuals, the network's generalization ability and convergence speed in complex medical data scenarios are improved, effectively enhancing the stability and robustness of the auxiliary diagnostic model.
[0036] In this embodiment, S5 specifically includes: S51. Obtain the optimized attention-gated recurrent network and prepare the contrastive learning unit. Combine the two for the initialization of joint training. S52. Input the new medical data sample and feed it into the optimized attention-gated recurrent network and contrastive learning unit respectively to obtain the initial joint feature expression set. S53. Based on the initial joint feature expression set, calculate the set of comparative feature distances for newly added medical data samples, and generate the feature distance output for the current round; S54. Using the feature distance output, jointly update the parameter set of the attention-gated recurrent network and the parameter set of the contrastive learning unit to obtain the jointly updated parameter set: ; in, Let be the value of the 'a'-th joint training parameter in the 'u'-th iteration. Let be the value of the 'a'-th joint training parameter in the (u+1)th iteration. The learning rate coefficient for joint training. The total number of medical data samples participating in the joint training. The ID of the s-th medical data sample, In the u-th iteration, the gradient value of the a-th joint training parameter with respect to the feature distance is... , Regularization coefficients of the joint training parameter set, The total number of parameters in the joint training parameter set, Parameter numbers in the joint training parameter set, No. The value of the r-th parameter during round iteration. The total number of parameters in the peacock individual parameter set, r The index of the r-th parameter in the set of individual peacock parameters; S55. Using newly added medical data samples, continuously iterate and optimize the jointly updated parameter set to generate a continuously optimized parameter set. S56. Extract the optimized attention-gated recurrent network parameters from the continuously optimized parameter set, and output the final attention-gated recurrent network.
[0037] This invention achieves rapid model adaptation to new data by jointly optimizing an attention-gated recurrent network and a contrastive learning unit, continuously iterating parameter updates using newly added medical data samples. By dynamically optimizing parameters through joint feature representation and contrastive feature distance, the network's responsiveness and generalization performance to changes in medical samples are improved, significantly enhancing the stability and practicality of the assisted diagnostic model.
[0038] In this embodiment, S6 specifically includes: S61. Input the medical data sample to be tested into the final attention-gated recurrent network to obtain preliminary feature extraction results; S62. Based on the preliminary feature extraction results, perform feature fusion processing to obtain fused feature representation data; S63. Utilize the fused feature representation data, and output the preliminary diagnostic category probability through the classification unit of the final attention-gated recurrent network; S64. Based on the fused feature representation data, key feature localization information is obtained through the localization unit of the final attention-gated recurrent network; S65. Integrate the preliminary diagnostic category probability with the key feature localization information, and output the final diagnostic category probability and key feature localization results.
[0039] This invention utilizes a final attention-gated recurrent network to extract, fuse, and multi-task output features from medical data, simultaneously obtaining diagnostic category probabilities and key feature localization information. This method effectively improves diagnostic accuracy and localization precision, achieving a high degree of synergy between diagnostic results and feature interpretation, and providing more comprehensive and accurate support for clinical decision support.
[0040] refer to Figure 3 An intelligent assisted diagnostic detection system based on contrastive learning includes the following modules: The medical data acquisition and preprocessing module is used to acquire medical data and preprocess it to generate medical data sample pairs. The neural network unit module models medical data sample pairs as neural network units with temporal state input and feature expression capabilities; The contrastive learning training module performs contrastive learning on the feature representations of sample pairs. The peacock optimization algorithm module generates an optimized attention-gated recurrent network based on the foraging paths and exploration behaviors of all individual peacocks. The joint training module will jointly train the optimized attention-gated recurrent network and the contrastive learning unit. The auxiliary diagnostic reasoning module outputs diagnostic category probabilities and key feature localization results through a final attention-gated recurrent network.
[0041] This invention automates the entire process of medical data processing, from acquisition and preprocessing to sample pair modeling, comparative learning, and peacock optimization, through modular design. It combines the advantages of neural networks and evolutionary algorithms to enhance feature extraction and model generalization capabilities. A joint training mechanism strengthens the model's adaptability to medical samples, ultimately achieving high-precision diagnostic reasoning and key feature localization, significantly improving the efficiency and accuracy of clinical decision support.
[0042] Example 1: To verify the feasibility of this invention in practice, it was applied to a real-world lung disease auxiliary diagnosis project at a tertiary hospital. This hospital has long faced challenges such as difficulty in integrating multimodal medical data, low efficiency in diagnosing complex cases, and high workload for doctors. Particularly in lung disease diagnosis, doctors need to comprehensively analyze multimodal data such as chest CT images, past medical history, laboratory indicators, and pathology reports. Traditional manual interpretation is not only time-consuming and subjective, but also results in relatively low consistency among different doctors. Existing intelligent auxiliary diagnostic systems, due to their simple model structure, limited parameter optimization methods, and limited ability to fuse multimodal data, often struggle to provide accurate judgments in complex cases and marginal samples. Therefore, the hospital's information technology department and respiratory department jointly introduced the "Intelligent Auxiliary Diagnostic Detection Method Based on Attention-Gated Recurrent Network, Peacock Optimization Algorithm, and Contrastive Learning" proposed in this invention, and conducted a full-process application and effect evaluation.
[0043] In practical application, the hospital first preprocessed 12,000 complex lung disease cases collected throughout the year. This data included basic patient information, chest CT images, blood tests, genetic testing results, and electronic medical records written by doctors. The IT team, using the method of this invention, standardized the data from different modalities, constructed high-quality sample pairs, and input them into the system. Utilizing an attention-gated recurrent network, the system automatically captures the dynamic changes in the patient's condition over time, focusing on periods of disease deterioration, key imaging sequences, and abnormal laboratory indicators. The contrastive learning module uncovers key feature differences between different cases during training, effectively improving the model's ability to discriminate complex samples. The system also employs the Peacock Optimization algorithm to adaptively adjust network parameters, continuously searching for the optimal parameter solution globally, effectively avoiding the problem of traditional optimization methods getting trapped in local optima.
[0044] In the assisted diagnostic process, doctors only need to upload new case data, and the system can automatically complete feature extraction, model inference, and generate assisted diagnostic suggestions. For example, if a doctor inputs CT images and related laboratory reports of a patient with cough, shortness of breath, and chest pain, the system can quickly identify ground-glass opacities in the images, key time points in disease progression, and abnormal tumor markers by comprehensively analyzing time-series data, and automatically provide a diagnostic suggestion of "high probability of malignant lung disease, further biopsy recommended" along with a risk classification. In actual use, doctors can confirm or adjust the system's suggestions, and the system will further optimize model parameters based on doctor feedback, achieving closed-loop self-learning.
[0045] The hospital included 12,000 clinically challenging lung cases, selecting 8,000 as the training set, 2,000 as the validation set, and 2,000 as the independent test set. Key indicators such as diagnostic accuracy, recall, F1 score, model response time, average physician reading time, and average patient hospital stay were evaluated compared to traditional manual interpretation and mainstream deep learning-assisted systems. Pilot results showed that the system achieved a 94.7% accuracy rate, a 92.5% recall rate, and an F1 score of 93.6% on the independent test set, all higher than traditional deep learning-assisted systems, with a human interpretation consistency of 81.5%. Furthermore, the system's average response time was 8.3 seconds, a 30% reduction compared to traditional systems. Physician reading time decreased from an average of 15.2 minutes to 7.3 minutes, and the average patient hospital stay shortened from 12.7 days to 10.9 days. By using a comparative learning feature distance feedback mechanism, the model reduced the misclassification rate of difficult and borderline pulmonary nodule cases by 18.6%, and the overall satisfaction of doctors with the auxiliary system increased from 73% to 89%. In addition, the system's robustness to complex multimodal samples has also been significantly improved, with very few cases of misclassification due to a single modality abnormality.
[0046] Table 1. Comparison of Optimization Effects of Intelligent Assisted Diagnosis and Detection Based on Comparative Learning
[0047] Table 1 shows that this invention can quickly screen 15 suspected cases of novel coronavirus pneumonia, approximately 18 hours earlier than manual screening, thus securing a valuable window of opportunity for the hospital. After the system went live, the hospital assisted in interpreting approximately 1,000 complex cases per month, significantly improving the accuracy of diagnosis and timely intervention rates for these cases. For cases with a family history of cancer or complex imaging findings, the system can automatically recommend further examination plans, assisting doctors in making comprehensive judgments from multiple perspectives.
[0048] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method and system for intelligent assisted diagnostic detection based on contrastive learning, characterized in that, Includes the following steps: S1. Collect medical data and preprocess it to generate medical data sample pairs; S2. Construct an attention-gated recurrent network to model medical data sample pairs as neural network units with temporal state input and feature expression capabilities. Each gated recurrent unit receives the input state at the current time and the hidden state at the previous time, extracts key features related to assisted diagnosis, and generates feature representations of sample pairs. S3. Perform comparative learning on the feature representations of sample pairs, calculate the feature distance between positive and negative sample pairs, and output the parameters of the initially trained attention-gated recurrent network. S4. Using the peacock optimization algorithm, each peacock individual is configured with an exploration and foraging behavior simulation sub-unit. Based on the foraging paths and exploration behaviors of all peacock individuals, an optimized attention-gated recurrent network is generated. S5. Jointly train the optimized attention-gated recurrent network with the contrastive learning unit, and continuously update and optimize the attention-gated recurrent network using newly added medical data samples to obtain the final attention-gated recurrent network. S6. Input the medical data to be detected, and output the diagnostic category probability and key feature localization results through the final attention-gated recurrent network.
2. The intelligent assisted diagnostic detection method based on contrastive learning according to claim 1, characterized in that, The medical data specifically includes medical images, pathological slides, electronic medical records, genomic data, physiological parameters, test reports, and basic patient information.
3. The intelligent assisted diagnostic detection method based on contrastive learning according to claim 1, characterized in that, The attention-gated recurrent network parameters specifically include the network weight matrix, bias terms, gating unit parameters, attention weights, hidden layer state parameters, and inter-layer connection parameters.
4. The intelligent assisted diagnostic detection method based on contrastive learning according to claim 1, characterized in that, S2 specifically includes: S21. Perform time-series segmentation on the medical data sample pairs, dividing each pair of medical data samples into multiple continuous time segments to obtain segmented time-series medical data segments. S22. Perform feature standardization processing on the segmented time-series medical data fragments, including normalization and denoising operations, to obtain standardized time-series medical data fragments. S23. Input standardized time-series medical data segments into gated recurrent neural network units. Each gated recurrent neural network unit sequentially receives the input state of the current time segment and the hidden state of the previous time segment, and outputs the hidden feature state sequence of the current time segment. S24. An attention mechanism is introduced to assign weights to the hidden feature state sequences of each time segment, and the hidden feature states of all time segments are weighted and fused to obtain a weighted fused temporal feature representation. S25. Input the weighted and fused temporal feature representation into the feature extraction unit to further extract key features related to assisted diagnosis; S26. Output the feature representation of the sample pairs.
5. The intelligent assisted diagnostic detection method based on contrastive learning according to claim 1, characterized in that, S3 specifically includes: S31. Receive key feature representations of medical data sample pairs and construct a set of feature representations for sample pairs; S32. Construct a contrastive learning task, group the sample pair feature representation set according to positive sample pairs and negative sample pairs, and generate positive sample pair feature groups and negative sample pair feature groups. S33. Perform feature encoding on the feature groups of positive sample pairs and negative sample pairs respectively to obtain the feature encoding results of positive sample pairs and negative sample pairs; S34. Based on the feature encoding results, a contrastive learning method is used to calculate the feature distance between positive sample pairs and the feature distance between negative sample pairs, forming a set of contrastive feature distances: ; in, The total feature distance between all positive and negative sample pairs. The number of positive sample pairs. The number of negative sample pairs. The feature encoding for the i-th positive sample pair. Let i be the feature encoding of the j-th negative sample pair, where i is the number of the positive sample pair and j is the number of the negative sample pair. S35. Using the set of contrastive feature distances, the feature distance between positive sample pairs and negative sample pairs is used as the optimization target to optimize and adjust the parameters of the attention-gated recurrent network, and the optimized network parameters are output. S36. Use the optimized network parameters as the parameters for the initial training of the attention-gated recurrent network.
6. The intelligent assisted diagnostic detection method based on contrastive learning according to claim 1, characterized in that, S4 specifically includes: S41. Using the peacock optimization algorithm, initialize the peacock individual group, assign initial foraging paths and exploration behavior parameters to each peacock individual, and form a peacock individual parameter set; S42. Based on the individual parameter set of the peacock, configure the exploration behavior simulation sub-unit for each individual peacock to obtain the peacock exploration behavior set; S43. Combine the set of peacock exploration behaviors with the set of individual peacock parameters to simulate the foraging behavior of all individual peacocks and generate a set of peacock foraging paths. S44. Based on the set of peacock foraging paths, calculate the performance of each individual peacock during the foraging process to form a set of individual peacock performances; S45. The Peacock Optimization Algorithm, based on the Peacock Algorithm, optimizes the parameter adaptive adjustment mechanism. It updates the individual peacock parameter set and the peacock exploration behavior set based on the individual peacock performance set, resulting in the updated individual peacock parameter set and exploration behavior set. ; in, Let be the parameters of the k-th peacock individual in the t-th iteration. For learning rate, The total number of individual peacocks The total feature distance between all positive and negative sample pairs. The regularization coefficient is . The number of peacock individuals participating in the collaborative update is given by , k is the number of the kth peacock individual, t is the number of iterations, p is the index of the summation of all peacock individuals, and q is the number of the peacock individual used in the regularization term to collaboratively update with individual k. S46. Using the updated set of individual peacock parameters and the set of peacock exploration behaviors, optimize the parameters of the attention-gated recurrent network to generate an optimized attention-gated recurrent network.
7. The intelligent assisted diagnostic detection method and system based on contrastive learning according to claim 1, characterized in that, S5 specifically includes: S51. Obtain the optimized attention-gated recurrent network and prepare the contrastive learning unit. Combine the two for the initialization of joint training. S52. Input the new medical data sample and feed it into the optimized attention-gated recurrent network and contrastive learning unit respectively to obtain the initial joint feature expression set. S53. Based on the initial joint feature expression set, calculate the set of comparative feature distances for newly added medical data samples, and generate the feature distance output for the current round; S54. Using the feature distance output, jointly update the parameter set of the attention-gated recurrent network and the parameter set of the contrastive learning unit to obtain the jointly updated parameter set: ; in, Let be the value of the 'a'-th joint training parameter in the 'u'-th iteration. Let be the value of the 'a'-th joint training parameter in the (u+1)th iteration. The learning rate coefficient for joint training. The total number of medical data samples participating in the joint training. The ID of the s-th medical data sample, In the u-th iteration, the gradient value of the a-th joint training parameter with respect to the feature distance is... , Regularization coefficients of the joint training parameter set, The total number of parameters in the joint training parameter set, Parameter numbers in the joint training parameter set, No. The value of the r-th parameter during round iteration. The total number of parameters in the peacock individual parameter set, r The index of the r-th parameter in the set of individual peacock parameters; S55. Using newly added medical data samples, continuously iterate and optimize the jointly updated parameter set to generate a continuously optimized parameter set. S56. Extract the optimized attention-gated recurrent network parameters from the continuously optimized parameter set, and output the final attention-gated recurrent network.
8. The intelligent assisted diagnostic detection method and system based on contrastive learning according to claim 1, characterized in that, S6 specifically includes: S61. Input the medical data sample to be tested into the final attention-gated recurrent network to obtain preliminary feature extraction results; S62. Based on the preliminary feature extraction results, perform feature fusion processing to obtain fused feature representation data; S63. Utilize the fused feature representation data, and output the preliminary diagnostic category probability through the classification unit of the final attention-gated recurrent network; S64. Based on the fused feature representation data, key feature localization information is obtained through the localization unit of the final attention-gated recurrent network; S65. Integrate the preliminary diagnostic category probability with the key feature localization information, and output the final diagnostic category probability and key feature localization results.
9. An intelligent assisted diagnostic detection system based on contrastive learning, executing any one of the intelligent assisted diagnostic detection methods based on contrastive learning according to claims 1 to 8, characterized in that, Includes the following modules: The medical data acquisition and preprocessing module is used to acquire medical data and preprocess it to generate medical data sample pairs. The neural network unit module models medical data sample pairs as neural network units with temporal state input and feature expression capabilities; The contrastive learning training module performs contrastive learning on the feature representations of sample pairs. The peacock optimization algorithm module generates an optimized attention-gated recurrent network based on the foraging paths and exploration behaviors of all individual peacocks. The joint training module will jointly train the optimized attention-gated recurrent network and the contrastive learning unit. The auxiliary diagnostic reasoning module outputs diagnostic category probabilities and key feature localization results through a final attention-gated recurrent network.