Power retail market risk assessment method and electronic equipment

By introducing an objective weighting mechanism based on historical data and a time-series deep learning model into the risk assessment of the electricity retail market, the problem of inaccurate assessment results in traditional methods has been solved, enabling more accurate and flexible risk warnings and supporting precise market regulation and risk prevention.

CN121458068APending Publication Date: 2026-02-03STATE GRID SICHUAN ECONOMIC RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511700906.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-19
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

The problem lies in the inaccuracy of risk assessment results in the electricity retail market due to the reliance on subjective and static weight allocation in risk assessment methods.

Method used

By introducing a mechanism that dynamically derives objective weights based on historical risk event data, combining a time-series deep learning model to predict risk probability, and using the fuzzy comprehensive evaluation method to generate comprehensive risk assessment results.

Benefits of technology

It improves the objectivity and accuracy of risk assessment, significantly enhances the timeliness of risk warning, provides adaptive capabilities, and offers strong decision support for precise supervision and risk prevention and control in the electricity retail market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121458068A_ABST
    Figure CN121458068A_ABST
Patent Text Reader

Abstract

The invention discloses a power retail market risk assessment method and electronic equipment. According to the power retail market risk assessment method provided by the invention, the analytic hierarchy process weight dynamically generated based on historical objective data is introduced, so that the defect that a fixed weight is set depending on subjective experience in a traditional method is effectively overcome, and the risk assessment result is more objective and accurate. Meanwhile, risk probability prediction is carried out in combination with a time sequence deep learning model, market dynamic changes can be caught sensitively, and the timeliness of risk early warning is remarkably improved. And finally, the objective weight, the prediction probability and the current market state information are deeply fused by using a fuzzy comprehensive evaluation method, and the generated comprehensive risk evaluation result not only has high reliability, but also has adaptive ability to market change, and provides powerful decision support for accurate supervision and risk prevention and control of the power retail market.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of electricity market risk monitoring, specifically to a method for assessing risks in the electricity retail market and an electronic device. Background Technology

[0002] In related technologies, with the deepening of power system reform, the electricity retail market is characterized by diversified players and complex transactions, and market risk monitoring has become a key link in ensuring the stable operation of the market.

[0003] In related technologies, the risk assessment methods for the electricity retail market suffer from technical problems, such as inaccurate assessment results due to reliance on subjective and static weight allocation. Summary of the Invention

[0004] The technical problem this invention aims to solve is that, in related technologies, the risk assessment methods for the electricity retail market suffer from inaccurate assessment results due to their reliance on subjective and static weight allocation. The objective is to provide a risk assessment method and electronic device for the electricity retail market, thereby resolving the problem of inaccurate assessment results.

[0005] This invention is achieved through the following technical solution:

[0006] In a first aspect, the present invention provides a method for risk assessment in the electricity retail market, comprising:

[0007] Acquire historical target risk information for multiple risk types in the electricity retail market, as well as a historical risk event dataset; wherein, the historical risk event dataset includes risk type identifiers and corresponding historical loss quantification values;

[0008] The historical target risk information is input into a pre-trained risk occurrence probability prediction model to obtain the probability of occurrence of each risk type in future periods;

[0009] Based on the historical risk event dataset, by comparing the statistical characteristics of the historical loss quantification values ​​of different risk types, a judgment matrix of the analytic hierarchy process is dynamically constructed, and the objective assessment weight of each risk type is calculated based on the judgment matrix.

[0010] Based on the target risk information of the current period, the probability of occurrence of each risk type, and the objective assessment weight, a comprehensive risk assessment result for the electricity retail market is generated using the fuzzy comprehensive evaluation method.

[0011] Further, the step of inputting the historical target risk information into a pre-trained risk occurrence probability prediction model to obtain the occurrence probability of each risk type in future periods includes:

[0012] The historical target risk information of each risk type over multiple consecutive time periods is used to construct corresponding time series vectors.

[0013] Each of the aforementioned time series vectors is input into the pre-trained risk occurrence probability prediction model to obtain dynamic pattern features; wherein, the risk occurrence probability prediction model encodes the input time series vectors through its internal temporal dependency capture module to extract their dynamic pattern features that change over time.

[0014] Based on the extracted dynamic pattern features, the probability value of risk events occurring for each risk type in the next time period is output.

[0015] Furthermore, the temporal dependency capture module is an attention mechanism module;

[0016] The encoding of the input time series vector to extract its dynamic pattern features that change over time includes:

[0017] The attention mechanism module is used to calculate the importance weights of features at different time steps in the time series vector.

[0018] Based on the importance weights, the time series vectors are weighted and summed to generate the dynamic pattern features.

[0019] Furthermore, the step of dynamically constructing a judgment matrix of the analytic hierarchy process (AHP) based on the historical risk event dataset by comparing the statistical characteristics of historical loss quantification values ​​for different risk types, and calculating the objective assessment weight of each risk type based on the judgment matrix, includes:

[0020] The historical loss quantification values ​​in the historical risk event dataset are grouped according to their corresponding risk type identifiers;

[0021] For each risk type, calculate the statistical characteristic values ​​of a set of historical loss quantification values ​​corresponding to it;

[0022] For any two risk types, the objective importance ratio between the two risk types is calculated by comparing their respective statistical characteristic values.

[0023] Based on the objective importance ratio between all risk types, construct the judgment matrix of the analytic hierarchy process.

[0024] Based on the judgment matrix, the objective assessment weights of each risk type are calculated using the eigenvalue method or the geometric mean method.

[0025] Furthermore, the step of calculating the statistical characteristic values ​​of a set of historical loss quantification values ​​corresponding to each risk type includes:

[0026] For each risk type, its corresponding multiple historical loss quantification values ​​are mapped to a preset loss severity score range to obtain the severity score corresponding to each historical loss quantification value; wherein, the mapping relationship is configured such that the larger the loss quantification value, the higher the mapped severity score.

[0027] The median or arithmetic mean of the severity scores obtained after mapping is used as the statistical characteristic value of this risk type.

[0028] Furthermore, the step of calculating the objective importance ratio between any two risk types by comparing their respective statistical characteristic values ​​includes:

[0029] Divide the statistical characteristic value of the first risk type by the statistical characteristic value of the second risk type, and use the quotient as the objective importance ratio of the first risk type relative to the second risk type.

[0030] Furthermore, the step of generating a comprehensive risk assessment result for the electricity retail market based on the target risk information of the current period, the probability of occurrence of each risk type, and the objective assessment weights, using the fuzzy comprehensive evaluation method, includes:

[0031] Based on the target risk information of the current period, determine the quantitative value of the current risk status of each risk type;

[0032] Using a predefined membership function, the current risk status quantification value of each risk type is converted into a corresponding fuzzy evaluation vector, wherein the fuzzy evaluation vector represents the degree of membership of the risk status to multiple preset risk levels;

[0033] The fuzzy evaluation vectors of each risk type are combined to form a fuzzy relation matrix;

[0034] The objective evaluation weight vector and the fuzzy relation matrix are combined using a fuzzy synthesis operation to obtain a comprehensive fuzzy evaluation vector.

[0035] Based on the comprehensive fuzzy evaluation vector and the probability of occurrence of each risk type, the comprehensive risk assessment result of the electricity retail market is calculated.

[0036] Secondly, the present invention provides a risk assessment device for the electricity retail market, comprising:

[0037] The acquisition module is used to acquire historical target risk information for multiple risk types in the electricity retail market, as well as a historical risk event dataset; wherein, the historical risk event dataset includes risk type identifiers and corresponding historical loss quantification values;

[0038] The prediction module is used to input the historical target risk information into a pre-trained risk occurrence probability prediction model to obtain the probability of occurrence of each risk type in the future period.

[0039] The calculation module is used to dynamically construct a judgment matrix of the analytic hierarchy process based on the historical risk event dataset by comparing the statistical characteristics of the historical loss quantification values ​​of different risk types, and to calculate the objective evaluation weight of each risk type based on the judgment matrix.

