An Adaptive Quantization Deployment Method for Multimodal State Awareness Models under Computational Power Constraints in Distribution Network Edge Equipment

CN122311308BActive Publication Date: 2026-08-11CHONGQING INST OF NEW ENE STOR MATER & EQUIP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-03
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]本发明提供一种面向配电网边缘设备算力约束的多模态状态感知模型自适应量化部署方法,解决的技术问题在于:在配电网边缘设备算力、内存、带宽和功耗受限且负载随采集通信任务波动的现场条件下,如何将多模态状态感知神经网络部署到边缘设备,使其在执行负荷预测、故障识别、拓扑识别或异常告警时兼顾实时推理和业务精度,避免因静态量化导致的精度不足和硬件负载失衡

Benefits of technology

[0012] Through the above technical solutions, this invention utilizes key outlier identification and high-precision retention, a basic quantization strategy table driven by cross-modal business correlation, hardware load closed-loop correction, and self-supervised distillation parameter updates to reduce business inference errors and hardware throughput volatility caused by low-bit quantization under the conditions of limited computing power, memory bandwidth, and task load of distribution network edge devices. This improves the stability of real-time inference on the edge side for tasks such as load forecasting, fault identification, topology identification, and anomaly alarm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122311308B_ABST
    Figure CN122311308B_ABST
Patent Text Reader

Abstract

This invention relates to the field of edge computing and intelligent operation and maintenance technology for distribution networks, and discloses an adaptive quantization deployment method for a multimodal state awareness model constrained by the computing power of distribution network edge devices. The method includes: collecting multimodal operating data and performing time alignment, format unification, and feature extraction; identifying key outlier elements and redundant outlier elements; calculating the business correlation degree between modes and generating a basic quantization strategy table; real-time monitoring of computing unit utilization, memory bandwidth utilization, and task queue length, and dynamically correcting the quantization bit width and operator fusion strategy of each modal branch, network layer, and fusion layer using the basic quantization strategy table as the initial configuration; and optimizing quantization parameters using self-supervised distillation and performing inference at the edge. This invention addresses the deployment requirements of limited computing power and high real-time performance in distribution networks, solving the problems of high inference latency, insufficient business accuracy, and hardware load fluctuations caused by insufficient computing power and limited memory bandwidth of edge devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent operation and maintenance and edge computing technology for distribution networks, specifically to an adaptive quantization deployment method for deploying multimodal state-aware neural networks on distribution network edge devices such as distribution automation terminals, distribution area intelligent fusion terminals, feeder terminals, edge gateways or microgrid grid-connected controllers. Background Technology

[0002] Distribution network edge devices include distribution automation terminals, intelligent substation fusion terminals, feeder terminals, ring main unit edge controllers, edge gateways, and microgrid grid-connected controllers. These are typically deployed at feeders, distribution rooms, switching stations, substations, and distributed power access points. They directly collect data such as voltage, current, power, load curves, switch status, protection actions, alarm texts, and equipment ledgers, and need to perform load forecasting, fault detection, topology identification, anomaly alarms, and dispatching support decision-making locally. Due to the real-time requirements of distribution network faults and load surges, deploying multimodal state perception models at the edge can reduce cloud communication latency and improve on-site autonomy. However, these distribution network edge devices often use embedded CPUs, low-power NPUs, FPGAs, or small-capacity edge gateways. During operation, they simultaneously handle data acquisition and communication, protection and control, protocol conversion, and cache upload tasks, limiting their computing unit utilization, memory capacity, storage bandwidth, and power consumption margin. Directly deploying a full-precision multimodal neural network can easily lead to problems such as excessively long inference latency, missed or false alarms, increased load forecasting errors, equipment load fluctuations, and even task queuing and blocking.

[0003] Existing neural network quantization schemes focus more on model compression ratio or accuracy of general datasets, typically failing to incorporate real-time load of distribution network edge devices, service correlations between different modes, the importance of outliers for fault identification, and field data distribution drift into a unified deployment strategy. During peak load periods or concentrated fault reporting, static bit width configurations struggle to simultaneously meet computational constraints and service accuracy requirements. Therefore, an adaptive quantization deployment method is needed, tailored to the actual deployment of distribution network edge devices, to dynamically balance inference speed, storage consumption, and distribution service perception accuracy under limited computing power. Summary of the Invention

[0004] This invention provides an adaptive quantization deployment method for a multimodal state perception model constrained by computing power of distribution network edge devices. The technical problem it solves is: under the field conditions where the computing power, memory, bandwidth, and power consumption of distribution network edge devices are limited and the load fluctuates with the acquisition and communication tasks, how to deploy a multimodal state perception neural network to edge devices so that it can balance real-time inference and service accuracy when performing load prediction, fault identification, topology identification, or anomaly alarm, and avoid insufficient accuracy and hardware load imbalance caused by static quantization.

[0005] To address the above technical problems, this invention provides an adaptive quantization deployment method for a multimodal state awareness model oriented towards computing power constraints of distribution network edge devices, comprising the following steps:

[0006] This is used to deploy a multimodal state-aware neural network to the distribution network edge device, which includes at least one of a distribution automation terminal, a smart distribution area fusion terminal, a feeder terminal, an edge gateway, and a microgrid grid-connected controller; the quantization objects of the multimodal state-aware neural network include the feature matrix of each modal branch, network layer weights, activation values, and feature fusion layers.

