Lightweight model cooperative distillation and updating system for edge computing

CN122693768APending Publication Date: 2026-09-04NORTHEAST FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610935235.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-09-04

AI Technical Summary

Technical Problem

然而,此类方法往往仅关注单次推理结果的互补,未能将云端的高质量知识转化为轻量化模型自身的进化能力

Benefits of technology

[0012] 1. This invention constructs a multi-dimensional collaborative triggering mechanism through edge computing devices, enabling cloud resource access to no longer rely on a single confidence index. During operation, the edge computing device acquires image frames in real time and extracts the first feature data while simultaneously calculating the image's quality tensor and weightedly fusing the first confidence score with the quality tensor. Only when the weighted product falls below a preset trigger threshold is the first feature data, image frame, and model version number packaged into a collaborative request packet and sent to the cloud. This triggering mechanism allows the edge device to accurately identify critical moments requiring cloud intervention, even under conditions where its own inference results are unreliable and the image quality itself cannot support accurate judgment. This effectively avoids invalid cloud requests caused by quality issues such as image blurring or abnormal lighting, ensuring the reliability of local inference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122693768A_ABST
    Figure CN122693768A_ABST
Patent Text Reader

Abstract

The application discloses a lightweight model cooperative distillation and updating system for edge computing and relates to the technical fields of edge computing and machine learning. The system comprises an edge computing device and a cloud center server. The edge computing device stores a lightweight model, a version number and a to-be-updated layer index table, acquires an image frame and extracts first feature data, first confidence and quality tensor. When a weighted product is lower than a trigger threshold, a cooperative request package is packaged and sent to the cloud. The cloud center server extracts second feature data from the image frame, calls a parameter matrix from a projection matrix library, generates aligned feature data, calculates a residual error with the second feature data and chainwise derives to generate a decoupling gradient vector which is fed back to the edge device. The edge device checks a version number time sequence deviation, executes parameter coverage and updates the version number. The application realizes lightweight model distillation and updating of cloud-edge cooperation, reduces edge computing cost while ensuring model performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of edge computing and machine learning technology, specifically a lightweight model collaborative distillation and update system for edge computing. Background Technology

[0002] Edge intelligence is a crucial development direction that deeply integrates machine learning technology with edge computing architecture. It aims to push model inference capabilities down to the network edge, enabling local data processing and real-time response. In typical edge scenarios such as video surveillance and intelligent transportation, lightweight pedestrian re-identification models have attracted widespread attention due to their ability to achieve efficient feature extraction on resource-constrained devices. However, dynamically changing scene environments at the edge, such as sudden changes in lighting conditions, target occlusion, or viewpoint switching, can significantly affect the inference confidence of lightweight models, leading to unpredictable fluctuations in feature extraction quality. This dynamic fluctuation causes the feature representation output by the lightweight model to deviate semantically from the large model in the cloud, thus triggering a reliability crisis in edge recognition results.

[0003] Existing technologies often employ a strategy combining model compression and knowledge distillation. Guided by large pre-trained models in the cloud, knowledge is transferred to lightweight edge models to improve accuracy during online inference. Some solutions further introduce edge-cloud collaboration mechanisms, triggering cloud-based re-identification when edge device confidence is low, using cloud computation results as auxiliary decision-making criteria. However, these methods often only focus on the complementarity of single inference results, failing to transform high-quality cloud knowledge into the lightweight model's own evolutionary capabilities. When the scene distribution on the edge continuously shifts, the lightweight model repeatedly triggers cloud requests due to the inability to obtain targeted parameter updates, leading to a surge in communication overhead and increased response latency. More critically, existing update schemes often use full parameter fine-tuning or simple gradient backpropagation, failing to distinguish the differences in sensitivity to scene drift across different levels of the model. This coarse-grained update strategy not only introduces unnecessary computational burden but may also destroy the stable feature representations already learned by the lightweight model due to gradient information redundancy or noise interference.

[0004] How to efficiently, accurately, and lightweightly inject cloud knowledge into lightweight models in dynamic edge environments, enabling edge devices to autonomously adapt to scene changes while maintaining low computational overhead, has become a core bottleneck that urgently needs to be overcome in the current field of edge intelligence. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a lightweight model collaborative distillation and update system for edge computing.

[0006] To achieve the above objectives, the technical solution of the present invention is as follows:

[0007] An edge computing device is used to store a lightweight model, model version number, and an index table of layers to be updated; during the running phase, it acquires image frames in real time, extracts the first feature data and the first confidence level, and calculates the quality tensor of the image; when the weighted product of the first confidence level and the quality tensor is lower than a preset trigger threshold, it encapsulates the first feature data, image frame, and model version number into a collaborative request packet and sends it to the cloud central server.

[0008] A cloud-based central server is used to extract second feature data from the image frame; by retrieving a preset parameter matrix from a pre-stored projection matrix library, the first feature data is projected onto a space of the same dimension as the second feature data to generate aligned feature data; the residual between the aligned feature data and the second feature data is calculated, and chained differentiation is performed to generate a decoupled gradient vector for a specific layer based on the index table of the layer to be updated; the decoupled gradient vector is matched with the model version number and then fed back to the edge computing device;

[0009] The edge computing device is also used to receive the decoupled gradient vector and verify the timing deviation of the model version number; if the timing deviation is within a preset deviation window, a momentum smoothing factor is introduced to weight and fuse the decoupled gradient vector with the historical gradient mean to generate the target update gradient, and parameter overwrite is performed on the lightweight model to synchronously update the model version number.

[0010] This invention discloses a lightweight model collaborative distillation and update system for edge computing, comprising:

[0011] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0012] 1. This invention constructs a multi-dimensional collaborative triggering mechanism through edge computing devices, enabling cloud resource access to no longer rely on a single confidence index. During operation, the edge computing device acquires image frames in real time and extracts the first feature data while simultaneously calculating the image's quality tensor and weightedly fusing the first confidence score with the quality tensor. Only when the weighted product falls below a preset trigger threshold is the first feature data, image frame, and model version number packaged into a collaborative request packet and sent to the cloud. This triggering mechanism allows the edge device to accurately identify critical moments requiring cloud intervention, even under conditions where its own inference results are unreliable and the image quality itself cannot support accurate judgment. This effectively avoids invalid cloud requests caused by quality issues such as image blurring or abnormal lighting, ensuring the reliability of local inference.

[0013] 2. The cloud-based central server of this invention retrieves a preset parameter matrix from a pre-stored projection matrix library, projecting the first feature data from the edge side onto a space of the same dimension as the second feature data extracted from itself, generating aligned feature data. This projection alignment operation enables feature representations from different network structures to be compared in a unified semantic space, thus laying a solid foundation for subsequent knowledge distillation. The decoupled update strategy allows cloud-based knowledge to be precisely injected into the lightweight model at the layers most sensitive to current scene drift, avoiding computational redundancy and interference with stable feature representations caused by full updates, achieving efficient and targeted knowledge transfer.

[0014] 3. This invention employs a momentum fusion update mechanism with temporal verification, enabling the gradient update process to smoothly absorb information from historical update directions. This effectively suppresses noise disturbances that may be introduced by a single gradient update, avoiding model performance fluctuations caused by gradient oscillations. Simultaneously, the synchronized version number update establishes a temporal consistency foundation for subsequent collaborative interactions, thus ensuring that the lightweight model maintains stable and reliable inference performance during continuous evolution. Attached Figure Description

