Training method of electric-carbon coupling scheduling model, energy consumption scheduling method based on electric-carbon coupling optimization, storage medium and electronic device
Patent Information
- Application Number
- CN202611318514.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-10-30
AI Technical Summary
然而,单纯考虑发电侧而得到的电力调度方案,并未充分考虑用电侧的用能行为,无法调动用电用户主观能动性,难以引导用电侧用户主动削减电碳成本,用电侧的降碳降本潜力得不到有效发挥
采用本申请实施例,获取训练样本,其包括电力系统的系统电碳样本及电力系统所对接的目标用电用户的用户电碳样本;对训练样本按用电量划分得到包含目标组分类样本的多组分类样本;用电量≥基准电量预设值且≤高负荷电量预设值的训练样本均划分到所述目标组分类样本中;基准电量预设值为维持目标用电用户基础生产用电需求的最低值;从每组分类样本中提取目标类型样本及非目标类型样本;在目标类型样本中,用户电碳样本的碳排放量≤低碳阈值,且用户电碳样本的用电信息满足低用电条件;所有目标类型样本组成目标类型样本集,所有非目标类型样本组成非目标类型样本集;基于目标类型样本集,确定预构建的深度学习模型的第一损失信息;基于目标类型样本集及非目标类型样本集,确定深度学习模型的第二损失信息;基于由目标组分类样本确定的参考样本,及目标组分类样本中的目标类型样本,确定深度学习模型的第三损失信息;将所获取的训练样本绑定相应标签输入深度学习模型中,利用基于第一损失信息、第二损失信息及第三损失信息确定的训练损失对深度学习模型进行训练,使深度学习模型学习所述系统电碳样本与所述用户电碳样本间的电碳耦合关联规律,在训练过程中利用加权计算函数缩小第一损失信息及第三损失信息,且增大第二损失信息,直至所述训练损失收敛至低于预设损失值时完成训练,得到用于为目标用电用户生成低碳低用电调度运行方案的电碳耦合调度模型,如此,通过引入基于用电量的样本划分,可以使得样本组带有负荷侧/需求侧特性,减少因单一发电侧而带来的发电浪费,此外,通过满足排放要求的目标类型样本,可以引导模型学习到清洁、高效的发电特性,并且,通过第一损失信息可以提高模型在满足排放前提下的基础特征识别准确性,通过第二损失信息可以增强模型泛化能力使其提高对于目标与非目标用电情况的区分能力,通过第三损失信息,可以引入参考样本以进一步校准模型在关键的目标组分类样本下的决策边界,进而可以通过多层次的损失约束,使得调度模型能够实现在满足排放和用电需求前提下的最优匹配,抑制过度发电。
Smart Images