[0007] S1: Preprocessing and key feature identification of multimodal operation data of distribution network. Acquire at least two types of multimodal operation data from voltage, current, power, load curve, switch status, protection action record, alarm text, and work order text collected by the edge equipment of the distribution network. Perform time alignment, format unification, and feature extraction on the multimodal operation data to obtain feature matrices for each mode. Calculate the influence score of each feature element in the modal feature matrix on the distribution business reasoning results. Dynamically identify outlier elements based on the influence score distribution of a preset number of historical samples. Based on the similarity between outlier elements and neighboring feature elements, divide outlier elements into key outlier elements and redundant outlier elements.

[0008] S2: Cross-modal service correlation degree division and basic quantization strategy configuration, calculate the mutual information between feature matrices of each modality to quantify the intermodal service correlation degree, divide the correlation degree level according to the comparison result of mutual information and the correlation degree preset threshold, and generate a basic quantization strategy table; the basic quantization strategy table records the shared or independent quantization parameters, basic quantization bit width and layer sensitivity identifier corresponding to each modal branch, network layer and feature fusion layer.

[0009] S3: Hardware load monitoring and runtime quantization strategy correction of distribution network edge devices. Real-time capture of the hardware load status of the distribution network edge devices. Based on the comparison results of the load index corresponding to the load status and the preset load threshold, the load level is divided. Using the basic quantization strategy table generated in S2 as the initial strategy, the quantization accuracy bit width of each modal branch, network layer and feature fusion layer is dynamically corrected according to the load level, and it is decided whether to enable the operator fusion strategy to reduce memory access overhead.

[0010] S4: Dual-path self-supervised distillation and parameter iterative optimization for distribution service accuracy recovery. To reduce the impact of runtime quantization strategy correction on the accuracy of load forecasting, fault identification, topology identification, or anomaly alarm, a hybrid dataset of the distribution network containing unlabeled data and pre-proportion labeled data is obtained. Modality-specific enhancement is performed on the unlabeled data to construct pairs of original and enhanced samples. Combining feature path loss and decision path loss, gradient correction algorithm is used to propagate gradients and iteratively optimize quantization parameters under the quantization strategy corresponding to the current load level.

[0011] S5: Load the corrected and optimized quantization strategy onto the edge device of the distribution network and execute inference to output the distribution network status perception result; monitor the quantization error, business inference error and hardware load in real time, and backtrack and update the quantization parameters and basic quantization strategy table with a preset inference cycle to adapt to the distribution data distribution drift and edge device load fluctuation. The update of the quantization strategy is simultaneously constrained by the real-time collected distribution network operation data changes and the edge device hardware load status, realizing the joint adaptive quantization deployment of data status perception and hardware status perception.

[0012] Through the above technical solutions, this invention utilizes key outlier identification and high-precision retention, a basic quantization strategy table driven by cross-modal business correlation, hardware load closed-loop correction, and self-supervised distillation parameter updates to reduce business inference errors and hardware throughput volatility caused by low-bit quantization under the conditions of limited computing power, memory bandwidth, and task load of distribution network edge devices. This improves the stability of real-time inference on the edge side for tasks such as load forecasting, fault identification, topology identification, and anomaly alarm. Attached Figure Description

[0013] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:

[0014] Figure 1 This is a schematic diagram of the network framework of the adaptive quantization deployment method for a multimodal state perception model oriented towards computing power constraints of edge devices in power distribution networks, as presented in this invention. Detailed Implementation

[0015] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the specific values ​​of parameters such as the preset quantity and preset threshold in this embodiment are only preferred embodiments of the present invention in specific scenarios. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0016] As attached Figure 1As shown in the embodiments of the present invention, an adaptive quantization deployment method for a multimodal state perception model oriented to the computing power constraints of distribution network edge devices is disclosed. This method is used to deploy a multimodal state perception neural network to the distribution network edge devices to perform load forecasting, fault identification, topology identification, or anomaly alarm tasks. The distribution network edge devices include at least one of a distribution automation terminal, a smart distribution area fusion terminal, a feeder terminal, an edge gateway, and a microgrid grid-connected controller. The quantization objects of the multimodal state perception neural network include the feature matrix of each modal branch, network layer weights, activation values, and feature fusion layers.

[0017] Specifically, the following steps are included:

[0018] S1: Preprocessing and key feature identification of multimodal operation data of distribution network. Acquire at least two types of multimodal operation data from voltage, current, power, load curve, switch status, protection action record, alarm text, and work order text collected by the edge equipment of the distribution network. Perform time alignment, format unification, and feature extraction on the multimodal operation data to obtain feature matrices for each mode. Calculate the influence score of each feature element in the modal feature matrix on the distribution business reasoning results. Dynamically identify outlier elements based on the influence score distribution of a preset number of historical samples. Based on the similarity between outlier elements and neighboring feature elements, divide outlier elements into key outlier elements and redundant outlier elements.

[0019] S2: Cross-modal service correlation classification and basic quantization strategy configuration, calculate the mutual information between feature matrices of each modality to quantify the correlation between modal services, classify the correlation level according to the comparison result of mutual information and the preset threshold of correlation, and generate a basic quantization strategy table; the basic quantization strategy table records the shared or independent quantization parameters, basic quantization bit width and layer sensitivity identifier corresponding to each modal branch, network layer and feature fusion layer.

