A power transaction risk dynamic quantification and automatic management and control method and system based on a shadow account and a two-factor algorithm, an electronic device and a readable storage medium

By combining shadow ledgers with a two-factor algorithm, the problems of real-time recalculation and automated control in power trading risk management have been solved, enabling T+0 identification, second-level early warning, and automatic blocking of power trading risks, thus improving the real-time performance and accuracy of risk management.

CN122243641APending Publication Date: 2026-06-19JINAN SHENGHENG PROJECT MANAGEMENT CONSULTING CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JINAN SHENGHENG PROJECT MANAGEMENT CONSULTING CO LTD
Filing Date
2026-04-15
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

The existing power trading risk management system cannot achieve T+0 real-time recalculation, the inconsistent data granularity makes high-frequency market monitoring difficult, the static guarantee model is insufficient in extreme market conditions or over-utilized in normal conditions, and there is a lack of an automatic blocking mechanism for direct API connection.

Method used

By employing shadow ledgers and a two-factor algorithm, and through heterogeneous data cleaning and dimensionality enhancement, real-time recalculation of shadow ledger bilateral accounts, dynamic calculation of two-factor guarantee limits, and automatic control via KCP state machine, risks can be identified on a T+0 basis, with second-level early warning and automatic blocking.

Benefits of technology

It improves the real-time nature and accuracy of power trading risk management, avoids insufficient coverage under extreme market conditions or excessive occupancy under normal conditions, and achieves automated and traceable risk control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122243641A_ABST
    Figure CN122243641A_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, electronic device, and readable storage medium for dynamic quantification and automated management of power trading risks based on shadow ledgers and a two-factor algorithm. It belongs to the field of power market risk control and automated transaction management technology. The invention includes: acquiring and preprocessing heterogeneous time-series data; real-time recalculation of the entity's credit asset balance, settlement liability balance, and funding gap based on a shadow ledger recalculation engine; calculating a real-time recommended guarantee limit using historical extreme cost as a benchmark risk exposure and combining it with a two-factor dynamic guarantee limit model; calculating the guarantee occupancy rate based on settlement liabilities and the recommended guarantee limit, driving an automated state machine, and triggering early warnings sequentially when the occupancy rate reaches a threshold, while simultaneously generating chained hash electronic evidence. This invention achieves T+0 risk identification, early warning, automatic blocking, and full-process traceability through heterogeneous data alignment, shadow ledger recalculation, two-factor dynamic guarantee, state machine control, and chained evidence storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power market risk control and automated transaction management technology, and more specifically to a method, system, electronic device and readable storage medium for dynamic quantification and automated management of power transaction risks based on shadow ledger and two-factor algorithm. Background Technology

[0002] In the long-term operation environment of the electricity spot market, the Locational Marginal Price (LMP) is characterized by high volatility, high frequency of change, and significant time-period differences. For electricity retailers, power generators, and other trading entities, their performance risk is not solely determined by historical settlement results, but evolves rapidly with changes in real-time cleared electricity volume, LMP, outstanding guarantees, and market volatility.

[0003] Existing performance risk management systems typically use official settlement or end-of-day settlement methods for risk assessment, which has at least the following drawbacks: First, official settlement data often uses T+1 or even longer settlement periods, failing to cover the T+0 vacuum period at the initial stage of a risk outbreak; second, the data collection rate is usually 96 points / day, while the trading forecast data is often 24 points / day, resulting in a mismatch in time granularity and making it difficult for traditional systems to directly conduct high-frequency market monitoring; third, most existing systems use static fixed collateral ratios or historical average estimation models, which cannot balance risk coverage for high-risk entities with fund release for low-risk entities under extreme market conditions; fourth, traditional risk control relies heavily on manual monitoring, telephone notifications, or offline collection, lacking a rigid automatic blocking mechanism that directly connects to the trading terminal API.

[0004] Therefore, how to construct a technical solution that can achieve T+0 real-time recalculation under heterogeneous data conditions, dynamically adjust the guarantee amount based on the credit of the main entity and market fluctuations, and automatically execute transaction permission control when the risk threshold is triggered has become an urgent technical problem to be solved in the field of power trading risk management. Summary of the Invention

