An Optimization Method for Heterogeneous Brain-Inspired Computational Models in Power Scenarios

By constructing a heterogeneous brain-like computing model for power scenarios, the problems of computing resource allocation and hardware adaptation in power systems by traditional methods are solved, realizing efficient and low-energy power signal processing and fault diagnosis, and improving the system's adaptability and real-time decision-making capabilities.

CN123069902APending Publication Date: 2026-11-10BEIJING YUHENG INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611330565.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Traditional power system monitoring and fault diagnosis methods are insufficient to meet the needs of accurate identification, adaptive learning and real-time decision-making in complex scenarios, and there are challenges in the allocation of computing resources and hardware platform adaptation for spiking neural networks.

Method used

A heterogeneous brain-like computing model for power scenarios is adopted. By collecting multi-source data from the power system, extracting features after preprocessing, a three-layer SNN architecture based on LIF neurons is constructed. Combined with the STDP adaptive learning mechanism, the computing tasks are allocated to heterogeneous hardware platforms such as CPU, GPU, NPU, and FPGA. A dynamic load balancing algorithm is designed for resource scheduling.

Benefits of technology

It achieves efficient and low-energy pulse-like inference of power signals, improves anomaly identification and state assessment capabilities, and ensures the system's safety, robustness, and energy efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123069902A_ABST
    Figure CN123069902A_ABST
Patent Text Reader

Abstract

This invention relates to an optimization method for heterogeneous brain-like computing models in power scenarios, comprising the following steps: S1: Collecting multi-source data from the power system and preprocessing it to obtain preprocessed multi-source power system data; S2: Extracting time-domain, frequency-domain, and time-frequency-domain features of power signals from the preprocessed multi-source power system data, labeling operating status and fault types, and generating a training dataset; S3: Constructing a spiking neural network based on a three-layer SNN architecture designed with LIF neurons; S4: Allocating spiking neural network computation tasks to different devices, establishing a task mapping table and an optimized computation graph; S5: Designing a dynamic load balancing algorithm based on device load status and task priority, monitoring the load status of each device, dynamically allocating computational resources according to task priority, and outputting a real-time scheduling scheme. This invention effectively achieves optimal model energy efficiency and real-time reliable spiking brain-like inference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model optimization, and in particular to a method for optimizing heterogeneous brain-like computing models for power scenarios. Background Technology

[0002] Against the backdrop of the rapid development of new power systems and smart grids, the automation and intelligence levels of power systems are constantly improving, placing higher demands on the perception, processing, and decision-making of multi-source heterogeneous data. Power networks encompass a vast amount of data from diverse sources with complex characteristics, including voltage, current, frequency, switch status, ambient temperature, and fault waveforms, exhibiting highly dynamic and diverse operating states. Traditional rule-based or shallow machine learning methods for power monitoring and fault diagnosis struggle to meet the demands for accurate identification, adaptive learning, and real-time decision-making in complex scenarios. Meanwhile, Spiking Neural Networks (SNNs), as typical brain-like intelligent models, demonstrate natural advantages in simulating biological neural mechanisms, processing temporal pulse signals, and achieving high energy efficiency, providing new pathways for the safe and stable operation, intelligent control, and adaptive maintenance of power systems.

[0003] However, the temporal, sparsity, and event-driven computational characteristics of SNNs pose new challenges to the allocation of computing resources and the adaptation of hardware platforms. Traditional CPUs and GPUs have limited performance in certain computational subtasks (such as pulse propagation and asynchronous updates), while new heterogeneous hardware such as NPUs and FPGAs can efficiently support SNN event-driven operations with low latency and low power consumption. Summary of the Invention

[0004] To address the aforementioned issues, the present invention aims to provide a method for optimizing heterogeneous brain-like computing models for power scenarios, effectively achieving optimal model energy efficiency and real-time reliable pulsed brain-like inference.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: An optimization method for heterogeneous neuromorphic computing models in power scenarios includes the following steps: S1: Collect multi-source data from the power system and preprocess it to obtain preprocessed multi-source data from the power system; S2: Based on the preprocessed multi-source power system data, extract the time domain, frequency domain, and time-frequency domain features of the power signals, label the operating status and fault type, and generate a training dataset; S3: A three-layer SNN architecture based on LIF neurons is used to construct a spiking neural network, realize signal pulse coding and STDP adaptive learning mechanism, and train it according to the training dataset to obtain the trained spiking neural network; S4: Assign spiking neural network computation tasks to different devices, establish a task mapping table and optimize the computation graph; S5: Design a dynamic load balancing algorithm based on device load status and task priority, monitor the load status of each device, dynamically allocate computing resources according to task priority, and output a real-time scheduling scheme.

[0006] Further preprocessing is performed as follows: a data quality assessment index system is established, including completeness, accuracy, and consistency, to assess the quality of the collected multi-source power system data; outliers are identified using the 3σ criterion, and data exceeding the preset range are marked as outliers and removed; Kalman filtering algorithm is used to remove measurement noise and process noise, a state-space model is established for adaptive filtering, and interpolation algorithms are used to fill in missing data.

