Collaborative learning system and method based on hierarchical topological pneumonia detection model

By constructing a hierarchical topological collaborative learning system in the pneumonia detection model and utilizing intra-cluster and inter-cluster collaborative training, the problems of high training difficulty, low efficiency, and high data transmission pressure in existing technologies are solved, achieving efficient and safe pneumonia detection, and providing more detailed detection information and better detection performance.

CN117670774BActive Publication Date: 2026-06-23XIDIAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIDIAN UNIV
Filing Date
2022-08-26
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing pneumonia detection models suffer from problems such as high implementation difficulty and low efficiency during training and identification, high data transmission pressure, high storage requirements, and the inability of various hospital testing nodes to achieve optimal detection performance.

Method used

A hierarchical topology-based collaborative learning system is adopted. By dividing the system into central nodes, cluster nodes, and child nodes among K nodes, the model is pre-trained using local data and trained through intra-cluster and inter-cluster collaborative training. Cluster nodes and child nodes are selected for gradient interaction and parameter updates to construct a hierarchical topology-based collaborative learning system.

Benefits of technology

It reduces data transmission and storage pressure, improves system efficiency, provides differentiated model parameters to achieve optimal detection performance for each hospital node, and ensures data privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117670774B_ABST
    Figure CN117670774B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of pneumonia detection model training method, specifically to a kind of hierarchical topology pneumonia detection model based on collaborative learning system and method.It overcomes the difficulty of existing pneumonia detection model training system, low efficiency and the problem that local detection node cannot achieve optimal detection performance.First, each node uses local pneumonia data to pre-train respective pneumonia detection model locally, then, center node is based on the feedback data of local model to build hierarchical topology collaborative learning system;After that, each cluster node and child node uses local pneumonia data to train respective pneumonia detection model locally;Finally, collaborative training is carried out, including intra-cluster collaborative training and inter-cluster collaborative training;Intra-cluster collaborative training includes cluster node aggregation training and child node random interactive training.The present application has small data transmission, storage and calculation pressure, and is easy to implement;At the same time, different client is provided with different model parameters, so that each hospital detection node achieves local detection performance maximization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a pneumonia identification method, specifically a collaborative learning system and method based on a hierarchical topological pneumonia detection model. Background Technology

[0002] Pneumonia is a very common and deadly disease that needs to be identified early to prevent further harm to patients. Various techniques are available for the diagnosis of pneumonia, including chest X-ray, CT scan, blood culture, sputum culture, fluid sample analysis, bronchoscopy, and pulse oximetry. Among these, chest X-ray plays a crucial role in the diagnosis of many diseases, including MERS, COVID-19, and pneumonia. Accurate analysis of chest X-ray images requires a radiologist with expertise and experience in the relevant field. However, chest X-ray images suffer from low resolution and overlapping of organs, which can easily lead to misdiagnosis by doctors. Therefore, the use of artificial intelligence technology for intelligent assisted diagnosis is of great significance (Wang Wei, Hu Yiyang, Wang Xin, et al. DD-CovidNet model for X-ray image recognition of novel coronavirus pneumonia [J / OL]. Journal of Computer-Aided Design & Graphics. (2021-09-13) [2021-09-15]. https: / / kns.cnki.net / kcms / detail / 11.2925.TP.20210910.1709.010.html). Cao Runzhi proposed an auxiliary diagnostic system (FL-SE-ResNet-GN) that integrates federated learning framework, compressed incentive network and improved ResNet. While using federated learning to protect data privacy, it combines compressed incentive network and group normalization to fully pay attention to channel characteristics (Cao Runzhi, Han Bin, Liu Gaqiong. Auxiliary diagnosis of pneumonia based on federated learning and improved ResNet [J]. Computer Systems Applications, 2022, 31(2):227-233.DOI:10.15888 / j.cnki.csa.008353.). Su Yang et al. proposed a pneumonia classification system based on federated learning and deep learning. They used federated learning technology to address data privacy requirements and data silos in medical data, and then used data from various data providers to jointly train a deep learning-based classification model (Su Yang, Zhang Hao, Liu Juntong. Research on Pneumonia Classification Method Based on Federated Learning and Deep Learning [J]. Journal of Hefei Normal University, 2021, 39(6):35-39. DOI:10.3969 / j.issn.1674-2273.2021.06.010.). Cao Runzhi and Su Yang used a similar federated learning framework, such as... Figure 1 As shown.

[0003] The above methods have higher recognition accuracy compared to manual identification, but they all collect all pneumonia samples from various regions into a single data center (central cloud) for training and then distribute the results indiscriminately to various hospital testing nodes, which has the following two problems:

[0004] 1. It is difficult to implement and inefficient;

[0005] The samples are scattered, and all the data are very large files, resulting in slow transmission speeds and potential packet loss. Furthermore, if all node data is aggregated to the central cloud node for processing during training, the central cloud will receive massive amounts of data at every moment, leading to extremely high bandwidth utilization. In addition, the processing and storage requests for a large amount of data will put enormous computational and storage pressure on the central cloud server.