[0005] In view of this, the present invention provides a method, system, electronic device and readable storage medium for dynamic quantification and automated management of power trading risks based on shadow ledger and two-factor algorithm. Through heterogeneous data cleaning and dimensional alignment, real-time recalculation of shadow ledger bilateral accounts, two-factor dynamic guarantee limit calculation, KCP state machine automatic control and chain hash storage, etc., the invention achieves T+0 risk identification, second-level early warning, automatic blocking and full-process traceability.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: On the one hand, this invention provides a method for dynamic quantification and automated management of power trading risk based on shadow ledgers and a two-factor algorithm, including: S1. Obtain heterogeneous time-series data of power trading risks and preprocess the heterogeneous time-series data; S2. Construct a shadow ledger reconciliation engine to obtain the credit asset balance, settlement liability balance and dynamic funding gap of the reconciliation entity at the current moment based on the shadow ledger reconciliation engine; S3. Obtain the extreme cost within the historical assessment period as the benchmark risk exposure, and use the main credit factor and market volatility factor to construct a two-factor dynamic guarantee limit model to calculate the real-time recommended guarantee limit; S4. Calculate the collateral utilization rate based on the current settlement liability balance and the real-time collateral recommendation limit; S5. Drive the automated state machine based on the collateral occupancy rate, and trigger the warning, countdown and transaction permission freeze instructions in sequence when the collateral occupancy rate reaches the preset threshold. S6. Synchronously generate chained hash electronic evidence.

[0007] Preferably, heterogeneous time-series data on electricity trading risks are acquired, and the heterogeneous time-series data is preprocessed, including: 96-point electricity consumption sequence was obtained based on the metering and data acquisition system, and 24-point predicted electricity consumption sequence and node-edited electricity price sequence were obtained based on the trading platform. For data with inconsistent granularity, piecewise cubic spline interpolation is used to increase the dimensionality, and sliding window 3σ cleaning is performed on abnormal jump points to obtain a unified 96-point time series matrix.

[0008] Preferably, piecewise cubic spline interpolation is used to upgrade the dimensionality of data with inconsistent granularity, specifically including: In adjacent time intervals [t] j ,t j+1 Construct a cubic polynomial on the above: S j (t)=a j +b j (tt j )+c j (tt j )²+d j (tt j )³ The cubic polynomial satisfies interpolation constraints, continuity constraints of first and second derivatives at the segmented connection points, and preset boundary conditions, smoothly upgrading the 24-point sequence to a 96-point sequence.

[0009] Preferably, for anomalously fluctuating data, the mean is calculated within a sliding window w. with standard deviation When |xi - |>3 The corresponding point is marked as an outlier and replaced with the neighborhood median or spline estimate.

[0010] Preferably, a shadow ledger reconciliation engine is constructed, which is used to obtain the credit asset balance, settlement liability balance, and dynamic funding gap of the reconciliation entity at the current moment, including: The shadow ledger engine includes at least a credit asset account and a settlement liability account, wherein: the credit asset account is used to record the current asset balance of the entity that can be used to guarantee performance; the settlement liability account is used to record the real-time settlement liabilities to be borne based on the cleared electricity volume of T+0 period, the marginal electricity price of the node and the deviation correction item; Calculate the credit asset balance and real-time settlement liabilities based on the data in the aforementioned credit asset account and settlement liability account: A t =M t +L t g -U t ; L t =Σ k=1 96 (q k ·p k )+Δt; Among them, A t M represents the credit asset balance at time t. t L represents the cash margin balance. t g U represents the converted guarantee amount. t Indicates that the credit limit has been used, L t Indicates real-time settlement of liabilities, q k p represents the clearing volume in the k-th time period. k This represents the marginal electricity price at the node for the corresponding time period, and Δt represents the deviation correction term.

