Powerful model pruning method and system based on edge computing device, computer device, computer readable storage medium
Patent Information
- Application Number
- CN202511572436.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2045-10-30
AI Technical Summary
[0003]目前通用的大模型剪枝方法,如参数剪枝、层剪枝等,主要依靠静态阈值,难以适配电力数据的时序性与空间相关性特征,易导致关键特征丢失,如故障波形细节,从而影响模型在输变配场景的预测准确性;此外,现有方法未充分考虑边端硬件特性,导致剪枝后模型结构可能破坏硬件并行计算效率,可能会加剧计算延迟,进而影响后续大模型的使用
[0019] The aforementioned power large-scale model pruning method and apparatus, computer equipment, and computer-readable storage medium based on edge computing devices, by extracting temporal abrupt change features and spatial correlation features, determine the pruning threshold to accurately match the characteristics of power data. During the pruning process, it effectively preserves key features such as fault waveform details, avoiding prediction bias caused by feature loss, thereby significantly improving the prediction accuracy of the model in transmission, transformation, and distribution scenarios. At the same time, the structure of the preliminary pruned model is adjusted based on the obtained parallel performance results and data processing results, which can give full play to the hardware advantages of edge computing devices, avoid the problem of model structure and hardware mismatch, improve hardware parallel computing efficiency, reduce computing latency, and make the model run more smoothly and efficiently on edge devices.
Smart Images