[0040] The generation module is used to generate a comprehensive risk assessment result for the electricity retail market based on the target risk information of the current period, the probability of occurrence of each risk type, and the objective assessment weight, using the fuzzy comprehensive evaluation method.

[0041] Thirdly, the present invention provides an electronic device, comprising: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by the one or more processors, the instructions being executed by the one or more processors to cause the one or more processors to implement the method described above.

[0042] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0043] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0044] The electricity retail market risk assessment method provided by this invention effectively overcomes the shortcomings of traditional methods that rely on subjective experience to set fixed weights by introducing analytic hierarchy process (AHP) weights dynamically generated based on historical objective data, making the risk assessment results more objective and accurate. Simultaneously, by combining a time-series deep learning model for risk probability prediction, it can keenly capture dynamic market changes and significantly improve the timeliness of risk warnings. Finally, by using fuzzy comprehensive evaluation to deeply integrate objective weights, predicted probabilities, and current market state information, the generated comprehensive risk assessment results are not only highly reliable but also adaptive to market changes, providing strong decision support for precise regulation and risk control in the electricity retail market. Attached Figure Description

[0045] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:

[0046] Figure 1 This is an architectural diagram of a risk assessment method for the electricity retail market provided in the embodiments of this specification;

[0047] Figure 2 A flowchart illustrating a risk assessment method for the electricity retail market provided in the embodiments of this specification;

[0048] Figure 3 This is a block diagram of a power retail market risk assessment device provided in the embodiments of this specification.

[0049] Figure 4 This is a block diagram of an electronic device provided in the embodiments of this specification. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of this invention are only for explaining this invention and are not intended to limit this invention.

[0051] In related technologies, with the deepening of power market reform, the electricity retail market is characterized by diversified players, high-frequency transactions, and complex risks. Against this backdrop, electricity sales companies, as key market players connecting the generation and user sides, face operational risks (such as market power risk, price risk, and credit risk) that not only affect their own survival but also directly impact the stability and efficiency of the entire electricity market. Therefore, establishing a scientific, accurate, and dynamic risk assessment system is crucial for effective supervision by market regulators and for internal risk control by electricity sales companies.

[0052] In related technologies, risk assessment techniques for the electricity retail market are often based on assessment models consisting of predefined indicators and fixed weights. The implementation of this technology relies on a system architecture that includes data acquisition, indicator calculation, and risk rating. First, the system collects historical data from structured data sources such as the electricity trading center database and financial statements reported by electricity retailers. Then, it calculates quantitative values ​​for each indicator based on a risk assessment indicator system (e.g., market concentration, wholesale-retail price spread, etc.) pre-defined by domain experts based on experience. The most crucial step is the comprehensive risk assessment: the system employs a fixed weighting system, which is often pre-determined through expert surveys (e.g., the Delphi method) to determine the importance weights of different risk categories (e.g., market power risk, price risk) and keeps this weighting constant over a long period. Finally, a comprehensive risk score or level is obtained through weighted summation and other methods.

[0053] However, the aforementioned technologies suffer from a fundamental flaw: the core parameter of their risk assessment models—the weight allocation scheme—is subjective and static. This directly leads to the technical problem of inaccurate assessment results. The specific reasons are as follows:

[0054] 1. The determination of weights relies on the personal experience and judgment of a few experts, lacking objective data support. Differences in the knowledge structure and preferences of different expert groups can lead to significant differences in weight settings, resulting in evaluation results that vary from person to person and lack objectivity and credibility.

[0055] 2. Once the weighting system is set, it becomes fixed in the subsequent operation of the system and cannot respond to rapid changes in the internal and external environment of the electricity market. For example, when new energy policies are introduced, wholesale market prices fluctuate sharply, or unexpected events occur, the relative importance of various risks has changed, but the fixed weighting system cannot be dynamically adjusted, resulting in a serious disconnect between the assessment model and market reality, and the assessment results are lagging and inaccurate.

[0056] Therefore, the core problem with the relevant technology can be summarized as follows: in the risk assessment of the electricity retail market, the assessment results are not accurate enough due to the reliance on subjective and static weight allocation.

[0057] To address this technical problem, the core concept of this invention is to replace the traditional fixed weights that rely on subjective settings by introducing a mechanism that dynamically derives objective weights based on historical risk event data. This enables the risk assessment model to adapt to market changes and output more objective and accurate risk assessment results.

[0058] This embodiment provides a method for risk assessment in the electricity retail market. The execution entity of the method can be a server, such as an application server or data analysis server deployed internally by a market regulatory agency (e.g., an electricity trading center). This server can be used to run the risk assessment method and can perform batch or real-time risk assessments on all or some electricity sales companies in the market. The execution entity can also be a local server of an electricity sales company. For example, a single electricity sales company can use its internal business server or workstation as the execution entity to run this method, specifically for assessing its own operational risks and implementing internal risk control. The execution entity can also be a user terminal device. Specifically, the execution entity can also be a terminal device (such as a high-performance workstation) used by regulatory personnel or analysts of electricity sales companies.

[0059] like Figure 1 and Figure 2 As shown, the method may include:

[0060] Step S12: Obtain historical target risk information for multiple risk types in the electricity retail market, as well as a historical risk event dataset; wherein the historical risk event dataset includes risk type identifiers and corresponding historical loss quantification values.

[0061] In this embodiment, the historical target risk information can be generated using a method for generating target risk information in the electricity retail market. It is quantitative data used to characterize the comprehensive state of various risks in the electricity retail market over a historical period. That is, this historical target risk information has undergone data fusion processing and represents the final quantitative risk characterization. Specifically, for each risk type, this information is a comprehensive value obtained by weighted fusion of its structured risk information and risk factor information. The structured risk information is derived from a first dataset (i.e., structured data characterizing the state of core elements in the electricity retail market, such as transaction prices and electricity sales) calculated based on a preset monitoring indicator system. The risk factor information is derived from a second dataset (i.e., unstructured text data characterizing the market environment and policy situation) processed using risk factor extraction algorithms (including keyword recognition, entity recognition, impact degree calculation, and sentiment analysis). Therefore, the historical target risk information is a collection of historical data points fused and processed according to the above method and recorded in chronological order. Its history can be represented as the period corresponding to the current assessment time point.

[0062] In one possible and specific implementation, a method for generating target risk information in the electricity retail market is provided, including:

[0063] Obtain a first dataset and a second dataset; wherein the first dataset is structured data used to characterize the status of core elements in the electricity retail market, and the second dataset is unstructured data used to characterize the market environment and policy situation;

[0064] Based on a preset risk factor extraction algorithm, the second dataset is processed to obtain risk factor information for at least one risk type; wherein, the preset risk factor extraction algorithm is an algorithm used to identify risk events from unstructured text and quantify their degree of impact;

[0065] Based on the preset risk monitoring indicator system for the electricity retail market, the first dataset is processed to obtain structured risk information for at least one risk type.

[0066] The risk factor information and the structured risk information of the same risk type are weighted and fused to generate the target risk information of that risk type.

[0067] Further, the step of processing the second dataset based on a preset risk factor extraction algorithm to obtain risk factor information for at least one risk type includes:

[0068] Based on a pre-built dictionary of electricity market risk keywords, risk-related text content is identified from the second dataset; wherein, the text content includes risk keywords.

[0069] Using a pre-defined named entity recognition algorithm, key entities constituting the risk event are extracted from the identified text content;

[0070] Based on predefined risk impact calculation rules and the key entities, the degree of risk impact of the risk event is calculated;

[0071] Based on a preset sentiment analysis algorithm, the sentiment polarity of text content including the risk keywords is determined, and the corresponding risk impact direction coefficient is output.

[0072] By combining the risk impact degree of at least one of the aforementioned risk events and its corresponding risk impact direction coefficient, the risk factor information of the risk type is calculated.