[0015] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts. Wherein:

[0016] Figure 1 This is a flowchart illustrating the working principle of the present invention;

[0017] Figure 2 This is a timing flowchart of the present invention. Detailed Implementation

[0018] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.

[0019] In existing technologies, the deployment of lightweight edge models often employs static distillation or single-cycle collaborative inference strategies, making it difficult to balance real-time response and continuous evolution capabilities. Traditional methods, when edge device inference confidence is insufficient, often directly request cloud-based re-identification, using cloud computation results as auxiliary decision-making. However, this collaboration remains at the single-task level, failing to transform high-quality cloud knowledge into the lightweight model's own parameter evolution. When sudden changes in illumination, target occlusion, or viewpoint switching cause continuous scene distribution drift, the lightweight model repeatedly triggers cloud requests due to the lack of a targeted parameter update mechanism, leading to a surge in communication overhead and increased response latency. Existing devices cannot distinguish the differences in sensitivity to scene drift across different levels of the model. Coarse-grained full parameter fine-tuning not only incurs unnecessary computational burden but may also disrupt the stable feature representations already learned by the lightweight model due to gradient information redundancy or noise interference, making it difficult to meet the dynamic balance requirements of accuracy and efficiency in edge intelligence scenarios.

[0020] To address these issues, the study found that the fluctuation in inference confidence of lightweight models in dynamic scenes depends not only on the discriminability of the image content itself but also on the image quality at the time of image acquisition. When image quality deteriorates, even if the target itself has high discriminability, the features extracted by the lightweight model may still exhibit semantic drift, and a single confidence index is insufficient to distinguish between the two different failure modes of "target blurring" and "feature misjudgment." Therefore, a multi-dimensional triggering mechanism is proposed, which weights and fuses the image quality tensor with the model confidence, enabling edge devices to accurately identify critical moments requiring cloud-based knowledge intervention at their own capability boundaries. Further research revealed that during the adaptation of lightweight models to scene drift, different network layers exhibit significant differences in their sensitivity to distribution changes. Lower-level features are sensitive to changes in appearance such as illumination and angle, while higher-level semantic layers are more discriminative of target categories. Therefore, an approach is proposed to generate decoupled gradient vectors based on the index table of the layers to be updated, updating parameters only for specific layers sensitive to current scene drift. Further experimental verification revealed that the temporal verification of model version number and the momentum smoothing fusion mechanism were introduced into the gradient application process, enabling the lightweight model to maintain the stability of historical features while absorbing knowledge from the cloud, thus forming a closed-loop feedback system with continuous evolution capabilities.

[0021] After introducing the basic concept of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0022] Example:

[0023] like Figure 1 As shown, a lightweight model collaborative distillation and update system for edge computing includes:

[0024] Edge computing devices are used to store lightweight models, model version numbers, and index tables of layers to be updated; during the runtime phase, image frames are acquired in real time, first feature data and first confidence scores are extracted, and the quality tensor of the image is calculated; when the weighted product of the first confidence score and the quality tensor is lower than a preset trigger threshold, the first feature data, image frames, and model version numbers are encapsulated into a collaborative request packet and sent to the cloud central server.

[0025] The cloud-based central server is used to extract the second feature data from the image frame; by retrieving the preset parameter matrix from the pre-stored projection matrix library, the first feature data is projected onto a space of the same dimension as the second feature data to generate aligned feature data; the residual between the aligned feature data and the second feature data is calculated, and chained differentiation is performed to generate a decoupled gradient vector based on the index table of the layer to be updated; the decoupled gradient vector is matched with the model version number and then fed back to the edge computing device.

[0026] Among them, the edge computing device is also used to receive the decoupled gradient vector and verify the timing deviation of the model version number; if the timing deviation is within the preset deviation window, a momentum smoothing factor is introduced to weight and fuse the decoupled gradient vector with the historical gradient mean to generate the target update gradient, and to perform parameter overwrite on the lightweight model and update the model version number synchronously.

[0027] like Figure 2 The diagram shown illustrates the timing sequence of the lightweight model collaborative distillation and update method for edge computing proposed in this application. This application integrates a cloud-edge collaborative evolution framework with manifold alignment capabilities and version timing robustness into the communication computing power network between edge computing units and cloud inference clusters. For example, edge computing devices can employ edge computing boxes (such as NVIDIA Jetson Orin), based on an embedded GPU architecture.

[0028] Specifically, the persistent storage (such as NVMe SSD) or static memory area of ​​the edge computing device reserves specific data structure space for the model runtime environment. The system initializes the "lightweight model" through the model loading module and maintains a "state descriptor" associated with it in memory. This descriptor not only contains the model entry address and tensor dimension information, but more importantly, it encapsulates evolutionary attributes: the current model version number and the index table of layers to be updated. The index table of layers to be updated defines the specific range of layers in the model that are allowed to perform online parameter coverage, which is usually selected as fully connected layers or high-dimensional feature mapping layers close to the output.

[0029] The layer index table is used to identify specific network layers in the lightweight model that are allowed to have online parameter updates. Its initial version is generated using any of the following methods:

[0030] Method 1 (Manual Configuration): Based on the deployment scenario and computing power constraints of edge computing devices, the configuration is pre-configured by operations and maintenance personnel. For example, for models deployed on Jetson Orin devices with strong computing power, the last two residual blocks and the fully connected layer can be set as updatable layers; for devices with weaker computing power, only the fully connected layer is set as updatable layer.

[0031] Method 2 (Automatic Selection Based on Gradient Sensitivity): During the offline distillation phase of the cloud-based teacher model and the edge student model, the system collects validation set images and calculates the cumulative gradient values ​​of the parameters of each network layer in the edge model. Network layers whose cumulative gradient values ​​exceed a preset sensitivity threshold are recorded in the index table of layers to be updated.

[0032] Lightweight Model (Edge Student Model): In a preferred embodiment, a lightweight variant of OSNet (Omni-Scale Network) is employed. Its core is a full-scale feature learning block, which captures features at different spatial scales by aggregating multiple convolutional paths (with channels of 64, 128, 256, etc.). An exemplary structure consists of: an initial convolutional layer (7x7, kernel=2), followed by four stages consisting of stacked full-scale blocks (e.g., containing 2, 2, 2, 2 blocks respectively), and finally a global average pooling layer and a fully connected feature layer with an output dimension of 128 or 256. This structure has approximately 2.2M parameters, making it suitable for edge deployment.

[0033] Cloud-based teacher model: In a preferred embodiment, the TransReID model is employed, with the VisionTransformer (ViT-Base / 16) as its backbone network. Specifically, the input image is segmented into 16x16 tiles, which are then linearly projected and positionally encoded before being input into a sequence consisting of 12 Transformer encoder layers. Each encoder layer includes a multi-head self-attention mechanism and a feedforward network. Finally, the features corresponding to the [CLS] token are extracted as 1024-dimensional "secondary feature data." This model possesses stronger global semantic modeling capabilities.

[0034] The Adam optimizer was used, with an initial learning rate of 0.0003 and weight decay of 0.0005. Cosine annealing was employed for learning rate scheduling. The model was trained for a total of 120 epochs with a batch size of 64. A validation set was used to monitor performance during training, and an early stopping strategy was employed to prevent overfitting; training was stopped when the validation set loss did not decrease for 10 consecutive epochs.

