Electrical impedance lung cancer detection method based on dual-channel neural network

Through the electrical impedance lung cancer detection method based on a dual-channel neural network, using multi-frequency electrical impedance signals for data processing and feature extraction, the problems of high invasiveness, high cost and long time in the existing technology are solved, and efficient and accurate lung cancer detection is achieved.

CN120221040APending Publication Date: 2025-06-27TONGJI HOSPITAL ATTACHED TO TONGJI MEDICAL COLLEGE HUAZHONG SCI TECH +1

Patent Information

Application Number
CN202510286215.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The existing lung cancer detection methods have problems such as strong invasiveness, high cost, and long detection time. The multi-scale extraction of local features lacks the ability to model global correlations, and their scope of application is limited.

Method used

The electrical impedance lung cancer detection method based on a dual-channel neural network is adopted. By collecting multi-frequency electrical impedance signals, processing data using a preprocessing module, building a graph structure for local feature extraction, combining the multi-head attention mechanism to extract global features, and lung cancer detection is realized through the classification module.

Benefits of technology

It realizes non-invasive, low-cost and rapid detection, improves the accuracy and efficiency of lung cancer detection, solves the problem of insufficient global correlation modeling capabilities of local feature extraction, and is suitable for early screening and large-scale population detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120221040A_ABST
    Figure CN120221040A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of lung cancer detection, and provides an electrical impedance lung cancer detection method based on a dual-channel neural network, which comprises the following steps of: acquiring to-be-detected data and detecting a lung cancer detection model; the training process of the lung cancer detection model comprises the steps of pre-collected data acquisition, dual-channel neural network construction, data preprocessing, local feature extraction, global feature extraction, feature fusion and feature classification, network optimization and performance evaluation. According to the invention, lung cancer detection is carried out by using the electrical impedance data, non-invasive detection is realized, and the lung cancer detection efficiency is improved; the sensitivity, specificity and accuracy of lung cancer detection are improved by extracting and fusing the local dependency relationship and the global characteristics of the signals respectively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of lung cancer detection, and in particular to an impedance-based lung cancer detection method using a dual-channel neural network. Background Art

[0002] Magnetic resonance imaging is abbreviated as MRI. Lung cancer detection, as an important topic in the field of medical diagnosis, has always been a hot spot in scientific research and technological development. Traditional lung cancer detection methods mainly rely on imaging, histology, and molecular biology techniques, such as X-rays, ultrasound imaging, MRI, and biopsy. Although these methods have high accuracy, they often have problems such as strong invasiveness, high cost, and long detection time, which limit their large-scale application in early screening and high-risk populations. In recent years, biomedical detection techniques based on impedance characteristics have received extensive attention due to their non-invasive, low-cost, and rapid detection characteristics. Impedance analysis technology can reflect the physical and physiological characteristics of tissues by measuring impedance parameters of biological tissues at different frequencies, such as resistance, reactance, capacitance, and phase angle. Malignant tumors often show significant impedance differences due to changes in cell arrangement, water content, and blood flow, making impedance-based lung cancer detection a potential early screening method. In the prior art, the patent with the publication number CN110458842B discloses a "brain tumor segmentation method based on a dual-channel three-dimensional densely connected network". This method proposes a dual-channel three-dimensional densely connected network to achieve automatic segmentation of brain tumors in MRI for the non-uniformity of information such as the shape, position, and size of brain tumors. Three-dimensional convolutional kernels are used to extract spatial features, and the dual-channel feature learning network uses convolutional kernels of different sizes to extract features of different scales. The construction of a three-dimensional densely connected block strengthens the reuse of features at all levels and improves the accuracy of segmentation.

[0003] However, the above method also has some deficiencies: First, its segmentation method depends on MRI images, and the cost of obtaining data is relatively high and it takes a long time. Second, it focuses on the multi-scale extraction of local features. Although it enhances the reuse of features, it may have insufficient ability to model global associations. Finally, the scope of application is relatively limited and the cost is high. Summary of the Invention

[0004] In order to overcome the deficiencies of the prior art, the purpose of the present invention is to provide an impedance-based lung cancer detection method using a dual-channel neural network to improve the detection efficiency of lung cancer and reduce the cost of lung cancer detection.

[0005] To achieve the above purpose, the present invention provides the following solution:

[0006] An impedance-based lung cancer detection method using a dual-channel neural network, comprising:

[0007] Collect the multi-frequency electrical impedance signals of the lung tissue of the user to be detected to obtain the data to be detected;

[0008] Input the data to be detected into a pre-trained lung cancer detection model for detection to obtain a lung cancer detection result; the training process of the lung cancer detection model includes:

[0009] Collect the multi-frequency electrical impedance signals of the lung tissue of normal people and patients with malignant lung cancer respectively to obtain pre-collected data;

[0010] Construct a dual-channel neural network;

