A pulmonary artery inner diameter detection method, system, electronic device and storage medium

By combining the federated learning system with the encryption algorithm and collaboratively training the U-Net network structure, the low detection accuracy and privacy issues caused by the dispersion of medical imaging data are solved, and high-precision pulmonary artery diameter detection and privacy protection are achieved.

CN116740353BActive Publication Date: 2025-10-21BEIJING INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310700592.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-13
Publication Date
2025-10-21
Estimated Expiration
2043-06-13

AI Technical Summary

Technical Problem

In existing technologies, the dispersed distribution of medical imaging data samples leads to low accuracy in pulmonary artery diameter detection and poses privacy risks, especially in federated learning applications where privacy leakage is a prominent issue.

Method used

A federated learning system is adopted, which uses a key generation center and a central cloud server to collaborate with multiple clients to train the U-Net network structure, protects data privacy through encryption algorithms, and generates key vectors and ciphertext during the training process to ensure data security and accuracy.

Benefits of technology

It improves the accuracy of pulmonary artery diameter detection, protects the privacy of medical imaging data, avoids the risk of data leakage, and improves model training effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116740353B_ABST
    Figure CN116740353B_ABST
Patent Text Reader

Abstract

The application discloses a pulmonary artery inner diameter detection method and system, an electronic device and a storage medium, and relates to the technical field of semantic segmentation. The method is implemented based on a federal learning system. The federal learning system comprises a key generation center, a central cloud server and a client set. The key generation center and the client set are connected with the central cloud server, and the key generation center is connected with the client set. The client set comprises N clients. For any client, the pulmonary artery inner diameter detection method comprises the following steps: acquiring a target image; the target image is a CT image of a lung to be detected; inputting the target image into a pulmonary artery recognition model to obtain a target pulmonary artery image; the pulmonary artery recognition model is determined based on a U-Net network structure and a training data set by using the federal learning system; and determining the inner diameter of the pulmonary artery in the target image according to the target pulmonary artery image. The application improves the detection accuracy of the pulmonary artery inner diameter and the privacy of medical image data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of semantic segmentation technology, and in particular to a pulmonary artery inner diameter detection method, system, electronic equipment and storage medium. Background Art

[0002] Clinically, the normal internal diameter of the pulmonary artery is generally considered to be between 1.2 cm and 2.9 cm. A diameter greater than 2.9 cm is considered enlarged, a morphological abnormality in patients with pulmonary hypertension. Accurate segmentation of the pulmonary artery from medical imaging data files relies on the expertise of experienced physicians specializing in pulmonary artery segmentation, but manual segmentation is generally inefficient. Therefore, it is necessary to introduce relevant technologies to the field of pulmonary artery medical image segmentation to improve overall pulmonary artery segmentation efficiency. In recent years, fields such as machine learning and deep learning have developed rapidly, and a variety of semantic segmentation models have been proposed. Among them, the U-Net model and its subsequent improvements have been widely used in medical imaging, including in pulmonary artery imaging. For example, H. Suzuki et al. proposed using U-Net to segment the aorta and pulmonary artery in non-contrast CT images of chronic thromboembolic pulmonary hypertension. Liu Zhenhong et al. improved the Res U-Net model, enhancing its information flow efficiency and convergence speed. They then applied it to pulmonary artery segmentation, improving segmentation accuracy. While numerous studies have demonstrated the feasibility of semantic segmentation models for medical imaging, their performance in practice is closely related to the number of samples used during training. While many hospitals maintain independent medical imaging databases, the number of data samples varies. Some hospital databases have relatively few samples, making it difficult to train a sufficiently high-performing semantic segmentation model locally using the data in those databases. This can be attributed to the relatively dispersed distribution of medical imaging data. Furthermore, medical imaging data contains a large amount of personal patient data. Centralizing this data across hospitals could potentially compromise patient privacy. Therefore, while protecting patient privacy, it is crucial to consider how to leverage dispersed medical imaging data to improve model training.