[0035] Method 3 (Dynamic Recognition Based on Performance Degradation Analysis): The system simulates scene distribution drift, inputs test images with different perturbation intensities into the edge model, and monitors the offset of the output features of each layer; the K network layer indices with the largest output feature offsets and the most significant impact on the final recognition accuracy are recorded in the layer index table to be updated. K is a preset positive integer, preferably 3 to 5.

[0036] During system operation, discrete raw image signals are captured in real time via video input interfaces (such as MIPI-CSI, USB 3.0, or network RTSP streams). These raw signals are fed into the preprocessing logic of the edge computing device (such as OpenCV-based or VPI-based preprocessing) to be transformed into normalized image frames. In this process, the system not only utilizes a lightweight model to extract dimensions... The system uses "first feature data" and hardware-accelerated texture analysis to calculate "quality tensors" that characterize the distribution of image sharpness, brightness, and contrast. Simultaneously, the system acquires the class probability distribution output by the lightweight model and calculates the "first confidence level."

[0037] When the system detects a computational logic trigger signal, the edge does not immediately perform a local update, but instead enters the cloud-edge collaboration process. The system's internal logic calculates a weighted product of the first confidence level and the quality tensor through multiplication. If this product is lower than a preset trigger threshold... If the current local model cannot effectively generalize to the current environment, the system will call an encapsulation instruction to encapsulate the first feature data, the original image frame, and the corresponding model version number into a "cooperation request packet," which will then be sent to the cloud central server via a network transmission protocol (such as MQTT or gRPC).

[0038] For example, to ensure that the first confidence level and the mass tensor are weighted and fused on a uniform scale, the system first performs standardization processing:

[0039] 1. The quality tensor consists of multiple components such as sharpness, brightness, and contrast, and the dimensions of these components are not uniform. The system maps each component to the [0,1] interval through Min-Max normalization:

[0040] ;

[0041] in, The original mass component;

[0042] and These are the minimum and maximum values ​​of this component in the historical data. The normalized components are then weighted and averaged or their minimum values ​​are taken to obtain the final scalar value of the mass tensor. .

[0043] 2. Weighted fusion calculation:

[0044] ;

[0045] in, The first confidence level (the model output probability is taken after Softmax, and naturally lies in the [0,1] interval);

[0046] This is the normalized mass tensor;

[0047] and For the preset weighting coefficients, satisfy ,and Preferably, for scenarios with frequent changes in lighting, the following settings are provided: This is to strengthen the weight of image quality in triggering decisions.