[0011] Preferably, the extreme cost within the historical assessment period is used as the benchmark risk exposure, and a two-factor dynamic guarantee limit model is constructed using the issuer credit factor and market volatility factor to calculate the real-time recommended guarantee limit, including: In the two-factor dynamic guarantee limit model, the extreme cost within the historical assessment period is used as the benchmark risk exposure. The dynamic guarantee recommendation amount is calculated using the main credit factor α and the market volatility factor β. = ×(1+α+β); σ t =std(ln(P i / Pi-1 ), i∈[t-n+1,t]; Among them, the credit factor α is obtained by mapping the default probability output by a pre-set Logistic regression classifier; the market volatility factor β is based on the rolling standard deviation σ of the nodal marginal electricity price or logarithmic return. t Calculate when σ t When the value exceeds the preset extreme value quantile threshold, it is triggered and the value is selected in stages.

[0012] Preferably, the formula for calculating the collateral utilization rate based on the current settlement liability balance and the real-time recommended collateral limit is as follows: ; in, To settle the outstanding liabilities, Recommended credit limit for real-time guarantee.

[0013] On the other hand, this invention provides a dynamic quantification and automated management system for power trading risk based on shadow ledgers and a two-factor algorithm, comprising: The data acquisition unit is used to acquire heterogeneous time-series data of power trading risks and to preprocess the heterogeneous time-series data. The reconciliation engine is used to build a shadow ledger reconciliation engine, which obtains the credit asset balance, settlement liability balance and dynamic funding gap of the reconciliation entity at the current moment. The guarantee recommendation limit calculation unit is used to obtain the extreme cost in the historical assessment period as the benchmark risk exposure, and to construct a two-factor dynamic guarantee limit model using the main credit factor and market volatility factor to calculate the real-time guarantee recommendation limit. The control unit is used to calculate the guarantee occupancy rate based on the current settlement liability balance and the real-time guarantee recommendation limit. Based on the guarantee occupancy rate, it drives an automated state machine to sequentially trigger warning, countdown and transaction permission freeze instructions when the guarantee occupancy rate reaches a preset threshold, and simultaneously store chained hash electronic evidence.

[0014] In another aspect, the present invention also provides an electronic device, comprising: Processor; and A memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method as described in any of the preceding aspects.

[0015] In another aspect, the present invention also provides a readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method as described in any of the preceding aspects.

[0016] As can be seen from the above technical solutions, compared with the prior art, this invention discloses a method, system, electronic device, and readable storage medium for dynamic quantification and automated management of power trading risks based on shadow ledgers and a two-factor algorithm. Through piecewise cubic spline interpolation and anomaly cleaning mechanisms, a unified high-frequency time series foundation is formed under heterogeneous data conditions, which can significantly improve the accuracy of T+0 market recalculation and reduce errors caused by inconsistent data granularity. Furthermore, this invention, through shadow ledger bilateral account recalculation and a two-factor dynamic guarantee limit model, avoids the problems of insufficient coverage under extreme market conditions or excessive occupation under normal conditions in the static fixed guarantee model, improving risk coverage and guarantee resource allocation efficiency. Even further, through the KCP five-tuple state machine and API automatic blocking mechanism, the original management process relying on manual monitoring and offline notifications is transformed into a rigid control process that can be automatically executed, respond in real time, and is traceable by evidence. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0018] Figure 1 This is the overall flowchart of the method for dynamic quantification and automated control of power trading risks according to the present invention.

[0019] Figure 2 This is a schematic diagram of the KCP five-tuple automated state machine control process of the present invention.

[0020] Figure 3 This is a schematic diagram of the chain-hash electronic evidence storage structure of the present invention.

[0021] Figure 4 This is a structural diagram of the power trading risk dynamic quantification and automated management and control system of the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] This invention discloses a method for dynamic quantification and automated management of power trading risks based on shadow ledgers and a two-factor algorithm, such as... Figure 1 As shown, it includes: S1. Obtain heterogeneous time-series data of power trading risks and preprocess the heterogeneous time-series data; S2. Construct a shadow ledger reconciliation engine to obtain the credit asset balance, settlement liability balance and dynamic funding gap of the reconciliation entity at the current moment based on the shadow ledger reconciliation engine; S3. Obtain the extreme cost within the historical assessment period as the benchmark risk exposure, and use the main credit factor and market volatility factor to construct a two-factor dynamic guarantee limit model to calculate the real-time recommended guarantee limit; S4. Calculate the collateral utilization rate based on the current settlement liability balance and the real-time collateral recommendation limit; S5. Based on the collateral occupancy rate, drive the automated state machine to sequentially trigger warning, countdown, and transaction permission freeze instructions when the collateral occupancy rate reaches a preset threshold; specifically, when the collateral occupancy rate... When the first preset threshold is reached (e.g., 80%), the system automatically triggers an L1 level warning and starts a countdown hourglass; when O cc When the second preset threshold is reached (e.g., 100%) or the countdown reaches zero, the system automatically triggers an L2-level blocking command, freezing the target entity's application and / or decomposition permissions via the API interface. In actual risk control logic, if L... t It has significantly exceeded At, even if O cc Even if the threshold has not been reached, the system may still trigger an early warning or control based on the funding gap.

[0024] S6, Synchronous Chained Hash Electronic Evidence Storage. For example... Figure 3 As shown, chained hash electronic evidence storage specifically includes rule version number, original data snapshot, calculation result, API control message and timestamp.