[0003] The aforementioned problem can be compared to the data silo problem, and federated learning technology can effectively address this issue. In 2016, McMahan et al. at Google proposed the concept of federated learning. The basic idea is to train a model using local data from each client, coordinated by a central server. The central server then coordinates and updates the model parameters for each client. This concept aims to address the data silo problem, fully utilizing distributed data without the need for data integration, and reducing the risk of local data leakage. Due to the excellent performance of federated learning in addressing data silos, some researchers have also combined it with medical imaging. For example, Yang Xian combined federated learning technology with 3D convolutional networks and used the combined model to analyze lung CT scans. Shen Yiqing et al. proposed a new conditional generative adversarial network (GAN) and combined it with a federated learning framework. The combined model was applied to the staining of histopathology images, significantly improving the staining accuracy. However, existing research has shown that federated learning frameworks also have privacy risks. First, the exchange of intermediate parameters can lead to privacy leaks, potentially revealing some of the original data or information sources. Second, the authenticity of each participant's conditions is difficult to verify, and an attack by an unreliable participant can easily lead to privacy leaks. Therefore, privacy protection issues in federated learning require special attention, especially in its application to medical imaging.

[0004] Currently, a variety of technologies have been developed to address privacy protection issues. Mainstream technologies include homomorphic encryption, secret sharing, perturbation techniques, and secure multi-party computation, and these technologies have been successfully integrated with federated learning. For example, Arachchige et al. proposed combining local differential privacy with federated learning, while Aono et al. combined additive homomorphic encryption with client-server federated learning. While these technologies maintain high privacy protection, they each present their own challenges. For example, perturbation-based federated learning methods often reduce data utility.

[0005] In summary, the current pulmonary artery diameter detection method has problems such as poor training effect due to the dispersed distribution of medical imaging data samples, which further leads to low pulmonary artery diameter detection accuracy, and poor privacy of medical imaging data. Summary of the Invention

[0006] The purpose of the present invention is to provide a pulmonary artery inner diameter detection method, system, electronic equipment and storage medium, which improve the detection accuracy of the pulmonary artery inner diameter and the privacy of medical imaging data.

[0007] To achieve the above object, the present invention provides the following solutions:

[0008] A method for detecting the inner diameter of a pulmonary artery is implemented based on a federated learning system; the federated learning system comprises: a key generation center, a central cloud server, and a client set; the key generation center and the client set are both connected to the central cloud server, and the key generation center is connected to the client set; the client set comprises N clients, where N>1;

[0009] For any of the clients, the method for detecting the inner diameter of the pulmonary artery includes:

[0010] Acquire a target image; the target image is a CT image of the lung to be detected;

[0011] Inputting the target image into the pulmonary artery recognition model to obtain a target pulmonary artery image; the pulmonary artery recognition model is determined using the federated learning system based on a U-Net network structure and a training data set; the training data set includes multiple training lung CT images with pulmonary artery labels;

[0012] An inner diameter of the pulmonary artery in the target image is determined according to the target pulmonary artery image.

[0013] Optionally, the federated learning system trains the U-Net network structure to obtain the pulmonary artery recognition model, specifically including:

[0014] When the loss function value of the t-1th training is greater than a preset threshold: the central cloud server is used to:

[0015] Obtaining the training data set, and sending the training data set to each of the clients;

[0016] Receive the gradient vectors of the t-th training of all the clients, the key vectors of the t-th training generated by the key generation center using the key generation algorithm, and the ciphertexts of the t-th training of all the clients; the gradient vectors of the t-th training of each client are determined after each client performs the t-th training on the U-Net network structure after the t-1-th training using the training data set; the ciphertext of the t-th training of each client is obtained by each client using the encryption algorithm based on the gradient vectors of the t-th training of the corresponding client and the t-th training key vector; wherein, when t=1, the U-Net network structure after the t-1-th training is the initial U-Net network structure;

[0017] Determine a global ciphertext for the tth training based on the gradient vectors for the tth training of all the clients, the key vectors for the tth training generated by the key generation center using the key generation algorithm, and the ciphertexts for the tth training of all the clients, and send the global ciphertext for the tth training to each of the clients;

[0018] After receiving the global ciphertext of the t-th training, each of the clients is used to:

[0019] Using the decryption algorithm, based on the key vector of the t-th training, decrypt the global ciphertext of the t-th training to obtain the decrypted global gradient of the t-th training;

[0020] Calculating the loss function value of the U-Net network structure after the t-th training based on the training data set, and determining whether the loss function value of the U-Net network structure after the t-th training is greater than the preset threshold;

[0021] If so, perform the t+1th training on the U-Net network structure after the tth training based on the decrypted global gradient of the tth training and the training data set, determine the gradient vector of the t+1th training, use the encryption algorithm to determine the ciphertext of the t+1th training based on the gradient vector of the t+1th training and the key vector of the t+1th training, update t to t+1, and return "receive the gradient vectors of the tth training of all the clients, the key vector of the tth training generated by the key generation center using the key generation algorithm, and the ciphertext of the tth training of all the clients";