[0073] Furthermore, the electricity market risk keyword dictionary is pre-constructed using the following method:

[0074] Based on a pre-set set of seed keywords for electricity market risks, a word embedding model is trained on a pre-acquired historical text corpus to calculate extended keywords that are semantically similar to the seed keywords.

[0075] The seed keywords and the extended keywords are merged to generate the electricity market risk keyword dictionary.

[0076] Furthermore, the step of calculating the degree of risk impact of the risk event based on predefined risk impact calculation rules and the key entity includes:

[0077] Based on the risk event type indicated by the key entity, the corresponding basic impact factor is queried from the pre-built event-risk knowledge base;

[0078] Based on the risk impact scope information indicated by the key entities, calculate the scope impact factor;

[0079] Based on the risk consequences information indicated by the key entities, severity impact factors are determined from a pre-built consequences-risk knowledge base;

[0080] The degree of risk impact of the risk event is calculated based on the product of the basic impact factor, the range impact factor, and the severity impact factor.

[0081] Furthermore, the preset risk monitoring indicator system for the electricity retail market includes multiple risk categories. Each risk category includes risk factor indicators and risk outcome indicators, and the indicators are defined for the overall market and individual market entities, respectively.

[0082] The step of processing the first dataset based on the preset electricity retail market risk monitoring indicator system to obtain structured risk information for at least one risk type includes:

[0083] Based on the target risk type, determine the corresponding risk factor indicators and risk outcome indicators from the indicator system;

[0084] Based on the first dataset, calculate the overall market indicator value and the individual market participant indicator value corresponding to the target risk type, respectively.

[0085] Based on a preset weighting scheme, the overall market indicator value and the individual market participant indicator value are weighted and fused to obtain the structured risk information of the target risk type.

[0086] Furthermore, the aforementioned risk categories include market power risk, price risk, operational risk, contract risk, performance risk, settlement risk, compliance risk, and policy risk;

[0087] Among them, the risk factor indicators corresponding to the market power risk include at least the market concentration index defined for the overall market and the price deviation rate index defined for individual market participants; the risk outcome indicators corresponding to the market power risk include at least the proportion of active electricity sales companies defined for the overall market and the total market share index defined for individual market participants.

[0088] Among them, the risk factor indicators corresponding to the price risk include at least a wholesale-retail price correlation indicator defined for the overall market and a wholesale-retail price correlation indicator for individual market participants; the risk outcome indicators corresponding to the price risk include at least a wholesale-retail price inversion rate indicator defined for the overall market and a wholesale-retail price inversion rate indicator for individual market participants.

[0089] The risk factor indicators corresponding to the operational risks include at least the wholesale market price volatility indicator defined for the overall market and the load forecast accuracy indicator defined for individual market participants; the risk outcome indicators corresponding to the operational risks include at least the proportion of loss-making electricity sales companies defined for the overall market and the user stickiness indicator defined for individual market participants.

[0090] Further, the step of weightedly fusing the risk factor information and the structured risk information of the same risk type to generate target risk information for that risk type includes:

[0091] Based on the risk type, a first weighting coefficient configured for the risk factor information and a second weighting coefficient configured for the structured risk information are obtained.

[0092] Calculate the product of the first weighting coefficient and the risk factor information to obtain the first weighted result;

[0093] Calculate the product of the second weighting coefficient and the structured risk information to obtain the second weighted result;

[0094] The first weighted result and the second weighted result are summed to generate the target risk information for this risk type.

[0095] In this embodiment, the historical risk event dataset can be represented as a structured collection of records of past risk events and their actual losses. The risk type identifier can be a symbol or code used to uniquely distinguish different risk categories (e.g., market power risk, price risk, credit risk, etc.). The historical loss quantification can be represented as a numerical measure of the economic loss caused by each historical risk event, which may specifically include monetary losses, electricity losses, or fines incurred due to violations.

[0096] In this embodiment, the historical target risk information and the historical risk event dataset can be pre-stored in a database, and the executing entity (server) can establish a connection with the database. This database can be a relational database (e.g., MySQL, Oracle) or a distributed file system.

[0097] Step S14: Input the historical target risk information into the pre-trained risk occurrence probability prediction model to obtain the occurrence probability of each risk type in the future period.

[0098] In this embodiment, the pre-trained risk occurrence probability prediction model can be represented as a machine learning model whose parameters have been optimized using a large amount of historical data before use. Specifically, it can be various temporal deep learning models, such as Long Short-Term Memory Network (LSTM), Gated Recurrent Unit (GRU), or Temporal Convolutional Network (TCN), etc.

[0099] In actual deployment, the risk occurrence probability prediction model has been trained and its parameters are fixed. Based on the historical target risk information for various risks obtained in step S12, which the executing entity can arrange in chronological order, the executing entity can construct a time-series vector for each risk type. For example, for market power risk, a vector consisting of market concentration index values ​​for N consecutive time points (e.g., the past 30 trading days) can be constructed. Then, the executing entity can use these time-series vectors as input features for the model. The risk occurrence probability prediction model can employ various forms of time-series deep learning models.

[0100] In one possible and specific implementation, a neural network model incorporating an attention mechanism can be employed. This model may include a temporal dependency capture module, whose function is to analyze the correlation between data at different time points in the input sequence and extract dynamic pattern features that characterize the evolution of risk. The final output layer of the model can use activation functions such as Sigmoid or Softmax to map the learned pattern features to probability values ​​between 0 and 1. The probability of each risk type occurring in future periods is thus the probability vector output by the model, where each element corresponds to an estimated probability of a risk event occurring in the next time period (e.g., the next day or the next week) for that risk type.

[0101] In this embodiment, the risk occurrence probability prediction model can be pre-trained in the following manner.

[0102] Specifically, first, a training sample set can be constructed. More specifically, a historical target risk information dataset with a sufficiently long time span and including multiple consecutive time periods can be obtained from a historical database. This historical target risk information dataset can include target risk information values ​​for multiple risk types (e.g., market power risk, price risk, etc.) at each historical point in time. Alternatively, data on risk events that actually occurred after the corresponding time period can be obtained from historical records, and this risk event data can clearly indicate the type of risk event and the time of its occurrence.

[0103] For a given historical time point T, target risk information data for each risk type over the preceding N consecutive time periods (e.g., 24 consecutive months) are used as input features for the model. Whether a certain type of risk event occurred within a specific time period immediately following time point T (e.g., month T+1) is used as the expected output label (i.e., the ground truth in supervised learning) for that sample. If it occurred, the label is 1; otherwise, the label is 0. A large number of training samples can be generated by iterating through the entire historical dataset using a sliding time window.

[0104] Next, model initialization can be performed. A deep learning model that effectively handles time-series data can be chosen as the infrastructure. More specifically, a model architecture including recurrent neural network layers or attention mechanisms can be selected, such as a Long Short-Term Memory network or a time-series transformer model. Internally, this model includes a time-series dependency capture module, capable of effectively learning long-term dependencies in sequence data. The network weights, biases, and other parameters in the model can be initialized to random values ​​at the start of training.

[0105] Finally, model training and parameter optimization are performed. More specifically, the constructed training sample set can be input into the initialized model for training. The training process can employ supervised learning, specifically including: inputting the time series of historical target risk information into the model, which can output predicted probability values ​​of future risk events. This predicted probability value can be compared with the true historical labels to calculate the prediction error (i.e., the value of the loss function, for example, a binary cross-entropy loss function). An error backpropagation algorithm can also be used to calculate the gradient of the loss function with respect to each adjustable parameter in the model. Furthermore, a gradient descent optimization algorithm (or its variants, such as the Adam optimizer) can be used to update the model's parameters based on the calculated gradient direction, thereby reducing the value of the loss function and allowing the model's predicted output to continuously approximate the true situation.