[0048] 3. If weighted fusion index Below the preset trigger threshold ( If the value is preferably 0.5, then it is determined that the current local model can no longer effectively generalize to the current environment, triggering cloud-edge collaboration.

[0049] After receiving the request packet, the cloud-based central server initiates the high-dimensional feature manifold alignment process. The high-performance teacher model in the cloud performs parallel inference on the image frames, extracting dimensions of [dimensionality missing]. The system generates "second feature data." Due to the inconsistency between the feature spaces of the cloud and edge models, the system retrieves a preset parameter matrix from a pre-stored projection matrix library. Using a tensor multiplication module, it projects the first feature data onto a manifold space of the same dimension as the second feature data, generating "aligned feature data." Subsequently, the hardware arithmetic module calculates the residual vector between the aligned feature data and the second feature data, and performs chained differentiation in the backpropagation chain based on this residual. During this process, the cloud system strictly adheres to the received index table of layers to be updated, masks gradients from non-target layers, generates a "decoupled gradient vector" precisely pointing to a specific convolutional layer on the edge side, and matches it with the original model version number before sending it back.

[0050] After calculating the residual between the alignment feature and the second feature, the cloud central server uses the chain rule of differentiation, combined with the "index table of layers to be updated" uploaded from the edge, to calculate only the gradient components for specific layers of the edge model.

[0051] After receiving the feedback data, the edge computing device performs an atomic update based on version locks. The scheduler first extracts the version number from the feedback packet and compares it with the current version number in the local register to calculate the "timing deviation". If the timing deviation is within a preset deviation window, it indicates that the local model has not experienced severe logical drift. At this point, the system introduces a momentum smoothing factor to weight and fuse the decoupled gradient vector with the average gradient stored in the historical buffer to generate the "target update gradient".

[0052] Finally, the system triggers a hardware-level parameter overwrite instruction. The memory management unit locates the physical address of the weights corresponding to the index table of the layer to be updated and uses the target update gradient to overwrite and update the network parameters of the lightweight model. After the update is completed, the system automatically increments the model version number register value, marking the completion of a closed loop of an evolution cycle. By introducing the mass tensor triggering and manifold projection mechanism, this application effectively solves the performance degradation problem of lightweight models in dynamic scenarios, ensuring the accuracy of knowledge transfer and the temporal stability of the system during cloud-edge collaboration.

[0053] This application achieves a steady-state improvement in model recognition performance under resource constraints and dynamic scenarios by digitally reconstructing the model evolution logic in an edge computing environment. A weighted triggering mechanism based on image quality tensor and confidence level is introduced to effectively solve the problem of invalid collaborative requests caused by environmental noise and reduce the redundant loss of cloud-edge communication bandwidth. Manifold projection alignment based on a preset parameter matrix overcomes the technical obstacle of inconsistent feature space dimensions between heterogeneous models, ensuring the accuracy of gradient pointing during knowledge distillation. Simultaneously, through the collaborative constraint of version number temporal deviation verification and momentum smoothing factor, parameter coverage instability and model logic drift caused by asynchronous network latency are avoided, ensuring atomic updates of key recognition functions. Experimental data shows that while maintaining high frame rate inference on the edge side, the system enhances the lightweight model's adaptability and generalization accuracy to complex adversarial environments, forming an efficient and stable cloud-edge data closed loop and a continuous model evolution mechanism.

[0054] This application further proposes that the cloud-based central server also performs dynamic evolution processing of a preset parameter matrix. Specifically, during system operation, through continuous collaboration between the high-performance cloud-based teacher model and the lightweight edge model, a large number of heterogeneous feature pairs for the same image frame are accumulated. The cloud-based central server retrieves multiple sets of historical collaboration request packets from the memory pool via a high-speed data bus and parses out the first feature data within them. and its corresponding second feature data extracted from the cloud. In one embodiment, the system quantifies the semantic loss of edge features after projection by constructing a feature manifold mapping error function, which is typically defined as the mean square error or cosine distance measure between the aligned feature data and the second feature data.

[0055] To achieve dimension alignment while preserving the topological structure of the feature space, preferably, the system aims to minimize the mapping error function value and uses the Lagrange multiplier method to solve for the correction increment of the preset parameter matrix W under the constraint of satisfying preset orthogonality. In this mathematical modeling process, the pre-set orthogonality constraint aims to ensure that the projection transformation does not change the manifold distribution characteristics of the original features, and to prevent feature collapse.

[0056] The specific calculation formula is as follows:

[0057] ;

[0058] Where L is the Lagrange function;

[0059] W is a preset parameter matrix;

[0060] These are Lagrange multiplier vectors;

[0061] It is an identity matrix.

[0062] By taking the partial derivative of the preset parameter matrix W and setting it to zero, the system can solve for the optimal mapping for the current batch in the arithmetic logic unit.

[0063] In the specific engineering implementation steps, the counting module inside the cloud central server continuously counts the number of received collaborative request packets. When the accumulated number of collaborative request packets reaches a preset batch threshold (e.g., 128 or 256 sample packets, dynamically adjusted according to the video memory capacity), a matrix update instruction is triggered, adding the calculated correction increment to the current preset parameter matrix. Through this incremental evolution, the system can correct the semantic space deviation between the edge feature manifold and the cloud feature manifold in real time, ensuring that the accuracy of cloud-edge collaboration remains stable even when external factors such as ambient lighting and viewing angle undergo trend drift.

[0064] Furthermore, the preset parameter matrix needs to be pre-trained during the system initialization phase. In one embodiment, the training conditions are set as follows: the Adam optimizer is used, and the initial learning rate is set at... to The training cycle is between 50 and 100, and convergence is achieved on public pedestrian re-identification datasets (such as Market-1501 or MSMT17) containing at least 0,000 pairs of samples.

[0065] Through the aforementioned dynamic evolutionary processing, this application achieves adaptive compensation for heterogeneous feature mapping relationships. Utilizing orthogonal constraint projection under the Lagrange multiplier method, the dimensional gap and dimensional differences in feature representation between the lightweight model and the cloud model are mathematically eliminated, improving the numerical stability of residual calculation and chain derivatives. The incremental update mechanism based on batch thresholds effectively balances computational real-time performance and mapping accuracy, avoiding random interference from single-sample noise on the parameter matrix. Experimental observations show that this evolutionary mechanism keeps the feature alignment error at a preset low level during long-term operation, ensuring high semantic consistency of the decoupled gradient vector fed back to the edge side, thereby supporting the continuous and accurate evolution of the lightweight model in non-stationary environments.

[0066] This application further proposes that, before the edge computing device performs parameter overriding, a version locking mechanism must be used to ensure the logical consistency of the update operation. Specifically, after receiving the decoupled gradient vector from the cloud central server, the system first extracts the original model version number from the feedback packet by the asynchronous logic verification unit, and then subtracts it from the current model version number stored in the local register to obtain the timing deviation. In one embodiment, the preset deviation threshold is typically set to 1 to 3 version cycles (corresponding to the time order of approximately 500 to 1500 frames of images processed at the edge) to be compatible with network communication latency within the normal range.

[0067] When the verification detects a timing deviation exceeding the aforementioned preset deviation threshold, the system determines that the current local model has experienced severe version drift or update disorder, and then triggers version rollback arbitration logic. Preferably, the edge computing device maintains a historical version rollback record table in its non-volatile memory. This table records the trajectory of model state changes during system operation using a circular linked list structure. By reading this record table, the system obtains the timing deviation statistics for the most recent N version updates (where N is a preset positive integer, for example, an integer between 5 and 10, representing a short-term operating window).

[0068] Specifically, the time-series deviation statistic can be defined as the variance or average offset within a sliding window. If this statistic exceeds a preset rollback threshold (e.g., set to 1.5 times the average deviation), it indicates that the local evolution path has deviated from the baseline feature manifold. At this point, the edge computing device sends a version status query request to the cloud central server via a narrow-bandwidth control channel. Based on the received request, the cloud central server retrieves the most suitable stable version for the current edge environment from the global model version library and returns a recommended version number. After receiving the recommended version number, the edge computing device calls the file system interface, loads the corresponding historical model parameters from the local redundant backup area according to the number, and performs an overwrite recovery.

[0069] The aforementioned version rollback arbitration mechanism provides system-level fault tolerance constraints and self-healing capabilities. By introducing a historical version rollback record table and quantitative comparison of timing deviation statistics, this application logically isolates unstable updates caused by sudden network jitter or computing power overload, avoiding model collapse caused by the accumulation of erroneous gradients. The cloud-based arbitration-based recommended version loading mechanism ensures that edge computing devices can quickly backtrack to the optimal evolution node after timing misalignment, maintaining the robustness and consistency of the lightweight model in performing pedestrian re-identification tasks over long periods.

[0070] This application further proposes that after the cloud-based central server generates the decoupled gradient vector based on the index table of the layer to be updated, the system also executes a gradient validity verification procedure for numerical stability. Specifically, since there is a significant difference in parameter scale between the high-performance teacher model in the cloud and the lightweight edge model, the original gradient generated directly through chained differentiation may exhibit numerical inaccuracies when propagated across models. In one embodiment, the arithmetic logic unit of the cloud-based central server first traverses all weighted gradient elements in the decoupled gradient vector, calculates its L2 norm through arithmetic operations of summation and square root, thereby obtaining the gradient strength value characterizing the gradient energy density.

[0071] To prevent training crashes due to runaway inter-layer gain, the system compares the calculated gradient strength values ​​with a preset gradient explosion threshold. and gradient vanishing threshold Perform interval comparison. Specifically, gradient explosion threshold. and gradient vanishing threshold Typically, the numerical representation range of a lightweight model (such as an OSNet or MobileNet variant) in FP16 or INT8 quantization is predefined. Preferably, the gradient explosion threshold... The value can be set between 1.0 and 10.0 (e.g., a value of 5.0), while the gradient vanishing threshold... Then set in to Between (e.g., taking values) ).

[0072] If the gradient strength value is detected to exceed the gradient explosion threshold Or below the gradient vanishing threshold The system generates a dynamic gradient decay factor through gradient scaling logic. The specific calculation formula is as follows:

[0073] ;

[0074] in, This is the generated gradient decay factor;

[0075] The preset gradient explosion threshold;

[0076] This is the L2 norm for decoupling the gradient vector.

[0077] Preferably, in one embodiment, if gradient vanishing occurs, the system performs reverse compensation on the gradient using a preset gain step size to maintain effective weight updates. Subsequently, the system performs element-wise scaling on the decoupled gradient vector using a gradient decay factor to generate a compressed gradient vector with a more stable numerical distribution, and uses this compressed gradient vector to replace the original decoupled gradient vector and feed it back to the edge computing device.

[0078] During this process, the training environment for the lightweight model needs to be strictly controlled. In one embodiment, the pre-training phase of the model uses a cross-entropy loss function combined with a triplet loss function, and sets the weight decay factor to [value missing]. By implementing such gradient pruning and scaling strategies in the cloud, this application enhances the numerical robustness of the cloud-edge collaborative evolution process. Utilizing the L2 norm for real-time monitoring of gradient strength, it prevents abnormal gradients from impacting the weight space of the edge model at the algorithmic logic level, effectively solving the gradient vanishing or numerical overflow problems that easily occur in asynchronous updates of deep convolutional networks. Scaling based on a dynamic decay factor ensures that the update vector fed back to the edge is always within a linearly adjustable range co-located by hardware and software, guaranteeing the accuracy of the lightweight model parameter coverage and the smoothness of the convergence process.

[0079] This application further proposes that before the cloud-based central server projects the first feature data onto a manifold space of the same dimension using a preset parameter matrix, the system also executes a pre-projection adaptability discrimination procedure. Specifically, because the physical environment of the edge computing device (such as sudden changes in illumination, extreme weather, or camera pose shifts) may cause the distribution of the acquired images to undergo non-stationary evolution, a single fixed projection matrix is ​​difficult to continuously guarantee the semantic alignment accuracy between heterogeneous features. In one embodiment, the kernel logic module of the cloud-based central server reads the reference feature distribution pre-stored in the local non-volatile memory (this distribution is constructed from the mean and variance of the first features of massive standard samples during the offline training phase), and uses kernel density estimation or histogram statistics to calculate the KL divergence (Kullback-Leibler Divergence) between the currently received first feature data and the reference feature distribution in real time, using this as a distribution offset to quantify the heterogeneity of the environment.