[0006] 2. The differences in data across different nodes were ignored, which prevented the testing nodes in each hospital from achieving optimal testing performance. Summary of the Invention

[0007] The purpose of this invention is to provide a collaborative learning system and method based on a hierarchical topological pneumonia detection model, which overcomes the problems of high implementation difficulty, low efficiency, and the inability of local detection nodes to achieve optimal detection performance in existing pneumonia detection model training and recognition systems.

[0008] The technical solution of this invention is to provide a collaborative learning system based on a hierarchical topological pneumonia detection model. Its key feature is that it includes computers located in K nodes, each computer containing a memory storing pneumonia detection models. The K pneumonia detection models have different neural network weights, where K is an integer greater than 2. The K nodes are divided into one central node, C′ cluster nodes, and K-1-C′ child nodes. The cluster nodes communicate with the central node. Each cluster node corresponds to multiple communicating child nodes and communicates with its corresponding child nodes. Here, C′ is an integer greater than 1 and less than K-1.

[0009] The pneumonia detection model was learned based on the following process:

[0010] Step 1: Pre-training;

[0011] Each of the K nodes uses local pneumonia data to pre-train its own pneumonia detection model locally;

[0012] Step 2: Construct a hierarchical topology-based collaborative learning system;

[0013] Step 2.1: The central node receives the model gradients of the respective pneumonia detection models sent by K nodes, and selects C′ cluster nodes from the K nodes according to the magnitude of the K model gradients;

[0014] Step 2.2: Determine the child nodes corresponding to each cluster node based on the distance between the model gradients of the pneumonia detection models of the cluster nodes and the pneumonia detection models of the remaining K-1-C′ nodes;

[0015] Step 3: Each cluster node and its child nodes train their respective pneumonia detection models locally using local pneumonia data;

[0016] Step 4: Collaborative training;

[0017] Collaborative training includes intra-cluster collaborative training and inter-cluster collaborative training; intra-cluster collaborative training includes cluster node aggregation training and child node random interactive training.

[0018] Cluster node aggregation training:

[0019] Step 4a1: Determine whether the current time t is divisible by t1. If yes, proceed to step 4b1; otherwise, return to step 3.

[0020] Step 4b1: Each cluster node receives the model gradient of the pneumonia detection model sent by its respective child nodes; averages the model gradient of the pneumonia detection model for all nodes in the cluster, including the cluster node and all its child nodes, to obtain the average gradient; sends the average gradient down to each child node in the cluster, updates the pneumonia detection model of each child node, and returns to step 3.

[0021] Random interactive training of child nodes:

[0022] Step 4a2: Determine whether the current time t is divisible by t2. If yes, proceed to step 4b2; otherwise, return to step 3.

[0023] Step 4b2: Randomly swap all child nodes belonging to the same cluster node to train the pneumonia detection model. After setting a time, return to step 3.

[0024] Inter-cluster collaborative training:

[0025] Step 4a3: Determine whether the current time t is divisible by t3. If yes, proceed to step 4b3; otherwise, return to step 3.

[0026] Step 4b3: The central node receives the average gradients of the pneumonia detection models sent by each cluster node, averages the C′ average gradients, and then sends them down to each cluster node to update the pneumonia detection models of each cluster node; return to step 3.

[0027] Step 5: Determine if time t4 has been reached. If yes, end the current learning session and execute Step 1 for the next learning session. Otherwise, return to Step 3. Here, t1, t2, t3, and t4 are all set values.

[0028] Furthermore, the local pneumonia data mentioned in steps 1 and 3 includes COVID-19 pneumonia, non-COVID-19 viral pneumonia, bacterial pneumonia, mycoplasma pneumonia, chlamydia pneumonia, fungal infections, pneumonia caused by physical and chemical factors, and health image data.

[0029] Furthermore, the pneumonia detection model adopts the ResNet50 network model.

[0030] Further, in step 2.1, the central node receives the model gradients of the respective pneumonia detection models sent by the K nodes, and selects C′ cluster nodes from the K nodes based on the magnitude of the K model gradients using the farthest point sampling method. Specifically:

[0031] Step 2.11: Select a node P0 from the K nodes as the starting point to obtain the sampling point set S = {P0};

[0032] Step 2.12: Calculate the distance between the model gradient matrix of the pneumonia detection model of all other nodes and the model gradient matrix of the pneumonia detection model of node P0, forming a K-dimensional array L; select the node with the largest distance in the K-dimensional array L, take the node with the largest distance as node P1, and update the sampling node set S = {P0, P1}.

[0033] Step 2.13: Calculate the distance between the model gradient matrix of the pneumonia detection model of all other nodes and the model gradient matrix of the pneumonia detection model of node P1. For each node Kq, q = 1, 2, ... K, if the distance between it and P1 is less than L[q], then update L[q] = d(Kq, P1); where L[q] is the q-th number in the array L calculated in step 2.12; d(Kq, P1) represents the distance between the model gradient matrices of node Kq and node P1.

