Network security method for supporting user side resources to participate in demand response and related device
Through the blockchain-enabled demand response model and security resource allocation optimization model, the number of blocks and sub-channel allocation are optimized, and combined with the adaptive DQN optimization method, it solves the problems of consensus throughput and delay balance and long-term decentralization constraints in traditional methods. problem, improving the security and efficiency of the demand response system.
Patent Information
- Application Number
- CN202410998055.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-24
AI Technical Summary
The traditional demand response information interaction method based on blockchain is difficult to achieve a dynamic balance between consensus throughput and block consensus delay, and long-term decentralization constraints cannot ensure the security of the block consensus process, resulting in the security of demand response information. Interaction faces huge challenges.
Through the blockchain-empowered demand response model, combined with the security resource allocation optimization model, the number of blocks in each period and the sub-channel allocation decision of the block consensus node are optimized to maximize the weighting of the consensus throughput and the reciprocal of the block consensus delay. , to ensure long-term decentralization, using Lyapunov optimization theory and adaptive DQN block and channel resource collaborative allocation optimization methods to achieve high efficiency and security in the consensus process.
It has improved the processing speed and response efficiency of the demand response system, dynamically balanced consensus throughput and latency, ensured the long-term risk resistance of the blockchain network and the security of demand response, and improved the security and efficiency of the entire system. .
Smart Images