[0007] Furthermore, based on the preprocessed multi-source power system data, time-domain, frequency-domain, and time-frequency-domain features of power signals are extracted, and operating status and fault types are labeled to generate a training dataset. Specifically, feature engineering is performed based on power system expertise to extract time-domain, frequency-domain, and time-frequency-domain features. At the same time, a power scenario labeling system is established to label the data as normal operation, fault status, peak load, and low load categories, and to label specific fault types and load patterns. The feature vector matrix F(t) and the corresponding label vector L(t) are output to form a supervised learning training dataset {F(t), L(t)}. Furthermore, a spiking neural network is constructed based on a three-layer SNN architecture designed with LIF neurons to realize signal pulse coding and STDP adaptive learning mechanism, as detailed below: A hierarchical spiking neural network architecture was designed based on the LIF (Leaky Integrate-and-Fire) neuron model. The input layer is designed as a multi-channel structure, with each channel corresponding to a power signal type. The hidden layer adopts a three-layer structure: the first layer is the signal feature extraction layer, the second layer is the pattern recognition layer, and the third layer is the decision fusion layer. The output layer is designed according to the application scenario: load prediction is output by one neuron with continuous values, and fault diagnosis is output by K neurons corresponding to K fault types. The network connection adopts a sparse connection mode. The LIF neuron model specifies the membrane potential V for each neuron i in the LIF neuron model. i (t) The update and release mechanism is as follows, including membrane potential integration and leakage: ; ; ; Among them, V i (t+Δt) is the membrane potential of neuron i at time t+Δt; λ is the membrane potential leakage coefficient; τm w is the membrane time constant. ij s represents the synaptic weights from neuron j to neuron i; j (t) represents the pulse firing state of neuron j at time t; V represents the external input current received by neuron i at time t; reset ri(t) is the membrane potential reset value; ri(t) is the reset signal of neuron i at time t. Pulse delivery: ; Among them, V th The threshold for issuance; 1{V i (t)≥V th} is the pulse firing determination function; Refractory period: ; Where, ρ i (t) represents the remaining refractory period of neuron i; V reset Reset value for membrane potential By using a spatiotemporal sparse coding algorithm based on power signal characteristics, continuous power signals are converted into discrete pulse sequences; and based on the STDP adaptive learning mechanism, the network can dynamically adjust connection weights according to the power scenario.

[0008] Furthermore, a spatiotemporal sparse coding algorithm based on power signal characteristics is used to convert continuous power signals into discrete pulse sequences, as follows: The spatiotemporal sparse coding algorithm uses a combination of rate coding and time coding to map the signal amplitude to the pulse firing frequency and the signal rate of change to the pulse firing time. Input continuous signal x c (t), channels c=1,…,32, encoded as pulse sequence s c (τ): Rate coding: ; Where, μ c σ is the historical average of the channel c signal; c α is the historical standard deviation of the channel c signal; c r is the coding gain coefficient for channel c; max The maximum allowed pulse frequency; clip indicates clip operation; Based on r within [t, t+ΔT] c (t) Generates a Poisson pulse: ; Wherein, P(s) c(τ)=1) represents the probability of firing a pulse within time step τ; Phase encoding: ; Where, φ c (t) represents the phase value of channel c at time t; β c These are the phase coding coefficients for channel c; The rate of change of the signal; t0 is the forced pulse firing time; t0 is the start time of the encoding window; T is the encoding window length. At step τ=τ cemit A forced pulse is emitted, and the time pulse trajectory s is obtained by fusion. c (τ); Channel c is expanded to G encoding neurons u=1…G, each encoder having a different gain and bias: ; Where G is the number of coding neurons per channel; Personalized gain for encoder u; γ u b is the gain modulation factor; c,u For the bias term of encoder u; Representing the set of real numbers Stacking all channels with the swarm encoder yields the encoding matrix S. in : ; Where, N enc Total number of coding neurons.

[0009] Furthermore, based on the training dataset, a trained spiking neural network is obtained, as follows: The input training dataset is {F(t), L(t)}, where F(t) and L(t) are the input features and supervision labels at time t, respectively. The encoder then produces S. in ; Offline pre-training: With a fixed connection mask, the readout head and some synapses are trained using surrogate-BP to minimize the loss function L; Initialize STDP parameters (A) ± ,τ ± ,η), where A ± τ represents the magnitude of the maximum weight change. ± Let η be the time constant for weight changes, and η be the learning rate of STDP and the weight range [w]. min ,w max ]; Online STDP adaptation: Dynamically select the dynamic STDP scheduling function g(c,t) based on the runtime context c; update synapses on an event-driven basis: calculate the single-pair synaptic weight change Δw for each pre-post pulse pairing. ij And perform pruning / normalization; Steady State and Constraints: Periodic Control of Release Rate and Energy Consumption: If ,in, Let i be the average firing rate of neuron i. Let V be the maximum allowable firing rate threshold for neuron i; then increase the threshold V. th Alternatively, suppression can be increased; the trained SNN model M, weights W, and encoder parameters Θ can be obtained.

[0010] Furthermore, the spiking neural network (SNN) computation tasks are allocated to different devices, and a task mapping table and optimized computation graph are established, as follows: A task-device mapping table M is established, decomposing the SNN computation tasks according to their computational characteristics and mapping them to different heterogeneous computing devices. Membrane potential integration and threshold comparison operations are mapped to the CPU, large-scale matrix operations are mapped to the CUDA core of the GPU, pulse propagation and synaptic update computations are mapped to a dedicated NPU, and real-time signal processing and control logic are mapped to the FPGA. Simultaneously, a data flow graph between tasks is designed to clarify the data transmission relationships between devices, and an optimized computation graph G is output. opt This provides a basis for subsequent scheduling.