[0020] S3: Hardware load monitoring and runtime quantization strategy correction of distribution network edge devices. Real-time capture of the hardware load status of the distribution network edge devices. Based on the comparison results of the load index corresponding to the load status and the preset load threshold, the load level is divided. Using the basic quantization strategy table generated in S2 as the initial strategy, the quantization accuracy bit width of each modal branch, network layer and feature fusion layer is dynamically corrected according to the load level, and it is decided whether to enable the operator fusion strategy to reduce memory access overhead.

[0021] S4: Dual-path self-supervised distillation and parameter iterative optimization for distribution service accuracy recovery. To reduce the impact of runtime quantization strategy correction on the accuracy of load forecasting, fault identification, topology identification, or anomaly alarm, a hybrid dataset of the distribution network containing unlabeled data and pre-proportion labeled data is obtained. Modality-specific enhancement is performed on the unlabeled data to construct pairs of original and enhanced samples. Combining feature path loss and decision path loss, gradient correction algorithm is used to propagate gradients and iteratively optimize quantization parameters under the quantization strategy corresponding to the current load level.

[0022] S5: Load the corrected and optimized quantization strategy onto the edge device of the distribution network and execute inference to output the distribution network status perception result; monitor the quantization error, business inference error and hardware load in real time, and backtrack and update the quantization parameters and basic quantization strategy table with a preset inference cycle to adapt to the distribution data distribution drift and edge device load fluctuation. The update of the quantization strategy is simultaneously constrained by the real-time collected distribution network operation data changes and the edge device hardware load status, realizing the joint adaptive quantization deployment of data status perception and hardware status perception.

[0023] S1 includes the following steps:

[0024] S11: Obtain the multimodal operation data of the distribution network from the multimodal state perception neural network, output the corresponding original feature matrices through the pre-trained feature extractor, and convert the original feature matrices into a unified standard data type and aligned feature dimensions to obtain the aligned modal feature matrix.

[0025] S12: Construct an outlier attention module, calculate the influence score of each feature element in the modal feature matrix, statistically analyze the influence score distribution of a preset number of historical samples, and calculate the preset quantile of the distribution as a dynamic threshold; if the influence score of a feature element is greater than the dynamic threshold, then mark the feature element as an outlier element; otherwise, mark it as a regular feature element.

[0026] S13: Calculate the similarity between outlier elements and their neighboring feature elements; if the similarity is greater than or equal to the preset similarity threshold, it is marked as a key outlier element that affects the inference accuracy of power distribution business, and the high-precision calculation format is retained; if the similarity is less than the preset similarity threshold, it is marked as a redundant outlier element and included in low-bit quantization.

[0027] S2 specifically includes the following steps:

[0028] S21: Using a sliding window of a preset size, calculate the mutual information of each modal feature matrix within the same sampling time slice. Based on the preset interval where the mutual information value is located, divide the modal correlation degree used for power distribution business reasoning into three levels: high correlation degree, medium correlation degree, and low correlation degree.

[0029] S22: Configure quantization parameters for each modal feature matrix, corresponding modal branch network layer, and feature fusion layer based on the correlation level, and generate a basic quantization strategy table: Modal feature matrices with high correlation levels share the quantization scaling factor and zeros, and are assigned a first preset bit width; Modal feature matrices with medium correlation levels independently calculate the quantization scaling factor but constrain the scaling factor difference, and are assigned a second preset bit width; Modal feature matrices with low correlation levels independently calculate the quantization scaling factor and zeros, and are assigned quantization bit widths according to the sensitivity of the neural network layer.

[0030] S3 specifically includes the following steps:

[0031] S31: Collect the computing unit utilization rate, memory bandwidth utilization rate and task queue length of the distribution network edge equipment as load indicators, and divide the load status into three levels: low load, medium load and high load.

[0032] S32: Using the basic quantization strategy table generated by S2 as the initial strategy, the quantization strategy is adjusted according to the load level: Under low load level, priority is given to ensuring the inference accuracy of power distribution business, and the quantization bit width of sensitive layers and key modal branches is increased; Under medium load level, accuracy and efficiency are balanced, the basic quantization bit width is maintained and the operator fusion strategy is enabled to reduce memory access overhead; Under high load level, priority is given to ensuring real-time inference, the quantization bit width of non-sensitive layers and low-association modal branches is reduced, and the retention ratio of key outlier elements is compressed under the constraint of business accuracy threshold.

[0033] S4 specifically includes the following steps:

[0034] S41: Separate unlabeled data and labeled data from the multi-modal operation data of the distribution network; perform mode-specific enhancement on the unlabeled data to generate original samples and enhanced sample pairs; and use the labeled data of a preset ratio to initialize load forecasting, fault identification, topology identification or abnormal alarm labels to construct feature distillation set and decision distillation set;

[0035] S42: Using a full-precision multimodal state-aware model as the teacher model and a quantization model corrected based on runtime quantization strategy as the student model, the feature path loss and decision path loss are calculated, and a smooth pass-through estimator is used to pass the gradient.

[0036] S43: Introducing an adaptive gradient scaling factor, the corrected gradient is backpropagated and the quantization parameters are updated according to a preset iteration cycle to restore the inference accuracy of power distribution services under dynamic hardware constraints.

[0037] S5 specifically includes the following steps:

[0038] S51: Load the optimized quantization parameters on the edge device of the distribution network to perform inference. The key outlier elements are calculated in FP16 format, and the regular feature elements and redundant outlier elements are mapped with low-bit quantization. Finally, the multimodal feature matrix is ​​fused according to the correlation strategy and the results of load prediction, fault identification, topology identification or abnormal alarm are output.