[0034] Step 2.14: Select the point corresponding to the maximum value in array L as P2, and update the sampling point set S = {P0, P1, P2};

[0035] Step 2.15: Repeat the operations of 2.12-2.14 until C′ target sampling points are sampled, and take each node in the sampling point set as a cluster node.

[0036] Furthermore, in step 4b1, the pneumonia detection model for each child node is updated based on the following formula:

[0037]

[0038] In the formula, Let be the neural network weights of the pneumonia detection model at the k-th node at time t+1. Let η be the neural network weight of the pneumonia detection model at the k-th node at time t.t Here, α is the learning rate, and α is the gradient weight coefficient. Let be the model gradient of child node k within the same cluster node c at time t. It is the average model gradient of all model gradients within the same cluster node c.

[0039] This invention also provides a collaborative learning method based on a hierarchical topological pneumonia detection model, characterized by the following steps:

[0040] Step 1: Pre-training;

[0041] K nodes each use local pneumonia data to pre-train their own pneumonia detection models locally, and the pneumonia detection models of different nodes have different neural network weights; where K is an integer greater than 2;

[0042] Step 2: Construct a hierarchical topology-based collaborative learning system;

[0043] Step 2.1: The central node receives the model gradients of the pneumonia detection models sent by K nodes, and selects C′ cluster nodes from the K nodes according to the magnitude of the K model gradients, where C′ is an integer greater than 1 and less than K-1.

[0044] Step 2.2: Based on the distance between the model gradients of the pneumonia detection model of the cluster node and the pneumonia detection models of the remaining K-1-C′ nodes, determine the nodes under each cluster node and define the nodes under each cluster node as child nodes.

[0045] Step 3: Each cluster node and its child nodes train their respective pneumonia detection models locally using local pneumonia data;

[0046] Step 4: Collaborative training;

[0047] Collaborative training includes intra-cluster collaborative training and inter-cluster collaborative training; intra-cluster collaborative training includes cluster node aggregation training and child node random interactive training.

[0048] Cluster node aggregation training:

[0049] Step 4a1: Determine whether the current time t is divisible by t1. If yes, proceed to step 4b1; otherwise, return to step 3.

[0050] Step 4b1: Each cluster node receives the model gradient of the pneumonia detection model sent by its respective child nodes; averages the model gradient of the pneumonia detection model for all nodes in the cluster, including the cluster node and all its child nodes, to obtain the average gradient; sends the average gradient down to each child node in the cluster, updates the pneumonia detection model of each child node, and returns to step 3.

[0051] Random interactive training of child nodes:

[0052] Step 4a2: Determine whether the current time t is divisible by t2. If yes, proceed to step 4b2; otherwise, return to step 3.

[0053] Step 4b2: Randomly swap all child nodes belonging to the same cluster node to train the pneumonia detection model. After setting a time, return to step 3.

[0054] Inter-cluster collaborative training:

[0055] Step 4a3: Determine whether the current time t is divisible by t3. If yes, proceed to step 4b3; otherwise, return to step 3.

[0056] Step 4b3: The central node receives the average gradients of the pneumonia detection models sent by each cluster node, averages the C′ average gradients, and then sends them down to each cluster node to update the pneumonia detection models of each cluster node; return to step 3.

[0057] Step 5: Determine if time t4 has been reached. If yes, end the current learning session and execute Step 1 for the next learning session. Otherwise, return to Step 3. Here, t1, t2, t3, and t4 are all set values.

[0058] Furthermore, in order to provide healthcare workers with more detailed assistance information, the local pneumonia data mentioned in steps 1 and 3 includes COVID-19 pneumonia, non-COVID-19 viral pneumonia, bacterial pneumonia, mycoplasma pneumonia, chlamydia pneumonia, fungal infections, pneumonia caused by physical and chemical factors, and health image data.

[0059] Furthermore, the pneumonia detection model adopts the ResNet50 network model.

[0060] Further, in step 2.1, the central node receives the model gradients of the respective pneumonia detection models sent by the K nodes, and selects C′ cluster nodes from the K nodes based on the magnitude of the K model gradients using the farthest point sampling method.

[0061] Furthermore, step 2.1 specifically includes:

[0062] Step 2.11: Select a node P0 from the K nodes as the starting point to obtain the sampling point set S = {P0};

[0063] Step 2.12: Calculate the distance between the model gradient matrix of the pneumonia detection model of all other nodes and the model gradient matrix of the pneumonia detection model of node P0, forming a K-dimensional array L; select the node with the largest distance in the K-dimensional array L, take the node with the largest distance as node P1, and update the sampling node set S = {P0, P1}.