[0011] Furthermore, a data flow graph is designed between tasks to clarify the data transmission relationships between devices and output an optimized computation graph, specifically as follows: A multi-level data flow graph is constructed to clarify the data dependencies between tasks and the communication modes between devices. The data flow graph is divided into three levels: a task-level data dependency graph describes the sequential dependencies between tasks; a device-level data transmission graph defines the data flow direction and transmission protocol between four types of devices; the coded pulse data generated by the FPGA is transmitted to the CPU via the PCIe bus for membrane potential integration; the pulse sequence calculated by the CPU is transmitted to the NPU via a high-speed memory bus for pulse propagation; and the synaptic events of the NPU are fed back to the GPU via a dedicated channel for weight updates; a timing-level synchronization graph ensures the time consistency of distributed computing, setting three key synchronization points: t encode Synchronization points ensure that all encoded data is ready. compute Synchronization points ensure that all neuron states are updated, t update Synchronization points ensure that all weight modifications take effect; The data transmission relationship adopts a pipelined model, and the double buffering mechanism realizes the overlap of computation and communication, reducing the waiting time between devices; a data version control mechanism is established to assign a timestamp and version number to each data block to ensure the consistency of data accessed by multiple devices; communication optimization strategies are designed, including data compression, batch transmission and asynchronous communication, to maximize bandwidth utilization and minimize communication latency.

[0012] Based on the task mapping table and data flow graph, an optimized computation graph G is generated. opt = (V, E, W, C) serves as the core basis for the scheduling system.

[0013] Furthermore, a dynamic load balancing algorithm based on device load status and task priority is designed to monitor the load status of each device, dynamically allocate computing resources according to task priority, and output a real-time scheduling scheme, as follows: Real-time collection of key performance indicators of various heterogeneous devices, including utilization rate, memory usage rate and temperature status information of four types of devices: CPU, GPU, NPU and FPGA; Based on the real-time requirements of power applications, task priorities are set: protection and control tasks have the highest priority (Priority = 1), followed by fault diagnosis (Priority = 2), and load prediction has the lowest priority (Priority = 3). When the equipment load exceeds the threshold, a task migration mechanism is triggered to migrate low-priority tasks to other equipment and output a real-time task scheduling scheme (Schedule(t)) to ensure optimal overall system performance.

[0014] Furthermore, the task migration mechanism is as follows: For each candidate task i′ and available target device q≠d, define the reward function: ; in, Let i′ be the total reward value for migrating from device d to device q at time t. The estimated execution time of task i′ on device d; The estimated execution time of task i′ on target device q; λ is the communication transmission cost from device d to device q; λ is the health margin weighting coefficient; P device,q (t) represents the performance health score of the target device q at time t; P device,d (t) represents the performance health score of the source device d at time t; Choose the optimal objective q ; in, For the set of candidate target devices; It must also meet capacity and real-time constraints: ; Where, ρ k The equivalent load weight for task k; 1{A k =q} is an indicator function; A k ρ is the current home device for task k; i′ Cap represents the equivalent load weight of the task i′ to be migrated; q This represents the maximum capacity of device q. Let i be the time limit for completing task i′; like If the migration is approved, it will be postponed; otherwise, the resource level or batch size of the task will be reduced instead.

[0015] The present invention has the following beneficial effects: 1. This invention collects and integrates multi-source data from the power system throughout the entire process, and uses systematic preprocessing and deep feature extraction to perform comprehensive analysis of power signals from multiple perspectives in the time domain, frequency domain, and time-frequency domain. Combined with multi-dimensional operating condition marking and fine fault classification, it realizes the generation of structured training data from raw signals to accurate diagnosis and prediction, laying a solid data foundation for subsequent complex pattern recognition and intelligent decision-making based on spiking neural networks (SNN), and significantly improving the ability to identify anomalies and assess conditions in complex power scenarios. 2. This invention adopts a three-layer LIF neuronal spiking network architecture, which has bio-inspired temporal information modeling and event perception characteristics. Through pulse coding and STDP learning rules, it achieves end-to-end adaptive feature extraction and learning. The trained SNN not only automatically adapts to the dynamic environment changes of the power system, but also has strong noise robustness and online incremental learning capabilities. At the same time, the diverse computing tasks of the SNN are mapped to heterogeneous hardware platforms such as CPU, GPU, NPU, and FPGA according to their computing characteristics and resource requirements. A task-device mapping table and communication optimization computing graph are constructed to fully release the maximum computing and resource advantages of various devices and realize an efficient and low-energy brain-like computing solution. 3. This invention monitors the utilization rate, memory, temperature and other operational indicators of each heterogeneous device globally, and combines this with the priority of synchronously monitored tasks to design a dynamic load balancing and priority-aware scheduling algorithm. Based on the importance of tasks, it intelligently migrates and reallocates computing resources to generate an adaptive real-time scheduling scheme. This mechanism not only ensures the strong real-time performance and stability of high-priority critical tasks, but also prevents system bottlenecks and resource imbalances, effectively improving the safety, robustness and energy efficiency of the overall power intelligent control system. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0017] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments: refer to Figure 1 In this embodiment, a method for optimizing heterogeneous brain-like computing models for power scenarios is provided, including the following steps: S1: Collect multi-source data from the power system and preprocess it to obtain preprocessed multi-source data from the power system; S2: Based on the preprocessed multi-source power system data, extract the time domain, frequency domain, and time-frequency domain features of the power signals, label the operating status and fault type, and generate a training dataset; S3: A three-layer SNN architecture based on LIF neurons is used to construct a spiking neural network, realize signal pulse coding and STDP adaptive learning mechanism, and train it according to the training dataset to obtain the trained spiking neural network; S4: Assign spiking neural network computation tasks to different devices, establish a task mapping table and optimize the computation graph; S5: Design a dynamic load balancing algorithm based on device load status and task priority, monitor the load status of each device, dynamically allocate computing resources according to task priority, and output a real-time scheduling scheme.