[0106] The entire training process can be iterated in multiple rounds (i.e., multiple training cycles), each time using all or part of the training samples (i.e., batch training) until the model's predictive performance stabilizes on an independent validation dataset, or the loss function value converges to below a preset threshold. At this point, training is complete, and the model parameters are fixed.

[0107] Step S16: Based on the historical risk event dataset, dynamically construct the judgment matrix of the analytic hierarchy process by comparing the statistical characteristics of the historical loss quantification values ​​of different risk types, and calculate the objective assessment weight of each risk type based on the judgment matrix.

[0108] In this embodiment, the dynamic construction can be represented as recalculating the weights based on the latest historical risk event dataset up to that point each time a risk assessment is performed, instead of using fixed weight values, thereby ensuring that the weights can reflect the latest risk impact pattern.

[0109] Specifically, firstly, the implementing entity can group the historical risk event dataset, that is, classify all historical loss quantification values ​​into their respective groups based on risk type identifiers. Next, the statistical characteristics of the historical loss quantification values ​​for different risk types are compared. That is, a representative statistic of all historical loss quantification values ​​within each risk type's group is calculated. One possible and specific implementation is to calculate the arithmetic mean of all historical loss quantification values ​​for that risk type. Another possible and specific implementation is to first convert the loss values ​​into severity scores using a mapping function, and then calculate the median of the scores.

[0110] Then, the implementing entity can dynamically construct the judgment matrix of the analytic hierarchy process (AHP). More specifically, for any two different risk types, their statistical characteristic values ​​(e.g., average value A and average value B) calculated in the preceding steps can be compared. One possible implementation is to divide the statistical characteristic value of risk type A by the statistical characteristic value of risk type B, and the resulting quotient (A / B) is used as the element at the corresponding position in the judgment matrix, representing the importance ratio of risk A relative to risk B. By traversing all pairwise combinations of risk types, a complete judgment matrix satisfying reciprocity can be filled in.

[0111] Finally, the implementing entity can calculate the objective assessment weights for each risk type based on the judgment matrix. More specifically, the implementing entity can employ the standard weight calculation method in the analytic hierarchy process (AHP). One possible and specific implementation method is to use the eigenvalue method, that is, to calculate the largest eigenvalue of the judgment matrix and its corresponding eigenvector, and then normalize the eigenvector to obtain the weight vector. Another possible and specific implementation method is to use the geometric mean method, that is, to calculate the geometric mean of all elements in each row of the judgment matrix, and then normalize the geometric mean of all rows to finally obtain the objective assessment weights for each risk type.

[0112] Step S18: Based on the target risk information of the current period, the probability of occurrence of each risk type and the objective assessment weight, generate the comprehensive risk assessment result of the electricity retail market through fuzzy comprehensive evaluation method.

[0113] In this embodiment, the fuzzy comprehensive evaluation method can be expressed as a mathematical method that applies fuzzy mathematics theory to process qualitative information and solve fuzzy problems in comprehensive evaluation. Its purpose is to transform precise input data into membership degrees of fuzzy concepts and then perform a comprehensive evaluation.

[0114] Specifically, firstly, the implementing entity can process the target risk information for the current period. More specifically, the implementing entity can use a predefined membership function to calculate the degree to which each risk type belongs to a preset risk level (e.g., low, medium, high) based on the latest indicator value (i.e., the current risk status quantification value) for the current period. This yields a corresponding fuzzy evaluation vector for each risk type. For example, a triangular membership function can be used to calculate that the current market concentration index has a membership degree of 0.8 for high risk, 0.2 for medium risk, and 0 for low risk.

[0115] Then, the implementing entity can combine the fuzzy evaluation vectors of all risk types to form a fuzzy relation matrix. The rows of this fuzzy relation matrix correspond to different risk types, and the columns correspond to different risk levels.

[0116] Next, the executing entity can perform a fuzzy synthesis operation. More specifically, the executing entity can perform a matrix multiplication operation between the objective evaluation weight vector (row vector) calculated in step S16 and the fuzzy relation matrix constructed above. This operation can be a weighted average, and the result can be a comprehensive fuzzy evaluation vector. Each element of this comprehensive fuzzy evaluation vector can represent the degree to which the overall risk of the entire electricity retail market belongs to a specific level (e.g., high risk).

[0117] Finally, the implementing entity can generate a comprehensive risk assessment result for the electricity retail market. More specifically, this can be based on the aforementioned comprehensive fuzzy evaluation vector and the probability of occurrence of each risk type. One possible and specific implementation is to assign a score to each risk level (e.g., low = 1, medium = 2, high = 3), and then calculate a weighted average using the comprehensive fuzzy evaluation vector as weights to obtain a final comprehensive risk score. Simultaneously, probability information can also be incorporated into the result as a warning signal; for example, when the probability of occurrence of a certain high-risk type exceeds a threshold, it can be specifically marked in the final assessment. The final result can be a quantitative score, a risk level label, or a report containing detailed compositional information.

[0118] The electricity retail market risk assessment method provided in this embodiment effectively overcomes the shortcomings of traditional methods that rely on subjective experience to set fixed weights by introducing weights dynamically generated based on historical objective data, making the risk assessment results more objective and accurate. Simultaneously, by combining a time-series deep learning model for risk probability prediction, it can keenly capture dynamic market changes and significantly improve the timeliness of risk warnings. Finally, by using fuzzy comprehensive evaluation to deeply integrate objective weights, predicted probabilities, and current market state information, the generated comprehensive risk assessment results are not only highly reliable but also adaptive to market changes, providing strong decision support for precise supervision and risk prevention in the electricity retail market.

[0119] In some implementations, the step of inputting the historical target risk information into a pre-trained risk occurrence probability prediction model to obtain the occurrence probability of each risk type in future periods includes:

[0120] Step S142: Construct corresponding time series vectors from the historical target risk information of each risk type over multiple consecutive time periods.

[0121] In this embodiment, the executing entity can convert historical target risk information into a standard format acceptable to the model through preset data transformation operations. The time series vector can be represented as an ordered data set composed of historical target risk information values ​​arranged in chronological order, which can preserve and present the pattern of risk status evolution over time.

[0122] Specifically, the implementing entity can operate independently for each risk type to be assessed (e.g., market power risk, price risk, etc.). The implementing entity can filter data for a specific risk type from the historical target risk information dataset obtained in step S12. Then, according to the chronological order of timestamps, it selects the target risk information values ​​corresponding to N consecutive and complete time periods (e.g., the past 30 days or 12 months) immediately preceding the current assessment time point. Next, the implementing entity can assemble the above values ​​into a one-dimensional array or tensor in chronological order. This ordered sequence of values ​​constitutes the time series vector corresponding to that risk type. This time series vector can be a Python list, a NumPy array, or a PyTorch / TensorFlow tensor, etc. For all risk types to be assessed, the implementing entity can repeat this process to generate a unique time series vector for each type, which serves as direct input for subsequent model predictions.

[0123] Step S144: Input each of the time series vectors into the pre-trained risk occurrence probability prediction model to obtain dynamic pattern features; wherein, the risk occurrence probability prediction model encodes the input time series vectors through its internal temporal dependency capture module to extract their dynamic pattern features that change over time.

[0124] In this embodiment, the risk occurrence probability prediction model can be composed of two modules connected in series: one is a time-series dependency capture module (equivalent to an encoder) located at the front end, and the other is a probability prediction module (equivalent to a predictor) located at the back end.

[0125] The temporal dependency capture module is responsible for extracting deep features from the input sequence. Specifically, this module may include:

[0126] A recurrent neural network layer, for example, can be a network layer composed of Long Short-Term Memory (LSTM) network units or Gated Recurrent Units (GRUs). This module can process the input time series vectors sequentially by time step, and update its internal state cyclically through its internal gating mechanisms (e.g., forget gate, input gate, output gate) to capture long-term or short-term dependencies in the sequence.