[0064] Step 2.13: Calculate the distance between the model gradient matrix of the pneumonia detection model of all other nodes and the model gradient matrix of the pneumonia detection model of node P1. For each node Kq (q=1,2,…K), if the distance between it and P1 is less than L[q], then update L[q]=d(Kq,P1); where L[q] is the q-th number in the array L calculated in step 2.12; d(Kq,P1) represents the distance between the model gradient matrices of node Kq and node P1.

[0065] Step 2.14: Select the point corresponding to the maximum value in array L as P2, and update the sampling point set S = {P0, P1, P2};

[0066] Step 2.15: Repeat the operations of 2.12-2.14 until C′ target sampling points are sampled, and take each node in the sampling point set as a cluster node.

[0067] Further, in steps 2.12 and 2.13, the distance d(A,B) between the model gradient matrices of the pneumonia detection models of the two nodes is calculated based on the following formula:

[0068]

[0069] Where m and n represent the number of rows and columns of the matrix, i and j represent the i-th row and j-th column of the matrix, respectively, and a ij b represents the element in the i-th row and j-th column of the model gradient matrix A. ij This represents the element in the i-th row and j-th column of the model gradient matrix B.

[0070] Furthermore, in step 4b1, the pneumonia detection model for each child node is updated based on the following formula:

[0071]

[0072] In the formula, Let be the neural network weights of the pneumonia detection model at the k-th node at time t+1. Let η be the neural network weight of the pneumonia detection model at the k-th node at time t. t Here, α is the learning rate, and α is the gradient weight coefficient. Let be the model gradient of child node k within the same cluster node c at time t. It is the average model gradient of all model gradients within the same cluster c.

[0073] The beneficial effects of this invention are:

[0074] 1. Low data transmission, storage, and computational burden, easy to implement;

[0075] This invention constructs a hierarchical topology-based collaborative learning system, utilizing multiple cluster nodes to distribute the load of the central node, significantly reducing data transmission, storage, and computational workload, and improving the efficiency of the entire control system. Each child node primarily uses local pneumonia data for training, communicating with other nodes only when updating model parameters, further reducing data transmission.

[0076] 2. Provide differentiated model parameters for different clients to maximize the local testing performance of each hospital testing node;

[0077] In this invention, each child node no longer interacts with the central node in its entirety. For nodes with large differences in data distribution, relying on the central node to perform global averaging would actually reduce the node's performance. This invention takes into account the differences in data distribution and demand to construct a collaborative topology and hierarchical collaboration, which ensures the breadth of collaboration between clusters and strengthens collaboration within clusters with similar data distribution.

[0078] 3. High data transmission security;

[0079] The hierarchical collaborative learning method designed in this invention does not require uploading data to the cloud for analysis, thus protecting privacy while serving humanity.

[0080] 4. The more detailed classification provides medical staff with more comprehensive and detailed assistance information;

[0081] This invention can detect images of COVID-19, viral (non-COVID-19) pneumonia, bacterial pneumonia, and healthy individuals. Compared to simply distinguishing between COVID-19 and non-COVID-19, it can provide medical personnel with more detailed assistance information and improve detection efficiency. Attached Figure Description

[0082] Figure 1 A schematic diagram of the existing federated learning framework;

[0083] Figure 2 This is a topology diagram of the collaborative learning system for the hierarchical topology pneumonia detection model in the embodiment;

[0084] Figure 3 This is a structural diagram of the pneumonia detection model in the embodiment;

[0085] Figure 4 This is a schematic diagram of the functions of each node in the collaborative learning system of the hierarchical topological pneumonia detection model in the embodiment.

[0086] Figure 5 The flowchart below illustrates a collaborative learning method based on a hierarchical topology pneumonia detection model, as an example. Detailed Implementation

[0087] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0088] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0089] This embodiment proposes training a pneumonia detection model using collaborative learning, primarily for detecting COVID-19, viral (non-COVID-19) pneumonia, bacterial pneumonia, mycoplasma pneumoniae pneumonia, chlamydia pneumoniae pneumonia, pulmonary fungal diseases, pneumonia caused by physical and chemical factors, and healthy images. Institutions or hospitals possessing datasets and computing power and willing to participate in collaborative learning are referred to as nodes, totaling K nodes. Collaborative learning also includes a central node, which does not require strong computing power as it does not participate in training the pneumonia detection model; it is only responsible for aggregating and constructing the learning topology graph. The learning topology graph mainly divides a large number of nodes into multiple clusters, each cluster containing one cluster node and multiple child nodes. Collaborative training includes intra-cluster collaborative training and inter-cluster collaborative training. The collaborative learning topology graph is shown below. Figure 2 As shown, child nodes do not interact directly with the central node.

[0090] Each node (including cluster nodes and individual child nodes) trains its own pneumonia detection model locally using local pneumonia data, communicating with other nodes only when updating the pneumonia detection model parameters. The hierarchical collaborative learning approach designed in this embodiment does not require uploading data to the cloud for analysis, as this personal information may involve significant patient privacy. In this era where privacy is paramount, it is crucial to protect privacy while serving humanity.