[0018] In this embodiment, the preprocessing is as follows: A data quality assessment index system is established, including completeness, accuracy, and consistency. The collected multi-source power system data is then assessed for quality. Preferably, the quality assessment is as follows: Completeness assessment statistically analyzes the missing data from each data source, requiring a SCADA data missing rate of <3%, a PMU data missing rate of <2%, a smart meter data missing rate of <5%, a meteorological data missing rate of <10%, and an overall missing rate controlled below 5%. Accuracy assessment involves numerical verification by setting reasonable ranges for power parameters. Voltage deviation should be within ±10% of the rated value, and the power factor should be between -1 and 1. Simultaneously, the power balance law P=UI·cos The deviation is less than 5%. Consistency assessment involves cross-validation of multi-source data to ensure that the deviation between different data sources for the same measurement object does not exceed 2%, and the time synchronization deviation does not exceed 1ms. The 3σ criterion is used to identify outliers, marking and removing data exceeding the preset range; Kalman filtering is used to remove measurement and process noise; a state-space model is established for adaptive filtering; and interpolation algorithms are used to fill in missing data.

[0019] In this embodiment, based on the preprocessed multi-source power system data, the time-domain, frequency-domain, and time-frequency-domain features of the power signals are extracted, and the operating status and fault type are labeled to generate a training dataset. Specifically, feature engineering is performed based on power system expertise to extract time-domain features (mean, variance, peak factor), frequency-domain features (harmonic components, spectral entropy), and time-frequency-domain features (wavelet coefficients, Hilbert marginal spectrum). At the same time, a power scene labeling system is established to label the data as normal operation, fault status, peak load, and low load categories, and to label specific fault types (short circuit, open line, grounding, etc.) and load patterns (residential, industrial, commercial). The feature vector matrix F(t) and the corresponding label vector L(t) are output to form a supervised learning training dataset {F(t), L(t)}. In this embodiment, a three-layer SNN architecture based on LIF neurons is used to construct a spiking neural network to implement signal pulse coding and STDP adaptive learning mechanisms, as detailed below: A hierarchical spiking neural network architecture was designed based on the LIF (Leaky Integrate-and-Fire) neuron model. The input layer is designed as a multi-channel structure, with each channel corresponding to a type of power signal. The hidden layer adopts a three-layer structure: the first layer is the signal feature extraction layer (512 neurons), the second layer is the pattern recognition layer (256 neurons), and the third layer is the decision fusion layer (128 neurons). The output layer is designed according to the application scenario: load prediction is output by one neuron with continuous values, and fault diagnosis is output by K neurons corresponding to K fault types. The network connection adopts a sparse connection mode with a connection degree of 20% to reduce computational complexity. The LIF neuron model specifies the membrane potential V for each neuron i in the LIF neuron model. i (t) The update and release mechanism is as follows (discrete form), membrane potential integration and leakage (with reset): ; ; ; Among them, V i (t+Δt) is the membrane potential of neuron i at time t+Δt; λ is the membrane potential leakage coefficient; τ m w is the membrane time constant. ij s represents the synaptic weights from neuron j to neuron i; j (t) represents the pulse firing state of neuron j at time t; V represents the external input current received by neuron i at time t; reset ri(t) is the membrane potential reset value; ri(t) is the reset signal of neuron i at time t. Pulse delivery: ; Among them, V th The threshold for issuance; 1{V i (t)≥V th} is the pulse firing determination function; Refractory period (optional): ; Where, ρ i (t) represents the remaining refractory period of neuron i; V reset Reset value for membrane potential By using a spatiotemporal sparse coding algorithm based on the characteristics of power signals, continuous power signals are converted into discrete pulse sequences; and based on the STDP (Spike-Timing-Dependent Plasticity) adaptive learning mechanism, the network can dynamically adjust the connection weights according to the power scenario.