[0025] Furthermore, heterogeneous time-series data on electricity trading risks are acquired, and the heterogeneous time-series data is preprocessed, including: 96-point electricity consumption sequence was obtained based on the metering and data acquisition system, and 24-point predicted electricity consumption sequence and node-edited electricity price sequence were obtained based on the trading platform. For data with inconsistent granularity, piecewise cubic spline interpolation is used to increase the dimensionality, and sliding window 3σ cleaning is performed on abnormal jump points to obtain a unified 96-point time series matrix.

[0026] Furthermore, piecewise cubic spline interpolation is used to upgrade the dimensionality of data with inconsistent granularity, specifically including: In adjacent time intervals [t] j ,t j+1 Construct a cubic polynomial on the above: S j (t)=a j +b j (ttj )+c j (tt j )²+d j (tt j )³ The cubic polynomial satisfies interpolation constraints, continuity constraints of first and second derivatives at the segmented connection points, and preset boundary conditions, smoothly upgrading the 24-point sequence to a 96-point sequence.

[0027] Furthermore, for anomalously abrupt data changes, the mean is calculated within a sliding window w. with standard deviation When |x i - |>3 The corresponding point is marked as an outlier and replaced with the neighborhood median or spline estimate.

[0028] Specifically, a shadow ledger reconciliation engine is constructed. Based on this engine, the credit asset balance, settlement liability balance, and dynamic funding gap of the reconciliation entity at the current moment are obtained, including: The shadow ledger engine includes at least a credit asset account and a settlement liability account. The credit asset account records the current asset balance that the entity can use to guarantee performance, including cash margin, converted guarantee limit and used limit. The settlement liability account records the real-time settlement liabilities to be borne based on the cleared electricity volume of T+0 period, the marginal electricity price of the node and the deviation correction item. Calculate the credit asset balance and real-time settlement liabilities based on the data in the aforementioned credit asset account and settlement liability account: A t =M t +L t g -U t ; L t =Σ k=1 96 (q k ·p k )+Δt; Among them, A t M represents the credit asset balance at time t. t L represents the cash margin balance. t g U represents the converted guarantee amount. t Indicates that the credit limit has been used, L t Indicates real-time settlement of liabilities, q k p represents the clearing volume in the k-th time period. k This represents the marginal electricity price at the node for the corresponding time period, and Δt represents the deviation correction term.