[0091] It is worth mentioning that the pneumonia detection model is consistent across all nodes. In this embodiment, the pneumonia detection model uses ResNet50, but its neural network weights are different. The neural network weights of the 1st, 2nd...kth pneumonia detection models are defined as {W1, W2, ..., W...} K}, model as Figure 3 As shown:

[0092] The initial input image is 3×224×224, meaning it has 3 channels and a size of 224×224. The first convolutional layer has a kernel size of 7*7, 64 kernels, and a stride of 2. This is followed by a batch normalization layer (BNU) and a ReLU activation function. A max-pooling layer changes the dimensionality but doesn't affect the number of kernels. Stages one through four all include Conv Block and ID Block modules. The Conv Block, the three-layer network on the left, works by first reducing the dimensionality of the feature image using a 1×1 convolution, then performing a 3×3 convolution, and finally restoring the dimensionality using another 1×1 convolution. Each convolution is followed by BN and ReLU layers. The area marked with dashed lines uses a 1×1 convolutional network. The ID Block, the three-layer network on the right, differs from the Conv Block in that the area marked with dashed lines does not undergo dimensionality reduction via a convolutional network; the input is directly added to the final 1×1 convolution output. The output dimensions of the three-layer network in Stage 1 are [64, 64, 256], those in Stage 2 are [128, 128, 512], those in Stage 3 are [256, 256, 1024], and those in Stage 4 are [512, 512, 2048]. After Stage 4, average pooling and fully connected layers (FC) are used to complete the classification and detection. The output dimensions of the four fully connected layers are [1000, 512, 128, 8].

[0093] During the pre-training phase, each node (including cluster nodes and child nodes) collects and cleans data, pre-trains its own pneumonia detection model locally, and feeds back the model gradient of the pneumonia detection model to the central node after a period of training. The central node selects cluster nodes using the farthest point sampling (FPS) method. It is important to note that the data mentioned here can include COVID-19, viral (non-COVID-19) pneumonia, bacterial pneumonia, mycoplasma pneumoniae pneumonia, chlamydia pneumoniae pneumonia, pulmonary fungal diseases, pneumonia caused by physical and chemical factors, and healthy image data; the specific selection can be based on the node's environment.

[0094] FPS Algorithm Principle:

[0095] 1. Input the model gradients of the pneumonia detection models sent by K nodes, select a node P0 as the starting point, and obtain the sampling point set S = {P0}.

[0096] 2. Calculate the distance from all other nodes to node P0. This distance is the distance between the model gradient matrix of the pneumonia detection model of all nodes and the model gradient matrix of the pneumonia detection model of node P0. This distance forms a K-dimensional array L. Select the node corresponding to the maximum value from L as P1, and update the sampling node set S = {P0, P1}. The distance d between two model gradient matrices A and B is defined as...

[0097]

[0098] In the formula, m and n represent the number of rows and columns of the matrix, i and j represent the i-th row and j-th column of the matrix, respectively, and a ij b represents the element in the i-th row and j-th column of the model gradient matrix A. ij This represents the element in the i-th row and j-th column of the model gradient matrix B.

[0099] The distance formula in step 2 of the FPS algorithm for selecting cluster nodes is Euclidean distance, but Manhattan distance, Chebyshev distance, Minkowski distance, Cosine distance, etc. can also be used.

[0100] 3. Calculate the distance between the model gradient of the pneumonia detection model of all other child nodes and the model gradient of the pneumonia detection model of node P1. For each node Kq (q=1,2,…K), if the distance between it and P1 is less than L[q], then update L[q]=d(Kq,P1); where L[q] is the q-th number in array L; therefore, array L always stores the shortest distance from each node to the set of sampling points S.

[0101] 4. Select the node corresponding to the maximum value in array L as P2, and update the sampling point set S = {P0, P1, P2};

[0102] 5. Repeat steps 2-4 until C′ target sampling points are reached.

[0103] After selecting C′ cluster nodes, the next step is to determine the child nodes under each cluster node to form a cluster. The principle is similar to selecting cluster nodes. Clustering is based on the distance between the model gradient of each node's pneumonia detection model and the model gradient of the cluster node's pneumonia detection model. The node with the smallest distance from the node's model gradient to the model gradient of the nearest cluster node is assigned to that cluster node. Based on this, the learning topology is constructed.

[0104] The hierarchical collaborative learning proposed in this embodiment includes intra-cluster collaboration and inter-cluster collaboration. Intra-cluster collaboration consists of two parts: cluster node aggregation and random interactive training of child nodes.

[0105] Cluster node aggregation:

[0106] A1. Determine if the current time t is divisible by t1. If yes, proceed to step B1; otherwise, continue local training.

[0107] B1. Child node k belonging to the same cluster c will have the model gradient of the local pneumonia detection model at time t. Send to cluster node c.

[0108] C1. The average gradient is obtained by averaging the gradients of cluster node c over all nodes {c} within the cluster (including child nodes and cluster nodes).