[0020] In this embodiment, a spatiotemporal sparse coding algorithm for power signal features is used to convert continuous power signals into discrete pulse sequences, as detailed below: The spatiotemporal sparse coding algorithm uses a combination of rate coding and time coding to map the signal amplitude to the pulse firing frequency and the signal rate of change to the pulse firing time. Input continuous signal x c (t), channels c=1,…,32, encoded as pulse sequence s c (τ): Rate coding (amplitude-frequency mapping): ; Where, μ c σ is the historical average of the channel c signal; c α is the historical standard deviation of the channel c signal; c r is the coding gain coefficient for channel c; max The maximum allowed pulse frequency; clip indicates clip operation; Based on r within [t, t+ΔT] c (t) Generates a Poisson pulse: ; Wherein, P(s) c (τ)=1) represents the probability of firing a pulse within time step τ; Phase encoding (rate of change - phase mapping): ; Where, φ c (t) represents the phase value of channel c at time t; β c These are the phase coding coefficients for channel c; The rate of change of the signal; t0 is the forced pulse firing time; t0 is the start time of the encoding window; T is the encoding window length. At step τ=τ cemit A forced pulse is emitted (or superimposed if it does not conflict with a Poisson emission), and the resulting time pulse trajectory s is obtained by fusing the pulses. c (τ); Channel c is expanded to G encoding neurons u=1…G, each encoder having a different gain and bias: ; Where G is the number of coding neurons per channel; Personalized gain for encoder u; γ u b is the gain modulation factor; c,u For the bias term of encoder u; Represents the set of real numbers; Stacking all channels with the swarm encoder yields the encoding matrix S. in : ; Where, N enc Total number of coding neurons.

[0021] In this embodiment, a trained spiking neural network is obtained by training based on the training dataset, as detailed below: The input training dataset is {F(t), L(t)}, where F(t) and L(t) are the input features and supervision labels at time t, respectively. The encoder then produces S. in ; Offline pre-training: With a fixed connection mask, the readout head and some synapses are trained using surrogate-BP to minimize the loss function L; Initialize STDP parameters (A) ± ,τ ± ,η), where A ± τ represents the magnitude of the maximum weight change. ± Let η be the time constant for weight changes, and η be the learning rate of STDP and the weight range [w]. min ,w max ]; Online STDP adaptation: Dynamically select the dynamic STDP scheduling function g(c,t) based on the runtime context c; update synapses on an event-driven basis: calculate the single-pair synaptic weight change Δw for each pre-post pulse pairing. ij And perform pruning / normalization; Steady State and Constraints: Periodic Control of Release Rate and Energy Consumption: If ,in, Let i be the average firing rate of neuron i. Let V be the maximum allowable firing rate threshold for neuron i; then increase the threshold V. th Alternatively, suppression can be increased; the trained SNN model M, weights W, and encoder parameters Θ can be obtained.