[0011] Use the preprocessing module of the dual-channel neural network to perform missing value processing, noise removal, and normalization on the pre-collected data to obtain preprocessed data;

[0012] Use the local feature modeling module of the dual-channel neural network to construct the preprocessed data into a graph structure based on frequency points, and use the message passing mechanism to extract the local information of the graph structure in the frequency domain to obtain local features;

[0013] Extract the deep correlations between the graph structures through the global feature modeling module of the dual-channel neural network using the multi-head attention mechanism to obtain global features;

[0014] Use the classification module of the dual-channel neural network to fuse the local features and the global features to obtain fused features, input the fused features into a fully connected layer for classification to obtain a classification result;

[0015] Optimize the dual-channel neural network according to the classification result using cross-entropy loss to obtain the optimized dual-channel neural network;

[0016] Perform performance evaluation on the optimized dual-channel neural network to obtain an evaluation result. If the evaluation result meets the preset output standard, determine the dual-channel neural network as the lung cancer detection model.

[0017] Preferably, the data to be detected includes: resistance data, reactance data, capacitance data, phase angle data, and resistivity.

[0018] Preferably, using the preprocessing module of the dual-channel neural network to perform missing value processing, noise removal, and normalization on the pre-collected data to obtain preprocessed data, including:

[0019] Convert the pre-collected data into a matrix form to obtain a multi-frequency signal matrix;

[0020] Process the missing values in the multi-frequency signal matrix according to a preset rule; the expression of the preset rule is: x ij= max(x j ); where x ij is the element in the i-th row and j-th column of the multi-frequency signal matrix; x j is all the observed data in the j-th column of the multi-frequency signal matrix;

[0021] Perform high-frequency noise removal on the multi-frequency signal matrix after missing value processing using a Gaussian filter; the expression of the Gaussian filter is:

[0022]

[0023] where z e is the e-th value in the filtered multi-frequency signal matrix; u e+q is the (e + q)-th value in the multi-frequency signal matrix before filtering; q is the index of the neighborhood range; n is half of the neighborhood window size; θ is the scale parameter of the smoothing process; γ is the normalization factor; α is the control parameter of the Gaussian kernel;

[0024] Perform normalization processing on the filtered multi-frequency signal matrix to obtain the preprocessed data; the expression of the normalization processing is:

[0025]

[0026] where is the p-th value of the preprocessed data; v p is the p-th value in the filtered multi-frequency signal matrix; η is the mean of the sequence; λ is the normalized amplitude parameter; m is the total length of the sequence; β is the smoothing standard deviation coefficient; k is the index in the summation process.

[0027] Preferably, use the local feature modeling module of the dual-channel neural network to construct the preprocessed data into a graph structure based on frequency points, and use the message passing mechanism to extract the local information of the graph structure in the frequency domain to obtain local features, including:

[0028] Regard each frequency feature in the preprocessed data as a node to obtain a node set;

[0029] Calculate the similarity between nodes in the node set to obtain an edge weight matrix;

[0030] Determine the neighborhood set of each node in the node set according to the edge weight matrix; the determination criterion of the neighborhood set is: where is the neighborhood set; p is the node in the neighborhood set; r kp is the weight between node k and node p; ζ is the threshold;

[0031] Initial feature settings are performed on each node in the node set according to the neighborhood set to obtain a frequency signal feature set;

[0032] The neighbor information of each node in the frequency signal feature set is weighted and aggregated using a message passing mechanism to obtain aggregated information;

[0033] Node feature calculation is performed according to the aggregated information to obtain the local feature.

[0034] Preferably, the calculation formula of the cross-entropy loss is:

[0035]

[0036] where E is the cross-entropy loss; M is the number of samples; z a is the true label of the a-th input sample; is the predicted probability of the a-th input sample; p a is the penalty term of the a-th input sample.

[0037] Preferably, the global feature modeling module of the dual-channel neural network uses a multi-head attention mechanism to extract the deep correlation between the graph structures to obtain global features, including:

[0038] The frequency signal feature set is converted into a matrix form to obtain a node feature matrix;

[0039] The query P, key R, value S, and attention weights are calculated and feature extracted based on the node feature matrix to obtain a single-head feature; the acquisition calculation formula of the single-head feature is: where, is the single-head feature; w is the attention weight matrix; x is the node feature matrix;

[0040] All the single-head features are concatenated and linearly transformed to obtain the global feature.

[0041] Preferably, the acquisition calculation formula of the edge weight matrix is: where e ij is the similarity measure between node i and node j; z i is the characteristic vector of the i-th node; z j is the feature vector of the j-th node; is the square of the Euclidean distance between node i and node j; σ 2 is the adjustment parameter.

[0042] Preferably, the acquisition formula of the aggregated information is:

[0043]