Figure CN121390180B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method and system for pruning a large power model based on edge computing devices, a computer device, and a computer-readable storage medium. Background Technology
[0002] With the continuous development of artificial intelligence, edge devices (such as AI computing devices deployed in substations and distribution rooms) need to handle tasks such as power grid monitoring and fault diagnosis in real time. However, large-scale power models have a large number of parameters and high computational complexity, and the computing power and storage resources of edge devices are severely limited, making it impossible to directly run large-scale models in the cloud. Therefore, to adapt to the edge environment, the model needs to be pruned and optimized to reduce its complexity.
[0003] Current common large-scale model pruning methods, such as parametric pruning and layer pruning, mainly rely on static thresholds, which are difficult to adapt to the temporal and spatial correlation characteristics of power data. This can easily lead to the loss of key features, such as fault waveform details, thus affecting the prediction accuracy of the model in transmission, transformation and distribution scenarios. In addition, existing methods do not fully consider the characteristics of edge hardware, which may cause the pruned model structure to destroy the efficiency of hardware parallel computing, potentially exacerbating computational latency and affecting the use of subsequent large-scale models. Summary of the Invention
[0004] Therefore, it is necessary to address the aforementioned technical problems by providing a power large-scale model pruning method and system based on edge computing devices, as well as computer equipment and computer-readable storage media, to avoid prediction bias caused by feature loss, thereby significantly improving the prediction accuracy of the model in transmission, transformation and distribution scenarios; at the same time, it improves the efficiency of hardware parallel computing and reduces computing latency.
[0005] Firstly, this application provides a method for pruning a large power model based on edge computing devices, including:
[0006] Acquire multi-source operational data and hardware parameter data of edge devices collected by edge devices;
[0007] The multi-source operational data are subjected to time-domain and frequency-domain feature extraction to obtain time-domain abrupt change features and spatial correlation features, respectively. Based on the time-domain abrupt change features and the spatial correlation features, the pruning threshold is determined.
[0008] The hardware parameter data is analyzed for performance to obtain parallel performance results and data processing results;
[0009] The power large model is pruned and optimized based on the pruning threshold to obtain a preliminary model after pruning. The preliminary model is then structurally adjusted based on the parallel performance results and the data processing results to obtain an adjusted model.
[0010] The adjustment model is verified and adjusted based on the side computing power device to obtain the target model structure after verification and adjustment.
[0011] Secondly, this application also provides a power large-scale model pruning system based on edge computing devices, the system comprising:
[0012] The acquisition module is used to acquire multi-source operational data collected by the edge device and the hardware parameter data of the edge device;
[0013] The threshold determination module is used to extract time-domain and frequency-domain features from the multi-source running data to obtain time-domain abrupt change features and spatial correlation features, and to determine the pruning threshold based on the time-domain abrupt change features and the spatial correlation features.
[0014] The performance analysis module is used to perform performance analysis on the hardware parameter data to obtain parallel performance results and data processing results.
[0015] The pruning optimization module is used to prune and optimize the large power model based on the pruning threshold to obtain a preliminary model after pruning, and to adjust the structure of the preliminary model according to the parallel performance results and the data processing results to obtain an adjusted model.
[0016] The verification module is used to verify and adjust the adjusted model based on the side computing power device to obtain the target model structure after verification and adjustment.
[0017] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0018] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the above-described steps.
[0019] The aforementioned power large-scale model pruning method and apparatus, computer equipment, and computer-readable storage medium based on edge computing devices, by extracting temporal abrupt change features and spatial correlation features, determine the pruning threshold to accurately match the characteristics of power data. During the pruning process, it effectively preserves key features such as fault waveform details, avoiding prediction bias caused by feature loss, thereby significantly improving the prediction accuracy of the model in transmission, transformation, and distribution scenarios. At the same time, the structure of the preliminary pruned model is adjusted based on the obtained parallel performance results and data processing results, which can give full play to the hardware advantages of edge computing devices, avoid the problem of model structure and hardware mismatch, improve hardware parallel computing efficiency, reduce computing latency, and make the model run more smoothly and efficiently on edge devices. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating a power large-scale model pruning method based on edge computing devices provided in an embodiment of this application;
[0022] Figure 2 This is a flowchart illustrating a power large model pruning method based on edge computing devices provided in another embodiment of this application;
[0023] Figure 3 This is a flowchart illustrating a power large model pruning method based on edge computing devices provided in another embodiment of this application;
[0024] Figure 4 This is a schematic diagram of the structure of a power large model pruning system based on a side-side computing device provided in an embodiment of this application;
[0025] Figure 5 Embodiment diagrams of the electronic device provided in this application;
[0026] Figure 6 An embodiment diagram of a computer-readable storage medium provided for an embodiment of this application. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0028] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0029] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid unnecessarily obscuring the description of this application. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0030] See Figures 1-3 , Figures 1-3 This is a flowchart illustrating the power large-scale model pruning method based on edge computing devices provided in this application. In this embodiment, the execution entity of the power large-scale model pruning method based on edge computing devices is the pruning system. Therefore, the power large-scale model pruning method based on edge computing devices includes:
[0031] Step 10: Obtain multi-source operational data and hardware parameter data of the edge device collected by the edge device.
[0032] Optionally, the pruning system continuously collects various operational data, including current, voltage, and power, from edge devices installed in the power system, such as smart meters, sensors, and distributed power controllers. This data constitutes multi-source heterogeneous data. It also collects time-series data from the power system, such as real-time waveforms of bus voltage and line current, at 50 sampling points per second. Status data, such as transformer oil temperature and circuit breaker opening / closing status, is collected at one record per minute. Environmental data, such as wind speed and temperature from weather stations, is collected and updated every 5 minutes.
[0033] Furthermore, the pruning system collects hardware parameter data from edge devices, including computational parameters (such as the number of CPU cores and GPU memory bandwidth), storage parameters (memory capacity and read / write speed), and communication parameters (bandwidth and latency between edge nodes). These parameters reflect the device's parallel performance and data processing performance.
[0034] In one embodiment, taking a 110kV substation as an example, voltage and current waveforms (time-series data) are collected by deploying 30 PMU synchronization phasor units, equipment temperature (status data) is collected by 10 temperature sensors, and environmental data is obtained from an external weather station. The time-series data, status data, and environmental data are then aligned by timestamps to form a multi-source operational data dataset. Furthermore, taking an edge server as an example, the collected configuration is "4-core CPU, 16GB memory, 10Gbps network card." The hardware parameter matrix is obtained by reading system commands (such as parsing the `1scpu` and `free-h` commands under Linux).
[0035] Step 20: Extract time-domain and frequency-domain features from the multi-source running data to obtain time-domain abrupt change features and spatial correlation features, and determine the pruning threshold based on the time-domain abrupt change features and spatial correlation features.
[0036] Optionally, after receiving the collected multi-source operational data, the pruning system, due to the strong temporal sequence (fault transients are time-domain abrupt changes) and spatial correlation (faults propagate in the power grid topology) of power data, first uses variational mode decomposition to identify temporal abrupt change characteristics, and then uses singular value decomposition to determine spatial correlation characteristics, as described in steps 2011-2015. Finally, based on the determined temporal abrupt change characteristics and spatial correlation characteristics, a combination of dynamic entropy change and topological clustering is used. Temporal entropy change reflects the uncertainty and drastic change of the data, while spatial topological clustering mines potential correlations between data. Combining these two methods, the system comprehensively considers data importance from both temporal and spatial dimensions to achieve a more accurate pruning threshold, as described in steps 2021-2025.
[0037] Step 30: Perform performance analysis on the hardware parameter data to obtain parallel performance results and data processing results.
[0038] Optionally, the pruning system analyzes the device's parallel computing capabilities based on parameters such as the number of CPU cores and GPU architecture obtained from the hardware parameter data. For multi-core CPUs, Amdahl's Law can be used to evaluate the parallel speedup. Specifically, let... For parallel speedup ratio, This represents the proportion of parallel computing to the total computational load. If the number of processor cores is , then This allows us to predict the acceleration effect that the hardware can achieve under different parallel task allocations using this formula.
[0039] Furthermore, the pruning system calculates the device's data processing speed and storage capacity based on parameters such as memory capacity and storage bandwidth obtained from the hardware parameter data. For example, given a memory bandwidth of... (bytes / second), the amount of data that needs to be read in one data processing operation is (bytes), then theoretically the shortest time to complete this operation is equal to Furthermore, by considering the complexity of data processing algorithms, the system assesses the hardware's ability to support data processing tasks.
[0040] In one embodiment, taking an edge server with an 8-core CPU as an example, assuming that 60% of the power model computation task can be computed in parallel, the speedup is calculated to be approximately 3.33 based on Amdahl's Law for 8-core parallel computation. Then, based on its memory bandwidth and model data processing requirements, the data reading and processing times are calculated, yielding the server's parallel performance and data processing results.
[0041] Step 40: Prune and optimize the large power model based on the pruning threshold to obtain the preliminary model after pruning. Then, adjust the structure of the preliminary model according to the parallel performance results and data processing results to obtain the adjusted model.
[0042] Optionally, the pruning system evaluates the connection weights of the large-scale power model based on the obtained pruning threshold. If the absolute value of a connection weight is less than the pruning threshold, the connection is removed from the model, and the model's parameters and structure are updated. For example, for a neural network model, the connection weights between all neurons are traversed, and pruning is performed according to the threshold. Afterwards, the parallel computing structure of the model is adjusted based on the hardware's parallel performance. For example, parallel computing layers can be added, and tasks suitable for parallel processing can be distributed across multiple cores or GPUs. Based on the data processing results, the model's data input / output and intermediate computation processes are optimized to reduce data transmission and processing time. For example, if the hardware's data processing capabilities are limited, the amount of data storage and transmission in the model's intermediate layers can be reduced, and a more compact data representation can be adopted.
[0043] In one embodiment, taking a deep learning model for power load forecasting as an example, unimportant connections are first removed according to a pruning threshold to obtain a preliminary model; then, taking into account the parallel performance and data processing capabilities of edge devices, the convolutional layers in the model are changed to parallel convolutional structures, and the batch size of data input is optimized to obtain an adjusted model.
[0044] Step 50: Verify and adjust the model based on the edge computing power device to obtain the target model structure after verification and adjustment.
[0045] Optionally, due to the complexity of the edge environment (fluctuations in computing power, real-time changes in data), the theoretically optimized model may experience performance fluctuations in actual operation due to environmental differences and other factors. Therefore, it is necessary to verify and adjust the model on actual hardware to allow it to eventually converge to a stable state. Thus, the pruning system deploys the adjusted model on the edge computing device, inputs actual multi-source running data for inference calculations, and records the model's running time, prediction accuracy, and other indicators. These indicators are compared with the expected target. If the running time is too long or the prediction accuracy is not up to standard, the model is further adjusted. Adjustment methods include fine-tuning model parameters and modifying the model structure. For example, if the model prediction error is found to be large, the gradient descent algorithm can be used to fine-tune the model parameters; if the running time exceeds expectations, the model structure can be simplified again. After multiple iterations of verification and adjustment, a target model structure that meets the performance and application requirements of the edge device is obtained. It is important to note that the edge computing device is the edge hardware module that provides computing power and is the core computing power component of the edge device.
[0046] In one embodiment, taking the deployment of the adjusted power fault prediction model on an actual distribution network edge device as an example, real-time collected voltage, current, and other data are input for verification. If the model's prediction accuracy is found to be 85%, which does not reach the expected target of 90%, the accuracy is improved to 92% after fine-tuning the model's learning rate and adding a layer of neural network, and the running time is within an acceptable range, thus obtaining the final target model structure.
[0047] This application's embodiments extract temporal abrupt change features and spatial correlation features to determine pruning thresholds that accurately match the characteristics of power data. During pruning, key features such as fault waveform details are effectively preserved, avoiding prediction bias caused by feature loss, thereby significantly improving the model's prediction accuracy in transmission, transformation, and distribution scenarios. Simultaneously, the preliminary pruned model is structurally adjusted based on the obtained parallel performance results and data processing results. This fully leverages the hardware advantages of edge computing devices, avoiding model structure-hardware mismatch issues, improving hardware parallel computing efficiency, reducing computational latency, and making the model run more smoothly and efficiently on edge devices.
[0048] In one embodiment, steps 2011-2015 are described as follows:
[0049] Step 2011: Perform variational mode decomposition on the multi-source operating data to obtain multiple eigenmode function components of different frequencies.
[0050] Optionally, after acquiring multi-source operational data, the pruning system processes the multi-source operational data using Variational Mode Decomposition (VMD).
[0051] Specifically, let's assume the collected multi-source operational data is the current waveform of a certain line in the power system. This includes the fundamental frequency (around 50Hz) and harmonics (100Hz, 150Hz, etc.). At this point, the variational model constructed by VMD will iteratively optimize it using the alternating direction method. Disassembled (Baseband dominant) (Second harmonic dominant) (Dominated by the third harmonic) and other intrinsic mode function (IMF) components at different frequencies, each Corresponding to different center frequencies This allows us to describe different frequency characteristics.
[0052] In one embodiment, taking user electricity consumption data collected by a smart meter as an example, there are stable signals from normal electricity consumption, as well as abrupt signals from appliance startup / shutdown. This includes the current data for a single user over a day. Through VMD decomposition, three eigenmode function components are obtained, namely: Low frequency and stable amplitude, suitable for everyday low-power electrical appliances; There are medium-frequency fluctuations, corresponding to appliances such as refrigerators that start and stop intermittently; High frequency and frequent sudden changes correspond to the start-stop shocks of high-power appliances such as air conditioners and water heaters.
[0053] Step 2012: Perform Hilbert transform on each intrinsic mode function component to obtain the analytic signal, and determine the instantaneous frequency and instantaneous amplitude based on the analytic signal.
[0054] Optionally, the pruning system, based on the obtained intrinsic mode function components, applies the Hilbert Transform (HT) to each intrinsic mode function component. The transformation is performed to generate an analytic signal, specifically through the formula: ;in, Indicates an analytical signal. yes The Hilbert transform result, This is represented as the imaginary unit. Then, based on the obtained analytic signal, the instantaneous amplitude is calculated. Calculate instantaneous frequency That is, by adding an imaginary part to a real signal to transform it into a complex signal, the amplitude and frequency changes at each moment can be directly calculated. For example, the decomposed signal in step 2011... (IMF corresponding to the start and stop of high-power appliances) After Hilbert transformation, the analytical signal is obtained. The instantaneous amplitude can reflect the intensity change of the current surge when the appliance starts, and the instantaneous frequency can reflect the frequency shift during the surge (for example, the current frequency may deviate briefly at the moment the appliance starts).
[0055] In one embodiment, following the example of a smart meter in step 2011, for (The air conditioner startup-related IMF) undergoes a Hilbert transform. Assuming the air conditioner starts at 18:00, the instantaneous amplitude of the analytical signal is stable before 18:00 (approximately 2 amps), rapidly increases to 10 amps upon startup, and then falls back; the instantaneous frequency jumps from 50Hz to 52Hz at startup, returning to 50Hz a few seconds later. These two indicators capture the characteristics of this key abrupt change at the "startup moment."
[0056] Step 2013: Determine the abrupt change point based on the instantaneous frequency and instantaneous amplitude using a preset sliding window.
[0057] Optionally, after obtaining the instantaneous frequency and instantaneous amplitude, the pruning system uses a preset sliding window (i.e., "frames" a segment of data on the time series, such as window length and step size) to determine the instantaneous amplitude within each window. and instantaneous frequency First, calculate the statistical statistic (such as mean, standard deviation, rate of change). You can then set a threshold based on the statistic (e.g., the magnitude of the change exceeding a certain threshold). If the frequency offset exceeds 5Hz, and the statistics within the window exceed a threshold, the window is determined to contain abrupt changes. Specifically, assuming the instantaneous amplitude sequence within the window is... Amplitude change rate Instantaneous frequency sequence Frequency offset ;in, Represented as nominal frequency, such as .when and In this case, it indicates that there is a mutation point within the window; where These represent the preset amplitude change rate threshold and the preset frequency offset threshold, respectively.
[0058] In one embodiment, continuing with the example of starting with an air conditioner, the sliding window length is set to 10 seconds (corresponding to a power data sampling frequency of 1Hz, meaning the window contains 10 points), with a step size of 1 second. Within the window from 17:59 to 18:09, analysis is performed... The instantaneous characteristics are as follows: In the window from 17:59 to 18:08, the amplitude change rate is 10% and the frequency shift is 1Hz, which does not trigger a sudden change; In the window from 18:00 to 18:09, the amplitude change rate is 150% and the frequency shift is 3Hz, which exceeds the threshold (assuming the threshold is set to 50% and 2Hz). It is determined that the window contains the "air conditioner start" sudden change point.
[0059] Step 2014: Perform singular value decomposition on the eigenmode function components containing abrupt change points to obtain the singular value composite matrix, and analyze the singular value features based on the singular value composite matrix.
[0060] Optionally, the pruning system transforms the IMF components containing mutation points into a singular value synthesis matrix A, as described in steps 20141-20143, wherein the singular value synthesis matrix includes the singular value matrix. Left singular matrix And right singular matrix ,Right now And singular value matrix diagonal elements This reflects the energy distribution of the matrix (signal). Large singular values correspond to the main energy and key features of the signal, while small singular values correspond to noise or secondary information. For example, consider the period when an air conditioner starts up. The data is constructed into a Hankel matrix (each row being a continuous window of data). After performing Singular Value Decomposition (SVD), the first few large singular values (such as...) are... The key features of the startup process include amplitude abrupt changes and frequency shifts, while the smaller singular values correspond to environmental noise and measurement errors.
[0061] In one embodiment, taking the air conditioner startup mutation window identified in the previous steps as an example, extract... exist Data (covering before, during, and after mutation), construct The Hankel matrix (each row contains 5 consecutive points). Singular values are obtained after performing SVD. Subsequent analysis revealed that Corresponding to the large-scale impact energy at startup, The characteristic energy corresponding to the frequency shift, the small singular values are the measurement noise, thus extracting the feature that the mutation energy is mainly concentrated in the first two singular values.
[0062] Step 2015 involves fusing the singular value features of different intrinsic mode function components and combining them with the correlation relationships of data points in the spatial dimension to obtain temporal abrupt change features and spatial correlation features.
[0063] Optionally, the pruning system adjusts the pruning based on the different IMF components obtained (e.g., Corresponding to stable signals The singular value features of the corresponding abrupt change signals reflect the abrupt change information at different frequency levels of the signal. By concatenating their singular values (such as the top few large singular values of each IMF) into a vector, the temporal abrupt change features are obtained. Combined with the spatial dimension correlation, spatial correlation features are obtained, which are represented by the degree of spatial correlation between different monitoring points. ;in, This represents the spatial correlation between the i-th monitoring point and the j-th monitoring point; This is represented as the projection value of the i-th monitoring point onto the r-th spatial principal component; This is represented as the projection value of the j-th monitoring point onto the r-th spatial principal component; This is represented by the number of spatial principal components. Ultimately, a fused feature vector that simultaneously contains "temporal mutation energy distribution" and "spatial propagation / correlation pattern" can be constructed as a carrier of temporal mutation features and spatial correlation features.
[0064] In one embodiment, taking a distribution network as an example, the monitoring point (User electricity meter) and monitoring point Current data was collected from all (adjacent users' electricity meters). Point data decomposition (smooth), (harmonic), (Sudden change in air conditioner startup); Regarding Performing the same decomposition on the point data, we found... point There are also minor mutations (due to) (The air conditioner starting at 1 o'clock affected the current distribution in the circuit). The first step after that was extraction. point Singular value characteristics , point Singular value characteristics Second step calculation point The spatial dimension relationship of the components (e.g.) (This indicates a strong correlation); the third step is to fuse the feature vectors. It includes The energy characteristics of the time-domain abrupt change at point 1 also reflect the spatial (E1-E2 line) correlation characteristics.
[0065] The embodiments of this application integrate multiple IMF singular values and spatial correlation, which can fully characterize time-domain features and spatial correlation features, making the features more consistent with the network characteristics of the power system, and making them more accurate for subsequent fault diagnosis and condition assessment.
[0066] In one embodiment, steps 20141-20143 are described as follows:
[0067] Step 20141: Construct a spatiotemporal matrix based on the eigenmode function components of multiple physical measurement nodes deployed in the power network at the same time.
[0068] Optionally, power outages can propagate simultaneously in space (different monitoring points) and time (transient fault processes). Therefore, the pruning system first arranges multiple physical measurement nodes (i.e., monitoring points) deployed in the power network at the same time into a matrix, where rows represent monitoring points and columns represent time series. This transforms the originally scattered single-point data into a matrix that reflects the spatiotemporal distribution, facilitating subsequent analysis of the spatial correlation of abrupt changes. Specifically, assuming monitoring point 1 to... At time 1 to The IMF components are: The spacetime matrix is then:
[0069]
[0070] In one embodiment, taking a distribution network as an example, it is assumed that there are 3 monitoring points. (Electricity meter at the entrance of the residential area) (electricity meters in commercial buildings within the community) The electricity meters in the residential buildings of the community collected the current IMF components at five different times (e.g., electricity meters in the residential buildings of the community). (This corresponds to the component that causes sudden changes in high-power equipment). Specific data is as follows:
[0071] Time / Monitoring Point E31 E32 E33 1 2.1 1.9 1.8 2 2.2 2.0 1.9 3 10.5 8.2 7.6 A sudden change occurs when the air conditioner starts at time 3. 4 10.3 8.0 7.4 5 2.3 2.1 2.0
[0072] The constructed spatiotemporal matrix X is 3 rows and 5 columns, with each row corresponding to the time series of a monitoring point and each column corresponding to different monitoring points at the same time. This allows the abrupt changes at each point at time 3 (E31 point 10.5, E32 point 8.2, E33 point 7.6) to be contained within the matrix, thus facilitating the analysis of their spatial correlation.
[0073] Step 20142: Weight the elements in the spatiotemporal matrix according to their contribution to the mutation to obtain a weighted matrix.
[0074] Optionally, since the elements in the spatiotemporal matrix contribute differently to the "fault mutation" (elements near the fault point experience larger mutations and thus higher contributions), a weighted function is used to "score" these elements, highlighting key fault characteristics and suppressing noise / non-critical features. Specifically, the pruning system assigns scores based on the varying contributions of elements in the spatiotemporal matrix to the mutation; for example, elements at time 3 (the mutation time) are more important than elements at stationary times. Therefore, weighted SVD is used to assign scores to each element. Assign weights This is to highlight information about the time of mutation and the mutation monitoring point. The weighting formula is:
[0075] ;
[0076] in, Represented as the first The mean of the column (at the same time). Represented as the first The standard deviation of the column. Based on this, the moment of change is determined. The elements at points are magnified, while stationary moments are reduced, allowing SVD to focus more on mutation information. The resulting weighted matrix... ,in This is represented as element-wise multiplication.
[0077] Step 20143: Perform singular value decomposition on the weighted matrix to obtain the singular value composite matrix.
[0078] Optionally, the pruning system applies weighting matrices. The formula for singular value decomposition is as follows: ;in, It is a singular value matrix, with the diagonal... Reflecting the energy characteristics of the matrix Large singular values represent the main energy distribution of the mutation. Represented as a left singular matrix, It is represented as a right singular matrix.
[0079] This invention addresses the problem of "fault features being overwhelmed" by using an exponential weighting function to give high weight to "fault mutation elements," thereby suppressing steady-state / noise.
[0080] In one embodiment, steps 2021-2025 are described as follows:
[0081] Step 2021: Segment the time-domain abrupt change features, and process the information entropy of each segment to obtain a time-domain entropy sequence. Based on the time-domain entropy sequence, determine the time-domain entropy change point.
[0082] Optionally, the pruning system first segments the temporal abrupt change features according to a preset sliding window, obtaining multiple time-domain segments. Then, it calculates the information entropy of the data in each time-domain segment to obtain a time-domain entropy sequence. Next, it calculates the entropy difference between adjacent time-domain segments. When the entropy difference exceeds a preset threshold, the time-domain segment is determined to be a time-domain entropy change point, meaning that the data changes drastically during this period and may contain important features. Specifically, the time-domain abrupt change feature data (such as the current abrupt change sequence of a certain line over one day, with a sampling frequency of...) is... The data (a total of 86,400 points) is divided into segments (e.g., 100 points per segment, totaling 864 segments). The information entropy of each segment is calculated to obtain the temporal entropy sequence. Then calculate the entropy difference between adjacent segments. ,when Exceeding a preset threshold (such as the mean) If the deviation is multiple of the standard deviation, then it is judged. It is the point of change in temporal entropy.
[0083] In one embodiment, taking the current fluctuation data collected by a smart meter in a certain area as an example, the segment length is set to 100 points (corresponding to 100 seconds). Among them, the 100th to 200th seconds (segment 2) correspond to the residents' breakfast time, when electrical appliances are started in a concentrated manner, resulting in large fluctuations in current values. The information entropy is calculated accordingly. Seconds 1-100 (segment 1) occur late at night, and the current is stable. Entropy difference If the entropy difference is much greater than the average entropy difference (0.5) in other time periods, then the second segment is determined to be the entropy change point, corresponding to the critical time period for the breakfast appliance to start.
[0084] Step 2022: Based on the spatial association characteristics, construct a spatial association topology graph with each data collection point as a node and the degree of association between data as an edge.
[0085] Optionally, when constructing a spatial association topology graph, the pruning system uses monitoring points of the power system (such as substations, meters, and sensors) as data acquisition points, and the degree of association between data is determined by spatial association features, that is, the spatial association features are used as the weights of the edges to construct a weighted undirected graph (spatial association topology graph).
[0086] Step 2023: Perform clustering on the spatial association topology graph to obtain multiple different data clusters.
[0087] Optionally, the pruning system uses the constructed adjacency matrix. First calculate the degree matrix (Diagonal matrix, diagonal elements) , i.e., node (The sum of the weights associated with other nodes). Then calculate the Laplace matrix: And on Perform eigenvalue decomposition, i.e., solve... ,in Represents the eigenvector. This represents the eigenvalues, resulting in a series of eigenvalues and their corresponding eigenvectors. Then, based on a preset number of clusters, such as selecting the eigenvectors corresponding to the three smallest non-zero eigenvalues, these eigenvectors are arranged into a matrix according to the node dimension. Each row represents the projection of a node onto these eigenvectors. Then... The MAIN algorithm (or other clustering algorithms) clusters these row vectors, grouping similar monitoring points into the same data cluster. For example, this yields clusters. (Including monitoring points) ), (Include ), (Include ).
[0088] Step 2024: For each cluster, process the temporal entropy change point according to the preset contribution function to obtain the entropy contribution.
[0089] Optionally, the pruning system is applied to each cluster (e.g., First, collect the information entropy of the time-domain data segments corresponding to all monitoring points within the cluster. For example, including monitoring points The information entropy of 72 data segments corresponding to each monitoring point is calculated. These entropy values are integrated according to their time correspondence (entropy values in the same time period are grouped together), and then the information entropy of the cluster in each time period is calculated. (The average entropy value of the monitoring points within the cluster for the corresponding time period can be taken as the information entropy of the nth data cluster.) Then, the sum of the information entropies of all clusters is calculated. (Calculations must be made for each time period). Finally, use the contribution formula. , obtained the The entropy contribution of each cluster, where, This is represented as the information entropy of the nth data cluster; Let be the information entropy of the m-th data cluster; M represents the total number of data clusters. The greater the contribution, the greater the impact of the entropy change of that cluster on the overall entropy change, and the more likely it is to contain key information. Step 2025: Perform a nonlinear mapping between the entropy contribution of each data cluster and the corresponding temporal entropy change point to obtain the mapping result, and determine the pruning threshold based on the mapping result.
[0090] Optionally, the pruning system assigns the entropy contribution of each cluster to the pruning system. With time domain entropy change Combined, using non-linear functions (such as the sigmoid) for mapping: ;in, Represented as adjustment parameters (e.g.) (This can be adjusted according to the power scenario). Mapping results The closer a value is to 1, the more important the information corresponding to that cluster is, and more parameters should be retained during pruning; the closer a value is to 0, the less important the information is, and more parameters can be pruned. Then, by combining the mapping results of all clusters, the final pruning threshold is determined, as described in steps 20251-20252.
[0091] This invention, from a temporal perspective, accurately captures moments of sudden changes in data uncertainty through temporal entropy change; from a spatial perspective, it mines potential correlation structures among monitoring points using topological clustering, and then integrates both to calculate contribution and determine thresholds through nonlinear mapping. This approach considers both the dynamic changes in power system operating data over time and the spatial relationships between monitoring points. Compared to single-dimensional or simple methods, it can more comprehensively and accurately determine pruning thresholds, ensuring that data pruning retains key operational information while removing redundancy. This adapts to the complex and critical operational data processing needs of power systems, providing a high-quality data foundation for subsequent data analysis (such as fault diagnosis and condition assessment).
[0092] In one embodiment, steps 20251-20252 are described as follows:
[0093] Step 20251: Divide the mapping results into equal intervals according to their numerical values to obtain multiple sub-intervals.
[0094] Optionally, the pruning system, based on the obtained mapping results, such as obtaining 100 mapping results (corresponding to data importance mapping values for different clusters and different time periods in the power system), these values are all... Intervals. Divide these results into 5 equally spaced sub-intervals. First, calculate the length of each sub-interval. The total range is 1−0=1, which is divided into 5 equal intervals, each with a length of 0.2. Therefore, the divided intervals are: , , , , Each interval corresponds to a different level of importance. For example, [0, 0.2] may represent "not important" and [0.8, 1] may represent "extremely important". Based on this, all mapping results are divided into these 5 intervals according to their numerical values.
[0095] Step 20252: Determine the sub-interval density based on the number of mapping results within each sub-interval.
[0096] Optionally, the pruning system is based on the data density formula. ,in, This represents the number of mapping results within the l-th interval; Indicate the interval length; and calculate the value of each interval. (For example, if interval 5 has 3 results, then) There is a result for interval 1. ), thus obtaining the density of each subinterval.
[0097] Step 20253: Determine the target sub-interval based on the sub-interval density, and use the median within the target sub-interval as the pruning threshold.
[0098] Optionally, the pruning system prioritizes the interval with the highest data density (such as interval 5 in the example above) and uses the median of this interval as the pruning threshold. If multiple intervals have the same and highest density, the upper quartile of the interval with the largest value is selected (to avoid selecting an unimportant interval). The median is calculated by sorting the mapping results within the interval and taking the middle value. Selecting the interval with the highest density ensures that the threshold comes from the range that "most clusters consider important," while the median or upper quartile represents the typical value within the interval. This balances the overall importance of the data and allows for the selection of a more important threshold (when there are multiple maximum densities), which aligns with the characteristics of power system data having different levels of importance and requiring flexible adaptation.
[0099] The embodiments of the present invention can adaptively find a suitable pruning threshold, ensuring that the selected threshold is objective and reasonable, and can balance the importance of the overall data.
[0100] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0101] Furthermore, the power large model pruning system based on edge computing devices provided by the present invention will be described below. The power large model pruning system based on edge computing devices described below can be referred to in correspondence with the power large model pruning method based on edge computing devices described above.
[0102] Optional, refer to Figure 4 , Figure 4 This is a schematic diagram of the power large-scale model pruning system based on edge computing devices provided by the present invention. The power large-scale model pruning system based on edge computing devices includes:
[0103] The acquisition module 210 is used to acquire multi-source operating data collected by the edge device and hardware parameter data of the edge device;
[0104] The threshold determination module 220 is used to extract time-domain and frequency-domain features from multi-source operating data to obtain time-domain abrupt change features and spatial correlation features, and to determine the pruning threshold based on the time-domain abrupt change features and spatial correlation features.
[0105] The performance analysis module 230 is used to perform performance analysis on hardware parameter data to obtain parallel performance results and data processing results.
[0106] The pruning optimization module 240 is used to prune and optimize the large power model based on the pruning threshold to obtain the preliminary model after pruning, and to adjust the structure of the preliminary model according to the parallel performance results and data processing results to obtain the adjusted model.
[0107] The verification module 250 is used to verify and adjust the adjusted model based on the side computing power device to obtain the target model structure after verification and adjustment.
[0108] This invention extracts temporal abrupt change features and spatial correlation features to determine pruning thresholds that accurately match the characteristics of power data. During pruning, key features such as fault waveform details are effectively preserved, avoiding prediction bias caused by feature loss, thus significantly improving the prediction accuracy of the model in transmission, transformation, and distribution scenarios. Simultaneously, the structure of the initial pruned model is adjusted based on the obtained parallel performance results and data processing results, fully leveraging the hardware advantages of edge computing devices, avoiding model structure mismatch with hardware, improving hardware parallel computing efficiency, reducing computational latency, and making the model run more smoothly and efficiently on edge devices.
[0109] Please see Figure 5 , Figure 5 An embodiment diagram of an electronic device provided in accordance with the present invention. For example... Figure 5 As shown, this embodiment of the invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, it performs the following steps:
[0110] Acquire multi-source operational data and hardware parameter data of edge devices collected by edge devices;
[0111] Time-domain and frequency-domain features are extracted from multi-source operational data to obtain temporal abrupt change features and spatial correlation features. Based on the temporal abrupt change features and spatial correlation features, the pruning threshold is determined.
[0112] The hardware parameter data is analyzed for performance to obtain parallel performance results and data processing results.
[0113] The power large model is pruned and optimized based on the pruning threshold to obtain the preliminary model after pruning. The preliminary model is then structurally adjusted based on the parallel performance results and data processing results to obtain the adjusted model.
[0114] The model is verified and adjusted based on the edge computing power device to obtain the target model structure after verification and adjustment.
[0115] Please see Figure 6 , Figure 6 An embodiment diagram of a computer-readable storage medium provided in accordance with an embodiment of the present invention is shown. Figure 6 As shown, this embodiment provides a computer-readable storage medium 400 on which a computer program 311 is stored. When the computer program 311 is executed by a processor, it performs the following steps:
[0116] Acquire multi-source operational data and hardware parameter data of edge devices collected by edge devices;
[0117] Time-domain and frequency-domain features are extracted from multi-source operational data to obtain temporal abrupt change features and spatial correlation features. Based on the temporal abrupt change features and spatial correlation features, the pruning threshold is determined.
[0118] The hardware parameter data is analyzed for performance to obtain parallel performance results and data processing results.
[0119] The power large model is pruned and optimized based on the pruning threshold to obtain the preliminary model after pruning. The preliminary model is then structurally adjusted based on the parallel performance results and data processing results to obtain the adjusted model.
[0120] The model is verified and adjusted based on the edge computing power device to obtain the target model structure after verification and adjustment.
[0121] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the power large-scale model pruning method based on the edge computing device provided by the above methods. The method includes:
[0122] Acquire multi-source operational data and hardware parameter data of edge devices collected by edge devices;
[0123] Time-domain and frequency-domain features are extracted from multi-source operational data to obtain temporal abrupt change features and spatial correlation features. Based on the temporal abrupt change features and spatial correlation features, the pruning threshold is determined.
[0124] The hardware parameter data is analyzed for performance to obtain parallel performance results and data processing results.
[0125] The power large model is pruned and optimized based on the pruning threshold to obtain the preliminary model after pruning. The preliminary model is then structurally adjusted based on the parallel performance results and data processing results to obtain the adjusted model.
[0126] The model is verified and adjusted based on the edge computing power device to obtain the target model structure after verification and adjustment.
[0127] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0129] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0130] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for pruning a large-scale power model based on edge computing devices, characterized in that, The method includes: Acquire multi-source operational data and hardware parameter data of edge devices collected by edge devices; Variational mode decomposition is performed on the multi-source operating data to obtain multiple eigenmode function components of different frequencies; Perform a Hilbert transform on each of the intrinsic mode function components to obtain an analytic signal, and determine the instantaneous frequency and instantaneous amplitude based on the analytic signal; Based on a preset sliding window, the abrupt change point is determined according to the instantaneous frequency and the instantaneous amplitude; Singular value decomposition is performed on the intrinsic mode function components containing the mutation point to obtain the singular value composite matrix, and the singular value features are obtained by analyzing the singular value composite matrix. The singular value features of different intrinsic mode function components are fused together, and combined with the correlation of data points in the spatial dimension, to obtain temporal abrupt change features and spatial correlation features. The time-domain abrupt change features are segmented, and information entropy processing is performed on each segmented data to obtain a time-domain entropy sequence. Based on the time-domain entropy sequence, the time-domain entropy change point is determined. Based on the spatial association characteristics, a spatial association topology graph is constructed with the data collection points as nodes and the degree of association between the data as edges. Clustering is performed on the spatial association topology graph to obtain multiple different data clusters; For each data cluster, the temporal entropy change point is processed according to a preset contribution function to obtain the entropy contribution. The entropy contribution of the data clusters is nonlinearly mapped to the corresponding temporal entropy change points to obtain the mapping result; The mapping result is divided into multiple sub-intervals at equal intervals according to the numerical value. The sub-interval density is determined based on the number of mapping results within each sub-interval; The target sub-interval is determined based on the sub-interval density, and the median within the target sub-interval is used as the pruning threshold. The hardware parameter data is analyzed for performance to obtain parallel performance results and data processing results; The power large model is pruned and optimized based on the pruning threshold to obtain a preliminary model after pruning. The preliminary model is then structurally adjusted based on the parallel performance results and the data processing results to obtain an adjusted model. The adjustment model is verified and adjusted based on the side computing power device to obtain the target model structure after verification and adjustment.
2. The method according to claim 1, characterized in that, The singular value decomposition of the eigenmode function components containing the mutation point to obtain the singular value synthesis matrix includes: A spatiotemporal matrix is constructed based on the eigenmode function components of multiple physical measurement nodes deployed in the power network at the same time. The contribution of the mutation is weighted according to the elements in the spatiotemporal matrix to obtain a weighted matrix; The weighted matrix is subjected to singular value decomposition to obtain the singular value composite matrix.
3. The method according to claim 1, characterized in that, The singular value composite matrix includes a singular value matrix, a left singular matrix, and a right singular matrix; the formula for calculating the correlation between data points in the spatial dimension is: ; in, This represents the spatial correlation between the i-th monitoring point and the j-th monitoring point; This is represented as the projection value of the i-th monitoring point onto the r-th spatial principal component; This is represented as the projection value of the j-th monitoring point onto the r-th spatial principal component; This represents the number of principal components in the space.
4. The method according to claim 1, characterized in that, The contribution function is: ; in, The function representing the contribution of the nth data cluster is... This is represented as the information entropy of the nth data cluster; Let be the information entropy of the m-th data cluster; M represents the total number of data clusters.
5. A power large-scale model pruning system based on edge computing devices, characterized in that, The system includes: The acquisition module is used to acquire multi-source operational data collected by the edge device and the hardware parameter data of the edge device; A threshold determination module is used to perform variational mode decomposition on the multi-source operating data to obtain multiple intrinsic mode function (EMF) components of different frequencies; perform Hilbert transform on each EMF component to obtain an analytic signal, and determine the instantaneous frequency and instantaneous amplitude based on the analytic signal; determine abrupt change points based on the instantaneous frequency and instantaneous amplitude using a preset sliding window; perform singular value decomposition on the EMF components containing the abrupt change points to obtain a singular value composite matrix, and analyze the singular value composite matrix to obtain singular value features; fuse the singular value features of different EMF components, and combine them with the correlation relationships of data points in the spatial dimension to obtain temporal abrupt change features and spatial correlation features; segment the temporal abrupt change features, and perform information entropy processing on each segmented data segment to obtain... The process involves obtaining a temporal entropy sequence and determining temporal entropy change points based on it. According to the spatial correlation characteristics, a spatial correlation topology graph is constructed, using the data collection points as nodes and the correlation degree between the data as edges. The spatial correlation topology graph is then clustered to obtain multiple different data clusters. For each data cluster, the temporal entropy change points are processed according to a preset contribution function to obtain an entropy contribution. The entropy contribution of each data cluster is non-linearly mapped to the corresponding temporal entropy change points to obtain a mapping result. The mapping result is then divided into multiple sub-intervals at equal intervals based on its numerical value. The sub-interval density is determined based on the number of mapping results within each sub-interval. A target sub-interval is determined based on the sub-interval density, and the median within the target sub-interval is used as a pruning threshold. The performance analysis module is used to perform performance analysis on the hardware parameter data to obtain parallel performance results and data processing results. The pruning optimization module is used to prune and optimize the large power model based on the pruning threshold to obtain a preliminary model after pruning, and to adjust the structure of the preliminary model according to the parallel performance results and the data processing results to obtain an adjusted model. The verification module is used to verify and adjust the adjusted model based on the side computing power device to obtain the target model structure after verification and adjustment.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Fan blade fatigue damage prediction method and system
CN120541538A
Layered optimization pruning method and device for electric power multi-mode defect detection and medium
CN120597055A