[0039] S52: Real-time monitoring of quantization error, business inference error and hardware load. When the quantization error or business inference error exceeds the corresponding threshold, bit width adjustment is triggered. A backtracking period is defined as a preset number of inference samples. The influence score distribution and mutual information are recalculated, and the dynamic threshold, correlation level and basic quantization strategy table are updated.

[0040] This embodiment takes the example of a smart converged terminal in a distribution area or an edge gateway in a power distribution room performing short-term load forecasting and fault alarm tasks locally.

[0041] Furthermore, step S11 specifically includes the following steps:

[0042] S111: Multimodal input data includes text modal data and numerical time-series modal data. The text modal data includes alarm text, work order records, or equipment ledger text. The numerical time-series modal data includes voltage, current, power, frequency, load curves, or switching state sequences. The text modal data is output in dimension [dimension missing]. The token-level feature matrix, the numerical time-series modal data output by the encoder has a dimension of or The channel-level feature matrix is ​​defined as follows: B is the batch size, L is the sequence length, D is the feature dimension, and C is the number of channels. In this embodiment, the batch size, sequence length, feature dimension, and number of channels are set.

[0043] S112: Flatten the channel-level feature matrix using adaptive pooling. Dimensions are adjusted to the same dimension through dimension mapping, and all features are uniformly converted to FP32 data type to obtain the aligned modal feature matrix.

[0044] Furthermore, step S12 specifically includes the following steps:

[0045] S121: Calculate the gradient of each feature dimension with respect to the model output loss, take the mean of the absolute values ​​of the gradients and then perform normalization to obtain the feature contribution weights; in this embodiment, the feature contribution weights range from 0.1 to 0.9.

[0046] S122: Calculate the influence score for each element in the feature matrix. The formula is as follows:

[0047] ,

[0048] in, Rate the influence of an element. For the first The first sample Feature values ​​in each dimension For the first The statistical mean of each feature dimension; For the first The statistical standard deviation of each feature dimension. For the first The feature contribution weights of each feature dimension The sample number. The feature dimension number;

[0049] S123: Analyze the influence rating distribution of a predetermined number of samples, and use the predetermined quantile of this distribution as a dynamic threshold. ,like Elements that are then marked as outliers. In this embodiment, the influence score distribution of the first 500 historical samples is statistically analyzed, and the 95th percentile of this distribution is used as the dynamic threshold. , .

[0050] Furthermore, S13 specifically includes the following steps:

[0051] S131: Calculate the cosine similarity between outliers and features in their 3×3 neighborhood;

[0052] S132: If the cosine similarity is greater than or equal to a preset threshold, it is marked as a key outlier element, and its initial proportion is controlled to be a preset percentage; if the cosine similarity is less than the preset threshold, it is marked as a redundant outlier element and included in the low-bit quantization process. In this embodiment, the preset threshold is set to 0.7, and the initial proportion is approximately 10%.

[0053] Furthermore, step S21 specifically includes the following steps:

[0054] S211: Set the sliding window size and calculate the set of feature matrices for the two modalities. and mutual information The formula is as follows:

[0055] ,

[0056] in, Feature matrix set With the set of characteristic matrices Mutual information between them , Given two sets of modal feature matrices, For the set of characteristic matrices Feature elements in For the set of characteristic matrices Feature elements in For the joint probability distribution of features, The feature edge probability distribution;

[0057] S212: Based on mutual information The value is used to classify the correlation into high, medium, and low levels.

[0058] In this embodiment, high correlation: ;

[0059] Medium correlation: ;

[0060] Low correlation: ;

[0061] Furthermore, S22 specifically includes the following steps:

[0062] S221: Calculate the quantization scaling factor Δ and the zero point z, using the following formula:

[0063] ,

[0064] ,

[0065] in, This is the quantization scaling factor. To quantize the zero point, For the set of features to be quantized, To quantize bit width, The maximum value of the set. The minimum value of the set. This is a rounding function;

[0066] S222: For modal feature matrices with high correlation levels, the quantization scaling factor and zero point are shared and written into the basic quantization strategy table; for modal feature matrices with medium correlation levels, the quantization scaling factor is calculated independently and the difference between the two is constrained, i.e., and adjacent bit widths are allocated, such as 6 bits for alarm text and 4 bits for numerical timing; in this embodiment, the preset bit width is preferably 6 bits to eliminate alignment errors.

[0067] S223: For modal feature matrices at low correlation levels, independently calculate the quantization scaling factor and zeros, and calculate the KL divergence between the quantized output of each layer and the full-precision model output. Determine whether it is a sensitive layer based on the KL divergence, and write the layer sensitivity flag into the basic quantization strategy table for S3 to call. If the KL divergence is greater than 0.05, it is determined to be a sensitive layer and allocated 8 bits; otherwise, it is allocated 4 bits.

[0068] Furthermore, S31 specifically includes the following steps:

[0069] S311: Collect the utilization rate of computing units of distribution network edge devices Memory bandwidth utilization and task queue length , as a load indicator;

[0070] S312: Compare the collected load indicators with the preset load classification thresholds. If all three indicators are lower than the preset low threshold, the load status is determined to be low load level. If all three indicators are higher than the preset high threshold, the load status is determined to be high load level. Otherwise, it is determined to be medium load level.

[0071] In this embodiment, low load: ,in, Indicates the utilization rate of computing units. Indicates memory bandwidth utilization. Indicates the length of the task queue;