[0080] To achieve dynamic decoupling and reconstruction between the projection and the input feature manifold, the system compares the calculated distribution offset with a preset distribution drift threshold. Perform quantitative comparison. Preferably, a preset distribution drift threshold is used. The alignment error is determined experimentally based on the projection matrix under different distribution offsets, and is usually set between 0.5 and 2.0 (e.g., a value of 1.2). This numerical range is determined based on the characteristic stability experiments of the lightweight model under different noise gains.

[0081] The specific calculation formula is as follows:

[0082] ;

[0083] in, This is the distribution offset;

[0084] The distribution of the first feature data acquired in real time;

[0085] The reference feature distribution is stored locally.

[0086] If the distribution offset Exceeding the preset distribution drift threshold If the current preset parameter matrix is ​​found to have entered a performance failure zone, the cloud-based central server triggers matrix reselection logic, retrieving and filtering the replacement parameter matrix from the built-in projection matrix library to find the best match for the current distribution offset interval. In one embodiment, the projection matrix library contains multiple sets of pre-trained orthogonal transformation matrices for different illumination intensities (bright, weak, backlight). Subsequently, the system replaces the original preset parameter matrix with the replacement parameter matrix to perform subsequent projection operations, ensuring the continuity of feature manifold alignment.

[0087] In this process, the construction of the projection matrix library must meet strict pre-training conditions. Preferably, a collaborative contrastive learning framework is adopted, and closed-loop training is performed on an augmented dataset simulating various perturbation distributions, with the learning rate step controlled at [value missing]. This ensures that each candidate matrix can minimize its feature residuals within a specific distribution offset interval.

[0088] Through the aforementioned projection adaptability discrimination mechanism, this application enhances the robustness of the cloud-edge collaborative system to complex and ever-changing environments. By utilizing the sensitive capture of feature distribution shifts using KL divergence, the failure problem of fixed mapping in the face of data distribution drift is logically solved, avoiding erroneous gradient backpropagation due to feature alignment misalignment. A dynamic switching strategy based on a multi-matrix library ensures that the projection operation always maintains optimal matching with the current input distribution, thereby guaranteeing the effectiveness of the decoupled gradient vector from the source and supporting the lightweight model to achieve accurate and smooth online evolution even in non-ideal environments.

[0089] This application further proposes that after the edge computing device generates the target update gradient, the system needs to intervene with a gradient-model compatibility verification procedure for the underlying hardware before performing physical parameter overriding. Specifically, since the cloud central server and the edge computing device may use heterogeneous computing frameworks or hardware acceleration units with different energy efficiency levels (such as using high-performance server-grade GPUs in the cloud and embedded NPUs (neural network processors) or FPGAs (field-programmable gate arrays) at the edge), the gradient tensors they generate may differ in storage format and precision representation. In one embodiment, the scheduling kernel of the edge computing device first parses the received target update gradient and obtains its corresponding first gradient resolution (i.e., the dimension size of the gradient tensor) and first data type (such as FP32, FP16, or INT8) by reading its data packet header information.

[0090] To ensure that the update instructions are accurately applied to the weight matrix of the neural network, the system synchronously calls the model metadata reading interface to obtain the second resolution and second data type of the current parameters of the layer to be updated in the lightweight model. Preferably, the second resolution is usually determined by the model's predefined network topology, while the second data type depends on the configuration of the inference engine currently running on the edge side (such as the quantization deployment mode of TensorRT).

[0091] If the verification finds that the first gradient resolution does not match the second resolution (e.g., the cloud generates the full convolution kernel gradient, while the edge only needs to update some parameters of the depthwise separable convolution), or the first data type does not match the second data type (e.g., the cloud returns high-precision floating-point numbers, while the lightweight model has been quantized to fixed-point numbers), the system will automatically trigger the gradient format conversion module. Specifically, for cases of resolution mismatch, the system uses preset bilinear interpolation or zero-padding to perform resolution resampling on the target update gradient to match the shape of the weight tensor of the layer to be updated.

[0092] In cases of inconsistent data types, the system performs a data type cast. In one embodiment, if the FP32 gradient is converted to INT8 format, the system needs to perform saturation truncation based on a preset scaling factor and offset. Preferably, the scaling factor is typically between 0.001 and 1.0 to ensure that the quantized gradient retains the directional characteristics of the original gradient.

[0093] During this process, the hardware deployment conditions of the lightweight model must meet strict alignment requirements. In one embodiment, when deploying on the Jetson platform, the kINT8 or kHALF flag must be set through the TensorRT compilation configuration parameters to ensure that the underlying memory allocation is fully compatible with the converted data format.

[0094] Through the aforementioned gradient-model compatibility verification mechanism, this application eliminates the physical layer barrier to software updates in heterogeneous computing environments. By dynamically adapting gradient dimensions and precision, it logically resolves the data gap between high-precision models in the cloud and quantized models at the edge, avoiding the risk of illegal system instructions or memory overflows due to format conflicts. Automated processing based on resampling and forced conversion ensures that the target update gradient can be accurately mapped to the weight address at the underlying hardware during atomic coverage, thereby supporting the seamless evolution and consistent expression of lightweight models across different hardware architectures.

[0095] This application further proposes that, in the pre-processing stage where the edge computing device sends the collaboration request packet to the cloud central server, the system also integrates a bandwidth adaptive packetization mechanism. Specifically, since edge devices are typically deployed in wireless communication networks or asymmetric broadband environments, fluctuations in the uplink rate of the network link may cause severe transmission delays in the collaboration request packet, thereby disrupting the timing consistency of cloud-edge collaboration. In one embodiment, the communication protocol stack of the edge computing device monitors the available bandwidth value of the current network link in real time. This value can be dynamically obtained by measuring the round-trip time (RTT) or throughput metrics within a preset period.

[0096] To achieve effective coordination under narrow bandwidth constraints, the system compares the monitored available bandwidth value with a preset bandwidth compression threshold. A comparison is performed. Preferably, a preset bandwidth compression threshold is used. The threshold is typically set between 2 Mbps and 10 Mbps (e.g., 5 Mbps), and this threshold range is determined based on the typical transmission latency of high-definition image frames (such as 1080P or 720P) in pedestrian re-identification tasks.

[0097] If the current available bandwidth is lower than the preset bandwidth tightening threshold The edge computing device will initiate object detection, extracting a "Region of Interest" (ROI) containing pedestrian targets from the original image frame. Specifically, the system uses a shallow feature heatmap or object detection bounding box from a lightweight model to spatially crop the original image, retaining the core feature regions of the pedestrian while discarding background pixels. Subsequently, the system replaces the original full image frame with the ROI and encapsulates it into a collaborative request packet.

[0098] Simultaneously, the system generates a "clipping identifier field" and encapsulates it into the collaboration request package. The clipping identifier field contains the offset of the subgraph in the original coordinate system. The scaling factor is set so that the cloud central server can adjust its preprocessing pipeline after receiving a request packet containing the identifier, prioritizing and only performing high-dimensional feature extraction based on key region subgraphs, thus avoiding the waste of computing resources caused by global scanning.

