Edge computing implementation method and system based on cloud edge collaboration
By employing a collaborative mechanism that extracts locally distorted signatures from edge nodes and generates a distortion compensation table in the cloud, the problem of model distribution distortion caused by long-term independent training of edge nodes is solved. This mechanism achieves consistency in cross-node inference and stability in model updates, while ensuring data privacy and communication efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-12
AI Technical Summary
In edge computing, the model distribution is distorted due to the environmental independence and data heterogeneity of each edge node. Existing technologies are unable to achieve real-time alignment and distortion compensation across nodes without relying on unified data and training environment, resulting in incomparable model inference results and significant performance fluctuations.
By extracting locally distorted signatures that do not contain the original privacy data from edge nodes, and building a variational diffusion residual model in the cloud to learn invertible mappings, a lightweight distortion compensation table is generated to correct the expected distortion of the edge node model and improve the consistency of cross-node inference.
Without requiring data to be uniformly distributed or training to be synchronized, it significantly improves the consistency of cross-node inference and the feasibility of model aggregation, while ensuring data privacy and communication efficiency.
Smart Images

Figure CN122019173A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of edge computing technology, specifically to a method and system for implementing edge computing based on cloud-edge collaboration. Background Technology
[0002] With the widespread application of edge computing, artificial intelligence models are increasingly being deployed on various edge nodes (such as factories, shopping malls, traffic intersections, etc.) for long-term autonomous training and local adaptation.
[0003] However, due to the independence of the environment in which each edge node is located and the heterogeneity of its data, the model will exhibit a model distribution drift phenomenon during long-term operation. Specifically, this manifests as: the inference results of the same task on different edge nodes are not comparable; it is difficult for the cloud to effectively aggregate models or inference results uploaded from different nodes; model performance fluctuates significantly and stability decreases when switching nodes or updating models; and new models deployed from the cloud perform inconsistently on different nodes, making updates uncontrollable.
[0004] Meanwhile, existing technologies such as federated learning, model alignment, or lightweight distillation typically require similar data distributions, consistent model structures, or a unified training environment and update cycle, conditions that are difficult to meet in real-world industrial scenarios.
[0005] Therefore, there is an urgent need for a technical solution that can achieve real-time alignment and distortion compensation across nodes without relying on unified data and a unified training environment. Summary of the Invention
[0006] The purpose of this invention is to provide a method, system, computer device, storage medium, and computer program product for edge computing based on cloud-edge collaboration, so as to solve the problems mentioned in the background art.
[0007] The first aspect of this invention provides an edge computing implementation method based on cloud-edge collaboration, comprising the following steps: Step S10: On the edge node side, based on the inference process of the local model, extract the local distortion signature that does not contain the original privacy data. The local distortion signature includes input distribution offset features, inference path activation mode features and gradient direction statistical features, and upload them to the cloud. Step S20: On the cloud side, construct and train a variational diffusion residual model to learn an invertible mapping from the local distortion signature of the edge node to the cloud reference distribution, and generate a lightweight distortion compensation table for each edge node based on the invertible mapping, including compensation parameters for performing weight micro-deformation, activation domain realignment and inference boundary adjustment on the node model. Step S30: The distortion compensation table and the base model are sent to the edge node. The edge node replaces its local model with the sent base model and performs deformable compensation on the base model by loading the distortion compensation table to correct the expected distortion of the base model relative to the data distribution of the edge node and improve the consistency of cross-node inference.
[0008] A second aspect of the present invention provides an edge computing system based on cloud-edge collaboration, the system comprising a cloud, several edge nodes, and communication devices; The edge node is configured to: extract a locally distorted signature that does not contain the original privacy data based on the inference process of the local model. The locally distorted signature includes input distribution offset features, inference path activation mode features and gradient direction statistical features, and upload them to the cloud. The cloud is configured to: construct and train a variational diffusion residual model to learn an invertible mapping from the local distortion signatures of edge nodes to the cloud reference distribution, and generate a lightweight distortion compensation table for each edge node based on the invertible mapping, including compensation parameters for performing minor weight deformations, activation domain realignment, and inference boundary adjustments on the node model; and distribute the distortion compensation table along with the base model to the edge nodes. The edge node is also configured to: replace its local model with the issued base model, and perform deformable compensation on the base model by loading the distortion compensation table to correct its expected distortion relative to the data distribution of the edge node and improve the consistency of cross-node inference. The communication device is configured to enable data transmission between the edge node and the cloud.
[0009] A third aspect of the present invention provides a computer device including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method as described in any of the preceding claims.
[0010] A fourth aspect of the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method as described in any of the preceding claims.
[0011] The fifth aspect of the present invention provides a computer program product including a computer program that, when executed by a processor, implements the steps of the method as described in any of the preceding claims.
[0012] This invention effectively solves the model distribution distortion problem caused by long-term independent training of edge nodes through a collaborative mechanism that extracts and uploads local distortion signatures from edge nodes, generates a distortion compensation table in the cloud based on a variational diffusion residual model, and loads and executes compensation at the edge nodes. Under the realistic conditions that do not require data to be distributed in the same way, training to be synchronized, and model structure to be consistent, it can significantly improve the consistency of cross-node inference, the feasibility of cloud model aggregation, and the stability of edge model updates. At the same time, by transmitting only statistical features and lightweight parameter tables, it can also ensure data privacy and communication efficiency. Attached Figure Description
[0013] Figure 1 This is a flowchart illustrating an edge computing implementation method based on cloud-edge collaboration disclosed in an embodiment of the present invention; Figure 2 This is a schematic diagram of the variational diffusion residual model disclosed in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the generation process of the distortion compensation table disclosed in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an edge computing system based on cloud-edge collaboration disclosed 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 embodiments of the present invention, and not all embodiments. 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] Please see Figure 1 This invention provides an edge computing implementation method based on cloud-edge collaboration, comprising the following steps: Step S10: On the edge node side, based on the inference process of the local model, extract the local distortion signature that does not contain the original privacy data. The local distortion signature includes input distribution offset features, inference path activation mode features and gradient direction statistical features, and upload them to the cloud. In this step, in industrial scenarios, such as a people flow statistics model deployed on camera nodes distributed across different shopping malls, or a defect detection model deployed on quality inspection equipment in multiple factories, the differences in lighting, angles, equipment models, and product batches in the environment of each node, coupled with the continuous fine-tuning and training of nodes based on locally generated data, lead to varying degrees of shifts in the internal data processing paths and feature representations after a period of independent operation, even if the model was initially the same. This results in model distribution distortion. To quantify this distortion, this invention designs a lightweight feature vector called Local Distortion Signature, which carries no privacy leakage risk.
[0016] Specifically, during the normal execution of inference tasks (such as recognizing or classifying acquired images), edge nodes synchronously collect intermediate statistics during the model's operation. These statistics do not contain any original input data (such as image pixels or user information) or gradient information that can be used to infer the original data, thus strictly protecting data privacy.
[0017] Partially distorted signatures consist of the following three types of features: Input distribution offset feature: This feature characterizes the dynamic deviation between the data distribution currently being processed by the edge node and the reference distribution maintained in the cloud. For example, in a shopping mall pedestrian flow statistics model, the edge node calculates in real time the mean and variance of statistics such as the size, aspect ratio, and pixel intensity of the human detection box in all video frames processed within the most recent period (e.g., 1 minute), and compares them with the reference statistical distribution previously sent from the cloud to calculate the difference expansion coefficient. This coefficient is used to quantify the drift magnitude of the edge node's input characteristics relative to the standard reference.
[0018] Inference path activation pattern features: These are used to characterize the distortion and deformation of the feature space of the neural network within the local model. During inference, neurons in each layer of the model are activated. This invention focuses on key layers in the local model, such as the penultimate layer in a classification model (e.g., a high-level feature layer rich in semantic information) or bottleneck layers in the structure. Edge nodes extract the activation tensors output by these key layers and calculate their sparsity change rate (i.e., the change in the proportion of non-zero elements), energy spectrum distribution change (by performing a Fast Fourier Transform on the amplitude of the activation tensor to extract the energy of its first few dominant frequency components), and KL deviation between the current activation pattern and the reference activation pattern stored in the cloud. It can be understood that these indicators collectively reflect whether the path of information flow within the model has changed.
[0019] Gradient direction statistical features: These characterize the long-term shift trend of parameter update directions during recent local model training (fine-tuning). To avoid uploading the original gradients (which could lead to training data leakage), edge nodes process the gradient vectors calculated in the most recent training iterations. First, the high-dimensional original gradient vectors are projected onto a predefined low-dimensional orthogonal basis vector space in the cloud, resulting in a set of low-dimensional projection coefficients. The angular distribution formed by these low-dimensional projection coefficients is then analyzed. Second, the cosine similarity between the gradient direction of the current training step and the average gradient direction over a past period is calculated as a consistency coefficient. It can be understood that the angular distribution and consistency coefficient together constitute the statistical features of the gradient direction, reflecting the historical continuity of the model's optimization direction.
[0020] The three types of features mentioned above are concatenated, normalized, and compressed (e.g., using principal component analysis or a small autoencoder) to generate a low-dimensional signature vector with dimensions of 32 to 128, which is the locally distorted signature. This signature is uploaded to the cloud at fixed intervals (e.g., 1 minute) or when a feature change is detected to exceed a threshold.
[0021] Step S20: On the cloud side, construct and train a variational diffusion residual model to learn an invertible mapping from the local distortion signature of the edge node to the cloud reference distribution, and generate a lightweight distortion compensation table for each edge node based on the invertible mapping, including compensation parameters for performing weight micro-deformation, activation domain realignment and inference boundary adjustment on the node model. In this step, the cloud aggregates locally distorted signatures from tens of thousands of edge nodes, and uses these to build a mapping model to understand and reverse the aforementioned distortion. To this end, this invention designs and trains a variational diffusion residual model, a hybrid generative model that combines the latent space modeling capabilities of variational inference, the robust generative capabilities of the diffusion process, and the efficient learning capabilities of residual networks. This model is used to learn highly complex, reversible distribution mapping functions. Specifically, the model input is the locally distorted signature uploaded by a certain edge node; the model output is the inverse distortion form corresponding to that edge node, which indicates the amount of adjustment needed to bring the current distorted model state back to a state aligned with the cloud reference distribution.
[0022] Based on the aforementioned reversible mapping, the cloud dynamically generates a distortion compensation table for each edge node. This distortion compensation table is a lightweight set of parameters, for example, between 20KB and 50KB in size, containing the following three types of compensation parameters: parameters for slight deformation of weights (deformation factor); parameters for activation domain realignment (offset, scaling factor); and parameters for inference boundary adjustment (boundary softening coefficient, normalization scale).
[0023] Step S30: The distortion compensation table and the base model are sent to the edge node. The edge node replaces its local model with the sent base model and performs deformable compensation on the base model by loading the distortion compensation table to correct the expected distortion of the base model relative to the data distribution of the edge node and improve the consistency of cross-node inference.
[0024] In this step, the cloud periodically packages and distributes an updated base model that incorporates global knowledge, along with a distortion compensation table generated for a specific edge node. Upon receiving the package, the edge node performs the following operations: replaces its original, potentially severely distorted, local model with the distributed base model, which represents the latest and optimal state trained by the cloud on global data; and loads the distortion compensation table that matches the edge node.
[0025] Furthermore, before the base model is loaded into memory for inference, a one-time, rapid, deformable compensation is performed on the base model based on the parameters in the distortion compensation table. It should be noted that the entire compensation process does not alter the model's computational graph structure, requires no additional training, is completed only during loading, takes very little time, and has almost no impact on the inference performance of edge nodes.
[0026] The compensated base model retains the general and powerful capabilities of the original base model while being calibrated for the specific environment of the edge node. This significantly improves the inference accuracy and stability at the edge node and ensures the comparability of output results between different edge nodes.
[0027] This invention effectively solves the model distribution distortion problem caused by long-term independent training of edge nodes through a collaborative mechanism that extracts and uploads local distortion signatures from edge nodes, generates a distortion compensation table in the cloud based on a variational diffusion residual model, and loads and executes compensation at the edge nodes. Under the realistic conditions that do not require data to be distributed in the same way, training to be synchronized, and model structure to be consistent, it can significantly improve the consistency of cross-node inference, the feasibility of cloud model aggregation, and the stability of edge model updates. At the same time, by transmitting only statistical features and lightweight parameter tables, it can also ensure data privacy and communication efficiency.
[0028] As an example, the inference process based on the local model extracts locally distorted signatures that do not contain the original privacy data, including: Step S11: Collect inference data of the local model within a predetermined time window, and extract input distribution offset features, inference path activation mode features, and gradient direction statistical features based on the inference data; wherein: The input distribution offset feature is used to characterize the dynamic offset of the current input data distribution of the edge node relative to the cloud reference distribution, and is obtained at least by comparing the statistics of the current inference input with the historical cloud reference input distribution; The inference path activation mode features are used to characterize the distortion and deformation of the feature space inside the local model, and are obtained at least by analyzing the sparsity of the activation tensor of the key layer of the model, the frequency domain energy distribution and its statistical difference with the cloud reference activation. The gradient direction statistical features are used to characterize the long-term offset trend of the local training update direction of the local model relative to the reference coordinate system, including at least the direction distribution features in the low-dimensional projection space and the deviation index between the current update direction and the historical update direction. In this step, edge nodes are set to a fixed time window (e.g., collecting data corresponding to the most recent 200 inference requests), and feature extraction is performed based on this window to ensure the timeliness and statistical significance of the features. Specifically: (1) Input Distribution Shift Features: Edge nodes calculate the statistical features of all inference inputs within the current time window, including but not limited to key statistics such as mean, variance, and quantiles. For example, for image data, the mean and standard deviation of all images in the RGB channels are calculated; for structured data, the mean, variance, and quantiles of each dimension are calculated. Subsequently, these statistical features are compared and analyzed with the historical cloud reference input distribution maintained in the cloud. The comparison process is achieved by calculating the difference measure between distributions, such as calculating the difference expansion coefficient and distribution distance measure, to quantify the degree of shift of the current node's data distribution relative to the reference distribution. For classification tasks, the structural shift of the data distribution can also be captured by calculating the rate of change of the category distribution.
[0029] It should be noted that the above comparison method is not a simple difference, but rather the calculation of the difference expansion coefficient, which reflects the divergence expansion of the current node's data distribution relative to the reference distribution. For example, the Wasserstein distance or the standardized Euclidean distance between the current distribution and the reference distribution can be calculated and quantified as scalar coefficients. For classification tasks, the class distribution shift rate of the frequency of each class can also be calculated to capture structural changes in the data distribution.
[0030] (2) Inference path activation pattern characteristics: When edge nodes perform inference on the local model, they intercept and cache the activation tensors of key layers (such as the bottleneck layer or the third-to-last layer). These tensors are then analyzed online in the following dimensions: Sparsity analysis: For the activation tensor output of the key layer, calculate its sparsity s = (number of non-zero elements) / total number of elements, and compare it with the baseline sparsity s. ref (e.g., the sparsity at the initial deployment of the model) is compared to obtain the rate of change δ. s =|ss ref | / s ref , used to characterize the sparsity of the activation tensor of the key layer of the model.
[0031] Frequency domain energy distribution analysis: Treating the activation tensor as a two-dimensional signal, a fast Fourier transform is performed to obtain the amplitude spectrum. The energy values of the first K (e.g., K=10) main frequency components are extracted to form an energy feature vector E=[e1,e2,...,e...]. K ].
[0032] Statistical difference analysis: The numerical distribution of the current activation tensor is normalized using softmax, and the KL (Kullback-Leibler) divergence is calculated with the reference activation distribution delivered from the cloud: D KL (P||Q)=∑P(i)log(P(i) / Q(i)).
[0033] Understandably, this operation is performed only at the statistical level and does not upload the original activation values, which effectively protects the output information of the intermediate layers of the local model.
[0034] (3) Gradient direction statistical features: Statistical measures obtained after processing the gradient vectors of edge nodes during local training (e.g., fine-tuning over one epoch using the SGD optimizer). Specifically, these include: Use a predefined low-dimensional orthogonal basis matrix U∈R in the cloud. (d×k) (where d is the original gradient dimension and k=8 is the projection dimension), project the original gradient vector g into a low-dimensional representation p=Uᵀg.
[0035] Directional distribution characteristics: Calculate the angular distribution characteristics of the projection vector p in the low-dimensional space, including the mean direction μ and the covariance matrix Σ.
[0036] The deviation index between the current update direction and the historical update direction: calculate the current gradient direction g. current Compared with the historical average direction g avg Cosine similarity: cos(θ) = (g current ·g avg ) / (||g current ||·||g avg It is understandable that the closer the cosine similarity value is to 1, the more stable the training direction is; the lower the cosine similarity value, the more it indicates that the training direction has changed abruptly or oscillated, which is a sign of model instability.
[0037] Step S12: The input distribution offset feature, the inference path activation mode feature, and the gradient direction statistical feature are compressed and encoded to generate a low-dimensional signature vector as a locally distorted signature.
[0038] In this step, after feature extraction, the edge nodes fuse and reduce the dimensionality of various feature data. Through feature concatenation, normalization, and compression coding techniques (such as linear dimensionality reduction or lightweight coding networks), the original feature data is transformed into a low-dimensional feature vector. This feature vector is the local distortion signature that effectively represents the model's distortion state. Its dimensionality is optimized to minimize data transmission overhead while maintaining representational capability, and it is ultimately reported to the cloud for subsequent processing. The local distortion signature is reported to the cloud.
[0039] As an example, a variational diffusion residual model is constructed and trained to learn an invertible mapping from locally distorted signatures at edge nodes to a cloud reference distribution, including: Step S21: Construct a variational diffusion residual model that includes an encoder, a multi-step diffusion processor, and a residual mapper; The encoder is used to compress the input locally distorted signature into a low-dimensional latent space representation; the multi-step diffusion processor is used to perform a multi-step noise-adding forward diffusion process on the representation in the latent space; the residual mapper is used to progressively denoise the noisy latent space representation in the inverse process and learn the residual between it and the cloud reference distribution to approximate the reversible mapping. In this step, please refer to Figure 2 Based on the aforementioned example, the functional modules of the variational diffusion residual model are explained in detail below: The encoder maps the input, 64-dimensional locally distorted signature to a lower-dimensional, continuous latent space representation. This encoder, for example, is a multilayer perceptron, which compresses the signature into a probabilistic latent space representation Z, thereby capturing the essential distributional information behind the locally distorted signature. Understandably, this encoder borrows ideas from variational autoencoders, making the variational diffusion residual model more robust to input noise and small variations.
[0040] Multi-step diffusion processor: Used to implement the forward diffusion process. During the training phase, the latent space representation Z is received from the encoder and Gaussian noise is progressively added to the latent space representation Z over K steps (e.g., K=12 steps) according to a predefined noise scheduling plan. This process eventually destroys the latent space representation Z into a vector of almost pure noise. Understandably, the purpose of this process is to teach the variational diffusion residual model how to recover clean data structures from noise, thereby enhancing its ability to model complex distributions.
[0041] The residual mapper is a core component of the variational diffusion residual model, used to implement the inverse process. It can be, for example, a convolutional network based on a U-Net architecture or a series of residual connections. At each step of the inverse process, the residual mapper receives the noisy latent space representation Z' of the current step from the multi-step diffusion processor, along with the corresponding time-step encoding. Its task is to predict the noise to be removed in the current step, and more importantly, to learn to predict a residual term. This residual term represents the gap between the current noisy, distorted latent space representation Z' and the latent space representation of the target cloud reference distribution. Through progressive denoising and residual correction, the residual mapper ultimately outputs a clean latent space representation aligned to the cloud reference distribution.
[0042] Step S22: Train the variational diffusion residual model by minimizing the difference between the output of the residual mapper and the cloud reference distribution.
[0043] In this step, the cloud collects locally distorted signatures uploaded by massive edge nodes at different times and under different distortion states, and configures a stable cloud reference distribution maintained by the cloud. It can be understood that this cloud reference distribution can be an aggregated statistical representation of locally distorted signatures from all nodes, or locally distorted signatures corresponding to an ideal baseline model.
[0044] The training process of the variational diffusion residual model is roughly as follows (LDS in the following text refers to Local Distortion Signature): For each training sample (edge LDS, cloud reference LDS), perform the following operations: a. The encoder encodes the edge LDS into a latent space representation Z; b. The multi-step diffusion processor randomly selects a time step t and adds t-step noise to the latent space representation Z, obtaining Z0. t ; c. Residual mapper with Z t Given time step t as input, the output is the predicted noise and residual; d. Calculate the loss function: The loss function consists of two parts: 1) the mean square error between the predicted noise and the actual added noise, ensuring that the model has the ability to denoise; 2) the mean square error or cosine distance between the clean latent variable finally output by the residual mapper and the actual cloud reference distribution latent variable, ensuring that the variational diffusion residual model has mastered the core ability of distribution mapping.
[0045] Training objective: To continuously optimize the model parameters using the gradient descent algorithm, minimizing the aforementioned loss function. After training, this variational diffusion residual model learns how to map a distorted local distortion signature to a reference distribution in the cloud via its invertible mapping function, or to generate a corresponding inverse distortion pattern from the reference distribution in the cloud.
[0046] As an example, the multi-step diffusion processor is used to perform a multi-step noise-adding forward diffusion process on the characterization in the latent space, including: Receive the latent space representation from the encoder and set the total number of diffusion steps K; A cosine scheduling strategy is used to set the noise addition intensity of each diffusion step, and the noise addition operation is executed sequentially according to the diffusion step order; wherein, the cosine scheduling strategy ensures that a relatively low noise addition intensity is used in the early diffusion steps to preserve structural information, while the noise addition intensity is gradually increased in the later diffusion steps to accelerate the noiseification. After K-step diffusion processing, it is ensured that the noisy latent space representation output in the Kth step is a pure noise vector that conforms to a standard Gaussian distribution.
[0047] In this embodiment, the multi-step diffusion processor performs the forward diffusion process according to the following specific steps: First, the multi-step diffusion processor receives the latent space representation Z from the encoder. This latent space representation Z is a low-dimensional latent representation obtained by variational coding of the locally distorted signature. The multi-step diffusion processor sets the total number of diffusion steps K, which can be set from 8 to 20 steps depending on the actual needs of the edge computing scenario.
[0048] Next, the multi-step diffusion processor employs an improved cosine scheduling strategy to control the noise addition intensity in each diffusion step. This strategy is implemented using the following mathematical formula:
[0049] in, This represents the cumulative noise scheduling coefficient at step k. The sequence number of the current diffusion step ( ), The total number of diffusion steps, This is the scheduling intensity parameter.
[0050] In the actual noise addition process, each diffusion step is performed according to the following formula:
[0051] in, This represents the noisy latent space representation at step k. Representation of the original latent space, To obtain from the standard Gaussian distribution The noise vector sampled in the middle.
[0052] The scheduling strength parameter The value range is set to This parameter design causes the scheduling curve to exhibit specific variation characteristics: when At that time, in the early stage of diffusion (i.e. When the value is small, the scheduling intensity parameter The descent is gradual, thus effectively preserving the structural information of the original latent space representation; in the later stages of diffusion (i.e., When the value is close to 1), the scheduling intensity parameter The noise level drops sharply, significantly increasing the intensity of noise addition and accelerating the noise generation process.
[0053] After K-step diffusion processing, the noisy latent space representation output in the Kth step is validated to ensure that its KL divergence with the standard Gaussian distribution is less than 0.01. This validation condition guarantees that the final output latent space representation has become a pure noise vector conforming to the standard Gaussian distribution, providing an ideal starting point for the subsequent inverse denoising process of the residual mapper.
[0054] This invention introduces an improved cosine scheduling strategy with a specific parameter range to precisely control the noise addition rate during the forward diffusion process. In the early stages of diffusion, noise addition is kept relatively slow to effectively preserve the structural information of the original latent space representation. In the later stages of diffusion, noise addition is accelerated to ensure that after K-step diffusion, the latent space representation is completely destroyed into a pure noise vector conforming to a standard Gaussian distribution. This progressive noiseification process not only ensures the effective learning of the distribution mapping relationship but also enhances the model's robustness to various distortion modes, providing an ideal noiseification starting point for the subsequent inverse residual mapping process. Therefore, it can significantly improve the accuracy and stability of the variational diffusion residual model in learning invertible mappings.
[0055] As an example, a lightweight distortion compensation table is generated for each edge node based on this invertible mapping, including: Step S23: Input the local distortion signature of the edge node into the invertible mapping function of the variational diffusion residual model to obtain the corresponding inverse distortion shape as the inverse distortion vector; In this step, after the cloud receives the latest locally distorted signature uploaded by an edge node A, it executes the process of generating a distortion compensation table. Specifically: Using the inverse mapping function learned by the variational diffusion residual model, the local distortion signature of edge node A is input into the inverse mapping function. The variational diffusion residual model then infers and outputs the corresponding inverse distortion vector. It can be understood that the inverse distortion vector is a mathematical representation of the inverse operation that needs to be applied to the cloud baseline model to compensate for the current distortion of edge node A; it encodes the core information required for compensation.
[0056] Step S24: The inverse distortion vector is parsed and assigned to the weight deformation branch, activation offset branch and decision boundary branch to generate compensation parameters for weight micro-deformation, activation domain compensation and inference boundary compensation, and the distortion compensation table is generated based on the compensation parameters.
[0057] In this step, please refer to Figure 3 After obtaining the inverse distortion vector, it needs to be translated into specific compensation parameters that the model can execute. This invention designs three parallel analytical branches, as follows: (1) Weight Deformation Branch: This branch is responsible for resolving the parameters required for the slight deformation of the weights. The corresponding part of the inverse distortion vector is resolved into a set of deformation factors, which will be applied to the weight matrix of the convolutional or fully connected layers of the base model. Specific operations may include: Local stretching / compression: Scaling the magnitude of specific neuron connections (weight clusters) in the weight matrix to enhance or suppress the influence of certain feature channels.
[0058] Rotation: A small orthogonal transformation is performed on the principal direction of the weight vector to align it with the direction of the feature space.
[0059] (2) Activation Offset Branch: This branch is responsible for resolving the parameters required for activation domain compensation. It resolves the scaling factor α and offset β for specific layers (e.g., the bottleneck layer and the penultimate layer) from the inverse distortion vector. During model inference (i.e., the local model or the base model), the activation outputs of these layers will be used to perform A. l =A l *α l +β l This operation, with its specific settings, can effectively recalibrate the mean and variance of activation values, stabilize internal covariate offsets, and ensure the consistency of information flow across different nodes.
[0060] (3) Decision Boundary Branch: This branch is responsible for resolving the parameters required for inference boundary compensation. Specifically, it resolves the parameters from the inverse distortion vector: For classification tasks: the boundary softening coefficient is parsed out, which is used to adjust the temperature parameter T of the Softmax function, Softmax(z / T), where z is the logits vector. The higher the temperature parameter T, the smoother the output distribution, which can alleviate the model (i.e., the local model or the base model) from making overly confident misclassifications.
[0061] For regression tasks: a normalized scale is parsed out, which is used to rescale the final output of the model (i.e., the local model or the base model) to fit the dynamic range of the node's local data.
[0062] Finally, the parameters (deformation factor, offset, scaling factor, temperature parameter, etc.) parsed from all the above branches are organized into a structured, lightweight lookup table, namely the distortion compensation table.
[0063] As an example, the deformable compensation specifically includes weight micro-deformation compensation, activation domain compensation, and inference boundary compensation; wherein: The specific method of the weight micro-deformation compensation is to locally stretch, compress, or rotate the model weights according to the deformation factor in the distortion compensation table. The activation domain compensation specifically involves introducing a learnable offset into the activation output of a specific layer of the model to stabilize the activation variance. The inference boundary compensation specifically refers to adjusting the boundary softening coefficient or normalization scale of the model output layer.
[0064] In this implementation, the fine-tuning of the basic model is achieved through three aspects of compensation, as follows: (1) Weight micro-deformation compensation. In practice, the edge nodes perform geometric transformations on the weight parameters of the base model based on the deformation factors provided by the weight deformation branch in the inverse distortion vector, specifically including: Local stretching and compression. For example, for the weight tensor of a certain convolutional layer, the weights of all convolutional kernels in a specific output channel are enlarged or reduced as a whole according to the deformation factor. This is equivalent to enhancing or weakening the weight of the feature detector corresponding to that channel in the final decision.
[0065] Rotation. This can be achieved by applying a small orthogonal transformation matrix to the weight matrix, which is derived from the deformation factor. The effect is to slightly adjust the underlying coordinate system of the feature space to better fit the data distribution of the current node.
[0066] Understandably, all of these operations are linear transformations, either element-wise or in groups, which are extremely computationally efficient.
[0067] (2) Activation Domain Compensation. In practice, during the forward propagation of the model (i.e., the local model or the base model), when the specific layer specified by the activation offset branch in the backward distortion vector is calculated, an affine transformation is performed. That is, the activation output tensor A of that layer is transformed. l Multiplied by a scaling factor α l Plus an offset β l (A) l ←A l *α l +β l This operation can directly correct the changes in activation statistics (mean and variance) of the layer caused by data distribution offset, stabilize the activation variance, and enable subsequent layers to receive relatively stable inputs, thereby significantly improving the model's generalization ability and output stability.
[0068] (3) Inference boundary compensation. In practice, the parameters provided by the decision boundary branch in the inverse distortion vector are applied to the final output layer of the model (i.e., the local model or the base model).
[0069] For classification models, adjust the boundary softening coefficient (i.e., the temperature parameter T of the Softmax function). During inference, divide the original logits vector z by the temperature T before inputting it into the Softmax function. It's understandable that increasing the T value (>1) will make the output probability distribution softer, reducing the model's confidence in the class with the highest probability. This is particularly effective for handling edge data with ambiguous categories or a lot of noise, compensating for the ambiguity of the classification boundary caused by distribution shift.
[0070] For regression models, adjust the normalization scale of their output. For example, multiply the regression output value by a scaling factor to match the actual dimensional range of the data at the current node.
[0071] Through the synergistic effect of the three types of compensation mentioned above, the distributed general base model is quickly and specifically shaped into a personalized model adapted to the specific edge node environment. This enables the personalized and precise deployment of each model, ultimately achieving a consistent, stable, and high-performance inference service across nodes. It is understandable that the entire compensation process is completed in one go during model loading, constituting static reparameterization, and its impact on inference latency is negligible.
[0072] Please see Figure 4 The present invention also discloses an edge computing implementation system based on cloud-edge collaboration, the system including a cloud 100, a number of edge nodes 200 and a communication device 300; The edge node 200 is configured to: extract a locally distorted signature that does not contain the original privacy data based on the inference process of the local model. The locally distorted signature includes input distribution offset features, inference path activation mode features and gradient direction statistical features, and upload it to the cloud. The cloud 100 is configured to: construct and train a variational diffusion residual model to learn an invertible mapping from the local distortion signature of the edge node to the cloud reference distribution, and generate a lightweight distortion compensation table for each edge node based on the invertible mapping, including compensation parameters for performing slight weight deformation, activation domain realignment and inference boundary adjustment on the node model; and distribute the distortion compensation table and the base model to the edge nodes. The edge node 200 is also configured to: replace its local model with the issued base model, and perform deformable compensation on the base model by loading the distortion compensation table to correct its expected distortion relative to the data distribution of the edge node and improve the consistency of cross-node inference. The communication device 300 is configured to enable data transmission between the edge node 200 and the cloud 100.
[0073] As an example, the edge node 200 is also configured as follows: Inference data from the local model is collected within a predetermined time window. Based on this inference data, input distribution offset features, inference path activation mode features, and gradient direction statistical features are extracted; wherein: The input distribution offset feature is used to characterize the dynamic offset of the current input data distribution of the edge node relative to the cloud reference distribution, and is obtained at least by comparing the statistics of the current inference input with the historical cloud reference input distribution; The inference path activation mode features are used to characterize the distortion and deformation of the feature space inside the local model, and are obtained at least by analyzing the sparsity of the activation tensor of the key layer of the model, the frequency domain energy distribution and its statistical difference with the cloud reference activation. The gradient direction statistical features are used to characterize the long-term offset trend of the local training update direction of the local model relative to the reference coordinate system, including at least the direction distribution features in the low-dimensional projection space and the deviation index between the current update direction and the historical update direction. The input distribution offset features, the inference path activation mode features, and the gradient direction statistical features are compressed and encoded to generate a low-dimensional signature vector as a locally distorted signature.
[0074] As an example, the cloud 100 is also configured as follows: Construct a variational diffusion residual model that includes an encoder, a multi-step diffusion processor, and a residual mapper; The encoder is used to compress the input locally distorted signature into a low-dimensional latent space representation; the multi-step diffusion processor is used to perform a multi-step noise-adding forward diffusion process on the representation in the latent space; the residual mapper is used to progressively denoise the noisy latent space representation in the inverse process and learn the residual between it and the cloud reference distribution to approximate the reversible mapping. The variational diffusion residual model is trained by minimizing the difference between the output of the residual mapper and the cloud reference distribution.
[0075] As an example, the multi-step diffusion processor is used to perform a multi-step noise-adding forward diffusion process on the characterization in the latent space, including: Receive the latent space representation from the encoder and set the total number of diffusion steps K; A cosine scheduling strategy is used to set the noise addition intensity of each diffusion step, and the noise addition operation is executed sequentially according to the diffusion step order; wherein, the cosine scheduling strategy ensures that a relatively low noise addition intensity is used in the early diffusion steps to preserve structural information, while the noise addition intensity is gradually increased in the later diffusion steps to accelerate the noiseification. After K-step diffusion processing, it is ensured that the noisy latent space representation output in the Kth step is a pure noise vector that conforms to a standard Gaussian distribution.
[0076] As an example, the cloud 100 is also configured as follows: The local distortion signature of the edge node is input into the invertible mapping function of the variational diffusion residual model to obtain the corresponding inverse distortion shape as the inverse distortion vector. The inverse distortion vector is parsed and assigned to the weight deformation branch, activation offset branch, and decision boundary branch to generate compensation parameters for weight micro-deformation, activation domain compensation, and inference boundary compensation. The distortion compensation table is then generated based on the compensation parameters.
[0077] As an example, the deformable compensation specifically includes weight micro-deformation compensation, activation domain compensation, and inference boundary compensation; wherein: The specific method of the weight micro-deformation compensation is to locally stretch, compress, or rotate the model weights according to the deformation factor in the distortion compensation table. The activation domain compensation specifically involves introducing a learnable offset into the activation output of a specific layer of the model to stabilize the activation variance. The inference boundary compensation specifically refers to adjusting the boundary softening coefficient or normalization scale of the model output layer.
[0078] This invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method as described in any of the preceding claims.
[0079] This invention also discloses a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method as described in any of the preceding claims.
[0080] This invention also discloses a computer program product, including a computer program that, when executed by a processor, implements the steps of the method as described in any of the preceding claims.
[0081] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for implementing edge computing based on cloud-edge collaboration, characterized in that, Includes the following steps: Step S10: On the edge node side, based on the inference process of the local model, extract the local distortion signature that does not contain the original privacy data. The local distortion signature includes input distribution offset features, inference path activation mode features and gradient direction statistical features, and upload them to the cloud. Step S20: On the cloud side, construct and train a variational diffusion residual model to learn an invertible mapping from the local distortion signature of the edge node to the cloud reference distribution, and generate a lightweight distortion compensation table for each edge node based on the invertible mapping, including compensation parameters for performing weight micro-deformation, activation domain realignment and inference boundary adjustment on the node model. Step S30: The distortion compensation table and the base model are sent to the edge node. The edge node replaces its local model with the sent base model and performs deformable compensation on the base model by loading the distortion compensation table to correct the expected distortion of the base model relative to the data distribution of the edge node and improve the consistency of cross-node inference.
2. The edge computing implementation method based on cloud-edge collaboration according to claim 1, characterized in that: The reasoning process based on the local model extracts locally distorted signatures that do not contain the original privacy data, including: Step S11: Collect inference data of the local model within a predetermined time window, and extract input distribution offset features, inference path activation mode features, and gradient direction statistical features based on the inference data; wherein: The input distribution offset feature is used to characterize the dynamic offset of the current input data distribution of the edge node relative to the cloud reference distribution, and is obtained at least by comparing the statistics of the current inference input with the historical cloud reference input distribution; The inference path activation mode features are used to characterize the distortion and deformation of the feature space inside the local model, and are obtained at least by analyzing the sparsity of the activation tensor of the key layer of the model, the frequency domain energy distribution and its statistical difference with the cloud reference activation. The gradient direction statistical features are used to characterize the long-term offset trend of the local training update direction of the local model relative to the reference coordinate system, including at least the direction distribution features in the low-dimensional projection space and the deviation index between the current update direction and the historical update direction. Step S12: The input distribution offset feature, the inference path activation mode feature, and the gradient direction statistical feature are compressed and encoded to generate a low-dimensional signature vector as a locally distorted signature.
3. The edge computing implementation method based on cloud-edge collaboration according to claim 1, characterized in that: Construct and train a variational diffusion residual model to learn an invertible mapping from the locally distorted signatures of edge nodes to the cloud reference distribution, including: Step S21: Construct a variational diffusion residual model that includes an encoder, a multi-step diffusion processor, and a residual mapper; The encoder is used to compress the input locally distorted signature into a low-dimensional latent space representation; the multi-step diffusion processor is used to perform a multi-step noise-adding forward diffusion process on the representation in the latent space; the residual mapper is used to progressively denoise the noisy latent space representation in the inverse process and learn the residual between it and the cloud reference distribution to approximate the reversible mapping. Step S22: Train the variational diffusion residual model by minimizing the difference between the output of the residual mapper and the cloud reference distribution.
4. The edge computing implementation method based on cloud-edge collaboration according to claim 1, characterized in that: The multi-step diffusion processor is used to perform a multi-step noise-adding forward diffusion process on the characterization in the latent space, including: Receive the latent space representation from the encoder and set the total number of diffusion steps K; A cosine scheduling strategy is used to set the noise addition intensity of each diffusion step, and the noise addition operation is executed sequentially according to the diffusion step order; wherein, the cosine scheduling strategy ensures that a relatively low noise addition intensity is used in the early diffusion steps to preserve structural information, while the noise addition intensity is gradually increased in the later diffusion steps to accelerate the noiseification. After K-step diffusion processing, it is ensured that the noisy latent space representation output in the Kth step is a pure noise vector that conforms to a standard Gaussian distribution.
5. The edge computing implementation method based on cloud-edge collaboration according to claim 1, characterized in that: Based on this invertible mapping, a lightweight distortion compensation table is generated for each edge node, including: Step S23: Input the local distortion signature of the edge node into the invertible mapping function of the variational diffusion residual model to obtain the corresponding inverse distortion shape as the inverse distortion vector; Step S24: The inverse distortion vector is parsed and assigned to the weight deformation branch, activation offset branch and decision boundary branch to generate compensation parameters for weight micro-deformation, activation domain compensation and inference boundary compensation, and the distortion compensation table is generated based on the compensation parameters.
6. The edge computing implementation method based on cloud-edge collaboration according to claim 1, characterized in that: The deformable compensation specifically includes weight micro-deformation compensation, activation domain compensation, and inference boundary compensation; wherein: The specific method of the weight micro-deformation compensation is to locally stretch, compress, or rotate the model weights according to the deformation factor in the distortion compensation table. The activation domain compensation specifically involves introducing a learnable offset into the activation output of a specific layer of the model to stabilize the activation variance. The inference boundary compensation specifically refers to adjusting the boundary softening coefficient or normalization scale of the model output layer.
7. An edge computing implementation system based on cloud-edge collaboration, characterized in that: The system includes a cloud, several edge nodes, and communication equipment; The edge node is configured to: extract a locally distorted signature that does not contain the original privacy data based on the inference process of the local model. The locally distorted signature includes input distribution offset features, inference path activation mode features and gradient direction statistical features, and upload them to the cloud. The cloud is configured to: construct and train a variational diffusion residual model to learn an invertible mapping from the local distortion signatures of edge nodes to the cloud reference distribution, and generate a lightweight distortion compensation table for each edge node based on the invertible mapping, including compensation parameters for performing minor weight deformations, activation domain realignment, and inference boundary adjustments on the node model; and distribute the distortion compensation table along with the base model to the edge nodes. The edge node is also configured to: replace its local model with the issued base model, and perform deformable compensation on the base model by loading the distortion compensation table to correct its expected distortion relative to the data distribution of the edge node and improve the consistency of cross-node inference. The communication device is configured to enable data transmission between the edge node and the cloud.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1-6.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-6.