[0022] If not, the U-Net network structure after the t-th training is determined as the pulmonary artery recognition model.

[0023] Optionally, determining a global ciphertext for the tth training based on the gradient vectors for the tth training of all the clients, the key vector for the tth training generated by the key generation center using the key generation algorithm, and the ciphertexts for the tth training of all the clients specifically includes:

[0024] Determine, using a decryption algorithm, a global gradient of the tth training based on the key vector of the tth training and the ciphertext of the tth training of all the clients;

[0025] The global gradient of the t-th training is encrypted based on the key vector of the t-th training using an encryption algorithm to obtain the global ciphertext of the t-th training.

[0026] Optionally, using a decryption algorithm, based on the key vector of the t-th training and the ciphertext of the t-th training of all the clients, determining the global gradient of the t-th training specifically includes:

[0027] Decrypting the ciphertext of the t-th training of each client using a decryption algorithm based on the key vector of the t-th training, and obtaining the decrypted gradient of the t-th training of each client;

[0028] Determine a global gradient for the tth training based on the decrypted gradients for the tth training of all the clients.

[0029] Optionally, using an encryption algorithm, determining the ciphertext of the t+1th training based on the gradient vector of the t+1th training and the key vector of the t+1th training, specifically includes:

[0030] Obtaining the key vector generated by the key generation center for the t+1th training;

[0031] Generate a reorganization matrix for the t+1th training based on the dimension of the key vector for the t+1th training;

[0032] Generate a random matrix for the t+1th training and a noise matrix for the t+1th training using an encryption algorithm;

[0033] The gradient vector of the t+1th training is encrypted based on the reorganization matrix of the t+1th training, the random matrix of the t+1th training, and the noise matrix of the t+1th training to obtain the ciphertext of the t+1th training.

[0034] A pulmonary artery inner diameter detection system, comprising:

[0035] A target image acquisition module is used to acquire a target image; the target image is a CT image of the lung to be detected;

[0036] An identification module is configured to input the target image into the pulmonary artery identification model to obtain a target pulmonary artery image; the pulmonary artery identification model is determined using a federated learning system based on a U-Net network structure and a training data set; the training data set includes multiple training lung CT images with pulmonary artery labels; the federated learning system includes: a key generation center, a central cloud server, and a client set; the key generation center and the client set are both connected to the central cloud server, and the key generation center is connected to the client set; the client set includes N clients, where N>1;

[0037] The inner diameter determination module is used to determine the inner diameter of the pulmonary artery in the target image based on the target pulmonary artery image.

[0038] An electronic device, comprising:

[0039] one or more processors;

[0040] a storage device having one or more programs stored thereon;

[0041] When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the above-described method.

[0042] A storage medium stores a computer program thereon, wherein the computer program implements the method described above when executed by a processor.

[0043] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0044] The present invention discloses a method, system, electronic device and storage medium for detecting the inner diameter of the pulmonary artery. A CT image of a lung to be detected is input into a pulmonary artery recognition model to obtain a target pulmonary artery image, thereby determining the inner diameter of the pulmonary artery. The pulmonary artery recognition model is determined using a federated learning system based on a U-Net network structure and a training data set. Compared with the traditional single training subject, the federated learning system is used to jointly implement the training of the U-Net network structure, thereby improving the detection accuracy of the pulmonary artery recognition model and thus improving the detection accuracy of the inner diameter of the pulmonary artery. During the data transmission process during the training of the federated learning system, encryption is performed using a key generated by a key generation center, thereby improving the privacy of medical imaging data. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0046] Figure 1 A schematic flow chart of a method for detecting the inner diameter of a pulmonary artery provided in Example 1 of the present invention;

[0047] Figure 2 Schematic diagram of the process of using the federated learning system to detect the inner diameter of the pulmonary artery. DETAILED DESCRIPTION

[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0049] The purpose of the present invention is to provide a pulmonary artery inner diameter detection method, system, electronic device and storage medium, aiming to improve the detection accuracy of the pulmonary artery inner diameter and the privacy of medical imaging data.

[0050] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0051] Example 1

[0052] Figure 1 This is a flow chart of the method for detecting the inner diameter of the pulmonary artery provided in Example 1 of the present invention. Figure 1 As shown, the pulmonary artery inner diameter detection method in this embodiment is implemented based on a federated learning system; the federated learning system includes: a key generation center, a central cloud server and a client set; the key generation center and the client set are both connected to the central cloud server, and the key generation center is connected to the client set; the client set includes N clients; N>1.

