Federal optimization method, device and equipment for old-age care health and medium
By loading a lightweight parameter-efficient fine-tuning adapter on edge devices and combining it with multi-level compression and privacy protection technologies, the problems of limited device resources and privacy sensitivity in elderly care and health scenarios are solved, achieving efficient and secure federated learning training.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2026-01-09
- Publication Date
- 2026-04-24
AI Technical Summary
In the context of elderly care and health, edge devices suffer from weak computing power, low network bandwidth, and sensitive data privacy, making it impossible for them to participate in federated learning and collaborative training efficiently and securely.
By collaboratively implementing the loading and local fine-tuning of a lightweight parameter-efficient adapter on the edge device side, combined with multi-level compression based on change detection and local differential privacy injection and homomorphic encryption, encrypted update data is generated and uploaded to the cloud server.
While protecting the privacy of elderly people's health data, this approach significantly reduces the communication overhead and computational load of single devices participating in federated learning, ensuring the overall performance and convergence efficiency of the model, and achieving feasible, efficient, and secure federated learning collaboration.
Smart Images

Figure CN121920473A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and healthcare, and in particular to a federated optimization method, apparatus, device, and medium for elderly health. Background Technology
[0002] With the increasing global trend of population aging, smart elderly care has become an important development direction in the health service sector. Real-time early warning and intervention for falls, abnormal behaviors, and changes in vital signs among the elderly, achieved through artificial intelligence technology, especially deep learning-based behavioral recognition and health monitoring models, is key to improving the quality and efficiency of elderly care services. However, building high-precision models relies on large-scale, diverse, and high-quality health data, which is typically scattered across various elderly care institutions, communities, and families, forming data silos. Because medical and health data is subject to strict laws and regulations, the centralized collection and sharing of such data across institutions poses significant privacy compliance risks, severely limiting the feasibility of centralized model training models.
[0003] To address data privacy and data silo issues, federated learning, as a distributed machine learning paradigm, has been introduced into the healthcare field. Under this framework, participating institutions do not need to upload raw local data; they can collaboratively train a global model simply by exchanging model parameters, thus theoretically meeting the requirements of data locality and privacy protection. However, directly applying traditional federated learning to elderly care and healthcare scenarios faces significant practical challenges. First, most edge devices deployed in elderly care facilities or homes (such as monitoring cameras, wearable sensors, and edge computing boxes) have limited computing power and memory, making it difficult to support complete modern deep neural networks. Second, the network connections of these nodes are often unstable and have limited bandwidth; frequent transmission of large amounts of complete model parameters generates high communication overhead, leading to low training efficiency or even making training impossible. Furthermore, even without transmitting raw data, traditional parameter exchange methods can still leak private information through model reverse engineering attacks or member inference attacks, failing to meet the extremely high privacy and security standards of the healthcare field.
[0004] Existing technologies attempt to partially alleviate the aforementioned problems through model split learning and efficient parameter fine-tuning. Model split learning divides the model into client and server parts, with the client only needing to compute the first few layers and upload intermediate activation values, thereby reducing the computational burden on the edge side. However, in elderly care and health scenarios, the amount of activation data generated by continuous monitoring is still enormous, putting pressure on limited network bandwidth. PEFT technology significantly reduces the number of parameters that need to be updated by introducing a small number of trainable adapters to fine-tune large models. However, existing PEFT methods lack collaborative optimization designs for communication efficiency in federated learning scenarios and do not fully consider the dynamic impact of edge device heterogeneity on model splitting strategies.
[0005] Therefore, in the specific service scenario of elderly care and health, there is an urgent need for an innovative federated learning technology solution. This solution needs to be able to simultaneously address multiple challenges such as limited edge device resources, insufficient network bandwidth, sensitive health data privacy, and poor multi-node collaborative scalability, thereby achieving a distributed health monitoring model training and optimization system that is efficient, lightweight, secure, and reliable. Summary of the Invention
[0006] This invention provides a federated optimization method, apparatus, device, and medium for elderly care and health, aiming to solve the technical problem that edge devices in elderly care and health scenarios cannot participate in federated learning and collaborative training efficiently and securely due to weak computing power, low network bandwidth, and data privacy sensitivity.
[0007] In a first aspect, embodiments of the present invention provide a federated optimization method for elderly health, executed by edge devices deployed in elderly care facilities, including: Receive model splitting instructions and adapter configurations from the cloud server; According to the model segmentation instructions and adapter configuration, load the corresponding partial neural network model and the lightweight parameter fine-tuning adapter; Using local elderly health monitoring data, the forward computation of the partial neural network model is performed to generate intermediate activation values, and based on the adapter configuration information, the parameters of the lightweight parameter efficient fine-tuning adapter are fine-tuned locally only. Change detection is performed on the intermediate activation values to identify the significant changes relative to the previous round of calculation results, and multi-level compression processing of sparsification, quantization and entropy coding is performed on the significant changes to generate compressed activation data. Differential privacy noise is injected into the compressed activation data and the fine-tuned adapter parameters, and homomorphic encryption is performed to generate encrypted update data; The encrypted update data is uploaded to the cloud server, and the global adapter parameters, which are securely aggregated by the cloud server, are received to update the local adapter.
[0008] Secondly, embodiments of the present invention also provide a federated optimization device for elderly health, deployed in elderly care facilities, comprising: The instruction data receiving module is used to receive model splitting instructions and adapter configurations from the cloud server; The model loading module loads the corresponding partial neural network model and a lightweight parameter fine-tuning adapter according to the model segmentation instruction and adapter configuration. The local fine-tuning module is used to perform forward computation of the partial neural network model using local elderly health monitoring data to generate intermediate activation values, and to perform local fine-tuning only on the parameters of the lightweight parameter efficient fine-tuning adapter according to the adapter configuration information. The intelligent compression module is used to detect changes in the intermediate activation values, identify the significant changes relative to the previous calculation result, and perform multi-level compression processing of the significant changes, including sparsification, quantization, and entropy encoding, to generate compressed activation data. The privacy protection module is used to inject differential privacy noise into the compressed activation data and the fine-tuned adapter parameters and perform homomorphic encryption to generate encrypted update data; The adapter update module is used to upload the encrypted update data to the cloud server and receive global adapter parameters that have been securely aggregated by the cloud server to update the local adapter.
[0009] Thirdly, embodiments of the present invention also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-mentioned federated optimization method for elderly health.
[0010] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described federated optimization method for elderly health.
[0011] This invention, through collaborative implementation of a lightweight parameter-efficient fine-tuning adapter for loading and local fine-tuning on the edge device side, combined with multi-level compression and local differential privacy injection and homomorphic encryption, effectively solves the bottlenecks of limited computing resources and insufficient network bandwidth on edge devices while strictly protecting the privacy of elderly health data. It significantly reduces the communication overhead and computational load of a single device participating in federated learning. At the same time, by receiving and applying globally aggregated parameters securely in the cloud, it ensures the overall performance and convergence efficiency of the model under distributed training, thereby realizing feasible, efficient and secure federated learning collaboration in resource-constrained elderly health service scenarios. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating the federated optimization method for elderly health provided in an embodiment of the present invention; Figure 2 A schematic diagram of the local fine-tuning process provided for an embodiment of the present invention; Figure 3 This is a schematic diagram of the intermediate activation value change detection process provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the multi-level compression process provided in an embodiment of the present invention; Figure 5 A schematic diagram of the data encryption process provided for embodiments of the present invention; Figure 6 A schematic diagram of the preliminary evaluation process for the segmentation scheme provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the process for switching health monitoring task types according to an embodiment of the present invention; Figure 8 A schematic diagram of a federal optimization device for elderly health provided in an embodiment of the present invention; Figure 9 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0015] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0016] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0017] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0018] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0019] Please see Figure 1 This invention provides a federated optimization method for elderly care and health, executed by edge devices deployed in elderly care facilities, including steps S1-S6: S1. Receive model splitting instructions and adapter configuration from the cloud server.
[0020] In this embodiment, a specific example is taken: a nationwide collaborative training of a fall detection model for elderly care institutions. The cloud server makes unified decisions based on the device information reported by the participants (e.g., 120 elderly care institutions). For example, for institution A with strong computing power (e.g., equipped with an NVIDIA Jetson Nano module) and a stable network, the cloud may instruct it to load an edge-side model segment containing the first 8 layers of a 12-layer Transformer; for institution B with more limited resources (e.g., using a Raspberry Pi 4B), it may instruct it to load only the first 4 layers. Adapter configuration typically refers to the specific parameters of the low-rank adapter (LoRA), such as a rank of 4 and a scaling factor of 8, which is distributed in JSON format. This step realizes the core idea of dynamically allocating computational load based on device heterogeneity, laying the foundation for subsequent efficient training.
[0021] S2. Load the corresponding partial neural network model and lightweight parameter fine-tuning adapter according to the model segmentation instruction and adapter configuration.
[0022] In this embodiment, the edge device (such as an intelligent monitoring terminal within an institution) parses the received instructions and configuration. The device downloads the specified model fragment (such as the weight file for the first 8 layers) and adapter initialization file (such as a small matrix of size [d_model, rank]) from local cache or the cloud. After loading, the parameters of the first 8 layers of the original large model (such as ViT-Base) are frozen and cannot be trained, while the LoRA adapter is inserted as a trainable bypass module into the self-attention or feedforward network structure of these layers. Since the number of adapter parameters is usually only 0.5%-2% of the original model parameters, for example, only about 1.72 million parameters are fine-tuned from 86 million parameters, this greatly reduces the memory usage and computation required for local training, making it possible to update the model on resource-constrained edge devices.
[0023] S3. Using local elderly health monitoring data, perform forward computation of the partial neural network model to generate intermediate activation values, and based on the adapter configuration information, perform local fine-tuning only on the parameters of the lightweight parameter efficient fine-tuning adapter.
[0024] In a specific embodiment, such as Figure 2 As shown, in step S3, based on the adapter configuration information, locally fine-tuning only the parameters of the lightweight parameter efficient fine-tuning adapter includes: S31. Freeze all the original parameters of the partial neural network model, keeping only the lightweight parameter efficient fine-tuning adapter in a trainable state.
[0025] In this embodiment, the device uses locally collected video clips of the elderly's daily activities (which have been anonymized) as input data. During forward propagation, the data flows through the loaded frozen model fragments (such as the first 8 layers), generating high-dimensional intermediate activation tensors (e.g., with a shape of [batch_size, seq_len, 768]). During backpropagation, the calculated gradients only flow to the two low-rank matrices (matrices A and B) of the LoRA adapter, while the weight gradients of the original Transformer layers are masked (set to 0). This strategy of freezing the backbone and fine-tuning the bypass ensures that the model can quickly adapt to local data distributions (such as specific indoor lighting and the elderly's clothing habits) while avoiding catastrophic forgetting and significantly reducing the computational cost per iteration.
[0026] S32. Calculate the loss function using local elderly health monitoring data, and update the gradient only to the parameters of the lightweight parameter efficient fine-tuning adapter using the backpropagation algorithm.
[0027] In this embodiment, taking a binary classification task of fall detection as an example, the loss function is typically cross-entropy loss. After the device calculates the loss value using a batch of local data, the gradient is only allowed to update the parameters of the LoRA adapter through the backpropagation algorithm. Specifically, for LoRA inserted in the self-attention module, its forward process can be represented as: h = W_0*x + BA*x, where W_0 is the frozen original weights, and B and A are trainable low-rank matrices. The gradient only updates B and A. This mechanism makes local training 5-10 times faster than fine-tuning a full-parameter model, and reduces peak memory consumption by more than 60%, making it very suitable for running on edge devices.
[0028] S33. During the fine-tuning process, continuously monitor the computing resource usage of this device. If it exceeds the preset threshold, automatically reduce the training batch size or learning rate.
[0029] In this embodiment, the device operating system or a dedicated monitoring process collects information such as CPU utilization, GPU memory usage, and temperature in real time. For example, a preset threshold could be 80% GPU memory usage or a chip temperature of 75°C. Once the threshold is triggered, the system automatically reduces the training batch size from 8 to 4, or dynamically multiplies the learning rate by a decay factor (such as 0.5). This adaptive adjustment mechanism ensures that the training process runs stably within the device resource boundaries, preventing process crashes or device overheating due to resource overload, and enhancing the system's robustness in complex field environments.
[0030] S4. Perform change detection on the intermediate activation values, identify the significant changes relative to the previous round of calculation results, and perform multi-level compression processing of sparsification, quantization and entropy encoding on the significant changes to generate compressed activation data.
[0031] In a specific embodiment, such as Figure 3 As shown, in step S4, the intermediate activation value undergoes change detection, and the significant changes relative to the previous calculation result are identified, including: S41. Perform differential calculation between the intermediate activation value generated by the current forward calculation and the intermediate activation value at the corresponding position in the previous round of local cache.
[0032] In this embodiment, the device subtracts element-wise the intermediate activation value tensor (denoted as Act_t) calculated in step S3 of the current round from the corresponding activation value (denoted as Act_{t-1}) stored in local memory or solid-state drive from the previous round, obtaining the difference tensor Δ = Act_t - Act_{t-1}. This comparison is based on a key observation: in consecutive rounds of federated learning, for most input data, the output changes of the intermediate layers of the model are gradual and sparse. Directly transmitting complete activation values contains a large amount of redundant information. Through difference calculation, the focus can be placed on the amount of change generated by the model due to local data learning, providing a foundation for subsequent efficient compression.
[0033] S42. Calculate the norm or mean of the difference results as a measure of the magnitude of change.
[0034] In this embodiment, to further determine whether the change is significant, the device calculates the Frobenius norm of the difference tensor Δ or the average of the absolute values of all elements. For example, it calculates the L2 norm ||Δ||_F. This scalar value quantifies the overall difference between the activation value in this round and the previous round.
[0035] S43. Compare the change magnitude with a threshold preset from the cloud server or locally. Only when the threshold is exceeded will the subsequent compression and upload process be triggered.
[0036] In this embodiment, the preset threshold θ may be dynamically adjusted by the cloud based on the global training status (e.g., initially 0.1), or set locally based on historical data. If the calculated change magnitude ‖Δ‖_F < θ, the model is considered relatively stable on the current local data, and the resulting activation value update contributes little to the global model. The device will skip this upload and only upload a very small no-update flag, thus saving a significant amount of bandwidth. Only when ‖Δ‖_F ≥ θ is the difference tensor Δ marked as a significantly changed part and sent to the compression pipeline. This selective triggering mechanism can filter out up to 70% of unnecessary communication rounds and is one of the core methods for reducing communication overhead.
[0037] In a specific embodiment, such as Figure 4 As shown, in step S4, the multi-level compression process of sparsification, quantization, and entropy coding on the significantly changed portion includes: S44. Based on the preset sparsity rate, set the element with the smallest absolute value in the significantly changed part to zero to complete the sparsification process.
[0038] In this embodiment, the device first performs sparsification on the differential tensor Δ that needs to be transmitted. For example, a sparsity rate of 90% is set, meaning that the 10% of elements with the largest absolute values are retained, and the remaining 90% of elements are forced to zero. Specifically, a Top-K algorithm can be used to find the top 10% of elements with the largest absolute values in Δ and their indexes. After sparsification, the originally dense floating-point tensor is transformed into a highly sparse data structure, mainly containing non-zero values and their coordinates, creating excellent conditions for subsequent compression. This step can initially reduce the data volume by approximately 90%.
[0039] S45. For the non-zero elements after sparsification, map them from high-precision floating-point numbers to low-bit-width fixed-point representations to complete the quantization process.
[0040] In this embodiment, the retained non-zero floating-point values (such as FP32) are quantized. For example, symmetric uniform quantization is used to map these values to the range of 8-bit integers (INT8). First, the maximum absolute value of the non-zero value is calculated to determine the scaling factor. Then, each floating-point number is divided by the scaling factor and rounded to the nearest integer. The quantized data is reduced from 32-bit representation to 8 bits, directly reducing storage space by 75%. Although a small amount of precision loss is introduced, this loss is generally acceptable and can be mitigated by aggregation averaging in the context of federated learning.
[0041] S46. Use statistical coding algorithms to perform lossless compression on the quantized data to complete the entropy coding process.
[0042] In this embodiment, entropy coding algorithms, such as Huffman coding or arithmetic coding, are applied to the quantized integer data and its position index information. Because the data distribution exhibits obvious statistical characteristics after sparsification and quantization (e.g., a large number of 0 values and non-zero values concentrated within a certain range), entropy coding can further eliminate statistical redundancy. For example, short codewords can be assigned to frequently occurring values (such as 0 and small integers). After this three-stage compression pipeline (sparserification, quantization, and entropy coding), the final size of the compressed activation data to be transmitted may only be 5%-15% of the original activation value tensor, improving communication efficiency by an order of magnitude.
[0043] S5. Inject differential privacy noise into the compressed activation data and the fine-tuned adapter parameters and perform homomorphic encryption to generate encrypted update data.
[0044] In a specific embodiment, such as Figure 5 As shown, in step S5, injecting differential privacy noise into the compressed activation data and the fine-tuned adapter parameters includes: S51. Calculate the local privacy budget that can be allocated in this round based on the sensitivity of the local health monitoring data, the global privacy budget issued by the cloud server, and the training rounds in which this device participates.
[0045] In this embodiment, to protect the privacy of the elderly and prevent the original data from being inferred from the uploaded updates, noise needs to be added. The device first determines the sensitivity of the data, i.e., the maximum possible impact (L2 norm) of a single sample on the model update. Assume the cloud allocates a total privacy budget (ε, δ) for the entire training task (e.g., ε = 3.0, δ = 1e-5), and plans to perform T = 100 training rounds. According to the privacy budget combination theorem (e.g., advanced combination), the privacy budget that can be allocated in this round is: ε_local ≈ ε / sqrt(T). The device calculates specific noise parameters based on this local budget, data sensitivity, and a pre-selected noise mechanism (e.g., Gaussian mechanism).
[0046] S52. Based on the local privacy budget and the global sensitivity of the data to be uploaded, determine the noise distribution and scale parameters to be added.
[0047] In this embodiment, for the Gaussian mechanism, the relationship between the noise scale parameter σ and the privacy budget ε_local and data sensitivity S is approximately: σ = S * sqrt(2*log(1.25 / δ)) / ε_local. After the device calculates σ, it determines that noise needs to be sampled from a Gaussian distribution N(0,σ^2) with a mean of 0 and a standard deviation of σ.
[0048] S53. Sample noise from the determined noise distribution to be added and superimpose it onto the data to be uploaded.
[0049] In this embodiment, the device generates a random noise matrix with the same dimensions as the compressed activation data and adapter parameters to be uploaded, with each element independently sampled from N(0,σ^2). The noise matrix is then added element-wise to the original data matrix. The added noise statistically masks the contribution of any single data sample, ensuring (ε,δ)-differential privacy. The device then uses a cloud-based public key to homomorphically encrypt the noisy data, generating encrypted update data. Even if intercepted during transmission or cloud aggregation, attackers cannot decrypt the plaintext update content, achieving end-to-end privacy and security.
[0050] S6. Upload the encrypted update data to the cloud server, and receive the global adapter parameters after secure aggregation by the cloud server to update the local adapter.
[0051] In this embodiment, the edge device uploads encrypted update data packets (containing encrypted compressed activation and noisy adapter parameters) to the cloud central server via security protocols such as HTTPS. After aggregating updates from hundreds of nodes, the cloud generates new global adapter parameters and digitally signs them to ensure integrity. The device downloads these global parameters and replaces its local LoRA adapter parameters with them. For example, the cloud might use the FedAvg algorithm to perform a weighted average of the adapter updates from each node. After this step, the local model not only incorporates the characteristics of its own data but also absorbs the common knowledge of all participating institutions, significantly improving the generalization performance of fall detection, while the entire process does not leak any institution's original health data.
[0052] In a specific embodiment, such as Figure 6 As shown, before receiving the model splitting instructions and adapter configuration from the cloud server, steps A1-A3 are further performed: A1. Report the device's real-time computing power, available memory, and current network bandwidth information to the cloud server.
[0053] In this embodiment, during the federated learning task initialization phase, the edge device first needs to register with the cloud and report its own status. This includes the device's hardware model (such as CPU model, GPU model), currently available memory (such as remaining RAM), storage space, and real-time uplink / downlink bandwidth obtained through network speed testing. For example, the device might report: "Jetson XavierNX, 4GB of free memory, 5Mbps uplink bandwidth." This information is crucial input for the cloud to make intelligent task allocation decisions, ensuring that the assigned tasks match the device's capabilities and avoiding overloading tasks that could lead to training failure.
[0054] A2. Receive and evaluate the preliminary segmentation plan based on the reported information from the cloud server.
[0055] In this embodiment, the cloud runs an optimization algorithm based on the resource profiles of all devices to generate a preliminary partitioning scheme for each device (e.g., allocating the first 10 layers of the model to device A). After receiving this scheme, the device performs a rapid simulation evaluation locally to estimate the peak memory required to execute the scheme and the approximate training time for each round.
[0056] A3. If the resources of this device are insufficient to execute the preliminary splitting scheme, a resource shortage feedback is sent to the cloud server to negotiate a lighter splitting point and adapter configuration.
[0057] In this embodiment, if local evaluation reveals insufficient resources (e.g., estimated memory requirement is 6GB, but actual free space is only 4GB), the device sends a negotiation request to the cloud, along with a suggestion of the maximum number of layers it can actually handle (e.g., a maximum of the first 6 layers). Upon receiving feedback, the cloud readjusts its resource allocation strategy, potentially assigning a smaller model segment (e.g., the first 6 layers) to the current device and reallocating the extra computational tasks to other more capable devices. This bidirectional negotiation mechanism enables the system to adaptively respond to dynamic changes in device status (e.g., resource strain caused by devices running other applications simultaneously), improving the overall stability and participation of the federated learning system.
[0058] In a specific embodiment, such as Figure 7 As shown, the federated optimization method for elderly health further includes steps S71-S73: S71. Receive a task switching instruction from the cloud server, wherein the task switching instruction indicates a new health monitoring task type.
[0059] In this embodiment, elderly care services may require the model to simultaneously support multiple health monitoring tasks, such as switching from fall detection to abnormal gait recognition or abnormal vital signs alerts. When a new task needs to be added, the cloud will broadcast a task switching instruction to all edge devices, which includes the identifier of the new task and the corresponding new adapter configuration description.
[0060] S72. According to the task switching instruction, download the lightweight parameter high-efficiency fine-tuning adapter corresponding to the new task from local storage or cloud.
[0061] In this embodiment, after receiving the instruction, the device first checks whether the adapter for the new task has been cached locally (e.g., downloaded during previous training). If not cached, it downloads an initialized LoRA adapter file corresponding to the new task from the cloud server. This new adapter is pre-designed for the abnormal gait recognition task, and its structure and dimensions may differ from the old fall detection adapter.
[0062] S73. Unload the adapter for the current task and load the lightweight parameter high-efficiency fine-tuning adapter corresponding to the new task, in preparation for performing new local fine-tuning and calculation.
[0063] In this embodiment, the device dynamically unloads the LoRA adapter for the current task from memory without altering the already loaded frozen model backbone, and then loads and inserts the newly downloaded adapter into the same location in the model. This process is similar to hot-swapping, enabling rapid switching between tasks. Subsequently, the device can begin collecting new local health data (such as gait videos), fine-tuning the new adapter, and participating in the federated learning loop for new tasks. This mechanism allows a single edge hardware facility to flexibly support the evolving diverse health service needs of elderly care institutions, greatly enhancing the system's practicality and scalability.
[0064] like Figure 8 As shown, this embodiment of the invention also provides a federated optimization device for elderly health, deployed in elderly care facilities, comprising: The instruction data receiving module 10 is used to receive model splitting instructions and adapter configurations from the cloud server; Model loading module 20 loads the corresponding partial neural network model and lightweight parameter high-efficiency fine-tuning adapter according to the model segmentation instruction and adapter configuration; The local fine-tuning module 30 is used to perform forward computation of the partial neural network model using local elderly health monitoring data to generate intermediate activation values, and to perform local fine-tuning only on the parameters of the lightweight parameter efficient fine-tuning adapter according to the adapter configuration information. The intelligent compression module 40 is used to detect changes in the intermediate activation values, identify the significant changes relative to the previous calculation result, and perform multi-level compression processing of sparsification, quantization and entropy encoding on the significant changes to generate compressed activation data. Privacy protection module 50 is used to inject differential privacy noise into the compressed activation data and the fine-tuned adapter parameters and perform homomorphic encryption to generate encrypted update data; The adapter update module 60 is used to upload the encrypted update data to the cloud server and receive global adapter parameters after secure aggregation by the cloud server to update the local adapter.
[0065] In a specific embodiment, the local fine-tuning module 30 includes: The parameter freezing unit is used to freeze all the original parameters of the partial neural network model, keeping only the lightweight parameter efficient fine-tuning adapter in a trainable state. The parameter update unit is used to calculate the loss function using local elderly health monitoring data and update the gradient only to the parameters of the lightweight parameter efficient fine-tuning adapter through the backpropagation algorithm. The resource monitoring unit is used to continuously monitor the computing resource usage of this device during the fine-tuning process. If it exceeds the preset threshold, it will automatically reduce the training batch size or learning rate.
[0066] In a specific embodiment, the intelligent compression module 40 includes: The differential calculation unit is used to perform differential calculation between the intermediate activation value generated by the current forward calculation and the intermediate activation value at the corresponding position in the previous round of local cache. The variation range calculation unit is used to calculate the norm or absolute value mean of the difference results as a measure of the variation range. The threshold comparison unit is used to compare the change magnitude with a preset threshold from the cloud server or locally, and only when the threshold is exceeded will the subsequent compression and upload process be triggered.
[0067] In a specific embodiment, the intelligent compression module 40 includes: The sparsification execution unit is used to set the element with the smallest absolute value in the significantly changed part to zero based on a preset sparsity rate, thereby completing the sparsification process. The quantization execution unit is used to map the sparsified non-zero elements from high-precision floating-point numbers to low-bit-width fixed-point representations to complete the quantization process. The entropy coding unit is used to perform lossless compression on the quantized data using statistical coding algorithms, thus completing the entropy coding process.
[0068] In a specific embodiment, the privacy protection module 50 includes: The budget calculation unit is used to calculate the local privacy budget that can be allocated in this round based on the sensitivity of the local health monitoring data, the global privacy budget issued by the cloud server, and the number of training rounds in which the device participates. The noise distribution calculation unit is used to determine the noise distribution and scale parameters to be added based on the local privacy budget and the global sensitivity of the data to be uploaded. The noise addition unit is used to sample and generate noise from a determined noise distribution and superimpose it onto the data to be uploaded.
[0069] In a specific embodiment, the federal optimization device for elderly health, before the instruction data receiving module 10, further includes: The resource reporting unit is used to report the device's real-time computing power, available memory, and current network bandwidth information to the cloud server. The preliminary segmentation unit is used to receive and evaluate the preliminary segmentation scheme based on the reported information from the cloud server; The resource insufficiency feedback unit is used to send a resource insufficiency feedback to the cloud server if the resources of this device are insufficient to execute the preliminary splitting scheme, so as to negotiate a lighter splitting point and adapter configuration.
[0070] In a specific embodiment, the federal optimization device for elderly health also includes: The task switching unit is used to receive a task switching instruction sent by the cloud server, wherein the task switching instruction indicates a new health monitoring task type. The adapter download unit is used to download a lightweight parameter-efficient fine-tuning adapter corresponding to the new task from local storage or the cloud according to the task switching instruction. The adapter loading unit is used to unload the adapter for the current task and load the lightweight parameter-efficient fine-tuning adapter corresponding to the new task, in preparation for performing new local fine-tuning and calculation.
[0071] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned federated optimization device for elderly health and its various units can be referred to the corresponding descriptions in the foregoing method embodiments. For the sake of convenience and brevity, these details will not be repeated here.
[0072] The aforementioned federal optimization device for elderly health can be implemented as a computer program, which can, for example... Figure 9 It runs on the computer device shown.
[0073] Please see Figure 9 , Figure 9 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server. The terminal can be an electronic device with communication functions, such as a smartphone, tablet, laptop, desktop computer, personal digital assistant, or wearable device. The server can be a standalone server or a server cluster composed of multiple servers.
[0074] See Figure 9 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0075] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to execute a federated optimization method for elderly health.
[0076] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0077] The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a federated optimization method for elderly health.
[0078] This network interface 505 is used for network communication with other devices. Those skilled in the art will understand that... Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0079] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps: S1. Receive model splitting instructions and adapter configuration from the cloud server; S2. Load the corresponding partial neural network model and lightweight parameter fine-tuning adapter according to the model segmentation instruction and adapter configuration; S3. Using local elderly health monitoring data, perform forward computation of the partial neural network model to generate intermediate activation values, and based on the adapter configuration information, perform local fine-tuning only on the parameters of the lightweight parameter efficient fine-tuning adapter. S4. Perform change detection on the intermediate activation values, identify the significant changes relative to the previous round of calculation results, and perform multi-level compression processing of sparsification, quantization and entropy encoding on the significant changes to generate compressed activation data. S5. Inject differential privacy noise into the compressed activation data and the fine-tuned adapter parameters and perform homomorphic encryption to generate encrypted update data; S6. Upload the encrypted update data to the cloud server, and receive the global adapter parameters after secure aggregation by the cloud server to update the local adapter.
[0080] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0081] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0082] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform the following steps: S1. Receive model splitting instructions and adapter configuration from the cloud server; S2. Load the corresponding partial neural network model and lightweight parameter fine-tuning adapter according to the model segmentation instruction and adapter configuration; S3. Using local elderly health monitoring data, perform forward computation of the partial neural network model to generate intermediate activation values, and based on the adapter configuration information, perform local fine-tuning only on the parameters of the lightweight parameter efficient fine-tuning adapter. S4. Perform change detection on the intermediate activation values, identify the significant changes relative to the previous round of calculation results, and perform multi-level compression processing of sparsification, quantization and entropy encoding on the significant changes to generate compressed activation data. S5. Inject differential privacy noise into the compressed activation data and the fine-tuned adapter parameters and perform homomorphic encryption to generate encrypted update data; S6. Upload the encrypted update data to the cloud server, and receive the global adapter parameters after secure aggregation by the cloud server to update the local adapter.
[0083] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code.
[0084] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0085] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0086] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0087] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0088] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0089] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.
[0090] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A federated optimization method for elderly health, characterized in that, Performed by edge devices deployed in elderly care facilities, including: Receive model splitting instructions and adapter configurations from the cloud server; According to the model segmentation instructions and adapter configuration, load the corresponding partial neural network model and the lightweight parameter fine-tuning adapter; Using local elderly health monitoring data, the forward computation of the partial neural network model is performed to generate intermediate activation values, and based on the adapter configuration information, the parameters of the lightweight parameter efficient fine-tuning adapter are fine-tuned locally only. Change detection is performed on the intermediate activation values to identify the significant changes relative to the previous round of calculation results, and multi-level compression processing of sparsification, quantization and entropy coding is performed on the significant changes to generate compressed activation data. Differential privacy noise is injected into the compressed activation data and the fine-tuned adapter parameters, and homomorphic encryption is performed to generate encrypted update data; The encrypted update data is uploaded to the cloud server, and the global adapter parameters, which are securely aggregated by the cloud server, are received to update the local adapter.
2. The federated optimization method for elderly health according to claim 1, characterized in that, The step of locally fine-tuning the parameters of the lightweight parameter efficient fine-tuning adapter only based on the adapter configuration information includes: Freeze all the original parameters of the partial neural network model, keeping only the lightweight parameter efficient fine-tuning adapter in a trainable state; The loss function is calculated using local elderly health monitoring data, and the gradient is updated only to the parameters of the lightweight, high-efficiency fine-tuning adapter using the backpropagation algorithm. During the fine-tuning process, the device's computing resource usage is continuously monitored. If it exceeds a preset threshold, the training batch size or learning rate is automatically reduced.
3. The federated optimization method for elderly health according to claim 1, characterized in that, The step of detecting changes in the intermediate activation values and identifying significant changes relative to the previous calculation result includes: Perform a difference calculation between the intermediate activation value generated by the current forward computation and the intermediate activation value at the corresponding position in the previous round of local cache; Calculate the norm or mean of the absolute values of the difference results as a measure of the magnitude of change; The magnitude of the change is compared with a preset threshold from the cloud server or locally. The subsequent compression and upload process is triggered only when the threshold is exceeded.
4. The federated optimization method for elderly health according to claim 3, characterized in that, The multi-level compression process of sparsification, quantization, and entropy coding applied to the significantly changed portion includes: Based on a preset sparsity rate, the element with the smallest absolute value in the significantly changed part is set to zero to complete the sparsification process. For the non-zero elements after sparsification, they are mapped from high-precision floating-point numbers to low-bit-width fixed-point representations to complete the quantization process; The quantized data is losslessly compressed using a statistical coding algorithm to complete the entropy coding process.
5. The federated optimization method for elderly health according to claim 1, characterized in that, The injection of differential privacy noise into the compressed activation data and the fine-tuned adapter parameters includes: The local privacy budget that can be allocated in this round is calculated based on the sensitivity of the local health monitoring data, the global privacy budget issued by the cloud server, and the number of training rounds in which this device participates. Based on the local privacy budget and the global sensitivity of the data to be uploaded, the required noise distribution and scale parameters are determined. Noise is generated by sampling from the determined noise distribution and then superimposed onto the data to be uploaded.
6. The federated optimization method for elderly health according to claim 1, characterized in that, Before receiving the model splitting instructions and adapter configuration from the cloud server, the method further includes: Report the device’s real-time computing power, available memory, and current network bandwidth to the cloud server; Receive and evaluate the preliminary segmentation plan based on the reported information from the cloud server; If the device resources are insufficient to execute the initial splitting scheme, a resource shortage feedback is sent to the cloud server to negotiate a lighter-load splitting point and adapter configuration.
7. The federated optimization method for elderly health according to claim 1, characterized in that, The method further includes: Receive a task switching instruction from the cloud server, wherein the task switching instruction indicates a new health monitoring task type; According to the task switching instruction, download the lightweight parameter high-efficiency fine-tuning adapter corresponding to the new task from local storage or cloud; Unload the adapter for the current task and load the lightweight parameter-efficient fine-tuning adapter for the new task, preparing to perform new local fine-tuning and calculations.
8. A federal optimization device for elderly health, characterized in that, Deployed in elderly care facilities, including: The instruction data receiving module is used to receive model splitting instructions and adapter configurations from the cloud server; The model loading module loads the corresponding partial neural network model and a lightweight parameter fine-tuning adapter according to the model segmentation instruction and adapter configuration. The local fine-tuning module is used to perform forward computation of the partial neural network model using local elderly health monitoring data to generate intermediate activation values, and to perform local fine-tuning only on the parameters of the lightweight parameter efficient fine-tuning adapter according to the adapter configuration information. The intelligent compression module is used to detect changes in the intermediate activation values, identify the significant changes relative to the previous calculation result, and perform multi-level compression processing of the significant changes, including sparsification, quantization, and entropy encoding, to generate compressed activation data. The privacy protection module is used to inject differential privacy noise into the compressed activation data and the fine-tuned adapter parameters and perform homomorphic encryption to generate encrypted update data; The adapter update module is used to upload the encrypted update data to the cloud server and receive global adapter parameters that have been securely aggregated by the cloud server to update the local adapter.
9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the federal optimization method for elderly health as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the federal optimization method for elderly health as described in any one of claims 1-7.