[0109]

[0110] D1. Cluster nodes distribute the average gradient to each child node within the cluster.

[0111] E1. Perform model integration at each node and update parameters:

[0112]

[0113] In the formula, Let be the neural network weights of the pneumonia detection model at the k-th node at time t+1. Let η be the neural network weight of the pneumonia detection model at the k-th node at time t. t Let α be the learning rate and α be the gradient weight coefficient. During updates, the latest gradient and the difference between the current model and the global model are considered.

[0114] In short, the cluster node will average all these gradients and send the new gradient back to each child node. Each child node updates its local parameters after receiving the gradient from the cluster node.

[0115] Random interactive training of child nodes:

[0116] Pneumonia detection models can be freely exchanged between child nodes belonging to the same cluster, allowing their pneumonia detection models to be trained using data from other child nodes, and then exchanged back after a period of time.

[0117] Cluster node aggregation and random interactive training of child nodes are not ongoing. For each child node and cluster node, local training is the primary method, with cluster node aggregation and random interactive training of child nodes performed periodically.

[0118] Inter-cluster collaboration is similar to cluster node aggregation. At set intervals, cluster nodes aggregate the average gradient... The gradients are sent to the central node, which averages the gradients from each cluster node and then sends them back to each cluster node. Each cluster node then updates its parameters based on its own pneumonia detection model. The cluster nodes and topology are not static; after a period of training, each node can continue to upload gradient matrices to the central node, which then reconstructs the topology. The tasks of the child nodes, cluster nodes, and central node are as follows: Figure 4 As shown in the description.

[0119] In summary, the overall process of the hierarchical collaboration solution is as follows: Figure 5 As shown:

[0120] Step 1: Pre-training;

[0121] K nodes each use local pneumonia data to pre-train their own pneumonia detection models locally, and the pneumonia detection models of different nodes have different neural network weights; where K is an integer greater than 2;

[0122] Step 2: Construct a hierarchical topology-based collaborative learning system;

[0123] Step 2.1: The central node receives the model gradients of the pneumonia detection models sent by K nodes, and selects C′ cluster nodes from the K nodes according to the magnitude of the K model gradients, where C′ is an integer greater than 1 and less than K-1.

[0124] Step 2.2: Based on the distance between the model gradients of the pneumonia detection model of the cluster node and the pneumonia detection models of the remaining KC′ nodes, determine the nodes under each cluster node and define the nodes under each cluster node as child nodes;

[0125] Step 3: Each cluster node and its child nodes train their respective pneumonia detection models locally using local pneumonia data;

[0126] Step 4: Collaborative training;

[0127] Collaborative training includes intra-cluster collaborative training and inter-cluster collaborative training; intra-cluster collaborative training includes cluster node aggregation training and child node random interactive training.

[0128] Cluster node aggregation training:

[0129] Step 4a1: Determine whether the current time t is divisible by t1. If yes, proceed to step 4b1; otherwise, return to step 3.

[0130] Step 4b1: Each cluster node receives the model gradient of the pneumonia detection model sent by its respective child nodes; averages the model gradient of the pneumonia detection model for all nodes in the cluster, including the cluster node and all its child nodes, to obtain the average gradient; sends the average gradient down to each child node in the cluster, updates the pneumonia detection model of each child node, and returns to step 3.

[0131] Random interactive training of child nodes:

[0132] Step 4a2: Determine whether the current time t is divisible by t2. If yes, proceed to step 4b2; otherwise, return to step 3.

[0133] Step 4b2: Randomly swap all child nodes belonging to the same cluster node to train the pneumonia detection model. After setting a time, return to step 3.

[0134] Inter-cluster collaborative training:

[0135] Step 4a3: Determine whether the current time t is divisible by t3. If yes, proceed to step 4b3; otherwise, return to step 3.

[0136] Step 4b3: The central node receives the average gradients of the pneumonia detection models sent by each cluster node, averages the C′ average gradients, and then sends them down to each cluster node to update the pneumonia detection models of each cluster node; return to step 3.

[0137] Step 5: Determine if time t4 has been reached. If so, proceed to step 1; otherwise, return to step 3.

Claims