[0053] For any client, the pulmonary artery diameter detection methods include:

[0054] Step 101: Acquire a target image; the target image is a CT image of the lung to be detected.

[0055] Step 102: Input the target image into the pulmonary artery recognition model to obtain a target pulmonary artery image; the pulmonary artery recognition model is determined using a federated learning system based on a U-Net network structure and a training dataset; the training dataset includes multiple training lung CT images with pulmonary artery labels.

[0056] Step 103: Determine the inner diameter of the pulmonary artery in the target image according to the target pulmonary artery image.

[0057] As an optional implementation, the federated learning system trains the U-Net network structure to obtain a pulmonary artery recognition model, specifically including:

[0058] When the loss function value of the t-1th training is greater than the preset threshold: the central cloud server is used to:

[0059] Obtain the training data set and send it to each client.

[0060] Receive the gradient vectors of the t-th training of all clients, the key vectors of the t-th training generated by the key generation center using the key generation algorithm, and the ciphertexts of the t-th training of all clients; the gradient vectors of the t-th training of each client are determined after each client uses the training data set to perform the t-th training on the U-Net network structure after the t-1-th training; the ciphertext of the t-th training of each client is obtained by each client using the encryption algorithm based on the gradient vectors and the t-th training key vectors of the corresponding client; among them, when t=1, the U-Net network structure after the t-1-th training is the initial U-Net network structure.

[0061] Based on the gradient vectors of the t-th training of all clients, the key vectors of the t-th training generated by the key generation center using the key generation algorithm, and the ciphertexts of the t-th training of all clients, the global ciphertext of the t-th training is determined and sent to each client.

[0062] After receiving the global ciphertext of the t-th training, each client is used to:

[0063] The decryption algorithm is used to decrypt the global ciphertext of the t-th training based on the key vector of the t-th training to obtain the decrypted global gradient of the t-th training.

[0064] Calculate the loss function value of the U-Net network structure after the t-th training based on the training data set, and determine whether the loss function value of the U-Net network structure after the t-th training is greater than a preset threshold.

[0065] If so, the U-Net network structure after the t-th training is trained for the t+1th time based on the decrypted global gradient and training data set of the t-th training, and the gradient vector of the t+1-th training is determined. The encryption algorithm is used to determine the ciphertext of the t+1-th training based on the gradient vector of the t+1-th training and the key vector of the t+1-th training, and t is updated to t+1. The code "receives the gradient vectors of the t-th training of all clients, the key vectors of the t-th training generated by the key generation center using the key generation algorithm, and the ciphertexts of the t-th training of all clients" is returned.

[0066] If not, the U-Net network structure after the t-th training is determined as the pulmonary artery recognition model.

[0067] Specifically, in practical applications, if the loss function value of the U-Net network structure after the t-th training is always greater than the preset threshold, the pulmonary artery recognition model can be obtained by changing the preset threshold or setting the number of training times as the training stop condition.

[0068] As an optional implementation, determining the global ciphertext for the tth training is performed based on the gradient vectors for the tth training of all clients, the key vectors for the tth training generated by the key generation center using the key generation algorithm, and the ciphertexts for the tth training of all clients, specifically including:

[0069] Using the decryption algorithm, the global gradient of the tth training is determined based on the key vector of the tth training and the ciphertext of the tth training of all clients.

[0070] The global gradient of the t-th training is encrypted based on the key vector of the t-th training using an encryption algorithm to obtain the global ciphertext of the t-th training.

[0071] As an optional implementation, a decryption algorithm is used to determine the global gradient of the tth training based on the key vector of the tth training and the ciphertext of the tth training of all clients, specifically including:

[0072] Using the decryption algorithm, based on the key vector of the t-th training, the ciphertext of the t-th training of each client is decrypted respectively to obtain the decrypted gradient of the t-th training of each client.

[0073] Based on the decrypted gradients of the t-th training of all clients, the global gradient of the t-th training is determined.

[0074] As an optional implementation, an encryption algorithm is used to determine the ciphertext of the t+1th training based on the gradient vector of the t+1th training and the key vector of the t+1th training, specifically including:

[0075] Get the key vector generated by the key generation center for the t+1th training.

[0076] Based on the dimension of the key vector of the t+1th training, a reorganization matrix of the t+1th training is generated.

[0077] The encryption algorithm is used to generate the random matrix for the t+1th training and the noise matrix for the t+1th training.

