Federal learning-based health state monitoring method, apparatus and device, and medium
By selecting representative clients in health status monitoring and updating local models with reference network weights, the problems of low communication costs and high accuracy are solved, and the accuracy of health status detection is improved while ensuring data privacy.
Patent Information
- Application Number
- CN202411722891.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-18
AI Technical Summary
The accuracy of health status detection is low while ensuring low communication costs and data privacy.
By obtaining the neural network weights of each client, clustering is performed to select representative clients, reducing communication costs, and updating the local model through the reference network weights calculated by the server to improve detection accuracy.
It effectively reduces communication costs, while improving the accuracy of health status detection and ensuring data privacy.
Smart Images

Figure CN119650062A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital medical technology, and in particular to a health status monitoring method, device, equipment and medium based on federated learning. Background Art
[0002] Chronic diseases are the main cause of hospitalization. Continuous monitoring of chronic diseases in patients by hospitals or medical institutions will consume a lot of medical resources and reduce the sustainability of the healthcare system. With the continuous rise of Internet of Things technology, more and more electronic health wearable devices, smart watches and other Internet of Things sensors are used as clients for patient health monitoring to achieve functions such as observing patient conditions, assisting in disease detection, health status reminders, self-diagnosis, and emergency monitoring. In order to improve the efficiency of health monitoring, it is necessary to intelligently process the patient data collected by the client. Currently, machine learning models are mostly used to process patient data.
[0003] However, machine learning models require a large amount of patient data to be aggregated into training sets for model training. In medical scenarios, patient data is private data, and centralized training will reduce the security and privacy of patient data. The existing federated learning architecture can be used to ensure data privacy, but the client and server in the federated learning architecture need to communicate frequently, especially when there are many clients for chronic disease detection, the communication cost is high. Existing methods usually use data compression, simplified training process and other methods to reduce communication costs, but it will also lead to poor model update effects, which in turn leads to low accuracy of health status detection. Therefore, how to improve the accuracy of health status detection while ensuring low communication costs and data privacy has become an urgent problem to be solved. Summary of the invention
[0004] In view of this, the embodiments of the present invention provide a health status monitoring method, apparatus, device and medium based on federated learning to solve the problem of low accuracy of health status detection while ensuring low communication cost and data privacy.
[0005] In a first aspect, an embodiment of the present invention provides a health status monitoring method based on federated learning, the health status monitoring method is applied to a digital medical platform, the digital medical platform includes a server, and a client connected to the server is a device for monitoring the health status of a patient, the health status monitoring method includes: Obtaining the neural network weight of the local model trained based on the patient's health status in each client, and clustering the N clients according to the similarity between the neural network weights corresponding to any two clients to obtain at least one cluster set, where N is an integer greater than one; For any cluster set, in the cluster set, the sum of similarities between the neural network weights of each client and other clients is counted to obtain the similarity statistics of the corresponding client, and the client corresponding to the maximum value of all similarity statistics is determined as the representative client of the corresponding cluster set; Each representative client sends its neural network weight to the server, and the server calculates a reference network weight based on all received neural network weights, and sends the reference network weight to each representative client; For any representative client, the representative client calculates the updated network weight based on its neural network weight and the reference network weight, and sends the updated network weight to other clients in the cluster set to which the representative client belongs. Each other client uses the updated network weight to update its local model to apply the updated local model to monitor the health status of the patient of the corresponding client.
[0006] In a second aspect, an embodiment of the present invention provides a health status monitoring device based on federated learning, wherein the health status monitoring device is applied to a digital medical platform, wherein the digital medical platform includes a server, and a client connected to the server is a device for monitoring the health status of a patient, wherein the health status monitoring device includes: A clustering processing module, used to obtain the neural network weight of the local model trained based on the patient's health status in each client, and cluster the N clients according to the similarity between the neural network weights corresponding to any two clients to obtain at least one cluster set, where N is an integer greater than one; A representative determination module is used to, for any cluster set, count the sum of similarities between the neural network weights of each client and other clients in the cluster set to obtain a similarity statistical value of the corresponding client, and determine that the client corresponding to the maximum value of all similarity statistical values is the representative client of the corresponding cluster set; A federated learning module, wherein each representative client sends its neural network weight to the server, and the server calculates a reference network weight based on all received neural network weights, and sends the reference network weight to each representative client; The model updating module is used for calculating the updated network weight for any representative client according to its neural network weight and the reference network weight, and sending the updated network weight to other clients in the clustering set to which the representative client belongs. Each other client uses the updated network weight to update its local model to apply the updated local model to monitor the health status of the patient of the corresponding client.
[0007] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the health status monitoring method as described in the first aspect when executing the computer program.
[0008] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the health status monitoring method as described in the first aspect is implemented.
[0009] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: Obtain the neural network weights of the local model trained based on the patient's health status in each client, cluster N clients according to the similarity between the neural network weights corresponding to any two clients, and obtain at least one cluster set. For any cluster set, in the cluster set, count the sum of the similarities between the neural network weights of each client and other clients to obtain the similarity statistics of the corresponding client, determine the client corresponding to the maximum value of all similarity statistics as the representative client of the corresponding cluster set, each representative client sends its neural network weight to the server, the server calculates the reference network weight based on all the received neural network weights, and sends the reference network weight to each representative client, for any representative client, the representative client calculates the updated network weight based on its neural network weight and the reference network weight, and sends the updated network weight to other clients in the cluster set to which the representative client belongs, each other client uses the updated network weight to update its local model, so as to apply the updated local model to monitor the patient health status of the corresponding client. By selecting a representative client, the server only needs to communicate with the representative client, reducing communication costs. The representative client combines the reference network weights sent by the server with its neural network weights to calculate the updated network weights, so that the updated network weights can achieve higher accuracy for its local patient data when applied to the local model of the representative client, and also provide other clients with network weights that are more suitable for local patient data, thereby improving the accuracy of the local models of all clients and the accuracy of patient health status detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative labor.
[0011] Figure 1 This is a schematic diagram of an application environment of a health status monitoring method based on federated learning provided in Embodiment 1 of the present invention; Figure 2 It is a flowchart of a health status monitoring method based on federated learning provided in Example 1 of the present invention; Figure 3 is a structural schematic diagram of a health status monitoring device based on federated learning provided in Embodiment 2 of the present invention; Figure 4 It is a structural diagram of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0012] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0013] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0014] It should also be understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0015] As used in the present specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]", depending on the context.
[0016] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0017] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0018] The embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0019] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0020] It should be understood that the order of execution of the steps in the following embodiments does not imply a precedence of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0021] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.
[0022] A health status monitoring method based on federated learning provided in the first embodiment of the present invention can be applied in the following aspects: Figure 1In the application environment, the client communicates with the server. The client includes but is not limited to PDAs, desktop computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, cloud terminal devices, personal digital assistants (PDAs) and other computer devices. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0023] Both the client and the server belong to the digital medical platform, which can refer to a medical and health service cloud platform created by combining medical technology with "cloud computing" based on new technologies such as cloud computing, mobile technology, multimedia, 4G communication, big data, and the Internet of Things, and realizing the sharing of medical resources and the expansion of medical scope. Because of the application of cloud computing technology, the medical cloud improves the efficiency of medical institutions and facilitates residents to seek medical treatment.
[0024] See also Figure 2 , is a flow chart of a health status monitoring method based on federated learning provided in the first embodiment of the present invention. The above health status monitoring method can be applied to Figure 1 The digital medical platform in the digital medical platform includes a server and a client connected to the server. The client is a device that monitors the patient's health status. The client can refer to an electronic health wearable device, a smart watch, and other IoT sensors. The client is bound to the patient to obtain the patient's physiological parameter data, such as blood pressure data, heart rate data, body temperature data, etc. Figure 2 As shown, the health status monitoring method may include the following steps: Step S201, obtain the neural network weights of the local model trained based on the patient's health status in each client, and cluster the N clients according to the similarity between the neural network weights corresponding to any two clients to obtain at least one cluster set.
[0025] Among them, the patient's health status can be characterized by the patient's physiological parameters, which may include blood pressure, heart rate, pulse, blood oxygen saturation, etc. The patient's physiological parameters can be collected by the client worn by the patient. The local model can refer to a model using a preset model architecture. The neural network weight can refer to the model weight parameter of the local model. The similarity can be used to characterize the difference between the neural network weights corresponding to the clients. A cluster set contains at least one client, and N is an integer greater than one.
[0026] Specifically, in this embodiment, there is a binding correspondence between a patient and a client. The local model in the client can determine its model type according to the downstream task of monitoring the patient's health status. For example, if the downstream task of monitoring the patient's health status is health status level classification, then the model type of the local model is a classification model. If the downstream task of monitoring the patient's health status is health status scoring, then the model type of the local model is a prediction model.
[0027] The similarity can be calculated using distance metrics such as Euclidean distance and cosine similarity. In this embodiment, cosine similarity is used to calculate the similarity. The value range of the cosine similarity calculation result is [-1, 1]. If the cosine similarity calculation result is closer to 1, the neural network weights corresponding to the two clients are more similar. If the cosine similarity calculation result is closer to -1, the neural network weights corresponding to the two clients are less similar.
[0028] It should be noted that since the preset model architecture adopted by the local model usually includes multiple network layers, when calculating the similarity, this embodiment calculates the similarity of the neural network weights layer by network layer, obtains the sub-similarity corresponding to each network layer, adds the sub-similarity corresponding to all network layers, and determines the addition result as the similarity.
[0029] The clustering process may adopt the clustering-based DBSCAN clustering algorithm, which can implement clustering process without presetting the number of cluster sets.
[0030] In one embodiment, the implementer can construct similarity graph data with the client as the node based on the similarity between the neural network weights corresponding to the client, assign an initial set to each node, traverse each node, temporarily add the node to the initial set corresponding to the node with the greatest similarity, and calculate the modularity gain of the initial set with the new node temporarily added to obtain a gain score. If the gain score meets the preset score range, the node is determined to be added to the initial set corresponding to the node with the greatest similarity, and the initial set corresponding to the node is deleted. If the gain score does not meet the preset score range, it is determined that the node still belongs to the corresponding initial set, and the steps of traversing each node, temporarily adding the node to the initial set corresponding to the node with the greatest similarity, and calculating the modularity gain of the initial set with the new node temporarily added to obtain the gain score are repeated, and the initial set of the node is determined according to the gain score until the initial sets of each node are fixed, and a number of updated initial sets are obtained, each of which may include at least one node.
[0031] Count the number of all initial sets to obtain the number of sets, compare the number of sets with a preset reference number, if the number of sets is less than or equal to the preset reference number, determine that each updated initial set is a clustering set, if the number of sets is greater than the preset reference number, regard each updated initial set as an initial set, repeat the above steps of traversing each node again, temporarily adding the node to the initial set corresponding to the node with the greatest similarity, calculate the modularity gain of the initial set with the new node temporarily added, obtain the gain score, and determine the initial set of the node according to the gain score, until the number of sets obtained by counting all initial sets is less than or equal to the preset reference number, and determine that each updated initial set is a clustering set.
[0032] The gain score may be calculated using a modularity gain function, and the preset score range may be set to [-0.5, 1].
[0033] Optionally, each client is deployed with a local model pre-trained based on local patient data; Get the neural network weights of the local model trained based on the patient's health status in each client, including: The server sends the preset reference patient data to each patient client; For any client, the client updates the model weights of the local model deployed on the client based on the reference patient data, obtains the initial update weights, and determines the initial update weights as the neural network weights of the corresponding client.
[0034] Among them, pre-training may refer to training the local model based on local patient data and its manually annotated labels, reference patient data may refer to representative patient data selected by the server, in order to ensure the privacy of patient data, reference patient data may use simulated data, and initial update weights may refer to the local model weights updated according to the reference patient data.
[0035] In this embodiment, the model weights of the client's local model are updated through the reference patient data provided by the server, which can effectively avoid overfitting of the model weights of the local model. At the same time, the generalization ability of the local model can be improved to adapt to changes in patients bound to the client, thereby improving the flexibility and accuracy of patient health status monitoring.
[0036] The above-mentioned step of obtaining the neural network weights of the local model trained based on the patient's health status in each client, clustering the N clients according to the similarity between the neural network weights corresponding to any two clients, and obtaining at least one clustering set provides a selection basis for the subsequent selection of representative clients, so that the selected representative clients can effectively characterize the characteristics of a class of patients, thereby making the overall federated learning process reliably guaranteed in terms of accuracy on the basis of improving efficiency.
[0037] Step S202, for any cluster set, in the cluster set, the sum of the similarities between the neural network weights of each client and other clients is counted to obtain the similarity statistics of the corresponding clients, and the client corresponding to the maximum value of all similarity statistics is determined as the representative client of the corresponding cluster set.
[0038] Among them, the similarity statistics can be used to characterize the differences between the corresponding client and other clients in the cluster set to which it belongs, and the representative client can be used as a representative of all clients in the cluster set to which it belongs to perform subsequent federated learning processes.
[0039] In the above steps, for any cluster set, the sum of the similarities between the neural network weights of each client and other clients in the cluster set is counted to obtain the similarity statistics of the corresponding clients, and the client corresponding to the maximum value of all similarity statistics is determined as the representative client of the corresponding cluster set. By selecting the representative client, the number of participants in federated learning is greatly reduced, thereby effectively reducing the communication pressure of the federated learning process and saving communication overhead costs.
[0040] In step S203, each representative client sends its neural network weight to the server, and the server calculates the reference network weight based on all received neural network weights and sends the reference network weight to each representative client.
[0041] Among them, the reference network weight may refer to the network weight obtained by the server based on the integration of neural network weights provided by multiple clients.
[0042] Optionally, the server calculates the reference network weights based on all received neural network weights, including: Obtaining the local data volume of each representative client, and mapping the local data volume of each representative client to an update weight of the corresponding representative client using a preset mapping table, wherein the mapping table includes a mapping relationship between the local data volume and the update weight; The server performs weighted calculation based on the neural network weights and updated weights received from all the clients representing the client to obtain the reference network weights.
[0043] Among them, the local data volume may refer to the amount of local patient data representing the client. The local data volume is not private data, so the server can directly access it on behalf of the client. The mapping table may include a mapping relationship between the local data volume and the updated weight. The updated weight may refer to the weighted calculation of the client's neural network weight.
[0044] In one implementation, the mapping between the local data volume and the update weight may also be implemented using a mapping function. For example, the mapping function may be expressed as: Among them, y can represent the mapping result, that is, the updated weight, and x can represent the amount of local data. The mapping function can map the amount of local data to The mapping results within the range can be used as the update weights.
[0045] In this embodiment, the weighted addition method is adopted to combine the neural network weights of all representative clients to calculate the reference network weight. The reference network weight can be considered to be obtained by collaborative training of local patient data of multiple representative clients. While ensuring the privacy of local patient data of representative clients, the generalization ability of the reference network weight is improved.
[0046] Optionally, the neural network weights include base network weights and local network weights; Each representative client sends its neural network weights to the server, including: Each representative client sends the base network weights in its neural network weights to the server.
[0047] Among them, the basic network weight may refer to the weight of a shallow network layer in the local model, and the local network weight may refer to the weight of a deep network layer in the local model.
[0048] Specifically, in this embodiment, the preset model architecture of the local model includes a convolutional layer and a fully connected layer. The convolutional layer can be used to extract feature information of the input data, and the fully connected layer can be used to map the feature information to output results. The weights of the convolutional layer can be used as the basic network weights, and the weights of the fully connected layer can be used as the local network weights.
[0049] In this embodiment, only the basic network weights of the shallow network layer are sent to the server. While improving the generalization ability of the model through federated learning, the personalization ability of the local model can be retained through the local network weights of the deep network layer, so that the accuracy of the overall model when applied to local patient data can be greatly improved.
[0050] Each of the above-mentioned representative clients sends its neural network weights to the server. The server calculates the reference network weights based on all the received neural network weights, and sends the reference network weights to each representative client. Federated learning is performed based on the representative clients, and federated learning interaction is achieved with less communication pressure, which is more conducive to the implementation of the federated learning solution in the health status monitoring task.
[0051] Step S204, for any representative client, the representative client calculates the updated network weight according to its neural network weight and the reference network weight, and sends the updated network weight to other clients in the cluster set to which the representative client belongs. Each other client updates its local model using the updated network weight to apply the updated local model to monitor the health status of the patient of the corresponding client.
[0052] Herein, updating the network weight may refer to weight parameters for distribution to non-representative clients.
[0053] Optionally, the representative client calculates the updated network weights based on its neural network weights and the reference network weights, including: The client calculates the optimized network weight according to the basic network weight and reference network weight in its neural network weight; The updated network weight is formed by optimizing the network weight and the local network weight.
[0054] The optimized network weights may refer to the updated results of the basic network weights.
[0055] In one implementation, the implementer may directly use the reference network weights as the optimized network weights.
[0056] Optionally, the representative client calculates the optimized network weight according to the basic network weight and the reference network weight in its neural network weight, including: The client multiplies the basic network weight by the preset first weight to obtain a first multiplication result; Multiplying the reference network weight and the preset second weight value to obtain a second multiplication result; The first multiplication result and the second multiplication result are added together to obtain the optimized network weight.
[0057] Among them, the first weight can characterize the influence of the basic network weight on the optimized network weight, the first multiplication result can characterize the influence of the basic network weight on the optimized network weight, the second weight can characterize the influence of the reference network weight on the optimized network weight, and the second multiplication result can characterize the influence of the reference network weight on the optimized network weight.
[0058] Specifically, in this embodiment, the first weight may be set to 0.3, and the second weight may be set to 0.7. It should be noted that the sum of the first weight and the second weight may be a fixed value. For example, in this embodiment, the fixed value is 1.
[0059] Optionally, the health status monitoring method further includes: For any non-representative client, after the non-representative client receives the updated network weight sent by the representative client in the cluster set to which it belongs, the local model of the non-representative client is updated using the updated network weight to obtain the updated local model corresponding to the non-representative client; The updated local model is trained again using the local patient data collected locally by the non-representative client to obtain a trained local model.
[0060] Among them, the updated local model may refer to a local model configured with updated network weights, and the trained local model may refer to a local model that has been personalized trained based on local patient data.
[0061] In the above-mentioned steps, for any representative client, the representative client calculates the updated network weight according to its neural network weight and the reference network weight, and sends the updated network weight to other clients in the cluster set to which the representative client belongs. Each other client updates its local model using the updated network weight to apply the updated local model to monitor the health status of the patient of the corresponding client. The updated network weight is distributed from the representative client to the non-representative clients, which is decoupled from the federated learning process, does not increase the communication cost of the federated learning process, and realizes a large-scale joint update of clients.
[0062] In this embodiment, by selecting a representative client, the server only needs to communicate with the representative client, thereby reducing communication costs. The representative client combines the reference network weights sent by the server with its neural network weights to calculate updated network weights, so that the updated network weights can achieve higher accuracy for its local patient data when applied to the local model of the representative client, and also provide other clients with network weights that are more suitable for local patient data, thereby improving the accuracy of the local models of all clients and thereby improving the accuracy of patient health status detection.
[0063] Corresponding to the health status monitoring method based on federated learning in the above embodiment, Figure 3 The structural block diagram of the health status monitoring device based on federated learning provided in the second embodiment of the present invention is shown. The health status monitoring device is applied to a digital medical platform. The digital medical platform includes a server and a client connected to the server. The client is a device for monitoring the health status of a patient. The client may refer to an electronic health wearable device, a smart watch or other IoT sensor. The client is bound to the patient to obtain the patient's physiological parameter data, such as blood pressure data, heart rate data, body temperature data, etc. For ease of explanation, only the part related to the embodiment of the present invention is shown.
[0064] See also Figure 3 , the health status monitoring device comprises: A clustering processing module 31 is used to obtain the neural network weight of the local model trained based on the patient's health status in each client, and cluster the N clients according to the similarity between the neural network weights corresponding to any two clients to obtain at least one cluster set, where N is an integer greater than one; The representative determination module 32 is used for counting the sum of similarities between the neural network weights of each client and other clients in any cluster set, obtaining a similarity statistical value of the corresponding client, and determining the client corresponding to the maximum value of all similarity statistical values as the representative client of the corresponding cluster set; A federated learning module 33, for each representative client to send its neural network weight to the server, and the server calculates a reference network weight based on all received neural network weights, and sends the reference network weight to each representative client; The model updating module 34 is used for calculating the updated network weight for any representative client based on its neural network weight and the reference network weight, and sending the updated network weight to other clients in the clustering set to which the representative client belongs. Each other client updates its local model using the updated network weight to apply the updated local model to monitor the health status of the patient of the corresponding client.
[0065] Optionally, each client is deployed with a local model pre-trained based on local patient data; The clustering processing module 31 includes: A data distribution unit, used for the server to send preset reference patient data to each patient client; The initial update unit is used to update the model weights of the local model deployed on any client according to the reference patient data, obtain the initial update weights, and determine the initial update weights as the neural network weights of the corresponding client.
[0066] Optionally, the above-mentioned federated learning module 33 includes: A weight mapping unit, used to obtain the local data volume of each representative client, and use a preset mapping table to map the local data volume of each representative client to an update weight corresponding to the representative client, wherein the mapping table includes a mapping relationship between the local data volume and the update weight; The weighted calculation unit is used for the server to obtain the reference network weight by weighted calculation based on the received neural network weights and updated weights of all the clients.
[0067] Optionally, the neural network weights include base network weights and local network weights; The above-mentioned federated learning module 33 includes: The local weight upload unit is used for each representative client to send the basic network weights in its neural network weights to the server.
[0068] Optionally, the model updating module 34 includes: The optimized weight calculation unit is used to calculate the optimized network weight on behalf of the client according to the basic network weight and the reference network weight in its neural network weight; The updated weight forming unit is used to form an updated network weight by optimizing the network weight and the local network weight.
[0069] Optionally, the above-mentioned update weight forming unit includes: A first weighting subunit, configured to multiply the basic network weight and a preset first weight value on behalf of the client to obtain a first multiplication result; A second weighting subunit, used for multiplying the reference network weight and a preset second weight value to obtain a second multiplication result; The optimized weight determination subunit is used to add the first multiplication result and the second multiplication result to obtain the optimized network weight.
[0070] Optionally, the above health status monitoring device further includes: A local model updating module is used for updating the local model of any non-representative client using the updated network weight after the non-representative client receives the updated network weight sent by the representative client in the cluster set to which it belongs, so as to obtain an updated local model corresponding to the non-representative client; The local model training module is used to use the local patient data collected locally by the non-representative client to re-train the updated local model to obtain a trained local model.
[0071] It should be noted that the information interaction, execution process, etc. between the above-mentioned modules, units, and sub-units are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0072] Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Figure 4 As shown, the computer device of this embodiment includes: at least one processor ( Figure 4 Only one is shown in the figure), a memory, and a computer program stored in the memory and executable on at least one processor, wherein when the processor executes the computer program, the steps of any of the above-mentioned health status monitoring method embodiments are implemented.
[0073] The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that Figure 4 These are merely examples of computer devices and do not constitute limitations on the computer devices. The computer devices may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, they may also include a network interface, a display screen, and an input device.
[0074] The processor may be a CPU, or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0075] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory may be the memory of a computer device, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments, it may also be an external storage device of the computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Further, the memory may also include both an internal storage unit of the computer device and an external storage device. The memory is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of a computer program, etc. The memory may also be used to temporarily store data that has been output or is to be output.
[0076] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the above-mentioned method embodiment, which will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiment can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0077] The present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by a computer program product. When the computer program product runs on a computer device, the computer device can implement the steps in the above-mentioned method embodiment when executing.
[0078] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0079] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0080] In the embodiments provided by the present invention, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0081] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0082] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A health status monitoring method based on federated learning, characterized in that: The health status monitoring method is applied to a digital medical platform, the digital medical platform includes a server, and a client connected to the server is a device for monitoring the health status of a patient; The health status monitoring method comprises: Obtaining the neural network weight of the local model trained based on the patient's health status in each client, and clustering the N clients according to the similarity between the neural network weights corresponding to any two clients to obtain at least one cluster set, where N is an integer greater than one; For any cluster set, in the cluster set, the sum of similarities between the neural network weights of each client and other clients is counted to obtain the similarity statistics of the corresponding client, and the client corresponding to the maximum value of all similarity statistics is determined as the representative client of the corresponding cluster set; Each representative client sends its neural network weight to the server, and the server calculates a reference network weight based on all received neural network weights, and sends the reference network weight to each representative client; For any representative client, the representative client calculates the updated network weight based on its neural network weight and the reference network weight, and sends the updated network weight to other clients in the cluster set to which the representative client belongs. Each other client uses the updated network weight to update its local model to apply the updated local model to monitor the health status of the patient of the corresponding client.
2. The health status monitoring method according to claim 1, characterized in that: Each client is deployed with a local model pre-trained based on local patient data; The obtaining of the neural network weights of the local model trained based on the patient's health status in each client includes: The server sends the preset reference patient data to each patient client; For any client, the client updates the model weights of the local model deployed by the client according to the reference patient data to obtain initial update weights, and determines the initial update weights as the neural network weights corresponding to the client.
3. The health status monitoring method according to claim 1, characterized in that: The server calculates the reference network weights based on all received neural network weights, including: Acquire the local data volume of each representative client, and use a preset mapping table to map the local data volume of each representative client to an update weight corresponding to the representative client, wherein the mapping table includes a mapping relationship between the local data volume and the update weight; The server performs weighted calculation based on the received neural network weights and updated weights representing all the clients to obtain the reference network weights.
4. The health status monitoring method according to claim 1, characterized in that: The neural network weights include basic network weights and local network weights; Each representative client sends its neural network weight to the server, including: Each representative client sends the basic network weights in its neural network weights to the server.
5. The health status monitoring method according to claim 4, characterized in that: The representative client calculates and updates the network weight according to its neural network weight and the reference network weight, including: The representative client calculates the optimized network weight according to the basic network weight in its neural network weight and the reference network weight; The updated network weight is formed by the optimized network weight and the local network weight.
6. The health status monitoring method according to claim 5, characterized in that: The representative client calculates the optimized network weight according to the basic network weight in its neural network weight and the reference network weight, including: The representative client multiplies the basic network weight and a preset first weight value to obtain a first multiplication result; Multiplying the reference network weight and a preset second weight value to obtain a second multiplication result; The first multiplication result and the second multiplication result are added to obtain the optimized network weight.
7. The health status monitoring method according to any one of claims 1 to 6, characterized in that: The health status monitoring method further includes: For any non-representative client, after the non-representative client receives the updated network weight sent by the representative client in the cluster set to which it belongs, the local model of the non-representative client is updated using the updated network weight to obtain an updated local model corresponding to the non-representative client; The updated local model is trained again using the local patient data collected locally by the non-representative client to obtain a trained local model.
8. A health status monitoring device based on federated learning, characterized in that: The health status monitoring device is applied to a digital medical platform, the digital medical platform includes a server, and a client connected to the server is a device for monitoring the health status of a patient. The health status monitoring device includes: A clustering processing module, used to obtain the neural network weight of the local model trained based on the patient's health status in each client, and cluster the N clients according to the similarity between the neural network weights corresponding to any two clients to obtain at least one cluster set, where N is an integer greater than one; A representative determination module is used to, for any cluster set, count the sum of similarities between the neural network weights of each client and other clients in the cluster set to obtain a similarity statistical value of the corresponding client, and determine that the client corresponding to the maximum value of all similarity statistical values is the representative client of the corresponding cluster set; A federated learning module, wherein each representative client sends its neural network weight to the server, and the server calculates a reference network weight based on all received neural network weights, and sends the reference network weight to each representative client; The model updating module is used for calculating the updated network weight for any representative client according to its neural network weight and the reference network weight, and sending the updated network weight to other clients in the clustering set to which the representative client belongs. Each other client uses the updated network weight to update its local model to apply the updated local model to monitor the health status of the patient of the corresponding client.
9. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the health status monitoring method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the health status monitoring method according to any one of claims 1 to 7 is implemented.