1. A collaborative learning system based on a hierarchical topological pneumonia detection model, characterized in that, The system includes computers located in K nodes, each computer containing a memory storing pneumonia detection models. The K pneumonia detection models have different neural network weights, where K is an integer greater than 2. The K nodes are divided into one central node, C′ cluster nodes, and K-1-C′ child nodes. Cluster nodes communicate with the central node. Each cluster node corresponds to multiple communicating child nodes and communicates with its corresponding child nodes. C′ is an integer greater than 1 and less than K-1. The pneumonia detection model in each node computer is learned based on the following process: Step 1: Pre-training; Each of the K nodes uses local pneumonia data to pre-train its own pneumonia detection model locally; Step 2: Construct a hierarchical topology-based collaborative learning system; Step 2.1: The central node receives the model gradients of the respective pneumonia detection models sent by K nodes, and selects C′ cluster nodes from the K nodes according to the magnitude of the K model gradients; Step 2.2: Determine the child nodes corresponding to each cluster node based on the distance between the model gradients of the pneumonia detection models of the cluster nodes and the pneumonia detection models of the remaining K-1-C′ nodes; Step 3: Each cluster node and its child nodes train their respective pneumonia detection models locally using local pneumonia data; Step 4: Collaborative training; Collaborative training includes intra-cluster collaborative training and inter-cluster collaborative training; intra-cluster collaborative training includes cluster node aggregation training and child node random interactive training. Cluster node aggregation training: Step 4a1: Determine whether the current time t is divisible by t1. If yes, proceed to step 4b1; otherwise, return to step 3. Step 4b1: Each cluster node receives the model gradient of the pneumonia detection model sent by its respective child nodes; averages the model gradient of the pneumonia detection model for all nodes in the cluster, including the cluster node and all its child nodes, to obtain the average gradient; sends the average gradient down to each child node in the cluster, updates the pneumonia detection model of each child node, and returns to step 3. Random interactive training of child nodes: Step 4a2: Determine whether the current time t is divisible by t2. If yes, proceed to step 4b2; otherwise, return to step 3. Step 4b2: Randomly swap all child nodes belonging to the same cluster node to train the pneumonia detection model. After setting a time, return to step 3. Inter-cluster collaborative training: Step 4a3: Determine whether the current time t is divisible by t3. If yes, proceed to step 4b3; otherwise, return to step 3. Step 4b3: The central node receives the average gradient of the pneumonia detection model sent by each cluster node, averages the C′ average gradients and sends them down to each cluster node to update the pneumonia detection model of each cluster node. Return to step 3; Step 5: Determine if time t4 has been reached. If yes, end the current learning session and execute Step 1 for the next learning session. Otherwise, return to Step 3. Here, t1, t2, t3, and t4 are all set values.

2. The collaborative learning system based on a hierarchical topological pneumonia detection model according to claim 1, characterized in that, The local pneumonia data mentioned in steps 1 and 3 includes COVID-19 pneumonia, non-COVID-19 viral pneumonia, bacterial pneumonia, mycoplasma pneumonia, chlamydia pneumonia, fungal infections, pneumonia caused by physical and chemical factors, and health image data.

3. The collaborative learning system based on a hierarchical topological pneumonia detection model according to claim 2, characterized in that, The pneumonia detection model uses the ResNet50 network model.

4. The collaborative learning system based on a hierarchical topological pneumonia detection model according to any one of claims 1-3, characterized in that, In step 2.1, the central node receives the model gradients of the respective pneumonia detection models sent by K nodes. Using the farthest point sampling method, it selects C′ cluster nodes from the K nodes based on the magnitude of the K model gradients. Specifically: Step 2.11: Select a node P0 from the K nodes as the starting point to obtain the sampling point set S = {P0}; Step 2.12: Calculate the distance between the model gradient matrix of the pneumonia detection model of all other nodes and the model gradient matrix of the pneumonia detection model of node P0, forming a K-dimensional array L; select the node with the largest distance in the K-dimensional array L, take the node with the largest distance as node P1, and update the sampling node set S = {P0, P1}. Step 2.13: Calculate the distance between the model gradient matrix of the pneumonia detection model of all other nodes and the model gradient matrix of the pneumonia detection model of node P1. For each node Kq, q = 1, 2, ... K, if the distance between it and P1 is less than L[q], then update L[q] = d(Kq, P1); where L[q] is the q-th number in the array L calculated in step 2.12; d(Kq, P1) represents the distance between the model gradient matrices of node Kq and node P1. Step 2.14: Select the point corresponding to the maximum value in array L as P2, and update the sampling point set S = {P0, P1, P2}; Step 2.15: Repeat the operations of 2.12-2.14 until C′ target sampling points are sampled, and take each node in the sampling point set as a cluster node.

5. The collaborative learning system based on a hierarchical topological pneumonia detection model according to any one of claims 1-3, characterized in that, In step 4b1, the pneumonia detection model for each child node is updated based on the following formula: In the formula, Let be the neural network weights of the pneumonia detection model at the k-th node at time t+1. Let η be the neural network weight of the pneumonia detection model at the k-th node at time t. t Here, α is the learning rate, and α is the gradient weight coefficient. Let be the model gradient of child node k within the same cluster node c at time t. It is the average model gradient of all model gradients within the same cluster node c.