[0078] The gradient vector of the t+1th training is encrypted based on the reorganization matrix of the t+1th training, the random matrix of the t+1th training, and the noise matrix of the t+1th training to obtain the ciphertext of the t+1th training.

[0079] like Figure 2 As shown, in order to make the solution in Example 1 more complete, in actual operation, a process for implementing pulmonary artery inner diameter detection using a federated learning system is also provided, specifically including:

[0080] (1) Building a federated learning system

[0081] Build a federated learning system, including a key generation center (KGC), a central cloud server (CS) and a client set S = {s1,s2,...,s N ,}, where the number of clients in the client set is limited to 2≤N≤5. The central cloud server is a computer or server in the laboratory, and the clients are computers in each hospital participating in the system.

[0082] The data communication relationship between the key generation center, the central cloud server and each client is as follows: the key generation center can only provide keys to the central cloud server and each client in a one-way manner; a two-way data transmission relationship can be established between the central cloud server and each client.

[0083] (2) Initialization of system-related parameters and setting of symbolic meanings:

[0084] Assume that the initial parameters of the U-Net network structure on the i-th client computer are w i 0 , where the subscript i is the client index, satisfying 1≤i≤N, N is the number of clients in the client set, the superscript represents the number of client training times, and 0 represents the initial parameters. Let η be the learning rate when updating the gradient. Let the loss function of each client not exceed the maximum value (i.e., the preset threshold) ε when stopping training.

[0085] Let symbol Z q Indicates the range The set of integers, where q is the largest set range, which can be determined according to actual needs. Define x B It is a random distribution with a maximum value capped at B, that is, every random value taken from this random distribution will be less than B. Definition The vector elements all belong to x B An m-dimensional vector. For , its infinity norm is less than or equal to B, and the mathematical symbol is expressed as:

[0086] Let KeyGen represent the key generation algorithm of the key generation center KGC; Enc and Dec represent the encryption algorithm for generating ciphertext and the decryption algorithm for cracking ciphertext, respectively. The central cloud server and the client both contain the same encryption algorithm Enc and decryption algorithm Dec.

[0087] (3) Distribute datasets to each client

[0088] The Parse2022 dataset is the official dataset of the Pulmonary Artery Segmentation Challenge 2022. It contains 200 3D voxels with fine pulmonary artery labels. These contrast-enhanced CT pulmonary angiography (CTPA) data are from a dual-source 64-slice CT scanner at Harbin Medical University in China and are annotated by 10 experts with more than 5 years of clinical experience. The image sizes are between 512×512×228 and 512×512×376. The pixel sizes of these images range from 0.50mm / pixel to 0.95mm / pixel, and the slice thickness is 1mm / pixel. The images will be stored in .nii.gz files. The voxel-level segmentation annotations are: 0 represents background and 1 represents pulmonary artery.

[0089] From the open validation case collection of the Parse2022 dataset, 90% is selected as the training set and its order is shuffled. Then a certain proportion of data is randomly selected from the training set and distributed to each client, with a proportion range of And ensure that the total proportion of the data set occupied by each client is 1. For example: there are 3 clients in total, and client 1 has a proportion of Client 2 has a proportion of Client 3 accounts for The purpose of this is to ensure that the distribution of training samples conforms to a non-IID distribution. The remaining 10% of the dataset is sent to the client as a test set. If there is a remainder when the number of training data files in the training set is divided by the number of clients, the number of files corresponding to the remainder is added to the client. For example: the total number of open verification cases is 30, the number of clients is 5, the theoretical number of training set samples is 27, and the theoretical number of test set samples is 3. Since 27 ÷ 5 = 5…2, the number of training set samples is 5 × 5 = 25. The extra training set samples are added to the test set, which means the number of test set samples becomes 3 + 2 = 5.

[0090] (4) Build an untrained 3D U-Net model (i.e., U-Net network structure) and distribute it to each client

[0091] A 3D U-Net semantic segmentation network was built on the central cloud server (CS). The network input data file format was .nii.gz, and the output was .nii. The internal parameters of the 3D U-Net network were initially randomly selected. Once the network was built, the central cloud server published the network structure to the participating hospitals' computers.

[0092] (5) Each client trains the U-Net network structure

[0093] Assume that the private dataset of client i in the tth training is represented by D i t , where D i t The data in is the training data distributed by the central cloud server to client i. Assume that the internal parameters of the U-Net network structure in client i in the tth training are w i t , which is in D i t The loss function on is:

[0094]