[0022] In this embodiment, the spiking neural network (SNN) computation tasks are assigned to different devices, and a task mapping table and optimized computation graph are established, as follows: A task-device mapping table M is established, and the SNN computation tasks are decomposed according to their computational characteristics and mapped to different heterogeneous computing devices. Membrane potential integration and threshold comparison operations are mapped to the CPU, large-scale matrix operations (weight updates, gradient calculations) are mapped to the CUDA cores of the GPU, neuromorphic computations such as spiking and synaptic updates are mapped to a dedicated NPU, and real-time signal processing and control logic are mapped to the FPGA; (Based on the characteristics of the SNN computation tasks and the computing capabilities of the heterogeneous devices, a detailed task-device mapping relationship is established, and the 32 core SNN tasks are classified and mapped according to their computational characteristics: the CPU undertakes control-intensive tasks, including membrane potential integration T1, threshold comparison and reset T2, network state management T7, and exception handling and fault tolerance T8. These tasks have complex conditional branches and frequent state access requirements, which are suitable for the CPU's large cache and strong control capabilities;) The GPU handles computationally intensive tasks, including 10 tasks such as weight matrix update (T3), batch STDP calculation (T4), gradient calculation (T9), and loss function evaluation (T10), leveraging the GPU's massively parallel computing capabilities to process high-dimensional matrix operations. The NPU handles neuromorphic computing tasks, including 8 tasks such as pulse propagation (T5), sparse synapse update (T11), event-driven processing (T12), and neuron population dynamics (T13), utilizing the NPU's advantages in sparse computing and low power consumption. The FPGA handles real-time processing tasks, including 6 tasks such as signal encoding / decoding (T6), high-frequency data acquisition (T14), real-time control output (T15), and timing synchronization management (T16), meeting the stringent real-time requirements of the power system. Mapping table M also defines a compatibility matrix for task migration. When a device is overloaded or fails, tasks can be redistributed to backup devices according to preset compatibility rules, ensuring system robustness and reliability. Simultaneously, a data flow graph between tasks is designed to clarify the data transmission relationships between devices, outputting an optimized computation graph G. opt This provides a basis for subsequent scheduling.

[0023] In this embodiment, a data flow graph is designed between tasks to clarify the data transmission relationships between devices and output an optimized computation graph, specifically as follows: A multi-level data flow graph is constructed to clarify the data dependencies between tasks and the communication modes between devices. The data flow graph is divided into three levels: a task-level data dependency graph describes the sequential dependencies between tasks, such as the output of membrane potential integration T1 serving as the input to threshold comparison T2, and the pulse emission result serving as the trigger signal for weight update T3; a device-level data transmission graph defines the data flow direction and transmission protocol between four types of devices, where the coded pulse data generated by the FPGA is transmitted to the CPU for membrane potential integration via the PCIe bus, the pulse sequence calculated by the CPU is transmitted to the NPU for pulse propagation via a high-speed memory bus, and the synaptic events of the NPU are fed back to the GPU for weight update via a dedicated channel; and a timing-level synchronization graph ensures the time consistency of distributed computing, setting three key synchronization points: t encode Synchronization points ensure that all encoded data is ready. compute Synchronization points ensure that all neuron states are updated, t update Synchronization points ensure that all weight modifications take effect; The data transmission relationship adopts a pipelined model, and the double buffering mechanism realizes the overlap of computation and communication, reducing the waiting time between devices; a data version control mechanism is established to assign a timestamp and version number to each data block to ensure the consistency of data accessed by multiple devices; communication optimization strategies are designed, including data compression, batch transmission and asynchronous communication, to maximize bandwidth utilization and minimize communication latency.

[0024] Based on the task mapping table and data flow graph, an optimized computation graph G is generated. opt= (V, E, W, C) serves as the core basis for the scheduling system. The node set V of the computation graph contains 32 task nodes, each carrying device binding information, computational complexity, memory requirements, and parallelism attributes. The edge set E represents 94 data-dependent edges, with edge weights W encoding data transmission costs, including parameters such as data size, bandwidth limitations, and transmission latency. The constraint set C defines constraints such as real-time constraints, resource capacity constraints, and energy consumption constraints. The computation graph optimization objective adopts a multi-objective function: minimizing the critical path length to reduce end-to-end latency, minimizing cross-device communication overhead to improve overall efficiency, maximizing device utilization balance to avoid performance bottlenecks, and minimizing total energy consumption to meet green computing requirements. The initial computation graph is reconstructed using graph optimization algorithms, including tasks, edges, and pipelined slicing, optimizing the critical path length from 45.2ms to 28.7ms, reducing the number of cross-device communication edges from 67 to 41, and decreasing the device utilization variance from 0.23 to 0.08. The final output optimized computation graph Gopt contains a complete execution plan, resource allocation scheme, communication scheduling table and performance prediction model, providing an accurate basic data structure for the subsequent dynamic scheduling system, supporting real-time task scheduling, load balancing and fault recovery, and ensuring the efficient and stable operation of SNN in heterogeneous computing environments.

[0025] In this embodiment, a dynamic load balancing algorithm based on device load status and task priority is designed to monitor the load status of each device, dynamically allocate computing resources according to task priority, and output a real-time scheduling scheme, as follows: Real-time collection of key performance indicators of various heterogeneous devices, including utilization rate, memory usage rate and temperature status information of four types of devices: CPU, GPU, NPU and FPGA; A comprehensive device status monitoring system is constructed to collect key performance indicators of various heterogeneous devices in real time, including utilization, memory usage, and temperature status information of four types of devices: CPU, GPU, NPU, and FPGA. The monitoring system adopts a multi-level sampling strategy. The bottom-level hardware sensors collect raw data with a precision of 1ms, the middle-level monitoring agent performs data aggregation and preliminary processing at a cycle of 10ms, and the upper-level scheduler receives smoothed monitoring data at a cycle of 100ms. Utilization monitoring covers dimensions such as computing unit occupancy, task queue length, and throughput. Memory monitoring includes indicators such as physical memory usage, cache hit rate, and bandwidth utilization. Temperature monitoring covers parameters such as core temperature, power limit temperature, and cooling system status. Based on the monitoring data, a device performance model Pdevice = f(utilization, memory, temperature) is established, using a multi-factor multiplicative model. The utilization factor reflects the squeeze effect of the load on available computing power, the memory factor reflects the impact of memory bottlenecks, and the temperature factor adopts a piecewise function design. Performance remains optimal within the normal temperature range, and the performance score decreases exponentially after exceeding the safe temperature. When the throttling temperature is reached, forced frequency reduction or migration is implemented. Based on the real-time requirements of power applications, task priorities are set as follows: protection and control tasks have the highest priority (Priority = 1, including key control functions such as relay protection, automatic reclosing, and emergency load shedding, requiring millisecond-level response time and 100% real-time guarantee); fault diagnosis has the next highest priority (Priority = 2, including functions such as fault location, fault type identification, and equipment status assessment, requiring second-level response time and high reliability); and load forecasting has the lowest priority (Priority = 3, including functions such as short-term load forecasting, medium- and long-term planning, and economic dispatch, allowing minute-level response time and a certain degree of latency tolerance). When the equipment load exceeds the threshold (80%), a task migration mechanism is triggered to migrate low-priority tasks to other equipment and output a real-time task scheduling scheme Schedule(t) to ensure optimal overall system performance.

[0026] In this embodiment, the task migration mechanism is as follows: For each candidate task i′ and available target device q≠d, define the reward function: ; in, Let i′ be the total reward value for migrating from device d to device q at time t. The estimated execution time of task i′ on device d; The estimated execution time of task i′ on target device q; λ is the communication transmission cost from device d to device q; λ is the health margin weighting coefficient; P device,q(t) represents the performance health score of the target device q at time t; P device,d (t) represents the performance health score of the source device d at time t; Choose the optimal objective q ; in, For the set of candidate target devices; It must also meet capacity and real-time constraints: ; Where, ρ k The equivalent load weight for task k; 1{A k =q} is an indicator function; A k ρ is the current home device for task k; i′ Cap represents the equivalent load weight of the task i′ to be migrated; q This represents the maximum capacity of device q. Let i be the time limit for completing task i′; like If the migration is approved, it will be postponed; otherwise, the resource level or batch size of the task will be reduced instead.

[0027] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0028] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0029] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0030] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0031] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for optimizing heterogeneous brain-like computing models for power scenarios, characterized in that, Includes the following steps: S1: Collect multi-source data from the power system and preprocess it to obtain preprocessed multi-source data from the power system; S2: Based on the preprocessed multi-source power system data, extract the time domain, frequency domain, and time-frequency domain features of the power signals, label the operating status and fault type, and generate a training dataset; S3: A three-layer SNN architecture based on LIF neurons is used to construct a spiking neural network, realize signal pulse coding and STDP adaptive learning mechanism, and train it according to the training dataset to obtain the trained spiking neural network; S4: Assign spiking neural network computation tasks to different devices, establish a task mapping table and optimize the computation graph; S5: Design a dynamic load balancing algorithm based on device load status and task priority, monitor the load status of each device, dynamically allocate computing resources according to task priority, and output a real-time scheduling scheme.