[0099] During this process, the execution logic of bandwidth adaptive packetization must meet real-time requirements. In one embodiment, the extraction process of the key region sub-image employs zero-copy memory technology to ensure that the image cropping operation does not consume additional CPU processing clock speeds. Preferably, the resolution of the key region sub-image is limited to between 10% and 30% of the original image to ensure that millisecond-level transmission performance can still be maintained even in extremely bandwidth-constrained environments (such as below 1 Mbps).

[0100] Through the aforementioned bandwidth adaptive packetization mechanism, this application achieves stable degradation of collaborative performance in complex network environments. By replacing the "full image frame" with a "key region sub-graph," the data entropy and transmission load of a single collaborative request are reduced at the physical layer, effectively shortening the time delay of the cloud-edge closed loop. Based on the semantic association of the "cropping identifier field," the accurate positioning of the feature extraction target by the cloud central server is ensured, guaranteeing that even under network congestion, the decoupled gradient vector can still be accurately generated based on the core target features, supporting the continuous online evolution of the lightweight model in unstable communication environments.

[0101] This application further proposes that, in the subsequent stage of generating decoupled gradient vectors on the cloud central server, the system also integrates a cloud cache preloading mechanism for high-concurrency scenarios. Specifically, since the state evolution of edge computing devices in continuous video streams is temporally correlated, their need for updating model parameters often follows a specific hierarchical path. In one embodiment, the scheduling of the cloud central server, while encapsulating the decoupled gradient vector, simultaneously parses the model version number corresponding to the vector and the distribution of the layers to be updated that triggered the update, and uses prediction algorithms based on Hidden Markov Models or simple linear extrapolation to predict the relevant layer indices that may be involved in the next collaborative request.