[0095] in, Representation dataset The number of data in. express The jth data (i.e. voxel) in represents an unlabeled data file, i.e., 3D voxels without pulmonary artery labels, Represents the labeled data file, i.e., 3D voxels with pulmonary artery labels, The functional relationship between the unlabeled data file representing the input and the output of the 3D U-Net model is difficult to express directly due to the high nonlinearity between the input and output of this function. Represents model output and the labeled data files Through the loss Model parameters By taking the derivative, we can get the gradient of client i in the tth training:

[0096]

[0097] in, Represents the loss function For relevant parameters in the function Find the partial derivative.

[0098] Assume that the final gradient of client i in the tth training is in, Represents the gradient vector The first element in Represents the gradient vector The nth element in . After converting all elements of the gradient vector into binary, we get The elements in the transformed vector are all 1 or 0, and similar The operations all indicate rounding the results. The meaning of the binarized elements will be explained with examples. For example, The value of is 9, then The binary representation is 1001. is log2(9), log2(9) is 3, so is 1, The purpose of binary decomposition is to prevent the multiplication of gradient elements and noise in subsequent possible operations, which may cause the noise to be too large and exceed the upper limit of the noise tolerance.

[0099] (6) Generate ciphertext based on client gradient

[0100] The client gradient is encrypted using KGC's key generation algorithm KeyGen and the client's encryption algorithm Enc. Taking client i as an example, the specific process is as follows:

[0101] Step 1: Client i takes the gradient An element in , taking the first element as an example, that is

[0102] Step 2: KGC uses the key generation algorithm KeyGen to generate a key vector (The key is not generated based on the gradient, all gradient elements share the same key in subsequent communication transmissions.) Key vector The dimension of is n, Every element in is in range Z q Within range Z q The value of q is the largest set range, which can be determined according to the designer's needs. It is generally designed to be a polynomial multiple of n. Here, O(n 2 ), that is, q = n 2 .

[0103] Key vector generated by KGC satisfy Right now Depend on and -1. is an n-1 dimensional vector that satisfies Right now Every element in is in range Z q In which setting The first element of is a larger value, such as the closest After all clients complete the first training of their respective 3D U-Net model internal parameters, the key generated by KGC It will continue to be used, and no new key will be generated after subsequent training is completed; the value of q will no longer change.

[0104] After key generation is complete, KGC sends the key and the value of q to the cloud and all clients, respectively, for use in subsequent encryption and decryption processes. After obtaining the value of q, the cloud and clients generate the same binary reorganization matrix G (the central cloud server and clients generate and share a single binary reorganization matrix, as the dimension of the binary reorganization matrix is ​​determined by q, which is a constant value determined by the user):

[0105]

[0106] Here, log2(q) represents the logarithm of q taken from 2 and rounded to the nearest integer. The function of the matrix G is to restore the matrix that will be binarized later. The matrix G is not regenerated later.

[0107] Step 3: Client i generates a random matrix using the encryption algorithm Enc Among them Ai All elements belong to Z q , with dimension m×(n-1) in m=n·(log2(q)+1). At the same time, the encryption algorithm Enc generates a noise vector B represents the maximum value of the noise vector element, the noise vector Every element of belongs to the range x B When the first training is completed and the transmission is performed, the random matrix A generated by Enc in client i i Will continue to be used and will not be regenerated when subsequent transmissions are made; the noise vector It is regenerated during each transmission.

[0108] Step 4: The encryption algorithm Enc of client i will execute equations (4) and (5) to obtain the ciphertext

[0109]

[0110]

[0111] Get the ciphertext After that, client i transmits

[0112] (7) The central cloud server decrypts the ciphertext and restores the gradient

[0113] The ciphertext sent by client i in (6) For example, the cloud receives Then use the cloud decryption algorithm Dec to decrypt, the specific process is as follows:

[0114] The decryption algorithm Dec is calculated as follows:

[0115]

[0116] Since the first row of the binary reduction matrix G is G1 = [1 0 … 0], we can get from formula (6):

[0117] because is a random number that satisfies At the same time, set in step 2 of (5) is a large number (much larger than the acceptable noise limit), so the transmitted original text is obtained according to the following equation:

[0118]

[0119] in, Represents the noise vector The first element in The absolute value of the first element of the vector calculated by formula (6) is taken is an acceptable noise range. When the central cloud server decrypts the data is 0; otherwise, it is 1.

[0120] against Repeat (6) and (7) for the rest of the After transmitting the remaining elements, the cloud can obtain the decrypted gradient of client i:

