A thyroid nodule classification system based on ultrasonic radio frequency signals
By performing deep analysis and neural network processing on ultrasound radio frequency signals, the problems of information loss and low efficiency in traditional methods are solved, and high-precision, automated classification of thyroid nodules is achieved.
Patent Information
- Application Number
- CN202411913954.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Traditional two-dimensional grayscale images suffer from information loss when assessing thyroid nodules, and existing methods rely on doctors to manually extract features, which is inefficient and difficult to effectively handle noise interference and complex patterns in high-dimensional RF signals.
We directly perform deep analysis of ultrasound radiofrequency signals, extract features and classify them using a neural network model, including data acquisition, preprocessing, feature transformation, dynamic weight generation and processing of the self-attention layer, to construct a thyroid nodule classification system.
It improves the accuracy and reliability of thyroid nodule classification, reduces manual intervention, and realizes an efficient end-to-end classification process, adapting to the needs of different medical institutions and datasets.
Smart Images

Figure CN120046031B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of image processing and computer vision, and specifically to a thyroid nodule classification system based on ultrasound radio frequency signals. Background Technology
[0002] Thyroid nodules, a common and crucial thyroid disease, require accurate prognostic assessment for the development of scientifically sound clinical treatment plans. Traditionally, physicians have relied primarily on two-dimensional grayscale ultrasound images to evaluate the prognosis of thyroid nodules, but this method suffers from information loss.
[0003] Raw radio frequency (RF) signals, as the primary data source for ultrasound imaging, contain a wealth of tissue characteristics and pathological information. They include depth and time axis information. The depth axis reflects the depth to which the ultrasound beam penetrates the tissue, helping physicians understand the hierarchical structure of the target area; the time axis represents the time interval between the transmission and reception of the ultrasound beam. Processing this information allows for understanding the physical properties of the tissue. However, traditional two-dimensional grayscale images often lose a significant amount of detailed information from the RF signal during reconstruction, thus affecting the accuracy and reliability of diagnosis.
[0004] Direct in-depth analysis of RF signals holds promise for fundamentally avoiding information loss during image reconstruction and improving diagnostic accuracy. However, the high-dimensional complexity and noise interference of RF signals pose significant challenges to traditional signal analysis methods. In the past, RF signal processing often relied on manual feature extraction by physicians. This process required not only profound medical knowledge and extensive clinical experience but also a significant investment of time and effort in manually delineating regions of interest. This approach was not only inefficient but also ill-suited for handling massive datasets and complex pattern recognition demands.
[0005] With the rapid development of deep learning technology, automated feature learning and classification methods based on radio frequency (RF) signals have gradually emerged, bringing new breakthroughs to the prognosis of thyroid nodules. However, how to fully utilize the high-dimensional information in RF signals, effectively eliminate interference components in noise, and avoid manual intervention to improve the efficiency and accuracy of diagnosis remains a major technical challenge that urgently needs to be solved. Summary of the Invention
[0006] To address the inherent high-dimensional complexity and noise interference of ultrasound radio frequency signals, as well as the unavoidable information loss during image reconstruction, this invention proposes a thyroid nodule classification system based on ultrasound radio frequency signals. This system directly performs deep analysis of the original ultrasound radio frequency signals, effectively avoiding information loss that may be introduced during image reconstruction. It can accurately capture and analyze key information in the ultrasound radio frequency signals, achieving high-precision classification of thyroid nodules. This not only significantly improves the accuracy and reliability of classification but also greatly reduces the need for manual intervention, effectively solving the problem of low efficiency in manual processing in traditional methods.
[0007] This invention discloses a thyroid nodule classification system based on ultrasound radio frequency signals, comprising at least:
[0008] The data acquisition module is used to acquire ultrasound radiofrequency signal data of thyroid nodules, preprocess the ultrasound radiofrequency signals to form a one-to-one corresponding set of instances, and construct a labeled dataset based on the set of instances.
[0009] The model building module is used to build a neural network model for feature classification of thyroid nodules and to train the neural network model based on the dataset.
[0010] The neural network model includes at least:
[0011] The feature transformation layer is used to extract features from the instances in the instance set and add corresponding positional codes to form a first feature vector sequence;
[0012] A dynamic weight generation layer is used to calculate the weight parameter of each first feature vector in the first feature vector sequence, and to calculate the second feature vector through the weight parameter and the first feature vector corresponding to the weight parameter, so as to obtain the second feature vector sequence.
[0013] A self-attention layer is used to calculate the third feature vector sequence from the second feature vector sequence through a self-attention mechanism;
[0014] The classification probability fusion layer is used to calculate the classification probability that corresponds one-to-one with the third feature vector within the third feature vector sequence, and to fuse the classification probabilities to obtain the overall classification prediction result.
[0015] The classification module is used to classify thyroid nodules based on the trained neural network model and the input ultrasound radiofrequency signal data of the thyroid nodules.
[0016] In a preferred embodiment, the acquisition of ultrasound radiofrequency signal data from thyroid nodules specifically includes the following steps:
[0017] Step S101: Select a probe suitable for thyroid nodule examination;
[0018] Step S102: Locate the thyroid nodule in the ultrasound image using the probe, and acquire static ultrasound radiofrequency signal data of the thyroid nodule;
[0019] Step S103: Slowly move the probe from the position where the thyroid nodule does not appear to the position where the thyroid nodule has completely disappeared, and collect dynamic ultrasound radiofrequency signal data throughout the process.
[0020] In a preferred embodiment, the static ultrasound radiofrequency signal data includes static ultrasound radiofrequency signal data of standard transverse and standard longitudinal sections of a thyroid nodule;
[0021] The dynamic ultrasound radiofrequency signal data includes dynamic ultrasound radiofrequency signal data of standard transverse and standard longitudinal sections of thyroid nodules.
[0022] In a preferred embodiment, the preprocessing of the ultrasonic radio frequency signal data to form a one-to-one corresponding set of instances specifically includes the following steps:
[0023] Step S201: Convert the acquired ultrasonic radio frequency signal data into m×n matrix data, where m is the number of depth intervals and n is the number of ultrasonic radio frequency signal lines;
[0024] Step S202: The matrix data is augmented by one or more combinations of bandpass filtering, digital gain, envelope detection, or logarithmic compression to obtain the feature matrix;
[0025] Step S203: Sample from the feature matrix to form an instance set containing at least one instance, the instance set being represented as:
[0026] {I1,I2,…,I n}
[0027] Among them, I i This represents the i-th instance.
[0028] In a preferred embodiment, step S201 specifically includes the following steps:
[0029] Step S2011: Determine the number of depth intervals m based on the maximum depth and sampling interval on the depth axis of the ultrasonic radio frequency signal data;
[0030] Step S2012: Determine the number of ultrasonic radio frequency signal lines n based on the number of sampling points on the time axis of the ultrasonic radio frequency signal data;
[0031] Step S2013: Create an initial matrix with dimension m×n and initialize the elements within the initial matrix;
[0032] Step S2014: Extract the sampled values of each ultrasonic radio frequency signal line in the corresponding depth range, and fill the extracted sampled values into the corresponding positions of the initial matrix to obtain m×n matrix data. The extraction is achieved using the following calculation method:
[0033] RF(t,d)=S t,d
[0034] Where t is the time axis of the ultrasonic radio frequency signal data, d is the depth axis of the ultrasonic radio frequency signal data, and S t,d The sampled values of the ultrasonic radio frequency signal data at time t and depth d are given.
[0035] In a preferred embodiment, step S202 specifically includes the following steps:
[0036] Step S2021: The matrix data is subjected to bandpass filtering to obtain the first feature matrix. The bandpass filtering is implemented using the following calculation method:
[0037]
[0038] Among them, S t,d (f) represents the spectrum of the ultrasonic radio frequency signal data, and h(f)df is the frequency response of the bandpass filter;
[0039] Step S2022: Obtain the second feature matrix from the first feature matrix through digital gain. The digital gain is calculated using the following method:
[0040]
[0041] Where G is the gain factor;
[0042] Step S2023: Obtain the third feature matrix from the second feature matrix through envelope detection. The envelope detection is implemented using the following calculation method:
[0043]
[0044] in, For Hilbert transform;
[0045] Step S2024: The third feature matrix is logarithmically compressed to obtain the feature matrix. The logarithmic compression is implemented using the following calculation method:
[0046] S log (t,d)=log(1+α·|S env (t,d)|)
[0047] Where α is the logarithmic compression factor.
[0048] In a preferred embodiment, the feature transformation layer includes several convolutional neural network layers. These layers extract features from instances in the instance set and add corresponding positional codes to form the first feature vector sequence. Specifically, the following calculation method is used:
[0049] h i =W enc I i +PE i
[0050] H = [h1, h2, ..., h n ] T
[0051] Among them, I i W is the i-th instance in the set of instances; enc PE is the weight matrix of the convolutional neural network layer; i For the position encoding corresponding to the i-th instance; h i H is the i-th first feature vector in the first feature vector sequence; H is the first feature vector sequence.
[0052] In a preferred embodiment, the dynamic weight generation layer includes a multilayer perceptron connected to the output of the feature transformation layer, and a softmax normalization layer connected to the output of the multilayer perceptron. The multilayer perceptron is used to extract features of the first feature vector in the first feature vector sequence, and is implemented using the following calculation method:
[0053] a i =MLP(h i )
[0054] The softmax normalization layer is used to normalize the output a of the multilayer perceptron. i The value is transformed into a probability distribution, thereby obtaining the weight parameter of each first feature vector in the first feature vector sequence. This is achieved using the following calculation method:
[0055]
[0056] Among them, a i w is the output of the i-th first feature vector in the first feature vector sequence in the multilayer perceptron; i Let w be the weight parameter of the i-th first feature vector, and w i The following relationship must be satisfied:
[0057]
[0058] The second feature vector is calculated using the weight parameters and the first feature vector corresponding to the weight parameters, resulting in a second feature vector sequence. This is achieved using the following method:
[0059]
[0060] in, For the i-th second eigenvector, This is the second feature vector sequence.
[0061] In a preferred embodiment, the self-attention layer is configured by setting a trainable projection matrix W. Q W K and W V The query vector Q, key vector K, and value vector V are calculated separately using the following method:
[0062]
[0063] in, This is the second feature vector sequence.
[0064] The attention weights are calculated using the query vector Q and the key vector K. The third feature vector sequence is then calculated based on the attention weights and the value vector V, using the following specific calculation method:
[0065]
[0066] Z = {z1, z2, ..., z} n}
[0067] Among them, z i Z is the i-th third eigenvector of the third eigenvector sequence.
[0068] In a preferred embodiment, the classification probability fusion layer obtains the corresponding classification probability by passing each third feature vector in the third feature vector sequence through a classification head, and then obtains the overall classification prediction probability by weighted averaging of all classification probabilities, thereby obtaining the overall classification prediction result. Specifically, the following calculation method is used:
[0069]
[0070] Where σ is the classification function softmax, For predicting the overall classification probability, t i The weight parameters are used to train the i-th third feature vector.
[0071] The thyroid nodule classification system based on ultrasound radio frequency signals disclosed in this invention has the following advantages compared with the prior art:
[0072] (1) The thyroid nodule classification system disclosed in this invention includes a data acquisition module, a model building module, and a classification module. The data acquisition module is used to acquire ultrasound radio frequency signal data of thyroid nodules. The system directly uses ultrasound radio frequency (RF) signals as the data source, avoiding information loss in the traditional two-dimensional grayscale image reconstruction process. RF signals contain rich tissue characteristics and pathological information, which helps to classify thyroid nodules more accurately. The model building module is used to build a neural network model for feature classification of thyroid nodules and train the neural network model based on the dataset. Through the constructed neural network model, features are automatically extracted from the RF signals and classified, without the need for doctors to manually delineate regions of interest or perform feature extraction. This greatly improves the efficiency and accuracy of diagnosis, while reducing the requirements for doctors' professional knowledge and experience. The neural network model constructed by the model building module of this invention includes a feature transformation layer, a dynamic weight generation layer, a self-attention layer, and a classification probability fusion layer. The dynamic weight generation layer and the self-attention layer can dynamically adjust the weights of the feature vectors and focus on features that have a greater impact on the classification results. This helps to improve the model's ability to capture key information and further improve the accuracy of classification. The thyroid nodule classification system disclosed in this invention implements an end-to-end classification process, from data acquisition to feature classification. This not only simplifies the classification process but also makes the entire process more standardized and controllable, contributing to improved consistency and reliability of classification results. The system can be expanded and optimized according to actual needs to adapt to the requirements of different medical institutions and datasets.
[0073] (2) The data acquisition module of the thyroid nodule classification system based on ultrasound radio frequency signals disclosed in this invention locates thyroid nodules in ultrasound images using a probe and acquires static ultrasound radio frequency signal data of the thyroid nodules. This accurately captures the morphology, size, boundary, and other features of the nodules, providing strong support for subsequent analysis and classification. Slowly moving the probe from the position where the thyroid nodule is not present to the position where it completely disappears, acquiring dynamic ultrasound radio frequency signal data throughout the process, can comprehensively reflect the characteristics of the thyroid nodules at different positions and angles, helping the neural network model to more accurately assess the nature and extent of the nodules. By combining static and dynamic ultrasound radio frequency signal data, the neural network model can comprehensively evaluate and analyze thyroid nodules, improving the accuracy and reliability of classification.
[0074] (3) The data acquisition module disclosed in this invention preprocesses the ultrasound radio frequency signal data to form a one-to-one corresponding set of instances. The acquired ultrasound radio frequency signal data is converted into m×n matrix data. The first feature matrix is obtained through bandpass filtering. Bandpass filtering can effectively remove low-frequency and high-frequency noise in the ultrasound radio frequency signal data, retaining signals within a specific frequency range related to thyroid nodules, thereby improving signal quality and highlighting specific frequency components in the signal. These components are often related to specific pathological features of thyroid nodules, which helps in subsequent feature extraction and analysis. The first feature matrix is used to obtain the second feature matrix through digital gain. Digital gain can adjust the amplitude of the signal as needed, so that weak signals are enhanced, which is convenient for subsequent processing and analysis. The second feature matrix is used to obtain the third feature matrix through envelope detection. Envelope detection can extract the amplitude envelope of the signal, that is, the instantaneous amplitude change of the signal. This is crucial for analyzing the boundary, morphology and other features of thyroid nodules. Through envelope detection, complex ultrasound radio frequency signal data can be simplified into amplitude information that is easier to process, which is convenient for subsequent feature extraction and classification. The third feature matrix is logarithmically compressed to obtain the feature matrix. Logarithmic compression can compress the dynamic range of the signal into a smaller range, making signal changes smoother and easier to observe and analyze. It also enhances the contrast of weak parts of the signal, making detailed information clearer and improving diagnostic accuracy. Logarithmic compression is a non-linear processing method that better adapts to the non-linear characteristics of ultrasound radiofrequency signal data, improving processing effectiveness. Through a series of processing steps including bandpass filtering, digital gain, envelope detection, and logarithmic compression, the quality of ultrasound radiofrequency signal data can be significantly improved, providing strong support for subsequent feature extraction, classification, and diagnosis. Parameters throughout the processing flow (such as the frequency range of the bandpass filter, gain factor, and logarithmic compression coefficient) can be adjusted according to actual conditions to adapt to the ultrasound radiofrequency signal data of different patients, improving processing flexibility and adaptability.
[0075] (4) The dynamic weight generation layer disclosed in this invention includes a multilayer perceptron connected to the output of the feature transformation layer, and a softmax normalization layer connected to the output of the multilayer perceptron. The multilayer perceptron is used to extract features of the first feature vector in the first feature vector sequence. By further extracting and transforming the first feature vector through the multilayer perceptron (MLP), the complex relationships and nonlinear features between the first feature vectors can be learned. The softmax normalization layer is used to transform the output a of the multilayer perceptron. iThe model transforms the data into a probability distribution, thereby obtaining the weight parameters for each first feature vector in the first feature vector sequence. Weight parameters are dynamically assigned to each first feature vector, reflecting its importance within the overall sequence. This dynamic weighting mechanism allows the model to adjust the contribution of each first feature vector based on the specific content of the input data, thus improving the model's adaptability and expressive power. By introducing weight parameters, the model can more precisely capture key information and patterns in the sequence data. Attached Figure Description
[0076] Figure 1 This is an overall flowchart of an embodiment of a thyroid nodule classification system based on ultrasound radio frequency signals according to the present invention;
[0077] Figure 2 This is a schematic diagram of the preprocessing of ultrasound radio frequency signal data in an embodiment of a thyroid nodule classification system based on ultrasound radio frequency signals according to the present invention.
[0078] Figure 3 This is a flowchart of the dynamic weight generation layer of an embodiment of a thyroid nodule classification system based on ultrasound radio frequency signals according to the present invention.
[0079] Figure 4 This is a visualization of ultrasound radio frequency signal data after preprocessing, representing an embodiment of a thyroid nodule classification system based on ultrasound radio frequency signals according to the present invention. Detailed Implementation
[0080] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0081] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0082] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The term "or / and" as used herein includes any and all combinations of one or more of the associated listed items.
[0083] Furthermore, in this invention, the use of terms such as "first" and "second" is for descriptive purposes only and does not specifically refer to any order or sequence, nor is it intended to limit the invention. They are merely used to distinguish components or operations described using the same technical terms, and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but only if they are feasible for those skilled in the art. If a combination of technical solutions is contradictory or impossible to implement, such a combination should be considered nonexistent and not within the scope of protection claimed by this invention.
[0084] This embodiment of a thyroid nodule classification system based on ultrasound radio frequency signals includes at least a data acquisition module, a model building module, and a classification module.
[0085] Data acquisition module, such as Figure 1 As shown, the system acquires ultrasound radiofrequency signal data of thyroid nodules, preprocesses the ultrasound radiofrequency signals to form a one-to-one corresponding set of instances, and constructs a labeled dataset based on the instance sets. The system directly uses ultrasound radiofrequency (RF) signals as the data source, avoiding information loss in the traditional two-dimensional grayscale image reconstruction process. RF signals contain rich tissue characteristics and pathological information, which helps to more accurately classify thyroid nodules.
[0086] In this embodiment, the acquisition of ultrasound radiofrequency signal data of thyroid nodules specifically includes the following steps:
[0087] Step S101: Selecting a probe suitable for thyroid nodule examination can ensure that the acquired ultrasound radiofrequency signal data is more professional and targeted, and helps to more accurately reflect the pathological characteristics of thyroid nodules.
[0088] Step S102: Locate the thyroid nodule in the ultrasound image using the probe, and collect static ultrasound radiofrequency signal data of the thyroid nodule. Collecting static ultrasound radiofrequency signal data of the thyroid nodule can accurately capture the morphology, size, boundary and other features of the nodule, providing strong support for subsequent analysis and classification.
[0089] Step S103 involves slowly moving the probe from the location where the thyroid nodule is not visible to the location where it has completely disappeared, acquiring dynamic ultrasound radiofrequency signal data throughout the process. This comprehensively reflects the characteristics of the thyroid nodule at different locations and angles, helping the neural network model to more accurately assess the nature and extent of the nodule. By combining static and dynamic ultrasound radiofrequency signal data, the neural network model can perform a comprehensive assessment and analysis of thyroid nodules, improving the accuracy and reliability of classification.
[0090] In one embodiment of this invention, the static ultrasound radiofrequency signal data includes static ultrasound radiofrequency signal data from standard transverse and standard longitudinal sections of the thyroid nodule. The static ultrasound radiofrequency signal data from the standard transverse and standard longitudinal sections comprehensively assess the morphological characteristics of the thyroid nodule, such as its size, shape, whether its edges are smooth, and whether its internal echoes are homogeneous. This information is of significant value for subsequent classification of thyroid nodules. The dynamic ultrasound radiofrequency signal data includes dynamic ultrasound radiofrequency signal data from standard transverse and standard longitudinal sections of the thyroid nodule. The dynamic ultrasound radiofrequency signal data contains information on the changes in the thyroid nodule under different conditions. By comparing static and dynamic data, the system can gain a more comprehensive understanding of the characteristics and changes of the thyroid nodule, thereby improving the accuracy of classification.
[0091] In this embodiment, the ultrasonic radio frequency signal data is preprocessed to form a one-to-one corresponding set of instances, specifically including the following steps:
[0092] Step S201: Convert the acquired ultrasound radio frequency signal data into m×n matrix data, where m is the number of depth intervals and n is the number of ultrasound radio frequency signal lines;
[0093] It should be noted that, based on the settings of the external ultrasound acquisition equipment, the maximum depth and sampling depth of the ultrasound radiofrequency signal are determined by dividing the maximum depth into m equally spaced depth intervals. The number of ultrasound radiofrequency signal lines, n, is determined by the number of probe scans or the number of sampling points on the time axis suitable for thyroid nodule examination.
[0094] In this embodiment, step S201 specifically includes the following steps:
[0095] Step S2011: Determine the number of depth intervals m based on the maximum depth and sampling interval on the depth axis of the ultrasonic radio frequency signal data;
[0096] Step S2012: Determine the number of ultrasonic radio frequency signal lines n based on the number of sampling points on the time axis of the ultrasonic radio frequency signal data;
[0097] Step S2013: Create an initial matrix of dimension m×n and initialize the elements within the initial matrix;
[0098] Step S2014: Extract the sampled values of each ultrasonic radio frequency signal line in the corresponding depth range, and fill the extracted sampled values into the corresponding positions of the initial matrix to obtain m×n matrix data. The extraction is achieved using the following calculation method:
[0099] RF(t,d)=S t,d
[0100] Where t is the time axis of the ultrasonic radio frequency signal data, d is the depth axis of the ultrasonic radio frequency signal data, and S t,d The sampled values of the ultrasonic radio frequency signal data at time t and depth d are given.
[0101] Step S202: The matrix data is augmented by one or more combinations of bandpass filtering, digital gain, envelope detection, or logarithmic compression to obtain the feature matrix;
[0102] It should be noted that a series of processing steps, including bandpass filtering, digital gain, envelope detection, and logarithmic compression, can significantly improve the quality of ultrasound radiofrequency signal data, providing strong support for subsequent feature extraction, classification, and diagnosis. Parameters throughout the processing flow (such as the frequency range of the bandpass filter, gain factor, and logarithmic compression coefficient) can be adjusted according to actual conditions to adapt to the ultrasound radiofrequency signal data of different patients, improving the flexibility and adaptability of the processing. In this embodiment, step S202, as... Figure 2 As shown, the specific steps include the following:
[0103] Step S2021: Obtain the first feature matrix by passing the matrix data through bandpass filtering. The bandpass filtering is implemented using the following calculation method:
[0104]
[0105] Among them, S t,d (f) represents the spectrum of the ultrasonic radio frequency signal data, and h(f)df is the frequency response of the bandpass filter;
[0106] By using bandpass filtering, low-frequency and high-frequency noise in ultrasound radiofrequency signal data can be effectively removed, while retaining signals within a specific frequency range associated with thyroid nodules. This improves signal quality and highlights specific frequency components in the signal, which are often related to specific pathological features of thyroid nodules, thus aiding in subsequent feature extraction and analysis.
[0107] Step S2022: Obtain the second feature matrix from the first feature matrix through digital gain. The digital gain is calculated using the following method:
[0108]
[0109] Where G is the gain factor;
[0110] Digital gain can be used to adjust the amplitude of a signal as needed, thereby enhancing weak signals, balancing amplitude differences between different signal sources, or meeting specific output requirements, which facilitates subsequent processing and analysis.
[0111] Step S2023: Obtain the third feature matrix from the second feature matrix through envelope detection. The envelope detection is implemented using the following calculation method:
[0112]
[0113] in, For Hilbert transform;
[0114] Envelope detection can extract the amplitude envelope of a signal, that is, the instantaneous amplitude change of the signal. This is crucial for analyzing the boundary, morphology and other features of thyroid nodules. Through envelope detection, complex ultrasound radiofrequency signal data can be simplified into amplitude information that is easier to process, which facilitates subsequent feature extraction and classification.
[0115] Step S2024: The third feature matrix is logarithmically compressed to obtain the feature matrix. The logarithmic compression is implemented using the following calculation method:
[0116] S log (t,d)=log(1+α·|S env (t,d)|)
[0117] Where α is the logarithmic compression factor.
[0118] Logarithmic compression can compress the dynamic range of a signal into a smaller range, making signal changes smoother and easier to observe and analyze. It can also enhance the contrast of weak components in the signal, making details clearer and improving diagnostic accuracy. As a non-linear processing method, logarithmic compression is better suited to the non-linear characteristics of ultrasound radiofrequency signal data, improving processing effectiveness. Figure 4 As shown, the original ultrasound radio frequency signal data is bandpass filtered to remove noise, then digital gain adjustment is applied to enhance the signal amplitude, envelope detection is performed to extract the envelope information of the signal, and finally logarithmic compression is applied to obtain the feature matrix. The result of visualizing the feature matrix is shown.
[0119] Step S203: Sample from the feature matrix to form an instance set containing at least one instance, the instance set being represented as:
[0120] {I1,I2,…,I n}
[0121] Among them, I iThis represents the i-th instance.
[0122] In this embodiment, the sampling sliding window method samples at least one instance from the feature matrix, specifically implemented using the following method:
[0123] Define a window based on the number of rows and columns of the instance;
[0124] Start the window from the top left corner of the matrix and slide it across the feature matrix with a specified step size;
[0125] Each time you swipe, extract the element within the window as an instance;
[0126] Repeat the above process until the window slides across the entire feature matrix.
[0127] In this embodiment, each instance contains ultrasonic radio frequency (RF) signal information within a certain depth range. Several instances form an instance set, and a corresponding label is added to each instance set. Several labeled instance sets form a labeled dataset. Preferably, the dataset is divided into a training set and a validation set, with a ratio of 4:1.
[0128] The model building module is used to construct a neural network model for feature classification of thyroid nodules and to train the neural network model based on the dataset; the neural network model includes at least:
[0129] The feature transformation layer is used to extract features from instances in the instance set and add corresponding positional encodings to form the first feature vector sequence;
[0130] The dynamic weight generation layer is used to calculate the weight parameter of each first feature vector in the first feature vector sequence, and to calculate the second feature vector through the weight parameter and the first feature vector corresponding to the weight parameter, so as to obtain the second feature vector sequence.
[0131] The self-attention layer is used to calculate the third feature vector sequence from the second feature vector sequence through a self-attention mechanism.
[0132] The classification probability fusion layer is used to calculate the classification probability corresponding to the third feature vector in the sequence of third feature vectors, and fuse the classification probabilities to obtain the overall classification prediction result.
[0133] The dynamic weight generation layer and self-attention layer can dynamically adjust the weights of the feature vectors and focus on features that have a significant impact on the classification results. This helps improve the model's ability to capture key information and further enhances classification accuracy. The constructed neural network model automatically extracts features from RF signals and performs classification, eliminating the need for doctors to manually delineate regions of interest or perform feature extraction. This significantly improves the efficiency and accuracy of diagnosis while reducing the demands on doctors' professional knowledge and experience.
[0134] In this embodiment, as Figure 3 As shown, the feature transformation layer includes several convolutional neural network layers. These layers extract features from instances in the instance set and add corresponding positional encodings to form the first feature vector sequence. The specific calculation method is as follows:
[0135] h i =W enc I i +PE i
[0136] H = [h1, h2, ..., h n ] T
[0137] Among them, I i W is the i-th instance in the instance set; enc PE is the weight matrix of a convolutional neural network layer. i The position encoding corresponding to the i-th instance; h i Let be the i-th first feature vector in the first feature vector sequence; H is the first feature vector sequence. Through the feature transformation layer, more useful and higher-level feature representations are extracted from the original feature matrix, and by adding positional encoding, the sensitivity of the constructed neural network model to position is enhanced, enabling it to learn the relative positions between different instances and improving the model's expressive and generalization abilities.
[0138] In this embodiment, the dynamic weight generation layer includes a multilayer perceptron connected to the output of the feature transformation layer, and a softmax normalization layer connected to the output of the multilayer perceptron. The multilayer perceptron is used to extract features of the first feature vector in the first feature vector sequence. By further extracting and transforming the first feature vector through the multilayer perceptron (MLP), the complex relationships and nonlinear features between the first feature vectors can be learned. The following calculation method is used to achieve this:
[0139] a i =MLP(h i )
[0140] The softmax normalization layer is used to normalize the output a of the multilayer perceptron. iThe sequence is transformed into a probability distribution to obtain the weight parameters of each first feature vector in the first feature vector sequence. Weight parameters are dynamically assigned to each first feature vector, reflecting the importance of each first feature vector in the overall sequence. This is achieved using the following calculation method:
[0141]
[0142] Among them, a i w is the output of the i-th first feature vector in the first feature vector sequence in the multilayer perceptron; i Let w be the weight parameter of the i-th first feature vector, and w i The following relationship must be satisfied:
[0143]
[0144] The second feature vector is calculated using the weight parameters and the first feature vector corresponding to the weight parameters, resulting in a sequence of second feature vectors. This is achieved using the following method:
[0145]
[0146] in, For the i-th second eigenvector, This is the sequence of second feature vectors. The dynamic weighting mechanism allows the model to adjust the contribution of each first feature vector according to the specific content of the input data, thereby improving the model's adaptability and expressiveness to the data. By introducing weight parameters, the model can capture key information and patterns in the sequence data more precisely.
[0147] In this embodiment, the self-attention layer is configured with a trainable projection matrix W. Q W K and W V The query vector Q, key vector K, and value vector V are calculated separately using the following method:
[0148]
[0149] in, The second feature vector sequence is obtained by calculating the attention weights using the query vector Q and the key vector K. The third feature vector sequence is then calculated based on the attention weights and the value vector V, using the following specific calculation method:
[0150]
[0151] Z = {z1, z2, ..., z} n}
[0152] Among them, z iLet Z be the i-th third eigenvector of the third eigenvector sequence. An attention mechanism is used to capture the global and local features of the RF signal matrix.
[0153] In this embodiment, the classification probability fusion layer obtains the corresponding classification probability by passing each third feature vector in the third feature vector sequence through a classification head, and then uses a weighted average method to obtain the overall classification prediction probability, thereby obtaining the overall classification prediction result. The specific calculation method is as follows:
[0154]
[0155] Where σ is the classification function softmax, For predicting the overall classification probability, t i The weight parameters are used to train the i-th third feature vector.
[0156] In this embodiment, the cross-entropy loss function is used as the objective function to train and optimize the neural network model. This function evaluates the model's predictive performance based on the true label values. During training, the hyperparameters of the network are continuously adjusted using training set data to improve classification accuracy and performance. Simultaneously, a validation set is introduced to verify the model's generalization ability and further optimize the model parameters. During the validation phase, the cross-entropy loss function is also used to evaluate the model's performance on unseen data, and the parameters are iterated and adjusted accordingly to achieve better classification performance.
[0157] The classification module, based on a trained neural network model, performs feature classification on thyroid nodules using input ultrasound radiofrequency signal data. The thyroid nodule classification system established in the embodiment of this invention implements an end-to-end classification process, from data acquisition to feature classification. This not only simplifies the classification process but also makes the entire process more standardized and controllable, contributing to improved consistency and reliability of classification results. The system can be expanded and optimized according to actual needs to adapt to the requirements of different medical institutions and datasets.
[0158] In summary, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An ultrasound radio frequency signal based thyroid nodule classification system, characterized in that, At least comprising: A data acquisition module for acquiring thyroid nodule ultrasonic radio frequency signal data, pre-processing the ultrasonic radio frequency signal to form a one-to-one corresponding instance set, and constructing a labeled data set based on the instance set; the pre-processing of the ultrasonic radio frequency signal data to form a one-to-one corresponding instance set specifically includes the following steps: Step S201, converting the acquired ultrasonic radio frequency signal data into m*n matrix data, where m is the number of depth intervals, and n is the number of ultrasonic radio frequency signal lines; Step S202, performing data enhancement on the matrix data through one or more combinations of band-pass filtering, digital gain, envelope detection or logarithmic compression to obtain a feature matrix; Step S203, sampling from the feature matrix to form an instance set containing at least one instance, the instance set is represented as: ; wherein denotes the i-th instance; A model construction module for constructing a neural network model for feature classification of thyroid nodules, and training the neural network model based on the data set; The neural network model at least includes: A feature conversion layer for feature extraction of instances in the instance set and adding corresponding position encoding to form a first feature vector sequence; A dynamic weight generation layer for calculating the weight parameter of each first feature vector in the first feature vector sequence, and calculating a second feature vector through the weight parameter and the first feature vector corresponding to the weight parameter to obtain a second feature vector sequence; A self-attention layer for calculating a third feature vector sequence through a self-attention mechanism on the second feature vector sequence; A classification probability fusion layer for calculating the classification probability corresponding to each third feature vector in the third feature vector sequence, and fusing the classification probability to obtain an overall classification prediction result; A classification module for feature classification of thyroid nodules based on the trained neural network model through input of the ultrasonic radio frequency signal data of the thyroid nodule.
2. The thyroid nodule classification system based on ultrasonic radiofrequency signals according to claim 1, characterized in that, The acquisition of the ultrasonic radio frequency signal data of the thyroid nodule specifically includes the following steps: Step S101, selecting a probe suitable for thyroid nodule examination; Step S102, positioning the thyroid nodule in the ultrasonic image through the probe to acquire static ultrasonic radio frequency signal data of the thyroid nodule; Step S103, slowly moving the probe from a position where the thyroid nodule does not appear to a position where the thyroid nodule completely disappears to acquire dynamic ultrasonic radio frequency signal data during the entire process.
3. An ultrasonic radio frequency signal-based thyroid nodule classification system according to claim 2, characterized in that: The static ultrasonic radio frequency signal data includes static ultrasonic radio frequency signal data of the standard transverse section and the standard longitudinal section of the thyroid nodule; The dynamic ultrasonic radio frequency signal data includes dynamic ultrasonic radio frequency signal data of the standard transverse section and the standard longitudinal section of the thyroid nodule.
4. The ultrasound radio frequency signal based thyroid nodule classification system according to any one of claims 1-3, characterized in that, The step S201 specifically includes the following steps: Step S2011, determining the number of depth intervals m based on the maximum depth on the depth axis of the ultrasonic radio frequency signal data and the sampling interval; Step S2012, determining the number n of the ultrasonic radio frequency signal lines based on the number of sampling points on the time axis of the ultrasonic radio frequency signal data; Step S2013, creating an initial matrix with a dimension of mxn, and setting the initial elements in the initial matrix; Step S2014, extracting the sampling values of each ultrasonic radio frequency signal line in the corresponding depth interval, and filling the extracted sampling values into the corresponding positions of the initial matrix to obtain mxn matrix data, and the extraction is realized by using the following calculation method: ; where t is a time axis of the ultrasound radio frequency signal data, d is a depth axis of the ultrasound radio frequency signal data, is a sample value of the ultrasound radio frequency signal data at time t and depth d.
5. The thyroid nodule classification system based on ultrasonic radiofrequency signals according to claim 4, wherein, The step S202 specifically includes the following steps: Step S2021, obtaining a first feature matrix by band-pass filtering the matrix data, and the band-pass filtering is realized by using the following calculation method: ; wherein is a spectrum of the ultrasonic radio frequency signal data, is a frequency response of the band pass filter; Step S2022, obtaining a second feature matrix by digital gain on the first feature matrix, and the digital gain is realized by using the following calculation method: ; Wherein, G is the gain factor; Step S2023, obtaining a third feature matrix by envelope detection on the second feature matrix, and the envelope detection is realized by using the following calculation method: ; wherein is the Hilbert transform; Step S2024, obtaining the feature matrix by logarithmic compression on the third feature matrix, and the logarithmic compression is realized by using the following calculation method: ; wherein is the logarithmic compression factor.
6. A thyroid nodule classification system based on radiofrequency signals of ultrasound according to any of claims 1-3 or 5, characterized in that: The feature conversion layer includes a plurality of convolutional neural network layers, which are used to extract features of instances in the instance set and add corresponding position encodings to form the first feature vector sequence, and the calculation method is as follows: ; ; wherein, is the i-th instance in the instance set; is a weight matrix of the convolutional neural network layer; is a position encoding corresponding to the i-th instance; is the i-th first feature vector in the first feature vector sequence; is the first feature vector sequence.
7. The thyroid nodule classification system based on ultrasonic radiofrequency signals according to claim 6, characterized in that: The dynamic weight generation layer includes a multi-layer perceptron connected to the output end of the feature conversion layer, and a softmax normalization layer connected to the output end of the multi-layer perceptron, and the multi-layer perceptron is used to extract the features of the first feature vectors in the first feature vector sequence, and the calculation method is as follows: ; The softmax normalization layer is configured to transform an output of the multi-layer perceptron into a probability distribution, thereby obtaining a weight parameter for each first feature vector in the sequence of first feature vectors, using a calculation method as follows: ; wherein, is the output of the multi-layer perceptron for the i-th first feature vector in the sequence of first feature vectors; is a weight parameter for the i-th first feature vector, and the satisfies the following relation: ; The second feature vector sequence is calculated by the weight parameters and the first feature vectors corresponding to the weight parameters, and the calculation method is as follows: ; ; wherein, is the i-th second feature vector, is a sequence of second feature vectors.
8. The thyroid nodule classification system based on ultrasonic radiofrequency signals according to claim 7, characterized in that: The self-attention layer calculates a query vector Q, a key vector K and a value vector V by setting trainable projection matrices W Q , K and W V , respectively, using the following calculation method: ; wherein is a second sequence of feature vectors, The attention weight is calculated by the query vector Q and the key vector K, and the third feature vector sequence is calculated based on the attention weight and the value vector V, and the calculation method is as follows: ; ; wherein is the i-th third feature vector of the third sequence of feature vectors, and Z is the third sequence of feature vectors.
9. The thyroid nodule classification system based on ultrasonic radiofrequency signals according to claim 8, characterized in that: The classification probability fusion layer obtains the corresponding classification probability by passing each third feature vector in the third feature vector sequence through a classification head, and obtains the overall classification prediction probability by weighted average method, so as to obtain the overall classification prediction result, and the calculation method is as follows: ; wherein, is a classification function softmax, is an overall classification prediction probability, is a trainable weight parameter of the i-th third feature vector.
Citation Information
Patent Citations
Neural network model and ultrasonic beam forming method based on neural network model
CN110874828A
Breast tumor screening method and device based on broadband ultrasonic echo characteristics
CN115227293A