A power market demand response decision support method based on voltage fluctuation monitoring
Patent Information
- Application Number
- CN202611246441.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-09-22
AI Technical Summary
[0003]现有技术在需求响应决策过程中,电压波动数据与市场主体响应数据之间的关联利用不足,难以根据电压波动变化过程动态调整需求响应匹配结果
[0052](1)本发明通过采集电压运行数据和需求响应业务数据,结合响应状态切换时刻划分连续时间处理区间,使需求响应分析过程能够关联电压波动变化和市场主体响应状态变化,提高了需求响应任务识别的准确性。
Smart Images

Figure CN122801335A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power market decision-making technology, and in particular to a power market demand response decision support method based on voltage fluctuation monitoring. Background Technology
[0002] With the continuous improvement of the electricity market trading mechanism, demand response, as an important means for market participants to regulate electricity resources, is gradually being applied to electricity market operation and management. Existing demand response decision-making methods mainly rely on market participant declarations, historical response records, and grid operation status data to screen eligible market participants and formulate dispatch plans based on response capacity and response time. Some methods incorporate data analysis models to predict historical response behavior, improving the efficiency of demand response resource matching.
[0003] Existing technologies in demand response decision-making fail to adequately utilize the correlation between voltage fluctuation data and market participant response data, making it difficult to dynamically adjust demand response matching results based on voltage fluctuation changes. Traditional methods often employ fixed time windows to analyze response data, failing to accurately reflect the impact of changes in market participant response status on continuous-time feature evolution. Deep learning-based demand response forecasting methods typically output matching results through a single model inference, lacking a process for real-time updating of demand status and available resource status based on allocated response capacity, leading to discrepancies between the response resource allocation process and actual market changes.
[0004] Therefore, how to provide a power market demand response decision support method based on voltage fluctuation monitoring is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose a power market demand response decision support method based on voltage fluctuation monitoring. This invention utilizes voltage fluctuation monitoring, continuous-time data processing, and demand response resource matching technology to dynamically analyze the voltage change process, the response status of market participants, and the available response capacity. By improving the ContiFormer model to construct a state-switching driven continuous-time attention calculation process, it achieves iterative matching and capacity allocation of demand response resources, possessing the advantages of accurate response matching, high resource utilization, and strong decision adaptability.
[0006] A power market demand response decision support method based on voltage fluctuation monitoring according to an embodiment of the present invention includes the following steps:
[0007] Collect node voltage data and demand response service data, and preprocess them to generate demand response time-series data;
[0008] Identify voltage fluctuation ranges from demand response time-series data, generate demand response tasks based on the time correspondence between voltage fluctuation ranges and historical response records, and extract historical response sequences and current response statuses of market participants.
[0009] An improved ContiFormer is constructed, which encodes the demand response task as a Query, encodes the historical response sequence of market entities as the initial states of Key and Value, introduces the Query at the same time during the solution of the ordinary differential equations of Key and Value, updates the hidden states of Key and Value, and generates continuous Key representation and continuous Value representation.
[0010] Extract the response state switching time from the historical response sequence of market entities, terminate the integration of the corresponding ordinary differential equation when the response state switches, reinitialize the Key hidden state and Value hidden state according to the switched response state, continue integration from the response state switching time, and generate piecewise continuous Key representation and piecewise continuous Value representation.
[0011] The continuous-time attention integration interval is divided according to the response state switching time. Continuous-time attention calculation is performed on Query, segmented continuous key representation and segmented continuous value representation. The response matching result is generated by combining the current response state.
[0012] Based on the response matching results, determine the response quantity allocated in this round, and simultaneously deduct the response quantity allocated in this round from the response requirement corresponding to the Query and the available response quantity corresponding to the Value, and update the Query and Value; repeat the continuous time attention calculation and response quantity deduction based on the updated Query and Value until the stopping condition is met, and generate the final response matching result;
[0013] Based on the final response matching results, target market participants are identified, response capacity and response time periods are allocated, and decision support results for electricity market demand response are generated.
[0014] Optionally, the node voltage data includes node identifier, sampling time, and voltage value; the demand response business data includes market entity identifier, historical response records, current response status, available response capacity, and available response time period.
[0015] Optionally, the process of generating a demand response task includes: extracting a voltage time series from the demand response time series data, comparing the voltage value with a preset voltage threshold, determining the continuous over-limit period, and generating a voltage fluctuation range; retrieving historical response records according to the voltage fluctuation range, selecting the historical response record corresponding to the time, and generating a demand response task based on the corresponding response capacity and response period.
[0016] Optionally, the process of constructing the improved ContiFormer includes:
[0017] Based on ContiFormer, we set up natural cubic spline interpolation, Neural ODE solver, continuous-time multi-head attention, feedforward network, residual connection and layer normalization;
[0018] The Query is constructed using natural cubic spline interpolation. The Query at the same integration time is input into the Neural ODE state differential function to update the Key state and Value state, generating continuous Key representation and continuous Value representation.
[0019] The moment of response state switching is used as the boundary of piecewise integration in Neural ODE. When the response state switches, the current integration is terminated, the initial states of Key and Value are reset, and integration continues from the moment of response state switching.
[0020] The integral interval of continuous-time multi-head attention is divided according to the response state switching time, and continuous-time attention calculation is performed on Query, continuous key representation and continuous value representation;
[0021] Update the Query and Value based on the output of continuous-time multi-head attention, and then input the updated Query and Value back into continuous-time multi-head attention to build an improved ContiFormer.
[0022] Optionally, the process of generating continuous key representations and continuous value representations includes:
[0023] Encode the demand response task as a query and map the historical response sequence of market entities as the initial state of the key and the initial state of the value.
[0024] A continuous-time query is constructed using natural cubic spline interpolation, and the corresponding query is read according to the integral time of the Neural ODE.
[0025] The current Key state and Value state are concatenated with the Query at the same integration time and then input into the Neural ODE state differential function to calculate and update the changes in the Key state and Value state respectively.
[0026] The Key and Value states are continuously updated according to the integration time to generate continuous Key and Value representations.
[0027] Optionally, the process of terminating the integration of the corresponding ordinary differential equation includes: identifying the moment when the response state changes between adjacent response records as the response state switching moment, mapping the response state switching moment to the Neural ODE integration time axis, terminating the Neural ODE calculation of the current integration interval when the integration process reaches the response state switching moment, and outputting the Key state and Value state corresponding to that moment.
[0028] Optionally, the process of generating segmented continuous key representations and segmented continuous value representations includes:
[0029] Encode the response state before and after the handover, calculate the difference between the corresponding encoded vectors, and generate a state change vector.
[0030] Map the state change vectors to the Key state space and the Value state space respectively to generate Key state correction and Value state correction.
[0031] The Key state correction is added to the Key state retained at the time of response state switching, and the Value state correction is added to the Value state retained at the time of response state switching to generate a new initial Key state and initial Value state.
[0032] Using the moment of response state switching as the starting moment of the next integration interval, Neural ODE integration is continued based on the new initial Key state and initial Value state to generate continuous Key representation and continuous Value representation corresponding to the next integration interval;
[0033] Repeat the state change calculation, initial state update and Neural ODE integration at each response state switching moment. Arrange the continuous key representation and continuous value representation corresponding to each integration interval in the integration time order to generate piecewise continuous key representation and piecewise continuous value representation.
[0034] Optionally, the process of generating the response matching result includes:
[0035] Read the query time corresponding to the query, and select the response state transition time that is closest to the query time from the response state transition times;
[0036] The selected response state switching time is taken as the start time of the current continuous-time attention integration interval, and the query time is taken as the end time of the current continuous-time attention integration interval.
[0037] Read the continuous key representation and continuous value representation corresponding to the current continuous-time attention integration interval from the segmented continuous key representation and segmented continuous value representation;
[0038] Calculate the continuous-time attention between the Query and the continuous key representation within the current continuous-time attention integral interval, aggregate the continuous value representation using the continuous-time attention result, and generate the continuous-time attention output;
[0039] Read the current response status corresponding to the query time, filter the continuous time attention output based on the current response status, and generate response matching results.
[0040] Optionally, the process of generating the final response matching result includes:
[0041] Based on the response matching results, select the current market entity, read the remaining response demand for the time interval corresponding to the Query and the available response quantity for the current market entity's corresponding Value, and determine the smaller value between the remaining response demand and the available response quantity as the response quantity allocated in this round.
[0042] Subtract the allocated response quantity from the remaining response demand for the time interval corresponding to the Query, and update the Query;
[0043] The available response quantity for this round of allocation is deducted from the available response quantity for the current market entity's corresponding Value, and the Value for the current market entity is updated, while the Key and Value that did not participate in this round of allocation remain unchanged;
[0044] Perform continuous-time attention calculation again on the updated Query, Key, and Value, and update the response matching results;
[0045] Based on the updated response matching results, the current market entity is reselected and the response volume is allocated. The Query update, Value update and continuous time attention calculation are repeated until the remaining response demand for the time interval corresponding to the Query is zero or there is no market entity with a greater than zero available response volume.
[0046] The corresponding allocation responses for each round are aggregated according to the selection order of market participants in each round, and the final response matching results are generated.
[0047] Optionally, the process of generating electricity market demand response decision support results includes:
[0048] Read the cumulative allocated response volume and response time range for each market entity;
[0049] Market entities with a cumulative allocation response volume greater than zero are identified as target market entities, the corresponding cumulative allocation response volume is identified as allocation response capacity, and the corresponding response time interval is identified as response period.
[0050] By associating target market entities with their identifiers, allocating response capacity and response time periods, and generating decision support results for electricity market demand response, the system can be optimized.
[0051] The beneficial effects of this invention are:
[0052] (1) By collecting voltage operation data and demand response business data, and dividing the continuous time processing interval by combining the response state switching time, the demand response analysis process can be associated with voltage fluctuation changes and market entity response state changes, thereby improving the accuracy of demand response task identification.
[0053] (2) This invention improves the continuous-time attention calculation process driven by the state switching of ContiFormer, reinitializes the Key state and Value state at the position of response state change, and performs iterative matching based on the updated Query, Key and Value, thereby improving the accuracy of market entity matching results in dynamic response scenarios.
[0054] (3) This invention forms a cyclic matching process of demand response resources by continuously executing response quantity allocation, query update, value update and continuous time attention calculation. The allocation results are dynamically adjusted according to the available response capacity of market entities, which improves the utilization efficiency of demand response resources and the adaptability of decision support results. Attached Figure Description
[0055] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0056] Figure 1 This is a flowchart of a power market demand response decision support method based on voltage fluctuation monitoring proposed in this invention;
[0057] Figure 2 This is a schematic diagram of the improved ContiFormer structure of a power market demand response decision support method based on voltage fluctuation monitoring proposed in this invention.
[0058] Figure 3 This is a schematic diagram of the response state switching integral of a power market demand response decision support method based on voltage fluctuation monitoring proposed in this invention. Detailed Implementation
[0059] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0060] refer to Figure 1A power market demand response decision support method based on voltage fluctuation monitoring includes the following steps:
[0061] Collect node voltage data and demand response service data, and preprocess them to generate demand response time-series data;
[0062] Identify voltage fluctuation ranges from demand response time-series data, generate demand response tasks based on the time correspondence between voltage fluctuation ranges and historical response records, and extract historical response sequences and current response statuses of market participants.
[0063] An improved ContiFormer is constructed, which encodes the demand response task as a Query, encodes the historical response sequence of market entities as the initial states of Key and Value, introduces the Query at the same time during the solution of the ordinary differential equations of Key and Value, updates the hidden states of Key and Value, and generates continuous Key representation and continuous Value representation.
[0064] Extract the response state switching time from the historical response sequence of market entities, terminate the integration of the corresponding ordinary differential equation when the response state switches, reinitialize the Key hidden state and Value hidden state according to the switched response state, continue integration from the response state switching time, and generate piecewise continuous Key representation and piecewise continuous Value representation.
[0065] The continuous-time attention integration interval is divided according to the response state switching time. Continuous-time attention calculation is performed on Query, segmented continuous key representation and segmented continuous value representation. The response matching result is generated by combining the current response state.
[0066] Based on the response matching results, determine the response quantity allocated in this round, and simultaneously deduct the response quantity allocated in this round from the response requirement corresponding to the Query and the available response quantity corresponding to the Value, and update the Query and Value; repeat the continuous time attention calculation and response quantity deduction based on the updated Query and Value until the stopping condition is met, and generate the final response matching result;
[0067] Based on the final response matching results, target market participants are identified, response capacity and response time periods are allocated, and decision support results for electricity market demand response are generated.
[0068] In this embodiment, the node voltage data includes node identifier, sampling time, and voltage value; the demand response service data includes market entity identifier, historical response records, current response status, available response capacity, and available response time period.
[0069] Specifically, node voltage data is time-series sampling data reflecting the operating status of grid node voltages; node identifier is used to uniquely identify the grid node corresponding to the voltage sampling; sampling time is the time corresponding to a single voltage value recorded by the voltage acquisition device; voltage value is the voltage amplitude measured at the corresponding node at the sampling time; by arranging the voltage values according to the node identifier and sampling time, a voltage time series corresponding to each node can be formed.
[0070] Demand response business data consists of records related to market entities generated during the demand response process. Market entity identifiers uniquely identify participating market entities and are used to link the same market entity's business records across different response tasks. Historical response records are process records of market entities completing demand response tasks, including the response time period, response capacity, actual execution status, and changes in response status. The current response status is the business status of the market entity at the current decision-making moment, indicating whether the market entity currently possesses the conditions to participate in this demand response task. Available response capacity is the capacity that the market entity can allocate to demand response tasks in the current response status. The available response time period is the effective time range within which the market entity can currently execute demand responses. Organizing historical response records according to market entity identifiers and the time of business occurrence forms a historical response sequence for market entities. Reading the business records corresponding to the current decision-making moment determines the market entity's current response status, available response capacity, and available response time period.
[0071] During preprocessing, the data fields of node voltage data and demand response business data are read respectively. The fields of node identifier, market entity identifier, sampling time, business occurrence time and corresponding record content are parsed. The time fields in different data sources are converted into a unified time format, and the node identifier and market entity identifier are converted into a unified encoding format.
[0072] Perform integrity checks on node voltage data, deleting invalid records where the node identifier, sampling time, or voltage value cannot be determined; identify abnormal records based on voltage changes at adjacent sampling times of the same node, and remove voltage values that significantly exceed the preset effective voltage range and cannot be verified by adjacent sampling records; for missing voltage values that occur during short-term continuous sampling, interpolate and fill them in based on the effective voltage values before and after the missing position of the same node; group the processed node voltage data according to the node identifier, and arrange them in ascending order of sampling time within each group.
[0073] Perform a record integrity check on the demand response business data, and delete invalid records where the market entity identifier or the time of business occurrence cannot be determined; merge duplicate business records belonging to the same market entity according to the market entity identifier, and retain valid records with complete status and consistent content when duplicate records exist for the same time of business occurrence; for records lacking available response capacity or response time, read the most recent valid business record of the same market entity to supplement them, and mark records that cannot be supplemented as not eligible to participate in the current response matching; group the demand response business data according to the market entity identifier, and arrange them in ascending order according to the time of business occurrence within each group.
[0074] The processed node voltage data and demand response business data are mapped to a unified time axis. Using the sampling time of the node voltage data and the business occurrence time of the demand response business data as time indices, a correspondence is established between node voltage records and market entity business records within the same time range. When the recording times of the two types of data are inconsistent, the record with the smallest time difference is selected for alignment according to a preset time tolerance; records exceeding the preset time tolerance retain their original time positions, and no forced matching is performed. The aligned node voltage records and demand response business records are then arranged sequentially according to the unified time axis to generate demand response time-series data.
[0075] In this embodiment, the process of generating a demand response task includes: extracting a voltage time series from the demand response time series data, comparing the voltage value with a preset voltage threshold, determining the continuous over-limit period, and generating a voltage fluctuation range; retrieving historical response records according to the voltage fluctuation range, selecting the historical response record corresponding to the time, and generating a demand response task based on the corresponding response capacity and response period.
[0076] In this embodiment, the process of extracting the historical response sequence and current response status of market entities includes:
[0077] The system reads the market entity identifier from each historical response record, grouping historical response records with the same identifier into the same record set; historical response records with different identifiers are grouped into different record sets. After aggregation, each record set corresponds to only one market entity. For the business occurrence time in the historical response records corresponding to the same market entity, the historical response records are arranged from earliest to latest according to the business occurrence time; when two historical response records have the same business occurrence time, they are arranged from earliest to latest according to the record writing time, forming a historical response sequence for the market entity.
[0078] The system reads the valid business records corresponding to the current decision-making time to determine the current response status of the market entity. For example, if a market entity has three business records prior to the current decision-making time: "Available to Respond," "Reserved," and "In Progress," with the business occurrence times of these three records sequentially closer to the current decision-making time, the system reads the business record that is closest to the current decision-making time and is not yet expired. If the response status recorded in this business record is "In Progress," the market entity's current response status is determined to be "In Progress." If the most recent business record has exceeded the available response period, the system continues to read the most recent valid business records. If no valid business record is found, the market entity is not considered a currently available response entity.
[0079] In this embodiment, the process of constructing the improved ContiFormer includes:
[0080] Based on ContiFormer, we set up natural cubic spline interpolation, Neural ODE solver, continuous-time multi-head attention, feedforward network, residual connection and layer normalization;
[0081] The Query is constructed using natural cubic spline interpolation. The Query at the same integration time is input into the Neural ODE state differential function to update the Key state and Value state, generating continuous Key representation and continuous Value representation.
[0082] Specifically, at any integration time step in the Neural ODE solution, the corresponding Query vector is read from the continuous-time Query based on that integration time step. The Query vector and the current Key state are input together into the state differential function corresponding to the Key, and the Query vector and the current Value state are input together into the state differential function corresponding to the Value, respectively, to obtain the changes in the Key state and the Value state at the current integration time step. The Neural ODE solver advances to the next integration time step based on the changes in the Key state and the Value state, continuously performing state updates to obtain the Key representation and Value representation that change continuously over time. In implementation, the fourth-order Runge-Kutta method can be used to perform numerical integration, with an integration step size set to 0.1; the feature dimensions of Query, Key, and Value can be uniformly set to 64 dimensions.
[0083] The moment of response state switching is used as the boundary of piecewise integration in Neural ODE. When the response state switches, the current integration is terminated, the initial states of Key and Value are reset, and integration continues from the moment of response state switching.
[0084] Specifically, the response state transition times are read according to the historical response sequence of market participants. When the Neural ODE integral reaches the response state transition time, the continuous Key and Value representations generated before that time are saved, and the current integration stops. The historical response records corresponding to the response state transition times are read, and the historical response records are mapped to the Key state space and Value state space respectively according to the feature mapping method used when constructing the Key and Value, to obtain new initial Key and Value states. The response state transition time is used as the starting time of the next integration interval to continue solving the Neural ODE. If a market participant switches from a responsive state to an executing state at the 5th minute, then the first integration interval is from the 0th minute to the 5th minute. The initial Key and Value states are reset at the 5th minute, and the next integration interval begins after the 5th minute.
[0085] The integral interval of continuous-time multi-head attention is divided according to the response state switching time, and continuous-time attention calculation is performed on Query, continuous key representation and continuous value representation;
[0086] Specifically, the continuous-time multi-head attention uses the Continuous-Time Multi-Head Attention mechanism from ContiFormer. Adjacent response state transition times are used as the integration boundaries for continuous-time multi-head attention. For each integration interval, the Query, continuous key representation, and continuous value representation within the corresponding time range are read. The continuous-time attention between the Query and continuous key representations is calculated, and the results of the continuous-time attention are used to aggregate continuous value representations within the same integration interval. After each integration interval completes the continuous-time attention calculation, the corresponding outputs are connected in chronological order. When the response state transition times are at the 5th minute and the 12th minute respectively, the continuous-time attention is calculated within the effective time ranges of 0 to 5 minutes, 5 to 12 minutes, and after the 12th minute, respectively.
[0087] Update the Query and Value based on the output of continuous-time multi-head attention, and then input the updated Query and Value back into continuous-time multi-head attention to build an improved ContiFormer.
[0088] Specifically, the market participants and allocated response quantities for the current round are determined based on the output of continuous-time multi-head attention. The response demand for the corresponding time interval in the Query is deducted according to the allocated response quantity, and the available response quantity in the corresponding market participant's Value is also deducted by the same allocated response quantity, keeping the Query time intervals and Values not involved in the current round's allocation unchanged. The deducted Query and Value are used as the input for the next round of continuous-time multi-head attention. If the current demand response task has a response demand of 10MW in a certain time interval, and the current round determines that the allocated response quantity for the market participant is 3MW, the response demand of the Query corresponding to that time interval is updated to 7MW, and the available response quantity in the corresponding market participant's Value is simultaneously reduced by 3MW; the next round of continuous-time multi-head attention continues calculation based on the updated 7MW response demand and the remaining available response quantity.
[0089] In this embodiment, the process of generating consecutive key representations and consecutive value representations includes:
[0090] Encode the demand response task as a query and map the historical response sequence of market entities as the initial state of the key and the initial state of the value.
[0091] Specifically, discrete time points are set according to the response period of the demand response task. The corresponding response demand is read at each discrete time point, and the response demand and the corresponding time position are combined to form a task feature vector. The task feature vector is projected onto the preset feature dimension using a linear mapping to obtain the Query corresponding to each discrete time point. The Query feature dimension can be set to 64 dimensions.
[0092] Historical response records are read sequentially according to the business occurrence time of the market entity's historical response sequence. The response status, response capacity, and actual execution capacity are extracted from the historical response records. Continuous values are normalized, and one-hot encoding is performed on the response status. The historical response feature vector is then concatenated. Two independent linear mappings are used to project the historical response feature vector onto the 64-dimensional Key space and the 64-dimensional Value space. The projection results obtained at the corresponding business occurrence time are used as the initial state of the Key and the initial state of the Value, respectively.
[0093] A continuous-time query is constructed using natural cubic spline interpolation, and the corresponding query is read according to the integral time of the Neural ODE.
[0094] Specifically, the discrete time points corresponding to the demand response task are used as natural cubic spline interpolation nodes, and the Query corresponding to each discrete time point is used as the node function value. A cubic polynomial is constructed between any two adjacent discrete time points, ensuring that the function values, first derivatives, and second derivatives of adjacent cubic polynomials are continuous at the connection points. The second derivatives of the first and last nodes are set to zero, resulting in a continuous-time Query function. The value of the continuous-time Query at each discrete time point remains consistent with the original Query. When the Neural ODE runs to the integration time, this integration time is substituted into the continuous-time Query function to obtain the corresponding 64-dimensional Query vector.
[0095] The current Key state and Value state are concatenated with the Query at the same integration time and then input into the Neural ODE state differential function to calculate and update the changes in the Key state and Value state respectively.
[0096] The calculation and update process includes: Assuming the Key state, Value state, and Query at the current integration time are all 64-dimensional vectors. The current Key state and Query are concatenated along the feature dimension to form a 128-dimensional Key input vector; the current Value state and Query are also concatenated along the feature dimension to form a 128-dimensional Value input vector. The Key input vector and the current integration time are input into the state differential function corresponding to the Key, and the Value input vector and the current integration time are input into the state differential function corresponding to the Value. Both state differential functions are implemented using a multilayer perceptron, with an input layer dimension of 129 dimensions, a hidden layer dimension that can be set to 128 dimensions, and an output layer dimension of 64 dimensions. The outputs serve as the derivatives of the Key state and Value state at the current integration time, respectively.
[0097] The Key and Value states are continuously updated according to the integration time to generate continuous Key and Value representations.
[0098] The current Key state and Value state are used as initial values for integration in the Neural ODE, and numerical integration is performed based on the corresponding state derivatives. In a preferred embodiment, the current response time period is normalized to [0,1], and the fourth-order Runge-Kutta method is used for solving, with an integration step size of 0.1. At each integration step, the state derivative is recalculated based on the current Key state, the current Value state, and the Query at that integration time. The Key state and Value state at the next integration time are then obtained using the fourth-order Runge-Kutta method. This process is repeated along the integration time, connecting the Key states corresponding to each integration time in time to generate a continuous Key representation, and connecting the Value states corresponding to each integration time in time to generate a continuous Value representation.
[0099] In this embodiment, the process of terminating the integration of the corresponding ordinary differential equation includes: identifying the moment when the response state changes between adjacent response records as the response state switching moment, mapping the response state switching moment to the Neural ODE integration time axis, terminating the Neural ODE calculation of the current integration interval when the integration process reaches the response state switching moment, and outputting the Key state and Value state corresponding to that moment.
[0100] In this embodiment, the starting time of the business corresponding to the historical response sequence of the market entity is read, and the starting time of the business is set as the time origin of the Neural ODE integration time axis; the time interval between each response state switching time and the starting time of the business is calculated, and the time interval is converted according to the time scale adopted by Neural ODE to obtain the corresponding position of the response state switching time in the integration time axis; in a preferred embodiment, a complete response period is normalized to [0,1], and the start time of the response period is set to 0 and the end time of the response period is set to 1; a response period lasts for 60 minutes, and when the response state switches at the 18th minute and the 42nd minute, the corresponding Neural ODE integration times are 0.3 and 0.7, respectively; 0.3 and 0.7 are registered as the integration boundaries of Neural ODE; when the numerical integration reaches the corresponding integration boundary, the end point of the current integration step is corrected to the response state switching time, so that the Key state and Value state are accurately calculated to the response state switching time.
[0101] In this embodiment, the process of generating segmented continuous key representations and segmented continuous value representations includes:
[0102] Encode the response state before and after the handover, calculate the difference between the corresponding encoded vectors, and generate a state change vector.
[0103] The system reads the response states from the historical response records before and at the corresponding historical response records before the response state switch, and converts each response state into a one-hot encoded vector according to a pre-established state category order. Specifically, the market entity's response state is divided into four states: unresponsive, responsive, booked, and in progress, encoded as [1,0,0,0], [0,1,0,0], [0,0,1,0], and [0,0,0,1], respectively. When a market entity switches from a responsive state to a booked state, the response state before the switch is encoded as [0,1,0,0], and the response state after the switch is encoded as [0,0,1,0]. Subtracting the response state encoding vector before the switch from the response state encoding vector after the switch yields [0,-1,1,0], which serves as the state change vector corresponding to this response state switch. When the number of response state categories is adjusted, the one-hot encoding dimension remains consistent with the number of response state categories.
[0104] Map the state change vectors to the Key state space and the Value state space respectively to generate Key state correction and Value state correction.
[0105] Separate linear mappings for Key and Value are established, with the state change vector input into these two independent linear mappings. The input dimension of the Key linear mapping is the same as the dimension of the state change vector, and the output dimension is the same as the dimension of the Key state. The input dimension of the Value linear mapping is the same as the dimension of the state change vector, and the output dimension is the same as the dimension of the Value state. In a specific implementation, the state change vector is 4-dimensional, while both the Key state and the Value state are 64-dimensional. A 4×64-dimensional parameter matrix is used to perform a linear transformation on the state change vector, and a corresponding 64-dimensional bias vector is added to obtain 64-dimensional Key state corrections and 64-dimensional Value state corrections. The Key linear mapping and the Value linear mapping use different parameters so that the same response state change can form correction directions applicable to the evolution of the Key state and the Value state, respectively. The obtained Key state correction is applied to the Key state retained at the response state switching moment, and the obtained Value state correction is applied to the Value state retained at the response state switching moment, used to form the initial Key state and the initial Value state corresponding to the next integration interval.
[0106] The Key state correction is added to the Key state retained at the time of response state switching, and the Value state correction is added to the Value state retained at the time of response state switching to generate a new initial Key state and initial Value state.
[0107] Using the moment of response state switching as the starting moment of the next integration interval, Neural ODE integration is continued based on the new initial Key state and initial Value state to generate continuous Key representation and continuous Value representation corresponding to the next integration interval;
[0108] In a preferred embodiment, a response time period is normalized to [0,1] and solved using the fourth-order Runge-Kutta method with an integration step size of 0.1. When a state switch occurs at the 18th minute of a 60-minute response time period, the corresponding normalized integration time is 0.3. Using 0.3 as the starting point for the next integration interval, integration begins from the new initial Key and Value states until the next response state switch or the end of the response time period, thus obtaining continuous Key and Value representations within the integration interval.
[0109] Repeat the state change calculation, initial state update and Neural ODE integration at each response state switching moment. Arrange the continuous key representation and continuous value representation corresponding to each integration interval in the integration time order to generate piecewise continuous key representation and piecewise continuous value representation.
[0110] For the same market entity, all response state transition times are traversed in chronological order. Upon reaching each transition time, the current integration interval is terminated, and the continuously generated key and value representations within that interval are saved. Then, response state encoding, state change vector calculation, key state correction, value state correction, and initial state generation for the next integration interval are performed. After all integration intervals are processed, the continuous key representations corresponding to each interval are arranged chronologically based on their start time, generating segmented continuous key representations; and continuous value representations are arranged according to the same integration interval and the same time order, generating segmented continuous value representations. If two response state transitions occur at normalized times 0.3 and 0.7 during a certain response period, three integration intervals are formed: [0,0.3], [0.3,0.7], and [0.7,1], respectively. Each integration interval maintains continuous evolution, and adjacent integration intervals are not required to have the same value at the state transition position.
[0111] In this embodiment, the process of generating response matching results includes:
[0112] Read the query time corresponding to the query, and select the response state transition time that is closest to the query time from the response state transition times;
[0113] The selected response state switching time is taken as the start time of the current continuous-time attention integration interval, and the query time is taken as the end time of the current continuous-time attention integration interval.
[0114] Read the continuous key representation and continuous value representation corresponding to the current continuous-time attention integration interval from the segmented continuous key representation and segmented continuous value representation;
[0115] Calculate the continuous-time attention between the Query and the continuous key representation within the current continuous-time attention integral interval, aggregate the continuous value representation using the continuous-time attention result, and generate the continuous-time attention output;
[0116] Specifically, let the current query time be tq, and the nearest response state transition time before the query time be ts. Let [ts, tq] be the current continuous-time attention integration interval. For each market entity corresponding to the current integration interval, at any integration time τ, read the Query vector corresponding to the continuous-time Query and the continuous Key representation corresponding to that market entity, calculate the dot product of the two vectors, and perform time integration on the dot product result within the integration interval. Divide the integration result by the length of the integration interval to obtain the continuous-time relevance of that market entity at the current query time. Divide the continuous-time relevance by the square root of the Key vector dimension, and perform Softmax normalization on the results corresponding to each candidate market entity to obtain the continuous-time attention coefficient corresponding to the current query time.
[0117] In a preferred embodiment, the total feature dimension of both the Query and continuous Key representations is set to 64 dimensions. Four attention heads are used for continuous-time multi-head attention, each corresponding to 16-dimensional features. The continuous-time product calculation is performed on each attention head, with a scaling factor of the square root of 16, i.e., 4. During numerical integration, eight integration sampling points can be set within the current integration interval. The actual time corresponding to each sampling point is determined based on the length of the integration interval. At each sampling point, the Query vector and continuous Key representation are read and their dot product is calculated. The interval integration result is approximated by combining the corresponding integration weights. When the normalized time corresponding to a certain query time is 0.8 and the most recent response state switching time is 0.5, continuous-time attention calculation is performed only within the range [0.5, 0.8], and the continuous Key representation from the response state before 0.5 is no longer introduced.
[0118] For each market entity, the continuous value representation corresponding to the current continuous-time attention integration interval is read. Time integration is performed on this continuous value representation between the response state transition time ts and the query time tq. The integration result is divided by the integration interval length tq-ts to obtain the average value representation of the market entity within the current integration interval. The continuous-time attention coefficient corresponding to this market entity is multiplied by the average value representation to obtain the market entity's value contribution to the current query time. The value contributions of each market entity participating in the current query are summed to obtain the aggregated result corresponding to a single attention head. When multiple attention heads are used in continuous-time multi-head attention, the above aggregation is performed on each attention head separately. The aggregated results of each attention head are concatenated and linearly mapped to generate the continuous-time attention output.
[0119] In a preferred embodiment, four attention heads are set up, each outputting a 16-dimensional aggregation result. The results of the four attention heads are concatenated to form a 64-dimensional vector, which is then mapped using a 64×64-dimensional linear method to obtain a 64-dimensional continuous-time attention output. Assuming the normalized attention coefficients of the three candidate market entities corresponding to the current query are 0.50, 0.30, and 0.20, respectively, each coefficient is multiplied by the average value of the three market entities within the current integration interval. The three products are then summed element-wise to obtain the value aggregation result of the current attention head.
[0120] Read the current response status corresponding to the query time, filter the continuous time attention output based on the current response status, and generate response matching results.
[0121] The system reads the current response status corresponding to the query time based on the market entity identifier, and determines whether the market entity can continue to participate in the current demand response task based on the pre-set correspondence between the response status and the participation conditions of the current demand response task. For market entities that meet the participation conditions, the attention coefficient calculated by continuous-time attention and the corresponding continuous-time attention output are retained; for market entities that do not meet the participation conditions, the corresponding attention coefficient is set to zero and they are deleted from the current response matching range.
[0122] In a preferred embodiment, the current response status is set to unresponsive, responsive, booked, and in progress. When performing new resource matching for the current demand response task, the responsive status is set to meet the participation conditions, and the unresponsive, booked, and in progress statuses are set to not meet the participation conditions. If the attention coefficients of the four market entities calculated using continuous-time attention are 0.42, 0.31, 0.17, and 0.10, respectively, corresponding to the current response statuses of responsive, booked, responsive, and unresponsive, then the first and third market entities are retained, and the attention coefficients of the second and fourth market entities are set to zero. The retained 0.42 and 0.17 are re-normalized to approximately 0.712 and 0.288, and the response matching result of the corresponding market entity is determined using the re-normalized attention coefficients.
[0123] When business rules allow market participants with pre-booked status to continue participating in subsequent capacity allocation for the same demand response task, the pre-booked status consistent with the current demand response task identifier will be set to meet the participation conditions, while the pre-booked status associated with other demand response tasks will be set to not meet the participation conditions. The filtering of the current response status only changes the scope of market participants participating in this round of response matching; it does not change the continuous Key and continuous Value representations already formed within the aforementioned continuous-time attention integration interval.
[0124] In this embodiment, the process of generating the final response matching result includes:
[0125] Based on the response matching results, select the current market entity, read the remaining response demand for the time interval corresponding to the Query and the available response quantity for the current market entity's corresponding Value, and determine the smaller value between the remaining response demand and the available response quantity as the response quantity allocated in this round.
[0126] Specifically, the response matching results are read and sorted from largest to smallest according to the continuous time attention coefficients of each market entity. The market entity ranked first among those meeting the current response status participation conditions and having a available response volume greater than zero is selected as the current market entity. The unallocated response demands for the demand response task within the time interval corresponding to the Query are read, and the available response volume in the business record corresponding to the current market entity is read. The two are compared, and the smaller value is determined as the response volume allocated in this round. In a preferred embodiment, if the remaining response demand in a certain time interval is 8MW and the current market entity's available response volume is 3MW, the response volume allocated in this round is determined to be 3MW; if the remaining response demand is 2MW and the current market entity's available response volume is 5MW, the response volume allocated in this round is determined to be 2MW.
[0127] Subtract the allocated response quantity from the remaining response demand for the time interval corresponding to the Query, and update the Query;
[0128] In the demand response task, locate the time interval corresponding to the current round of allocated response quantity. Subtract the current round of allocated response quantity from the remaining response demand recorded in this time interval to obtain the updated remaining response demand. Keeping other time intervals and other task characteristics in the demand response task unchanged, regenerate the query corresponding to this time interval according to the same encoding and linear mapping method used when encoding the demand response task as a query. In a preferred embodiment, if the original remaining response demand in a certain time interval is 8MW, and 3MW is allocated in this round, update the remaining response demand to 5MW, and re-encode the updated query after replacing the original 8MW with 5MW, without directly subtracting 3 from each element of the 64-dimensional query vector.
[0129] The available response quantity for this round of allocation is deducted from the available response quantity for the current market entity's corresponding Value, and the Value for the current market entity is updated, while the Key and Value that did not participate in this round of allocation remain unchanged;
[0130] The available response volume is read from the demand response business data corresponding to the current market entity. The available response volume is then subtracted from the response volume allocated in this round to obtain the updated available response volume. The value corresponding to the current market entity is regenerated using the same feature normalization and linear mapping method as when generating the current value. The business data corresponding to market entities that did not participate in this round of allocation remains unchanged, and their corresponding Keys and Values remain unchanged. In a preferred embodiment, if the original available response volume for the current market entity is 3MW and the response volume allocated in this round is 2MW, the available response volume is updated to 1MW, and the value corresponding to the current market entity is regenerated based on 1MW; the Keys and Values corresponding to other market entities are not updated.
[0131] Perform continuous-time attention calculation again on the updated Query, Key, and Value, and update the response matching results;
[0132] Based on the updated response matching results, the current market entity is reselected and the response volume is allocated. The Query update, Value update and continuous time attention calculation are repeated until the remaining response demand for the time interval corresponding to the Query is zero or there is no market entity with a greater than zero available response volume.
[0133] Specifically, after each round of response allocation, the remaining response demand for the corresponding time interval of the query is reread. If the remaining response demand is greater than zero and there are still market participants who meet the participation conditions for the current response state and whose available response volume is greater than zero, the next round of continuous-time attention calculation and response allocation begins. Iteration stops when the remaining response demand decreases to zero. Iteration stops when the remaining response demand is still greater than zero but the available response volume of all candidate market participants decreases to zero or they no longer meet the participation conditions for the current response state. In a preferred embodiment, the initial response demand for a certain time interval is 10MW. After allocating 3MW, 4MW, and 3MW in three consecutive rounds, the remaining response demand is updated to 7MW, 3MW, and 0MW respectively. Iteration stops after the third round.
[0134] The corresponding allocation responses for each round are aggregated according to the selection order of market participants in each round, and the final response matching results are generated.
[0135] Specifically, the system records the selected market entity identifier, the allocated response amount for each round, and the corresponding response time interval, saving these records sequentially according to the iteration rounds. When the same market entity is selected in more than two rounds, the allocated response amounts for the same response time interval are accumulated. After the iteration is complete, the allocation results are summarized according to the market entity identifier, forming the cumulative allocated response amount and response time interval for each market entity, generating the final response matching result. For example, if market entity A is allocated 3MW, market entity B is allocated 4MW, and market entity A is allocated another 3MW in the three rounds, the final response matching result will show a cumulative allocated response amount of 6MW for market entity A and 4MW for market entity B.
[0136] In this embodiment, the process of generating electricity market demand response decision support results includes:
[0137] Read the cumulative allocated response volume and response time interval for each market entity; for example, the final response matching result records that the cumulative allocated response volume of market entity A is 6MW and the corresponding response time interval is 14:00 to 14:30, and the cumulative allocated response volume of market entity B is 4MW and the corresponding response time interval is 14:00 to 14:30.
[0138] Market entities with a cumulative allocation response volume greater than zero are identified as target market entities, the corresponding cumulative allocation response volume is identified as allocation response capacity, and the corresponding response time interval is identified as response period.
[0139] Specifically, the cumulative allocated response volume of each market participant is assessed. Market participants with a cumulative allocated response volume greater than 0 MW are retained as target market participants, while those with a cumulative allocated response volume of 0 MW are not included in the current electricity market demand response decision support results. The cumulative response volume obtained by the target market participant after each round of allocation within the corresponding response time interval is used as the allocated response capacity, and the response period is directly determined using the start and end times of the corresponding response time interval. In a preferred embodiment, if market participant A has a cumulative allocated response volume of 6 MW and the response time interval is from 14:00 to 14:30, then market participant A is determined as the target market participant, with an allocated response capacity of 6 MW and a response period from 14:00 to 14:30; if market participant C has a cumulative allocated response volume of 0 MW, it is not determined as a target market participant.
[0140] By associating target market entities with their identifiers, allocating response capacity and response time periods, and generating decision support results for electricity market demand response, the system can be optimized.
[0141] Specifically, using the target market entity identifier as the association field, the allocation response capacity and response period corresponding to the same target market entity are written into the same decision record. When there are two or more target market entities, corresponding decision records are established separately, arranged according to the start time of the response period, to generate the power market demand response decision support result. In a preferred embodiment, when market entity A corresponds to 6MW, 14:00 to 14:30, and market entity B corresponds to 4MW, 14:00 to 14:30, two decision records are generated, forming a one-to-one correspondence between the target market entity and the allocation response capacity and response period.
[0142] Example 1: Reference Figures 2-3 To verify the feasibility of this invention in practice, it was applied to a power market demand response business verification scenario. The verification scenario included 18 voltage monitoring nodes connected to 126 market participants, covering industrial adjustable loads, commercial building loads, energy storage resources, and charging loads. Node voltages were recorded using per-unit values, with a sampling period of 1 second. The 126 market participants declared a total adjustable capacity of 42.8 MW, and the capacity in a responsive state at the start of the business verification was 31.6 MW. Historical response data was stored according to market participant identifiers, including the time of business occurrence, response status, declared capacity, actual executed capacity, available response capacity, and responsive time period. The following values are used to illustrate the specific implementation of this embodiment.
[0143] After node voltage data and demand response business data enter the data processing terminal, the time format is first unified, and the node identifier, market entity identifier, and business occurrence time are written into a unified time axis. Duplicate sampled values in the voltage monitoring records are deleted, and short-term missing values are filled by interpolation with adjacent valid sampled values. Demand response business records are collected according to the market entity identifier and arranged according to the business occurrence time. After processing, demand response time-series data is formed. In this embodiment, the normal voltage range is set to 0.95 pu to 1.05 pu. A voltage fluctuation range is defined as a period of continuous deviation from the normal range for 30 seconds. During one verification process, the voltage of monitored node N07 dropped from 1.012 pu to 0.941 pu, and the duration of continuous deviation below 0.95 pu was 168 seconds; the lowest voltage of node N11 was 0.944 pu, and the duration of continuous deviation was 121 seconds. Based on the voltage fluctuation ranges corresponding to the two nodes, historical response records are retrieved to generate the current demand response task, with a corresponding response demand of 10.0 MW. Participating resources are required to complete capacity allocation within a 30-minute response period.
[0144] The historical response sequence of market entities consists of multiple consecutive business records. Of the 126 market entities corresponding to the current demand response task, 74 are in a responsive state, 18 are in a booked state, 11 are in the execution state, and 23 are in an unresponsive state. The system reads the historical response sequences of the 74 responsive market entities and retains the status change records of all market entities to identify the timing of response status transitions. Within a 30-minute response period, 17 valid status transitions were detected, involving 12 market entities. One market entity transitioned from a responsive state to a booked state at 8.4 minutes after the response began, and then transitioned from a booked state to the execution state at 18.9 minutes, with normalized times of 0.28 and 0.63, respectively.
[0145] Figure 2This embodiment employs an improved ContiFormer to complete continuous-time modeling of demand response tasks and market entity response capabilities. The demand response task is encoded into a 64-dimensional query, and the historical response sequences of market entities are mapped to 64-dimensional initial Key states and 64-dimensional initial Value states, respectively. The query is formed using natural cubic spline interpolation to achieve continuous-time Query. During the Neural ODE solution process, the corresponding query is read at each integration time. The query and the current Key state are input into the Key state differential function, and the query and the current Value state are input into the Value state differential function, allowing the remaining demand on the demand side to directly participate in the continuous evolution of the Key and Value states. The Neural ODE is solved using the fourth-order Runge-Kutta method, with the normalized integration time set to 0 to 1 and the basic integration step size set to 0.1.
[0146] refer to Figure 3 When a market entity's response state changes, the Neural ODE does not continue along the original state trajectory to cross the switching position. The system compares the response states in adjacent historical response records, and after detecting a state change, determines the corresponding time of the next record as the response state switching time. The response state uses four-dimensional one-hot encoding, with unresponsive, responsive, reserved, and executing represented as [1,0,0,0], [0,1,0,0], [0,0,1,0], and [0,0,0,1], respectively. When a market entity switches from responsive to reserved, the state change vector is [0,-1,1,0]. The state change vector is then subjected to independent 4×64 linear mappings to form a 64-dimensional Key state correction and a 64-dimensional Value state correction. These two corrections are added to the Key state and Value state retained at the switching time, respectively, to form the initial Key state and initial Value state for the next integration interval.
[0147] After the aforementioned market participants undergo two state transitions at normalization times of 0.28 and 0.63, the Neural ODE integral is divided into three intervals: [0, 0.28], [0.28, 0.63], and [0.63, 1]. Each interval maintains continuous state evolution, and state transitions are allowed to occur due to changes in the response state. When using a fixed continuous integration method for comparison, responsive state information before 0.28 continues to affect the reserved stage after 0.28. With this invention, the Key and Value states are reinitialized at position 0.28, and the old state information does not directly cross the transition position to participate in the continuous evolution of the next integration interval. All 17 state transitions complete integration termination, state correction, and re-integration processing.
[0148] Continuous temporal attention employs four attention heads, each processing 16-dimensional features. When the query time reaches a normalized time of 0.80, the system retrieves the nearest response state transition time prior to the query time. If the most recent transition time for a market entity is 0.63, continuous temporal attention only calculates the continuous temporal relevance between the query and the continuous key representation within the interval [0.63, 0.80], and aggregates the continuous value representation within the same interval. When the current query corresponds to 74 candidate market entities, after continuous temporal attention calculation and response state filtering, 61 market entities meet the participation criteria. The top five market entities with the highest attention coefficients have coefficients of 0.086, 0.079, 0.073, 0.068, and 0.061, respectively.
[0149] The response allocation is completed iteratively. The initial remaining response demand for the current demand response task is 10.0 MW. In the first round, market entity A is selected, with an available response capacity of 3.2 MW. This round allocates 3.2 MW, updating the remaining response demand in the Query from 10.0 MW to 6.8 MW, and updating the available response capacity in the Value for market entity A to 0 MW. The updated Query and Value re-enter continuous-time attention calculation. In the second round, market entity B is selected, with an available response capacity of 2.8 MW. After allocation, the remaining response demand decreases to 4.0 MW. In the third round, market entity C is selected, with an available response capacity of 2.1 MW, and the remaining response demand decreases to 1.9 MW. In the fourth round, market entity D is selected, with an available response capacity of 2.6 MW. This round allocates only 1.9 MW, leaving market entity D with a remaining available response capacity of 0.7 MW. The remaining response demand in the Query decreases to 0 MW, and the iteration stops. The cumulative allocation across the four rounds is 10.0 MW, targeting four market entities.
[0150] The above processing method avoids directly fixing the allocation result after a one-time attention inference. After the first round of allocation, the demand in the Query has decreased, and the available response in the Value corresponding to market entity A has reached zero; the next round of continuous-time attention recalculates the matching relationship based on the updated supply and demand status. In the third round of calculation, the attention ranking of market entity C has been improved from the initial fifth position to the second position, reflecting the direct impact of changes in remaining demand and resource consumption in the previous round on the subsequent matching results. When comparing with the one-time matching method, market entity A has repeated allocation requests in the same demand response task, with a cumulative request capacity of 4.6 MW, which is higher than the available response capacity of market entity A of 3.2 MW; after adopting the Query and Value synchronous update method of this invention, the available response of market entity A drops to 0 MW after completing the 3.2 MW allocation, and it no longer enters the effective allocation range in subsequent rounds.
[0151] To further verify the adaptability of this invention to continuous business changes, this embodiment selects 240 sets of demand response tasks for repeated verification. The demand capacity of a single set of demand response tasks ranges from 4.5 MW to 16.8 MW, the number of participating market entities ranges from 42 to 96, and the number of response state transitions in a single set of tasks ranges from 5 to 26. The fixed-time aggregation method uses a 15-minute aggregation cycle, completing one resource matching based on the market entity status at the beginning of each aggregation cycle; the original ContiFormer uses continuous-time modeling, does not perform Neural ODE reinitialization at the response state transition position, and does not perform cyclic updates of the allocated Query and Value; this invention adopts... Figure 2 and Figure 3 The corresponding complete processing method.
[0152] The results of 240 verification sets show that the market entity matching accuracy of this invention reaches 93.8%, higher than the 87.1% of the original ContiFormer and the 80.4% of the fixed-time aggregation method. The average absolute error of allocated capacity decreased from 1.28 MW in the fixed-time aggregation method to 0.39 MW. The invalid capacity allocation rate decreased to 1.3%, compared to 6.7% for the fixed-time aggregation method. The actual available response capacity utilization rate reached 96.5%, and the proportion of unmet response demands decreased to 1.6%. A single demand response task requires an average of 4.7 rounds to complete capacity allocation, with an average decision calculation time of 0.84 seconds. The calculation time is higher than that of the one-time matching method, but still lower than the minute-level decision cycle of demand response business, meeting the business processing requirements of this embodiment.
[0153] In a single-group verification with 17 concentrated state transitions, the fixed-time aggregation method exhibited 3 instances of state lag usage, and the original ContiFormer method showed 2 instances of cross-state continuous integration impact. This invention performed integration termination and state reinitialization at all 17 transition points. After a market participant's state changed from responsive to reserved, subsequent allocations did not repeatedly allocate capacity based on the original available capacity. A typical task with a demand capacity of 10.0 MW ultimately resulted in 4 decision records: Market Participant A allocated 3.2 MW, Market Participant B allocated 2.8 MW, Market Participant C allocated 2.1 MW, and Market Participant D allocated 1.9 MW, with the response time period consistent with the demand response task's set time period. This ultimately resulted in a one-to-one correspondence between the target market participants, allocated response capacity, and response time period for electricity market demand response decision support.
[0154] The implementation data shows that, Figure 2 The query shown participates in the Neural ODE state update structure, enabling changes in demand to enter a continuous state evolution process. Figure 3The integral processing of response state switching, as shown, enables changes in market entity state to promptly alter the subsequent evolution starting point of the Key and Value states. After the response quantity is allocated, the remaining demand in the Query and the available response quantity in the Value continue to drive the next round of attention calculation, avoiding duplicate capacity occupation caused by one-time matching. Verification results show that this invention can maintain a high market entity matching accuracy, a low capacity allocation error, and a high available response capacity utilization rate in demand response scenarios triggered by voltage fluctuations.
[0155] Table 1: Comparison of the Implementation Effects of Demand Response Decision-Making Methods
[0156]
[0157] As shown in Table 1, under the same 240 sets of demand response tasks, this invention achieves superior results in terms of market entity matching accuracy, allocation capacity error, invalid capacity allocation rate, available response capacity utilization rate, unmet response demand ratio, and capacity duplication rate. The market entity matching accuracy reaches 93.8%, which is 13.4 percentage points higher than the 80.4% of the fixed-time aggregation method and 6.7 percentage points higher than the original ContiFormer's 87.1%, indicating that the segmented continuous modeling driven by response state switching can more accurately identify the market entities currently eligible to participate in demand response.
[0158] The mean absolute error of capacity allocation decreased from 1.28 MW in the fixed-time aggregation method to 0.39 MW, the invalid capacity allocation rate decreased from 6.7% to 1.3%, and the proportion of unmet response demands decreased from 7.2% to 1.6%. These results demonstrate that this invention, by updating the remaining response demands in the Query and the available response quantities in the Value after each round of response allocation, and then performing the next round of continuous-time attention calculation, enables subsequent capacity allocation to be re-matched based on the changed supply and demand status, reducing duplicate allocation, over-allocation, and demand gaps.
[0159] The available response capacity utilization rate reached 96.5%, higher than the original ContiFormer's 92.4% and the fixed-time aggregation method's 88.9%. The state transition handling accuracy reached 100.0%, indicating that the method of terminating Neural ODE integration, reinitializing the Key and Value states, and continuing integration during response state transitions can effectively isolate the continuous evolution intervals corresponding to different response states. The capacity duplication rate decreased to 0.4%, further demonstrating that the query and value synchronous update mechanism can limit market participants who have exhausted their available capacity from continuing to participate in subsequent allocations.
[0160] The average computation time per group in this invention is 0.84 s, which is higher than the 0.31 s of the fixed-time aggregation method and the 0.56 s of the original ContiFormer. The increased computation time mainly comes from the state-switching segmented integration and the multi-round iterative allocation of response quantities. 0.84 s is still within the processing time allowed for demand response business decisions. Combined with a matching accuracy of 93.8%, a capacity allocation error of 0.39 MW, and a usable response capacity utilization rate of 96.5%, this invention improves market participant matching, response capacity allocation, and dynamic state adaptation capabilities with limited increased computational overhead.
[0161] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A power market demand response decision support method based on voltage fluctuation monitoring, characterized in that, The steps include the following: Collect node voltage data and demand response service data, and preprocess them to generate demand response time-series data; Identify voltage fluctuation ranges from demand response time-series data, generate demand response tasks based on the time correspondence between voltage fluctuation ranges and historical response records, and extract historical response sequences and current response statuses of market participants. An improved ContiFormer is constructed, which encodes the demand response task as a Query, encodes the historical response sequence of market entities as the initial states of Key and Value, introduces the Query at the same time during the solution of the ordinary differential equations of Key and Value, updates the hidden states of Key and Value, and generates continuous Key representation and continuous Value representation. Extract the response state switching time from the historical response sequence of market entities, terminate the integration of the corresponding ordinary differential equation when the response state switches, reinitialize the Key hidden state and Value hidden state according to the switched response state, continue integration from the response state switching time, and generate piecewise continuous Key representation and piecewise continuous Value representation. The continuous-time attention integration interval is divided according to the response state switching time. Continuous-time attention calculation is performed on Query, segmented continuous key representation and segmented continuous value representation. The response matching result is generated by combining the current response state. Based on the response matching results, determine the response quantity allocated in this round, and simultaneously deduct the response quantity allocated in this round from the response requirement corresponding to the Query and the available response quantity corresponding to the Value, and update the Query and Value; repeat the continuous time attention calculation and response quantity deduction based on the updated Query and Value until the stopping condition is met, and generate the final response matching result; Based on the final response matching results, target market participants are identified, response capacity and response time periods are allocated, and decision support results for electricity market demand response are generated.
2. The power market demand response decision support method based on voltage fluctuation monitoring according to claim 1, characterized in that, The node voltage data includes node identifier, sampling time, and voltage value; The demand response business data includes market entity identification, historical response records, current response status, available response capacity, and available response time period.
3. The power market demand response decision support method based on voltage fluctuation monitoring according to claim 2, characterized in that, The process of generating a demand response task includes: extracting a voltage time series from the demand response time series data, comparing the voltage value with a preset voltage threshold, determining the continuous over-limit period, and generating a voltage fluctuation range; retrieving historical response records according to the voltage fluctuation range, selecting the historical response record corresponding to the time, and generating a demand response task based on the corresponding response capacity and response period.
4. The power market demand response decision support method based on voltage fluctuation monitoring according to claim 3, characterized in that, The process of building the improved ContiFormer includes: Based on ContiFormer, we set up natural cubic spline interpolation, Neural ODE solver, continuous-time multi-head attention, feedforward network, residual connection and layer normalization; The Query is constructed using natural cubic spline interpolation. The Query at the same integration time is input into the Neural ODE state differential function to update the Key state and Value state, generating continuous Key representation and continuous Value representation. The moment of response state switching is used as the boundary of piecewise integration in Neural ODE. When the response state switches, the current integration is terminated, the initial states of Key and Value are reset, and integration continues from the moment of response state switching. The integral interval of continuous-time multi-head attention is divided according to the response state switching time, and continuous-time attention calculation is performed on Query, continuous key representation and continuous value representation; Update the Query and Value based on the output of continuous-time multi-head attention, and then input the updated Query and Value back into continuous-time multi-head attention to build an improved ContiFormer.
5. The power market demand response decision support method based on voltage fluctuation monitoring according to claim 4, characterized in that, The process of generating continuous key representations and continuous value representations includes: Encode the demand response task as a query and map the historical response sequence of market entities as the initial state of the key and the initial state of the value. A continuous-time query is constructed using natural cubic spline interpolation, and the corresponding query is read according to the integral time of the Neural ODE. The current Key state and Value state are concatenated with the Query at the same integration time and then input into the NeuralODE state differential function to calculate and update the changes in Key state and Value state respectively. The Key and Value states are continuously updated according to the integration time to generate continuous Key and Value representations.
6. The power market demand response decision support method based on voltage fluctuation monitoring according to claim 5, characterized in that, The process of terminating the integration of the corresponding ordinary differential equation includes: identifying the moment when the response state changes between adjacent response records as the response state switching moment, mapping the response state switching moment to the Neural ODE integration time axis, terminating the Neural ODE calculation of the current integration interval when the integration process reaches the response state switching moment, and outputting the Key state and Value state corresponding to that moment.
7. The power market demand response decision support method based on voltage fluctuation monitoring according to claim 6, characterized in that, The process of generating segmented continuous key representations and segmented continuous value representations includes: Encode the response state before and after the handover, calculate the difference between the corresponding encoded vectors, and generate a state change vector. Map the state change vectors to the Key state space and the Value state space respectively to generate Key state correction and Value state correction. The Key state correction is added to the Key state retained at the time of response state switching, and the Value state correction is added to the Value state retained at the time of response state switching to generate a new initial Key state and initial Value state. Using the moment of response state switching as the starting moment of the next integration interval, Neural ODE integration is continued based on the new initial Key state and initial Value state to generate continuous Key representation and continuous Value representation corresponding to the next integration interval; Repeat the state change calculation, initial state update and Neural ODE integration at each response state switching moment. Arrange the continuous key representation and continuous value representation corresponding to each integration interval in the integration time order to generate piecewise continuous key representation and piecewise continuous value representation.
8. The power market demand response decision support method based on voltage fluctuation monitoring according to claim 7, characterized in that, The process of generating response matching results includes: Read the query time corresponding to the query, and select the response state transition time that is closest to the query time from the response state transition times; The selected response state switching time is taken as the start time of the current continuous-time attention integration interval, and the query time is taken as the end time of the current continuous-time attention integration interval. Read the continuous key representation and continuous value representation corresponding to the current continuous-time attention integration interval from the segmented continuous key representation and segmented continuous value representation; Calculate the continuous-time attention between the Query and the continuous key representation within the current continuous-time attention integral interval, aggregate the continuous value representation using the continuous-time attention result, and generate the continuous-time attention output; Read the current response status corresponding to the query time, filter the continuous time attention output based on the current response status, and generate response matching results.
9. A power market demand response decision support method based on voltage fluctuation monitoring according to claim 8, characterized in that, The process of generating the final response matching result includes: Based on the response matching results, select the current market entity, read the remaining response demand for the time interval corresponding to the Query and the available response quantity for the current market entity's corresponding Value, and determine the smaller value between the remaining response demand and the available response quantity as the response quantity allocated in this round. Subtract the allocated response quantity from the remaining response demand for the time interval corresponding to the Query, and update the Query; The available response quantity for this round of allocation is deducted from the available response quantity for the current market entity's corresponding Value, and the Value for the current market entity is updated, while the Key and Value that did not participate in this round of allocation remain unchanged; Perform continuous-time attention calculation again on the updated Query, Key, and Value, and update the response matching results; Based on the updated response matching results, the current market entity is reselected and the response volume is allocated. The Query update, Value update and continuous time attention calculation are repeated until the remaining response demand for the time interval corresponding to the Query is zero or there is no market entity with a greater than zero available response volume. The corresponding allocation responses for each round are aggregated according to the selection order of market participants in each round, and the final response matching results are generated.
10. A power market demand response decision support method based on voltage fluctuation monitoring according to claim 9, characterized in that, The process of generating electricity market demand response decision support results includes: Read the cumulative allocated response volume and response time range for each market entity; Market entities with a cumulative allocation response volume greater than zero are identified as target market entities, the corresponding cumulative allocation response volume is identified as allocation response capacity, and the corresponding response time interval is identified as response period. By associating target market entities with their identifiers, allocating response capacity and response time periods, and generating decision support results for electricity market demand response, the system can be optimized.