[0121] Afterwards, the central cloud server Perform binary restoration to obtain the gradient of client i after decryption

[0122] (6) and (7) take the gradient of client i as an example. The other clients also complete their own client transmission through (6) and (7). Finally, the central cloud server decrypts and binary restores the data transmitted by these clients to obtain the gradient data calculated by each client in the tth training.

[0123] (8) Cloud-based aggregation and encryption of gradients

[0124] The central cloud server adds the gradients of all clients and takes the average value to obtain the global gradient gd in the t-th training. t , and use the same process as (5) to complete the encryption of the global gradient and obtain the global gradient gd t Ciphertext And send it to all clients.

[0125] When all clients receive the ciphertext After that, all clients use the same process as in (6) to complete the Decryption of , and get the restored global gradient

[0126] (9) Update the network

[0127] When the global gradient is obtained After that, each client Update the parameters of their respective 3D U-Net models. Each client stops training when its loss function L is no greater than ε, and the training is completed.

[0128] After training, each client uses the test set to test the 3D U-Net model, observes the segmentation effect of the model on the test set, and compares it with the labeled image. If the segmentation results of the models of more than 50% of the clients are too different from the labeled image results, return to (3) and retrain all clients. Clients with models with poor segmentation results will receive new untrained models; clients with models with good segmentation results will continue to use the trained models.

[0129] (10) Use the model after client training to determine the pulmonary artery diameter

[0130] Once the model training is complete on all clients, each client can use the model to segment the image. Based on the pulmonary artery segmented in the image, the pulmonary artery diameter is determined, thereby determining the possibility of pulmonary hypertension.

[0131] Example 2

[0132] To implement the pulmonary artery inner diameter detection method in Example 1, Example 2 further provides a pulmonary artery inner diameter detection system, including:

[0133] The target image acquisition module is used to acquire the target image; the target image is the lung CT image to be detected.

[0134] The recognition module is used to input the target image into the pulmonary artery recognition model to obtain the target pulmonary artery image; the pulmonary artery recognition model is determined using a federated learning system based on a U-Net network structure and a training data set; the training data set includes multiple training lung CT images with pulmonary artery labels; the federated learning system includes: a key generation center, a central cloud server and a client set; the key generation center and the client set are both connected to the central cloud server, and the key generation center is connected to the client set; the client set includes N clients; N>1.

[0135] The inner diameter determination module is used to determine the inner diameter of the pulmonary artery in the target image based on the target pulmonary artery image.

[0136] Example 3

[0137] An electronic device, comprising:

[0138] One or more processors.

[0139] A storage device having one or more programs stored thereon.

[0140] When one or more programs are executed by one or more processors, the one or more processors are enabled to implement the pulmonary artery inner diameter detection method as in Example 1.

[0141] Example 4

[0142] A storage medium stores a computer program, wherein when the computer program is executed by a processor, the method for detecting the inner diameter of the pulmonary artery in embodiment 1 is implemented.

[0143] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0144] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The examples are only intended to help understand the methods and core concepts of the present invention. At the same time, those skilled in the art will appreciate that variations in the specific implementation methods and scope of application are possible based on the present invention. In summary, this specification should not be construed as limiting the present invention.

Claims