[0029] Preferably, the extreme cost within the historical assessment period is used as the benchmark risk exposure, and a two-factor dynamic guarantee limit model is constructed using the issuer credit factor and market volatility factor to calculate the real-time recommended guarantee limit, including: In the two-factor dynamic guarantee limit model, the extreme cost within the historical assessment period is used as the benchmark risk exposure. The dynamic guarantee recommendation amount is calculated using the main credit factor α and the market volatility factor β. = ×(1+α+β); σ t =std(ln(P i / P i-1 ), i∈[t-n+1,t]; Among them, the credit factor α is obtained by mapping the default probability output of a pre-set Logistic regression classifier. The input features of the Logistic regression classifier include at least historical performance records, frequency of funding gaps, price deviation, number of abnormal declarations, and historical default labels; the market volatility factor β is based on the rolling standard deviation σ of the nodal marginal electricity price or logarithmic return. t Calculate when σ t When the value exceeds the preset extreme value quantile threshold, it is triggered and the value is selected in stages.

[0030] In one specific implementation, the mapping rule for the credit factor α employs a piecewise linear or piecewise constant mapping function to map the default probability interval output by the Logistic regression classifier to the corresponding credit risk premium coefficient. For example, assuming the default probability output by the Logistic regression classifier is p (0 ≤ p ≤ 1), the credit factor α is determined according to the following rule: When p < 0.02, the entity is judged to be a low-credit-risk entity, and α = 0 is mapped, meaning no additional guarantee is required; When 0.02 ≤ p < 0.08, the entity is classified as having medium to low credit risk, and the mapping is α = 0.10; When 0.08 ≤ p < 0.20, the entity is classified as having medium to high credit risk, and the corresponding α is 0.25. When p≥0.20, the entity is identified as having high credit risk, and the mapping is α=0.50.

[0031] The aforementioned threshold ranges and corresponding α values ​​can be dynamically adjusted based on historical default data distribution and risk appetite, for example, through quantile regression or risk calendar calibration. This mapping mechanism transforms abstract default probabilities into quantitative factors that can directly participate in the calculation of dynamic guarantee limits, achieving differentiated and refined measurement of the issuer's credit risk.

[0032] Furthermore, the formula for calculating the collateral utilization rate based on the current settlement liability balance and the real-time collateral recommendation limit is as follows: ; in, To settle the outstanding liabilities, Recommended credit limit for real-time guarantee.

[0033] In another implementation, such as Figure 2 As shown, based on the preset five-tuple of "trigger object, trigger condition, control action, recovery condition, and evidence entity," L1-level warnings, countdown control, and L2-level transaction permission freezes are executed. The evidence entity set includes at least the original data snapshot hash, the calculated result hash, the API message hash, the timestamp, and the digest of the previous evidence.

[0034] API blocking messages include at least the subject number, blocking level, trigger timestamp, rule version number, calculated snapshot hash value, and permission freeze type. The permission freeze type includes at least one or more of the following: application permission freeze, decomposition permission freeze, and order cancellation permission freeze.

[0035] On the other hand, this invention provides a dynamic quantification and automated management system for power trading risks based on shadow ledgers and a two-factor algorithm, such as... Figure 4 As shown, it includes: The data acquisition unit is used to acquire heterogeneous time-series data of power trading risks and to preprocess the heterogeneous time-series data. The reconciliation engine is used to build a shadow ledger reconciliation engine, which obtains the credit asset balance, settlement liability balance and dynamic funding gap of the reconciliation entity at the current moment. The guarantee recommendation limit calculation unit is used to obtain the extreme cost in the historical assessment period as the benchmark risk exposure, and to construct a two-factor dynamic guarantee limit model using the main credit factor and market volatility factor to calculate the real-time guarantee recommendation limit. The control unit is used to calculate the collateral utilization rate based on the current settlement liability balance and the real-time collateral recommendation limit. Based on the collateral utilization rate, it drives an automated state machine to sequentially trigger warning, countdown and transaction permission freeze instructions when the collateral utilization rate reaches a preset threshold, and simultaneously generates chain hash electronic evidence of rule version number, calculation snapshot and control instructions.

[0036] In another aspect, the present invention also provides an electronic device, comprising: Processor; and A memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method as described in any of the preceding aspects.

[0037] In another aspect, the present invention also provides a readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method as described in any of the preceding aspects.

[0038] Without departing from the core concept of this invention, the Logistic regression classifier can be replaced with other classification models that can output the default probability or risk score of the subject; the triggering method of the market volatility factor β can also be extended from quantile threshold triggering to interval hierarchical triggering or rule engine triggering.

[0039] The control actions described in the specification, such as "freezing application authority, freezing decomposition authority, and freezing cancellation authority," can be implemented individually or in combination; fields such as "cash deposit, guarantee amount, deviation correction item, rule version number, and hash digest" are merely preferred examples and do not constitute the sole limitation on the scope of protection of this invention.

[0040] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0041] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0042] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0043] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for dynamic quantification and automated management of power trading risk based on shadow ledger and two-factor algorithm, characterized in that, include: S1. Obtain heterogeneous time-series data of power trading risks and preprocess the heterogeneous time-series data; S2. Construct a shadow ledger reconciliation engine to obtain the credit asset balance, settlement liability balance and dynamic funding gap of the reconciliation entity at the current moment based on the shadow ledger reconciliation engine; S3. Obtain the extreme cost within the historical assessment period as the benchmark risk exposure, and use the main credit factor and market volatility factor to construct a two-factor dynamic guarantee limit model to calculate the real-time recommended guarantee limit; S4. Calculate the collateral utilization rate based on the current settlement liability balance and the real-time collateral recommendation limit; S5. Drive the automated state machine based on the collateral occupancy rate, and trigger the warning, countdown and transaction permission freeze instructions in sequence when the collateral occupancy rate reaches the preset threshold. S6. Synchronously generate chained hash electronic evidence.

2. The method for dynamic quantification and automated management of power trading risk based on shadow ledger and two-factor algorithm as described in claim 1, characterized in that, Acquire heterogeneous time-series data on electricity trading risks and preprocess the heterogeneous time-series data, including: 96-point electricity consumption sequence was obtained based on the metering and data acquisition system, and 24-point predicted electricity consumption sequence and node-edited electricity price sequence were obtained based on the trading platform. For data with inconsistent granularity, piecewise cubic spline interpolation is used to increase the dimensionality, and sliding window 3σ cleaning is performed on abnormal jump points to obtain a unified 96-point time series matrix.