[0044] Among them, is the updated value of node d after the r-th iteration; is the neighbor set of node d; is the representation of neighbor node t in the (r - 1)-th iteration; ζ dt is the attention weight of neighbor node t to node d; g dt is the correlation score between node d and node t; ρ is the regularization parameter; represents the summation over all neighbor nodes s of node d; r is the number of iterations.

[0045] Preferably, the calculation expression of the local feature is: Among them, represents the u-th output value of the l-th layer; V (l) is the weight matrix of the l-th layer; τ is the activation function; is the u-th bias term of the l-th layer; is the u-th noise term of the l-th layer.

[0046] Preferably, the calculation formula for obtaining the global feature is: H” = c(y'1, y'2, …, y' M )W O ; where H” is the global feature vector; c(·) represents the merging operation; y' M is the M-th local feature; W O is the fully connected layer weight matrix.

[0047] The present invention discloses the following technical effects:

[0048] The present invention provides a method for impedance lung cancer detection based on a dual-channel neural network. By using impedance data for lung cancer detection, it solves the defects of invasiveness and long time of conventional detection means, and realizes non-invasive detection; by separately extracting and fusing the local dependence relationship and global characteristics of the signal, it solves the problem that the prior art focuses on the multi-scale extraction of local features, and realizes the extraction and fusion of local and global features. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0050] Figure 1 is a schematic diagram of the impedance lung cancer detection process based on a dual-channel neural network provided by an embodiment of the present invention;

[0051] Figure 2 Schematic diagram of the data acquisition and preprocessing process provided by the embodiment of the present invention;

[0052] Figure 3 Schematic diagram of the local feature modeling process provided by the embodiment of the present invention;

[0053] Figure 4 Schematic diagram of the global feature modeling process provided by the embodiment of the present invention;

[0054] Figure 5 Schematic diagram of the feature fusion and classification process provided by the embodiment of the present invention. Detailed implementation manners

[0055] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0056] The purpose of the present invention is to provide a method for detecting impedance lung cancer based on a dual-channel neural network, so as to improve the detection efficiency of lung cancer and reduce the cost of lung cancer detection.

[0057] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.

[0058] Figure 1 Schematic diagram of the impedance lung cancer detection process based on a dual-channel neural network provided by the embodiment of the present invention, as Figure 1 shown, the present invention provides a method for detecting impedance lung cancer based on a dual-channel neural network, including:

[0059] Step 100: Collect multi-frequency impedance signals of the lung tissue of the user to be detected to obtain the data to be detected;

[0060] Step 200: Input the data to be detected into a pre-trained lung cancer detection model for detection to obtain a lung cancer detection result; The training process of the lung cancer detection model includes:

[0061] Step 201: Respectively collect multi-frequency impedance signals of the lung tissue of normal people and patients with malignant lung cancer to obtain pre-collected data;

[0062] Step 202: Construct a dual-channel neural network;

[0063] Step 203: Use the preprocessing module of the dual-channel neural network to perform missing value processing, noise removal, and normalization on the pre-collected data to obtain preprocessed data;

[0064] Step 204: Use the local feature modeling module of the dual-channel neural network to construct the preprocessed data into a graph structure based on frequency points, and use the message passing mechanism to extract the local information of the graph structure in the frequency domain to obtain local features;

[0065] Step 205: Use the global feature modeling module of the dual-channel neural network to extract the deep correlation between the graph structures by using the multi-head attention mechanism to obtain global features;

[0066] Step 206: Use the classification module of the dual-channel neural network to fuse the local features and global features to obtain fused features, and input the fused features into the fully connected layer for classification to obtain classification results;

[0067] Step 207: Optimize the dual-channel neural network according to the classification results using cross-entropy loss to obtain an optimized dual-channel neural network;

[0068] Step 208: Perform performance evaluation on the optimized dual-channel neural network to obtain an evaluation result. If the evaluation result meets the preset output standard, determine the dual-channel neural network as the lung cancer detection model.

[0069] Preferably, the data to be detected includes: resistance data, reactance data, capacitance data, phase angle data, and resistivity.

[0070] Specifically, using the preprocessing module of the dual-channel neural network to perform missing value processing, noise removal, and normalization on the pre-collected data to obtain preprocessed data, including:

[0071] Convert the pre-collected data into matrix form to obtain a multi-frequency signal matrix;

[0072] Process the missing values in the multi-frequency signal matrix according to a preset rule; the expression of the preset rule is: x ij =max(x j ) ; where x ij is the element in the i-th row and j-th column of the multi-frequency signal matrix; x j is all the observed data in the j-th column of the multi-frequency signal matrix;

[0073] Use a Gaussian filter to remove high-frequency noise from the multi-frequency signal matrix after missing value processing; the expression of the Gaussian filter is:

[0074]

[0075] where z eis the e-th value in the filtered multi-frequency signal matrix; u e+q is the (e + q)-th value in the multi-frequency signal matrix before filtering; q is the index of the neighborhood range; n is half of the neighborhood window size; θ is the scale parameter of the smoothing process; γ is the normalization factor; α is the control parameter of the Gaussian kernel;

