Market power discrimination method and device, equipment, storage medium and program product
By introducing the isolation forest model and attention mechanism into the market power discrimination of generating units, the problem of low accuracy of unsupervised learning in the existing technology is solved, and more efficient market power discrimination and abuse identification are achieved.
Patent Information
- Application Number
- CN202411738953.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-01-21
AI Technical Summary
The existing methods for identifying market power of generator sets are less accurate when unsupervised learning, making it difficult to effectively identify the abuse of market power of generator sets.
Using the isolated forest model combined with the attention mechanism, by obtaining the market data of the generating unit to be discriminated, the depth and discriminating indicators of the isolated forest model (such as retention capacity, quotation consistency and quotation consistency) are used to determine the abnormal score of the data, and Market power is judged based on abnormal scores and preset thresholds.
The accuracy and efficiency of market power discrimination under unsupervised learning conditions are improved, and the ability to identify the abuse of market power by generating units is enhanced.
Smart Images

Figure CN119338504A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power systems, and in particular to a market power determination method, device, equipment, storage medium and program product. Background Art
[0002] In the electricity market, the risk of abuse of market power can exist in multiple transaction links. For example, power generation companies or groups use certain means to limit the sales volume of electricity commodities below the level of perfect competition and maintain commodity prices above marginal cost prices to seek huge profits, which brings huge risks to the electricity market. Therefore, it is crucial for the supervision of power generators to promptly identify and prevent the abuse of market power by power generators.
[0003] The existing methods for determining the market power of power generating units mainly include hesitant fuzzy analytic hierarchy process, deep learning algorithm, AdaBoost-DT classification algorithm and improved support vector machine.
[0004] However, due to the privacy of electricity trading data, electricity trading data samples used for training are often unlabeled, so learning and discrimination need to be performed under unsupervised conditions. The above-mentioned generator market power discrimination method has low accuracy when performing unsupervised learning. Summary of the invention
[0005] Based on this, it is necessary to provide a market power determination method, device, equipment, storage medium and program product that can improve the accuracy of market power determination of power generating sets in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for determining market power. The method comprises:
[0007] Obtain the market data to be determined for the power generating units;
[0008] The market data to be determined is input into an isolation forest model to determine an abnormality score of the market data to be determined according to the market data to be determined and the depth of the isolation forest model; the isolation forest model is determined based on market data samples and a discrimination index; the discrimination index includes the retained capacity, quotation consistency and reported quantity consistency of the power generation unit;
[0009] According to the abnormal score and the preset threshold, the market power determination result of the market data to be determined is determined.
[0010] In one embodiment, the method further comprises:
[0011] Obtaining a market data sample of the generator set, and determining a discrimination index of the isolation forest model according to the market data sample;
[0012] For each of the discrimination indicators, a cutting plane is determined according to the discrimination indicator; the cutting plane is used to divide the data input to the isolation forest model;
[0013] The market data sample is divided according to each cutting plane in turn to obtain an isolated tree;
[0014] The isolation forest model is determined according to a plurality of the isolated trees.
[0015] In one embodiment, determining the discrimination index of the isolation forest model according to the market data sample includes:
[0016] Obtaining initial characteristic indicators of market power for the market data sample;
[0017] Performing a linear transformation on each of the initial characteristic indicators to obtain a low-dimensional vector corresponding to the initial characteristic indicator;
[0018] Determine the attention weight of each low-dimensional vector based on the activation function;
[0019] For each initial feature indicator, the discriminant indicator corresponding to the initial feature indicator is determined according to the low-dimensional vector corresponding to the initial feature indicator and the attention weight of the low-dimensional vector, and the discriminant indicator corresponding to each initial feature indicator is used as the discriminant indicator of the isolation forest model.
[0020] In one embodiment, the market data sample is divided according to each cutting plane in turn, including:
[0021] For each cutting point corresponding to the cutting surface, the market data samples whose cutting dimension corresponding to the discrimination index is smaller than the cutting point are divided into the left branch, and the market data samples whose cutting dimension corresponding to the discrimination index is larger than the cutting point are divided into the right branch.
[0022] In one embodiment, determining the abnormality score of the market data to be identified according to the market data to be identified and the depth of the isolation forest model includes:
[0023] Determine the average depth of each isolated tree of the to-be-identified market data in the isolation forest model, the first sample quantity of the leaf node where the to-be-identified market data is located, and the second sample quantity of the parent node of the leaf node;
[0024] An abnormality score of the market data to be identified is determined according to the average depth, the first sample quantity, and the second sample quantity.
[0025] In one embodiment, determining the market power identification result of the to-be-identified market data according to the abnormal score and the preset threshold value includes:
[0026] If the abnormal score exceeds the preset threshold, the market power identification result of the market data to be identified is determined to be a market power application abnormality;
[0027] If the abnormal score does not exceed the preset threshold, it is determined that the market power identification result of the market data to be identified is that the application of market power is normal.
[0028] In a second aspect, the present application also provides a market power determination device. The device comprises:
[0029] A first acquisition module is used to acquire the market data to be determined of the power generation unit;
[0030] A first determination module is used to input the market data to be determined into an isolation forest model to determine an abnormality score of the market data to be determined according to the market data to be determined and the depth of the isolation forest model; the isolation forest model is determined based on market data samples and a discrimination index; the discrimination index includes the retained capacity, quotation consistency and reported quantity consistency of the power generation unit;
[0031] The second determination module is used to determine the market power determination result of the market data to be determined according to the abnormal score and a preset threshold.
[0032] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0033] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.
[0034] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of any of the above methods when executed by a processor.
[0035] The above-mentioned market power discrimination method, device, equipment, storage medium and program product obtain the market data to be judged of the power generation unit, input the market data to be judged into the isolation forest model, and determine the abnormal score of the market data to be judged according to the depth of the market data to be judged and the isolation forest model, and determine the market power discrimination result of the market data to be judged according to the abnormal score and the preset threshold. Among them, the isolation forest model is determined based on the market data sample and the discrimination index, and the discrimination index includes the retained capacity, quotation consistency and quotation consistency of the power generation unit. Because the isolation forest model is introduced in the embodiment of the present application when judging the market power, the accuracy in unsupervised learning is improved, thereby improving the accuracy and efficiency of market power discrimination. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] FIG1 is an internal structure diagram of a computer device provided in an embodiment of the present application;
[0037] FIG2 is a flow chart of a method for determining market power according to an embodiment of the present application;
[0038] FIG3 is a flow chart of a method for determining an isolation forest model provided in an embodiment of the present application;
[0039] FIG4 is a flow chart of a method for determining a discrimination index provided in an embodiment of the present application;
[0040] FIG5 is a flow chart of a method for determining an abnormality score provided in an embodiment of the present application;
[0041] FIG6 is a flow chart of a method for determining a market power determination result provided in an embodiment of the present application;
[0042] FIG7 is a flow chart of a method for determining the market power of a generator set based on an attention mechanism and an isolation forest according to an embodiment of the present application;
[0043] FIG8 is a structural block diagram of a market power determination device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] In the electricity market, the risk of abuse of market power can exist in multiple transaction links. For example, power generation companies or groups use certain means to limit the sales volume of electricity commodities below the level of perfect competition and maintain commodity prices above marginal cost prices to seek huge profits, which brings huge risks to the electricity market. Therefore, it is crucial for the supervision of power generators to promptly identify and prevent the abuse of market power by power generators.
[0046] The existing methods for determining the market power of power generating units mainly include hesitant fuzzy analytic hierarchy process, deep learning algorithm, AdaBoost-DT classification algorithm and improved support vector machine.
[0047] However, due to the privacy of electricity trading data, electricity trading data samples used for training are often unlabeled, so learning and discrimination need to be performed under unsupervised conditions. The above-mentioned generator market power discrimination method has low accuracy when performing unsupervised learning.
[0048] The market power determination method provided in the embodiment of the present application can be applied in the application environment as shown in Figure 1. Figure 1 is an internal structure diagram of a computer device provided in the embodiment of the present application. The computer device can be a server, and its internal structure diagram can be as shown in Figure 1. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a market power determination method is implemented.
[0049] Those skilled in the art will understand that the structure shown in FIG. 1 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0050] In one embodiment, as shown in FIG. 2 , FIG. 2 is a flow chart of a market power determination method provided in an embodiment of the present application. The method can be applied to the computer device in FIG. 1 . The method includes the following steps:
[0051] S201, obtaining the market data to be determined of the power generating set.
[0052] Exemplarily, the market data to be determined of the power generating set may include, for example, operation rule data related to the power generating set in the power market, day-ahead and real-time market clearing data, quotation and quantity reporting data of market players, etc.
[0053] In one embodiment, an initial market data sample of a power generation unit may be obtained, and data outliers and missing values in the initial market data sample may be detected, and then the average value of several data before and after the outlier data / missing data may be determined, and the outlier data / missing data may be replaced with the average value to correct the outliers and missing values in the initial market data sample, and the corrected initial market data sample may be used as the market data to be identified. An outlier refers to a measured value in a group of measured values whose deviation from the average value exceeds two times the standard deviation.
[0054] For example, the data outliers and missing values in the initial market data sample can be corrected by the following formula (1):
[0055] (1)
[0056] In formula (1), are the outliers / missing values in the initial market data sample, is the first i observations of outliers / missing values in the initial market data sample, are the first i observations of outliers / missing values in the initial market data sample.
[0057] S202, inputting the market data to be identified into the isolation forest model to determine the abnormality score of the market data to be identified according to the market data to be identified and the depth of the isolation forest model.
[0058] Among them, the judgment indicators include the retained capacity of the power generating units, the consistency of the quotations and the consistency of the reported quantities.
[0059] In one embodiment, a market data sample of the power market can be obtained, and multiple initial feature indicators such as the retained capacity, quotation consistency, and quantity consistency of the power generator can be determined based on the market data sample and the actual performance of the power generator market in the power spot market. Then, each initial feature indicator is linearly transformed to obtain a low-dimensional vector corresponding to the initial feature indicator, and the attention weight of each low-dimensional vector is determined based on the activation function. For each initial feature indicator, the discriminant indicator corresponding to the initial feature indicator is determined based on the low-dimensional vector corresponding to the initial feature indicator and the attention weight of the low-dimensional vector, and the discriminant indicator corresponding to each initial feature indicator is used as the discriminant indicator of the isolation forest model, and a discriminant indicator set is constructed.
[0060] Optionally, a random selection can be made from a sample of market data samples as a sub-sample set, and put the sub-sample set into the root node of the isolated tree. Then randomly select a discriminant indicator from the discriminant indicator set as a cutting dimension, and randomly select a cutting point on the cutting dimension. Determine a cutting plane based on the randomly selected cutting point, and cut the sub-sample set placed in the root node of the isolated tree based on the cutting plane, and divide the data samples smaller than the cutting point on the cutting dimension into the left branch, and the data samples larger than the cutting point into the right branch. Perform the above steps according to each discriminant indicator in the discriminant indicator set in turn to divide the data samples until the preset conditions are met and the division is stopped to obtain an isolated tree. Repeat the above steps t times, and construct an isolation forest model based on the t isolated trees obtained.
[0061] In a possible implementation, each isolated tree in the isolation forest model can be traversed to determine the leaf nodes where the market data to be identified is located in each isolated tree, obtain the depth of each leaf node, calculate the average depth based on the depth of each leaf node, and then determine the first sample number of the leaf node and the second sample number of the parent node of the leaf node. According to the average depth, the first sample number, and the second sample number, the abnormal score of the generator group corresponding to the market data to be identified is determined.
[0062] S203: Determine the market power identification result of the market data to be identified according to the abnormality score and the preset threshold.
[0063] In one embodiment, a preset threshold can be set according to the overall situation of the electricity market. After the abnormal score of the market data to be judged is determined, the abnormal score can be compared with the preset threshold. If the abnormal score exceeds the preset threshold, the market power judgment result of the market data to be judged is determined to be abnormal market power application; if the abnormal score does not exceed the preset threshold, the market power judgment result of the market data to be judged is determined to be normal market power application.
[0064] In an embodiment of the present application, the market data to be determined of the power generation unit is obtained, and the market data to be determined is input into the isolation forest model to determine the abnormal score of the market data to be determined according to the depth of the market data to be determined and the isolation forest model, and the market power determination result of the market data to be determined is determined according to the abnormal score and the preset threshold. Among them, the isolation forest model is determined based on the market data sample and the determination index, and the determination index includes the retained capacity, quotation consistency and reported quantity consistency of the power generation unit. Since the isolation forest model is introduced in the embodiment of the present application when determining the market power, the accuracy in unsupervised learning is improved, thereby improving the accuracy and efficiency of market power determination.
[0065] In order to more clearly illustrate the beneficial effects of the market power identification method provided in the embodiment of the present application, the market power identification results obtained by the market power identification method based on isolation forest provided in the embodiment of the present application can be compared with the market power identification results obtained by the traditional one-class support vector machine (One-Class SVM) algorithm, as shown in the following Table 1:
[0066]
[0067] Table 1
[0068] According to the data shown in Table 1, it can be seen that compared with the One-classSVM algorithm, the market power discrimination method based on isolation forest provided in the embodiment of the present application has doubled the accuracy in detecting abnormal samples compared with the One-classSVM algorithm, and from the perspective of the recall rate indicator, the market power discrimination method based on isolation forest provided in the embodiment of the present application has a greater advantage.
[0069] Referring to Figure 3, Figure 3 is a flow chart of a method for determining an isolation forest model provided in an embodiment of the present application. Based on the above embodiment, the method further includes the following steps:
[0070] S301, obtaining market data samples of the power generation market, and determining a discrimination index of the isolation forest model according to the market data samples.
[0071] In one embodiment, a market data sample of the power market can be obtained, and multiple initial feature indicators such as the retained capacity, quotation consistency, and quantity consistency of the power generator can be determined based on the market data sample and the actual performance of the power generator market in the power spot market. Then, each initial feature indicator is linearly transformed to obtain a low-dimensional vector corresponding to the initial feature indicator, and the attention weight of each low-dimensional vector is determined based on the activation function. For each initial feature indicator, the discriminant indicator corresponding to the initial feature indicator is determined based on the low-dimensional vector corresponding to the initial feature indicator and the attention weight of the low-dimensional vector, and the discriminant indicator corresponding to each initial feature indicator is used as the discriminant indicator of the isolation forest model, and a discriminant indicator set is constructed.
[0072] S302: for each discrimination index, determine a cutting surface according to the discrimination index.
[0073] The cutting plane is used to divide the data input into the isolation forest model.
[0074] For example, the indicator set can be determined Select a feature As a cutting dimension, a cutting point k is randomly generated on the cutting dimension, and then a cutting surface is determined according to the cutting point k.
[0075] The cutting point k is between the maximum and minimum values of the data sample on the cutting dimension, which can be expressed as the following formula (2):
[0076] (2)
[0077] In formula (2), represents the jth discriminant index value of the i-th data sample, d represents the discriminant index, represents the subsample set, , Respectively represent the minimum and maximum values of the data samples on the cutting dimension.
[0078] S303, dividing the market data samples according to each cutting plane in turn to obtain an isolated tree.
[0079] Optionally, you can sample market data from Random selection samples as sub-sample sets, and put the sub-sample sets into the root node of the isolation tree. Then randomly select a cutting plane to cut the sub-sample set put into the root node of the isolation tree, and divide the data samples smaller than the cutting point k on the cutting dimension into the left branch, and divide the data samples larger than the cutting point k into the right branch. Perform the above steps according to each cutting plane in turn to divide the data samples until the preset conditions are met and the division stops, and an isolation tree is obtained.
[0080] Optionally, the preset condition may include, for example, that there is only one sample point in all child nodes, or that the height of the isolated tree reaches a preset height. The preset height may be, for example, .
[0081] S304, determining an isolation forest model according to the plurality of isolated trees.
[0082] In one embodiment, the above steps S302-S303 may be repeatedly performed t times to obtain t isolated trees, and then an isolation forest model is constructed based on the t isolated trees.
[0083] In an embodiment of the present application, market data samples of the electricity market are obtained, and discrimination indicators of the isolation forest model are determined based on the market data samples. For each discrimination indicator, a cutting plane is determined based on the discrimination indicator; the cutting plane is used to divide the data input to the isolation forest model, and the market data samples are divided in turn according to each cutting plane to obtain isolated trees, and the isolation forest model is determined based on multiple isolated trees, thereby introducing the isolation forest model when discriminating market power, improving the accuracy in unsupervised learning, and further improving the accuracy and efficiency of market power discrimination.
[0084] Referring to FIG. 4 , FIG. 4 is a flow chart of a method for determining a discrimination index provided by an embodiment of the present application. This embodiment relates to a possible implementation method of how to determine the discrimination index of the isolation forest model based on market data samples. Based on the above embodiment, the above S301 includes the following steps:
[0085] S401, obtaining initial characteristic indicators of market power of market data samples.
[0086] For example, a market data sample of the power market can be obtained, and multiple initial characteristic indicators such as the reserved capacity, quotation consistency, and quantity consistency of the power generation unit can be determined based on the market data sample and the actual performance of the power generation unit market power in the power spot market. .
[0087] S402, performing linear transformation on each initial feature index to obtain a low-dimensional vector corresponding to the initial feature index.
[0088] For example, each initial feature index can be linearly transformed based on the following formula (3): Mapping to embedding space:
[0089] (3)
[0090] In formula (3), is the initial feature index The corresponding low-dimensional vector, and is the preset constant term.
[0091] S403: Determine the attention weight of each low-dimensional vector based on the activation function.
[0092] In one embodiment, the initial attention weight of each low-dimensional vector can be determined based on the following formula (4):
[0093] (4)
[0094] In formula (4), is the initial attention weight of each low-dimensional vector, is the activation function.
[0095] Optionally, the initial attention weight of each low-dimensional vector can be normalized based on the following formula (5) to obtain the attention weight of each low-dimensional vector:
[0096] (5)
[0097] In formula (5), is the attention weight of each low-dimensional vector, is the initial feature index The number of .
[0098] S404, for each initial feature indicator, determine the discriminant indicator corresponding to the initial feature indicator according to the low-dimensional vector corresponding to the initial feature indicator and the attention weight of the low-dimensional vector, and use the discriminant indicator corresponding to each initial feature indicator as the discriminant indicator of the isolation forest model.
[0099] In one embodiment, the discrimination index corresponding to each initial feature index may be determined based on the following formula (6):
[0100] (6)
[0101] Optionally, a set of discriminant indicators can be constructed based on each discriminant indicator .
[0102] In an embodiment of the present application, initial characteristic indicators of market power of market data samples are obtained, each initial characteristic indicator is linearly transformed to obtain a low-dimensional vector corresponding to the initial characteristic indicator, and the attention weight of each low-dimensional vector is determined based on the activation function. For each initial characteristic indicator, a discriminant indicator corresponding to the initial characteristic indicator is determined according to the low-dimensional vector corresponding to the initial characteristic indicator and the attention weight of the low-dimensional vector. The discriminant indicator corresponding to each initial characteristic indicator is used as the discriminant indicator of the isolation forest model, thereby introducing an attention mechanism when determining the discriminant indicator of the isolation forest model, performing a weighted score on each initial characteristic indicator, thereby improving the accuracy and reliability of the isolation forest model and reducing the impact of noise data on the output of the isolation forest model.
[0103] Based on the above embodiment, the above S303 includes the following steps:
[0104] For the cutting points corresponding to each cutting surface, the market data samples whose cutting dimension corresponding to the discriminant index is smaller than the cutting point are divided into the left branch, and the market data samples whose cutting dimension corresponding to the discriminant index is larger than the cutting point are divided into the right branch.
[0105] For example, the indicator set can be determined Select a feature As a cutting dimension, a cutting point k is randomly generated on the cutting dimension, and then a cutting surface is determined according to the cutting point k. The cutting point k is between the maximum value and the minimum value of the data sample on the cutting dimension.
[0106] Optionally, you can sample market data from Random selection The samples are taken as sub-sample sets, and the sub-sample sets are placed in the root node of the isolation tree. Then a cutting plane is randomly selected to cut the sub-sample set placed in the root node of the isolation tree, and the data samples smaller than the cutting point k on the cutting dimension are divided into the left branch, and the data samples larger than the cutting point k are divided into the right branch.
[0107] In an embodiment of the present application, for the cutting points corresponding to each cutting surface, the market data samples that are smaller than the cutting point on the cutting dimension corresponding to the discriminant index are divided into the left branch, and the market data samples that are larger than the cutting point on the cutting dimension corresponding to the discriminant index are divided into the right branch, so that the market data samples can be clustered based on different cutting dimensions, reducing the complexity of the model and the risk of overfitting, and improving the accuracy and reliability of the isolation forest model.
[0108] Referring to FIG. 5 , FIG. 5 is a flow chart of a method for determining an abnormal score provided in an embodiment of the present application. This embodiment relates to a possible implementation method of determining an abnormal score of the market data to be identified based on the market data to be identified and the depth of the isolation forest model. Based on the above embodiment, the above S202 includes the following steps:
[0109] S501, determining the average depth of each isolated tree of the market data to be identified in the isolation forest model, the first sample quantity of the leaf node where the market data to be identified is located, and the second sample quantity of the parent node of the leaf node.
[0110] In one embodiment, each isolated tree in the isolation forest model can be traversed to determine the leaf nodes where the market data to be identified is located in each isolated tree, obtain the depth of each leaf node, calculate the average depth based on the depth of each leaf node, and then determine the first sample quantity of the leaf node and the second sample quantity of the parent node of the leaf node.
[0111] For example, the average depth can be determined based on the following formula (7): :
[0112] (7)
[0113] In formula (7), is the data volume of the market data sample, represents the harmonic series, which can be expressed as the following formula (8):
[0114] (8)
[0115] In formula (8), Represents Euler's constant, which is 0.5772156649 here.
[0116] S502: Determine the abnormality score of the market data to be identified according to the average depth, the first sample quantity, and the second sample quantity.
[0117] In one embodiment, the market data to be identified can be determined according to the following formula (9): The abnormal score :
[0118] (9)
[0119] In formula (9), represents the number of samples of the node, Indicates market data to be determined The leaf node where Indicates market data to be determined The parent node of the leaf node.
[0120] In an embodiment of the present application, the average depth of each isolated tree of the market data to be identified in the isolation forest model, the first sample number of the leaf node where the market data to be identified is located, and the second sample number of the parent node of the leaf node are determined, and the abnormal score of the market data to be identified is determined based on the average depth, the first sample number, and the second sample number, thereby introducing the isolation forest model when identifying market power, improving the accuracy in unsupervised learning, and further improving the accuracy and efficiency of market power identification.
[0121] Referring to FIG. 6 , FIG. 6 is a flow chart of a method for determining a market power determination result provided in an embodiment of the present application. This embodiment relates to a possible implementation method of determining a market power determination result of the market data to be determined based on an abnormality score and a preset threshold. Based on the above embodiment, the above S203 includes the following steps:
[0122] S601: If the abnormality score exceeds a preset threshold, it is determined that the market power determination result of the market data to be determined is a market power application abnormality.
[0123] In one embodiment, the anomaly score The closer it is to 1, the shallower the depth of the leaf node where the market data to be judged is, the less closely it is connected with the rest of the samples, or the greater the degree of separation between the sample in the leaf node and other samples, the higher the possibility of being judged as an outlier, indicating that the possibility of abnormal application of market power is greater. Conversely, the closer it is to 0, the smaller the possibility of abnormal application of market power. If the abnormal scores of most samples are close to 0.5, it means that there are no abnormal units that obviously abuse market power in the entire power market.
[0124] In one embodiment, a preset threshold can be set according to the overall situation of the power market. After determining the abnormal score of the market data to be determined, the abnormal score can be compared with the preset threshold. If the abnormal score exceeds the preset threshold, the market power determination result of the market data to be determined is determined to be abnormal application of market power. If the market power application is abnormal, it can be considered that the unit abuses market power.
[0125] S602: If the abnormal score does not exceed the preset threshold, it is determined that the market power identification result of the market data to be identified is that the market power application is normal.
[0126] In one embodiment, the abnormal score can be compared with a preset threshold. If the abnormal score does not exceed the preset threshold, the market power determination result of the market data to be determined is determined to be that the market power application is normal. If the market power application is normal, it can be considered that the unit has not abused the market power.
[0127] Referring to FIG. 7 , FIG. 7 is a flow chart of a method for determining the market power of a generator set based on an attention mechanism and an isolation forest according to an embodiment of the present application. The method comprises the following steps:
[0128] S701, obtaining market data samples of the power market and preprocessing the market data samples.
[0129] S702, obtaining initial characteristic indicators of market power of market data samples.
[0130] S703, performing linear transformation on each initial feature index to obtain a low-dimensional vector corresponding to the initial feature index.
[0131] S704: Determine the attention weight of each low-dimensional vector based on the activation function.
[0132] S705, for each initial feature indicator, determine the discriminant indicator corresponding to the initial feature indicator according to the low-dimensional vector corresponding to the initial feature indicator and the attention weight of the low-dimensional vector, and use the discriminant indicator corresponding to each initial feature indicator as the discriminant indicator of the isolation forest model.
[0133] S706: For each discrimination index, determine a cutting surface according to the discrimination index.
[0134] S707, for the cutting points corresponding to each cutting surface, the market data samples whose cutting dimension corresponding to the discriminant index is smaller than the cutting point are divided into the left branch, and the market data samples whose cutting dimension corresponding to the discriminant index is larger than the cutting point are divided into the right branch to obtain an isolated tree.
[0135] S708, determining an isolation forest model according to the plurality of isolated trees.
[0136] S709: input the market data to be identified into the isolation forest model to determine the abnormality score of the market data to be identified according to the market data to be identified and the depth of the isolation forest model.
[0137] S710, determining a market power determination result of the market data to be determined according to the abnormality score and the preset threshold.
[0138] In order to introduce the embodiment of the present application more clearly, an example analysis is performed based on the transaction data of a regional power spot market in combination with Table 2:
[0139] According to the evaluation requirements, the market data samples are collected, including the quotation information of the generating units, the unit capacity, the market clearing price and the clearing quantity. The market data samples hide sensitive information such as the unit name and replace it with the number. The market data samples contain the transaction data of 170 generating units, with a sampling interval of 15 minutes and a total of 96 samples per day. The outliers and missing values in the market data samples are corrected according to formula (1).
[0140] A set of discriminant indicators is constructed based on market data samples. The calculation method and standard of each discriminant indicator are set according to the characteristics of the power generation market, and the training set and test set are divided according to the ratio of 7:3. An isolation forest model is constructed based on the training set, and the number of isolated trees t is set to 100, and the number of samples in each isolated tree is 256; the abnormal sample ratio of the market data sample is set to 0.15, which is used to mark positive and negative samples during fitting, and the preset height of each isolated tree is .
[0141] According to formula (9), the abnormal score of each unit is determined, and the preset threshold is determined to be 0.6, thereby determining the market power judgment result of the generator set. According to the market power judgment result of the generator set, the abnormal generator set numbers are: 108, 69, 18, 117, 20, 48, 39, as shown in Table 2 below:
[0142]
[0143] Table 2
[0144] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0145] Based on the same inventive concept, the embodiment of the present application also provides a market power determination device for implementing the market power determination method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more market power determination device embodiments provided below can refer to the limitations of the market power determination method above, and will not be repeated here.
[0146] In one embodiment, as shown in FIG8 , FIG8 is a structural block diagram of a market power determination device provided in an embodiment of the present application, and the device 800 includes:
[0147] The first acquisition module 801 is used to acquire the market data to be determined of the power generation group.
[0148] The first determination module 802 is used to input the market data to be judged into the isolation forest model to determine the abnormal score of the market data to be judged according to the market data to be judged and the depth of the isolation forest model; the isolation forest model is determined based on market data samples and discrimination indicators; the discrimination indicators include the retained capacity of the power generation unit, the consistency of the quotation and the consistency of the reported quantity.
[0149] The second determination module 803 is used to determine the market power determination result of the market data to be determined according to the abnormal score and the preset threshold.
[0150] In one embodiment, the apparatus 800 further includes:
[0151] The second acquisition module is used to obtain market data samples of the power generation unit and determine the discrimination index of the isolation forest model according to the market data samples.
[0152] The third determination module is used to determine the cutting plane according to each discrimination index; the cutting plane is used to divide the data input to the isolation forest model.
[0153] The partitioning module is used to partition the market data samples according to each cutting plane in turn to obtain an isolated tree.
[0154] The fourth determination module is used to determine an isolation forest model based on multiple isolated trees.
[0155] In one embodiment, the second acquisition module includes:
[0156] The acquisition unit is used to obtain initial characteristic indicators of market power of market data samples.
[0157] The linear transformation unit is used to perform linear transformation on each initial feature index to obtain a low-dimensional vector corresponding to the initial feature index.
[0158] The first determining unit is used to determine the attention weight of each low-dimensional vector based on the activation function.
[0159] The second determination unit is used to determine the discriminant index corresponding to each initial feature index according to the low-dimensional vector corresponding to the initial feature index and the attention weight of the low-dimensional vector, and use the discriminant index corresponding to each initial feature index as the discriminant index of the isolation forest model.
[0160] In one embodiment, the partitioning module includes:
[0161] The division unit is used to divide the market data samples whose cutting dimensions corresponding to the discrimination index are smaller than the cutting points into the left branch, and divide the market data samples whose cutting dimensions corresponding to the discrimination index are larger than the cutting points into the right branch, according to the cutting points corresponding to each cutting surface.
[0162] In one embodiment, the first determining module 802 includes:
[0163] The third determining unit is used to determine the average depth of each isolated tree of the market data to be identified in the isolation forest model, the first sample quantity of the leaf node where the market data to be identified is located, and the second sample quantity of the parent node of the leaf node.
[0164] The fourth determination unit is used to determine the abnormal score of the market data to be identified according to the average depth, the first sample quantity, and the second sample quantity.
[0165] In one embodiment, the second determining module 803 includes:
[0166] The fifth determining unit is configured to determine that the market power determination result of the market data to be determined is a market power application anomaly if the abnormality score exceeds a preset threshold.
[0167] The sixth determination unit is configured to determine that the market power determination result of the market data to be determined is that the application of market power is normal if the abnormal score does not exceed a preset threshold.
[0168] Each module in the above market power determination device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0169] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0170] Obtain the market data to be determined for the power generating units;
[0171] The market data to be identified is input into the isolation forest model to determine the abnormality score of the market data to be identified according to the market data to be identified and the depth of the isolation forest model; the isolation forest model is determined based on the market data sample and the identification index, and the identification index includes the retained capacity, quotation consistency and quantity consistency of the power generation unit;
[0172] Based on the abnormal score and the preset threshold, the market power judgment result of the market data to be judged is determined.
[0173] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0174] Obtain market data samples of power generation units, and determine the discrimination index of the isolation forest model based on the market data samples;
[0175] For each discriminant index, a cutting plane is determined according to the discriminant index; the cutting plane is used to divide the data input to the isolation forest model;
[0176] Divide the market data samples according to each cutting plane in turn to obtain an isolated tree;
[0177] Determine an isolation forest model from multiple isolated trees.
[0178] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0179] Obtaining initial characteristic indicators of market power for market data samples;
[0180] Perform linear transformation on each initial feature index to obtain a low-dimensional vector corresponding to the initial feature index;
[0181] Determine the attention weight of each low-dimensional vector based on the activation function;
[0182] For each initial feature index, the discriminant index corresponding to the initial feature index is determined according to the low-dimensional vector corresponding to the initial feature index and the attention weight of the low-dimensional vector, and the discriminant index corresponding to each initial feature index is used as the discriminant index of the isolation forest model.
[0183] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0184] For the cutting points corresponding to each cutting surface, the market data samples whose cutting dimension corresponding to the discriminant index is smaller than the cutting point are divided into the left branch, and the market data samples whose cutting dimension corresponding to the discriminant index is larger than the cutting point are divided into the right branch.
[0185] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0186] Determine the average depth of each isolated tree of the market data to be identified in the isolation forest model, the first sample quantity of the leaf node where the market data to be identified is located, and the second sample quantity of the parent node of the leaf node;
[0187] The abnormality score of the market data to be identified is determined according to the average depth, the first sample quantity, and the second sample quantity.
[0188] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0189] If the abnormal score exceeds the preset threshold, the market power identification result of the market data to be identified is determined to be a market power application anomaly;
[0190] If the abnormal score does not exceed the preset threshold, the market power judgment result of the market data to be judged is determined to be normal application of market power.
[0191] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0192] Obtain the market data to be determined for the power generating units;
[0193] The market data to be identified is input into the isolation forest model to determine the abnormality score of the market data to be identified according to the market data to be identified and the depth of the isolation forest model; the isolation forest model is determined based on the market data sample and the identification index, and the identification index includes the retained capacity, quotation consistency and quantity consistency of the power generation unit;
[0194] Based on the abnormal score and the preset threshold, the market power judgment result of the market data to be judged is determined.
[0195] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0196] Obtain market data samples of power generation units, and determine the discrimination index of the isolation forest model based on the market data samples;
[0197] For each discriminant index, a cutting plane is determined according to the discriminant index; the cutting plane is used to divide the data input to the isolation forest model;
[0198] Divide the market data samples according to each cutting plane in turn to obtain an isolated tree;
[0199] Determine an isolation forest model from multiple isolated trees.
[0200] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0201] Obtaining initial characteristic indicators of market power for market data samples;
[0202] Perform linear transformation on each initial feature index to obtain a low-dimensional vector corresponding to the initial feature index;
[0203] Determine the attention weight of each low-dimensional vector based on the activation function;
[0204] For each initial feature index, the discriminant index corresponding to the initial feature index is determined according to the low-dimensional vector corresponding to the initial feature index and the attention weight of the low-dimensional vector, and the discriminant index corresponding to each initial feature index is used as the discriminant index of the isolation forest model.
[0205] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0206] For the cutting points corresponding to each cutting surface, the market data samples whose cutting dimension corresponding to the discriminant index is smaller than the cutting point are divided into the left branch, and the market data samples whose cutting dimension corresponding to the discriminant index is larger than the cutting point are divided into the right branch.
[0207] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0208] Determine the average depth of each isolated tree of the market data to be identified in the isolation forest model, the first sample quantity of the leaf node where the market data to be identified is located, and the second sample quantity of the parent node of the leaf node;
[0209] The abnormality score of the market data to be identified is determined according to the average depth, the first sample quantity, and the second sample quantity.
[0210] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0211] If the abnormal score exceeds the preset threshold, the market power identification result of the market data to be identified is determined to be a market power application anomaly;
[0212] If the abnormal score does not exceed the preset threshold, the market power judgment result of the market data to be judged is determined to be normal application of market power.
[0213] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0214] Obtain the market data to be determined for the power generating units;
[0215] The market data to be identified is input into the isolation forest model to determine the abnormality score of the market data to be identified according to the market data to be identified and the depth of the isolation forest model; the isolation forest model is determined based on the market data sample and the identification index, and the identification index includes the retained capacity, quotation consistency and quantity consistency of the power generation unit;
[0216] Based on the abnormal score and the preset threshold, the market power judgment result of the market data to be judged is determined.
[0217] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0218] Obtain market data samples of power generation units, and determine the discrimination index of the isolation forest model based on the market data samples;
[0219] For each discriminant index, a cutting plane is determined according to the discriminant index; the cutting plane is used to divide the data input to the isolation forest model;
[0220] Divide the market data samples according to each cutting plane in turn to obtain an isolated tree;
[0221] Determine an isolation forest model from multiple isolated trees.
[0222] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0223] Obtaining initial characteristic indicators of market power for market data samples;
[0224] Perform linear transformation on each initial feature index to obtain a low-dimensional vector corresponding to the initial feature index;
[0225] Determine the attention weight of each low-dimensional vector based on the activation function;
[0226] For each initial feature index, the discriminant index corresponding to the initial feature index is determined according to the low-dimensional vector corresponding to the initial feature index and the attention weight of the low-dimensional vector, and the discriminant index corresponding to each initial feature index is used as the discriminant index of the isolation forest model.
[0227] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0228] For the cutting points corresponding to each cutting surface, the market data samples whose cutting dimension corresponding to the discriminant index is smaller than the cutting point are divided into the left branch, and the market data samples whose cutting dimension corresponding to the discriminant index is larger than the cutting point are divided into the right branch.
[0229] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0230] Determine the average depth of each isolated tree of the market data to be identified in the isolation forest model, the first sample quantity of the leaf node where the market data to be identified is located, and the second sample quantity of the parent node of the leaf node;
[0231] The abnormality score of the market data to be identified is determined according to the average depth, the first sample quantity, and the second sample quantity.
[0232] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0233] If the abnormal score exceeds the preset threshold, the market power identification result of the market data to be identified is determined to be a market power application anomaly;
[0234] If the abnormal score does not exceed the preset threshold, the market power judgment result of the market data to be judged is determined to be normal application of market power.
[0235] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0236] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0237] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining market power, characterized in that: The method comprises: Obtain the market data to be determined for the power generating units; Inputting the market data to be determined into an isolation forest model to determine an abnormality score of the market data to be determined according to the market data to be determined and the depth of the isolation forest model; the isolation forest model is determined based on market data samples and discrimination indicators, and the discrimination indicators include the retained capacity, quotation consistency and reported quantity consistency of the power generation unit; The market power determination result of the market data to be determined is determined according to the abnormal score and the preset threshold.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining market data samples of the power market, and determining a discrimination index of the isolation forest model according to the market data samples; For each of the discrimination indicators, a cutting plane is determined according to the discrimination indicator; the cutting plane is used to divide the data input to the isolation forest model; Sequentially dividing the market data sample according to each cutting plane to obtain an isolated tree; The isolation forest model is determined based on a plurality of the isolated trees.
3. The method according to claim 2, characterized in that Determining the discrimination index of the isolation forest model according to the market data sample includes: Obtaining initial characteristic indicators of market power of the market data sample; Performing a linear transformation on each of the initial feature indicators to obtain a low-dimensional vector corresponding to the initial feature indicator; Determine the attention weight of each of the low-dimensional vectors based on the activation function; For each of the initial feature indicators, the discrimination indicator corresponding to the initial feature indicator is determined according to the low-dimensional vector corresponding to the initial feature indicator and the attention weight of the low-dimensional vector, and the discrimination indicator corresponding to each of the initial feature indicators is used as the discrimination indicator of the isolation forest model.
4. The method according to claim 2, characterized in that: The dividing the market data samples according to each cutting plane in turn includes: For the cutting points corresponding to each of the cutting surfaces, the market data samples whose cutting dimensions corresponding to the discrimination index are smaller than the cutting points are divided into the left branch, and the market data samples whose cutting dimensions corresponding to the discrimination index are larger than the cutting points are divided into the right branch.
5. The method according to any one of claims 1 to 4, characterized in that: The step of determining the abnormality score of the market data to be identified based on the market data to be identified and the depth of the isolation forest model includes: Determine the average depth of each isolated tree of the to-be-identified market data in the isolation forest model, the first sample quantity of the leaf node where the to-be-identified market data is located, and the second sample quantity of the parent node of the leaf node; An abnormality score of the to-be-identified market data is determined according to the average depth, the first sample quantity, and the second sample quantity.
6. The method according to any one of claims 1 to 4, characterized in that: The determining, based on the abnormal score and the preset threshold, a market power determination result of the to-be-determined market data includes: If the abnormal score exceeds the preset threshold, determining that the market power determination result of the market data to be determined is a market power application abnormality; If the abnormal score does not exceed the preset threshold, it is determined that the market power determination result of the market data to be determined is that the market power application is normal.
7. A market power determination device, characterized in that: The device comprises: A first acquisition module is used to acquire the market data to be determined of the power generation unit; A first determination module is used to input the market data to be determined into an isolation forest model to determine the abnormality score of the market data to be determined according to the market data to be determined and the depth of the isolation forest model; the isolation forest model is determined based on market data samples and discrimination indicators; the discrimination indicators include the retained capacity, quotation consistency and reported quantity consistency of the power generation unit; The second determination module is used to determine the market power determination result of the market data to be determined according to the abnormal score and a preset threshold.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Method and system for identifying market power risk at two sides of sale for electricity market
CN120765003A