[0072] High load: ,in, Indicates the utilization rate of computing units. Indicates memory bandwidth utilization. Indicates the length of the task queue;

[0073] Medium load: The index is between the two mentioned above.

[0074] Furthermore, step S32 specifically includes the following steps:

[0075] S321: Under low load levels: Increase the quantization precision bit width of the sensitive layer and key modal branches of the multimodal state-aware neural network to the preset bit width, that is, increase the bit width of the sensitive layer to 8 bits, and retain the key outlier elements for FP16 format calculation;

[0076] S322: At medium load levels: Maintain the quantization precision bit width configuration in the basic quantization strategy table and enable quantization, dequantization and convolution operator fusion;

[0077] S323: Under high load levels: reduce the quantization precision bit width of the non-sensitive layer and low-association modal branches, and compress the retention ratio of key outlier elements to a preset ratio, provided that it is not lower than the preset business precision threshold. In this embodiment, the bit width of the non-sensitive layer is reduced to 3 bits, and the retention ratio of key outliers is forcibly compressed to 5%.

[0078] Furthermore, S41 specifically includes the following steps:

[0079] S411: Perform modality-specific enhancement on the unlabeled data in the mixed dataset: apply a preset proportion of token random masking to the text modality data, and add a preset range of random noise to the numerical time-series modality data to generate enhanced samples in the enhanced sample pairs; in this embodiment, a preset proportion of 15% token random masking is applied to the text modality; and a preset range of random noise is added to the numerical time-series modality. Random noise.

[0080] S412: Construct a feature distillation set and a decision distillation set using the original samples, enhanced samples, and load prediction, fault identification, topology identification, or anomaly alarm labels initialized with a preset proportion of labeled data from the enhanced sample pairs. In this embodiment, labels are initialized using a small amount of labeled data, which is 10%.

[0081] Furthermore, S42 specifically includes the following steps:

[0082] S421: Calculate the feature path loss Compared with loss The formula is as follows:

[0083] ,

[0084] ,

[0085] in, For feature path loss, To compare the losses, For the sample size, For the first One sample input, Features extracted for the teacher model Features extracted for the student model For the first The first feature and the second The similarity of each feature For positive sample feature similarity, Temperature coefficient;

[0086] S422: Calculate the decision path loss, which is the KL divergence loss of the output probabilities of the teacher model and the student model. ,in, For decision path loss;

[0087] S423: Calculate gradients using SmoothSTE The formula is as follows:

[0088]

[0089] in For the input feature matrix or input feature set, Let X be the input feature element. For the gradient operator relative to the input feature X, This is an approximation of the gradient of the quantization function Q with respect to the input feature X. For smoothing coefficients, The total loss is the weighted average of the feature path loss, the contrast loss, and the decision path loss. Total loss The gradient with respect to the input feature X, This is the quantization scaling factor. This is a rounding function.

[0090] Furthermore, S43 specifically includes the following steps:

[0091] S431: Introducing an adaptive gradient scaling factor The gradient is scaled using an adaptive gradient scaling factor and then backpropagated to update the quantization parameters. Here is the variance calculation function, where, This is an adaptive gradient scaling factor; (·) is the variance calculation function; This is the gradient approximation of the quantization function Q with respect to the input feature X;

[0092] S432: At each preset iteration period, recalculate the dynamic threshold and mutual information, and synchronously adjust the smoothing coefficient of the smoothing pass-through estimator according to the hierarchical quantization error. .

[0093] Furthermore, step S51 specifically includes the following steps:

[0094] S511: Performs low-bit quantization mapping on regular feature elements and redundant outlier elements. Key outliers retain the FP16 format. FP16, or half-precision floating-point number, is a 16-bit floating-point format conforming to the IEEE 754 standard, with a storage format of 1 sign bit, 5 exponent bits, and 10 mantissa bits. The formula is as follows:

[0095] ,

[0096] in These are the quantized feature elements. For input feature elements, This is the quantization scaling factor. Zero point;

[0097] S512: For modal feature matrices with high correlation levels, feature fusion is performed directly using shared quantization parameters; for modal feature matrices with medium or low correlation levels, low-bit features are first normalized to the range of high-bit features, then feature fusion is performed, and the distribution network status perception result is output.

[0098] Furthermore, step S52 specifically includes the following steps:

[0099] S521: Calculate the hierarchical quantization error and business inference error. When the hierarchical quantization error or business inference error exceeds the preset threshold, trigger the quantization accuracy bit width increase and recalculate the scaling factor.

[0100] S522: Using a preset number of inference samples as a backtracking period, recalculate the sample distribution index and update the dynamic threshold, correlation level, and basic quantification strategy table.

[0101] In this embodiment, 1000 inference samples are used as a backtracking cycle. The influence score distribution and mutual information of the first 1000 samples are recalculated, and the dynamic threshold in S1, the correlation level in S2, and the basic quantitative strategy table called in S3 are updated accordingly.

[0102] Table 1 presents a comparison of different quantization deployment methods on distribution network edge devices. Among them, accuracy loss represents the percentage decrease in operational accuracy of the quantized model compared to the full-accuracy model in the multimodal state perception task of the distribution network; inference latency represents the time consumed in a single inference or the average inference; storage requirements represent the storage space required for model parameters and related quantization parameters after deployment; hardware throughput volatility represents the percentage fluctuation in edge device throughput relative to the average throughput within a continuous inference cycle; and labeled data dependence represents the proportion of manually labeled data required during quantization training or calibration.