[0076] Perform normalization processing on the filtered multi-frequency signal matrix to obtain preprocessed data; the expression for normalization processing is:

[0077]

[0078] where, is the p-th value of the preprocessed data; v p is the p-th value in the filtered multi-frequency signal matrix; η is the mean of the sequence; λ is the normalized amplitude parameter; m is the total length of the sequence; β is the smoothing standard deviation coefficient; k is the index in the summation process.

[0079] Furthermore, use the local feature modeling module of the dual-channel neural network to construct the preprocessed data into a graph structure based on frequency points, and use the message passing mechanism to extract the local information of the graph structure in the frequency domain to obtain local features, including:

[0080] Regard each frequency feature in the preprocessed data as a node to obtain a node set;

[0081] Calculate the similarity between nodes in the node set to obtain an edge weight matrix;

[0082] Determine the neighborhood set of each node in the node set according to the edge weight matrix; the determination criterion for the neighborhood set is: where, is the neighborhood set; p is the node in the neighborhood set; r kp is the weight between node k and node p; ζ is the threshold;

[0083] Perform initial feature setting on each node in the node set according to the neighborhood set to obtain a frequency signal feature set;

[0084] Use the message passing mechanism to perform weighted aggregation on the neighbor information of each node in the frequency signal feature set to obtain aggregated information;

[0085] Perform node feature calculation according to the aggregated information to obtain local features.

[0086] Preferably, the calculation formula for cross-entropy loss is:

[0087]

[0088] where, E is the cross-entropy loss; M is the number of samples; za is the true label of the a-th input sample; is the predicted probability of the a-th input sample; p a is the penalty term of the a-th input sample.

[0089] Specifically, the global feature modeling module of the dual-channel neural network uses the multi-head attention mechanism to extract the deep correlation between the graph structures, and obtains global features, including:

[0090] Convert the frequency signal feature set into a matrix form to obtain a node feature matrix;

[0091] Calculate and extract the query P, key R, value S, and attention weights based on the node feature matrix to obtain single-head features; the calculation formula for obtaining single-head features is: where, is the single-head feature; w is the attention weight matrix; x is the node feature matrix;

[0092] Concatenate and linearly transform all single-head features to obtain global features.

[0093] Furthermore, the calculation formula for obtaining the edge weight matrix is: where e ij is the similarity measure between node i and node j; z i is the characteristic vector of the i-th node; z j is the feature vector of the j-th node; is the square of the Euclidean distance between node i and node j; σ 2 is the adjustment parameter.

[0094] Preferably, the formula for obtaining the aggregated information is:

[0095]

[0096] where, is the updated value of node d after the r-th iteration; is the neighbor set of node d; is the representation of neighbor node t at the (r-1)-th iteration; ζ dt is the attention weight of neighbor node t to node d; g dt is the correlation score between node d and node t; ρ is the regularization parameter; denotes the sum over all neighbor nodes s of node d; r is the number of iterations.

[0097] Specifically, the calculation expression for local features is: where, represents the u-th output value of the l-th layer; V (l)is the weight matrix of the l-th layer; τ is the activation function; is the u-th bias term of the l-th layer; is the u-th noise term of the l-th layer.

