A Scene-Aware Dynamic Generation Method for Power Agents
By performing sliding window truncation and cross-modal feature fusion on power grid data, and combining edge node resource constraints, a power intelligent agent is dynamically generated. This solves the problems of slow response and inaccurate decision-making of traditional power intelligent agents in complex power grid environments, and achieves efficient alignment between physical situation and business objectives.
Patent Information
- Application Number
- CN202611244414.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-11-10
AI Technical Summary
Traditional power intelligent agent generation schemes cannot dynamically reconstruct based on real-time changes in power grid operation scenarios, resulting in delayed response and inaccurate decision-making. Furthermore, they fail to effectively integrate the perception capabilities of physical situation and business objectives, leading to insufficient system flexibility and engineering reliability under complex operating conditions.
By performing sliding window truncation and time-series feature extraction on the physical operation data of the power grid, semantic encoding is performed in conjunction with the base large language model, and cross-modal feature cross-attention fusion is used to generate the agent demand vector. Then, a single forward inference decoding is performed with the real-time computing power and memory of the edge nodes as hardware constraints to generate a power agent with macro-business alignment capabilities.
It improves the physical stability and business alignment of parameter generation, and enhances the flexibility and engineering reliability of multi-agent systems under complex power grid conditions.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of dynamic generation of power intelligent agents, and more specifically, to a method for dynamic generation of power intelligent agents based on scene perception. Background Technology
[0002] With the deepening evolution of the multi-interaction pattern of "source, grid, load, and storage" in the new power system, the power grid operation scenarios exhibit highly dynamic and heterogeneous characteristics. Complex operating conditions such as load surges, fluctuations in renewable energy output, and fault disturbances frequently occur, placing stringent demands on the real-time adaptability of intelligent decision-making and control systems. Traditional power systems, based on fixed structures and centralized deployments of intelligent agent architectures, suffer from limitations because their model topology and parameters are fixed during the design phase. This makes dynamic reconstruction based on real-time changes in operating scenarios difficult, leading to problems such as delayed response and inaccurate decision-making when facing sudden operating conditions. Simultaneously, the computing power and storage resources of power system edge computing nodes exhibit significant heterogeneity, and the requirements for intelligent agent capability types and collaboration granularities vary greatly across different scenarios. Therefore, a dynamic construction mechanism capable of generating matching intelligent agents on demand based on scenario characteristics is urgently needed.
[0003] Existing power intelligent agent generation schemes mainly rely on offline pre-training and static deployment modes. That is, a fixed-scale intelligent agent model is pre-trained for typical scenarios and then deployed to edge nodes to perform inference tasks. This type of scheme has the following technical defects: First, the network structure and weight parameters of the intelligent agent fail to integrate cross-modal information of the physical operation status of the power grid and the macro-business semantic intent during the generation stage, resulting in the generated intelligent agent lacking dual perception capabilities of the current physical situation and business objectives. Second, the intelligent agent parameter generation process usually adopts a one-time flat decoding strategy, and there is no explicit spectral coupling constraint transmission channel between the weight matrices of each layer. When the power grid signal is transmitted in the multi-layer cascaded path, the mismatch of the spectral radius of adjacent layers will cause the signal to amplify or collapse exponentially, resulting in control command oscillation or response failure. Third, the generation process does not incorporate the real-time available computing power and memory resources of the edge nodes into the hardware constraint modeling. Frequent model instantiation and container start-up and shutdown operations directly impact the computing power defense of the edge nodes, resulting in serious deployment latency and resource fragmentation problems. The aforementioned shortcomings make it difficult for existing solutions to achieve adaptive matching between the power agent architecture and the operating scenario, thus limiting the flexibility and engineering reliability of multi-agent systems in complex power grid environments.
[0004] Therefore, an optimized method for dynamic generation of power intelligent agents based on scene awareness is needed. Summary of the Invention
[0005] To address the aforementioned technical issues, this application provides a method for dynamically generating power intelligent agents based on scene awareness.
[0006] According to one aspect of this application, a method for dynamically generating power intelligent agents based on scene awareness is provided, comprising: Step 1: Perform sliding window truncation and time series feature extraction on the acquired power grid physical operation data to obtain the microscopic physical time series feature vector; Step 2: Using the base large language model, perform semantic encoding and continuous mapping on the macro-business instruction text data of the dispatch center to obtain the macro-business semantic intent tensor; Step 3: Perform cross-modal feature cross-attention fusion and dual-drive requirement generation on the micro-physical temporal feature vector and macro-business semantic intent tensor to obtain the business and physical dual-drive agent requirement vector; Step 4: Using a pre-trained hypernetwork model, the initial network structure and weight parameter matrix of the power agent are obtained by generating conditions with the business and physical dual-drive intelligent agent demand vector as the target and performing a single forward inference decoding with the real-time available computing power and memory matrix of the edge nodes as hardware constraints. Step 5: By compiling the macro-business semantic intent tensor into target weight coefficients and penalty function boundaries, dynamic reward shaping and injection are performed on the reinforcement learning control evaluation layer of the initial network structure and weight parameter matrix of the power agent. After instantiation and activation, an activated power agent with macro-business alignment capability is obtained.
[0007] Compared with existing technologies, this application provides a scene-aware dynamic generation method for power intelligent agents. It extracts microscopic physical conditions from power grid physical operation data using a sliding window time-series feature extraction method. Then, it uses a base-based large language model to semantically encode macroscopic business instructions from the dispatch center to capture top-level business intent. Furthermore, it introduces a cross-modal cross-attention mechanism to deeply fuse physical time-series features with business semantic tensors, generating an intelligent agent demand vector that combines physical perception and business alignment attributes. This vector serves as the target condition, with real-time computing power and memory matrix of edge nodes as hardware constraints, driving a pre-trained hypernetwork model to complete a single forward inference decoding. Finally, it reduces the dimensionality of macroscopic business semantics and compiles it into reward shaping parameters, which are then injected into the reinforcement learning control and evaluation layer. This approach improves the physical stability and business alignment of parameter generation, enhancing the flexibility and engineering reliability of multi-agent systems under complex power grid conditions. Attached Figure Description
[0008] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0009] Figure 1 This is a flowchart of a scene-aware dynamic generation method for power intelligent agents according to an embodiment of this application; Figure 2 This is a schematic diagram of data flow in the scene-aware dynamic generation method for power intelligent agents according to an embodiment of this application; Figure 3 This is a flowchart of step two in the scene-aware dynamic generation method for power intelligent agents according to an embodiment of this application; Figure 4 This is a flowchart of step four in the scene-aware dynamic generation method for power intelligent agents according to an embodiment of this application. Detailed Implementation
[0010] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.
[0011] As indicated in this application and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not specifically singular and may include plural forms. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.
[0012] While this application makes various references to certain modules of the systems according to embodiments of this application, any number of different modules can be used and run on user terminals and / or servers. The modules described are merely illustrative, and different aspects of the systems and methods may use different modules.
[0013] Flowcharts are used in this application to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, various steps can be processed in reverse order or simultaneously as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.
[0014] In the technical solution of this application, a method for dynamic generation of power intelligent agents based on scene perception is proposed. Figure 1 This is a flowchart of a scene-aware dynamic generation method for power intelligent agents according to an embodiment of this application. Figure 2 This is a system architecture diagram of a scene-aware dynamic generation method for power intelligent agents according to an embodiment of this application. Figure 1 and Figure 2As shown, the scene-aware dynamic generation method for power intelligent agents according to an embodiment of this application includes the following steps: S1, performing sliding window truncation and temporal feature extraction on the acquired power grid physical operation data to obtain a micro-physical temporal feature vector; S2, using a base large language model, performing semantic encoding and continuous mapping on the macro-business instruction text data of the dispatch center to obtain a macro-business semantic intent tensor; S3, performing cross-modal feature cross-attention fusion and dual-drive requirement generation on the micro-physical temporal feature vector and the macro-business semantic intent tensor to obtain business and physical dual-drive intelligent agent requirements. Vector; S4, through a pre-trained super network model, the initial network structure and weight parameter matrix of the power agent are obtained by generating conditions with the dual-driven intelligent agent demand vector of business and physical as the target and performing a single forward inference decoding with the real-time available computing power and memory matrix of the edge nodes as hardware constraints; S5, by compiling the macro-business semantic intent tensor into target weight coefficients and penalty function boundaries, the reinforcement learning control evaluation layer of the initial network structure and weight parameter matrix of the power agent is dynamically rewarded and injected, and after instantiation and activation, an activated power agent with macro-business alignment capability is obtained.
[0015] Specifically, in S1, the acquired power grid physical operation data is truncated using a sliding window and time-series feature extraction to obtain a microscopic physical time-series feature vector. It should be understood that power grid physical operation data is the core information carrier reflecting the instantaneous operating status of the power system. Among these, the high-frequency waveform data of the transformer three-phase voltage carries fine-grained information reflecting system transient disturbances, harmonic distortion, and fault impacts, while the active power time-series matrix of feeder nodes characterizes the power flow distribution and load evolution trend of the distribution network over a longer time scale. However, such raw data generally suffers from inconsistent sampling frequencies, significant differences in dimensions, sensor noise, and measurement gaps during the acquisition process. Furthermore, the data stream is continuously generated in an unbounded manner, making it difficult to directly use as input for subsequent cross-modal cross-attention fusion and supernetwork conditional decoding. Against the backdrop of frequent alternations in complex operating conditions such as load mutations, fluctuations in new energy output, and fault disturbances, new power systems place stringent demands on the real-time adaptability of intelligent decision-making and control systems. Therefore, sliding window truncation and time-series feature extraction are performed on the acquired power grid physical operation data to transform continuous high-dimensional raw physical quantities into fixed-length, standardized, and information-condensed microscopic physical time-series feature vectors, thereby providing high-quality physical situational input for the generation of demand vectors for business and physical dual-driven intelligent agents.
[0016] In specific implementation, step 1.1 involves preprocessing and sliding window truncation of the high-frequency waveform data of the transformer's three-phase voltage and the active power time series matrix of the feeder nodes to obtain multi-dimensional physical state time slices. Specifically, in the data preprocessing stage, linear interpolation or front-and-back averaging methods are used to interpolate missing sampling points that may occur during the acquisition process. Outliers exceeding the physical reasonable range are removed according to the three-times-standard-deviation criterion and replaced with the neighborhood mean. Standardization is applied to address numerical scale differences caused by different physical dimensions. During execution, the mean and standard deviation of the observations for each channel are first estimated within the statistical window. Then, the channel mean is subtracted from the original observation value at each time point of the channel and divided by the channel standard deviation to normalize the data of each channel to a zero-mean, unit-variance distribution, thereby eliminating the scale disparity between voltage and power dimensions. After preprocessing, the multi-channel time series data is truncated along the time axis with a preset window length and sliding step size. Specifically, one window length is traced back from the current time, and the multi-channel observations at all time points within the window are organized into a two-dimensional matrix in row order and channel column order. The number of rows in the matrix is equal to the window length, and the number of columns is equal to the total dimension of the channels. Each time time advances by one step, a new slice is truncated, thereby dividing the continuous unbounded data stream into fixed-length multi-dimensional physical state time slices.
[0017] In step 1.2, long-distance temporal dependencies and high-frequency transient disturbance trend features are extracted from the multidimensional physical state time slices to obtain the hidden layer temporal feature tensor. Considering that the transient overshoot and oscillatory components contained in the high-frequency waveform of the transformer three-phase voltage require fine-grained local feature capture capabilities, while the trend changes and periodic patterns contained in the active power time series matrix of the feeder node require long-distance dependency modeling capabilities, therefore, in the embodiments of this application, a hybrid temporal encoder that integrates a one-dimensional convolution module and a multi-head self-attention mechanism is used to extract features from the time slices. One-dimensional convolutional branch slides along the time dimension with a small convolutional kernel, capturing local patterns of high-frequency transient perturbations through point-by-point multiplication and accumulation of the kernel with observations within a local time window. The multi-head self-attention branch first maps the input slice to a query matrix, key matrix, and value matrix using three independent linear projection matrices. Then, it performs a dot product operation on the transpose of the query and key matrices to obtain a similarity score between any two time points. This similarity score is then divided by a scaling factor equal to the square root of the key vector dimension to stabilize the numerical gradient. Subsequently, the similarity score is normalized along the key dimension using the Softmax function to obtain the attention weight distribution. Finally, the value matrix is weighted and summed using this weight distribution to obtain the attention branch output, thus achieving global modeling of long-distance dependencies between any two time points. Ultimately, the convolutional branch output and the attention branch output are concatenated along the channel dimension and fused through a feedforward network to obtain a hidden layer temporal feature tensor. This tensor simultaneously encodes the long-distance temporal dependencies and high-frequency transient perturbation trend features in the original slice.
[0018] In step 1.3, the hidden layer temporal feature tensor is subjected to sequence compression and spatial dimensionality reduction to obtain the microscopic physical temporal feature vector. In this process, firstly, attention-weighted pooling is performed on the hidden layer temporal feature tensor along the time axis. This involves first performing an inner product operation between a learnable attention scoring vector and the feature vector at each time step to obtain the original importance score for that time step. Then, the original importance scores for all time steps are normalized using Softmax to obtain differentiated attention weights. Subsequently, the feature vectors at each time step are weighted and summed using these attention weights to obtain the pooled global feature vector. Next, a linear transformation is performed on the pooled global feature vector using a linear projection matrix and a bias vector to achieve spatial dimensionality reduction, ultimately resulting in a microscopic physical temporal feature vector with controllable dimensionality and condensed information.
[0019] Specifically, S2, through a base-based large language model, performs semantic encoding and continuous mapping on the macro-level business instruction text data of the dispatch center to obtain a macro-level business semantic intent tensor. It should be understood that the macro-level business instruction text data of the dispatch center is the direct carrier of upper-level business intent in power system operation and management. Its content covers high-level business logic such as load dispatching strategies, reactive power compensation targets, fault recovery priorities, and renewable energy consumption constraints, and is issued by dispatchers or automated decision-making systems in the form of natural language text. However, natural language text is essentially composed of discrete character or word symbol sequences, and the semantic relationships, contextual dependencies, and intent levels between these discrete symbols cannot be directly processed by numerical computation systems. In the practical application of this application, the perception and understanding module in the power intelligent agent framework needs to process text data from the power system, such as equipment fault reports, operation manuals, maintenance logs, and dispatching instructions, through a natural language understanding engine. The intelligent agent needs to extract useful information from these data using natural language understanding technology and transform this complex text information into structured data that machines can understand and manipulate, providing accurate basis for subsequent decision-making. Therefore, in the embodiments of this application, the macro-business instructions are deeply semantically encoded by the base large language model, and the discrete symbol sequence is transformed into a macro-business semantic intent tensor containing rich contextual semantic information, thereby providing high-quality business intent-side input for the generation of business and physical dual-drive intelligent agent demand vectors.
[0020] Figure 3 This is a flowchart of step two in the scene-aware dynamic generation method for power intelligent agents according to an embodiment of this application. Figure 3 As shown, S2 includes: S2.1, performing discrete symbol continuous mapping and sequence position encoding injection on the macro-business instruction text data of the scheduling center to obtain a basic semantic vector space; S2.2, performing deep context feature extraction based on a self-attention mechanism on the basic semantic vector space to obtain a deep context feature tensor; S2.3, performing semantic space compression compilation on the deep context feature tensor to obtain a macro-business semantic intent tensor.
[0021] Specifically, in step S2.1, discrete symbol continuous mapping and sequence position encoding injection are performed on the macro-level business instruction text data of the dispatch center to obtain a basic semantic vector space. In this process, firstly, the macro-level business instruction text data of the dispatch center is segmented into a sequence of tokens using a word segmenter, with each token corresponding to a unique integer index in the vocabulary. Then, an embedding lookup table maps each discrete token index to a dense continuous vector of fixed dimension. Each row of this embedding lookup table corresponds to a learnable vector representation of a token in the vocabulary. The mapping process is based on directly retrieving the corresponding row vector from the embedding matrix using the token index as the row number, thereby transforming each token in the discrete symbol space into a point in the continuous vector space, completing the continuous mapping of discrete symbols. However, the embedding vector itself cannot represent the sequential positional relationship of tokens in the sequence, and differences in word order in the dispatch instruction text can lead to fundamental semantic changes. Therefore, position encoding information is further injected into the embedding vector of each token. During execution, a position vector with the same dimension as the embedding vector is generated for each position in the sequence. Even-dimensional positions are calculated using a sine function, and odd-dimensional positions using a cosine function. The frequencies of the sine and cosine functions decrease as the dimension index increases, resulting in different encoding patterns for different positions. The relative relationship between any two positions can be derived through linear transformation. The word embedding vector is added element-wise to the corresponding position encoding vector, ultimately yielding a basic semantic vector space that integrates semantic and positional information. This space is a two-dimensional matrix with the sequence length multiplied by the embedding dimension, where each row represents the initial representation of a word in the continuous semantic space.
[0022] Specifically, in step S2.2, deep contextual features are extracted from the basic semantic vector space using a self-attention mechanism to obtain a deep contextual feature tensor. In the embodiments of this application, the core architecture of the base large language model consists of multiple stacked Transformer encoder blocks. Each encoder block contains a multi-head self-attention sublayer and a feedforward network sublayer. The two sublayers are connected through residual connections and layer normalization. In this process, firstly, the basic semantic vector space is mapped to a query matrix, a key matrix, and a value matrix through three independent linear projection weight matrices. Then, the semantic relevance score between any two word positions in the sequence is obtained by performing a dot product operation on the transpose of the query matrix and the key matrix. This relevance score is then divided by a scaling factor equal to the square root of the key vector dimension to prevent the dot product value from being too large and causing the gradient of the Softmax function to vanish. Subsequently, the relevance score is normalized along the key dimension using the Softmax function to obtain the attention weight distribution. Finally, the value matrix is weighted and summed using this attention weight distribution to obtain the output of the self-attention sublayer. In other words, the self-attention computation described above is performed in parallel in multiple independent subspaces. Each attention head uses an independent projection matrix to capture different types of contextual association patterns from different semantic subspaces. The outputs of all attention heads are concatenated along the channel dimension and then fused back to the original dimension through a linear projection matrix. The output of the self-attention sub-layer is fed into the feedforward network sub-layer after residual connections and layer normalization. The feedforward network consists of two linear transformations sandwiching a nonlinear activation function. The first linear transformation expands the dimension to four times the hidden layer dimension to enhance the expressive capacity, and the nonlinear activation function introduces nonlinear mapping capabilities. The second linear transformation compresses the dimension back to the original embedding dimension. The output of the feedforward network sub-layer is also processed through residual connections and layer normalization to obtain the final output of the encoder block of that layer. The basic semantic vector space is sequentially passed through all encoder layers of the base large language model. Each layer further extracts deeper contextual semantic features based on the output of the previous layer. After processing by all encoder layers, a deep contextual feature tensor is obtained.
[0023] Specifically, in step S2.3, the deep context feature tensor is semantically compressed and compiled to obtain a macroscopic business semantic intent tensor. Although the deep context feature tensor contains rich global contextual semantic information, its sequence length dimension is the same as the number of lexical units in the original text. Direct use would introduce an excessively high computational load for subsequent cross-attention fusion, and not all lexical positions carry the same intent information density; many function words and modifier lexical units contribute little to the core business intent. Therefore, in the embodiments of this application, firstly, a learnable linear projection matrix is used to project the feature vector at each position in the deep context feature tensor from the original embedding dimension to the target compilation dimension space, changing the channel dimension to match the dimensional requirements of the key matrix and value matrix in the subsequent cross-modal cross-attention fusion module. Then, a semantic compression operation is performed along the sequence length dimension. Specifically, attention interaction is performed between a set of learnable semantic anchor vectors and the projected positional feature vectors. Each semantic anchor vector is used as a query and performs dot product attention calculation with all positional feature vectors to obtain the weighted aggregation vector corresponding to the anchor. Multiple semantic anchors focus on different dimensions of intent information in the scheduling instruction and perform aggregation operations in parallel. The aggregation results of all anchors are organized into a macro-business semantic intent tensor by rows. The number of rows in this tensor is equal to the number of semantic anchors, and the number of columns is equal to the target compilation dimension. Each row represents a condensed semantic representation of a certain dimension of business intent in the scheduling instruction text.
[0024] Specifically, in S3, cross-modal feature cross-attention fusion and dual-drive demand generation are performed on the micro-physical time-series feature vector and the macro-business semantic intent tensor to obtain a business and physical dual-drive agent demand vector. It should be understood that the micro-physical time-series feature vector describes the dynamic evolution of the underlying physical state of the power grid, while the macro-business semantic intent tensor expresses the high-level semantic intent at the scheduling business level. These two belong to completely different modal spaces and have heterogeneous feature distributions and semantic granularities. If the two are simply concatenated or linearly superimposed as the conditional input for agent generation, a fine-grained correspondence between physical state features and business semantic intent cannot be established. This results in the subsequently generated power agent being unable to accurately perceive the current physical operating status of the power grid or accurately align with the business objectives of the scheduling center. Therefore, in the technical solution of this application, a dynamic, content-related alignment and fusion channel is established between the physical modality and the business modality through a cross-attention mechanism. This enables the temporal features at the physical level to be selectively aggregated under the guidance and constraint of the business semantic intent. Ultimately, a business and physical dual-drive agent requirement vector is generated, which simultaneously encodes the physical state perception capability requirement and the business goal alignment requirement. This provides a semantically complete and modal-fused conditional input for the subsequent super-network model to decode the power agent parameters using this vector as the generation condition.
[0025] In specific implementation, in step 3.1, the micro-physical temporal feature vector is mapped to a cross-modal query matrix using independent linear projection weight matrices, and the macro-business semantic intent tensor is mapped to a cross-modal key matrix and a cross-modal value matrix, respectively. During this process, three sets of independent learnable linear projection weight matrices are set. The first set of query projection weight matrices acts on the micro-physical temporal feature vector, projecting it from the physical feature space to the query space required for cross-modal attention computation. Since the micro-physical temporal feature vector is a one-dimensional vector, it is expanded into a cross-modal query matrix adapted for multi-head attention computation after query projection. The second set of key projection weight matrices acts on each row of the macro-business semantic intent tensor, projecting it from the semantic compilation dimension to the key space. All rows, after projection, form the cross-modal key matrix. The third set of value projection weight matrices also acts on each row of the macro-business semantic intent tensor, projecting it to the value space. All rows, after projection, form the cross-modal value matrix.
[0026] In step 3.2, cross-attention fusion is performed on the cross-modal query matrix, cross-modal key matrix, and cross-modal value matrix to obtain the intent-constrained physical fusion vector. In this process, firstly, a dot product operation is performed on the transpose of the cross-modal query matrix and the cross-modal key matrix to calculate the semantic relevance score between the physical situation query and each business intent dimension. The physical meaning of this relevance score is to measure the degree of matching between the current power grid operation status and the business intent of each dimension. The higher the relevance score, the closer the association between the business intent of that dimension and the current physical situation. Then, the relevance score is divided by a scaling factor equal to the square root of the key vector dimension to stabilize the numerical range and prevent the dot product value from being too large, causing the output of the Softmax function to approach a one-hot distribution and lose the ability to comprehensively perceive multi-dimensional intents. Next, the scaled relevance score is normalized along the key dimension by the Softmax function to obtain the cross-modal attention weight distribution. Each element of this distribution represents the importance weight that the corresponding business intent dimension should be assigned under the constraints of the current physical situation. Finally, the cross-modal value matrix is weighted and summed using this cross-modal attention weight distribution, and the content information of each dimension of business intent is aggregated according to its relevance to the current physical situation to obtain the intent-constrained physical fusion vector.
[0027] In step 3.3, the intention-constrained physical fusion vector is subjected to nonlinear mapping and standardization of the demand index space to obtain the demand vector of the business and physical dual-driven agent. During this process, the intention-constrained physical fusion vector is input into the feedforward network. The first-layer linear transformation projects the intention-constrained physical fusion vector from the attention output dimension to a higher-dimensional intermediate hidden space to enhance the nonlinear fitting ability. The nonlinear activation function uses the GELU function to perform an element-wise nonlinear transformation on the intermediate hidden vector to introduce a nonlinear decision boundary. The second-layer linear transformation compresses the intermediate hidden vector from the high-dimensional space to the target demand index dimension, finally obtaining the original demand vector after nonlinear mapping. Subsequently, L2 standardization is performed on the original demand vector. Specifically, each element of the original demand vector is divided by its own L2 norm, so that the standardized vector falls on the unit hypersphere, eliminating numerical scale fluctuations introduced by differences in modulus between different samples, and finally outputting the demand vector of the business and physical dual-driven agent.
[0028] Specifically, in step S4, a pre-trained hypernetwork model is used to generate conditions based on the dual-drive intelligent agent demand vector (both business and physical) and performs a single forward inference decoding with the real-time available computing power and memory matrix of edge nodes as hardware constraints, thereby obtaining the initial network structure and weight parameter matrix of the power intelligent agent. It should be understood that in practical applications of this application, the computing power and storage resources of power system edge computing nodes exhibit significant heterogeneity. Distribution-side monitoring equipment is often embedded in switchgear or outdoor ring network boxes in substations, typically equipped with dual-core processors and hundreds of megabytes of memory resources. Especially for edge-side power intelligent agents, they face problems such as limited computing resources and insufficient storage capacity. Therefore, the network structure and parameter scale of the intelligent agent not only need to meet functional requirements but also must adapt to the real-time available computing power and memory constraints of the target edge nodes; otherwise, the generated model will be undeployable due to exceeding the hardware's carrying capacity. Traditional intelligent agent construction methods rely on offline pre-training and static deployment, i.e., pre-training a fixed-scale intelligent agent model for typical scenarios and then deploying it to edge nodes to perform inference tasks. This approach cannot dynamically adjust the intelligent agent structure according to real-time changes in the scenario, resulting in system lag and inaccurate decision-making when facing sudden operating conditions. Therefore, in the technical solution of this application, the intelligent agent is generated with the dual-driven intelligent agent demand vector of business and physical requirements as the target generation condition to ensure that the generated intelligent agent has scenario adaptability. The real-time available computing power and memory matrix of the edge node are used as hardware constraints to ensure that the generated intelligent agent can actually run on the target device. Parameter generation is completed in milliseconds through a single forward inference decoding method, avoiding the long computational overhead required by traditional iterative training methods. This achieves adaptive matching between the power intelligent agent architecture and the operating scenario, allocates computing and communication resources on demand, and significantly shortens the cold start time.
[0029] Figure 4This is a flowchart of step four in the scene-aware dynamic generation method for power intelligent agents according to an embodiment of this application. Figure 4 As shown, in the first embodiment of this application, step S4 includes: S4.1, performing joint conditional latent space mapping on the business and physical dual-drive intelligent agent demand vector and the real-time available computing power and memory matrix of edge nodes to obtain a joint generated conditional feature representation; S4.2, performing information dimensionality reduction folding and generation intensity control parameter estimation on the joint generated conditional feature representation to obtain the super network latent space addressing control flow; S4.3, performing a single forward inference decoding on the super network latent space addressing control flow to obtain the initial network structure and weight parameter matrix of the power intelligent agent.
[0030] Specifically, in S4.1, a joint conditional latent space mapping is performed on the business and physical dual-drive intelligent agent demand vector and the real-time available computing power and memory matrix of edge nodes to obtain a jointly generated conditional feature representation. In this process, the real-time available computing power and memory matrix of edge nodes is first flattened into a one-dimensional vector. Then, this one-dimensional hardware constraint vector and the business and physical dual-drive intelligent agent demand vector are concatenated, and the information from the two different semantic domains is simply aggregated at the dimensional level to obtain the concatenated joint input vector. Next, this joint input vector is nonlinearly mapped through a conditional encoder composed of multiple fully connected layers. The conditional encoder contains alternating stacks of multiple linear transformation layers and nonlinear activation layers, performing spatial transformation and feature interaction on the concatenated joint input vector layer by layer. This allows for deep cross-fusion of information from the functional requirement dimension and the hardware constraint dimension in the hidden layers, ultimately outputting a jointly generated conditional feature representation. Specifically, the calculation process of the joint conditional latent space mapping can be represented as follows:
[0031] in, This is a vector of intelligent agent requirements driven by both business and physical needs. A matrix of real-time available computing power and memory for edge nodes. For matrix flattening operation, This is a vector concatenation operation. It is a multi-layer fully connected conditional encoder network. This is the joint generation conditional feature representation of the output.
[0032] Specifically, in S4.2, information dimensionality reduction and folding, along with generation intensity control parameter estimation, are performed on the joint generation conditional feature representation to obtain the latent space addressing control flow of the supernetwork. In this process, a bottleneck layer structure is used to compress the dimension of the joint generation conditional feature representation. This bottleneck layer first maps the joint generation conditional feature representation from a higher dimension to a lower dimension bottleneck space through a linear transformation, forcing the network to condense the most critical generation control information into a finite dimension. Subsequently, a nonlinear activation function is introduced to introduce nonlinear expressive power. Generation intensity control parameter estimation predicts a set of scalar control parameters from the bottleneck space representation through an independent linear projection head. These control parameters determine the activation level and combination amplitude of the basis function dictionary during subsequent parameter decoding, thereby indirectly controlling the effective number of parameters and computational complexity of the generated agent network. The bottleneck space representation and generation intensity control parameters together constitute the latent space addressing control flow of the supernetwork.
[0033]
[0034]
[0035] in, and These are the weight matrix and bias vector for the linear transformation of the bottleneck layer, respectively. It is a non-linear activation function. The bottleneck space representation after information dimensionality reduction and folding. and These are the weight matrix and bias vector for generating the intensity control parameter estimation head, respectively. To generate the intensity control parameter vector, This is the final output hypernetic latent space addressing control flow.
[0036] Specifically, in S4.3, a single forward inference decoding is performed on the latent space addressing control flow of the supernetwork to obtain the initial network structure and weight parameter matrix of the power agent. Specifically, the supernetwork's main generator function pre-stores a basis function dictionary obtained through offline pre-training with a large amount of historical power scenario data. This dictionary contains a set of basis function matrices applicable to different network layers and functional modules, each representing a typical parameter pattern or weight structure prototype. In this process, using the latent space addressing control flow of the supernetwork as input, corresponding combination coefficients are generated for each basis function matrix in the basis function dictionary. Then, all basis function matrices are weighted linearly combined according to their respective combination coefficients, and assembled in one go to form all layer weight parameters of the target agent network. Specifically, the calculation process of a single forward inference decoding can be expressed as follows:
[0037] in, For the pre-trained supernetwork main generator function, For the control flow of latent space addressing in hypernets, This represents the total number of basis function matrices in the basis function dictionary. The first, dynamically generated by the parameter decoding operator using the latent space addressing control flow of the supernetwork as input. The combination coefficients corresponding to the basis functions. For the first in the dictionary of basis functions A pre-trained basis function matrix This is the initial network structure and weight parameter matrix for the final output power agent. This parameter matrix contains the weight parameters of all network layers of the target agent and the connection topology information between each layer, which can be directly loaded into the edge computing container for subsequent reward shaping and instantiation activation.
[0038] Specifically, as described above, in the parameter generation stage of the power agent based on the supernetwork, sub-step S4.3 of the first embodiment adopts a one-time flat decoding strategy: the supernetwork latent space addressing control flow is directly input as an independent variable into the supernetwork main generating function, and multiplied by the parameter decoding operator and the basis function dictionary through a one-time direct mapping, bypassing all intermediate transition calculations, to output the complete initial network structure and weight parameter matrix of the power agent in one go. The implicit assumption of this design is that the basis functions pre-set for each layer in the supernetwork basis function dictionary are independent of each other, and there is no structural relationship between the parameter spaces of each layer that needs to be explicitly maintained.
[0039] However, the lightweight sub-network generated by the power intelligent agent is essentially a multi-layered cascaded signal processing path - the front-end layer is responsible for extracting the physical state characteristics of the power grid (such as extracting transient components from the high-frequency waveform of the three-phase voltage of the transformer), the middle layer is responsible for situation assessment (such as determining whether the power offset of the feeder node is a precursor to a trend fault), and the end layer is responsible for control action output (such as generating reactive power compensation commands or load shedding decisions).
[0040] In this multi-layered cascaded structure, there is an objective spectral radius coupling constraint relationship between the weight matrices of adjacent layers: the spectral radius (absolute value of the largest singular value) of the weight matrices of adjacent layers must satisfy a specific attenuation ratio or matching condition. When the ratio of the spectral radii of adjacent layers deviates from the safe range, the physical state signal of the power grid will be exponentially amplified (when the spectral radius is much greater than 1) or collapse and disappear (when the spectral radius is much less than 1) during the forward transmission between layers. In the scenario of power control, which has extremely stringent stability requirements, the consequences of spectral radius mismatch are extremely serious: for example, when power is restored at the moment of a short-circuit fault in the distribution network feeder, the three-phase voltage of the transformer experiences a severe transient recovery overshoot. If the spectral radius of the weight matrix of the intermediate evaluation layer inside the agent is significantly amplified relative to the front-end feature extraction layer, the transient signal will be further exponentially amplified after inter-layer transmission. Based on this, the end control layer generates an overcompensated reactive power output command, triggering frequent switching of capacitor banks and even causing malfunctions of protection devices.
[0041] In the first embodiment, the basis functions of each layer of the basis function dictionary are obtained through independent pre-training, and the parameter decoding operator does not distinguish the order of the layers when mapping the parameter spaces of each layer. This means that the generation of the first layer... The layer parameters are completely unaware of the first layer. The spectral structure features of the generated parameters of the layers are such that there is no explicit dynamic constraint transfer channel between the two layers.
[0042] To address the aforementioned deficiencies, this application further proposes a second embodiment.
[0043] Specifically, firstly, based on the hierarchical sub-control vectors and corresponding layer basis function dictionaries, a layer-by-layer progressive parameter decoding is performed on the latent space addressing control flow of the supernetwork to obtain the hierarchical original weight parameter sequence. The layers of the power intelligent agent subnetwork have fundamentally different functional orientations. The receptive field and filtering characteristics of the front-end layer determine the initial expression form of the physical signal, while the output space of the end layer directly constrains the amplitude range of the control command. If the parameters of each layer are still decoded indiscriminately using the same control vector, it will be impossible to provide independent, layer-by-layer analyzable objects for subsequently introducing inter-layer constraints.
[0044] To this end, the latent space addressing control flow of the hypernetwork is first uniformly divided according to the number of layers of the target subnetwork to obtain the sub-control vectors corresponding to each layer. Then, following the causal temporal logic from the input layer to the output layer, the sub-control vectors of each layer are sequentially input into the parameter decoding operator of the corresponding layer. Through weighted linear combination mapping with the basis functions in the basis function dictionary of that layer, the basic weight matrix of each layer is progressively decoded. The basic weight matrices of each layer are organized in order according to the layer sequence index to form a complete sequence of original weight parameters for each layer. After this step, each layer weight matrix has an independent and clear spectral structure identifier, providing a layer-by-layer operable analytical basis for the next step of introducing inter-layer coupling correction, while avoiding the disordered mixing of parameters in the spectral structure of each layer during overall decoding.
[0045] The process of layer-by-layer parameter decoding is represented as follows:
[0046] in, Indicates the first The original base weight matrix obtained by layer decoding, i.e., the first layer in the original weight parameter sequence of the layer, is... One element; Indicates the first The total number of basis functions in the layer basis function dictionary; Indicates the first Layer The combination coefficients corresponding to each basis function are dynamically generated from the sub-control vectors; The first segment obtained from the latent space addressing control flow of the hypernetic network represents the... Layer control vector; Indicates the first The first layer of the basis function dictionary A pre-trained basis function matrix. It should be noted that this formula is essentially a basis expansion and reconstruction of the parameter space of each layer, with combination coefficients... The generation is driven by independent sub-control vectors for each layer, ensuring parameter independence between layers during the decoding stage.
[0047] Next, inter-layer spectral coupling consistency correction is performed on the original layered weight parameter sequence to obtain the spectral coupling corrected layered weight parameter sequence. After layer-by-layer decoding, although each layer parameter has an independent spectral feature identifier, there may still be a significant mismatch between the spectral radii of adjacent layer weight matrices because the basis function dictionary did not consider the physical stability constraints of signal transmission in the power control path during the pre-training stage.
[0048] In actual power grid operation, for example, when a sudden change in the output of new energy causes a step jump in the active power timing matrix of the feeder node, if the ratio of the spectral radius of any adjacent layer exceeds the safe threshold range during the process of the jump signal being transmitted from the front-end feature layer to the end control layer, the signal amplitude will suddenly amplify or rapidly attenuate at that point, ultimately causing the control action output by the intelligent agent to lose its physical rationality.
[0049] To eliminate this risk, the spectral radius of the original weight matrix of each layer in the hierarchical original weight parameter sequence is quickly estimated using the power iteration method. Specifically, an iteration vector is randomly initialized, and the multiplication of the weight matrix with this vector is repeatedly performed and normalized. After a finite number of iterations, the vector converges to the principal eigendirection, and the L2 norm of the product is then an approximation of the spectral radius.
[0050] The process of estimating the spectral radius is expressed as follows:
[0051] in, Indicates the first The estimated spectral radius of the original weight matrix of the layer; This represents the principal eigendirection vector after multiple iterations and convergence in the power iteration method; This represents the Euclidean norm of a vector.
[0052] Then, iterate through all adjacent layer pairs and calculate the first... Layer and First The ratio of the spectral radii of adjacent layers is calculated and compared with a preset threshold range for stable transmission of power control signals. When the ratio of the spectral radii of an adjacent layer pair exceeds the stability threshold range, spectral normalization scaling correction is performed on the original weight matrix of that layer. The calculation process for correction is expressed as follows:
[0053] in, This indicates the 1st spectral normalization correction. The weight matrix of the layer, i.e., the first layer in the sequence of layer weight parameters after spectral coupling correction. One element; This represents the target spectral radius value preset based on the requirements for stable transmission of power control signals.
[0054] It should be noted that this scaling operation only changes the overall energy scale of the weight matrix without altering its internal directional structure. Therefore, while correcting the spectral radius mismatch, it preserves the functional semantics of each layer in terms of feature extraction or control output. After pairwise correction, the corrected weight matrices of all layers are reorganized in their original order, outputting a sequence of corrected layer weight parameters coupled with the output spectrum. This correction process ensures that when the power grid physical state signal flows from the sensing front-end layer through the intermediate evaluation layer to the end control action layer, the signal amplitude will not experience exponential amplification or collapse due to inter-layer spectral structure mismatch, fundamentally guaranteeing the physical stability of the generated agent's control output.
[0055] Furthermore, the hierarchical weight parameter sequence after spectral coupling correction is assembled into a global parameter matrix to obtain the initial network structure and weight parameter matrix of the power agent. Here, it should be understood that after completing the inter-layer spectral coupling consistency correction, the parameters of each layer exist in the form of a discrete sequence and have not yet formed a standardized model file that can be directly loaded and run by the edge computing container. To ensure seamless integration of subsequent instantiation and hot activation processes, the corrected weight matrices of each layer in the hierarchical weight parameter sequence after spectral coupling correction need to be assembled diagonally in blocks according to the layer index from layer 1 to layer L, while simultaneously writing the connection topology descriptors between each layer (including the input and output dimensions of each layer and activation function type markers), and uniformly encapsulating them into a complete initial network structure and weight parameter matrix of the power agent.
[0056] The global assembly process is represented as follows:
[0057] in, This represents the initial network structure and weight parameter matrix of the final assembled power intelligent agent; This represents the ordered set of all corrected weight matrices from layer 1 to layer L, i.e., the sequence of layer weight parameters after spectral coupling correction; L represents the total number of layers in the target subnetwork. Represents the topology descriptor for connections between layers; This indicates block diagonal matrix assembly and topology descriptor encapsulation operations.
[0058] After this step, the discrete, layer-by-layer correction parameters are integrated into a unified parameter file that can be directly injected into the edge container memory, achieving format-level integration with subsequent reward shaping and thermal activation processes.
[0059] In summary, by introducing a layer-by-layer progressive decoding and inter-layer spectral radius coupling consistency correction mechanism, the ratio of the spectral radii of the weight matrices of each adjacent layer of the generated power intelligent agent sub-network is explicitly constrained within a preset stable threshold range. This ensures the bounded amplitude and monotonically decaying characteristics of the power grid physical state signal in the multi-layer cascaded transmission path, effectively avoiding control command oscillations caused by exponential amplification of inter-layer signals or control response failures caused by signal collapse in power control scenarios.
[0060] Compared with the one-time flat decoding method of the first embodiment, the second embodiment achieves structural-level protection of the stability of signal transmission within the sub-network without significantly increasing the computational load of edge node derivation (the power iteration method only requires a finite number of matrix-vector multiplications). This enables the dynamically generated power agent to still output control actions with reasonable amplitude and physical executable behavior when facing extreme conditions such as feeder short-circuit recovery overshoot and sudden changes in new energy output. This significantly improves the robustness and engineering reliability of the dynamic generation method of power agents in actual power grid deployment.
[0061] Specifically, in S5, by dimensionality reduction and compilation of the macro-level business semantic intent tensor into target weight coefficients and penalty function boundaries, dynamic reward shaping and injection are performed on the reinforcement learning control evaluation layer of the initial network structure and weight parameter matrix of the power agent. After instantiation and activation, an activated power agent with macro-level business alignment capabilities is obtained. It should be understood that although the initial network structure and weight parameter matrix of the power agent have generated complete network parameters according to scenario requirements and hardware constraints, this parameter matrix is obtained by a one-time decoding of a pre-trained supernetwork based on a weighted combination of the basis function dictionary. The reward function parameters used by the reinforcement learning control evaluation layer (i.e., the Critic network part used to evaluate action value or state value) are still the default values preset in the basis function dictionary, and have not yet been customized for the specific macro-level business instructions. In the practical application of this application, the execution and feedback modules in the power agent framework ensure a closed loop throughout the entire task execution process, enabling the agent to continuously optimize its decisions and behaviors. The core role of the feedback mechanism is to help the agent evaluate its performance after task execution and adjust accordingly based on the evaluation results. The ReAct framework further enhances the flexibility and adaptability of decision-making by alternating between reasoning and action. The agent does not arrive at a final decision all at once, but first performs reasoning to generate a preliminary scheduling strategy and then executes related operations. During execution, the agent continuously adjusts its strategy based on system feedback and new information, achieving dynamic optimization. However, if the agent's reward evaluation criteria are inconsistent with the macro-level business instructions issued by the current scheduling center, the agent's strategy optimization direction during execution will deviate from the business objective. For example, when the scheduling instruction requires prioritizing the continuity of power supply to important loads, if the agent's reward function still takes minimizing global line loss as its sole optimization objective, the generated control actions will fail to meet the business priority requirements. Therefore, in the embodiments of this application, a compilation mapping channel is established from macro-level business semantic intent to reinforcement learning reward function parameters. The business semantic intent encoded by the base large language model in step two is translated into numerical reward shaping parameters that the agent's reinforcement learning control evaluation layer can directly execute. This ensures that the generated agent's strategy optimization direction remains aligned with the current macro-level business instructions during subsequent interactions with the environment.
[0062] In specific implementation, in step 5.1, reinforcement learning is used to control scalar translation and compilation of the macro-level business semantic intent tensor to obtain the target weight coefficients and the penalty function boundary set. In this process, firstly, global average pooling is performed along the row dimension of the macro-level business semantic intent tensor to compress it into a one-dimensional semantic summary vector. Then, this semantic summary vector is input into a dedicated scalar translation and compilation network. This scalar translation and compilation network consists of alternating layers of fully connected layers and nonlinear activation layers. Its output layer is divided into two independent projectors: the first projector outputs a target weight coefficient vector, where each element corresponds to the weight value of a sub-target component in the reward function. Softmax normalization ensures that the sum of all sub-target weights is 1, thus forming an effective multi-target weight allocation scheme. The second projector outputs a penalty function boundary vector, where each element corresponds to the penalty trigger threshold of a constraint condition. The sigmoid activation function maps it to a preset reasonable range of physical dimensions. Specifically, the calculation process of scalar translation and compilation can be represented as follows:
[0063]
[0064]
[0065]
[0066] in, For macro-level business semantic intent tensors, For global average pooling along the row dimension, This is the semantic summary vector after pooling. and To compile the weight matrix and bias vector of the hidden layer of the scalar translation network, It is a non-linear activation function. For hidden layer feature vectors, and The weight matrix and bias vector of the projection head are the target weight coefficients. The output is the target weight coefficient vector. For activation function, and The weight matrix and bias vector of the boundary projection head of the penalty function are given. The default scaling factor for the maximum physical dimension of the penalty boundary. This is the boundary vector of the output penalty function. Wherein, the target weight coefficient vector... With the boundary vector of the penalty function Together they constitute the target weight coefficient and the boundary set of the penalty function.
[0067] In step 5.2, based on the target weight coefficients and the boundary set of the penalty function, the reward function of the reinforcement learning control evaluation layer of the initial network structure and weight parameter matrix of the power agent is dynamically rewritten and the weight parameters are injected and covered to obtain the agent's policy parameter matrix after reward shaping. In the practical application of this application, a hierarchical control unit is adopted. The upper-layer optimization control module constructs a linear programming model to provide an initial scheduling scheme, and the lower-layer reinforcement learning control module uses a deep deterministic policy gradient algorithm to finely adjust the scheme, significantly improving the system's fault tolerance and reliability. In this process, the reward function is dynamically rewritten and the corresponding weight parameters are injected and covered for the reinforcement learning control evaluation layer (i.e., the Critic network part, the network layer responsible for evaluating the value of state-action pairs) in the initial network structure and weight parameter matrix of the power agent. Specifically, the agent's original general default reward function is replaced with a customized reward function parameterized by the target weight coefficients and the boundary set of the penalty function, so that when the agent interacts with the power grid environment in the future, its value evaluation criteria will strictly follow the multi-objective weight allocation and constraint violation penalty rules stipulated by the current macro-business instructions. The dynamically rewritten reward function is a composite reward function consisting of a weighted sum of multiple sub-objective reward components and a superposition of multiple constraint penalty terms. Each sub-objective reward component is weighted by the corresponding element in the objective weight coefficient vector. Each constraint penalty term is activated and generates a negative penalty signal when the state variable exceeds the threshold specified by the corresponding element in the penalty function boundary vector. Specifically, the dynamically rewritten reward function can be expressed as:
[0068] in, For environmental conditions, For agent actions, For the number of sub-targets, The first of the target weight coefficient vectors The element is the th element The weight values of each sub-objective, For the first The original reward component function for each sub-objective, To limit the number of penalty items, For the first The penalty intensity coefficient for each penalty item For the first The function of the quantity of violation of a constraint condition. The first boundary vector of the penalty function The element is the th element The penalty trigger threshold for each constraint condition. This is the dynamically rewritten reward shaping function. After the reward function is rewritten, the parameter values corresponding to this reward function are physically injected into the corresponding weight positions of the reinforcement learning control evaluation layer in the initial network structure and weight parameter matrix of the power agent.
[0069] Furthermore, the reward weight register region of the reinforcement learning control evaluation layer in the initial network structure and weight parameter matrix of the power agent is located. The target weight coefficient vector is directly overwritten into the parameter position used to store the sub-objective weighting coefficients in this region, and the penalty function boundary vector is directly overwritten into the parameter position used to store the constraint penalty threshold in this region, thereby completing the physical-level parameter replacement of the evaluation layer reward criterion. After the dynamic rewriting of the reward function and the weight parameter injection overwriting, the parameters of the policy network (Actor network) in the initial network structure and weight parameter matrix of the power agent remain unchanged, while the reward function parameters of the control evaluation layer (Critic network) have been customized and replaced with a version aligned with the current macro-level business instructions. Together, they constitute the reward-shaped agent policy parameter matrix.
[0070] In step 5.3, the reward-shaped agent policy parameter matrix is instantiated, deployed, and system-level hot-activated to obtain an activated power agent with macro-level business alignment capabilities. In this process, firstly, the reward-shaped agent policy parameter matrix is serialized and encapsulated according to a standardized model file format, including weight parameters for each layer, connection topology descriptors, activation function type markers, and the injected reward function parameter configuration. Then, the serialized parameter file is written to the runtime memory space of the target edge node through the model loading interface of the edge computing container, completing the physical transfer and memory mapping of model parameters from the generation side to the execution side. After parameter loading is complete, the agent's inference process is started through a system-level process initialization instruction. Upon startup, this process reads the policy parameter matrix loaded into memory and constructs a complete forward inference computation graph. Simultaneously, it initializes the data channels between the agent and the power grid environment interface (including state observation input interfaces and control action output interfaces) and binds the reward shaping function to the value calculation loop of the reinforcement learning control evaluation layer. The hot activation process requires no additional training or parameter updates to the agent. Simply loading parameters and starting the process allows the agent to immediately enter a ready-to-run state, capable of receiving environmental inputs and outputting control actions. After instantiation, deployment, and system-level hot activation, an activated power agent with macro-level business alignment capabilities is obtained. This agent can then generate physically executable control actions according to the multi-objective optimization direction and constraints specified by the current macro-level business instructions during subsequent interactions with the power grid environment. Furthermore, it continuously optimizes its own strategy through a built-in reward shaping mechanism.
[0071] In summary, the scene-aware dynamic generation method for power intelligent agents according to the embodiments of this application is explained. It characterizes the microscopic physical situation by extracting sliding window temporal features from the physical operation data of the power grid, semantically encodes macroscopic business instructions from the dispatch center using a base-based large language model to capture top-level business intent, and then introduces a cross-modal cross-attention mechanism to deeply fuse physical temporal features with business semantic tensors, generating an intelligent agent demand vector that possesses both physical perception and business alignment attributes. This vector serves as the target condition, with the real-time computing power and memory matrix of edge nodes as hardware constraints, driving a pre-trained hypernetwork model to complete a single forward inference decoding. Finally, the macroscopic business semantics are dimensionality-reduced and compiled into reward shaping parameters, which are then injected into the reinforcement learning control evaluation layer. This approach improves the physical stability and business alignment of parameter generation, enhancing the flexibility and engineering reliability of multi-agent systems under complex power grid conditions.
[0072] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for dynamically generating power intelligent agents based on scene perception, characterized in that, include: Step 1: Perform sliding window truncation and time series feature extraction on the acquired power grid physical operation data to obtain the microscopic physical time series feature vector; Step 2: Using the base large language model, perform semantic encoding and continuous mapping on the macro-business instruction text data of the dispatch center to obtain the macro-business semantic intent tensor; Step 3: Perform cross-modal feature cross-attention fusion and dual-drive requirement generation on the micro-physical temporal feature vector and macro-business semantic intent tensor to obtain the business and physical dual-drive agent requirement vector; Step 4: Using a pre-trained hypernetwork model, the initial network structure and weight parameter matrix of the power agent are obtained by generating conditions with the business and physical dual-drive intelligent agent demand vector as the target and performing a single forward inference decoding with the real-time available computing power and memory matrix of the edge nodes as hardware constraints. Step 5: By compiling the macro-business semantic intent tensor into target weight coefficients and penalty function boundaries, dynamic reward shaping and injection are performed on the reinforcement learning control evaluation layer of the initial network structure and weight parameter matrix of the power agent. After instantiation and activation, an activated power agent with macro-business alignment capability is obtained.
2. The method for dynamically generating power intelligent agents based on scene perception according to claim 1, characterized in that, The power grid physical operation data includes high-frequency waveform data of transformer three-phase voltage and time-series matrix of active power at feeder nodes.
3. The method for dynamically generating power intelligent agents based on scene awareness according to claim 2, characterized in that, Step one includes: Step 1.1: Perform data preprocessing and sliding window truncation on the high-frequency waveform data of the three-phase voltage of the transformer and the active power time sequence matrix of the feeder node to obtain multi-dimensional physical state time slices; Step 1.2: Extract long-distance temporal dependencies and high-frequency transient disturbance trend features from the multidimensional physical state time slices to obtain the hidden layer temporal feature tensor; Step 1.3: Perform sequence compression and spatial dimensionality reduction on the hidden layer temporal feature tensor to obtain the microscopic physical temporal feature vector.
4. The method for dynamically generating power intelligent agents based on scene perception according to claim 1, characterized in that, Step two includes: Step 2.1: Perform discrete symbol continuous mapping and sequence position encoding injection on the macro-business instruction text data of the dispatch center to obtain the basic semantic vector space; Step 2.2: Extract deep context features from the basic semantic vector space using a self-attention mechanism to obtain the deep context feature tensor; Step 2.3: Perform semantic space compression compilation on the deep context feature tensor to obtain the macro-level business semantic intent tensor.
5. The method for dynamically generating power intelligent agents based on scene awareness according to claim 1, characterized in that, Step three includes: Step 3.1: Map the microscopic physical time-series feature vector to a cross-modal query matrix using an independent linear projection weight matrix, and map the macroscopic business semantic intent tensor to a cross-modal key matrix and a cross-modal value matrix, respectively. Step 3.2: Perform cross-attention fusion on the cross-modal query matrix, cross-modal key matrix, and cross-modal value matrix to obtain the intent-constrained physical fusion vector; Step 3.3: Perform nonlinear mapping and standardization of the demand index space on the intention-constrained physical fusion vector to obtain the demand vector of the business and physical dual-driven intelligent agent.
6. The method for dynamically generating power intelligent agents based on scene awareness according to claim 1, characterized in that, Step four includes: Step 4.1: Perform joint conditional latent space mapping on the business and physical dual-drive intelligent agent demand vector and the real-time available computing power and memory matrix of edge nodes to obtain a joint generated conditional feature representation; Step 4.2: Perform information dimensionality reduction folding and generation intensity control parameter estimation on the joint generation condition feature representation to obtain the latent space addressing control flow of the supernetwork; Step 4.3: Perform a single forward derivation decoding on the super network latent space addressing control flow to obtain the initial network structure and weight parameter matrix of the power agent.
7. The method for dynamically generating power intelligent agents based on scene perception according to claim 1, characterized in that, Step five includes: Step 5.1: Perform reinforcement learning control scalar translation compilation on the macro-business semantic intent tensor to obtain the target weight coefficients and the set of penalty function boundaries; Step 5.2: Based on the target weight coefficients and the boundary set of the penalty function, the reward function of the reinforcement learning control evaluation layer of the initial network structure and weight parameter matrix of the power agent is dynamically rewritten and the weight parameters are injected and covered to obtain the agent policy parameter matrix after reward shaping. Step 5.3: Instantiate and deploy the reward-shaped agent strategy parameter matrix and perform system-level hot activation to obtain an activated power agent with macro-business alignment capabilities.
8. The method for dynamically generating power intelligent agents based on scene awareness according to claim 1, characterized in that, Step 4.3 includes: Step 4.3.1: Based on the hierarchical sub-control vectors and the corresponding layer basis function dictionary, perform progressive parameter decoding on the latent space addressing control flow of the supernetwork to obtain the hierarchical original weight parameter sequence; Step 4.3.2: Perform inter-layer spectral coupling consistency correction on the original layered weight parameter sequence to obtain the spectral coupling corrected layered weight parameter sequence; Step 4.3.3: Perform global parameter matrix assembly on the hierarchical weight parameter sequence after spectral coupling correction to obtain the initial network structure and weight parameter matrix of the power agent.