[0103] Table 1 Comparison of different quantitative deployment methods on distribution network edge devices

[0104]

[0105] As shown in Table 1, traditional static PTQ with an INT8 configuration suffers an accuracy loss of only 0.65%, but its inference latency reaches 145ms, and its storage requirement is 98.0MB, making it difficult to meet the low storage and low latency deployment requirements of distribution network edge devices. While traditional static PTQ with an INT4 configuration reduces inference latency to 55ms and storage requirement to 49.0MB, its accuracy loss increases to 5.80%, and its hardware throughput volatility reaches 35%, easily affecting the stability of tasks such as load forecasting, fault identification, or abnormal alarms. Traditional QAT with an INT4 configuration suffers an accuracy loss of 0.55%, but requires 100% labeled data, and its hardware throughput volatility remains at 28%, which is not conducive to rapid deployment in distribution network environments with limited labeled data.

[0106] The above comparison results show that, under the conditions of limited computing power, storage space and labeled data of distribution network edge devices, the present invention adopts a hybrid INT4 quantization configuration, which reduces the storage requirement to 49.5MB, the inference latency to 62ms, the accuracy loss to 1.12%, and reduces the hardware throughput volatility to 8%; thereby achieving a comprehensive balance between edge-side inference efficiency, business accuracy and hardware operation stability.

[0107] In summary, this invention, in application scenarios where computing power, storage space, and labeled data are limited at the edge of distribution networks, effectively reduces the accuracy loss and hardware throughput volatility caused by traditional INT4 static quantization by employing a hybrid INT4 quantization mechanism, key feature protection, cross-modal collaborative quantization parameter configuration, and hardware load adaptive adjustment mechanism. This approach maintains low inference latency and storage requirements while minimizing the impact on accuracy and hardware throughput volatility. Compared to traditional PTQ and QAT methods, this invention achieves high accuracy, low resource consumption, and stable inference at the edge without relying on full labeled data, making it more suitable for real-time intelligent sensing tasks such as distribution network load forecasting, fault identification, topology identification, and anomaly alarms.

[0108] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. An adaptive quantization deployment method for a multimodal state-aware model oriented towards computing power constraints of edge devices in a power distribution network, characterized in that, This method is used to deploy a multimodal state-aware neural network to the distribution network edge device, which includes at least one of a distribution automation terminal, a smart distribution area fusion terminal, a feeder terminal, an edge gateway, and a microgrid grid-connected controller. The quantization object of the multimodal state-aware neural network includes the feature matrix of each modal branch, network layer weights, activation values, and a feature fusion layer. Specifically, it includes the following steps: S1: Preprocessing and key feature identification of multimodal operation data of distribution network. Acquire at least two types of multimodal operation data from voltage, current, power, load curve, switch status, protection action record, alarm text, and work order text collected by the edge equipment of the distribution network. Perform time alignment, format unification, and feature extraction on the multimodal operation data to obtain feature matrices for each mode. Calculate the influence score of each feature element in the modal feature matrix on the distribution business reasoning results. Dynamically identify outlier elements based on the influence score distribution of a preset number of historical samples. Based on the similarity between outlier elements and neighboring feature elements, divide outlier elements into key outlier elements and redundant outlier elements. S2: Cross-modal service correlation classification and basic quantization strategy configuration. Calculate the mutual information between feature matrices of each modality to quantify the intermodal service correlation. Classify the intermodal service correlation level based on the comparison result between the mutual information and the preset threshold of intermodal service correlation, and generate a basic quantization strategy table. The basic quantization strategy table records the shared or independent quantization parameters, basic quantization bit width, and layer sensitivity identifier corresponding to each modal branch, network layer, and feature fusion layer. S3: Hardware load monitoring and runtime quantization strategy correction of distribution network edge devices. Real-time capture of the hardware load status of the distribution network edge devices. Based on the comparison results of the load index corresponding to the load status and the preset load threshold, the load level is divided. Using the basic quantization strategy table generated in S2 as the initial strategy, the quantization accuracy bit width of each modal branch, network layer and feature fusion layer is dynamically corrected according to the load level, and it is decided whether to enable the operator fusion strategy to reduce memory access overhead. S4: Dual-path self-supervised distillation and parameter iterative optimization for distribution service accuracy recovery. To reduce the impact of runtime quantization strategy correction on the accuracy of load forecasting, fault identification, topology identification, or anomaly alarm, a hybrid dataset of the distribution network containing unlabeled data and pre-proportion labeled data is obtained. Modality-specific enhancement is performed on the unlabeled data to construct pairs of original and enhanced samples. Combining feature path loss and decision path loss, gradient correction algorithm is used to propagate gradients and iteratively optimize quantization parameters under the quantization strategy corresponding to the current load level. S5: Load the corrected and optimized quantization strategy onto the edge device of the distribution network and perform inference. Key outlier elements are calculated in FP16 format, while regular feature elements and redundant outlier elements are mapped using low-bit quantization. Finally, the multimodal feature matrix is ​​fused according to the correlation strategy, and the results of load prediction, fault identification, topology identification, or anomaly alarm are output, along with the distribution network status perception results. Quantization error, business inference error, and hardware load are monitored in real time, and the quantization parameters and basic quantization strategy table are updated retrospectively at a preset inference cycle to adapt to the distribution data distribution drift and edge device load fluctuations. The update of the quantization strategy is simultaneously constrained by the changes in real-time collected distribution network operation data and the hardware load status of the edge device, realizing the joint adaptive quantization deployment of data status perception and hardware status perception.