[0127] A self-attention network layer, for example, could be a self-attention layer that constitutes a Transformer encoder. This module can directly model global temporal dependencies by computing attention weights between features at all time steps within a time series.

[0128] Temporal convolutional network layers can be composed of stacked one-dimensional causal convolutional layers. This module can extract local patterns by sliding convolutional kernels along the temporal dimension and expand the receptive field by increasing network depth to capture longer-term dependencies.

[0129] It is understandable that, regardless of the specific structure used, the output of this temporal dependency capture module is the hidden state of the last time step, which is either an aggregated sequence representation or a transformed feature map (dynamic pattern feature). This feature is the result of the module encoding and condensing the temporal patterns contained in the input sequence.

[0130] Step S146: Based on the extracted dynamic pattern features, output the probability value of risk events occurring for each risk type in the next time period.

[0131] In this embodiment, the probability prediction module begins operation in step S146. This module can be a classifier or regressor that takes the dynamic pattern features as input and outputs the probability of risk occurrence. Specifically, the probability prediction module can consist of one or more fully connected layers (i.e., dense layers), and its terminals can use the sigmoid activation function. This module can perform nonlinear transformations and mappings on the received dynamic pattern features, ultimately outputting a scalar value between 0 and 1 for each risk type. This scalar value is the probability value predicted by the model for the occurrence of risk events for each risk type in the next time period.

[0132] In some implementations, the temporal dependency capture module is an attention mechanism module;

[0133] The encoding of the input time series vector to extract its dynamic pattern features that change over time includes:

[0134] The attention mechanism module calculates the importance weights of features at different time steps in the time series vector.

[0135] In this embodiment, the attention mechanism module first receives a time series vector. This time series vector can be viewed as including N time steps (corresponding to N historical periods), with each time step containing a matrix of D feature dimensions. Internally, the attention mechanism module can maintain three trainable parameter matrices: a query matrix, a key matrix, and a value matrix. The attention mechanism module can perform linear transformations on the input sequence with these three parameter matrices respectively, generating corresponding query vector sequences, key vector sequences, and value vector sequences.

[0136] In this embodiment, the attention mechanism module can determine the importance of historical information at different time steps to the current encoding by calculating the similarity between the query vector sequence and the key vector sequence. Specifically, for each query vector at a time step, its dot product with the key vectors of all time steps in the sequence can be calculated. The result is then scaled (divided by the square root of the key vector dimension to prevent gradient vanishing) and normalized using the Softmax function to obtain the weight coefficients. This set of weight coefficients is the importance weight, which represents the proportion of contribution that information from each time step in the historical sequence should occupy when encoding the current dynamic pattern. For example, this mechanism can calculate that the time step corresponding to a key policy event two years ago has a high weight, while the weight of regular fluctuations within the most recent month is low.

[0137] Based on the importance weights, the time series vectors are weighted and summed to generate the dynamic pattern features.

[0138] In this implementation, after obtaining the importance weights, the attention mechanism module can use these weights to perform a weighted summation of the value vector sequence. Specifically, the importance weight of each time step can be multiplied by its corresponding value vector, and then the weighted value vectors of all time steps can be summed to generate a single context vector that incorporates global information. This context vector is the desired dynamic pattern feature.

[0139] In some implementations, the step of dynamically constructing a judgment matrix for the analytic hierarchy process (AHP) based on the historical risk event dataset by comparing the statistical characteristics of historical loss quantification values ​​for different risk types, and calculating the objective assessment weights for each risk type based on the judgment matrix, includes:

[0140] Step S162: Group the historical loss quantification values ​​in the historical risk event dataset according to their corresponding risk type identifiers.

[0141] In this implementation, the executing entity can read each record from a stored dataset of historical risk events. Each record may include two key fields: a risk type identifier (e.g., an enumerated value or code for market power risk or price risk) and a corresponding historical loss quantification value (e.g., economic loss amount, percentage, or standardized score). The executing entity can group all records into different groups based on the risk type identifier field. For example, all records identified as market power risk are grouped into one group, and all records identified as price risk are grouped into another group.

[0142] Step S164: For each risk type, calculate the statistical characteristic values ​​of a set of historical loss quantification values ​​corresponding to it.

[0143] In this embodiment, the executing entity can iterate through each group obtained in step S162. For each data group of risk type, the executing entity can use a preset statistical algorithm to calculate all the historical loss quantification values ​​included in it. For example, the arithmetic mean of the data group can be calculated, the result of which represents the average level of historical losses for that risk type. Alternatively, the median can be calculated to eliminate the interference that extreme outliers may cause. In addition, historical percentiles (e.g., the 75th or 90th percentile) can be used as statistical feature values.

[0144] Step S166: For any two risk types, calculate the objective importance ratio between the two risk types by comparing their respective statistical characteristic values.

[0145] In this embodiment, the executing entity can iterate through all pairwise combinations of risk types (e.g., comparing market power risk and price risk). For any two risk types (denoted as risk A and risk B), the executing entity obtains the statistical characteristic values ​​calculated in step S164 (e.g., the average loss value Avg-A of risk A and the average loss value Avg-B of risk B). The objective importance ratio (denoted as a-ij, representing the importance of risk i relative to risk j) can be obtained by dividing the statistical characteristic value of risk A by the statistical characteristic value of risk B, i.e., a-ij = Avg-A / Avg-B. This quotient characterizes how many times the historical average loss of risk A is greater than that of risk B, thus directly quantifying its relative importance.

[0146] Step S168: Construct the judgment matrix of the analytic hierarchy process based on the objective importance ratio between each pair of all risk types.

[0147] In this implementation, it is assumed that there are n risk types. The executing entity can initialize an n×n square matrix (judgment matrix). The row and column indices of the matrix correspond to the order of each risk type. For the element in the i-th row and j-th column of the matrix, it can be assigned the objective importance ratio a-ij of risk i relative to risk j calculated in step S166. By definition, the elements on the diagonal of the matrix (i=j) represent the ratio of a risk type to itself, and their value is always 1. Furthermore, since the ratio is reciprocal, only the elements of the upper triangular (or lower triangular) part of the matrix need to be calculated and filled. The elements of the lower triangular (or upper triangular) part can be automatically generated by taking the reciprocal, i.e., a-ji=1 / a-ij. This judgment matrix can represent the pairwise objective importance relationship between all risk types.

[0148] Step S1610: Based on the judgment matrix, calculate the objective assessment weight of each risk type using the eigenvalue method or the geometric mean method.

[0149] In this embodiment, the eigenvalue method can be expressed as calculating the largest eigenvalue of the judgment matrix and its corresponding eigenvector. Then, the eigenvector is normalized (i.e., the sum of all elements in the vector is set to 1). The normalized eigenvector is the objective assessment weight vector for each risk type.

[0150] In this embodiment, the geometric mean method can be expressed as calculating the geometric mean of all elements in each row of the judgment matrix. Then, this geometric mean is normalized (i.e., its sum is set to 1), and the normalized result is the objective assessment weight vector for each risk type.

[0151] This implementation method effectively overcomes the shortcomings of traditional methods that rely on subjective experience to set fixed weights by objectively calculating statistical characteristic values ​​based on historical risk event data and dynamically constructing a analytic hierarchy process (AHP) judgment matrix accordingly. This mechanism ensures that weight allocation stems from the statistical regularities of actual loss data, rather than arbitrary assumptions, thus significantly improving the objectivity and accuracy of risk assessment results. Furthermore, because the weights are dynamically adjusted as historical data is updated, the assessment model can adapt to changes in the market environment, avoiding the assessment lag problem caused by static weights, and providing a more scientific and reliable decision-making basis for risk management in the electricity retail market.

[0152] In some implementations, the step of calculating the statistical characteristic values ​​of a set of historical loss quantifications for each risk type includes:

[0153] Step S1642: For each risk type, map its corresponding multiple historical loss quantification values ​​to a preset loss severity score range to obtain the severity score corresponding to each historical loss quantification value; wherein, the mapping relationship is configured such that the larger the loss quantification value, the higher the mapped severity score.

[0154] In this embodiment, the preset loss severity rating range can be represented as a predefined numerical range, which can be a scale used to measure the severity of the loss. The upper and lower limits of the range can be set by domain experts based on historical experience and understanding of the impact on business. For example, it can be set to 1 to 10 points or 0 to 100 points.

[0155] In this implementation, the executing entity can read a set of historical loss quantification values ​​corresponding to each risk type. Then, the executing entity can transform each loss value in the set according to a preset mapping relationship. This mapping relationship can be configured as a monotonically increasing function, for example, a piecewise linear function or a non-linear function based on logarithmic transformation. The preset mapping relationship primarily ensures that the transformed severity score remains non-decreasing as the input loss quantification value increases; that is, the larger the loss quantification value, the higher the mapped severity score. For example, a rule can be defined: when the loss amount is between 0 and 100,000 yuan, the score is linearly mapped to 1-3 points; when the loss amount is between 100,000 and 1,000,000 yuan, the score is linearly mapped to 4-7 points; and when the loss amount exceeds 1,000,000 yuan, the score is fixed at the highest of 10 points. Through this data processing, the original loss values ​​of all risk types can be uniformly transformed to the same severity scoring scale, eliminating the incomparability problem caused by differences in units and orders of magnitude.

[0156] Step S1644: Use the median or arithmetic mean of the severity scores obtained after mapping as the statistical characteristic value of this risk type.

[0157] In this embodiment, for a set of severity scores (a set of values) corresponding to a certain risk type after processing in step S1642, the executing entity can apply a preset statistical aggregation algorithm. For example, the median or the arithmetic mean.

[0158] When using the arithmetic mean, the implementing entity can add up all the values ​​in the set of scores and then divide by the total number of scores to obtain the average. This value reflects the average level of historical loss severity for this type of risk.

[0159] When using the median, the implementing entity first sorts the scores by numerical value. If the number of scores is odd, the middle score is taken as the median; if the number of scores is even, the arithmetic mean of the two middle scores is taken as the median. The median is not sensitive to extreme scores (abnormally high or low loss events), better reflects typical situations, and avoids extreme values ​​distorting the overall judgment.

[0160] In some implementations, the step of calculating the objective importance ratio between any two risk types by comparing their respective statistical characteristic values ​​includes:

[0161] Step S1662: Divide the statistical characteristic value of the first risk type by the statistical characteristic value of the second risk type, and use the resulting quotient as the objective importance ratio of the first risk type relative to the second risk type.

[0162] In this embodiment, the first risk type and the second risk type refer to any two different risk types when making pairwise comparisons, such as market power risk and price risk, or credit risk and compliance risk.

[0163] In some implementations, the step of generating a comprehensive risk assessment result for the electricity retail market using a fuzzy comprehensive evaluation method based on the target risk information of the current period, the probability of occurrence of each risk type, and the objective assessment weights includes:

[0164] Step S182: Based on the target risk information of the current period, determine the quantitative value of the current risk status of each risk type.

[0165] In this embodiment, the target risk information for the current period can be represented as data generated according to a method for generating target risk information in the electricity retail market, and used to characterize the latest comprehensive status of each risk type at the assessment time. It is the final risk quantification representation that has undergone data fusion processing.

[0166] In this implementation, the executing entity can directly use the raw numerical value of the target risk information as the quantified value of the current risk status.

[0167] In this embodiment, the executing entity can also map the original numerical value of the target risk information to a preset unified range (e.g., [0, 1] or [0, 100]) through linear transformation. For example, the executing entity can preset a theoretical maximum value that the risk type may occur in a historical period, and then divide the current value by the maximum value to obtain a relative proportion as a quantified value.

[0168] Step S184: Using a predefined membership function, convert the current risk status quantification value of each risk type into a corresponding fuzzy evaluation vector, wherein the fuzzy evaluation vector represents the degree of membership of the risk status to multiple preset risk levels.

[0169] In this embodiment, the predefined membership function can be expressed as a mathematical function that defines the attribution relationship between precise input values ​​(i.e., the current risk state quantification value) and fuzzy concepts (i.e., preset risk levels). Each risk level can correspond to an independent membership function. The preset multiple risk levels constitute the domain of discourse for evaluation, which can be a set of linguistic variables used to qualitatively describe the risk level. For example, it can be preset as three levels: {low risk, medium risk, high risk}, or more detailed five levels, etc.

[0170] In this embodiment, the fuzzy evaluation vector can be a mathematical vector, where each element of the vector represents the degree to which the current risk state belongs to a corresponding preset risk level. It can be represented by a value between 0 and 1 (called the membership degree), where 0 means not belonging to the level at all and 1 means belonging to the level completely.

[0171] In this implementation, for each risk type, the implementing entity may perform the following operations:

[0172] The executing entity can obtain the current risk status quantification value (denoted as x) determined in step S182 for this risk type. Then, for each preset risk level (e.g., for a low risk level), the executing entity can call a predefined membership function for that level to perform calculations. This function can receive the input value x and output a membership value indicating the degree to which x belongs to that risk level. The membership function can be a triangular membership function, a trapezoidal membership function, or a Gaussian membership function, etc. For example, for a medium risk level, a pre-triangular membership function can be used, with its vertex corresponding to the quantization value 50. When the input x = 50, the membership output is 1; when x deviates from 50, the membership decreases from 1 to 0 on both sides.

[0173] The executing entity can iterate through all preset risk levels and calculate a membership degree for each level. Finally, the executing entity can arrange the above membership degrees in the order of the preset risk levels to form an ordered numerical sequence, which constitutes the fuzzy evaluation vector for that risk type. For example, if the risk level is {low, medium, high}, the calculated fuzzy evaluation vector could be (0.2, 0.7, 0.1), which indicates that the current risk state belongs to low risk with a degree of 0.2, to medium risk with a degree of 0.7, and to high risk with a degree of 0.1.

[0174] Step S186: Combine the fuzzy evaluation vectors of each risk type to form a fuzzy relation matrix.

[0175] In this embodiment, assuming that n risk types need to be evaluated and m risk levels are preset (e.g., m=3, corresponding to {low, medium, high}), each fuzzy evaluation vector can be a row vector with m elements. The executing entity can stack and combine these row vectors according to a fixed order of risk types (e.g., market power risk, price risk, operational risk, etc.). Finally, the above vectors can jointly form an n x m matrix, which is the fuzzy relation matrix, denoted as R. In this matrix R, the element r-ij in the i-th row and j-th column represents the membership degree of the current state of the i-th risk type to the j-th preset risk level. Therefore, each row of this matrix represents the membership of a risk type to different risk levels, while each column represents the membership of different risk types to the same risk level.

[0176] Step S188: Perform a fuzzy synthesis operation on the objective evaluation weight vector and the fuzzy relation matrix to obtain a comprehensive fuzzy evaluation vector.

[0177] In this embodiment, firstly, the executing entity can obtain the objective evaluation weight vector calculated in the previous steps. This objective evaluation weight vector can be an ordered list containing multiple elements, where each element corresponds to a weight coefficient for a specific risk type, and the sum of all weight coefficients is one. Simultaneously, the executing entity can access the fuzzy relation matrix constructed in step S186. This fuzzy relation matrix can be a two-dimensional table, with the number of rows equal to the number of risk types and the number of columns equal to the number of preset risk levels. The value of each cell in the matrix represents the degree to which a specific risk type belongs to a specific risk level.