6. A collaborative learning method based on a hierarchical topological pneumonia detection model, characterized in that, Includes the following steps: Step 1: Pre-training; K nodes each use local pneumonia data to pre-train their own pneumonia detection models locally. The pneumonia detection models of different nodes have different neural network weights, where K is an integer greater than 2. Step 2: Construct a hierarchical topology-based collaborative learning system; Step 2.1: The central node receives the model gradients of the pneumonia detection models sent by K nodes, and selects C′ cluster nodes from the K nodes according to the magnitude of the K model gradients, where C′ is an integer greater than 1 and less than K-1. Step 2.2: Based on the distance between the model gradients of the pneumonia detection model of the cluster node and the pneumonia detection models of the remaining K-1-C′ nodes, determine the nodes under each cluster node and define the nodes under each cluster node as child nodes. Step 3: Each cluster node and its child nodes train their respective pneumonia detection models locally using local pneumonia data; Step 4: Collaborative training; Collaborative training includes intra-cluster collaborative training and inter-cluster collaborative training; intra-cluster collaborative training includes cluster node aggregation training and child node random interactive training. Cluster node aggregation training: Step 4a1: Determine whether the current time t is divisible by t1. If yes, proceed to step 4b1; otherwise, return to step 3. Step 4b1: Each cluster node receives the model gradient of the pneumonia detection model sent by its respective child nodes; averages the model gradient of the pneumonia detection model for all nodes in the cluster, including the cluster node and all its child nodes, to obtain the average gradient; sends the average gradient down to each child node in the cluster, updates the pneumonia detection model of each child node, and returns to step 3. Random interactive training of child nodes: Step 4a2: Determine whether the current time t is divisible by t2. If yes, proceed to step 4b2; otherwise, return to step 3. Step 4b2: Randomly swap all child nodes belonging to the same cluster node to train the pneumonia detection model. After setting a time, return to step 3. Inter-cluster collaborative training: Step 4a3: Determine whether the current time t is divisible by t3. If yes, proceed to step 4b3; otherwise, return to step 3. Step 4b3: The central node receives the average gradient of the pneumonia detection model sent by each cluster node, averages the C′ average gradients and sends them down to each cluster node to update the pneumonia detection model of each cluster node. Return to step 3; Step 5: Determine if time t4 has been reached. If yes, end the current learning session and execute Step 1 for the next learning session. Otherwise, return to Step 3. Here, t1, t2, t3, and t4 are all set values.

7. The collaborative learning method based on a hierarchical topological pneumonia detection model according to claim 6, characterized in that, The local pneumonia data mentioned in steps 1 and 3 includes COVID-19 pneumonia, non-COVID-19 viral pneumonia, bacterial pneumonia, mycoplasma pneumonia, chlamydia pneumonia, fungal infections, pneumonia caused by physical and chemical factors, and health image data.

8. The collaborative learning method based on a hierarchical topological pneumonia detection model according to claim 7, characterized in that, The pneumonia detection model uses the ResNet50 network model.

9. The collaborative learning method based on a hierarchical topological pneumonia detection model according to any one of claims 6-8, characterized in that, In step 2.1, the central node receives the model gradients of the respective pneumonia detection models sent by K nodes. Using the farthest point sampling method, it selects C′ cluster nodes from the K nodes based on the magnitude of the K model gradients. Specifically: Step 2.11: Select a node P0 from the K nodes as the starting point to obtain the sampling point set S = {P0}; Step 2.12: Calculate the distance between the model gradient matrix of the pneumonia detection model of all other nodes and the model gradient matrix of the pneumonia detection model of node P0, forming a K-dimensional array L; select the node with the largest distance in the K-dimensional array L, take the node with the largest distance as node P1, and update the sampling node set S = {P0, P1}. Step 2.13: Calculate the distance between the model gradient matrix of the pneumonia detection model of all other nodes and the model gradient matrix of the pneumonia detection model of node P1. For each node Kq, q = 1, 2, ... K, if the distance between it and P1 is less than L[q], then update L[q] = d(Kq, P1); where L[q] is the q-th number in the array L calculated in step 2.12; d(Kq, P1) represents the distance between the model gradient matrices of node Kq and node P1. Step 2.14: Select the point corresponding to the maximum value in array L as P2, and update the sampling point set S = {P0, P1, P2}; Step 2.15: Repeat the operations of 2.12-2.14 until C′ target sampling points are sampled, and take each node in the sampling point set as a cluster node.

10. The collaborative learning method based on a hierarchical topological pneumonia detection model according to claim 9, characterized in that, In steps 2.12 and 2.13, the distance d(A,B) between the model gradient matrices of the pneumonia detection models of the two nodes is calculated based on the following formula: Where m and n represent the number of rows and columns of the matrix, i and j represent the i-th row and j-th column of the matrix, respectively, and a ij b represents the element in the i-th row and j-th column of the model gradient matrix A. ij This represents the element in the i-th row and j-th column of the model gradient matrix B; in step 4b1, the pneumonia detection model of each child node is updated based on the following formula: In the formula, Let be the neural network weights of the pneumonia detection model at the k-th node at time t+1. Let η be the neural network weight of the pneumonia detection model at the k-th node at time t. t Here, α is the learning rate, and α is the gradient weight coefficient. Let be the model gradient of child node k within the same cluster node c at time t. It is the average model gradient of all model gradients within the same cluster node c.