[0098] Furthermore, the calculation formula for obtaining the global feature is: H” = c(y'1, y'2, …, y' M )W O ; where H” is the global feature vector; c(·) represents the merging operation; y' M is the M-th local feature; W O is the fully connected layer weight matrix.

[0099] Specifically, the following will be described in conjunction with the attached Figures 2 to 5 The detection method provided in this embodiment includes the following steps:

[0100] S1: Collect multi-frequency electrical impedance signal data of normal and malignant samples of lung tissue, including multi-dimensional parameters such as frequency, resistance, reactance, capacitance, phase angle, and conductivity, and perform data preprocessing to ensure signal quality;

[0101] Specifically, collecting multi-frequency electrical impedance signal data of normal and malignant samples of lung tissue means measuring the electrical characteristics of lung tissue at different frequencies through a dedicated multi-frequency bioelectrical impedance analysis device. The measured parameters include resistance, reactance, capacitance, phase angle, conductivity, etc. These parameters reflect the physical and biological characteristics of the tissue, and there may be significant differences between malignant and normal tissues. To ensure the quality of the collected signals, data preprocessing is required, including filling in missing values to ensure data integrity, removing noise to eliminate the influence of external interference on the signal, and normalizing the data so that parameters in different dimensions have a unified dimension and range. These operations can improve the reliability and availability of the data and lay a foundation for subsequent feature extraction and analysis. The electrical impedance signals of lung tissue are collected by a multi-frequency bioelectrical impedance analyzer, and integrity checks, noise processing, and standardization preprocessing are performed on the collected multi-frequency electrical signal data to provide high-quality and standardized data input for subsequent feature extraction.

[0102] Specifically, an electrical impedance signal of lung tissue is collected by a multi-frequency bioelectrical impedance analyzer. Using advanced equipment, the electrical properties of lung tissue are measured at different frequencies to obtain multi-dimensional signal data describing the tissue properties. These signal data include various key parameters, such as resistance and reactance, etc., which can reflect the physiological and pathological characteristics of lung tissue. After collection, to ensure data quality, a series of preprocessing operations need to be performed on it. First, an integrity check is carried out to detect and process missing data or outliers that may occur during the collection process; second, interference signals in the measurement environment are eliminated through noise processing techniques to improve the accuracy and reliability of the data; finally, the data is standardized to unify the numerical range and scale of each parameter, avoiding affecting subsequent analysis due to dimensional differences. These steps are aimed at outputting clean and standardized data to provide reliable data for subsequent feature extraction and analysis.

[0103] S2: Design a local feature modeling module to construct the features of the electrical impedance signal into a graph structure, and extract the local dependencies of the signal through feature correlation analysis;

[0104] Specifically, a graph structure is constructed based on frequency points, converting the multi-frequency electrical signal into the form of nodes and edges, and extracting the local features in the frequency domain through a message passing mechanism to capture the mutual correlations between frequency points, providing a large amount of local information for the feature expression of lung cancer signals.

[0105] S3: Design a global feature modeling module to serialize the graph structure features and capture the global characteristics of the signal in the multi-dimensional space and frequency range;

[0106] Specifically, the self-attention mechanism is used to model the global dependencies of the multi-frequency signal, and the deep correlations between frequency points are comprehensively extracted through the multi-head attention mechanism to generate a global feature vector representing the overall characteristics of the signal.

[0107] S4: Fuse the local and global features, construct a classification module to achieve the classification detection of malignant and benign lung cancer samples, and ensure its clinical applicability in terms of sensitivity, specificity, and accuracy through model performance verification.

[0108] Preferably, in this embodiment, by collecting and preprocessing the multi-frequency electrical impedance signal data of lung tissue, the local dependencies and global characteristics of the signal are respectively modeled, and a classifier is constructed by fusing the two features to achieve the accurate classification detection of benign and malignant lung cancer samples. This method effectively combines the advantages of local feature correlation and global feature dependence, significantly improving the sensitivity, specificity, and accuracy of detection, and is applicable to the clinical auxiliary diagnosis scenario of lung cancer.

[0109] Reference Figure 2 , step S1 includes:

[0110] S11: Obtain the signal data of lung tissue using a multi-frequency bioelectrical impedance analyzer;

[0111] S12: Check the integrity of the collected data and fill in the missing values;

[0112] S13: Use signal processing techniques to remove the noise in the data;

[0113] S14: Normalize the signal data to eliminate the dimension difference.

[0114] Specifically, step S11 specifically includes:

[0115] S111: Calibrate the device, select the sampling frequency range, and collect the following parameters:

[0116] R i : Resistance, X i : Reactance, C i : Capacitance, φ i : Phase angle, σ i : Resistivity

[0117] S112: Store the multi-frequency signals as a matrix X according to the frequency points:

[0118]

[0119] where, f i is the signal frequency of the i-th sampling point; R i is the measured resistance value at the frequency f i ; X i is the measured reactance value at the frequency f i ; C i is the measured capacitance value at the frequency f i ; φ i is the measured phase angle at the frequency f i ; σ i is the measured resistivity at the frequency f i ;

[0120] Furthermore, step S12 specifically includes:

[0121] S121: Check whether there is missing data at each frequency point;

[0122] S122: Fill in the missing values using the following rule:

[0123] x ij = max(x j )

[0124] where, x ij is the element in the i-th row and j-th column of the multi-frequency signal matrix; x jAll the observed data of the j-th column of the multi-frequency signal matrix; max(x j ) represents the maximum value in the data of the j-th column;

[0125] Specifically, step S13 specifically includes:

[0126] S131: Use filtering technology to remove high-frequency noise, and apply a Gaussian filter:

[0127]

[0128] where z e is the e-th value in the output sequence, the result after smoothing, u e+q is the (e + q)-th term in the input sequence, representing the neighborhood value around the current sequence, q is the index of the neighborhood range, n is half of the neighborhood window size, determining the neighborhood range involved in the calculation, θ is the scale parameter of the smoothing process, determining the width of the Gaussian function, γ is the normalization factor, used to adjust the overall amplitude size, and α is the control parameter of the Gaussian kernel, used to adjust the weight in the exponent.

[0129] Furthermore, step S14 specifically includes:

[0130] S141: Normalize each-dimensional eigenvalue to eliminate the dimension difference:

[0131]

[0132] where is the p-th value after normalization, the result after standardization processing, v p is the p-th value in the original sequence, η is the mean value of the sequence, calculated by averaging all sequence values, λ is the standardized amplitude parameter, used to scale the normalized value, m is the total length of the sequence, β is used for calculating the smoothed standard deviation, increasing flexibility, and k is the index in the summation process, representing the current cumulative term.

[0133] Refer to Figure 3 , step S2 specifically includes:

[0134] S21: Construct a graph structure, and construct nodes and edge weights according to frequency points;

[0135] S22: Initialize the nodes, and map the signal features to the initial node features;

[0136] S23: Message passing mechanism, aggregate neighbor information to update node features;

[0137] S24: Node update rule: Integrate its own and neighbor information to complete the update.

[0138] Specifically, step S21 specifically includes:

[0139] S211: Consider each frequency feature as a graph node, and the node set V = {v1, v2, …, v n}.

[0140] S212: Construct an edge weight matrix E to represent the similarity between nodes, and calculate the edge weights using a Gaussian kernel:

[0141]

[0142] where ∥x i - x j ∥2 is the Euclidean distance, and σ is the scale parameter.

[0143] S213: Neighborhood selection, only keep the edges with weights greater than the threshold:

[0144]

[0145] where is the neighborhood set of node k, representing the set of nodes connected to node k and satisfying the condition, p is a node in the neighborhood, and r kp is the weight between node k and p, representing the connection strength or relationship value between the two nodes, and ζ is the threshold used to filter the edges with weights less than this value.

[0146] Furthermore, step S22 specifically includes:

[0147] S221: Initial feature setting, and each node feature vector is the corresponding frequency signal feature:

[0148]

[0149] Specifically, step S23 specifically includes:

[0150] S231: Message passing mechanism, for each node, calculate the weighted aggregation of neighbor information:

[0151]

[0152] where is the updated value of node d after the r-th iteration, is the neighbor set of node d, representing the other nodes connected to d, is the representation of neighbor node t in the (r - 1)-th iteration, and ζ dt is the attention weight of neighbor node t to node d, and g dt is the correlation score between node d and node t, which determines the magnitude of the attention weight. ρ is a newly added regularization parameter used to prevent numerical instability caused by the denominator being zero or a very small value, It is the sum of all neighbor nodes s of node d. r is the number of iterations, used to represent the current update round. t and s are the indices of neighbor nodes, representing different neighbor nodes.

[0153] Furthermore, step S24 specifically includes:

[0154] S241: Update node features: Combine aggregated information and its own features:

[0155]

[0156] Among them, represents the u-th output value of the l-th layer, V (l) is the weight matrix of the l-th layer, τ is an activation function, is the u-th bias term of the l-th layer, is the u-th noise term of the l-th layer.

[0157] Refer to Figure 4 , step S3 specifically includes:

[0158] S31: Feature serialization, converting graph node features into a feature matrix;

[0159] S32: Design of data processing method, calculating query, key, and value matrices and extracting the weights of this method;

[0160] S33: Multi-head mechanism, enhancing the feature expression ability;

[0161] S34: Output calculation, fusing the attention results as global features.

[0162] Specifically, step S31 specifically includes:

[0163] S311: Convert graph node features into a matrix:

[0164]

[0165] Each row corresponds to a node feature.

[0166] Furthermore, step S32 specifically includes:

[0167] S321: Calculate query P, key R, and value S:

[0168] P = XW p , R = XW r , S = XW s

[0169] Among them, P represents the features after the input data X is transformed by the weight matrix W p and is used for calculating the attention scores of other elements. R represents the input data X after being transformed by the weight matrix Wr Transformed features, used for calculating correlation. S represents the input data X after passing through the weight matrix W s Transformed features, used for generating the output after attention weighting. X represents the input feature matrix, W p , W r , W s is the weight matrix.

[0170] S322: Calculate the attention weights:

[0171]

[0172] Among them, is the attention weight matrix, representing the attention distribution of each element in the input sequence to other elements, is the query matrix, representing the information that is hoped to be focused on at the current moment, is the key matrix, representing all possible relevant information. β is a scaling factor, usually equal to the matrix dimension, to ensure numerical stability. Softmax is a normalization function, used to convert the scores into a probability distribution.

[0173] Extract the global features:

[0174]

[0175] Among them, is the global feature matrix, representing the feature representation after attention weighting, containing global information. w is the attention weight matrix, and x is the input feature matrix, representing the original features or the encoded features.

[0176] Furthermore, step S33 specifically includes:

[0177] S331: Expand the above steps into M attention heads, and each head independently calculates the attention output:

[0178] H' i = A(P i , R i , S i )

[0179] Concatenate the multi-head outputs and perform a linear transformation:

[0180] H” = c(H'1, H'2, …, H' M )W O

[0181] Refer to Figure 5 , step S4 specifically includes:

[0182] S41: Feature fusion, concatenate the local and global features;

[0183] S42: Classifier design, calculating class probabilities through a fully connected layer;

[0184] S43: Model optimization, optimizing the model with cross - entropy loss;

[0185] S44: Performance evaluation, calculating classification accuracy and other metrics.

[0186] Specifically, step S41 specifically includes:

[0187] S411: Fusing local features and global features:

[0188] Z = c(H l , H g )

[0189] Among them, Z represents the final feature representation after fusing the local feature H l and the global feature H g ; H l represents the feature extracted from the local feature; H g represents the feature extracted from the overall data; c(·) represents the feature fusion method.

[0190] Furthermore, step S42 specifically includes:

[0191] S421: Classifying the fused features using a fully connected layer:

[0192] z = softmax(MV + c + λR)

[0193] Among them, z is the classification result, representing the probability distribution obtained by normalizing the input data through the softmax function, used to represent the probability of each category, M is the input feature matrix, representing the feature vector processed by the model, V is the weight matrix of the classifier, c is the bias vector, λ is the regularization weight, and R is the regularization term.

[0194] Specifically, step S43 specifically includes:

[0195] S431: Optimizing the model using the cross - entropy loss function:

[0196]

[0197] Among them, E is the error function (replacing the original loss function), M is the number of samples, z a is the true label of the a - th sample, is the predicted probability of the a - th sample, p a is the penalty term of the a - th sample, used to impose additional penalties or adjustments on certain samples.

[0198] The beneficial effects of the present invention are as follows:

[0199] (1) The present invention uses multi-frequency bioelectrical impedance signal analysis for detection, without the need for invasive operations or tissue sampling, thus reducing the discomfort of patients. At the same time, the automated analysis method based on deep learning technology significantly improves the detection speed, meets the real-time requirements, and is suitable for rapid clinical screening and early diagnosis of large populations.

[0200] (2) The dual-channel neural network fully captures the complex relationship of electrical impedance signals through local feature extraction and global dependency modeling, significantly improving the recognition accuracy of malignant tumors. By effectively dealing with noise in multi-frequency signals and differences between samples, the detection stability of the model in different patients and scenarios is ensured.

[0201] (3) This invention innovatively combines local graph modeling and global attention mechanism to deeply explore the characteristics of multi-frequency electrical impedance signals. By modeling the local similarity and global dependency of signals in the frequency domain, multi-level optimization of feature extraction is achieved, which avoids information loss and further improves the accuracy and comprehensiveness of detection.

[0202] (4) The present invention adopts a non-invasive electrical impedance measuring instrument, which is low-cost and easy to promote; combined with the flexibility of deep learning technology, it has the potential for expansion of multiple lung cancer detection, and is particularly suitable for early screening of lung cancer such as lung cancer and lung cancer.

[0203] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0204] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for detecting lung cancer by electrical impedance based on a dual-channel neural network, characterized in that: include: Collecting multi-frequency electrical impedance signals of the lung tissue of the user to be tested to obtain data to be tested; Inputting the data to be detected into a pre-trained lung cancer detection model for detection to obtain a lung cancer detection result; The training process of the lung cancer detection model includes: The multi-frequency electrical impedance signals of lung tissues of normal persons and patients with malignant lung cancer are collected respectively to obtain pre-collected data; Construct a dual-channel neural network; Using the preprocessing module of the dual-channel neural network to perform missing value processing, noise removal and standardization processing on the pre-collected data to obtain preprocessed data; The preprocessed data is constructed into a graph structure based on frequency points using the local feature modeling module of the dual-channel neural network, and local information of the graph structure in the frequency domain is extracted using a message passing mechanism to obtain local features; The global feature modeling module of the dual-channel neural network uses a multi-head attention mechanism to extract the deep correlation between the graph structures to obtain global features; The classification module of the dual-channel neural network is used to fuse the local features and the global features to obtain a fused feature, and the fused feature is input into a fully connected layer for classification to obtain a classification result; According to the classification result, the dual-channel neural network is optimized by using cross entropy loss to obtain the optimized dual-channel neural network; The performance of the optimized dual-channel neural network is evaluated to obtain an evaluation result. If the evaluation result meets a preset output standard, the dual-channel neural network is determined as the lung cancer detection model.

2. The electrical impedance lung cancer detection method based on dual-channel neural network according to claim 1 is characterized in that: The data to be detected includes: resistance data, reactance data, capacitance data, phase angle data and resistivity.

3. The electrical impedance lung cancer detection method based on dual-channel neural network according to claim 1 is characterized in that: The preprocessing module of the dual-channel neural network is used to perform missing value processing, noise removal and standardization processing on the pre-collected data to obtain preprocessed data, including: Converting the pre-collected data into a matrix form to obtain a multi-frequency signal matrix; The missing values ​​in the multi-frequency signal matrix are processed according to a preset rule; the expression of the preset rule is: ij =max(x j ), where x ij is the element in the i-th row and j-th column of the multi-frequency signal matrix; x j are all observed data in the j-th column of the multi-frequency signal matrix; A Gaussian filter is used to remove high-frequency noise from the multi-frequency signal matrix after the missing value processing; the expression of the Gaussian filter is: Among them, z e is the e-th value in the multi-frequency signal matrix after filtering; u e+q is the e+qth value in the multi-frequency signal matrix before filtering; q is the index of the neighborhood range; n is half the size of the neighborhood window; θ is the scale parameter of the smoothing process; γ is the normalization factor; α is the control parameter of the Gaussian kernel; The multi-frequency signal matrix after filtering is normalized to obtain the pre-processed data; the expression of the normalization process is: in, is the pth value of the preprocessed data; v p is the pth value in the multi-frequency signal matrix after filtering; η is the mean of the sequence; λ is the standardized amplitude parameter; m is the total length of the sequence; β is the smoothing standard deviation coefficient; and k is the index in the summation process.

4. The electrical impedance lung cancer detection method based on dual-channel neural network according to claim 1 is characterized in that: The local feature modeling module of the dual-channel neural network is used to construct the preprocessed data into a graph structure based on frequency points, and the local information of the graph structure in the frequency domain is extracted using a message passing mechanism to obtain local features, including: Consider each frequency feature in the preprocessed data as a node to obtain a node set; Calculating the similarity between nodes in the node set to obtain an edge weight matrix; The neighborhood set of each node in the node set is determined according to the edge weight matrix; the determination criteria of the neighborhood set are: in, is the neighborhood set; p is a node in the neighborhood set; r kp is the weight between node k and node p; ζ is the threshold; Performing initial feature setting on each node in the node set according to the neighborhood set to obtain a frequency signal feature set; Using a message passing mechanism, weighted aggregation is performed on the neighbor information of each node in the frequency signal feature set to obtain aggregated information; Node features are calculated according to the aggregation information to obtain the local features.

5. The electrical impedance lung cancer detection method based on dual-channel neural network according to claim 1 is characterized in that: The calculation formula of the cross entropy loss is: Where E is the cross entropy loss; M is the number of samples; z a is the true label of the ath input sample; is the predicted probability of the ath input sample; p a is the penalty term for the a-th input sample.

6. The electrical impedance lung cancer detection method based on dual-channel neural network according to claim 4 is characterized in that: The global feature modeling module of the dual-channel neural network uses a multi-head attention mechanism to extract the deep correlation between the graph structures to obtain global features, including: Converting the frequency signal feature set into a matrix form to obtain a node feature matrix; According to the node feature matrix, the query P, key R, value S, and attention weight are calculated and feature extracted to obtain a single-head feature; the calculation formula for obtaining the single-head feature is: in, is the single-head feature; w is the attention weight matrix; x is the node feature matrix; All the single-head features are concatenated and linearly transformed to obtain the global features.

7. The electrical impedance lung cancer detection method based on dual-channel neural network according to claim 4 is characterized in that: The calculation formula for obtaining the edge weight matrix is: Among them, e ij is the similarity measure between node i and node j; z i is the characteristic vector of the i-th node; z j is the feature vector of the jth node; ∥z i -z j ∥ 2 2 is the square of the Euclidean distance between node i and node j; σ 2 To adjust the parameters.

8. The electrical impedance lung cancer detection method based on dual-channel neural network according to claim 4 is characterized in that: The formula for obtaining the aggregation information is: in, is the updated value of node d after the rth iteration; is the neighbor set of node d; is the representation of neighbor node t at the r-1th iteration; ζ dt is the attention weight of neighbor node t to node d; g dt is the correlation score between node d and node t; ρ is the regularization parameter; It represents the sum of all neighboring nodes s of node d; r is the number of iterations.

9. The electrical impedance lung cancer detection method based on dual-channel neural network according to claim 4 is characterized in that: The calculation expression of the local feature is: in, represents the u-th output value of the l-th layer; V (l) is the weight matrix of the lth layer; τ is the activation function; is the u-th bias term of the l-th layer; is the u-th noise term in the l-th layer.

10. The electrical impedance lung cancer detection method based on dual-channel neural network according to claim 6, characterized in that: The calculation formula for obtaining the global feature is: H" = c(y'1, y'2, ..., y' M )W O ; Wherein, H" is the global feature vector; c(·) represents the merging operation; y' M is the Mth local feature; W O is the weight matrix of the fully connected layer.

Citation Information

Patent Citations

  • Brain tumor segmentation method based on dual-channel three-dimensional dense connection network

    CN110458842B

Cited By

  • Cardiothoracic surgery risk early warning method and system based on artificial intelligence

    CN120473156A

  • A cardiothoracic surgery risk early warning method and system based on artificial intelligence

    CN120473156B