2. The method for optimizing a heterogeneous brain-like computing model for power scenarios according to claim 1, characterized in that, The preprocessing is specifically as follows: establishing a data quality assessment index system, including completeness, accuracy, and consistency; conducting quality assessment on the collected multi-source power system data; and using the 3σ criterion to identify outliers, marking data exceeding the preset range as outliers and removing them. Kalman filtering algorithm is used to remove measurement noise and process noise, state-space model is established for adaptive filtering, and interpolation algorithm is used to fill in missing data.

3. The method for optimizing a heterogeneous brain-like computing model for power scenarios according to claim 1, characterized in that, The process involves extracting time-domain, frequency-domain, and time-frequency-domain features of power signals from preprocessed multi-source power system data, labeling operating status and fault types, and generating a training dataset. Specifically, feature engineering is performed based on power system expertise to extract time-domain, frequency-domain, and time-frequency-domain features. Simultaneously, a power scenario labeling system is established, labeling data as normal operation, fault status, peak load, and low load categories, and specifying the fault type and load pattern. The result is the output of a feature vector matrix F(t) and the corresponding label vector L(t), forming a supervised learning training dataset {F(t), L(t)}.

4. The method for optimizing a heterogeneous brain-like computing model for power scenarios according to claim 3, characterized in that, The three-layer SNN architecture based on LIF neurons constructs a spiking neural network to realize signal pulse coding and STDP adaptive learning mechanisms, as detailed below: A hierarchical spiking neural network architecture was designed based on the LIF neuron model. The input layer is designed as a multi-channel structure, with each channel corresponding to a power signal type. The hidden layer adopts a three-layer structure: the first layer is the signal feature extraction layer, the second layer is the pattern recognition layer, and the third layer is the decision fusion layer. The output layer is designed according to the application scenario: load prediction is output by one neuron with continuous values, and fault diagnosis is output by K neurons corresponding to K fault types. The network connection adopts a sparse connection mode. The LIF neuron model specifies the membrane potential V for each neuron i in the LIF neuron model. i (t) The update and release mechanism is as follows, including membrane potential integration and leakage: ; ; ; Among them, V i (t+Δt) is the membrane potential of neuron i at time t+Δt; λ is the membrane potential leakage coefficient; τ m w is the membrane time constant. ij s represents the synaptic weights from neuron j to neuron i; j (t) represents the pulse firing state of neuron j at time t; V represents the external input current received by neuron i at time t; reset ri(t) is the membrane potential reset value; ri(t) is the reset signal of neuron i at time t. Pulse delivery: ; Among them, V th The threshold for issuance; 1{V i (t)≥V th } is the pulse firing determination function; Refractory period: ; Where, ρ i (t) represents the remaining refractory period of neuron i; V reset This is the reset value for the membrane potential; By using a spatiotemporal sparse coding algorithm based on power signal characteristics, continuous power signals are converted into discrete pulse sequences; and based on the STDP adaptive learning mechanism, the network can dynamically adjust connection weights according to the power scenario.

5. The method for optimizing a heterogeneous brain-like computing model for power scenarios according to claim 4, characterized in that, The spatiotemporal sparse coding algorithm based on power signal characteristics converts continuous power signals into discrete pulse sequences, as detailed below: The spatiotemporal sparse coding algorithm uses a combination of rate coding and time coding to map the signal amplitude to the pulse firing frequency and the signal rate of change to the pulse firing time. Input continuous signal x c (t), channels c=1,…,32, encoded as pulse sequence s c (τ): Rate coding : ; Where, μ c σ is the historical average of the channel c signal; c α is the historical standard deviation of the channel c signal; c r is the coding gain coefficient for channel c; max The maximum allowed pulse frequency; clip indicates clip operation; Based on r within [t, t+ΔT] c (t) Generates a Poisson pulse: ; Wherein, P(s) c (τ)=1) represents the probability of firing a pulse within time step τ; Phase encoding: ; Where, φ c (t) represents the phase value of channel c at time t; β c These are the phase coding coefficients for channel c; The rate of change of the signal; t0 is the forced pulse firing time; t0 is the start time of the encoding window; T is the encoding window length. At step τ= A forced pulse is emitted, and the time pulse trajectory s is obtained by fusion. c (τ); Channel c is expanded to G encoding neurons u=1…G, each encoder having a different gain and bias: ; Where G is the number of coding neurons per channel; Personalized gain for encoder u; γ u b is the gain modulation factor; c,u For the bias term of encoder u; Represents the set of real numbers; Stacking all channels with the swarm encoder yields the encoding matrix S. in : ; Where, N enc Total number of coding neurons.