[0178] Then, the implementing entity can perform fuzzy synthesis operations. This fuzzy synthesis operation can employ a weighted average operator. Specifically, for each preset risk level, the implementing entity can calculate the comprehensive membership degree of that level. This comprehensive membership degree is obtained by multiplying the weight coefficient of each risk type by its membership degree at that risk level, and then summing these multiplications for all risk types. In other words, the final comprehensive membership degree of each risk level is the weighted average of the membership degrees of all risk types to that level, with the weights being the objective assessment weights of each risk type. The implementing entity can repeat this calculation process for all preset risk levels, ultimately obtaining a new vector, namely the comprehensive fuzzy evaluation vector. Each element of this vector represents the degree of fuzziness in which the overall risk status of the entire electricity retail market belongs to the corresponding preset risk level after comprehensively considering all risk types and their objective importance.

[0179] Step S1810: Based on the comprehensive fuzzy evaluation vector and the probability of occurrence of each risk type, calculate the comprehensive risk evaluation result of the electricity retail market.

[0180] In this embodiment, firstly, the executing entity can aggregate the occurrence probabilities of each risk type into a single comprehensive probability index. For example, it can calculate the weighted average of the occurrence probabilities of all risk types, or use the highest occurrence probability as the representative. Next, the executing entity can use this comprehensive probability index to adjust the comprehensive fuzzy evaluation vector. For example, it can proportionally amplify each membership value in the vector, with the amplification factor determined by the comprehensive probability index, thereby obtaining a new comprehensive fuzzy evaluation vector weighted by future risk probabilities. Finally, the executing entity can refine the adjusted vector. For example, it can select the risk level with the highest membership degree as the final evaluation, or calculate a specific risk score by calculating the weighted sum of the vector and the representative score of a preset risk level.

[0181] This implementation method incorporates objective assessment weights, risk occurrence probabilities, and current market state information into a fuzzy comprehensive evaluation framework. First, it utilizes membership functions to address the inherent uncertainties and fuzziness in risk assessment, making the evaluation process more realistic. Second, by using fuzzy synthesis with objective weights dynamically generated based on historical data, it ensures that the evaluation results are unaffected by subjective biases, significantly improving the objectivity and accuracy of the assessment. Finally, it innovatively integrates the predicted risk occurrence probabilities with the fuzzy evaluation results, ensuring that the final comprehensive risk assessment not only reflects the current static risk level but also includes dynamic probability information about future risk evolution. This achieves a more comprehensive, accurate, and forward-looking assessment of risks in the electricity retail market, providing a more reliable basis for risk warning and decision-making.

[0182] In one specific implementation plan, a method for risk assessment in the electricity retail market is provided, which may include:

[0183] S1. Calculation of the probability of risk occurrence.

[0184] Based on a method for generating target risk information in the electricity retail market, the data of comprehensive monitoring indicators for N risk types over the most recent T time periods are used to construct an input vector X.

[0185] Then, the input vector X is fed into the trained LSTM neural network model to obtain its output. (t+1) represents the occurrence of various risks in the next time period. The probability of market power risk. For example, market power risk can manifest as: the occurrence of market manipulation events, or being subject to regulatory penalties due to market manipulation.

[0186] S2. Risk impact assessment based on improved analytic hierarchy process and fuzzy evaluation.

[0187] The goal of this step is to assess the severity of the potential impact of various risks should they occur.

[0188] 1. Construct the judgment matrix.

[0189] 1.1 Define the target layer and criteria layer of the hierarchical analysis.

[0190] The target layer is the overall risk impact on the electricity retail market, while the criteria layer needs to assess n different types of risks (such as market power risk C1, price risk C2, operational risk C3, etc.), which together constitute a criterion set C = {C1, C2, ..., Cn}.

[0191] 1.2 Calculate the importance ratio based on historical data.

[0192] a. Determine the quantitative basis and define a function for each type of risk that maps its original loss value to a uniform dimensionless fraction.

[0193] Specifically, for market power risk, the loss measure can be "the percentage by which the average market price deviates from the normal level due to the event"; for credit risk, the loss measure can be "the proportion of bad debts caused by the electricity sales company involved to the total amount of debt"; and for policy risk, the loss measure can be "the proportion of the number of users affected by the policy to the total number of users".

[0194] Specifically, statistical analysis is performed on all historical loss values ​​of risk C to calculate the percentile of that loss value within the historical data of that risk. For example, if the loss value L_price of a certain price risk is at the 90th percentile of its historical data, then the severity score Q_price of this event is considered to be 90.

[0195] b. Process historical data: Traverse the historical dataset, find all records of risky events, and calculate the average severity score of all historical events.

[0196] c. Calculate the objective importance ratio: For any two risks Ci and Cj, their importance ratio a_ij is determined by their historical average losses. The formula is: a_ij = avg(L_i) / avg(L_j)

[0197] Here, a_ij represents the importance ratio of risk Ci to risk Cj. This value directly reflects the objective proportional relationship between the two in historical data.

[0198] d. Construct the judgment matrix: Fill all the importance ratios a_ij obtained from pairwise comparisons into an n*n matrix A to obtain the objective judgment matrix. By definition, this matrix satisfies a_ji = 1 / a_ij, and the diagonal element a_ii = 1.

[0199] 1.3 Calculate the weight vector.

[0200] For the constructed objective judgment matrix A, calculate the geometric mean of the elements in each row of the matrix. :

[0201]

[0202] in, It is the multiplication symbol.

[0203] Then, the geometric mean vector is normalized to obtain the weight vector:

[0204]

[0205] in, This is the final weight of the i-th risk Ci. All weights The sum is 1.

[0206] 2. Fuzzy evaluation.

[0207] 2.1 Determine the set of comments.

[0208] Define a set of linguistic variables to describe the degree of risk impact. For example, it can be defined as a rating set V={v1,v2,v3} ={low, medium, high} (the rating can be more or less, such as including very low and very high).

[0209] 2.2 Establish the membership function.

[0210] Define a membership function for each rating level. This function represents the degree to which a specific loss severity score x belongs to level v. Trapezoidal or triangular membership functions are typically used.

[0211] 2.3 Fuzzy Evaluation of Single Risk Type

[0212] a. Obtain the latest structured data (such as real-time prices and company reports) and unstructured data related to risk Ci from the data layer, corresponding to risk factor values ​​(if necessary).

[0213] b. Using the data obtained in step a as input, a potential loss due to risk Ci is estimated by using a pre-trained machine learning model (an LSTM model independent of step S3).

[0214] c. Input the estimated value into the severity scoring function designed specifically for risk Ci to obtain the severity score of the current estimated loss.