2. The adaptive quantization deployment method for a multimodal state perception model oriented towards computing power constraints of distribution network edge devices according to claim 1, characterized in that, S1 specifically includes: S11: Obtain the multimodal operation data of the distribution network from the multimodal state perception neural network, output the corresponding original feature matrices through the pre-trained feature extractor, and convert the original feature matrices into a unified standard data type and aligned feature dimensions to obtain the aligned modal feature matrix. S11 specifically includes the following steps: S111: Multimodal input data includes text modal data and numerical time-series modal data. The text modal data includes alarm text, work order records, or equipment ledger text. The numerical time-series modal data includes voltage, current, power, frequency, load curves, or switching state sequences. The text modal data is output in dimension [dimension missing]. The token-level feature matrix, the numerical time-series modal data output by the encoder has a dimension of or The channel-level feature matrix, where B is the batch size, L is the sequence length, D is the feature dimension, and C is the number of channels; S112: Flatten the channel-level feature matrix using adaptive pooling. Dimensions are adjusted by dimension mapping to make the token-level feature matrix the same dimension, and all features are uniformly converted to FP32 data type to obtain the aligned modal feature matrix. S12: Construct an outlier attention module, calculate the influence score of each feature element in the modal feature matrix, statistically analyze the influence score distribution of a preset number of historical samples, and calculate the preset quantile of the distribution as a dynamic threshold; if the influence score of a feature element is greater than the dynamic threshold, then mark the feature element as an outlier element; otherwise, mark it as a regular feature element. S12 specifically includes the following steps: S121: Calculate the gradient of each feature dimension with respect to the model output loss, take the mean of the absolute values ​​of the gradients, and then perform normalization to obtain the feature contribution weights. ; S122: Calculate the influence score for each element in the feature matrix. The formula is as follows: , in, Rate the influence of an element. For the first The first sample Feature values ​​in each dimension For the first The statistical mean of each feature dimension; For the first The statistical standard deviation of each feature dimension. For the first The feature contribution weights of each feature dimension The sample number. The feature dimension number; S123: Analyze the influence rating distribution of a predetermined number of samples, and use the predetermined quantile of this distribution as a dynamic threshold. ,like Then it is marked as an outlier element; S13: Calculate the similarity between outlier elements and their neighboring feature elements; if the similarity is greater than or equal to the preset similarity threshold, it is marked as a key outlier element and the high-precision calculation format is retained; if the similarity is less than the preset similarity threshold, it is marked as a redundant outlier element and included in low-bit quantization.

3. The adaptive quantization deployment method for a multimodal state perception model oriented towards computing power constraints of distribution network edge devices according to claim 1, characterized in that, S2 specifically includes: S21: Using a sliding window of a preset size, calculate the mutual information of the feature matrices of each mode within the same sampling time slice. Based on the preset interval where the mutual information value is located, divide the intermodal business correlation degree used for power distribution business reasoning into three levels: high correlation degree, medium correlation degree, and low correlation degree. Step S21 specifically includes the following steps: S211: Set the sliding window size and calculate the set of feature matrices for the two modalities. and mutual information The formula is as follows: , in, Feature matrix set With the set of characteristic matrices Mutual information between them , Given two sets of modal feature matrices, For the set of characteristic matrices Feature elements in For the set of characteristic matrices Feature elements in For the joint probability distribution of features, The feature edge probability distribution; S212: Based on mutual information The value is used to classify the correlation into high, medium, and low levels. S22: Configure quantization parameters for each modal feature matrix, corresponding modal branch network layer, and feature fusion layer based on the correlation level, and generate a basic quantization strategy table: Modal feature matrices with high correlation levels share the quantization scaling factor and zeros, and are assigned a first preset bit width; Modal feature matrices with medium correlation levels independently calculate the quantization scaling factor but constrain the scaling factor difference, and are assigned a second preset bit width; Modal feature matrices with low correlation levels independently calculate the quantization scaling factor and zeros, and are assigned quantization bit widths according to the sensitivity of the neural network layer.

4. The adaptive quantization deployment method for a multimodal state perception model oriented towards computing power constraints of distribution network edge devices according to claim 1, characterized in that, S3 specifically includes: S31: Collect the computing unit utilization rate, memory bandwidth utilization rate and task queue length of the distribution network edge equipment as load indicators, and divide the load status into three levels: low load, medium load and high load. S31 specifically includes the following steps: S311: Collect the utilization rate of computing units of distribution network edge devices Memory bandwidth utilization and task queue length , as a load indicator; S312: Compare the collected load indicators with the preset load classification thresholds. If all three indicators are lower than the preset low threshold, the load status is determined to be low load level. If all three indicators are higher than the preset high threshold, the load status is determined to be high load level. Otherwise, it is determined to be medium load level. S32: Using the basic quantization strategy table generated by S2 as the initial strategy, the quantization strategy is adjusted according to the load level: Under low load level, priority is given to ensuring the inference accuracy of power distribution business, and the quantization bit width of sensitive layers and key modal branches is increased; Under medium load level, accuracy and efficiency are balanced, the basic quantization bit width is maintained and the operator fusion strategy is enabled to reduce memory access overhead; Under high load level, priority is given to ensuring real-time inference, the quantization bit width of non-sensitive layers and low-association modal branches is reduced, and the retention ratio of key outlier elements is compressed under the constraint of business accuracy threshold. Step S32 specifically includes the following steps: S321: Under low load levels: Increase the quantization precision bit width of the sensitive layer and key modal branches of the multimodal state-aware neural network to the preset bit width, and retain the key outlier elements for FP16 format calculation; S322: At medium load levels: Maintain the quantization precision bit width configuration in the basic quantization strategy table and enable quantization, dequantization and convolution operator fusion; S323: Under high load levels: reduce the quantization precision bit width of non-sensitive layers and low-association modal branches, and compress the retention ratio of key outlier elements to a preset ratio, provided that it is not lower than the preset business precision threshold.