6. The method for optimizing a heterogeneous brain-like computing model for power scenarios according to claim 5, characterized in that, The trained spiking neural network is obtained by training the training dataset, as detailed below: The input training dataset is {F(t), L(t)}, where F(t) and L(t) are the input features and supervision labels at time t, respectively. The encoder then produces S. in ; Offline pre-training: With a fixed connection mask, the readout head and some synapses are trained using surrogate-BP to minimize the loss function L; Initialize STDP parameters (A) ± ,τ ± ,η), where A ± τ represents the magnitude of the maximum weight change. ± Let η be the time constant for weight changes, and η be the learning rate of STDP and the weight range [w]. min ,w max ]; Online STDP adaptation: Dynamically select the dynamic STDP scheduling function g(c,t) based on the runtime context c; update synapses on an event-driven basis: calculate the single-pair synaptic weight change Δw for each pre-post pulse pairing. ij And perform pruning / normalization; Steady State and Constraints: Periodic Control of Release Rate and Energy Consumption: If ,in, Let i be the average firing rate of neuron i. Let V be the maximum allowable firing rate threshold for neuron i; then increase the threshold V. th Alternatively, suppression can be increased; the trained SNN model M, weights W, and encoder parameters Θ can be obtained.

7. The method for optimizing a heterogeneous brain-like computing model for power scenarios according to claim 1, characterized in that, The process of allocating spiking neural network (SNN) computation tasks to different devices and establishing a task mapping table and optimized computation graph is as follows: A task-device mapping table M is established, decomposing the SNN computation tasks according to their computational characteristics and mapping them to different heterogeneous computing devices. Membrane potential integration and threshold comparison operations are mapped to the CPU, large-scale matrix operations are mapped to the CUDA cores of the GPU, pulse propagation and synaptic update computations are mapped to a dedicated NPU, and real-time signal processing and control logic are mapped to the FPGA. Simultaneously, a data flow graph between tasks is designed to clarify the data transmission relationships between devices, and an optimized computation graph G is output. opt This provides a basis for subsequent scheduling.

8. The method for optimizing a heterogeneous brain-like computing model for power scenarios according to claim 7, characterized in that, The data flow diagram between the design tasks clarifies the data transmission relationships between devices and outputs an optimized computation graph, specifically as follows: A multi-level data flow diagram is constructed to clarify the data dependencies between tasks and the communication modes between devices. The data flow diagram is divided into three levels: a task-level data dependency diagram describes the sequential dependencies between tasks; a device-level data transmission diagram defines the data flow direction and transmission protocol between four types of devices; coded pulse data generated by the FPGA is transmitted to the CPU via the PCIe bus for membrane potential integration; the pulse sequence calculated by the CPU is transmitted to the NPU via a high-speed memory bus for pulse propagation; and synaptic events of the NPU are fed back to the GPU via a dedicated channel for weight updates; a timing-level synchronization diagram ensures the time consistency of distributed computing, setting three key synchronization points: t encode Synchronization points ensure that all encoded data is ready. compute Synchronization points ensure that all neuron states are updated, t update Synchronization points ensure that all weight modifications take effect; The data transmission relationship adopts a pipeline mode, and the computation and communication are overlapped through a double buffering mechanism to reduce the waiting time between devices; a data version control mechanism is established to assign a timestamp and version number to each data block to ensure the consistency of data accessed by multiple devices; communication optimization strategies are designed, including data compression, batch transmission and asynchronous communication, to maximize bandwidth utilization and minimize communication latency. Based on the task mapping table and data flow graph, an optimized computation graph is generated as the core basis of the scheduling system.

9. The method for optimizing a heterogeneous brain-like computing model for power scenarios according to claim 1, characterized in that, The design is based on a dynamic load balancing algorithm that considers device load status and task priority. It monitors the load status of each device, dynamically allocates computing resources according to task priority, and outputs a real-time scheduling scheme, as detailed below: Real-time collection of key performance indicators of various heterogeneous devices, including utilization rate, memory usage rate and temperature status information of four types of devices: CPU, GPU, NPU and FPGA; Based on the real-time requirements of power applications, task priorities are set: protection and control tasks have the highest priority (Priority = 1), followed by fault diagnosis (Priority = 2), and load prediction has the lowest priority (Priority = 3). When the equipment load exceeds the threshold, a task migration mechanism is triggered to migrate low-priority tasks to other equipment and output a real-time task scheduling scheme Schedule(t) to ensure optimal overall system performance.

10. The method for optimizing a heterogeneous brain-like computing model for power scenarios according to claim 9, characterized in that, The task migration mechanism is as follows: For each candidate task i′ and available target device q≠d, define the reward function: ; in, Let i′ be the total reward value for migrating from device d to device q at time t. The estimated execution time of task i′ on device d; The estimated execution time of task i′ on target device q; λ is the communication transmission cost from device d to device q; λ is the health margin weighting coefficient; P device,q (t) represents the performance health score of the target device q at time t; P device,d (t) represents the performance health score of the source device d at time t; Choose the optimal objective q ; in, For the set of candidate target devices; It must also meet capacity and real-time constraints: ; Where, ρ k The equivalent load weight for task k; 1{A k =q} is an indicator function; A k ρ is the current home device for task k; i′ Cap represents the equivalent load weight of the task i′ to be migrated; q This represents the maximum capacity of device q. Let i be the time limit for completing task i′; like If the migration is approved, it will be postponed; otherwise, the resource level or batch size of the task will be reduced instead.