Figure CN123012585A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system technology, and in particular to a training method for an electric carbon coupling dispatch model, an energy dispatch method based on electric carbon coupling optimization, a storage medium, and electronic equipment. Background Technology
[0002] In power dispatching schemes related to this technology, the focus is typically on power generation output to achieve carbon emission reduction. Power dispatching schemes are developed from the perspective of power generation to reduce carbon costs on the generation side. However, power dispatching schemes that only consider the generation side do not adequately consider the energy consumption behavior of the electricity user side. This fails to motivate users and guide them to proactively reduce carbon costs, thus hindering the effective realization of carbon reduction and cost reduction potential on the user side. Summary of the Invention
[0003] To address the aforementioned technical problems, this application proposes a training method for an electric-carbon coupling scheduling model, an energy scheduling method based on electric-carbon coupling optimization, a storage medium, and electronic equipment, which can reduce power generation waste.
[0004] In a first aspect, embodiments of this application provide a training method for an electric carbon coupling scheduling model, comprising: Acquire training samples, including system carbon samples of the power system and user carbon samples of the target electricity users connected to the power system. The training samples are divided according to electricity consumption to obtain multiple groups of classification samples that include the target group classification samples; all training samples with electricity consumption ≥ the baseline electricity preset value and ≤ the high load electricity preset value are classified into the target group classification samples; the baseline electricity preset value is the minimum value to maintain the basic production electricity demand of the target electricity user; Extract target type samples and non-target type samples from each group of classified samples; in the target type samples, the carbon emissions of the user's electricity carbon sample are ≤ the low carbon threshold, and the electricity consumption information of the user's electricity carbon sample meets the low electricity consumption conditions; all target type samples form the target type sample set, and all non-target type samples form the non-target type sample set. Based on the target type sample set, determine the first loss information of the pre-built deep learning model; Based on the target type sample set and the non-target type sample set, determine the second loss information of the deep learning model; Based on the reference samples determined by the target group classification samples, and the target type samples in the target group classification samples, the third loss information of the deep learning model is determined. The acquired training samples are bound to corresponding labels and input into the deep learning model. The deep learning model is trained using a training loss determined based on the first loss information, the second loss information, and the third loss information. This allows the deep learning model to learn the coupling correlation between the system's carbon samples and the user's carbon samples. During the training process, a weighted calculation function is used to reduce the first and third loss information and increase the second loss information until the training loss converges to a value lower than the preset loss value. This completes the training and yields a carbon coupling scheduling model for generating low-carbon and low-electricity scheduling operation schemes for target electricity users.
[0005] Optionally, determining the first loss information of the pre-built deep learning model based on the target type sample set includes: pairing any two target type samples in the target type sample set to obtain a first sample pair, and obtaining a first loss term based on the feature distance of each first sample pair, thereby determining the first loss information; The step of determining the second loss information of the deep learning model based on the target type sample set and the non-target type sample set includes: pairing each target type sample in the target type sample set with each non-target type sample in the non-target type sample set to obtain a second sample pair, and obtaining a second loss term based on the feature distance of each second sample pair, thereby determining the second loss information; The step of determining the third loss information of the deep learning model based on the reference sample determined by the target group classification sample and the target type sample in the target group classification sample includes: pairing each target type sample in the target group classification sample with the reference sample to obtain a third sample pair, and obtaining a third loss term based on the feature distance of each third sample pair, thereby determining the third loss information. The step of using a weighted calculation function to reduce the first and third loss information and increase the second loss information during training includes: using a weighted calculation function to reduce the feature distance of the first sample pair and the feature distance of the third sample pair respectively, thereby reducing the loss values of the first and third loss terms, and using the weighted calculation function to increase the feature distance of the second sample pair, thereby increasing the loss value of the second loss term.
[0006] Optionally, the weighted calculation function is used to set balance coefficients for the first loss information, the second loss information, and the third loss information respectively. During the training iteration, the balance coefficient of the third loss information is constrained to be greater than the balance coefficient of the first loss information, the balance coefficient of the first loss information is greater than the balance coefficient of the second loss information, and the sum of all balance coefficients is equal to 1.
[0007] Optionally, the acquired training samples are bound to corresponding labels, including: Training samples with electricity consumption ≥ the baseline preset value and ≤ the high load preset value are labeled with a normal load tag; training samples with electricity consumption < the baseline preset value are labeled with a low load tag; and training samples with electricity consumption > the high load preset value are labeled with a high load tag. For training samples whose carbon emissions are less than or equal to the low-carbon threshold and whose electricity costs are less than or equal to the low-electricity-cost threshold, supplementary low-carbon and low-electricity-cost labels are attached.
[0008] Optionally, the electricity consumption corresponding to each sample in the target group classification sample is greater than or equal to a preset baseline electricity consumption value; The reference sample is obtained through the following steps: Among the target type samples included in the target group classification samples, target type samples are determined; the electricity consumption corresponding to the target type sample is equal to the preset value of the baseline electricity consumption, the carbon emission is equal to the low carbon threshold, and the electricity cost is equal to the low electricity cost threshold. Based on the identified target type samples, a reference sample is determined.
[0009] Optionally, the system's carbon emission sample includes historical electricity price data, historical carbon emission intensity data, and historical renewable energy output data of the power system; the user's carbon emission sample includes historical electricity consumption data, historical carbon emission data, and historical detailed data on the scheduling and operation of electrical equipment of the target electricity user. The acquisition of training samples includes: Obtain historical measured samples; the historical measured samples include historical measured electricity price data, historical measured carbon emission intensity data, and historical measured renewable energy output data of the power system, as well as historical measured electricity consumption data, historical measured carbon emission data, and historical measured power equipment scheduling and operation details data of the target electricity users; Based on the historical measured samples, simulations under different working conditions are performed by random perturbation to obtain simulation samples; The training samples are generated based on the simulation samples and the historical measured samples.
[0010] Optionally, the method further includes: A predetermined proportion of samples not included in the training samples are extracted from the historical test samples and used as test samples. The test samples are then input into the trained electro-carbon coupling scheduling model to obtain the model output scheme. The matching consistency between the model output scheme and the pre-bound labels of the test samples is compared. If the matching consistency between the model output scheme and the pre-bound labels of the test samples is greater than the deviation threshold, the obtained training samples are bound with the corresponding labels and input into the deep learning model to start the model supplementary training process. The model supplementary training process includes: The balance coefficient of the first loss term is defined as the first balance coefficient. The first loss term includes a first normal load sub-loss term and a first low load sub-loss term. The first normal load sub-loss term is the feature distance between training samples bound to the normal load label and the low-carbon and low-electricity cost label. The first low load sub-loss term is the feature distance between training samples bound to the low load label and the low-carbon and low-electricity cost label. The balance coefficient of the first normal load sub-loss term and the balance coefficient of the first low load sub-loss term are independent of each other. During the supplementary training iteration, the balance coefficient of the first normal load sub-loss term is constrained to be greater than the balance coefficient of the first low load sub-loss term, and the sum of the balance coefficients of the first normal load sub-loss term and the first low load sub-loss term is equal to the first balance coefficient. The balance coefficient of the second loss term is defined as the second balance coefficient. The second loss term includes a second normal load sub-loss term and a second low load sub-loss term. The second normal load sub-loss term is the feature distance between the training sample with the normal load label and the low carbon and low electricity cost label and the non-target type sample in the non-target type sample set. The second low load sub-loss term is the feature distance between the training sample with the low load label and the low carbon and low electricity cost label and the non-target type sample in the non-target type sample set. The balance coefficient of the second normal load sub-loss term and the balance coefficient of the second low load sub-loss term are independent of each other. During the supplementary training iteration, the balance coefficient of the second normal load sub-loss term is constrained to be greater than the balance coefficient of the second low load sub-loss term, and the sum of the balance coefficients of the second normal load sub-loss term and the second low load sub-loss term is equal to the second balance coefficient. The non-target type sample set is divided into low-carbon high-electricity-cost carbon type samples, high-carbon high-electricity-cost carbon type samples, and high-carbon low-electricity-cost carbon type samples. During the supplementary training iteration of the second loss term, the balance coefficient corresponding to the feature distance between the training samples bound to the normal load label and the low-carbon low-electricity-cost label in the second loss term and the high-carbon high-electricity-cost carbon type samples is the largest among the balance coefficients of the second normal load sub-loss term.
[0011] Secondly, embodiments of this application provide an energy dispatching method based on electro-carbon coupling optimization, comprising: The time-of-use electricity price data and carbon emission intensity data of the power system during the target scheduling period, as well as the electricity consumption data required by the target electricity users connected to the power system during the target scheduling period, are obtained as the target scheduling period data. The target scheduling period data is input into the electricity-carbon coupling scheduling model to obtain a low-carbon, low-electricity scheduling scheme adapted to the target scheduling period output by the electricity-carbon coupling scheduling model for the target electricity user. The electricity-carbon coupling scheduling model is trained according to the training method described in any one of the first aspects. Based on the aforementioned low-carbon and low-electricity-consumption scheduling scheme, the electrical equipment of the target electricity users is scheduled and controlled.
[0012] Thirdly, embodiments of this application provide a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the above-mentioned embodiments.
[0013] Fourthly, embodiments of this application provide an electronic device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the preceding claims.
[0014] In summary, the embodiments of this application have at least the following beneficial effects: Using the embodiments of this application, training samples are obtained, including system carbon emissions samples of the power system and user carbon emissions samples of the target electricity users connected to the power system; the training samples are divided into multiple groups of classification samples containing target group classification samples according to electricity consumption; training samples with electricity consumption ≥ a preset baseline electricity consumption value and ≤ a preset high load electricity consumption value are all classified into the target group classification samples; the preset baseline electricity consumption value is the minimum value to maintain the basic production electricity demand of the target electricity users; target type samples and non-target type samples are extracted from each group of classification samples; in the target type samples, the carbon emissions of the user carbon emissions samples are ≤ the low carbon threshold, and the user carbon emissions samples... The electricity consumption information meets the low electricity consumption conditions; all target type samples form a target type sample set, and all non-target type samples form a non-target type sample set; based on the target type sample set, the first loss information of the pre-built deep learning model is determined; based on the target type sample set and the non-target type sample set, the second loss information of the deep learning model is determined; based on the reference sample determined by the target group classification sample and the target type sample in the target group classification sample, the third loss information of the deep learning model is determined; the acquired training samples are bound to corresponding labels and input into the deep learning model, utilizing the first loss information, the second loss information, and the third loss information. The training loss determined by the three loss information is used to train the deep learning model, enabling the model to learn the coupling correlation between the system's carbon emissions and the user's carbon emissions. During training, a weighted calculation function is used to reduce the first and third loss information and increase the second loss information until the training loss converges to below a preset loss value, thus completing the training. This yields a carbon emissions coupling scheduling model for generating low-carbon, low-electricity-consumption scheduling and operation schemes for target electricity users. In this way, by introducing sample partitioning based on electricity consumption, the sample groups can have load-side / demand-side characteristics, reducing the power generation surge caused by a single power generation side. Furthermore, by using target type samples that meet emission requirements, the model can be guided to learn clean and efficient power generation characteristics. Moreover, the first loss information can improve the model's accuracy in identifying basic features under the premise of meeting emission requirements. The second loss information can enhance the model's generalization ability and improve its ability to distinguish between target and non-target electricity consumption. The third loss information can introduce reference samples to further calibrate the model's decision boundary under key target group classification samples. Thus, through multi-level loss constraints, the scheduling model can achieve optimal matching under the premise of meeting emission and electricity demand, and suppress excessive power generation. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating the training method of the electric carbon coupling scheduling model provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the energy dispatching method based on electro-carbon coupling optimization provided in the embodiments of this application; Figure 3 This is a schematic diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments / examples are only a part of the embodiments / examples of this application, and not all of the embodiments / examples. Based on the embodiments / examples in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0017] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "multiple" means two or more. In the description of this application, the term "comprising" and its variations are open-ended, meaning "including but not limited to." The term "based on" means "at least partially based on." The term "according to" means "at least partially according to." The term "one embodiment / example" means "at least one embodiment / example"; the term "another embodiment / example" means "at least one additional embodiment / example"; the term "some embodiments / examples" means "at least some embodiments / examples."
[0018] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0019] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing specific embodiments only and is not intended to limit the application. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0020] Firstly, see [the following] Figure 1The diagram shows a flowchart of a training method for an electric carbon coupling scheduling model provided in an embodiment of this application. This training method for the electric carbon coupling scheduling model can be applied to an electronic device with data processing capabilities. The method includes steps S101-S107, as detailed below.
[0021] S101, Obtain training samples, which include system carbon samples of the power system and user carbon samples of the target electricity users connected to the power system.
[0022] In some examples, the training samples include historical electricity price data, historical carbon emission intensity data, and historical renewable energy output data of the power system. They also include historical electricity consumption data, historical carbon emission data, and detailed dispatch and operation data of electrical equipment for the target electricity users connected to the power system. The detailed dispatch and operation data of electrical equipment for the target electricity users specifically includes data on the historical start / stop status, power consumption, number of operating devices, high-load operating periods, and electricity consumption of each device. Target electricity users can be high-energy-consuming and high-carbon-emission users, such as chemical enterprises, cement plants, metallurgical plants, and new material manufacturing enterprises.
[0023] In some examples, the data in the training samples are time-series aligned, that is, the various types of data correspond and are matched one-to-one in the time dimension, avoiding the bias in subsequent model feature learning caused by time sequence misalignment.
[0024] In some examples, the training sample may include historical measured samples, which may include historical time-of-use electricity price information and corresponding historical time-of-use carbon intensity data and actual time-of-use wind and solar power output data exported from the power system's dispatch platform. The historical measured samples may also include historical time-of-use actual power consumption data and time-of-use carbon emission data exported from the platforms of the electricity users connected to the power system. The electricity users may include electricity-consuming enterprises, and the historical time-of-use electricity price information may be daily 24-hour time-of-use electricity price information.
[0025] S102, the training samples are divided according to electricity consumption to obtain multiple groups of classification samples including target group classification samples; training samples with electricity consumption ≥ the baseline electricity preset value and ≤ the high load electricity preset value are all classified into the target group classification samples; the baseline electricity preset value is the minimum value to maintain the basic production electricity demand of the target electricity user.
[0026] In this embodiment, the target group classification samples can be labeled as the normal load group. Training samples with electricity consumption less than a preset baseline electricity value are all grouped into the same group as the low load group, and training samples with electricity consumption greater than a preset high load electricity value are all grouped into the same group as the high load group. It is understood that there can be multiple training samples, such as training samples from multiple different time periods and / or training samples from multiple different target electricity users. Each training sample's user electricity carbon sample can contain the electricity consumption of the target electricity user. In this case, multiple training samples can be classified into different groups of classification samples according to this electricity consumption.
[0027] S103, extract target type samples and non-target type samples from each group of classified samples; in the target type samples, the carbon emissions of the user's electricity carbon sample are ≤ the low carbon threshold, and the electricity consumption information of the user's electricity carbon sample meets the low electricity consumption conditions; all target type samples form a target type sample set, and all non-target type samples form a non-target type sample set. For example, electricity consumption information may include electricity cost and / or electricity power, and low electricity consumption conditions may include electricity power lower than a preset low electricity power value and / or electricity cost lower than a low cost threshold.
[0028] S104, based on the target type sample set, determine the first loss information of the pre-built deep learning model.
[0029] S105, based on the target type sample set and the non-target type sample set, determine the second loss information of the deep learning model.
[0030] S106, Based on the reference samples determined by the target group classification samples and the target type samples in the target group classification samples, determine the third loss information of the deep learning model.
[0031] In some examples, the reference sample can be a sample with typical characteristics in the target group classification sample. For example, an electronic device can perform clustering processing on the target group classification sample to obtain cluster centers, and the reference sample can contain the cluster centers and / or at least one sample in the target group classification sample that has the highest similarity to the cluster centers. The method of determining the reference sample is not uniquely limited in the embodiments of this application.
[0032] S107, the acquired training samples are bound to corresponding labels and input into the deep learning model. The deep learning model is trained using the training loss determined based on the first loss information, the second loss information, and the third loss information, so that the deep learning model learns the electric carbon coupling correlation law between the system electric carbon samples and the user electric carbon samples. During the training process, the first loss information and the third loss information are reduced by a weighted calculation function, and the second loss information is increased, until the training loss converges to a value lower than the preset loss value, and the training is completed, thus obtaining an electric carbon coupling scheduling model for generating low-carbon and low-electricity scheduling operation schemes for target electricity users.
[0033] Thus, by setting the absolute values of the weight coefficients of the third loss information, the first loss information, and the second loss information to decrease sequentially, the interference of low-load invalid samples with no productive value on model training can be reduced.
[0034] For example, the scheduling control may include energy consumption control for target electricity users.
[0035] The proposed solution in this embodiment constructs target type samples based on training samples whose carbon emissions and electricity costs are both below preset values. A deep neural network is used to iteratively train the target type sample set, resulting in an electricity-carbon coupling scheduling model. This model generates low-cost electricity-carbon scheduling schemes for electricity users, which helps to motivate them to actively reduce their electricity-carbon costs and tap into their potential for carbon and cost reduction. Furthermore, by dividing the training samples according to the basic production electricity needs of the target users, the scheduling scheme effectively ensures that it aligns with their production load requirements, achieving both electricity-carbon cost optimization and production demand consideration.
[0036] Meanwhile, this scheme trains the deep learning model with reference samples. During the training process, by reducing the loss between target type samples and between target type samples and reference samples, the model can focus more on learning the energy scheduling characteristics of low-carbon and low-electricity-cost samples, thus obtaining an electric-carbon coupled scheduling model that outputs an electric-carbon and low-electricity-cost scheduling scheme for electricity users.
[0037] In one optional implementation, determining the first loss information of the pre-built deep learning model based on the target type sample set includes: pairing any two target type samples in the target type sample set to obtain a first sample pair, and obtaining a first loss term based on the feature distance of each first sample pair, thereby determining the first loss information.
[0038] In some examples, electronic devices can pair target type samples from a target type sample set to obtain multiple first sample pairs. Each first sample pair contains two target type samples. The two target type samples in each first sample pair are then input into a deep learning model to obtain the sample features extracted by the deep learning model corresponding to the two target type samples in each first sample pair. The first loss term for each first sample pair can be obtained by calculating the feature distance between the two sample features corresponding to each first sample pair, which can be expressed, for example, by the following formula: in, The sample feature corresponding to one target type sample in the first sample pair is represented as follows: , This represents the formula for calculating feature distance.
[0039] In some examples, the electronic device can calculate the mean of the first loss term for all first samples to obtain the first loss mean, thereby generating first loss information that includes the first loss mean. This can be represented, for example, by the following formula: in, This represents the total number of pairs in the first sample.
[0040] In one optional implementation, determining the second loss information of the deep learning model based on the target type sample set and the non-target type sample set includes: pairing each target type sample in the target type sample set with each non-target type sample in the non-target type sample set to obtain a second sample pair, and obtaining a second loss term based on the feature distance of each second sample pair, thereby determining the second loss information.
[0041] In some examples, electronic devices can pair each target type sample with each non-target type sample to obtain multiple second sample pairs. Each second sample pair contains one target type sample and one non-target type sample. The two samples from each second sample pair are then input into a deep learning model to obtain the sample features extracted by the deep learning model corresponding to the two samples in each second sample pair. The second loss term for each second sample pair can be obtained by calculating the feature distance between the two sample features corresponding to each second sample pair, for example, as expressed by the following formula: in, The sample feature corresponding to one sample in the second sample pair is represented as and the sample feature corresponding to the other sample in the second sample pair is represented as . .
[0042] In some examples, the electronic device can calculate the mean of the second loss term for each of the second samples to obtain the second loss mean, thereby generating second loss information that includes the second loss mean. This can be represented, for example, by the following formula: in, This represents the total number of pairs in the second sample.
[0043] In one optional implementation, determining the third loss information of the deep learning model based on the reference sample determined by the target group classification sample and the target type sample in the target group classification sample includes: pairing each target type sample in the target group classification sample with the reference sample to obtain a third sample pair, and obtaining a third loss term based on the feature distance of each third sample pair, thereby determining the third loss information.
[0044] In some examples, electronic devices can pair each target type sample in the target group classification samples with a reference sample to obtain multiple third sample pairs. Each third sample pair contains one target type sample and one reference sample. The two samples in each third sample pair are then input into a deep learning model to obtain the sample features extracted by the deep learning model corresponding to the two samples in each third sample pair. The third loss term for each third sample pair can be obtained by calculating the feature distance between the two sample features corresponding to each third sample pair, which can be expressed, for example, by the following formula: in, The sample feature corresponding to one sample in the third sample pair is represented as follows: .
[0045] In some examples, the electronic device can calculate the mean of the third loss term for all third samples to obtain the third loss mean, thereby generating third loss information that includes the third loss mean. This can be represented, for example, by the following formula: in, This represents the total number of pairs in the third sample.
[0046] In one optional implementation, the step of using a weighted calculation function to reduce the first loss information and the third loss information and increase the second loss information during training includes: using the weighted calculation function to reduce the feature distance of the first sample pair and the feature distance of the third sample pair respectively, thereby reducing the loss values of the first loss term and the third loss term, and using the weighted calculation function to increase the feature distance of the second sample pair, thereby increasing the loss value of the second loss term.
[0047] In some embodiments, the weighted calculation function is used to set balance coefficients for the first loss information, the second loss information, and the third loss information, respectively. Each balance coefficient can change during the training process, but it must meet certain constraints: the balance coefficient of the third loss information is greater than the balance coefficient of the first loss information, the balance coefficient of the first loss information is greater than the balance coefficient of the second loss information, and the sum of all balance coefficients is equal to 1. Thus, by setting the balance coefficients differently and improving the training loss of the reference sample and the low-carbon and low-electricity target type sample, as well as the training loss of the low-carbon and low-electricity target type sample, the interference of invalid samples with low load and no production value can be reduced, and the accuracy of the electricity-carbon coupling scheduling model can be improved.
[0048] Furthermore, the electronic device can perform weighted calculations on the first loss information, the second loss information, and the third loss information to obtain the training loss, which can be expressed, for example, by the following formula: in, Indicates training loss, The weighting coefficients represent the first loss information. The weighting coefficients represent the second loss information. The weighting coefficient represents the third loss information.
[0049] In this embodiment, This training loss indicates that it is used to reduce the distance between the corresponding sample features of the two samples in the first sample pair, so that the corresponding sample features of the two samples are closer to each other in the feature space. This training loss indicates that it is used to instruct the increase of the distance between the corresponding sample features of the two samples in the second sample pair, so that the corresponding sample features of the two samples are far apart from each other in the feature space. This training loss indicates that it is used to reduce the distance between the corresponding sample features of the two samples in the third sample pair, so that the corresponding sample features of the two samples are closer to each other in the feature space. In this way, it is possible to distinguish between low load, normal load and high load according to electricity consumption, avoiding sample mixing and feature confusion caused by modeling uniformly without distinguishing loads, and making it easier to adapt to the carbon emission patterns of electricity consumption under different production loads. In addition, reference sample constraints are added specifically for normal / high load samples that meet basic production needs, so as to weaken the interference of invalid low load samples with no production value and improve the practicality of the model output.
[0050] Furthermore, when calculated in N consecutive iterations When convergence occurs, the model training can be considered complete.
[0051] In one optional implementation, the acquired training samples are bound to corresponding labels, including: Training samples with electricity consumption ≥ the baseline preset value and ≤ the high load preset value are labeled with a normal load tag; training samples with electricity consumption < the baseline preset value are labeled with a low load tag; and training samples with electricity consumption > the high load preset value are labeled with a high load tag. For training samples whose carbon emissions are less than or equal to the low-carbon threshold and whose electricity costs are less than or equal to the low-electricity-cost threshold, supplementary low-carbon and low-electricity-cost labels are attached.
[0052] In one optional implementation, the electricity consumption corresponding to each sample in the target group classification sample is greater than or equal to a preset baseline electricity consumption value. The reference sample is obtained through the following steps: Among the target type samples included in the target group classification samples, target type samples are determined; the electricity consumption corresponding to the target type sample is equal to the preset value of the baseline electricity consumption, the carbon emission is equal to the low carbon threshold, and the electricity cost is equal to the low electricity cost threshold. Based on the identified target type samples, a reference sample is determined.
[0053] In other embodiments, target type samples whose electricity consumption is equal to the preset baseline electricity consumption value, whose carbon emissions are equal to the low carbon threshold, and whose electricity cost is equal to the low electricity cost threshold can be used as reference samples.
[0054] The above embodiments use reference samples as central samples for constraints, so as to specifically learn the energy consumption characteristics of efficient energy use and low carbon samples under normal production load of enterprises, weaken the interference of invalid samples under low load, and improve the accuracy and practicality of the electric carbon coupling scheduling model.
[0055] In some examples, a baseline power consumption preset value can be used to indicate the amount of electricity required to maintain normal power consumption for a target user. That is, when the power consumption corresponding to any sample is greater than or equal to the baseline power consumption, the user can maintain normal power consumption in that sample. For example, if the user is a business user, the baseline power consumption preset value can be the minimum amount of electricity required to maintain the basic production power consumption of the business user.
[0056] In some examples, the reference sample can be the center sample in the target group classification sample. The electronic device can select target type samples whose power consumption is equal to a preset baseline power consumption value from the target type sample set included in the target group classification sample; that is, the power consumption corresponding to the selected target type sample is equal to the preset baseline power consumption value; and determine at least a portion of the target type samples as the center sample from the selected target type samples. Further, the center sample can be a historical measured sample from the selected target type samples.
[0057] In one optional implementation, the system's carbon emission sample includes historical electricity price data, historical carbon emission intensity data, and historical renewable energy output data of the power system, while the user's carbon emission sample includes historical electricity consumption data, historical carbon emission data, and historical detailed data on the scheduling and operation of electrical equipment for the target electricity user. The acquisition of training samples includes: Obtain historical measured samples; the historical measured samples include historical measured electricity price data, historical measured carbon emission intensity data, and historical measured renewable energy output data of the power system, as well as historical measured electricity consumption data, historical measured carbon emission data, and historical measured power equipment scheduling and operation details data of the target electricity users; Based on the historical measured samples, simulations under different working conditions are performed by random perturbation to obtain simulation samples; The training samples are generated based on the simulation samples and the historical measured samples.
[0058] In this embodiment, the model can not only use historical measured samples during training, but also generate simulation samples based on historical measured samples to traverse various working conditions, thereby improving the balance of samples of each category and greatly reducing the difficulty of collecting historical measured samples of each category.
[0059] In some examples, training samples can be generated based on simulation samples and historical measured samples. For instance, training samples can be generated based on 90% of simulation samples and 10% of historical measured samples. Specifically, dynamic time-series features can be extracted from simulation samples and historical measured samples, and these dynamic time-series features can be uniformly normalized to map them to the [0,1] interval. The dynamic time-series features can include a first dynamic time-series feature and a second dynamic time-series feature. The first dynamic time-series feature can include time-of-use electricity price, nodal carbon intensity, wind power output, and photovoltaic power output extracted from simulation samples and historical measured samples. The second dynamic time-series feature can include the historical time-of-use actual power consumption and time-of-use carbon emissions of electricity users extracted from historical measured samples.
[0060] In some examples, electronic devices can be simulated under different operating conditions based on historical measured samples by random perturbation to obtain simulation samples. For example, the different operating conditions may include at least one of the following: normal stable day, windy and low-carbon day, photovoltaic high-generation and low-carbon day, no wind and solar high-carbon day, peak high-price load day, heating and thermal power high-carbon day, and new energy curtailment day.
[0061] In some examples, electronic devices can be classified from each group of samples based on electricity consumption information (such as electricity cost) and carbon emissions. Samples in each group whose electricity cost is higher than the cost threshold corresponding to that group can be considered to meet the low electricity consumption condition. Samples with electricity costs in the top X% are classified as high electricity consumption samples. Samples in each group that are not high electricity consumption samples can be classified as low electricity consumption samples. Samples in each group whose carbon emissions are higher than the carbon emission threshold corresponding to that group, and / or whose carbon emissions are in the top Y% are classified as high carbon samples. Samples in each group whose carbon emissions are ≤ low carbon threshold can be classified as low carbon samples. X and Y are non-zero real numbers.
[0062] Thus, the target type samples can be low-electricity-consumption samples, low-carbon samples, or low-carbon low-electricity-consumption samples. Low-carbon low-electricity-consumption samples can refer to samples in each classification group that are classified as both low-carbon and low-electricity-consumption samples. Furthermore, non-target type samples can include low-carbon high-electricity-consumption samples, high-carbon high-electricity-consumption samples, and / or high-carbon low-electricity-consumption samples. In this embodiment, an electricity-carbon coupling scheduling model based on electricity-carbon coupling optimization can be trained. By coordinating the scheduling of power generation output and electricity price adjustments, it can effectively guide electricity users to actively use low-carbon electricity, reducing their carbon emissions. This allows for a coordinated reduction in electricity costs and carbon emissions while ensuring total electricity consumption remains within a preset level, reducing power generation waste and minimizing the impact on enterprise production capacity. Essentially, this embodiment can consider electricity costs as one of the optimization factors, guiding enterprises to use less electricity and reducing the power system load, achieving coordinated optimization of power system load and carbon emissions.
[0063] In some embodiments, to further improve the model's generalization ability and prediction accuracy, the method further includes: A predetermined proportion of samples not included in the training samples are extracted from the historical test samples and used as test samples. The test samples are then input into the trained electro-carbon coupling scheduling model to obtain the model output scheme. The matching consistency between the model output scheme and the pre-bound labels of the test samples is compared. If the matching consistency between the model output scheme and the pre-bound labels of the test samples is greater than the deviation threshold, the obtained training samples are bound with the corresponding labels and input into the deep learning model to start the model supplementary training process. For example, the matching consistency level can be obtained by calculating the feature distance between the model output scheme and the pre-bound labels of the test sample. When the matching consistency level is greater than the deviation threshold, it indicates that the model output scheme deviates significantly from the pre-bound labels of the test sample, and the model performance fails the test. Therefore, a supplementary model training process can be initiated to supplement the model training.
[0064] The model supplementary training process includes: Specifically, the balance coefficient of the first loss term is defined as the first balance coefficient. The first loss term includes a first normal load sub-loss term and a first low load sub-loss term. The first normal load sub-loss term is the feature distance between training samples bound to the normal load label and the low-carbon, low-electricity-cost label. The first low load sub-loss term is the feature distance between training samples bound to the low load label and the low-carbon, low-electricity-cost label. The balance coefficients of the first normal load sub-loss term and the first low load sub-loss term are independent of each other. During supplementary training iterations, the balance coefficient of the first normal load sub-loss term is constrained to be greater than the balance coefficient of the first low load sub-loss term, and the sum of the balance coefficients of the first normal load sub-loss term and the first low load sub-loss term equals the first balance coefficient. This embodiment focuses more on learning the low-carbon, low-cost characteristics under normal production load scenarios, further improving the accuracy of the electricity-carbon coupling scheduling model.
[0065] The balance coefficient of the second loss term can also be defined as the second balance coefficient. The second loss term includes a second normal load sub-loss term and a second low load sub-loss term. The second normal load sub-loss term is the feature distance between training samples labeled with normal load and low-carbon, low-electricity-cost tags and non-target type samples in the non-target type sample set. The second low load sub-loss term is the feature distance between training samples labeled with low load and low-carbon, low-electricity-cost tags and non-target type samples in the non-target type sample set. The balance coefficients of the second normal load sub-loss term and the second low load sub-loss term are independent of each other. During supplementary training iterations, the balance coefficient of the second normal load sub-loss term is constrained to be greater than the balance coefficient of the second low load sub-loss term, and the sum of the balance coefficients of the second normal load sub-loss term and the second low load sub-loss term equals the second balance coefficient. This embodiment strengthens the feature differentiation between efficient and inefficient electricity consumption samples, further improving the accuracy of the electricity-carbon coupling scheduling model.
[0066] Furthermore, the non-target type sample set is divided into low-carbon high-electricity-cost carbon type samples, high-carbon high-electricity-cost carbon type samples, and high-carbon low-electricity-cost carbon type samples. During the supplementary training iteration of the second loss term, the balance coefficient corresponding to the feature distance between the training samples bound to the normal load label and the low-carbon low-electricity-cost label in the second loss term and the high-carbon high-electricity-cost carbon type samples is constrained to be the largest among the balance coefficients of the second normal load sub-loss term. Through the differentiated weight setting in this embodiment, the feature difference between the best and worst samples can be strengthened, enabling the model to learn the core energy consumption characteristics of low-carbon low-electricity-cost samples under normal load conditions more accurately and meticulously, further improving the accuracy of the electricity-carbon coupling scheduling model.
[0067] In this embodiment, the acquired training samples can be re-labeled and input into the deep learning model. The aforementioned model supplementary training process can be used to prevent the training loss from converging below a preset loss value again. Therefore, the acquired training samples can be used to continue supplementary training until the training loss converges below the preset loss value, completing the supplementary training. Alternatively, after each iteration of the model supplementary training process, test samples can be input into the current electro-carbon coupling scheduling model to obtain the current model output scheme. The matching consistency between the current model output scheme and the pre-labeled tags of the test samples is compared. Supplementary training is completed when the matching consistency is less than or equal to a deviation threshold.
[0068] In some examples, the deep learning model may include a multi-energy input layer, a convolutional layer, a pooling layer, an output layer, and a fully connected layer. The multi-energy input layer can be used to receive system data and pass the system data to the convolutional layer, pooling layer, and output layer for processing, thereby obtaining the features output by the fully connected layer as sample features.
[0069] Secondly, see Figure 2 The diagram shows a flowchart of an energy scheduling method based on electro-carbon coupling optimization provided in an embodiment of this application. This energy scheduling method can be applied to an electronic device with data processing capabilities. The method includes steps S201-S203, as detailed below.
[0070] S201, Obtain the time-of-use electricity price data and carbon emission intensity data of the power system during the target scheduling period, as well as the electricity consumption data required by the target electricity users connected to the power system during the target scheduling period, as the target scheduling period data.
[0071] S202, the target scheduling period data is input into the electricity-carbon coupling scheduling model to obtain a low-carbon, low-electricity scheduling scheme adapted to the target scheduling period output by the electricity-carbon coupling scheduling model for the target electricity user, wherein the electricity-carbon coupling scheduling model is trained according to the training method described in any one of the first aspects.
[0072] S203, Based on the low-carbon and low-power consumption scheduling scheme, the electrical equipment of the target power user is scheduled and controlled.
[0073] In some examples, the electricity consumption data required by the target electricity user during the target scheduling period is calculated as follows: the operating power of each electrical device that the target electricity user needs to turn on during the target scheduling period is multiplied by the corresponding device's operating time to obtain the electricity consumption of each electrical device, and the electricity consumption of each electrical device is accumulated to obtain the electricity consumption data required by the target electricity user during the target scheduling period.
[0074] The electricity-carbon coupling scheduling model in this application learns the electricity-carbon coupling relationship between massive power generation and power consumption sample data in the early stage and outputs a low-carbon and low-electricity-cost scheme. When it is put into use, the input of user production electricity demand can automatically deduce and output a low-carbon and low-electricity-cost operation scheduling scheme adapted to the current scheduling period, so as to guide power consumption users to actively reduce electricity-carbon costs.
[0075] The scheduling scheme output by the online inference model of the electricity-carbon coupling scheduling model can include detailed information on equipment control and operation. It can display the optimal start-stop status of each electrical device of the target electricity user, the optimal operating power adapted to each device, and the high-adaptability operating period of the device. At the same time, it sorts out the power system operating conditions adapted to low energy consumption, clearly informs the electricity control operations that need to be performed by the electricity user at each time period, and accurately realizes the dynamic coupling and matching between the power system side operating conditions and the user side energy demand. This is conducive to guiding the electricity user to accurately schedule and control the operation strategy of electrical equipment, and achieves more precise carbon reduction and cost reduction effects on the electricity side without affecting the electricity demand of enterprise production.
[0076] In some examples, the system data may include time-of-use electricity price data and carbon intensity data for the current time period, as well as time-of-use wind and solar power output data, obtained from the power system platform. The system data may also include historical time-of-use actual power consumption data and time-of-use carbon emission data exported from electricity users connected to the power system. For example, the current time period may be the current day.
[0077] In some examples, the electronic device can also use all system data acquired in each incremental training cycle as incremental samples and input them into the scheduling model for incremental training, thereby further refining and optimizing the model and increasing its accuracy. For example, the incremental training cycle can be every 10 days.
[0078] Thirdly, embodiments of this application provide a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the above-mentioned embodiments.
[0079] Fourthly, embodiments of this application provide an electronic device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the preceding claims.
[0080] See Figure 3 The electronic device of this embodiment includes a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program, it implements the steps in the various method embodiments described above.
[0081] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 302 and executed by the processor 301 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0082] The electronic device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The electronic device may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will understand that the schematic diagram is merely an example of an electronic device and does not constitute a limitation on the electronic device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0083] The processor 301 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor 301 can be any conventional processor. The processor 301 is the control center of the electronic device, connecting various parts of the electronic device through various interfaces and lines.
[0084] The memory 302 can be used to store the computer programs and / or modules. The processor 301 implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory 302 and calling the data stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0085] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a non-transitory computer-readable storage medium. When the computer program is executed by the processor 301, it can implement the steps of the various method embodiments described above. Wherein, the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0086] In summary, the embodiments of this application have at least the following beneficial effects: Using the embodiments of this application, training samples are obtained, including system carbon emissions samples of the power system and user carbon emissions samples of the target electricity users connected to the power system; the training samples are divided into multiple groups of classification samples containing target group classification samples according to electricity consumption; training samples with electricity consumption ≥ a preset baseline electricity consumption value and ≤ a preset high load electricity consumption value are all classified into the target group classification samples; the preset baseline electricity consumption value is the minimum value to maintain the basic production electricity demand of the target electricity users; target type samples and non-target type samples are extracted from each group of classification samples; in the target type samples, the carbon emissions of the user carbon emissions samples are ≤ the low carbon threshold, and the user carbon emissions samples... The electricity consumption information meets the low electricity consumption conditions; all target type samples form a target type sample set, and all non-target type samples form a non-target type sample set; based on the target type sample set, the first loss information of the pre-built deep learning model is determined; based on the target type sample set and the non-target type sample set, the second loss information of the deep learning model is determined; based on the reference sample determined by the target group classification sample and the target type sample in the target group classification sample, the third loss information of the deep learning model is determined; the acquired training samples are bound to corresponding labels and input into the deep learning model, utilizing the first loss information, the second loss information, and the third loss information. The training loss determined by the three loss information is used to train the deep learning model, enabling the model to learn the coupling correlation between the system's carbon emissions and the user's carbon emissions. During training, a weighted calculation function is used to reduce the first and third loss information and increase the second loss information until the training loss converges to below a preset loss value, thus completing the training. This yields a carbon emissions coupling scheduling model for generating low-carbon, low-electricity-consumption scheduling and operation schemes for target electricity users. In this way, by introducing sample partitioning based on electricity consumption, the sample groups can have load-side / demand-side characteristics, reducing the power generation surge caused by a single power generation side. Furthermore, by using target type samples that meet emission requirements, the model can be guided to learn clean and efficient power generation characteristics. Moreover, the first loss information can improve the model's accuracy in identifying basic features under the premise of meeting emission requirements. The second loss information can enhance the model's generalization ability and improve its ability to distinguish between target and non-target electricity consumption. The third loss information can introduce reference samples to further calibrate the model's decision boundary under key target group classification samples. Thus, through multi-level loss constraints, the scheduling model can achieve optimal matching under the premise of meeting emission and electricity demand, and suppress excessive power generation.
[0087] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary hardware platforms, or it can be implemented entirely by hardware. Based on this understanding, all or part of the technical solutions of this application that contribute to the background technology can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk, etc., including several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0088] The above description represents optional embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.
Claims
1. A training method for an electric carbon coupling scheduling model, characterized in that, include: Acquire training samples, including system carbon samples of the power system and user carbon samples of the target electricity users connected to the power system. The training samples are divided according to electricity consumption to obtain multiple groups of classification samples that include the target group classification samples; all training samples with electricity consumption ≥ the baseline electricity preset value and ≤ the high load electricity preset value are classified into the target group classification samples; the baseline electricity preset value is the minimum value to maintain the basic production electricity demand of the target electricity user; Extract target type samples and non-target type samples from each group of classified samples; in the target type samples, the carbon emissions of the user's electricity carbon sample are ≤ the low carbon threshold, and the electricity consumption information of the user's electricity carbon sample meets the low electricity consumption conditions; all target type samples form the target type sample set, and all non-target type samples form the non-target type sample set. Based on the target type sample set, determine the first loss information of the pre-built deep learning model; Based on the target type sample set and the non-target type sample set, determine the second loss information of the deep learning model; Based on the reference samples determined by the target group classification samples, and the target type samples in the target group classification samples, the third loss information of the deep learning model is determined. The acquired training samples are bound to corresponding labels and input into the deep learning model. The deep learning model is trained using a training loss determined based on the first loss information, the second loss information, and the third loss information. This allows the deep learning model to learn the coupling correlation between the system's carbon samples and the user's carbon samples. During the training process, a weighted calculation function is used to reduce the first and third loss information and increase the second loss information until the training loss converges to a value lower than the preset loss value. This completes the training and yields a carbon coupling scheduling model for generating low-carbon and low-electricity scheduling operation schemes for target electricity users.
2. The method according to claim 1, characterized in that, The step of determining the first loss information of the pre-built deep learning model based on the target type sample set includes: pairing any two target type samples in the target type sample set to obtain a first sample pair, and obtaining a first loss term based on the feature distance of each first sample pair, thereby determining the first loss information; The step of determining the second loss information of the deep learning model based on the target type sample set and the non-target type sample set includes: pairing each target type sample in the target type sample set with each non-target type sample in the non-target type sample set to obtain a second sample pair, and obtaining a second loss term based on the feature distance of each second sample pair, thereby determining the second loss information; The step of determining the third loss information of the deep learning model based on the reference sample determined by the target group classification sample and the target type sample in the target group classification sample includes: pairing each target type sample in the target group classification sample with the reference sample to obtain a third sample pair, and obtaining a third loss term based on the feature distance of each third sample pair, thereby determining the third loss information. The step of using a weighted calculation function to reduce the first and third loss information and increase the second loss information during training includes: using a weighted calculation function to reduce the feature distance of the first sample pair and the feature distance of the third sample pair respectively, thereby reducing the loss values of the first and third loss terms, and using the weighted calculation function to increase the feature distance of the second sample pair, thereby increasing the loss value of the second loss term.
3. The method according to claim 1, characterized in that, The weighted calculation function is used to set balance coefficients for the first loss information, the second loss information, and the third loss information respectively. During the training iteration, the balance coefficient of the third loss information is constrained to be greater than the balance coefficient of the first loss information, the balance coefficient of the first loss information is greater than the balance coefficient of the second loss information, and the sum of all balance coefficients is equal to 1.
4. The method according to claim 2, characterized in that, The acquired training samples are bound to corresponding labels, including: Training samples with electricity consumption ≥ the baseline preset value and ≤ the high load preset value are labeled with a normal load tag; training samples with electricity consumption < the baseline preset value are labeled with a low load tag; and training samples with electricity consumption > the high load preset value are labeled with a high load tag. For training samples whose carbon emissions are less than or equal to the low-carbon threshold and whose electricity costs are less than or equal to the low-electricity-cost threshold, supplementary low-carbon and low-electricity-cost labels are attached.
5. The method according to claim 4, characterized in that, The electricity consumption corresponding to each sample in the target group classification sample is greater than or equal to the preset value of the benchmark electricity consumption; The reference sample is obtained through the following steps: Among the target type samples included in the target group classification samples, target type samples are determined; the electricity consumption corresponding to the target type sample is equal to the preset value of the baseline electricity consumption, the carbon emission is equal to the low carbon threshold, and the electricity cost is equal to the low electricity cost threshold. Based on the identified target type samples, a reference sample is determined.
6. The method according to claim 5, characterized in that, The system's carbon emission sample includes historical electricity price data, historical carbon emission intensity data, and historical renewable energy output data of the power system. The user's carbon emission sample includes historical electricity consumption data, historical carbon emission data, and historical detailed data on the scheduling and operation of electrical equipment for the target electricity user. The acquisition of training samples includes: Obtain historical measured samples; the historical measured samples include historical measured electricity price data, historical measured carbon emission intensity data, and historical measured renewable energy output data of the power system, as well as historical measured electricity consumption data, historical measured carbon emission data, and historical measured power equipment scheduling and operation details data of the target electricity users; Based on the historical measured samples, simulations under different working conditions are performed by random perturbation to obtain simulation samples; The training samples are generated based on the simulation samples and the historical measured samples.
7. The method according to claim 6, characterized in that, The method further includes: A predetermined proportion of samples not included in the training samples are extracted from the historical test samples and used as test samples. The test samples are then input into the trained electro-carbon coupling scheduling model to obtain the model output scheme. The matching consistency between the model output scheme and the pre-bound labels of the test samples is compared. If the matching consistency between the model output scheme and the pre-bound labels of the test samples is greater than the deviation threshold, the obtained training samples are bound with the corresponding labels and input into the deep learning model to start the model supplementary training process. The model supplementary training process includes: The balance coefficient of the first loss term is defined as the first balance coefficient. The first loss term includes a first normal load sub-loss term and a first low load sub-loss term. The first normal load sub-loss term is the feature distance between training samples bound to the normal load label and the low-carbon and low-electricity cost label. The first low load sub-loss term is the feature distance between training samples bound to the low load label and the low-carbon and low-electricity cost label. The balance coefficient of the first normal load sub-loss term and the balance coefficient of the first low load sub-loss term are independent of each other. During the supplementary training iteration, the balance coefficient of the first normal load sub-loss term is constrained to be greater than the balance coefficient of the first low load sub-loss term, and the sum of the balance coefficients of the first normal load sub-loss term and the first low load sub-loss term is equal to the first balance coefficient. The balance coefficient of the second loss term is defined as the second balance coefficient. The second loss term includes a second normal load sub-loss term and a second low load sub-loss term. The second normal load sub-loss term is the feature distance between the training sample with the normal load label and the low carbon and low electricity cost label and the non-target type sample in the non-target type sample set. The second low load sub-loss term is the feature distance between the training sample with the low load label and the low carbon and low electricity cost label and the non-target type sample in the non-target type sample set. The balance coefficient of the second normal load sub-loss term and the balance coefficient of the second low load sub-loss term are independent of each other. During the supplementary training iteration, the balance coefficient of the second normal load sub-loss term is constrained to be greater than the balance coefficient of the second low load sub-loss term, and the sum of the balance coefficients of the second normal load sub-loss term and the second low load sub-loss term is equal to the second balance coefficient. The non-target type sample set is divided into low-carbon high-electricity-cost carbon type samples, high-carbon high-electricity-cost carbon type samples, and high-carbon low-electricity-cost carbon type samples. During the supplementary training iteration of the second loss term, the balance coefficient corresponding to the feature distance between the training samples bound to the normal load label and the low-carbon low-electricity-cost label in the second loss term and the high-carbon high-electricity-cost carbon type samples is the largest among the balance coefficients of the second normal load sub-loss term.
8. An energy dispatching method based on electrocarbon coupling optimization, characterized in that, include: The time-of-use electricity price data and carbon emission intensity data of the power system during the target scheduling period, as well as the electricity consumption data required by the target electricity users connected to the power system during the target scheduling period, are obtained as the target scheduling period data. The target scheduling period data is input into the electricity-carbon coupling scheduling model to obtain a low-carbon, low-electricity scheduling scheme adapted to the target scheduling period output by the electricity-carbon coupling scheduling model for the target electricity user. The electricity-carbon coupling scheduling model is trained by the training method according to any one of claims 1-7. Based on the aforementioned low-carbon and low-power consumption scheduling scheme, the electrical equipment of the target electricity users is scheduled and controlled.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-8.
10. An electronic device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the method of any one of claims 1-8.