3. The method for dynamic quantification and automated management of power trading risk based on shadow ledger and two-factor algorithm according to claim 2, characterized in that, For data with inconsistent granularity, piecewise cubic spline interpolation is used to increase the dimensionality, specifically including: In adjacent time intervals [t] j ,t j+1 Construct a cubic polynomial on the above: S j (t)=a j +b j (t-t j )+c j (t-t j )²+d j (t-t j )³ The cubic polynomial satisfies interpolation constraints, continuity constraints of first and second derivatives at the segmented connection points, and preset boundary conditions, smoothly upgrading the 24-point sequence to a 96-point sequence.

4. The method for dynamic quantification and automated management of power trading risk based on shadow ledger and two-factor algorithm according to claim 2, characterized in that, For anomalous jumps in data, calculate the mean within the sliding window w. with standard deviation When |x i - |>3 The corresponding point is marked as an outlier and replaced with the neighborhood median or spline estimate.

5. The method for dynamic quantification and automated management of power trading risk based on shadow ledger and two-factor algorithm according to claim 1, characterized in that, Construct a shadow ledger reconciliation engine to obtain the credit asset balance, settlement liability balance, and dynamic funding gap of the reconciliation entity at the current moment, including: The shadow ledger engine includes at least a credit asset account and a settlement liability account, wherein: the credit asset account is used to record the current asset balance of the entity that can be used to guarantee performance; the settlement liability account is used to record the real-time settlement liabilities to be borne based on the cleared electricity volume of T+0 period, the marginal electricity price of the node and the deviation correction item; Calculate the credit asset balance and real-time settlement liabilities based on the data in the aforementioned credit asset account and settlement liability account: A t =M t +L t g -U t ; 50 t =Σ k=1 96 (what k ·p k )+Δt; Among them, A t M represents the credit asset balance at time t. t L represents the cash margin balance. t g U represents the converted guarantee amount. t Indicates that the credit limit has been used, L t Indicates real-time settlement of liabilities, q k p represents the clearing volume in the k-th time period. k This represents the marginal electricity price at the node for the corresponding time period, and Δt represents the deviation correction term.

6. The method for dynamic quantification and automated management of power trading risk based on shadow ledger and two-factor algorithm according to claim 1, characterized in that, The extreme cost within the historical assessment period is used as the benchmark risk exposure, and a two-factor dynamic guarantee limit model is constructed using the issuer credit factor and market volatility factor to calculate the real-time recommended guarantee limit, including: In the two-factor dynamic guarantee limit model, the extreme cost within the historical assessment period is used as the benchmark risk exposure. The dynamic guarantee recommendation amount is calculated using the main credit factor α and the market volatility factor β. = ×(1+α+β); σ t = std ( ln ( P i / P i-1 )),i∈[t-n+1,t] Among them, the credit factor α is obtained by mapping the default probability output by a pre-set Logistic regression classifier; the market volatility factor β is based on the rolling standard deviation σ of the nodal marginal electricity price or logarithmic return. t Calculate when σ t When the value exceeds the preset extreme value quantile threshold, it is triggered and the value is selected in stages.

7. The method for dynamic quantification and automated management of power trading risk based on shadow ledger and two-factor algorithm according to claim 1, characterized in that, The formula for calculating the collateral utilization rate based on the current settlement liability balance and the real-time collateral recommendation limit is as follows: ; in, To settle the outstanding liabilities, Recommended credit limit for real-time guarantee.

8. A dynamic quantification and automated management system for power trading risk based on shadow ledgers and a two-factor algorithm, characterized in that, include: The data acquisition unit is used to acquire heterogeneous time-series data of power trading risks and to preprocess the heterogeneous time-series data. The reconciliation engine is used to build a shadow ledger reconciliation engine, which obtains the credit asset balance, settlement liability balance and dynamic funding gap of the reconciliation entity at the current moment. The guarantee recommendation limit calculation unit is used to obtain the extreme cost in the historical assessment period as the benchmark risk exposure, and to construct a two-factor dynamic guarantee limit model using the main credit factor and market volatility factor to calculate the real-time guarantee recommendation limit. The control unit is used to calculate the collateral utilization rate based on the current settlement liability balance and the real-time collateral recommendation limit. Based on the collateral utilization rate, it drives an automated state machine to sequentially trigger warning, countdown and transaction permission freeze instructions when the collateral utilization rate reaches a preset threshold, and simultaneously generates chained hash electronic evidence.

9. An electronic device, characterized in that, include: processor; as well as A memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method as described in any one of claims 1-7.

10. A readable storage medium, characterized in that, It stores executable code that, when executed by a processor of an electronic device, causes the processor to perform the method as described in any one of claims 1-7.