1. A method for detecting the inner diameter of a pulmonary artery, characterized in that: The method is implemented based on a federated learning system; the federated learning system includes: a key generation center, a central cloud server, and a client set; the key generation center and the client set are both connected to the central cloud server, and the key generation center is connected to the client set; the client set includes N clients, where N>1; For any of the clients, the method for detecting the inner diameter of the pulmonary artery includes: Acquire a target image; the target image is a CT image of the lung to be detected; Inputting the target image into a pulmonary artery recognition model to obtain a target pulmonary artery image; the pulmonary artery recognition model is determined using the federated learning system based on a U-Net network structure and a training data set; the training data set includes multiple training lung CT images with pulmonary artery labels; determining an inner diameter of the pulmonary artery in the target image according to the target pulmonary artery image; The process of the federated learning system training the U-Net network structure to obtain the pulmonary artery recognition model specifically includes: When the loss function value of the t-1th training is greater than a preset threshold: the central cloud server is used to: Obtaining the training data set, and sending the training data set to each of the clients; Receive the gradient vectors of the t-th training of all the clients, the key vectors of the t-th training generated by the key generation center using the key generation algorithm, and the ciphertexts of the t-th training of all the clients; the gradient vectors of the t-th training of each client are determined after each client performs the t-th training on the U-Net network structure after the t-1-th training using the training data set; the ciphertext of the t-th training of each client is obtained by each client using the encryption algorithm based on the gradient vectors of the t-th training of the corresponding client and the t-th training key vector; wherein, when t=1, the U-Net network structure after the t-1-th training is the initial U-Net network structure; Determine a global ciphertext for the tth training based on the gradient vectors for the tth training of all the clients, the key vectors for the tth training generated by the key generation center using the key generation algorithm, and the ciphertexts for the tth training of all the clients, and send the global ciphertext for the tth training to each of the clients; After receiving the global ciphertext of the t-th training, each of the clients is used to: Using the decryption algorithm, based on the key vector of the t-th training, decrypt the global ciphertext of the t-th training to obtain the decrypted global gradient of the t-th training; Calculating the loss function value of the U-Net network structure after the t-th training based on the training data set, and determining whether the loss function value of the U-Net network structure after the t-th training is greater than the preset threshold; If so, perform the t+1th training on the U-Net network structure after the tth training based on the decrypted global gradient of the tth training and the training data set, determine the gradient vector of the t+1th training, use the encryption algorithm to determine the ciphertext of the t+1th training based on the gradient vector of the t+1th training and the key vector of the t+1th training, update t to t+1, and return "receive the gradient vectors of the tth training of all the clients, the key vector of the tth training generated by the key generation center using the key generation algorithm, and the ciphertext of the tth training of all the clients"; If not, the U-Net network structure after the t-th training is determined as the pulmonary artery recognition model.

2. The method for detecting the inner diameter of the pulmonary artery according to claim 1, wherein: Determining a global ciphertext for the tth training based on the gradient vectors for the tth training of all the clients, the key vector for the tth training generated by the key generation center using the key generation algorithm, and the ciphertexts for the tth training of all the clients, specifically comprising: Determine, using a decryption algorithm, a global gradient of the tth training based on the key vector of the tth training and the ciphertext of the tth training of all the clients; The global gradient of the t-th training is encrypted based on the key vector of the t-th training using an encryption algorithm to obtain the global ciphertext of the t-th training.

3. The method for detecting the inner diameter of the pulmonary artery according to claim 2, wherein: Determine the global gradient of the tth training step using a decryption algorithm based on the key vector of the tth training step and the ciphertext of the tth training step of all the clients, specifically including: Decrypting the ciphertext of the t-th training of each client using a decryption algorithm based on the key vector of the t-th training, and obtaining the decrypted gradient of the t-th training of each client; Determine a global gradient for the tth training based on the decrypted gradients for the tth training of all the clients.

4. The method for detecting the inner diameter of the pulmonary artery according to claim 1, wherein: Using the encryption algorithm, the ciphertext of the t+1th training is determined based on the gradient vector of the t+1th training and the key vector of the t+1th training, specifically including: Obtaining the key vector generated by the key generation center for the t+1th training; Generate a reorganization matrix for the t+1th training based on the dimension of the key vector for the t+1th training; Generate a random matrix for the t+1th training and a noise matrix for the t+1th training using an encryption algorithm; The gradient vector of the t+1th training is encrypted based on the reorganization matrix of the t+1th training, the random matrix of the t+1th training, and the noise matrix of the t+1th training to obtain the ciphertext of the t+1th training.

5. A pulmonary artery inner diameter detection system, used to implement the pulmonary artery inner diameter detection method according to any one of claims 1 to 4, characterized in that: The pulmonary artery inner diameter detection system comprises: A target image acquisition module is used to acquire a target image; the target image is a CT image of the lung to be detected; A recognition module is configured to input the target image into a pulmonary artery recognition model to obtain a target pulmonary artery image; the pulmonary artery recognition model is determined using a federated learning system based on a U-Net network structure and a training data set; the training data set includes multiple training lung CT images with pulmonary artery labels; the federated learning system includes: a key generation center, a central cloud server, and a client set; the key generation center and the client set are both connected to the central cloud server, and the key generation center is connected to the client set; the client set includes N clients, where N>1; The inner diameter determination module is used to determine the inner diameter of the pulmonary artery in the target image based on the target pulmonary artery image.

6. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method for detecting the inner diameter of the pulmonary artery according to any one of claims 1 to 4.

7. A storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the method for detecting the inner diameter of the pulmonary artery according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Network threat collaborative defense system and method based on information sharing

    CN112217626A

  • Self-adaptive sampling federated learning privacy protection method based on threshold homomorphism

    CN115378707A