Figure CN118764166A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of demand response in the electric power industry, and specifically relates to a network security method and related devices for supporting user-side resources to participate in demand response. Background Art
[0002] With the accelerated construction of new power systems, a high proportion of renewable energy is continuously connected to the power grid. The intermittent and volatile output of distributed renewable energy such as solar and wind power, as well as the disorderly charging of large-scale electric vehicles, seriously threaten the reliability of power supply in the distribution network. Demand response encourages users to reduce loads during peak hours or transfer loads to the valley stage to achieve peak load reduction and valley filling, thereby ensuring the balance of supply and demand in the distribution network. However, the execution of demand response business involves multiple entities such as power grid companies, aggregators, and power users. Due to the differences among entities, the interaction of multi-subject demand response information has problems such as high trust cost, information opacity, and low transaction efficiency. The secure interaction of demand response information faces huge challenges.
[0003] Blockchain technology has the advantages of distributed accounting, no need for trusted third parties, and non-tamperability, providing a solution for solving the trusted interaction of multi-subject demand response. Using blockchain technology to empower the demand response system can effectively reduce the trust cost between market entities of various types, large numbers, and different electricity consumption habits. However, the traditional blockchain-based demand response information interaction method still faces the following challenges. First, the traditional method does not consider that the consensus throughput and block consensus delay are contradictory. Optimizing one of the indicators will lead to the deterioration of the other indicator. It is not suitable for the collaborative optimization research of the two, and it is difficult to achieve a dynamic balance between contradictory indicators. Secondly, the traditional method does not consider the long-term decentralized constraints, it is difficult to guarantee the long-term risk resistance in the block consensus process, and it is impossible to guarantee the security of demand response. Therefore, there is an urgent need for a network security technology that supports user-side resources to participate in demand response. Summary of the invention
[0004] In view of this, the present invention aims to provide a network security method and related devices for supporting user-side resources to participate in demand response, so as to solve the above-mentioned problems existing in the secure interaction of demand response information in traditional methods.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] In a first aspect, the present invention provides a network security method for supporting user-side resources to participate in demand response, comprising the following steps:
[0007] Obtain the user demand response behavior plan and reach consensus based on the blockchain-enabled demand response model. The blockchain-enabled demand response model is used to reach consensus on the user demand response behavior plan based on a preset consensus algorithm;
[0008] The number of blocks in the consensus process of each period and the sub-channel allocation decision of the block consensus node are solved according to the security resource allocation optimization model. The security resource allocation optimization model is used to maximize the weighted value of consensus throughput and the inverse of block consensus delay by optimizing the number of blocks in the consensus process of each period and the sub-channel allocation decision of the block consensus node under the constraints of sub-channel allocation and long-term decentralization. The long-term decentralization constraint is used to ensure that the blockchain-enabled demand response model maintains a decentralization level that meets the long-term high requirements, so as to ensure the security of user-side resources participating in demand response.
[0009] The consensus process is optimized based on the solved number of blocks and the sub-channel allocation decision of the block consensus node to reach a consensus, thereby supporting user-side resources to participate in demand response based on the user demand response behavior plan that has reached consensus.
[0010] Furthermore, the security resource allocation optimization model is represented by the first optimization problem as follows:
[0011]
[0012] Where X(t) represents the block number decision vector of the tth period, W(t) represents the subchannel allocation vector of the tth period, T is the number of periods, t is the period index, Y(t) represents the consensus throughput of the tth period, θ M is the weight coefficient, T total (t) is the block consensus delay in the tth period, C1 is the block number decision indicator variable, I is the block number level number, i is the block number level index, x i (t) = 1 indicates the number of blocks of level i selected in time period t, C2 is the subchannel allocation constraint, W represents the total system bandwidth, Represented as node S n The number of allocated subchannels, W0 represents the average bandwidth of the subchannel, C3 is the long-term decentralization constraint, Represents the number of blocks up to the tth period The Gini coefficient, G max Represents the upper limit of the maximum tolerable Gini coefficient.
[0013] Furthermore, when solving the security resource allocation optimization model, a virtual queue is constructed based on the Lyapunov optimization theory. Based on the virtual queue, the long-term decentralization constraint is transformed into a queue stability constraint, and the second optimization problem is obtained as follows:
[0014]
[0015] In the formula, θ Z is the weight coefficient, Z(t) is the actual Gini coefficient of the system at the end of the tth period and the maximum tolerable Gini coefficient upper limit Gmax deviation.
[0016] Furthermore, the second optimization problem is constructed as a time-series Markov process for solution, and the constructed time-series Markov process includes: a state space, an action space, and a reward function;
[0017] The state space includes the signal-to-noise ratio between different edge servers, the computational resources of edge servers, and the decentralized deficit virtual queue;
[0018] The action space includes block number decisions and subchannel allocation decisions;
[0019] The reward function is used to punish the problem according to the degree of non-satisfaction when the constraints of the optimization problem are not met, thereby reducing the reward value.
[0020] Furthermore, the sequential Markov process is solved by an adaptive DQN block and channel resource collaborative allocation optimization method driven by safety boundary destruction penalty. The collaborative allocation optimization method includes an evaluation network and a target network. The solution process includes:
[0021] The state information of the edge layer of the current time slot is input into the evaluation network to obtain the state-action value function of different actions in the current time slot, and on this basis, the action with the largest state-action value of the current time slot is selected based on the strategy obtained by the exploration and utilization adaptive adjustment algorithm. Among them, the exploration and utilization adaptive adjustment algorithm is used to use the existing optimal resource management strategy to reduce the penalty received during the learning process when the penalty for safety boundary destruction in the previous period meets the larger condition. When the penalty for safety boundary destruction in the previous period does not meet the larger condition, other optimal resource management strategies are explored to avoid falling into the local optimum;
[0022] Execute the selected action, calculate the reward value, transfer to the next state and store the action chain into the experience pool. The action chain includes the current state, the corresponding action and reward value, and the next state;
[0023] A set of experience data is randomly extracted from the experience pool, and the time difference error of the evaluation network in the current time slot is calculated;
[0024] The evaluation network parameters are updated according to the timing difference error, and the target network is synchronized with the evaluation network at set intervals;
[0025] The above steps are iterated until the optimization cycle ends.
[0026] Furthermore, consensus throughput Y(t) and block consensus latency T total (t) is determined by the consensus throughput model and consensus latency model respectively, as follows:
[0027] Consensus Throughput Model:
[0028]
[0029] Where Ξ(k(t)) is the total number of transactions recorded in a single block in period t, k(t) is the number of blocks that the master node needs to produce in period t, and IB(B(t), k(t)) represents the number of master nodes B in period t. p Transmit to the master node B in the next period p′ The number of blocks ignored when k(t)B(t) is the sum of all block sizes generated by the master node in the tth period. For the average size of each transaction, is B in the tth period p Can p′ The amount of data transmitted, B(t) is the size of a single block in the tth period;
[0030] Consensus delay model:
[0031]
[0032] In the formula, is the transmission delay in the tth period, is the transmission delay in the pre-preparation phase, is the transmission delay in the preparation phase, is the transmission delay in the submission phase, is the transmission delay in the reply phase, k(t) is the number of blocks that the master node needs to produce in the tth period; is the calculation delay of the tth period, Calculate the latency for the request phase, Calculate the delay for the pre-preparation phase, Calculate the delay for the preparation phase, Calculate the latency for the commit phase, Calculate the delay for the reply phase.
[0033] Furthermore, the number of blocks up to the tth period is The Gini coefficient Determine as follows:
[0034]
[0035] In the formula, k(i) and k(j) are the number of blocks that the master node needs to produce in the i-th and j-th time periods respectively, and N represents the number of nodes that take turns to serve as the master node.
[0036] In a second aspect, the present invention provides a network security system for supporting user-side resources to participate in demand response, including: a cloud layer, an edge layer, and a physical layer;
[0037] The cloud layer is used to send user demand response behavior plans to the edge layer for consensus; it is also used to solve the number of blocks in the consensus process of each period and the sub-channel allocation decision of the block consensus node according to the security resource allocation optimization model. The security resource allocation optimization model is used to maximize the weighted consensus throughput and the inverse of the block consensus delay by optimizing the number of blocks in the consensus process of each period and the sub-channel allocation decision of the block consensus node under the constraints including sub-channel allocation and long-term decentralization. The long-term decentralization constraint is used to ensure that the blockchain-enabled demand response model maintains a degree of decentralization that meets long-term high requirements to ensure the security of user-side resources participating in demand response; it also guides the consensus process based on the solved number of blocks and the sub-channel allocation decision of the block consensus node;
[0038] The edge layer is used to reach consensus based on the blockchain-enabled demand response model, which is used to reach consensus on user demand response behavior plans based on a preset consensus algorithm; it is also used to send the user demand response behavior plans that have reached consensus to the physical layer;
[0039] The physical layer is used to execute action plans in response to user needs.
[0040] Accordingly, the present invention also provides a computer device, the device comprising a processor and a memory:
[0041] The memory is used to store the computer program and send the instructions of the computer program to the processor;
[0042] The processor executes a network security method for supporting user-side resources to participate in demand response as described in the first aspect according to the instructions of the computer program.
[0043] Correspondingly, the present invention also provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, a network security method for supporting user-side resources to participate in demand response as in the first aspect is implemented.
[0044] In summary, the present invention provides a network security method and related devices that support user-side resources to participate in demand response. The method provides a decentralized trust basis for the demand response process through the application of blockchain technology. The introduction of the security resource allocation optimization model enables the system to manage resources in the consensus process more efficiently. By optimizing the number of blocks in the consensus process for each period and the sub-channels of the block consensus nodes, the consensus throughput is maximized and the block consensus delay is reduced, thereby improving the processing speed and response efficiency of the entire demand response system, and achieving a dynamic balance between two contradictory indicators. The setting of long-term decentralization constraints ensures that the blockchain network can still maintain a high degree of decentralization during scale expansion and long-term operation. It ensures the long-term risk resistance in the block consensus process and also ensures the security of demand response. By combining blockchain technology and the security resource allocation optimization model, the present invention improves the security and efficiency of the demand response process and supports the network security of user-side resources participating in demand response. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A flowchart of a network security method for supporting user-side resources to participate in demand response provided by an embodiment of the present invention;
[0047] Figure 2 A diagram of a blockchain-enabled security demand response system provided by an embodiment of the present invention;
[0048] Figure 3 A schematic diagram of a security resource allocation software module based on security boundary destruction penalty driven adaptive deep learning provided by an embodiment of the present invention;
[0049] Figure 4 A flow chart of a network security technology for supporting user-side resources to participate in demand response provided by an embodiment of the present invention;
[0050] Figure 5 A schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] See also Figure 1 This embodiment provides a network security method for supporting user-side resources to participate in demand response, including the following steps:
[0053] S1: Obtain the user demand response behavior plan and reach consensus based on the blockchain-enabled demand response model. The blockchain-enabled demand response model is used to reach consensus on the user demand response behavior plan based on a preset consensus algorithm.
[0054] It should be noted that this step aims to enhance the consensus process of user demand response behavior plans through blockchain technology. Specifically, all user demand response behavior plans involved (such as adjusting electricity consumption time, changing electricity consumption, etc.) are submitted to the blockchain network and verified and agreed upon using the preset consensus algorithm (such as Proof of Stake, Proof of Work, etc.).
[0055] This step uses the immutability and transparency of blockchain to ensure the fairness and transparency of demand response behavior, so that all participants have a common understanding and trust in the response plan, thus laying a solid foundation for subsequent resource scheduling and execution.
[0056] S2: The number of blocks in the consensus process of each time period and the sub-channel allocation decision of the block consensus node are solved according to the security resource allocation optimization model. The security resource allocation optimization model is used to maximize the weighted value of consensus throughput and the inverse of block consensus delay by optimizing the number of blocks in the consensus process of each time period and the sub-channel allocation decision of the block consensus node under the constraints of sub-channel allocation and long-term decentralization. The long-term decentralization constraint is used to ensure that the blockchain-enabled demand response model maintains a decentralization level that meets long-term high requirements, so as to ensure the security of user-side resources participating in demand response.
[0057] It should be noted that in order to further optimize the consensus process, especially to improve consensus efficiency and decentralization, this step adopts a secure resource allocation optimization model. This model dynamically adjusts the number of blocks in each period and the sub-channel allocation of consensus nodes under the premise of considering sub-channel allocation (ensuring data transmission efficiency) and long-term decentralization constraints (maintaining network decentralization).
[0058] In this step, by maximizing consensus throughput (processing capacity) and minimizing latency, the model can ensure the real-time and effectiveness of demand response, while maintaining the stability of the blockchain network and avoiding the risks brought by centralization. At the same time, it also achieves a dynamic balance between the two conflicting indicators, ensuring the long-term risk resistance and security of demand response in the block consensus process.
[0059] S3: Optimize the consensus process based on the solved number of blocks and the sub-channel allocation decision of the block consensus node to reach a consensus, thereby supporting user-side resources to participate in demand response based on the user demand response behavior plan that has reached consensus.
[0060] It should be noted that based on the optimal number of blocks and sub-channel allocation decisions solved in the first two steps, this step optimizes the consensus process, speeds up the consensus, and ensures that the user demand response behavior plan can be effectively implemented.
[0061] Through these optimization measures, user-side resources can be adjusted according to the demand response plan on which consensus has been reached, such as reducing electricity consumption during peak hours or increasing consumption when renewable energy is in surplus, thereby achieving flexible adjustment of electricity supply and demand and improving the overall efficiency and reliability of the energy system.
[0062] Figure 2 It is a diagram of a blockchain-enabled security demand response system; Figure 3 This is a schematic diagram of a security resource allocation software module based on security community destruction penalty driven adaptive deep learning; Figure 4 This is a network security technology flow chart that supports user-side resources to participate in demand response. Figure 2-4 Further embodiments of the present invention are introduced.
[0063] The method proposed in the present invention can be applied to the security demand response system enabled by blockchain, such as Figure 1 As shown in Figure 1, it includes the physical layer, edge layer and cloud layer. The cloud layer includes the power grid company's demand response cloud platform and the demand response aggregator cloud platform. The demand response business is jointly completed by the power grid company's demand response cloud platform, the demand response aggregator cloud platform and power users. The power grid company's demand response cloud platform is responsible for managing and publishing demand response signals. After the demand response aggregator cloud platform receives the demand response signal issued by the power grid company's demand response cloud platform, it executes the smart contract to determine the user's demand response behavior plan and sends the response information to the edge layer. The edge layer consists of N edge servers and 5G base stations. The edge server set is represented as The base station is responsible for achieving communication coverage within the area and providing communication support for the interaction between the physical layer, edge layer, and cloud layer. The edge server is responsible for receiving the demand response information sent by the demand response aggregator cloud platform and issuing demand response requirements to power users, and maintaining the blockchain platform. The physical layer is composed of power users with distributed power equipment such as sources, loads, and storage, and is responsible for adjusting the corresponding power consumption behavior after receiving the edge layer demand response requirements.
[0064] The present invention considers T time periods, whose set is expressed as The duration of each time period is τ. At the beginning of each time period, first, the power grid company's demand response cloud platform releases a demand response signal to the demand response aggregator cloud platform. After receiving the demand response signal, the demand response aggregator cloud platform executes the smart contract to determine the user demand response behavior plan and sends it to the edge layer base station. Secondly, each edge server reaches a consensus on the received user demand response behavior plan, and then the edge server as the master node packages the user demand response behavior plan that has reached consensus into a new block and uploads it to the blockchain network. The base station sends the user demand response behavior plan that has reached consensus to the power users at the physical layer to start the demand response. Finally, the power users perform the demand response task according to the received demand response requirements, and the demand response aggregator cloud platform pays the power users who participate in the demand response, and the demand response is completed. The demand response aggregator cloud platform maximizes the weighted sum of the consensus throughput and the inverse of the total delay of the block consensus by optimizing the number of blocks and the spectrum allocation strategy.
[0065] Practical Byzantine Fault Tolerance (PBFT) is a distributed consensus algorithm that does not require a trusted third party. It can realize consistency verification of transactions and data in a decentralized environment, and has high security and fault tolerance. Therefore, in the proposed architecture, each edge server reaches a consensus on the user demand response behavior plan issued by the demand response aggregator cloud platform based on PBFT, and supports the implementation of the power system demand response business with decentralized management and control methods to ensure the authenticity and consistency of information in the demand response system, while improving the security and reliability of the system. In the tth period, the demand response aggregator cloud platform decides the number of blocks k(t) that the master node needs to produce in the current period. Definition Define x i (t)∈{0,1} is the block quantity decision indicator variable. i (t) = 1, indicating the number of blocks selected by the demand response aggregator cloud platform at the i-th level in time period t, that is, the number of blocks k(t) = K iThe master node is alternately served by N edge servers. The larger the number of blocks produced by the master node, the more demand response requests need to be completed during this period. On the other hand, since the generation of blocks requires consensus among edge servers, an excessive number of blocks will lead to a significant increase in consensus latency.
[0066] The security resource allocation optimization model of step S2 is represented by the joint optimization problem of the number of blocks in the consensus process and the sub-channel allocation decision of the block consensus node, that is, the first optimization problem. In a preferred embodiment of the present invention, a method for constructing a security resource allocation optimization model for blockchain-enabled demand response is proposed. The method adopts a demand response consensus model, a consensus throughput model, a consensus delay model, a sub-channel bandwidth constraint model, and a decentralized constraint model to construct a security resource allocation optimization model. The steps of the method are as follows:
[0067] S21: Construct a demand response consensus model based on the PBFT consensus process. Compared with the traditional demand response business process, the edge server in this embodiment needs to verify the signature and message authentication code (MAC) in addition to processing the user demand response behavior plan issued by the demand response aggregator cloud platform, which can be regarded as the computational overhead of executing consensus. Define α, β and θ to represent the computational complexity of processing the demand response information issued by the demand response aggregator cloud platform, generating or verifying a signature, and generating or verifying a MAC, respectively. The demand response consensus process includes five steps: request, pre-preparation, preparation, submission and reply, as described below.
[0068] (1) Request: In period t, the master node is defined as the edge server S p . The user demand response behavior plan issued by the demand response aggregator cloud platform will be stored as a transaction in the pending pool. For a transaction, the master node first verifies its signature. If valid, it verifies the MAC of the transaction. If still valid, the master node will process the demand response information in the transaction and obtain the processing result. At the end of the period, all completed transactions, processing results and important transaction-related information will be packaged into a new block.
[0069] Assume that the average size of each transaction is Define the size of a single block in period t as B(t), then the maximum number of transactions that can be included in a block is is a rounding function. Assume that the g(t) part of the demand response information sent by the demand response aggregator cloud platform in period t is correct. At this stage, S p Requires verification The signature and MAC of the transaction still need to be processed Therefore, the request stage master node S p The data processing complexity is expressed as
[0070]
[0071] The computational latency of a single block in the request phase is expressed as
[0072]
[0073] In the formula, Indicates the master node S p computing power.
[0074] (2) Pre-preparation: After generating a new block, the master node S p Multicast the prepared message and the signed block to all backup nodes via the 5G communication network The transmission delay generated by this process depends on the node that receives the block last, so the transmission delay of a single block in the pre-preparation stage is expressed as
[0075]
[0076] In the formula, Indicates that the slave node S p To the backup node S n In this paper, we consider multicast OFDMA, where a sender uses subchannels to multicast the same message to multiple receivers. The entire spectrum bandwidth W is divided into E ≥ N subchannels, and the subchannel bandwidth is W0. Expressed as
[0077]
[0078] In the formula, The cloud platform of the demand response aggregator in the t period is the main node S p The number of allocated subchannels, is the signal-to-noise ratio. At the same time, the master node needs to generate 1 signature and N-1 MACs, and its data processing complexity is
[0079]
[0080] The backup node needs to verify the signature and MAC of the primary node and also needs to process The demand response information in each transaction is obtained, and the signature and MAC in each transaction are verified respectively. The data processing complexity of the backup node is expressed as
[0081]
[0082] In the formula, S n ≠Sp The completion of the pre-preparation phase of the consensus process requires that each node has processed the information in the transaction and verified the signature. Therefore, the computational delay of a single block in the pre-preparation phase is expressed as
[0083]
[0084] In the formula, Represents node S n computing power.
[0085] (3) Prepare: After completing the verification of the signature and MAC, each backup node will send a prepare message to all other nodes. At the same time, each node checks whether the received prepare message is consistent with the pre-prepare message received in the pre-prepare phase. According to the PBFT protocol, once 2f prepare messages are received from other nodes, the commit phase begins.
[0086] Similar to the pre-preparation phase, the transmission delay of a single block in the preparation phase is expressed as
[0087]
[0088] In the formula, Represents the backup node S n To the backup node S n′ The transmission rate is calculated in the same way as resemblance.
[0089] Assume f≤(N-1) / 3 is the number of dishonest nodes in PBFT. The master node needs to verify 2f signatures and MACs from the backup nodes. The data processing complexity is
[0090]
[0091] Other backup nodes need to generate 1 signature and N-1 MACs for the prepare message, and need to verify 2f signatures and MACs from the master node. Therefore, the data processing complexity of the backup node is expressed as
[0092]
[0093] In the formula, S n ≠S p Similar to the pre-preparation phase, the computational latency of a single block in the preparation phase is expressed as
[0094]
[0095] (4) Commit: After each backup node receives 2f preparation confirmation messages that are consistent with the pre-prepare messages, it sends a commit message to all nodes. In the commit phase, the transmission delay of a single block is expressed as
[0096]
[0097] In the submission phase, each node needs to generate 1 signature and N-1 MACs for the submission message. After receiving the submission message, each node also needs to verify 2f signatures and MACs. Therefore, the data processing complexity of each node is
[0098]
[0099] Therefore, the computational latency of a single block in the submission phase is expressed as
[0100]
[0101] (5) Reply: After collecting 2f submission messages, each backup node confirms that the new block is a valid block and generates a local copy of the block. At the same time, each backup node sends a reply message to the master node. After receiving the reply message, the master node updates the new block to the blockchain. In the reply phase, the transmission delay of a single block is
[0102]
[0103] During the recovery phase, each backup node needs to generate signatures, the master node needs to generate MAC, the computational complexity of the backup node is For the master node, 2f signatures and MACs need to be verified, and the computational complexity is Therefore, the computational delay of a single block in the reply phase is expressed as
[0104]
[0105] S22: This embodiment constructs a consensus throughput model. When a block is generated, the number of transactions that successfully reach consensus is limited by the block size and the data processing capacity of the master node. In a preferred embodiment of the present invention, the consensus throughput model is as follows:
[0106] Considering the block size, the total number of transactions recorded in a single block in period t is
[0107]
[0108] Since the master node needs to continuously generate k(t) blocks, the last few blocks may be ignored due to the large transmission delay from the master node of the current period to the master node of the next period. Define the master node of the t+1 period as B p′ , then the master node B in period t p Transmit to the master node B in the next period p′ The transmission rate is Therefore, the number of ignored blocks is expressed as
[0109]
[0110] Where k(t)B(t) is the sum of all block sizes generated by the master node in the tth period, is B in the tth period p Can p′ The amount of data transferred. If the sum of the block sizes generated by the master node exceeds B in period t p Can p′ The amount of data transmitted is large, so some blocks will be ignored because they cannot be transmitted before the end of the period. Therefore, consensus throughput is defined as the number of transactions successfully processed in a single period to measure the transaction processing performance of the blockchain-enabled demand response architecture in each period, which can be expressed as
[0111]
[0112] S23: This step constructs a consensus delay model, defining the block consensus delay as the time from when the edge server receives the demand response information from the demand response aggregator cloud platform to when the block is successfully uploaded to the blockchain. The block consensus delay specifically includes two parts, namely, transmission delay and computation delay. In a preferred embodiment of the present invention, the consensus delay model is as follows:
[0113] In the tth period, the transmission delay is the sum of the transmission delays generated in the pre-preparation phase, preparation phase, submission phase, and reply phase of the period, expressed as
[0114]
[0115] Similarly, the computation delay is the sum of the computation delays in the request phase, pre-preparation phase, preparation phase, submission phase, and reply phase during the period, expressed as
[0116]
[0117] Therefore, the block consensus delay in period t is expressed as
[0118]
[0119] S24: This embodiment constructs a decentralized constraint model. In the blockchain-enabled demand response model, the degree of decentralization not only reflects the overall risk resistance of the model, but also serves as a measure of fairness. A highly decentralized architecture can more effectively prevent single point failures and network attacks while ensuring that the interests of all system participants are equally considered and maintained. The Gini coefficient is used to describe the degree of decentralization of the demand response resource trading system. Over time, the blockchain system will generate different numbers of blocks. The set of block numbers up to the tth period is defined as Therefore, in a preferred embodiment of the present invention, The Gini coefficient is expressed as
[0120]
[0121] In the formula, The smaller the Gini coefficient is, the smaller the difference in the number of blocks generated in each period of the blockchain-enabled demand response model is, that is, the higher the degree of decentralization is, the better the security performance is. In order to ensure that the blockchain-enabled demand response model maintains a high degree of decentralization in the long term, this paper introduces a long-term decentralization constraint. Definition G max is the maximum tolerable Gini coefficient upper limit of the blockchain system, then The long-term stable decentralization constraint of
[0122]
[0123] Quantifying the degree of decentralization through the Gini coefficient can ensure that power and resources in the blockchain-enabled demand response model will not be overly concentrated in a few nodes, thereby maintaining the stability and sustainable development of the entire system.
[0124] S25: Construct sub-channel allocation constraints. Since the total bandwidth resources available in the blockchain-enabled demand response resource trading system are limited, the number of sub-channels allocated by the demand response aggregator cloud platform to each block consensus node needs to meet the following constraints.
[0125]
[0126] W represents the total system bandwidth, Represented as node S n The number of allocated subchannels, W0 represents the average bandwidth of the subchannel, and C2 indicates that the bandwidth allocated to all nodes should not exceed the total bandwidth of the system.
[0127] S26: A secure resource allocation optimization model for blockchain-enabled demand response, whose main performance evaluation indicators are consensus throughput and block consensus delay. The consensus throughput represents the number of demand response services completed in each time period, and the block consensus delay represents the time for each edge server to reach a consensus on the user demand response behavior plan issued by the demand response aggregator cloud platform, including the transmission delay and calculation delay in the five stages of the request stage, pre-preparation stage, preparation stage, submission stage, and reply stage. A longer block consensus delay will affect the progress of the demand response service and increase the risk of the demand response information being changed or revoked. Therefore, this paper maximizes the weighted sum of the consensus throughput and the inverse of the block consensus delay by optimizing the number of blocks in the consensus process in each time period and the sub-channel allocation decision of the block consensus node. In a preferred embodiment of the present invention, the first optimization problem is constructed as follows:
[0128]
[0129] In the formula, θ M is a weight coefficient used to balance the order of magnitude and weigh the consensus throughput and block consensus latency performance. Represents the decision vector of the number of blocks in the tth period. represents the subchannel allocation vector in the tth period. C1 and C2 represent the block number decision indicator variable and the subchannel allocation constraint respectively, and C3 represents the long-term decentralization constraint.
[0130] In a preferred embodiment of the present invention, due to the coupling between the long-term decentralization constraint C3 and the short-term decision and the unobtainability of future global information, the optimization problem P1 cannot be solved directly. Therefore, this paper constructs a virtual queue based on the Lyapunov optimization theory, and transforms the long-term decentralization constraint C3 into a queue stability constraint in the decentralized queue construction submodule.
[0131] Define the decentralized deficit virtual queue Z(t), and the update formula is expressed as
[0132]
[0133] In the formula, Z(t) is the difference between the actual Gini coefficient of the system at the end of the tth period and the upper limit of the maximum tolerable Gini coefficient G max The larger the deviation Z(t), the lower the degree of decentralization of the blockchain-enabled demand response architecture and the lower the security.
[0134] Based on the above virtual queue and Lyapunov optimization theory, the virtual queue backlog is used to reflect the satisfaction of the long-term decentralization constraint, thereby decoupling the short-term block quantity decision and sub-channel allocation decision from the long-term decentralization constraint, and transforming the optimization problem P1 into the optimization problem P2, that is, the second optimization problem, namely
[0135]
[0136] In the formula, θ Z is the weight coefficient used to balance the order of magnitude and trade off the optimization objective and queue stability. is the security boundary violation penalty, calculated by the security boundary violation penalty calculation submodule, which indicates the negative impact of failing to meet the decentralization constraint on the optimization objective. The larger its value, the lower the degree of decentralization, forcing future optimization decisions to tend to reduce the backlog of the decentralization deficit virtual queue to meet the long-term decentralization constraint.
[0137] In combination with the above embodiments, a method for constructing a security resource allocation optimization model for blockchain-enabled demand response is proposed. First, a blockchain-enabled security demand response resource transaction model is constructed, including a demand response consensus model, a consensus throughput model, a consensus delay model, a sub-channel bandwidth constraint model, and a decentralized constraint model; then, a joint optimization problem of the number of blocks in the consensus process and the sub-channel allocation decision of the block consensus node is constructed; finally, a security resource allocation software module based on security boundary destruction penalty-driven adaptive deep learning is constructed in a decentralized queue construction submodule based on Lyapunov optimization theory, and long-term decentralization constraints are converted into queue stability constraints for easy solution. Support is provided for the subsequent security resource allocation decision submodule to implement the adaptive collaborative allocation method of block and channel resources, thereby ensuring the authenticity and consistency of information in the demand response system, while improving the security and reliability of the system.
[0138] In combination with the above embodiments, in order to solve the problem of low efficiency of demand response information interaction due to failure to consider the joint optimization of block consensus throughput and consensus delay, the present invention proposes a method for constructing a secure resource allocation optimization model for blockchain-enabled demand response. By constructing a secure resource allocation optimization model for blockchain-enabled demand response, the weighted sum of consensus throughput and the inverse of block consensus delay is used as the optimization target, and the joint guarantee of consensus throughput and block consensus delay is achieved by dynamically adjusting the optimization weight. Further based on Lyapunov optimization theory, the short-term joint guarantee problem is decoupled from the long-term decentralized constraint, providing support for the coordinated allocation optimization of blocks and channel resources, thereby improving the security and efficiency of demand response information interaction.
[0139] In a preferred embodiment of the present invention, a block and channel resource adaptive allocation method based on security boundary violation penalty driven adaptive deep learning is proposed. In this method, a time-series Markov process is constructed based on the joint optimization problem P2. As follows:
[0140] The optimization problem P2 is described as an MDP process. The demand response aggregator cloud platform is defined as the decision maker. At the beginning of each time period, the demand response aggregator cloud platform executes specific block quantity decisions and sub-channel allocation decisions according to the state and switches to a new state. Before the demand response aggregator cloud platform makes block quantity decisions and sub-channel allocation decisions, the channel status and decentralized deficit virtual queues between edge servers cannot be predicted in advance, that is, the global information cannot be known. Therefore, the state identification submodule collects relevant information such as the historical channel status and historical virtual queue status of the previous time period as the basis for block quantity decisions and bandwidth allocation decisions, and the state space construction submodule constructs the state space Φ(t), including the signal-to-noise ratio between different edge servers, the computing resources of the edge servers, and the decentralized deficit virtual queues, which is specifically expressed as
[0141]
[0142] In the formula,
[0143] In the tth period, the demand response aggregator cloud platform determines the action space A(t) of the current period based on the state space, including the block quantity decision and sub-channel allocation decision, which is expressed as
[0144] A(t)={X(t);W(t)}.(30)
[0145] It is worth noting that when the demand response aggregator cloud platform performs actions, constraints C1 and C2 need to be satisfied.
[0146] Based on the idea of penalty function, when the constraints of the optimization problem are met, the reward function is equivalent to the optimization objective function. When the constraints of the optimization problem are not met, penalties are imposed according to the degree of constraint dissatisfaction to reduce the reward value. The reward value calculation is performed by the reward calculation submodule. The reward function r(t) of the demand response aggregator cloud platform aggregator selecting action A(t) in the tth period is defined as
[0147]
[0148] In a further embodiment of the present invention, the block and channel resource adaptive allocation method based on security boundary destruction penalty driven adaptive deep learning also includes making action decisions driven by security boundary destruction penalty; then, each edge server executes the action decided by the demand response aggregator cloud platform; finally, the demand response aggregator cloud platform performs experience learning and network updates to achieve the optimization strategy of block quantity and channel resource allocation. The collaborative allocation optimization method (i.e., the block and channel resource adaptive allocation method based on security boundary destruction penalty driven adaptive deep learning) includes 1 evaluation network and 1 target network, including the following process:
[0149] S31: Input the state information of the edge layer of the current time slot into the evaluation network to obtain the state-action value function of different actions in the current time slot, and on this basis, select the action with the largest state-action value of the current time slot based on the strategy obtained by the exploration and utilization adaptive adjustment algorithm, wherein the exploration and utilization adaptive adjustment algorithm is used to use the existing optimal resource management strategy to reduce the penalty received during the learning process when the penalty for the destruction of the security boundary in the previous period meets the larger condition, and explore other optimal resource management strategies to avoid falling into the local optimum when the penalty for the destruction of the security boundary in the previous period does not meet the larger condition;
[0150] S32: Execute the selected action, calculate the reward value, transfer to the next state and store the action chain into the experience pool. The action chain includes the current state, the corresponding action and reward value, and the next state.
[0151] S33: randomly extract a set of experience data from the experience pool, and calculate the time difference error of the evaluation network in the current time slot;
[0152] S34: updating the evaluation network parameters according to the timing difference error, and synchronizing the target network with the evaluation network at set intervals;
[0153] S35: Iterate the above steps until the optimization cycle ends.
[0154] The above-mentioned block and channel resource adaptive allocation method based on security boundary destruction penalty driven adaptive deep learning can be implemented by using a security resource allocation software module based on security boundary destruction penalty driven adaptive deep learning. Figure 3 As shown. Deployed on the demand response aggregator cloud platform, it includes state identification submodule, decentralized queue construction submodule, security boundary destruction penalty submodule, exploration and utilization adaptive adjustment submodule, state space construction submodule, reward calculation submodule, security resource allocation decision submodule, experience learning and network update submodule and security resource allocation decision execution submodule. Figure 3 As shown in the figure, the module functions are described as follows:
[0155] State recognition submodule: It senses the historical channel status, computing resources of each server, and historical virtual queue status information to provide support for state space construction.
[0156] Decentralized queue construction submodule: Build a decentralized virtual queue and convert long-term decentralization constraints into queue stability constraints for easy solution.
[0157] Security boundary violation penalty submodule: calculates the value of the security boundary violation penalty adaptive factor based on the state information of the edge layer.
[0158] Exploration and exploitation adaptive adjustment submodule: adjusts exploration and exploitation based on the adaptive factor of security boundary destruction penalty.
[0159] State space construction submodule: constructs the action space of the MDP problem based on the information obtained by the state recognition module, including historical channel states, computing resources of each server, and historical virtual queue states.
[0160] Security resource allocation decision submodule: The ε-greedy strategy driven by security boundary destruction penalty is used to select the action with the largest action value in the current time slot state.
[0161] Reward calculation submodule: calculates the rewards obtained by performing different actions.
[0162] Experience learning and network update submodule: collect data and experience after each learning, and continuously update the system's decision-making strategy based on the DQN network.
[0163] Security resource allocation decision execution submodule: outputs security resource allocation decisions, including the number of blocks and bandwidth resource allocation decisions. For the sake of convenience, the implementation process of the block and channel resource adaptive allocation method based on security boundary destruction penalty driven adaptive deep learning is introduced in conjunction with the above module. It should be understood that this module is only used for the convenience of description and does not limit the specific implementation carrier of the method.
[0164] Traditional deep reinforcement learning algorithms use a fixed exploration and exploitation trade-off when executing actions, which results in the inability to adjust the number of blocks and sub-channel allocation decisions in a timely manner when the security boundary is destroyed, thereby reducing the system's degree of decentralization and risk resistance. To address this problem, an adaptive DQN block and channel resource collaborative allocation optimization method driven by security boundary destruction penalty is adopted. The security resource allocation decision submodule of the demand response aggregator cloud platform simultaneously maintains two deep neural networks, including one valuation network and one target network. The network parameter vectors of the valuation network and the target network in the security resource allocation decision submodule of the cloud platform can be expressed as ω e (t) and ω t(t). The valuation network realizes the mapping from state-action combination to state-action value function Q[Φ(t),A(t)]. The state-action value function represents the expectation of the total future reward that the demand response aggregator cloud platform can obtain when action A(t) is selected under state Φ(t). The security resource allocation decision submodule of the cloud platform learns and executes a block number and subchannel allocation decision in each time period through the valuation network; the edge server then feeds back the updated information to the demand response aggregator cloud platform. The algorithm reduces the correlation of sample data between consecutive time slots by setting the target network and the experience replay pool, thereby improving the optimization performance of the evaluation network. The proposed algorithm learns the block and channel collaborative resource management strategy under non-global information based on the deep Q network, and adaptively adjusts the probability of exploration and utilization in the learning process through the exploration and utilization adaptive adjustment submodule. When the security boundary destruction penalty in the previous period is large, the algorithm will tend to use the existing optimal resource management strategy to reduce the penalty in the learning process. On the contrary, the algorithm will tend to explore other resource management strategies to avoid falling into the local optimum. The specific process is described as follows:
[0165] (1) Action decision driven by security community destruction penalty: The demand response aggregator cloud platform state space construction submodule inputs the state information Φ(t) of the edge layer in the current time slot into the evaluation network of the security resource allocation decision submodule to obtain the state-action value function Q[Φ(t),A(t)|ω] of different actions A(t) in the current time slot. e (t)], and on this basis, the ε-greedy strategy based on the output of the exploration and utilization submodule selects the action with the largest action value in the current time slot state, that is,
[0166]
[0167] Among them, Ω∈[0,1] is the random number generated when the action selection of the demand response aggregator cloud platform security resource allocation decision submodule is performed. Considering the probability of dynamically adjusting the exploration and utilization of the agent in each period based on the exploration and utilization submodule, is the adaptive exploration factor, i.e., the agent The probability of randomly selecting an action from the action space is , otherwise the action with the largest Q value is executed.
[0168] Among them, ε0 is the initial exploration factor.
[0169] (2) Action execution: The security resource allocation decision execution submodule of the demand response aggregator cloud platform executes action A * (t), the reward calculation submodule calculates the reward value, updates the relevant information, transfers to the next state Φ(t+1), and completes the action chain [Φ(t), A * (t),r(t),Φ(t+1)] is stored in the experience pool
[0170] (3) Experience learning and network update: The experience learning and network update submodule of the demand response aggregator cloud platform uses the experience pool Randomly extract a set of empirical data Calculate the timing difference error of the evaluation network in the current time slot, and the calculation formula is:
[0171]
[0172] In the formula, represents the number of action chains extracted from the experience pool. y(t) represents the state-action value updated by the demand response aggregator cloud platform through the target network after receiving the reward r(t). The update formula is
[0173]
[0174] In the formula, γ∈[0,1] is a discount factor, which is used to measure the impact of future rewards on the current state-action value. The larger γ is, the greater the impact of future rewards on the current action strategy, and the more the algorithm focuses on long-term benefits.
[0175] Subsequently, the evaluation network parameters are updated according to the temporal difference error. The target network is synchronized with the evaluation network every T0 time periods and remains unchanged in the next T0-1 time periods. The above three steps are iteratively performed until the entire optimization cycle is completed.
[0176] In combination with the above embodiments, in order to solve the problem that the long-term decentralization constraint of block consensus leads to low long-term risk resistance of consensus and low security of demand response, the present invention proposes a block and channel resource collaborative allocation optimization algorithm based on the adaptive DQN driven by the safety boundary destruction penalty. Based on the decentralized virtual queue deficit, a safety boundary penalty is constructed and introduced into the reward function of the MDP model. The weights of exploration and utilization in the learning process are adaptively adjusted according to the safety boundary penalty, and the learning strategy of the number of blocks and channel allocation is optimized. When the safety boundary penalty increases, the algorithm tends to use the existing optimal resource management strategy to reduce the penalty received during the learning process. On the contrary, the algorithm tends to explore other resource management strategies to avoid falling into the local optimum, providing an efficient, safe and adaptive resource allocation method for the demand response system, which can effectively ensure the stability and reliability of the system.
[0177] Based on the same inventive concept, the embodiment of the present application also provides a network security system for supporting user-side resources to participate in demand response for implementing the network security method for supporting user-side resources to participate in demand response involved above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiment of the network security system for supporting user-side resources to participate in demand response provided below can be referred to the limitations of the network security method for supporting user-side resources to participate in demand response above, and will not be repeated here.
[0178] This embodiment provides a network security system that supports user-side resources to participate in demand response, including: a cloud layer, an edge layer, and a physical layer;
[0179] The cloud layer is used to send user demand response behavior plans to the edge layer for consensus; it is also used to solve the number of blocks in the consensus process of each period and the sub-channel allocation decision of the block consensus node according to the security resource allocation optimization model. The security resource allocation optimization model is used to maximize the weighted consensus throughput and the inverse of the block consensus delay by optimizing the number of blocks in the consensus process of each period and the sub-channel allocation decision of the block consensus node under the constraints including sub-channel allocation and long-term decentralization. The long-term decentralization constraint is used to ensure that the blockchain-enabled demand response model maintains a degree of decentralization that meets long-term high requirements to ensure the security of user-side resources participating in demand response; it also guides the consensus process based on the solved number of blocks and the sub-channel allocation decision of the block consensus node;
[0180] The edge layer is used to reach consensus based on the blockchain-enabled demand response model, which is used to reach consensus on user demand response behavior plans based on a preset consensus algorithm; it is also used to send the user demand response behavior plans that have reached consensus to the physical layer;
[0181] The physical layer is used to execute action plans in response to user needs.
[0182] The system includes a physical layer, an edge layer, and a cloud layer. The cloud layer includes the power grid company's demand response cloud platform and the demand response aggregator cloud platform. The demand response business is jointly completed by the power grid company's demand response cloud platform, the demand response aggregator cloud platform, and power users. The power grid company's demand response cloud platform is responsible for managing and publishing demand response signals. After receiving the demand response signals issued by the power grid company's demand response cloud platform, the demand response aggregator cloud platform executes the smart contract to determine the user's demand response behavior plan and sends the response information to the edge layer. The edge layer consists of edge servers and 5G base stations. The base station is responsible for achieving communication coverage in the area and providing communication support for the interaction between the physical layer, edge layer, and cloud layer. The edge server is responsible for receiving the demand response information sent by the demand response aggregator cloud platform and issuing demand response requirements to power users, and maintaining the blockchain platform. The physical layer consists of power users with distributed power equipment such as sources, loads, and storage, and is responsible for adjusting the corresponding power consumption behavior after receiving the edge layer demand response requirements. Provide platform support for the subsequent security resource allocation software module based on security boundary destruction penalties.
[0183] The system can execute the block and channel resource collaborative allocation optimization algorithm based on the safety boundary destruction penalty driven adaptive DQN proposed in the aforementioned embodiment, and the algorithm is deployed on the allocation software module of safety resources based on the safety boundary destruction penalty. Based on the decentralized virtual queue deficit, a safety boundary penalty is constructed and introduced into the reward function of the MDP model. According to the safety boundary penalty, the weights of exploration and utilization in the learning process are adaptively adjusted to optimize the number of blocks and channel allocation learning strategies. When the safety boundary penalty increases, the algorithm tends to use the existing optimal resource management strategy to reduce the penalty received during the learning process. On the contrary, the algorithm tends to explore other resource management strategies to avoid falling into local optimality, providing an efficient, safe and adaptive resource allocation method for the demand response system, which can effectively ensure the stability and reliability of the system.
[0184] In addition, the allocation software module of security resources based on security boundary violation penalty can be deployed on the demand response aggregator cloud platform, including a state recognition submodule, a decentralized queue construction submodule, a security boundary violation penalty submodule, an exploration and utilization adaptive adjustment submodule, a state space construction submodule, a reward calculation submodule, a security resource allocation decision submodule, an experience learning and network update submodule, and a security resource allocation decision execution submodule. The state recognition submodule perceives the information of historical channel state, computing resources of each server, and historical virtual queue state to provide support for state space construction. The decentralized queue construction submodule constructs a decentralized virtual queue and converts long-term decentralization constraints into queue stability constraints for easy solution. The security boundary violation penalty submodule calculates the value of the security boundary violation penalty adaptive factor based on the state information of the edge layer. The exploration and utilization adaptive adjustment submodule adjusts exploration and utilization based on the security boundary violation penalty adaptive factor. The state space construction submodule constructs the action space of the MDP problem based on the information obtained by the state recognition module, including historical channel state, computing resources of each server, and historical virtual queue state. The security resource allocation decision submodule adopts the ε-greedy strategy driven by the security boundary destruction penalty to select the action with the largest action value in the current time slot state. The reward calculation submodule calculates the rewards obtained by executing different actions. The experience learning and network update submodule collects data and experience after each learning, and continuously updates the decision strategy of the system based on the DQN network. The security resource allocation decision execution submodule outputs the security resource allocation decision, including the number of blocks and the allocation decision of bandwidth resources. It can improve the security, stability and efficiency of resource allocation of the system through mechanisms such as adaptive adjustment, real-time monitoring and continuous learning.
[0185] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0186] Reference Figure 5The embodiment of the present invention further provides a computer device 1, comprising: a memory 12 and a processor 11 and a computer program 13 stored in the memory 12. When the computer program 13 is executed on the processor 11, a network security method for supporting user-side resources to participate in demand response as described in any of the above methods is implemented.
[0187] The computer device 1 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device 1 may include, but is not limited to, a processor 11 and a memory 12. Those skilled in the art will appreciate that Figure 5 It is only an example of the computer device 1 and does not constitute a limitation on the computer device 1. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0188] The processor 11 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0189] In some embodiments, the memory 12 may be an internal storage unit of the computer device 1, such as a hard disk or memory of the computer device 1. In other embodiments, the memory 12 may also be an external storage device of the computer device 1, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 1. Further, the memory 12 may also include both an internal storage unit of the computer device 1 and an external storage device. The memory 12 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 12 may also be used to temporarily store data that has been output or is to be output.
[0190] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the network security method for supporting user-side resources to participate in demand response as described in any one of the above methods is implemented.
[0191] In this embodiment, if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0192] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0193] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0194] In the embodiments disclosed in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0195] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A network security method for supporting user-side resources to participate in demand response, characterized in that: The steps include: Obtaining a user demand response behavior plan and reaching a consensus based on a blockchain-enabled demand response model, wherein the blockchain-enabled demand response model is used to reach a consensus on the user demand response behavior plan based on a preset consensus algorithm; The number of blocks in the consensus process of each period and the sub-channel allocation decision of the block consensus node are solved according to the security resource allocation optimization model. The security resource allocation optimization model is used to maximize the weighted value of the consensus throughput and the inverse of the block consensus delay by optimizing the number of blocks in the consensus process of each period and the sub-channel allocation decision of the block consensus node under the constraints including sub-channel allocation and long-term decentralization. The long-term decentralization constraint is used to ensure that the blockchain-enabled demand response model maintains a decentralization level that meets the long-term high requirements, so as to ensure the security of user-side resources participating in demand response; The consensus process is optimized based on the solved number of blocks and the sub-channel allocation decision of the block consensus node to reach a consensus, thereby supporting user-side resources to participate in demand response based on the user demand response behavior plan that has reached consensus.
2. The network security method for supporting user-side resources to participate in demand response according to claim 1, characterized in that: The security resource allocation optimization model is represented by the first optimization problem as follows: Where X(t) represents the block number decision vector of the tth period, W(t) represents the subchannel allocation vector of the tth period, T is the number of periods, t is the period index, Y(t) represents the consensus throughput of the tth period, θ M is the weight coefficient, T total (t) is the block consensus delay in the tth period, C1 is the block number decision indicator variable, I is the block number level number, i is the block number level index, x i (t) = 1 indicates the number of blocks of level i selected in time period t, C2 is the subchannel allocation constraint, W represents the total system bandwidth, Represented as node S n The number of allocated subchannels, W0 represents the average bandwidth of the subchannel, C3 is the long-term decentralization constraint, Represents the number of blocks up to the tth period The Gini coefficient, G max Represents the upper limit of the maximum tolerable Gini coefficient.
3. The network security method for supporting user-side resources to participate in demand response according to claim 2, characterized in that: When solving the security resource allocation optimization model, a virtual queue is constructed based on Lyapunov optimization theory, and the long-term decentralization constraint is converted into a queue stability constraint based on the virtual queue, and the second optimization problem is obtained as follows: stC1~C 2. In the formula, θ Z is the weight coefficient, Z(t) is the difference between the actual Gini coefficient of the system and the maximum tolerable Gini coefficient upper limit G at the end of the tth period max deviation.
4. The network security method for supporting user-side resources to participate in demand response according to claim 3 is characterized in that: The second optimization problem is constructed as a time-series Markov process for solution, and the constructed time-series Markov process includes: a state space, an action space and a reward function; The state space includes signal-to-noise ratios between different edge servers, computing resources of edge servers, and decentralized deficit virtual queues; The action space includes block quantity decision and subchannel allocation decision; The reward function is used to punish and reduce the reward value according to the degree of non-satisfaction of the constraints when the constraints of the optimization problem are not met.
5. The network security method for supporting user-side resources to participate in demand response according to claim 4, characterized in that: The sequential Markov process is solved by an adaptive DQN block and channel resource collaborative allocation optimization method driven by safety boundary destruction penalty. The collaborative allocation optimization method includes an evaluation network and a target network. The solution process includes: Input the state information of the edge layer of the current time slot into the evaluation network to obtain the state-action value function of different actions in the current time slot, and on this basis select the action with the maximum state-action value of the current time slot based on the strategy obtained by the exploration and utilization adaptive adjustment algorithm, wherein the exploration and utilization adaptive adjustment algorithm is used to use the existing optimal resource management strategy to reduce the penalty received during the learning process when the penalty for the destruction of the security boundary in the previous period meets the larger condition, and explore other optimal resource management strategies to avoid falling into the local optimum when the penalty for the destruction of the security boundary in the previous period does not meet the larger condition; Execute the selected action, calculate the reward value, transfer to the next state and store the action chain into the experience pool, where the action chain includes the current state, the corresponding action and reward value, and the next state; Randomly extract a set of experience data from the experience pool, and calculate the time difference error of the evaluation network in the current time slot; updating the evaluation network parameters according to the timing differential error, wherein the target network is synchronized with the evaluation network at set intervals; The above steps are iterated until the optimization cycle ends.
6. The network security method for supporting user-side resources to participate in demand response according to claim 2, characterized in that: The consensus throughput Y(t) and the block consensus latency T total (t) is determined by the consensus throughput model and consensus latency model respectively, as follows: Consensus Throughput Model: Where Ξ(k(t)) is the total number of transactions recorded in a single block in period t, k(t) is the number of blocks that the master node needs to produce in period t, and IB(B(t), k(t)) represents the number of master nodes B in period t. p Transmit to the master node B in the next period p′ The number of blocks ignored when k(t)B(t) is the sum of all block sizes generated by the master node in the tth period. For the average size of each transaction, is B in the tth period p Can p′ The amount of data transmitted, B(t) is the size of a single block in the tth period; Consensus delay model: In the formula, is the transmission delay in the tth period, is the transmission delay in the pre-preparation phase, is the transmission delay in the preparation phase, is the transmission delay in the submission phase, is the transmission delay in the reply phase, k(t) is the number of blocks that the master node needs to produce in the tth period; is the calculation delay of the tth period, Calculate the latency for the request phase, Calculate the delay for the pre-preparation phase, Calculate the delay for the preparation phase, Calculate the latency for the commit phase, Calculate the delay for the reply phase.
7. The network security method for supporting user-side resources to participate in demand response according to claim 2, characterized in that:The number of blocks up to the tth period The Gini coefficient Determine as follows: In the formula, k(i) and k(j) are the number of blocks that the master node needs to produce in the i-th and j-th time periods respectively, and N represents the number of nodes that take turns to serve as the master node.
8. A network security system supporting user-side resources to participate in demand response, characterized in that: include: Cloud, edge, and physical layers; The cloud layer is used to send the user demand response behavior plan to the edge layer for consensus; It is also used to solve the number of blocks in the consensus process of each time period and the sub-channel allocation decision of the block consensus node according to the security resource allocation optimization model. The security resource allocation optimization model is used to maximize the weighted consensus throughput and the inverse of the block consensus delay by optimizing the number of blocks in the consensus process of each time period and the sub-channel allocation decision of the block consensus node under the constraints including sub-channel allocation and long-term decentralization. The long-term decentralization constraint is used to ensure that the blockchain-enabled demand response model maintains a degree of decentralization that meets long-term high requirements to ensure the security of user-side resources participating in demand response; it also guides the consensus process based on the solved number of blocks and the sub-channel allocation decision of the block consensus node; The edge layer is used to reach a consensus based on the blockchain-enabled demand response model, and the blockchain-enabled demand response model is used to reach a consensus on the user demand response behavior plan based on a preset consensus algorithm; and is also used to send the user demand response behavior plan that has reached consensus to the physical layer; The physical layer is used to execute the user demand response behavior plan.
9. A computer device, characterized in that: The device comprises a processor and a memory: The memory is used to store a computer program and send instructions of the computer program to the processor; The processor executes a network security method for supporting user-side resources to participate in demand response according to instructions of the computer program as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a network security method for supporting user-side resources to participate in demand response is implemented as described in any one of claims 1-7.
Citation Information
Patent Citations
Data security and resource allocation joint optimization method in transformer substation distributed wireless network
CN112148478A
Block chain system, data processing method and device thereof and storage medium
CN113596135A
Low-time-delay security cloud side-end collaboration method for electric power Internet of Things
CN114143355A
Block chain performance optimization method based on multi-agent deep reinforcement learning
CN115935442A
Chain network collaborative distributed consensus fragmentation method based on reinforcement learning technology
CN117041003A
Cited By
End-to-end deterministic slice arrangement method and device based on deep reinforcement learning
CN119789113A
Water resource space-time equilibrium evaluation method and system, electronic equipment and storage medium
CN120579731A