5. The adaptive quantization deployment method for a multimodal state perception model oriented towards computing power constraints of distribution network edge devices according to claim 1, characterized in that, S4 specifically includes: S41: Separate unlabeled data and labeled data from the multi-modal operation data of the distribution network; perform mode-specific enhancement on the unlabeled data to generate original samples and enhanced sample pairs; and use the labeled data of a preset ratio to initialize load forecasting, fault identification, topology identification or abnormal alarm labels to construct feature distillation set and decision distillation set; S42: Using a full-precision multimodal state-aware model as the teacher model and a quantization model corrected based on runtime quantization strategy as the student model, the feature path loss and decision path loss are calculated, and a smooth pass-through estimator is used to pass the gradient. S43: Introducing an adaptive gradient scaling factor, the corrected gradient is backpropagated and the quantization parameters are updated according to a preset iteration cycle to restore the inference accuracy of power distribution services under dynamic hardware constraints.

6. The adaptive quantization deployment method for a multimodal state perception model oriented towards computing power constraints of distribution network edge devices according to claim 3, characterized in that, S22 specifically includes the following steps: S221: Calculate the quantization scaling factor Δ and the quantization zero z, using the following formulas: , , in, This is the quantization scaling factor. To quantize the zero point, For the set of features to be quantized, To quantize bit width, The maximum value of the set. The minimum value of the set. This is a rounding function; S222: For modal feature matrices with high correlation levels, share the quantization scaling factor and zeros and write them into the basic quantization strategy table; for modal feature matrices with medium correlation levels, calculate the quantization scaling factor independently and constrain the difference between the two. S223: For modal feature matrices at low correlation levels, independently calculate the quantization scaling factor and zeros, and calculate the KL divergence between the quantization output of each layer and the full-precision model output. Determine whether it is a sensitive layer based on the KL divergence, and write the layer sensitivity flag into the basic quantization strategy table for S3 to call.

7. The adaptive quantization deployment method for a multimodal state perception model oriented towards computing power constraints of distribution network edge devices according to claim 5, characterized in that: Step S41 specifically includes the following steps: S411: Perform modality-specific enhancement on unlabeled data in a mixed dataset: apply a pre-specified proportion of token random masking to the text modality data and add random noise within a pre-specified range to the numerical time-series modality data to generate enhanced samples in the enhanced sample pairs; S412: Construct feature distillation set and decision distillation set using the original samples, augmented samples, and labels initialized with labeled data using a preset ratio in the augmented sample pair; S42 specifically includes the following steps: S421: Calculate the feature path loss Compared with loss The formula is as follows: , , in, For feature path loss, To compare the losses, For the sample size, For the first One sample input, Features extracted for the teacher model Features extracted for the student model For the first The first feature and the second The similarity of each feature For positive sample feature similarity, Temperature coefficient; S422: Calculate the decision path loss, which is the KL divergence loss of the output probabilities of the teacher model and the student model. ; S423: Calculate gradients using SmoothSTE The formula is as follows: , in For the input feature matrix, Let X be the input feature element. For the gradient operator relative to the input feature X, This is an approximation of the gradient of the quantization function Q with respect to the input feature X. For smoothing coefficients, The total loss is the weighted average of the feature path loss, the contrast loss, and the decision path loss. Total loss The gradient with respect to the input feature X, This is the quantization scaling factor. This is a rounding function.

8. The adaptive quantization deployment method for a multimodal state perception model oriented towards computing power constraints of distribution network edge devices according to claim 5, characterized in that, Step S43 specifically includes the following steps: S431: Introducing an adaptive gradient scaling factor The gradient is scaled using an adaptive gradient scaling factor and then backpropagated to update the quantization parameters. Here is the variance calculation function, where, This is an adaptive gradient scaling factor; (·) is the variance calculation function; This is the gradient approximation of the quantization function Q with respect to the input feature X; S432: At each preset iteration cycle, recalculate the dynamic threshold and mutual information, and synchronously adjust the smoothing coefficient of the smoothing pass-through estimator according to the hierarchical quantization error. .

9. The adaptive quantization deployment method for a multimodal state perception model oriented towards computing power constraints of distribution network edge devices according to claim 1, characterized in that, S51 specifically includes the following steps: S511: Perform low-bit quantization mapping on regular feature elements and redundant outlier elements, while retaining the FP16 format for critical outliers, as shown in the following formula: in, These are the quantized feature elements. For input feature elements, This is the quantization scaling factor. For quantization zero point; S512: For modal feature matrices with high correlation levels, feature fusion is performed directly using shared quantization parameters; for modal feature matrices with medium or low correlation levels, low-bit features are first normalized to the range of high-bit features, then feature fusion is performed, and the distribution network status perception result is output.

Citation Information

Patent Citations

  • Power communication network resource allocation lightweight method and system based on strategy distillation

    CN121077995A

  • Large model lightweight reasoning deployment method under limited hardware resources

    CN121745311A