[0215] d. Input this dimensionless severity score into the membership function to obtain the single-risk fuzzy evaluation result. =[ , Where x is the severity score in step c.

[0216] 2.4 Comprehensive Fuzzy Evaluation

[0217] The objective weight vector of all risks W=[ , , ..., The membership matrix R of all risks (composed of each) As a single row, the results are combined to obtain the fuzzy evaluation result B of the comprehensive risk impact on the electricity retail market. The calculation formula is as follows: .

[0218] Where B is a comprehensive membership vector, its dimension is the same as the dimension of the comment set V, for example [ This indicates that, overall, the impact of the current risk situation falls into various levels. The composition operator is represented by a weighted average operator, i.e. ,in It is the element in the i-th row and j-th column of the R matrix (i.e., the membership degree of risk i to comment j).

[0219] The weight W here is not derived from subjective judgment, but from historical objective data, which makes the final comprehensive fuzzy evaluation result B more scientific and credible, avoiding interference from human subjectivity.

[0220] S5. Risk level calculation.

[0221] The comprehensive risk score can be calculated using the following formula. :

[0222]

[0223] in, It is the score assigned to each rating level.

[0224] For example, if the evaluation rating w=[1,2,3] and B=[0.1, 0.6, 0.3], then... = 0.1*1 + 0.6*2 + 0.3*3 = 2.2. This means that the current overall market risk level is between "medium" and "high".

[0225] This implementation method addresses the risks present in the electricity retail market by combining market risk monitoring indicator design theory, distinguishing between process and outcome indicators, and starting from the overall market and individual entities. It designs an indicator system for monitoring risks in the electricity retail market, thereby comprehensively and in real time reflecting multi-dimensional risk factors such as market power, policies, and credit. However, this results in low accuracy in predicting the probability of risk occurrence.

[0226] This implementation method, through multi-source heterogeneous data acquisition and fusion technology and natural language processing technology, breaks through the limitations of traditional methods in terms of one-sided data, realizes the comprehensive capture and quantification of multi-dimensional risk factors, provides a rich and accurate data foundation for probability prediction, and improves the accuracy of risk occurrence probability calculation.

[0227] This implementation method dynamically generates the analytic hierarchy process (AHP) judgment matrix based on historical data, which solves the shortcomings of the traditional method in terms of subjective and static weights. This allows the risk assessment model to automatically adjust with market changes, making the assessment results more objective and reliable.

[0228] like Figure 3 As shown, according to an embodiment of the present invention, a risk assessment device for the electricity retail market is provided, comprising:

[0229] The acquisition module is used to acquire historical target risk information for multiple risk types in the electricity retail market, as well as a historical risk event dataset; wherein, the historical risk event dataset includes risk type identifiers and corresponding historical loss quantification values;

[0230] The prediction module is used to input the historical target risk information into a pre-trained risk occurrence probability prediction model to obtain the probability of occurrence of each risk type in the future period.

[0231] The calculation module is used to dynamically construct a judgment matrix of the analytic hierarchy process based on the historical risk event dataset by comparing the statistical characteristics of the historical loss quantification values ​​of different risk types, and to calculate the objective evaluation weight of each risk type based on the judgment matrix.

[0232] The generation module is used to generate a comprehensive risk assessment result for the electricity retail market based on the target risk information of the current period, the probability of occurrence of each risk type, and the objective assessment weight, using the fuzzy comprehensive evaluation method.

[0233] According to an embodiment of the present invention, an electronic device is provided; please refer to... Figure 4 The electronic device in this embodiment may include one or more of the following components: a processor, a network interface, memory, non-volatile memory, and one or more application programs, wherein the one or more application programs may be stored in non-volatile memory and configured to be executed by one or more processors, and the one or more programs are configured to perform the methods as described in the foregoing method embodiments.

[0234] According to embodiments of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a computer, causes the computer to perform the method described in any of the above embodiments.

[0235] According to embodiments of the present invention, a computer program product comprising instructions is also provided, which, when executed by a computer, cause the computer to perform a method in any of the above embodiments.

[0236] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for risk assessment in the electricity retail market, characterized in that, include: Acquire historical target risk information for multiple risk types in the electricity retail market, as well as a historical risk event dataset; wherein, the historical risk event dataset includes risk type identifiers and corresponding historical loss quantification values; The historical target risk information is input into a pre-trained risk occurrence probability prediction model to obtain the probability of occurrence of each risk type in future periods; Based on the historical risk event dataset, by comparing the statistical characteristics of the historical loss quantification values ​​of different risk types, a judgment matrix of the analytic hierarchy process is dynamically constructed, and the objective assessment weight of each risk type is calculated based on the judgment matrix. Based on the target risk information of the current period, the probability of occurrence of each risk type, and the objective assessment weight, a comprehensive risk assessment result for the electricity retail market is generated using the fuzzy comprehensive evaluation method.

2. The method according to claim 1, characterized in that, The step of inputting the historical target risk information into a pre-trained risk occurrence probability prediction model to obtain the occurrence probability of each risk type in future periods includes: The historical target risk information of each risk type over multiple consecutive time periods is used to construct corresponding time series vectors. Each of the aforementioned time series vectors is input into the pre-trained risk occurrence probability prediction model to obtain dynamic pattern features; wherein, the risk occurrence probability prediction model encodes the input time series vectors through its internal temporal dependency capture module to extract their dynamic pattern features that change over time. Based on the extracted dynamic pattern features, the probability value of risk events occurring for each risk type in the next time period is output.

3. The method according to claim 2, characterized in that, The temporal dependency capture module is an attention mechanism module; The encoding of the input time series vector to extract its dynamic pattern features that change over time includes: The attention mechanism module is used to calculate the importance weights of features at different time steps in the time series vector. Based on the importance weights, the time series vectors are weighted and summed to generate the dynamic pattern features.

4. The method according to claim 1, characterized in that, The steps of dynamically constructing a judgment matrix for the analytic hierarchy process (AHP) based on the historical risk event dataset by comparing the statistical characteristics of historical loss quantification values ​​for different risk types, and calculating the objective assessment weights for each risk type based on the judgment matrix, include: The historical loss quantification values ​​in the historical risk event dataset are grouped according to their corresponding risk type identifiers; For each risk type, calculate the statistical characteristic values ​​of a set of historical loss quantification values ​​corresponding to it; For any two risk types, the objective importance ratio between the two risk types is calculated by comparing their respective statistical characteristic values. Based on the objective importance ratio between all risk types, construct the judgment matrix of the analytic hierarchy process. Based on the judgment matrix, the objective assessment weights of each risk type are calculated using the eigenvalue method or the geometric mean method.

5. The method according to claim 4, characterized in that, The step of calculating the statistical characteristic values ​​of a set of historical loss quantification values ​​corresponding to each risk type includes: For each risk type, its corresponding multiple historical loss quantification values ​​are mapped to a preset loss severity score range to obtain the severity score corresponding to each historical loss quantification value; wherein, the mapping relationship is configured such that the larger the loss quantification value, the higher the mapped severity score. The median or arithmetic mean of the severity scores obtained after mapping is used as the statistical characteristic value of this risk type.

6. The method according to claim 4, characterized in that, The step of calculating the objective importance ratio between any two risk types by comparing their respective statistical characteristic values ​​includes: Divide the statistical characteristic value of the first risk type by the statistical characteristic value of the second risk type, and use the quotient as the objective importance ratio of the first risk type relative to the second risk type.

7. The method according to claim 1, characterized in that, The steps for generating a comprehensive risk assessment result for the electricity retail market using the fuzzy comprehensive evaluation method based on the target risk information of the current period, the probability of occurrence of each risk type, and the objective assessment weights include: Based on the target risk information of the current period, determine the quantitative value of the current risk status of each risk type; Using a predefined membership function, the current risk status quantification value of each risk type is converted into a corresponding fuzzy evaluation vector, wherein the fuzzy evaluation vector represents the degree of membership of the risk status to multiple preset risk levels; The fuzzy evaluation vectors of each risk type are combined to form a fuzzy relation matrix; The objective evaluation weight vector and the fuzzy relation matrix are combined using a fuzzy synthesis operation to obtain a comprehensive fuzzy evaluation vector. Based on the comprehensive fuzzy evaluation vector and the probability of occurrence of each risk type, the comprehensive risk assessment result of the electricity retail market is calculated.

8. A risk assessment device for the electricity retail market, characterized in that, include: The acquisition module is used to acquire historical target risk information for multiple risk types in the electricity retail market, as well as a historical risk event dataset; wherein, the historical risk event dataset includes risk type identifiers and corresponding historical loss quantification values; The prediction module is used to input the historical target risk information into a pre-trained risk occurrence probability prediction model to obtain the probability of occurrence of each risk type in the future period. The calculation module is used to dynamically construct a judgment matrix of the analytic hierarchy process based on the historical risk event dataset by comparing the statistical characteristics of the historical loss quantification values ​​of different risk types, and to calculate the objective evaluation weight of each risk type based on the judgment matrix. The generation module is used to generate a comprehensive risk assessment result for the electricity retail market based on the target risk information of the current period, the probability of occurrence of each risk type, and the objective assessment weight, using the fuzzy comprehensive evaluation method.

9. An electronic device, characterized in that, include: A memory, and one or more processors communicatively connected to the memory; The memory stores instructions that can be executed by the one or more processors to cause the one or more processors to implement the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.