[0102] To eliminate I / O latency in loading large-scale model parameters from persistent storage (such as a parallel file system or object storage) to memory, preferably, the system pre-extracts auxiliary parameter sets corresponding to the relevant layer indices from a pre-stored cloud-based teacher model library or a global weight pool based on the prediction results. Specifically, the auxiliary parameter set includes, but is not limited to, the weight matrix, bias terms, and optimizer state variables of the next layer. The system uses kernel-level prefetch instructions to batch load this auxiliary parameter set from the physical hard disk into a cache (such as the server's L3 cache or a dedicated cache area in the GPU memory).

[0103] In one embodiment, the hit rate benchmark for the prediction logic is set between 70% and 90%. If the predicted relevant layer index is the next layer of the current convolutional block, the system will assign it a higher cache priority. When the cloud central server receives the next collaborative request packet, the preloading controller immediately compares the update layer requirement parsed in the request packet with the relevant layer index already stored in the cache. If the two achieve a logical match, the system directly skips the disk I / O addressing process and instantly calls the auxiliary parameter set from the cache to participate in manifold alignment and residual calculation.

[0104] During this process, the management strategy for cloud cache preloading must meet the requirement of dynamic eviction. Preferably, the Least Recently Used (LRU) algorithm is used to maintain the cache space. If the preloaded parameter set is not hit within a preset expiration threshold (e.g., 500ms to 2000ms, dynamically adjusted according to the video frame rate), the system automatically releases the space to ensure the turnover efficiency of cache resources. In addition, the preloading operation is executed in a separate background thread to ensure that it does not interfere with the real-time feedback logic of the current decoupled gradient vector.

[0105] Through the aforementioned cloud-based cache preloading mechanism, this application reduces end-to-end response latency in cloud-edge collaborative inference. By proactively predicting the evolution path at the edge, it addresses the I / O bottleneck caused by loading massive model parameters at the architectural level, enabling a shift in data processing flow from "passive response" to "active preparation." Based on efficient cache hits, it ensures that the cloud-based central server can maintain millisecond-level gradient generation speeds even when facing large-scale concurrent requests from edge nodes, thus supporting near real-time online evolution of lightweight models in highly dynamic monitoring environments.

[0106] This application further proposes that, before introducing a momentum smoothing factor to weight and fuse the decoupled gradient vector with the historical gradient mean, the edge computing device integrates a dynamic momentum factor adjustment program based on environmental complexity and temporal state awareness. Specifically, during online updates at the edge, increased latency due to network jitter and sudden environmental changes such as lighting and occlusion in the video frame can cause irregular numerical jumps in the decoupled gradient vector. To smooth this non-stationary gradient noise, the system uses an internal state acquisition module to obtain the current temporal deviation in real time. The specific value is used to synchronously call image processing to calculate the image entropy value of the current frame. This serves as the core indicator for quantitatively representing the richness of scene information and the uncertainty of features.

[0107] In one embodiment, the arithmetic logic unit of the edge computing device inputs the acquired timing deviation and image entropy value into a preset momentum factor calculation function. Preferably, the momentum factor calculation function employs exponential decay or inverse proportional mapping logic. The specific calculation formula is as follows:

[0108] ;

[0109] in, The generated dynamic momentum factor;

[0110] This is a timing deviation;

[0111] Image entropy value;

[0112] To balance the weighting coefficients, This is used to balance the effects of timing bias and image entropy on the momentum factor; preferably, The value range is [0.4, 0.7], with a default value of 0.6, to ensure the system can withstand severe network instability ( When the inertia of the parameters is relatively large, priority should be given to ensuring their stability.

[0113] and These are the adjustment parameters for time-series sensitivity and entropy sensitivity, respectively. In a simulation environment simulating network delay perturbations, the image entropy value is fixed. For a medium level (e.g., 0.5), test different The convergence curve of the edge model loss function for the values ​​(0.1, 0.5, 1.0, 2.0). Experimental results show that when When the value is between 0.8 and 1.2, the model can still maintain smooth convergence when faced with time delay fluctuations of 200ms to 800ms; If the value is too low (<0.5), the model will have too low sensitivity to latency and a slow convergence speed. If the value is too high (>2.0), the model becomes overly sensitive to time delays and is prone to oscillations. Therefore, preferably, The value range is [0.8, 1.2], and the default value is 1.0.

[0114] Under a fixed network latency, Gaussian noise of varying intensities is injected into the test image to simulate changes in image entropy, and different... The stability of feature extraction by the model is evaluated for values ​​(1, 5, 10, 20). Experimental results show that when... When the value is between 8 and 12, the model can maintain historical gradient weights in low-entropy (blurred image) scenarios and quickly respond to new gradients in high-entropy (sharp image) scenarios. Therefore, preferably, The value range is [8, 12], and the default value is 10.

[0115] In one embodiment, Set it between 0.4 and 0.7 (for example, a value of 0.6). The influence weight is usually higher than the image entropy value. This ensures that the system prioritizes maintaining parameter inertia when the network becomes severely unstable.

[0116] After calculating and generating a dynamic momentum factor that adapts to the current state, the system replaces the preset fixed momentum smoothing factor with this dynamic value in real time. Preferably, the value range of the dynamic momentum factor is strictly limited to between 0.1 and 0.95. If the time series deviation is too large (indicating that the backpropagated gradient is outdated) or the image entropy value is too high (indicating that the current feature is extremely unstable), the system will automatically reduce the weight of the current decoupled gradient vector and correspondingly increase the retention ratio of the historical gradient mean, thereby realizing adaptive damping control in the weighted fusion process.

[0117] In this process, the initialization training conditions of the momentum factor calculation function need to be determined through offline simulation experiments. In one embodiment, the system performs closed-loop iteration on a simulated monitoring dataset containing various network latency perturbations (10ms to 2000ms) and various contrast perturbations to ensure that the generated dynamic momentum factor can keep the loss function curve of the lightweight model within the range of the optimal convergence slope.

[0118] Through the aforementioned dynamic momentum factor adjustment mechanism, this application enhances the parameter evolution stability of the lightweight model under non-ideal communication and vision environments. By utilizing a two-dimensional coupled analysis of temporal bias and image entropy, the weight oscillation problem easily caused by fixed momentum in the face of sudden environmental changes or network lag is logically resolved. Based on dynamic weighted fusion using a nonlinear mapping function, it ensures that the gradient vector in each update cycle achieves a refined trade-off between historical experience and real-time feedback, fundamentally guaranteeing the numerical robustness and feature representation consistency of the lightweight model during long-term operation.

[0119] This application further proposes that the system also includes a global logical control unit, namely a cloud-based collaborative scheduler. This scheduler, as the core brain of the heterogeneous computing network, establishes bidirectional communication connections with multiple edge computing devices distributed in different geographical locations and the cloud-based central server performing high-concurrency computing. Specifically, the cloud-based collaborative scheduler does not merely perform simple data relay; instead, it initiates global inspection commands periodically (e.g., with an adjustable period of 30 to 300 seconds, preferably 60 seconds) through a preset task scheduling bus. During this process, the scheduler collects load status data (including current CPU / GPU utilization, available memory bandwidth, and network latency) and model staleness indicators from each edge computing device in real time. The model staleness indicator is typically calculated based on the difference between the current local model version number and the cloud-based baseline model version number, combined with the recent fluctuation trend of the device's recognition accuracy.

[0120] To achieve cluster-level computing power balance and maximize model evolution efficiency, the cloud-based collaborative scheduler performs multi-objective optimization calculations based on collected load status data and model staleness indicators. Preferably, the scheduler establishes a non-linear programming model considering "computational overhead" and "evolutionary benefits." When an edge computing device is detected to be under high load and its model staleness is low, the scheduler generates a simplified index table of layers to be updated, allowing updates only to a very small number of fully connected layers at the end; conversely, if the device is idle and its model staleness exceeds a preset drift threshold... (For example, if set to 10 version number units), a more comprehensive differentiated index table of layers to be updated will be generated, involving more deep convolutional blocks, to accelerate the performance convergence of the node.

[0121] Specifically, the differentiated layer index table to be updated contains a set of bitmap-encoded layer position fields. The cloud-based coordinating scheduler distributes this index table to the corresponding edge computing devices via a secure transmission protocol (such as TLS-encrypted MQTT messages). Upon receiving the new table, the kernel monitoring logic on the edge side overwrites the original layer index table to be updated stored in local memory using atomic replacement instructions. In one embodiment, the configuration conditions of the differentiated update strategy must meet the linear scalability requirement to ensure that when managing more than 1,000 edge nodes, the scheduler's control logic will not experience system stagnation due to synchronization blocking.

[0122] In this process, the weighting ratio of load status data and model staleness index is driven by a preset dynamic priority function. Preferably, in one embodiment, for security monitoring nodes with extremely high real-time requirements, the system automatically increases the weighting of load status judgment to prioritize ensuring the continuity of video stream processing, while reducing the pressure of gradient backpropagation by narrowing the index table update range.

[0123] Through the aforementioned cloud-based collaborative scheduler mechanism, this application achieves differentiated and refined collaborative evolution management of large-scale edge nodes. By leveraging real-time awareness of global computing resources and model decay status, it logically solves the problem of local node overload or evolutionary imbalance caused by a "one-size-fits-all" update strategy. Based on the dynamic distribution of differentiated update layer index tables, it ensures that each edge device can obtain the most suitable update load under its current hardware and software constraints, improving the energy efficiency and global generalization consistency of the entire cloud-edge collaborative network during long-term operation, and providing solid architectural support for the online evolution of city-level pedestrian re-identification systems.

[0124] The following is a specific embodiment of a lightweight model collaborative distillation and update system for edge computing:

[0125] This embodiment demonstrates the complete application process of this system in a smart city security monitoring scenario, specifically for the pedestrian re-identification (Re-ID) task in a commercial district.

[0126] A smart surveillance PTZ camera equipped with an NVIDIA Jetson Orin module was deployed at the edge of a commercial street. It contained a lightweight model (OSNet architecture, 2.2M parameters) with an initial version number of V1.0.0. During the peak foot traffic period on Friday evening, the system captured real-time image frames of a pedestrian wearing a dark gray hoodie. The edge computing device used the TensorRT acceleration engine to extract the "first feature data" (128-dimensional feature vector) of the target and output the first confidence level. The synchronously invoked hardware-accelerated texture detected the current ambient illuminance as 15 lux and calculated the "mass tensor" value representing low-light noise interference to be... The system performs a weighted judgment and calculates the trigger indicators. This value is lower than the preset trigger threshold. This immediately triggers the cloud-edge collaboration mechanism. The edge device encapsulates the aforementioned features, the original image, and the version number into an MQTT collaboration request packet and uploads it to the cloud central server.

[0127] After receiving the request, the cloud-based central server invokes a high-performance teacher model (TransReID architecture, 100M+ parameters) to extract 1024-dimensional "second feature data." The system then retrieves a projection matrix optimized for low-light environments from a pre-set projection matrix library. Perform manifold alignment. The calculation process is as follows: Let the first eigenvector be... Alignment features Through calculation With the second feature The Euclidean distance residuals in 1024-dimensional space are calculated, and chain-recursion is performed based on the "index table of layers to be updated" (containing the last two residual blocks of the model and the fully connected layers). The generated original gradients are validated: their L2 norm is calculated to yield a gradient strength of 6.2, exceeding the preset explosion threshold of 5.0. The system generates a scaling factor. The generated compressed gradient vector is fed back to the edge side.

[0128] After receiving the feedback, the edge computing device analyzes it and finds that the version number deviation is 0 (timing is consistent). The system obtains the current image entropy value as 0.85 (complex background), and substitutes it into the momentum factor calculation function: The dynamic momentum factor is used to fuse the backpropagated gradient with the local historical gradient mean to generate the target update gradient. Subsequently, the system performs gradient-model compatibility verification, forcibly converting the FP32 type gradient returned from the cloud to the INT8 format corresponding to the edge inference engine, and performing atomic-level parameter overwrite on the specified weight address through the DMA bus to complete the evolution of the local model to version V1.0.1.

[0129] During this process, the cloud-based collaborative scheduler detected in real time that the network bandwidth of the block had dropped to 3Mbps, triggering a bandwidth adaptive protocol. This instructed the edge device to subsequently transmit only a 256×128 pixel key area sub-image containing pedestrian targets, thus reducing the pressure on the link.

[0130] This embodiment fully demonstrates the system's technical advantages in practical application. Through dual filtering of environmental quality and recognition confidence, the system accurately identifies the weaknesses of the local model under complex lighting conditions, avoiding blind updates. The heterogeneous feature manifold alignment technique bridges the representation gap between the lightweight model and the large cloud model, enabling the edge to obtain deep semantic guidance from the cloud in real time. The introduction of version locking and dynamic momentum ensures the smoothness and stability of model parameter updates when monitoring network fluctuations, preventing recognition drift. Ultimately, this commercial street monitoring network achieves a leap from passive recording to proactive evolution, improving the continuity and accuracy of cross-camera tracking and providing reliable closed-loop technical support for edge intelligence applications in complex dynamic scenarios.

[0131] To avoid computation graph fragmentation caused by parameter mutations during inference on edge devices, this system adopts an asynchronous processing mechanism based on "frame-level atomic updates." The inference engine and parameter update module of the edge computing device are logically decoupled: the inference engine processes continuous video streams in a pipeline manner, while parameter update operations are strictly restricted to execution between inference intervals.

[0132] Specifically, when the edge device receives the decoupled gradient vector from the cloud, it does not immediately interrupt the current inference task, but instead caches it in a pre-defined double buffer. The system monitors the frame synchronization signal of the video stream and triggers a hardware-level parameter overwrite instruction only during idle time slots when the current frame's inference is complete and the next frame has not yet been loaded. This mechanism ensures that the feature extraction process of a single frame image is always based on the same version of model parameters, avoiding logical conflicts during computation. If a new inference request arrives during the parameter overwrite process, the system will prioritize completing the current inference task and only respond to the new request after the update is complete, thus achieving a smooth transition in model evolution.

[0133] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.

Claims

1. A lightweight model collaborative distillation and update system for edge computing, characterized in that, include: Edge computing devices are used to store lightweight models, model version numbers, and layer index tables to be updated; During the runtime phase, image frames are acquired in real time, the first feature data and the first confidence level are extracted, and the quality tensor of the image is calculated. When the weighted product of the first confidence level and the quality tensor is lower than the preset trigger threshold, the first feature data, image frame and model version number are encapsulated into a collaborative request packet and sent to the cloud center server. A cloud-based central server is used to extract second feature data from the image frame; by retrieving a preset parameter matrix from a pre-stored projection matrix library, the first feature data is projected onto a space of the same dimension as the second feature data to generate aligned feature data; The residual between the aligned feature data and the second feature data is calculated, and chained derivatives are performed. A decoupled gradient vector is generated based on the index table of the layer to be updated. The decoupled gradient vector is matched with the model version number and then fed back to the edge computing device. The edge computing device is also used to receive the decoupled gradient vector and verify the timing deviation of the model version number; if the timing deviation is within a preset deviation window, a momentum smoothing factor is introduced to weight and fuse the decoupled gradient vector with the historical gradient mean to generate the target update gradient, and parameter overwrite is performed on the lightweight model to synchronously update the model version number.

2. The lightweight model collaborative distillation and update system for edge computing according to claim 1, characterized in that, The cloud-based central server also performs dynamic evolution processing of the preset parameter matrix, specifically including: Obtain the first feature data and its corresponding second feature data from multiple sets of historical collaborative requests, and construct the feature manifold mapping error function; With the goal of reducing the mapping error function value, the correction increment of the preset parameter matrix is ​​solved using the Lagrange multiplier method under the constraint of satisfying the preset orthogonality. The number of received collaborative request packets is counted. When the accumulated number of collaborative request packets reaches a preset batch threshold, the correction increment is added to the current preset parameter matrix.

3. The lightweight model collaborative distillation and update system for edge computing according to claim 1, characterized in that, After verifying the timing deviation of the model version number, if the timing deviation exceeds a preset deviation window, a version rollback arbitration is triggered, specifically including: Read the historical version rollback record table stored locally and obtain the time-series deviation statistics of the most recent N version updates; If the time-series deviation statistics exceed the preset rollback threshold, a version status query request is sent to the cloud central server, the recommended version number returned by the cloud central server is received, and the corresponding historical model parameters are loaded from the local backup based on the recommended version number.

4. The lightweight model collaborative distillation and update system for edge computing according to claim 1, characterized in that, After generating the decoupled gradient vector based on the index table of the layer to be updated, it is also used to perform gradient validity verification, specifically including: Calculate the L2 norm of the decoupled gradient vector to obtain the gradient strength value; The gradient intensity value is compared with the preset gradient explosion threshold and gradient vanishing threshold within a range. If the gradient intensity value exceeds the gradient explosion threshold or falls below the gradient vanishing threshold, a gradient decay factor is generated to scale the decoupled gradient vector and generate a compressed gradient vector to replace the decoupled gradient vector and feed it back to the edge computing device.

5. The lightweight model collaborative distillation and update system for edge computing according to claim 1, characterized in that, Before projecting the first feature data onto a space of the same dimension as the second feature data, it is also used to perform projection adaptability discrimination, specifically including: Calculate the KL divergence between the first feature data and the locally stored reference feature distribution to obtain the distribution offset; If the distribution offset exceeds a preset distribution drift threshold, a replacement parameter matrix matching the current distribution offset is selected from the projection matrix library, and the preset parameter matrix is ​​replaced with the replacement parameter matrix to perform the projection operation.

6. The lightweight model collaborative distillation and update system for edge computing according to claim 1, characterized in that, After generating the target update gradient, the edge computing device is also used to perform gradient-model compatibility verification, specifically including: Analyze the target update gradient to obtain its corresponding first gradient resolution and first data type; Read the second resolution and second data type of the current parameters of the layer to be updated in the lightweight model; If the first gradient resolution does not match the second resolution, or the first data type does not match the second data type, a gradient format conversion is triggered, and the target update gradient is resampled or the data type is forcibly converted.

7. The lightweight model collaborative distillation and update system for edge computing according to claim 1, characterized in that, Before sending the collaboration request packet to the cloud central server, the edge computing device also performs bandwidth adaptive packetization, specifically including: Real-time monitoring of the available bandwidth of the current network link; If the available bandwidth value is lower than the preset bandwidth compression threshold, then the key region sub-image is extracted from the image frame, and the image frame is replaced with the key region sub-image and encapsulated into a collaborative request packet. Simultaneously, a cropping identifier field is generated and encapsulated into the collaboration request package, so that the cloud center server, upon receiving the collaboration request package containing the cropping identifier field, can preferentially perform feature extraction based on the key region sub-graph.

8. The lightweight model collaborative distillation and update system for edge computing according to claim 1, characterized in that, After generating the decoupled gradient vector, the cloud-based central server also uses it to perform cloud cache preloading, specifically including: Analyze the model version number corresponding to the decoupled gradient vector to predict the relevant layer index that may be requested for update next time; Based on the prediction results, the auxiliary parameter set of the relevant layers is pre-extracted from the pre-stored cloud model library and stored in the cache; When the next collaborative request packet is received, if the requested update layer matches the index of the relevant layer, the auxiliary parameter set is directly called from the cache to participate in the calculation.

9. The lightweight model collaborative distillation and update system for edge computing according to claim 1, characterized in that, Before introducing momentum smoothing factors for weighted fusion, the edge computing device is also used to perform dynamic adjustment of momentum factors: Obtain the specific value of the current timing deviation and the image entropy value of the current frame; The timing deviation and image entropy value are input into a preset momentum factor calculation function to generate a dynamic momentum factor that adapts to the current state. The preset fixed momentum smoothing factor is replaced with the dynamic momentum factor, and the decoupled gradient vector and the historical gradient mean are weighted and fused.

10. The lightweight model collaborative distillation and update system for edge computing according to claim 1, characterized in that, The system also includes: The cloud-based collaborative scheduler communicates and connects with multiple edge computing devices and the cloud central server. The cloud-based collaborative scheduler is used to periodically collect load status data and model obsolescence indicators from each edge computing device; Based on the load status data and the model obsolescence index, a differentiated layer index table to be updated is generated for each edge computing device, and the differentiated layer index table to be updated is sent to the corresponding edge computing device to replace the original layer index table to be updated stored locally.