Distributed energy data management collaborative processing method and system based on blockchain
By building distributed acquisition model, trusted computing distributed sandbox, distributed data verification model, distributed verification model, distributed data twin model and distributed optimization decision contract model, distributed energy data in the existing technology is solved The problem that management collaborative processing solution is difficult to support the regulation of distributed energy systems, realizes trustworthy management of distributed energy data and system security, and meets the requirements of distributed energy management.
Patent Information
- Application Number
- CN202210355734.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-06
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-04-06
AI Technical Summary
The existing distributed energy data management collaborative processing solutions are difficult to support the regulation of distributed energy systems, cannot meet the requirements of distributed energy management, and lack trustworthy data management, making it difficult to ensure the authenticity of data.
By building a distributed acquisition model, a trusted computing distributed sandbox provides an isolated environment for data, a distributed data verification model is built to perform data verification, and a distributed verification model is built to complete multi-party identity authentication and Data verification, build a distributed data twin model to gather data, and optimize decision task scheduling through the distributed optimization decision contract model.
It realizes trustworthy management of distributed energy data, ensures the authenticity of data and the security of the system, supports the regulation and management of distributed energy systems, and meets the requirements of distributed energy management.
Smart Images

Figure CN114861167B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a distributed energy data management collaborative processing method and system based on blockchain, and belongs to the technical field of distributed energy data processing. Background Art
[0002] There are three common management modes for distributed energy systems: centralized, decentralized, and distributed. In the centralized management mode, the information of all control units is centralized and uniformly controlled to achieve global optimization; in the decentralized control mode, the information of the control units does not interact and the goal is individual optimization; in the management mode, the global optimization is achieved through communication between adjacent control units. At the same time, distributed energy systems are vulnerable to malicious attacks from the outside, and the decentralized structure makes it more difficult to identify and defend against attacks. For example, individual entities can maliciously transmit false data to influence the results of distributed economic scheduling to obtain improper benefits, and lack of trusted management of data storage, making it difficult to ensure the authenticity of the data involved in the transmission. Therefore, the existing distributed energy data management collaborative processing solutions are difficult to support the regulation of distributed energy systems and cannot meet the requirements of distributed energy management. Summary of the invention
[0003] In view of the defects of the prior art, the purpose of the present invention is to provide a method for collecting data from distributed energy system terminals by constructing a distributed collection model to ensure the credibility of data collection; construct a trusted computing distributed sandbox to provide an isolated environment for data to ensure the credibility of the operating environment; construct a distributed data verification model to perform trustworthy verification on isolated data to ensure that off-chain data is not tampered with or destroyed; construct a distributed verification model to complete multi-party identity authentication and perform multi-party data trustworthy verification to ensure the credibility of multiple parties; construct a distributed data twin model to perform twin aggregation on data to meet detailed optimization decision-making tasks; according to the optimization decision-making tasks, construct a distributed optimization decision contract model to split the optimization decision tasks into micro-task services; realize optimization decision task scheduling for comprehensive optimization of system transmission delay and load imbalance, and finally complete the collaborative processing of distributed energy data resources based on blockchain, a distributed energy data management collaborative processing method and system.
[0004] To achieve the above object, the first technical solution of the present invention is:
[0005] Distributed energy data management collaborative processing method based on blockchain,
[0006] The following steps are involved:
[0007] The first step is to build a distributed collection model in the communication gateway to collect data from distributed energy system terminals;
[0008] The distributed collection model implements strong identity authentication of distributed energy system terminals based on trusted computing, combines the oracle mechanism with the blockchain system to achieve remote authentication, runs data measurement and evaluation algorithms in a trusted computing environment to complete data collection and filtering tasks, and finally realizes data collection and reliable upload to the blockchain system, meeting the requirements of trusted data sources and reliable data quality.
[0009] The second step is to build a trusted computing distributed sandbox to provide an isolated environment for the data in the first step;
[0010] The trusted computing distributed sandbox uses trusted computing and sandbox computing technologies to achieve isolation during data use;
[0011] The third step is to build a distributed data verification model to verify the credibility of the isolated data in the second step;
[0012] The distributed data verification model realizes the generation of data identifiers based on cryptography and decentralized timestamp technology, and completes the organic association of on-chain and off-chain data, realizes the credible verification of on-chain and off-chain data, and prevents off-chain data from being tampered with or destroyed;
[0013] Step 4: For the verification data in step 3, a distributed verification model is constructed to complete multi-party identity authentication and multi-party data trust verification;
[0014] The distributed verification model can meet the data trust requirements in trusted computing, complete multi-party identity authentication based on cryptographic technology, and use smart contracts and blockchain technology to complete multi-party data trust verification to obtain verification data;
[0015] Step 5: For the verification data in step 4, a distributed data twin model is constructed to aggregate the data to meet the detailed optimization decision-making tasks.
[0016] The distributed data twin model realizes local relevant data retrieval and carries out data trust verification based on the on-chain identification, and aggregates data according to data requirements to respond to optimization decision-making tasks and realize trustworthy data twin aggregation;
[0017] Step 6: Based on the optimization decision-making tasks in step 5, a distributed optimization decision-making contract model is constructed to split the optimization decision-making tasks into micro-task services.
[0018] The distributed optimization decision-making contract model is based on the two situations of dependency and non-dependency between microtask services, combined with virtualization technology, to achieve optimized decision-making task scheduling for comprehensive optimization of system transmission delay and load imbalance, and complete the collaborative processing of terminal data resources of distributed energy system.
[0019] After continuous exploration and experimentation, the present invention fully considers the decentralized characteristics of distributed energy systems, and collects data from distributed energy system terminals by constructing a distributed collection model to ensure the credibility of data collection; constructs a trusted computing distributed sandbox to provide an isolated environment for data to ensure the credibility of the operating environment; constructs a distributed data verification model to perform trustworthy verification on isolated data to ensure that off-chain data is not tampered with or destroyed; constructs a distributed verification model to complete multi-party identity authentication and perform multi-party data trustworthy verification to ensure the credibility of multiple parties; constructs a distributed data twin model to perform twin aggregation on data to meet detailed optimization decision-making tasks; constructs a distributed optimization decision contract model based on the optimization decision-making tasks, and splits the optimization decision tasks into micro-task services; realizes optimization decision task scheduling for comprehensive optimization of system transmission delay and load imbalance, and finally completes the collaborative processing of distributed energy data resources.
[0020] Furthermore, the distributed energy data management collaborative processing solution of the present invention can perform reliable management of distributed data and ensure the authenticity of the data involved in the transmission. Therefore, it can support the regulation of distributed energy systems and meet the requirements of distributed energy management. The solution is detailed and feasible.
[0021] As the preferred technical measures:
[0022] In the third step, the construction method of the distributed data verification model uses a decentralized timestamp and cryptography technology through an oracle to obtain a unique data ID based on the timestamp of the data being uploaded to the chain and perform a hash operation on it.
[0023] At the same time, the data hash value, digital signature and data ID are packaged to generate a data identifier and stored in the blockchain system;
[0024] When data credibility verification is required, it specifically includes the following steps:
[0025] Step 31, the data verification node first calculates the data hash value Hash0 of the local data storage according to the request message;
[0026] Step 32, the data verification node generates a unique data ID according to the timestamp information timestamp0 retained in the local database;
[0027] Step 33, the data verification node interacts with the data trusted verification contract of the blockchain, obtains the data identifier stored in the blockchain through the data ID in step 32, and extracts the data hash value Hash1;
[0028] Step 34, compare the hash value Hash0 in step 31 and the hash value Hash1 in step 33 to verify the integrity of the data; if the two values are the same, the data successfully completes the data credibility verification, indicating that the data has not been tampered with, otherwise, the data has been tampered with or destroyed.
[0029] As the preferred technical measures:
[0030] In the fourth step, the method for constructing a distributed verification model specifically includes the following steps:
[0031] Step 41: The oracle terminal performs a trusted computing active immunity test.
[0032] If the test passes, it proves that the oracle environment is trustworthy and proceeds to the next step; if it fails, it proves that the oracle status is abnormal and is reported to the management platform for analysis and processing;
[0033] Step 42, when the oracle terminal test of step 41 passes, the communication gateway uploads the data to the oracle for processing, thereby forming load aggregation data, and the load aggregation data is copied. The first backup data is prepared to generate a data identifier and store it on the chain, and the second backup data performs trusted calculation of demand metering data;
[0034] Step 43, prepare the first backup data in step 42 for uploading to the blockchain, and the preparation for uploading to the blockchain begins; perform oracle identity authentication and blockchain node identity authentication;
[0035] If both are passed, the two parties negotiate the session key; if either fails, the information is reported to the management platform for analysis and processing; after the negotiation of the session key is successful, a two-way trust evaluation, identity authentication evaluation, and data integrity verification evaluation are carried out; based on these three evaluations, the evaluation results are generated and uploaded to the on-chain policy service node;
[0036] Step 44: The on-chain policy service node in step 43 provides a decision, and the decision information is sent to the oracle terminal and the blockchain node. The oracle terminal opens the corresponding port and the trusted on-chain channel according to the decision information.
[0037] Data identification is uploaded to the chain, and the ledger data is synchronized to make the data non-repudiable and traceable; after the data is uploaded to the chain, the entire system can be managed on the chain;
[0038] In step 45, the oracle terminal sends the data in step 44 to the trusted computing distributed sandbox. There are two parts of data in the trusted computing distributed sandbox, one part is the original data sent by the oracle terminal, and the other part is the data identifier sent by the blockchain node. The trusted computing distributed sandbox performs multi-party data verification and completes the corresponding computing tasks.
[0039] As the preferred technical measures:
[0040] In the fifth step, the method for constructing a distributed data twin model includes the following steps:
[0041] Step 51: further refine the data requirements according to the differences in the required data categories; the refined data requirements should be able to reflect the required data categories and correspond to the data identifiers on the chain to achieve data requirement division;
[0042] Step 52: Initiate a data collection request to the data collection layer of the system according to the data requirements divided in step 51; according to the data sharing requirements, the data collection device realizes the on-chain registration of data based on the data identifier, and establishes a mapping relationship between the on-chain identifier and the off-chain data; based on this, the original data collection for specific data requirements can be realized through on-chain retrieval;
[0043] Step 53: Before further operations based on the original data in step 52 are carried out, the off-chain data needs to be verified for credibility based on the on-chain data identifier. The local data summary is calculated by using the hash function and cryptography technology and the local trusted computing module, and compared with the on-chain data record to detect whether the data is complete and has not been tampered with, thereby realizing data credibility verification.
[0044] Step 54, the data verified in step 53 is used to generate a data copy through the twin, the original data is retained locally, and the twin trusted data participates in aggregation and supports the next application; the twin data is a copy of the original data, and the obtained data copy is completely consistent with the data at the time of copying. Subsequent operations on the twin data will not affect the original data and the data identifier on the chain.
[0045] As the preferred technical measures:
[0046] In the sixth step, the construction method of the distributed optimization decision-making contract model splits the optimization decision-making task into microtask services through edge computing, and deploys the microtask services on the edge side;
[0047] Optimization decision-making tasks include load demand forecasting, demand bidding, and dynamic electricity price setting, which are divided into micro-task services according to different division methods;
[0048] According to different implementation goals, load demand forecasting is divided into day-ahead load forecasting microtask service and real-time load forecasting microtask service;
[0049] According to the order of execution steps, the load demand forecast is divided into micro-task services of day-ahead load forecasting, day-ahead load correction and real-time proportional update;
[0050] Demand bidding is split into a micro-task service for the power company to establish load shedding capacity and a micro-task service for users to bid;
[0051] The deployment method of the microtask service sequentially constructs a distributed data application model, a distributed data network model, and a distributed data computing model.
[0052] As the preferred technical measures:
[0053] The distributed data application model specifically includes the following contents:
[0054] Services i Use directed graphs from two aspects: microtask service set and dependency relationship between microtask services Give a description;
[0055] in For services i The m microtask services split out, s i _relation represents the dependency relationship between microtask services;
[0056] When a microtask service The execution requires another microtask service When the data is connected, a relationship is established between them, using a directed link The data transmission volume between microtask services is expressed as
[0057] Microtask services are initiated directly by users or requested by other microtask services. The resource requirements of microtask services mainly include computing and caching requirements. express;
[0058] The distributed data network model constructs the network topology of the edge side as a fully connected undirected graph, which specifically includes the following contents:
[0059] The distributed data network model is represented as G E =<node_set,link_set> , where node_set = {e1,e2,...,e n} represents the edge node set. The computing and storage capabilities of the edge nodes can be expressed as N E = <n i _cal,n i _str>; link_set indicates the link set, l j,k Represents node n j and n k The bidirectional interaction relationship, the link feature is abstracted as L E = <l j,k _band,lj,k _leng>, l j,k _band indicates the link bandwidth, l j,k _leng indicates the network distance;
[0060] The optimization objectives of the distributed data computing model are latency and load balance, which includes a network transmission latency calculation model between microtask services, a network load balance calculation model, a cloud-edge decision model, and a multi-objective optimization model.
[0061] As the preferred technical measures:
[0062] The network transmission delay calculation model between the microtask services specifically includes the following contents:
[0063] The calculation parameters of transmission delay include the data transmission volume of one request between two microtask services, the bandwidth between the two edge nodes where the microtask services are deployed, and the network distance between the edge nodes;
[0064] Then the transmission delay of the microtask service included in service i is The propagation delay is t prop = l j,k_leng / c;
[0065] The total transmission delay of service i is calculated as follows:
[0066]
[0067] Among them, S p,k Represents the edge node e k The number of microtask services on the network, c is the propagation speed of electromagnetic waves;
[0068] When there are dependencies between microtask services, the cumulative calculation of transmission delays of different microtask services is sometimes repeated. In this case, the pruning method is used to deal with it;
[0069] If there is no dependency between microtask services, there will be no transmission delay. At this time, the only optimization goal is the load balance of the network; the multi-objective optimization problem is transformed into a single-objective optimization problem.
[0070] As the preferred technical measures:
[0071] The load balancing calculation model of the network specifically includes the following contents:
[0072] The load balancing degree of the network is measured by the standard deviation of the overall computing and cache resources of the edge nodes, and the calculation formula is as follows:
[0073]
[0074]
[0075] in, and They represent the standard deviation of total computing and cache resources respectively. α and β are weight factors, indicating how much the system values the balance between computing and cache. and They represent the utilization rates of computing and cache resources of edge node j respectively;
[0076] The cloud-edge decision model includes the following:
[0077] When edge resources cannot meet the computing requirements of all tasks, priority is given to executing latency-sensitive tasks. It is determined whether the remaining tasks should wait on the edge or be uploaded to the cloud for execution. The determination is based on the size of the waiting delay + computing delay and the transmission delay to the cloud.
[0078] The multi-objective optimization model specifically includes the following contents:
[0079] When there is no dependency between microtask services and they are simply executed in parallel, a single-objective optimization model is constructed with computing and cache resources as constraints and the goal of minimizing load imbalance. The calculation formula is as follows:
[0080]
[0081] When there are dependencies between microtask services, a multi-objective optimization model is constructed with computing and cache resources as constraints and minimizing transmission delay and load imbalance as the goal. The calculation formula is as follows:
[0082]
[0083] The linear weighting method is used to transform the multi-objective problem into a single-objective problem, and the fitness function is constructed; the two objective expressions are normalized;
[0084]
[0085]
[0086] Among them, the maximum and minimum values are obtained through multiple experiments;
[0087] The fitness function is constructed as:
[0088] f(X i )=λ1*η(t i )+λ2*η(B i ) (8)
[0089] Among them, X i is the scheduling mechanism, Xi ={x i ,y i}, which represents the mapping of microtask services to edge nodes; the goal is to find min(f(X i ))'s X i plan;
[0090] A resource scheduling strategy model is also set up to finely divide resources to achieve efficient and accurate scheduling. It divides the edge node computing power into logical computing power, parallel computing power, and neural network acceleration computing power;
[0091] Based on the edge business needs, edge nodes that can meet the requirements are selected, and a resource scheduling strategy for edge business that meets the optimization needs is obtained in the feasible solution by combining the heuristic algorithm.
[0092] To achieve the above object, the second technical solution of the present invention is:
[0093] The distributed energy data management collaborative processing method based on blockchain includes the following contents:
[0094] Build a trusted computing distributed sandbox to provide an isolated environment for running data;
[0095] The trusted computing distributed sandbox uses trusted computing and sandbox computing technologies to achieve isolation during data use;
[0096] Build a distributed verification model to complete multi-party identity authentication and conduct multi-party data trust verification;
[0097] The distributed verification model can meet the data trust requirements in trusted computing, complete multi-party identity authentication based on cryptographic technology, and use smart contracts and blockchain technology to complete multi-party data trust verification, and finally complete the demand-side response task in the trusted computing distributed sandbox;
[0098] Build a distributed collection model to collect data from distributed energy system terminals;
[0099] The distributed collection model implements strong identity authentication of distributed energy system terminals based on trusted computing, combines the oracle mechanism with the blockchain system to achieve remote authentication, runs data measurement and evaluation algorithms in a trusted computing environment to complete data collection and filtering tasks, and finally realizes data collection and reliable upload to the blockchain system, meeting the requirements of trusted data sources and reliable data quality.
[0100] Build a distributed data verification model to verify the credibility of data;
[0101] The distributed data verification model realizes the generation of data identifiers based on cryptography and decentralized timestamp technology, and completes the organic association of on-chain and off-chain data. Finally, it combines smart contracts to realize the credible verification of on-chain and off-chain data, and prevents off-chain data from being tampered with or destroyed.
[0102] Build a distributed data twin model and aggregate data to meet detailed data requirements;
[0103] The distributed data twin model realizes local related data retrieval and carries out data trust verification based on the on-chain identification, and aggregates data according to data requirements to respond to system applications and realize trustworthy data twin aggregation;
[0104] Build a distributed optimization decision-making contract model to split the optimization decision-making tasks into micro-task services;
[0105] The distributed optimization decision contract model splits the optimization decision task into microtask services, considers the two situations of dependency and non-dependency between microtask services, and combines virtualization technology to realize optimization decision task scheduling for comprehensive optimization of system transmission delay and load imbalance.
[0106] Build a resource scheduling strategy model to finely divide resources to achieve efficient and accurate scheduling. It divides the edge node computing power into logical computing power, parallel computing power, and neural network acceleration computing power;
[0107] Based on the edge business needs, edge nodes that can meet the requirements are selected, and a resource scheduling strategy for edge business that meets the optimization needs is obtained in the feasible solution by combining the heuristic algorithm.
[0108] To achieve the above object, the third technical solution of the present invention is:
[0109] A distributed energy data management collaborative processing system based on blockchain, applying the above-mentioned distributed energy data management collaborative processing method based on blockchain;
[0110] It includes several communication gateways, 5G communication modules, at least one blockchain node module, a distributed optimization decision-making contract module, and terminal equipment.
[0111] The communication gateway is used to collect data from distributed energy system terminals;
[0112] The data include power load, charging pile power, photovoltaic power, wind power, and energy storage;
[0113] Several communication gateways upload the collected data to each blockchain node module through the 5G communication module;
[0114] The blockchain node module is used to synchronize consensus and monitor through trusted computing technology to prevent abnormalities such as node attacks;
[0115] The distributed optimization decision-making contract module calls the data in the blockchain node module to make optimization decisions, and generates control instructions after making decisions and sends them to the terminal device through the communication gateway.
[0116] Compared with the prior art, the present invention has the following beneficial effects:
[0117] After continuous exploration and experimentation, the present invention constructs a distributed collection model in the communication gateway to collect data from the distributed energy system terminals to ensure the credibility of data collection; constructs a trusted computing distributed sandbox to provide an isolated environment for data to ensure the credibility of the operating environment; constructs a distributed data verification model to perform credibility verification on isolated data; for the verification data, ensure that the off-chain data is not tampered with or destroyed; constructs a distributed verification model to complete multi-party identity authentication and perform multi-party data credibility verification to ensure the credibility of multiple parties; constructs a distributed data twin model to perform twin aggregation on the data to meet detailed optimization decision-making tasks; according to the optimization decision-making tasks, constructs a distributed optimization decision-making contract model to split the optimization decision-making tasks into micro-task services; and realizes optimization decision-making task scheduling for comprehensive optimization of system transmission delay and load imbalance.
[0118] Furthermore, the present invention can realize the trusted supervision of the data collection, storage and use process, and ensure the scientific and reasonable coordination of distributed data resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0119] Figure 1 The following is a process flow of the construction method of the distributed data twin model of the present invention;
[0120] Figure 2 is the load balancing degree under different weight values of the present invention;
[0121] Figure 3 It is the comprehensive optimization value of delay & load balancing under different weights of the present invention. DETAILED DESCRIPTION
[0122] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0123] On the contrary, the present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims. Further, in order to make the public have a better understanding of the present invention, some specific details are described in detail in the detailed description of the present invention below. Those skilled in the art can fully understand the present invention without the description of these details.
[0124] A specific embodiment of the distributed energy data management collaborative processing method based on blockchain of the present invention:
[0125] Distributed energy data management collaborative processing method based on blockchain,
[0126] The following steps are involved:
[0127] The first step is to build a distributed collection model in the communication gateway to collect data from distributed energy system terminals;
[0128] The distributed collection model implements strong identity authentication of distributed energy system terminals based on trusted computing, combines the oracle mechanism with the blockchain system to achieve remote authentication, runs data measurement and evaluation algorithms in a trusted computing environment to complete data collection and filtering tasks, and finally realizes data collection and reliable upload to the blockchain system, meeting the requirements of trusted data sources and reliable data quality.
[0129] The second step is to build a trusted computing distributed sandbox to provide an isolated environment for the data in the first step;
[0130] The trusted computing distributed sandbox uses trusted computing and sandbox computing technologies to achieve isolation during data use;
[0131] The third step is to build a distributed data verification model to verify the credibility of the isolated data in the second step;
[0132] The distributed data verification model realizes the generation of data identifiers based on cryptography and decentralized timestamp technology, and completes the organic association of on-chain and off-chain data, realizes the credible verification of on-chain and off-chain data, and prevents off-chain data from being tampered with or destroyed;
[0133] Step 4: For the verification data in step 3, a distributed verification model is constructed to complete multi-party identity authentication and multi-party data trust verification;
[0134] The distributed verification model can meet the data trust requirements in trusted computing, complete multi-party identity authentication based on cryptographic technology, and use smart contracts and blockchain technology to complete multi-party data trust verification to obtain verification data;
[0135] Step 5: For the verification data in step 4, a distributed data twin model is constructed to aggregate the data to meet the detailed optimization decision-making tasks.
[0136] The distributed data twin model realizes local relevant data retrieval and carries out data trust verification based on the on-chain identification, and aggregates data according to data requirements to respond to optimization decision-making tasks and realize trustworthy data twin aggregation;
[0137] Step 6: Based on the optimization decision-making tasks in step 5, a distributed optimization decision-making contract model is constructed to split the optimization decision-making tasks into micro-task services.
[0138] The distributed optimization decision-making contract model is based on the two situations of dependency and non-dependency between microtask services, combined with virtualization technology, to achieve optimized decision-making task scheduling for comprehensive optimization of system transmission delay and load imbalance, and complete the collaborative processing of terminal data resources of distributed energy system.
[0139] A specific embodiment of the distributed acquisition model of the present invention:
[0140] The construction method of the distributed collection model includes the following contents:
[0141] Adding a trusted chip to the distributed energy system terminal enables each distributed energy system terminal to have a strong identity certificate;
[0142] At the same time, reliable measurement and evaluation of collected data are carried out;
[0143] The distributed energy system terminal establishes a secure local communication channel with the oracle client through the hardware authentication mechanism in the trusted computing framework. The process is as follows:
[0144] Step 11, the distributed energy system terminal sends a remote authentication request to the oracle terminal;
[0145] Step 12: The oracle client receives the authentication request in step 11 and creates a trusted execution environment. The oracle client then sends the authentication request to the trusted computing environment through the EDL interface for authentication.
[0146] Step 13: The Enclave of the oracle client generates a remote authentication report, signs the remote authentication report and sends it to the distributed energy system terminal;
[0147] Step 14: The distributed energy system terminal verifies the signature through the public key certificate of the oracle client. After the signature verification passes, the remote authentication report is sent to the authentication authority. If the authentication passes, it indicates that the trusted execution environment of the oracle client is valid. Finally, the two parties successfully establish a secure transmission channel.
[0148] After establishing a local secure transmission channel, the oracle client periodically obtains the distributed energy system terminal data through the subscription and reading mechanism, completes the trusted data chain, and realizes data non-repudiation and trusted traceability. The process is as follows:
[0149] S1, the oracle client sends data acquisition requests to the distributed energy system terminal at regular intervals according to the cycle set by the system administrator;
[0150] S2, the distributed energy system terminal verifies the request information in S1, and after verification, sends the locally cached collected data to the oracle client through the local secure transmission channel;
[0151] S3, the oracle client first verifies the existence and integrity of the data in S2 to ensure the correctness of the data source and the authenticity of the data itself;
[0152] S4, based on the characteristics of the data in S3, trains the data measurement and evaluation model and deploys it in the trusted execution environment of the oracle client;
[0153] S5, the oracle client transmits the decrypted collected data to the data measurement and evaluation model in the trusted execution environment in S4, and finally outputs an evaluation value;
[0154] S6, after completing the data measurement and evaluation in S5, the oracle client decides whether to upload the data to the blockchain network platform based on the relevant thresholds set by the system administrator.
[0155] A specific embodiment of the trusted computing distributed sandbox of the present invention:
[0156] The construction method of the trusted computing distributed sandbox, including the operation process of the composition architecture and the overall process of identity authentication in trusted edge computing;
[0157] The composition architecture operation process includes the following steps:
[0158] Step 1: Initialize the parameters of the edge sandbox;
[0159] And fill the parameters into the blank area of the protected physical memory of the system through a dedicated channel, so that the parameters needed to be used in the system include two parts: variable parameters and preset parameters;
[0160] Step 2, after the initialization of step 1 is completed, identity authentication is performed to activate the extended instruction set in the protected CPU environment;
[0161] Step 3: After the extended instruction set in step 2 is activated, the extended instruction set is applied and scheduled, and the memory validity is checked;
[0162] Step 4: After the parameters of the external data are encrypted and transmitted into the protected edge data sandbox, the edge data sandbox obtains the encryption parameters transmitted from the outside and then schedules the data decryptor in step 3 to decrypt the incoming data for the correct execution of the program.
[0163] Step 5: After step 4 is correctly executed, the result data of the trusted computing is encrypted and transmitted to the outside world through the channel. When the data is used, the same process is used for decryption to ensure the correct identity of the data user and the confidentiality and non-tamperability of the data.
[0164] The overall process of identity authentication in trusted edge computing includes the following steps:
[0165] In the first step, when the application applies to create an execution program, it needs to perform data and measurement operations. The last step of the creation process needs to verify the integrity of the execution program to determine whether the program data has been tampered with during the application creation process;
[0166] In the second step, by performing the measurement in the first step on each transmitted content, a measurement result of the creation sequence is finally obtained and saved in the control structure of the memory; then the result is compared with the integrity value in the certificate signed by the owner of the program execution through the identity authentication instruction;
[0167] In the third step, if the integrity of the certificate in the second step matches, the public key of the owner in the certificate is hashed and saved as a sealed identity in the execution program control structure; if it does not match, it means that there is a problem in the creation process and the instruction returns a failure result;
[0168] Step 4: When the execution program reports the identity of step 3 to other execution programs on the platform, it first obtains the identity information and attributes of the current execution program, the platform hardware information, and attaches the data that the user wants to interact with to generate a data structure; then obtains the key of the target execution program, generates a MAC tag for the data structure, forms the final identity backup data, and passes it to the target execution program, which verifies whether the execution program requesting the identity is running on the same platform as itself;
[0169] Step 5: After completing the initialization instructions, enter the execution program in step 4. After that, the memory protection and address mapping protection of the edge data sandbox prevent the outside world from accessing the execution program memory, thereby ensuring the confidentiality and integrity of the execution program. The remote authenticator can ensure the correct execution of the task through the integrity measurement value of the execution program and its sealed identity.
[0170] Step 6. After completing the tasks in step 5, the data used will be used for trusted computing and the result data will be fed back.
[0171] like Figure 1As shown, a specific embodiment of the distributed data twin model of the present invention is:
[0172] The construction method of the distributed data twin model will collect data and aggregate data to respond to system applications based on data requirements, which includes the following steps:
[0173] (1) Divide data requirements.
[0174] In order to clarify the direction of data collection, the data requirements are further refined according to the differences in the required data categories. The refined data requirements should be able to reflect the required data categories and basically correspond to the data identifiers on the chain.
[0175] (2) Collect raw data.
[0176] According to the data requirements divided in step 1, a data collection request is initiated to the data collection layer of the system. According to the needs of data sharing, the data collection device realizes the on-chain registration of data based on the data identification, and establishes the mapping relationship between the on-chain identification and the off-chain data. Based on this, the original data collection for specific data requirements can be realized through on-chain retrieval.
[0177] (3) Data credibility verification.
[0178] In order to ensure the integrity and credibility of local data, before further operations based on the data are carried out, the off-chain data needs to be verified based on the on-chain data identifier. Through cryptographic techniques such as hash functions, the local trusted computing module is used to calculate the local data summary and compare it with the on-chain data record to detect whether the data is complete and has not been tampered with.
[0179] (4) Twin data aggregation.
[0180] In order to ensure the information security of the data collection layer equipment and avoid direct operation of the local data of the collection equipment, data aggregation adopts data twin means. The data that has passed the trustworthy verification is used to generate a data copy through the twin, and the original data is retained locally. The twin trusted data participates in the aggregation and supports the next application. Twin data is a copy of the original data. The data copy obtained is completely consistent with the data at the time of copying. Subsequent operations on the twin data will not affect the original data and the data identification on the chain.
[0181] A specific embodiment of the distributed optimization decision-making contract model of the present invention:
[0182] Taking the demand-side response business as an example, considering relying on edge-side virtualization technology, a demand-side sandbox computing task scheduling method carried by containers is proposed.
[0183] Given that the optimization decision-making tasks can be split for execution, in the edge computing mode, consider splitting the tasks into microtask services and then deploying the microtask services on the edge side.
[0184] Typical computing tasks involved in demand response include load demand forecasting, demand bidding, and dynamic electricity price setting.
[0185] Each task can be split into microtask services according to different division methods.
[0186] For example, according to different implementation goals, load forecasting can be divided into day-ahead load forecasting microtask service and real-time load forecasting microtask service;
[0187] According to the order of execution steps, load demand forecasting can be divided into micro-task services of day-ahead load forecasting, day-ahead load correction, and real-time proportional update;
[0188] Demand bidding can be split into the micro-task service of the power company establishing the load-reducing capacity and the micro-task service of the user bidding; the tasks can be further split according to the computing and storage resource requirements.
[0189] Distributed Data Application Model: Services i Directed graphs can be used from two aspects: microtask service set and dependency relationship between microtask services. Describe, where For services i The m microtask services split out, s i _relation represents the dependency relationship between microtask services. The execution requires another microtask service When the data is connected, a relationship is established between them, using a directed link The amount of data transmission between microtask services can be expressed as Microtask services are initiated directly by users or requested by other microtask services. The resource requirements of microtask services mainly include computing and caching requirements. express.
[0190] Distributed data network model: The network topology on the edge side is constructed as a fully connected undirected graph.
[0191] The distributed data network model can be expressed as G E =<node_set,link_set> , where node_set = {e1,e2,...,e n} represents the edge node set. The computing and storage capabilities of the edge nodes can be expressed as N E = <n i _cal,n i _str>; link_set indicates the link set, l j,k Represents node n j and nk The bidirectional interaction relationship, the link feature is abstracted as L E = <l j,k _band,l j,k _leng>, l j,k _band indicates the link bandwidth, l j,k _leng indicates the network distance.
[0192] Calculation model: Because the optimization goals of this chapter are latency and load balancing, the calculation model mainly revolves around these two parts.
[0193] 1) Network transmission delay calculation model between microtask services
[0194] The calculation of transmission delay is mainly related to three parameters: the amount of data transmitted in one request between two microtask services, the bandwidth between the two edge nodes where the microtask services are deployed, and the network distance between the edge nodes. The transmission delay of the microtask service included in service i is The propagation delay is t prop = l j,k_leng / c. , the total transmission delay of service i can be calculated by the following formula:
[0195]
[0196] S p,k Represents the edge node e k The number of microtask services on the network, c is the propagation speed of electromagnetic waves, that is, the speed of light 3×10 8 m / s. When there are dependencies between microtask services, the cumulative calculation of the transmission delays of different microtask services may be repeated, which can be avoided by using pruning methods.
[0197] If there is no dependency between microtask services, there is no transmission delay, and the only optimization goal is the load balance of the network. The multi-objective optimization problem is transformed into a single-objective optimization problem.
[0198] 2) Network load balancing calculation model
[0199] The network load balancing degree of the present invention is measured by the standard deviation of the overall computing and cache resources of the edge nodes.
[0200]
[0201]
[0202] in, and They represent the standard deviation of total computing and cache resources respectively. α and β are weight factors, indicating how much the system values the balance between computing and cache. and They represent the utilization rate of computing and cache resources of edge node j respectively.
[0203] 3) Cloud-edge decision model
[0204] When edge resources cannot meet the computing requirements of all tasks, priority is given to executing delay-sensitive tasks, and it is determined whether the remaining tasks should wait on the edge or be uploaded to the cloud for execution. The judgment is based on the waiting delay + computing delay and the transmission delay to the cloud (because the computing resources on the cloud are sufficient, the computing delay can be ignored, and the amount of returned data is extremely small and can be ignored).
[0205] 4) Multi-objective optimization model
[0206] When there is no dependency between microtask services and they are simply executed in parallel, a single-objective optimization model is constructed with computing and cache resources as constraints and the goal of minimizing load imbalance.
[0207]
[0208] When there are dependencies between microtask services, a multi-objective optimization model is constructed with computing and cache resources as constraints and the goal of minimizing transmission delay and load imbalance.
[0209]
[0210] This strategy is used to decide on which edge node each microtask service should be placed. The implementation of the entire orchestration process includes container deployment location determination, container creation, and container migration. The present invention mainly focuses on the first part and designs a containerized microtask service orchestration algorithm.
[0211] (2) DE-driven containerized microtask service orchestration algorithm
[0212] This is a typical NP-hard problem, and a heuristic algorithm is usually applied to obtain a near-optimal result. The differential evolution algorithm is a widely used heuristic algorithm with the advantages of fast convergence speed and accurate results. The present invention designs an adaptive containerized microtask service orchestration algorithm. The traditional integer-based differential evolution algorithm is prone to premature maturity when the mutation rate is set too large, and the global search performance is poor. When the mutation rate is set very small, the population diversity is reduced and the global search performance is poor. The adaptive operator can maintain diversity in the initial stage and prevent premature maturity. As this process proceeds, the mutation operator gradually decreases, avoiding the destruction of the optimal solution.
[0213] Fitness function construction: The linear weighting method is used to transform the multi-objective problem into a single-objective problem and construct the fitness function. In order to achieve a unified measurement of delay and load balancing, the two objective expressions are normalized.
[0214]
[0215]
[0216] Among them, the maximum and minimum values are obtained through multiple experiments.
[0217] Then the fitness function can be constructed as:
[0218] f(X i )=λ1*η(t i )+λ2*η(B i ) (8)
[0219] Among them, X i is the scheduling mechanism, X i ={x i ,y i}, which represents the mapping of microtask services to edge nodes. The goal is to find min(f(X i ))'s X i plan.
[0220] A specific embodiment of the resource scheduling strategy for edge services of the present invention:
[0221] Based on the above task scheduling method based on service division, in order to improve the matching degree between edge business demand and resource supply, the computing power of edge nodes is further divided into logical computing power, parallel computing power and neural network acceleration computing power from a business perspective.
[0222] Among them, logical computing power is a general basic computing power, typically represented by CPU, usually measured by TOPS; parallel computing power is used to process graph and image data, typically represented by GPU, commonly measured by MFLOPS, GFLOPS and PFLOPS; neural network acceleration computing power is mainly used for AI neural network and machine learning enhanced computing services, typically represented by NPU, TPU, and commonly measured by FLOPS. The division of computing power makes the measurement of edge node computing power not only stay at the numerical level, but also achieves precise matching from a functional perspective. For example, on-site operation and maintenance and other early warning services based on graph and image processing mainly focus on parallel computing power, while prediction and resource orchestration based on deep learning focus on neural network acceleration computing power.
[0223] (1) Edge node computing power measurement
[0224] In this patent, edge computing power enhancement is achieved through server deployment, and a matrix can be obtained to describe the total computing power C of chip i of the jth server in three computing power categories: j =[C j,l ,C j,p ,C j,n ].
[0225]
[0226] (2) Edge business offloading based on computing power and storage capabilities
[0227] The edge node storage capacity is expressed as Task computing power requirements D b,C =[D b,l ,D b,p ,D b,n ], storage capacity requirement D b,S The total demand can be expressed as D b =[D b,l ,D b,p ,D b,n ,D b,S ] The processing time limit of the task is t b,min . Judge t b,min ·[C j ,S j ]-[D b,C ,D b,S ] is greater than zero, the set of edge nodes that can execute the task can be screened out. Then, similar to the previous strategy, heuristic algorithms such as differential evolution or particle swarm can be used to obtain the unloading location of the edge service, thereby achieving efficient and accurate resource scheduling.
[0228] A specific embodiment of the distributed energy data management collaborative processing system based on blockchain of the present invention:
[0229] A distributed energy data management collaborative processing system based on blockchain includes a load aggregator, a blockchain platform and a trusted computing distributed sandbox, several communication gateways, a 5G communication module, at least one blockchain node module, a distributed optimization decision-making contract module, and a terminal device.
[0230] The communication gateway is used to collect data from distributed energy system terminals;
[0231] The data include power load, charging pile power, photovoltaic power, wind power, and energy storage;
[0232] Several communication gateways upload the collected data to each blockchain node module through the 5G communication module;
[0233] The blockchain node module is used to synchronize consensus and monitor through trusted computing technology;
[0234] The distributed optimization decision-making contract module calls the data in the blockchain node module to make optimization decisions, and generates control instructions after the decision is made and sends them to the terminal device through the communication gateway, thereby realizing trusted supervision of the data collection, storage, and use process, and supporting the security management of demand-side response, edge resource allocation, and trusted computing.
[0235] The bottom layer of the system is the data collection layer. Taking the photovoltaic power generation scenario as an example, the bottom layer load aggregator of the system is mainly responsible for collecting power data of various photovoltaic equipment in various power parks, photovoltaic enterprises, and power users through the blockchain oracle terminal, aggregating power user needs, accelerating power market transactions, and thus promoting power grid load balance.
[0236] The oracle stores the collected raw power data in the local database of the device.
[0237] At the same time, the data identifier is calculated through cryptographic algorithms such as hashing.
[0238] The data identification is uploaded to the blockchain platform to achieve tamper-proof and traceability of the data identification, so as to establish a connection between the on-chain identification and the off-chain data.
[0239] According to the demand side response integration application requirements,
[0240] The correspondence between on-chain identifiers and off-chain data is used to achieve data credibility verification, and twin the data that passes the verification.
[0241] With the support of the blockchain platform, a soft “trusted computing distributed sandbox” is created using state channel technology, combining twin trusted data, edge computing resources, and edge network resources.
[0242] Based on trusted sandbox computing, demand-based bidding and negotiation are realized, and response-oriented smart contracts are generated. The deployment and execution of smart contracts are realized through the blockchain platform.
[0243] Taking into account the usage scenarios of the system, a consortium chain is chosen to build a blockchain platform, and the platform is supported and maintained by decentralized blockchain nodes.
[0244] Blockchain nodes jointly build and store alliance chain data, deploy and execute smart contracts, and support the blockchain platform's demand-side response, edge resource management, and trusted computing security management functions based on smart contracts.
[0245] In order to ensure the reliable collection of power IoT data, trusted software base, trusted TPCM and trusted computing active immunity modules are deployed on smart meters of load aggregators, oracle terminals of blockchain and other devices. Through the trusted computing mechanism, data trust at the hardware level is achieved, ensuring system security. The blockchain platform supervises the trusted computing module, ensuring the normal operation of the module and further strengthening the data trustworthiness of the system.
[0246] A specific embodiment of the present invention is applied:
[0247] To simplify the analysis, it is assumed that each end-side user only initiates one service request within a period of time. Services can be divided into microtask services, which are carried by containers with corresponding functions. We consider that microtask services and containers have a one-to-one correspondence. This problem is determined by the distributed data application model, distributed data network model, computing model, and multi-objective optimization model described below.
[0248] Simulation Analysis
[0249] (1) Construction of simulation environment
[0250] The simulation is implemented in Python environment.
[0251] The strategy of the present invention is applicable to multi-service scenarios. To simplify the analysis of simulation results, only one service is considered in the simulation to build the business topology and network topology. Two situations are considered:
[0252] 1) There is no dependency between microtask services. A demand response business is split into 30 microtask services.
[0253] 2) There are dependencies between microtask services. Consider that a service can be split into 15 microtask services, which can be constructed as a directed graph.
[0254] Construct a network topology graph containing 10 edge nodes, which is an undirected fully connected graph. There are three combinations of edge node computing power and storage capacity, which are randomly selected in {100,100}, {200,200}, and {400,400}, that is, there are three types of nodes. Because there are 15 nodes in total and undirected connections are considered, the total number of edges, that is, the number of links, is The link bandwidth is randomly selected in the range of {200,400}, and the link length is randomly selected in the range of {30,300}.
[0255] (2) Analysis of simulation results
[0256] The comparative experiment package of the present invention is based on random microtask service deployment and dynamic load balancing algorithm based on bipartite graph multiple matching. The performance of the microtask service deployment algorithm based on DE proposed by the present invention is tested in two cases: there is no dependency between microtask services and there is a dependency between microtask services.
[0257] 1) There is no dependency between microtask services
[0258] When there is no dependency between microtask services, there is no transmission delay between microtask services. At this time, the optimization problem is simplified to a single-objective optimization problem for load balancing.
[0259] The simulation results in this case are as follows Figure 2 As shown, (a) shows that the computing resource load balancing weight is 1 / 4 and the storage resource load balancing weight is 3 / 4, (b) shows that the computing and storage resource load balancing weights are 1 / 2 each, and (c) shows that the computing resource load balancing weight is 3 / 4 and the storage resource load balancing weight is 1 / 4. The simulation results show that the algorithm of the present invention has different optimization capabilities for computing and storage load balancing, but the overall trend is constant.
[0260] Compared with the load balancing algorithm based on bipartite graph matching, the algorithm of the present invention improves the balance by about 24%-60%. In terms of the overall trend, as the number of requests increases, the degree of load imbalance increases. The reason is that the computing and storage requirements of the same microtask service increase, and the range of matching nodes that can meet the requirements is reduced, resulting in reduced deployment optimization flexibility. As the number of requests increases further, the load balance shows a stable trend, because the matching relationship between the microtask service and the node gradually stabilizes, the resource occupancy of the node increases to a similar degree, and the standard deviation tends to be stable.
[0261] 2) There are dependencies between microtask services
[0262] The algorithm performance test is carried out under the consideration of the dependency between microtask services. The latency and load balancing are comprehensively considered, and the performance simulation is carried out according to formulas (5) and (8). The simulation results are as follows: Figure 3 As shown. Among them, (a) shows that the weight of the delay index is 1 / 4 and the weight of the load balancing index is 3 / 4, (b) shows that the weights of the delay and load balancing indicators are 1 / 2 respectively, and (c) shows that the weight of the delay index is 3 / 4 and the weight of the load balancing index is 1 / 4. The simulation results show that the present invention can achieve significant performance improvement for the dual performance optimization of delay and load balancing. The proposed algorithm has a more obvious performance improvement for load balancing. Compared with the bipartite graph matching method, the comprehensive performance improvement ratio is 31%-54%.
[0263] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0264] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. Distributed energy data management collaborative processing method based on blockchain, It is characterized in that The following steps are involved: The first step is to build a distributed collection model in the communication gateway to collect data from distributed energy system terminals; The distributed collection model implements strong identity authentication of distributed energy system terminals based on trusted computing, combines the oracle mechanism with the blockchain system to achieve remote authentication, runs data measurement and evaluation algorithms in a trusted computing environment to complete data collection and filtering tasks, and finally realizes data collection and reliable upload to the blockchain system; The second step is to build a trusted computing distributed sandbox to provide an isolated environment for the data in the first step; The trusted computing distributed sandbox uses trusted computing and sandbox computing technologies to achieve isolation during data use; The third step is to build a distributed data verification model to verify the credibility of the isolated data in the second step; The distributed data verification model realizes the generation of data identifiers based on cryptography and decentralized timestamp technology, and completes the organic association of on-chain and off-chain data, realizing the credible verification of on-chain and off-chain data; Step 4: For the verification data in step 3, a distributed verification model is constructed to complete multi-party identity authentication and multi-party data trust verification; The distributed verification model can meet the data trust requirements in trusted computing, complete multi-party identity authentication based on cryptographic technology, and use smart contracts and blockchain technology to complete multi-party data trust verification to obtain verification data; Step 5: For the verification data in step 4, a distributed data twin model is constructed to aggregate the data to meet the detailed optimization decision-making tasks. The distributed data twin model realizes local relevant data retrieval and carries out data trust verification based on the on-chain identification, and aggregates data according to data requirements to respond to optimization decision-making tasks and realize trustworthy data twin aggregation; Step 6: Based on the optimization decision-making tasks in step 5, a distributed optimization decision-making contract model is constructed to split the optimization decision-making tasks into micro-task services. The distributed optimization decision-making contract model is based on the two situations of dependency and non-dependency between microtask services, combined with virtualization technology, to achieve optimized decision-making task scheduling for comprehensive optimization of system transmission delay and load imbalance, and complete the collaborative processing of terminal data resources of distributed energy system.
2. The distributed energy data management collaborative processing method based on blockchain as claimed in claim 1, It is characterized in that In the third step, the construction method of the distributed data verification model uses a decentralized timestamp and cryptography technology through an oracle to obtain a unique data ID based on the timestamp of the data being uploaded to the chain and perform a hash operation on it. At the same time, the data hash value, digital signature and data ID are packaged to generate a data identifier and stored in the blockchain system; When data credibility verification is required, it specifically includes the following steps: Step 31, the data verification node first calculates the data hash value Hash0 of the local data storage according to the request message; Step 32, the data verification node generates a unique data ID according to the timestamp information timestamp0 retained in the local database; Step 33, the data verification node interacts with the data trusted verification contract of the blockchain, obtains the data identifier stored in the blockchain through the data ID in step 32, and extracts the data hash value Hash1; Step 34, compare the hash value Hash0 in step 31 and the hash value Hash1 in step 33 to verify the integrity of the data; if the two values are the same, the data successfully completes the data credibility verification, indicating that the data has not been tampered with, otherwise, the data has been tampered with or destroyed.
3. The distributed energy data management collaborative processing method based on blockchain as claimed in claim 1, It is characterized in that In the fourth step, the method for constructing a distributed verification model specifically includes the following steps: Step 41: The oracle terminal performs a trusted computing active immunity test. If the test passes, it proves that the oracle environment is trustworthy and proceeds to the next step; if it fails, it proves that the oracle status is abnormal and is reported to the management platform for analysis and processing; Step 42, when the oracle terminal test of step 41 passes, the communication gateway uploads the data to the oracle for processing, thereby forming load aggregation data, and the load aggregation data is copied. The first backup data is prepared to generate a data identifier and store it on the chain, and the second backup data performs trusted calculation of demand metering data; Step 43, prepare the first backup data in step 42 for uploading to the blockchain, and the preparation for uploading to the blockchain begins; perform oracle identity authentication and blockchain node identity authentication; If both are passed, the two parties negotiate the session key; if either fails, the information is reported to the management platform for analysis and processing; after the negotiation of the session key is successful, a two-way trust evaluation, identity authentication evaluation, and data integrity verification evaluation are carried out; based on these three evaluations, the evaluation results are generated and uploaded to the on-chain policy service node; Step 44: The on-chain policy service node in step 43 provides a decision, and the decision information is sent to the oracle terminal and the blockchain node. The oracle terminal opens the corresponding port and the trusted on-chain channel according to the decision information. Data identification is uploaded to the chain, and the ledger data is synchronized to make the data non-repudiable and traceable; after the data is uploaded to the chain, the entire system can be managed on the chain; In step 45, the oracle terminal sends the data in step 44 to the trusted computing distributed sandbox. There are two parts of data in the trusted computing distributed sandbox, one part is the original data sent by the oracle terminal, and the other part is the data identifier sent by the blockchain node. The trusted computing distributed sandbox performs multi-party data verification and completes the corresponding computing tasks.
4. The distributed energy data management collaborative processing method based on blockchain as claimed in claim 1, It is characterized in that In the fifth step, the method for constructing a distributed data twin model includes the following steps: Step 51: further refine the data requirements according to the differences in the required data categories; the refined data requirements should be able to reflect the required data categories and correspond to the data identifiers on the chain to achieve data requirement division; Step 52: Initiate a data collection request to the data collection layer of the system according to the data requirements divided in step 51; according to the data sharing requirements, the data collection device realizes the on-chain registration of data based on the data identifier, and establishes a mapping relationship between the on-chain identifier and the off-chain data; based on this, the original data collection for specific data requirements can be realized through on-chain retrieval; Step 53: Before further operations based on the original data in step 52 are carried out, the off-chain data needs to be verified for credibility based on the on-chain data identifier; Through hash functions and cryptography technology, using the local trusted computing module, the local data summary is calculated and compared with the data records on the chain to detect whether the data is complete and has not been tampered with, thus realizing data trust verification; Step 54, the data verified in step 53 is used to generate a data copy through the twin, the original data is retained locally, and the twin trusted data participates in aggregation and supports the next application; the twin data is a copy of the original data, and the obtained data copy is completely consistent with the data at the time of copying. Subsequent operations on the twin data will not affect the original data and the data identifier on the chain.
5. The distributed energy data management collaborative processing method based on blockchain according to any one of claims 1 to 4, characterized in that: In the sixth step, the construction method of the distributed optimization decision-making contract model splits the optimization decision-making task into microtask services through edge computing, and deploys the microtask services on the edge side; Optimization decision-making tasks include load demand forecasting, demand bidding, and dynamic electricity price setting, which are divided into micro-task services according to different division methods; According to different implementation goals, load demand forecasting is divided into day-ahead load forecasting microtask service and real-time load forecasting microtask service; According to the order of execution steps, the load demand forecast is divided into micro-task services of day-ahead load forecasting, day-ahead load correction and real-time proportional update; Demand bidding is split into a micro-task service for the power company to establish load shedding capacity and a micro-task service for users to bid; The deployment method of the microtask service sequentially constructs a distributed data application model, a distributed data network model, and a distributed data computing model.
6. The distributed energy data management collaborative processing method based on blockchain as claimed in claim 5 is characterized in that: The distributed data application model specifically includes the following contents: Services i Use directed graphs from two aspects: microtask service set and dependency relationship between microtask services Give a description; in For services i The m microtask services split out, s i _relation represents the dependency relationship between microtask services; When a microtask service The execution requires another microtask service When the data is connected, a relationship is established between them, using a directed link The data transmission volume between microtask services is expressed as Microtask services are initiated directly by users or requested by other microtask services. The resource requirements of microtask services mainly include computing and caching requirements. express; The distributed data network model constructs the network topology of the edge side as a fully connected undirected graph, which specifically includes the following contents: The distributed data network model is denoted as G E = <node_set, link_set>, where node_set = {e1, e2,..., e n} represents the set of edge nodes, and the computing and storage capabilities of the edge nodes can be denoted as N E = <n i _cal, n i _str>; link_set represents the set of links, and l j,k represents the two-way interaction relationship between nodes n j and n k . The link characteristics are abstracted as L E = <l j,k _band, l j,k _leng>, where l j,k _band represents the link bandwidth, and l j,k _leng represents the network distance; The optimization objectives of the distributed data computing model are latency and load balance, which includes a network transmission latency calculation model between microtask services, a network load balance calculation model, a cloud-edge decision model, and a multi-objective optimization model.
7. The distributed energy data management collaborative processing method based on blockchain as claimed in claim 6, It is characterized in that The network transmission delay calculation model between the microtask services specifically includes the following contents: The calculation parameters of transmission delay include the data transmission volume of one request between two microtask services, the bandwidth between the two edge nodes where the microtask services are deployed, and the network distance between the edge nodes; Then the transmission delay of the microtask service included in service i is The propagation delay is t prop = l j,k_leng / c; the total transmission delay of service i is calculated by the following formula: Among them, S p,k Represents the edge node e k The number of microtask services on the network, c is the propagation speed of electromagnetic waves; When there are dependencies between microtask services, the cumulative calculation of transmission delays of different microtask services is sometimes repeated. In this case, the pruning method is used to deal with it; If there is no dependency between microtask services, there will be no transmission delay. At this time, the only optimization goal is the load balance of the network; the multi-objective optimization problem is transformed into a single-objective optimization problem.
8. The distributed energy data management collaborative processing method based on blockchain as claimed in claim 7, It is characterized in that The network load balancing calculation model specifically includes the following contents: The load balancing degree of the network is measured by the standard deviation of the overall computing and cache resources of the edge nodes, and the calculation formula is as follows: in, and They represent the standard deviation of total computing and cache resources respectively. α and β are weight factors, indicating the importance the system places on computing and cache balance. and They represent the utilization rates of computing and cache resources of edge node j respectively; The cloud-edge decision model includes the following: When edge resources cannot meet the computing requirements of all tasks, priority is given to executing latency-sensitive tasks. It is determined whether the remaining tasks should wait on the edge or be uploaded to the cloud for execution. The determination is based on the size of the waiting delay + computing delay and the transmission delay to the cloud. The multi-objective optimization model specifically includes the following contents: When there is no dependency between microtask services and they are simply executed in parallel, a single-objective optimization model is constructed with computing and cache resources as constraints and minimizing load imbalance as the goal. The calculation formula is as follows: When there are dependencies between microtask services, a multi-objective optimization model is constructed with computing and cache resources as constraints and minimizing transmission delay and load imbalance as the goal. The calculation formula is as follows: The linear weighting method is used to transform the multi-objective problem into a single-objective problem, and the fitness function is constructed; the two objective expressions are normalized; Among them, the maximum and minimum values are obtained through multiple experiments; The fitness function is constructed as: f(X i )=λ1*η(t i )+λ2*η(B i ) (8) Among them, X i is the scheduling mechanism, X i ={x i ,y i }, which represents the mapping of microtask services to edge nodes; the goal is to find min(f(X i ))'s X i plan; A resource scheduling strategy model is also set up to finely divide resources to achieve efficient and accurate scheduling. It divides the edge node computing power into logical computing power, parallel computing power, and neural network acceleration computing power; Based on the edge business needs, edge nodes that can meet the requirements are selected, and a resource scheduling strategy for edge business that meets the optimization needs is obtained in the feasible solution by combining the heuristic algorithm.
9. A distributed energy data management collaborative processing method based on blockchain, characterized in that: Includes the following: Build a trusted computing distributed sandbox to provide an isolated environment for running data; The trusted computing distributed sandbox uses trusted computing and sandbox computing technologies to achieve isolation during data use; Build a distributed verification model to complete multi-party identity authentication and conduct multi-party data trust verification; The distributed verification model can meet the data trust requirements in trusted computing, complete multi-party identity authentication based on cryptographic technology, and use smart contracts and blockchain technology to complete multi-party data trust verification, and finally complete the demand-side response task in the trusted computing distributed sandbox; Build a distributed collection model to collect data from distributed energy system terminals; The distributed collection model implements strong identity authentication of distributed energy system terminals based on trusted computing, combines the oracle mechanism with the blockchain system to achieve remote authentication, runs data measurement and evaluation algorithms in a trusted computing environment to complete data collection and filtering tasks, and finally realizes data collection and reliable upload to the blockchain system; Build a distributed data verification model to verify the credibility of data; The distributed data verification model realizes the generation of data identifiers based on cryptography and decentralized timestamp technology, and completes the organic association of on-chain and off-chain data. Finally, it combines smart contracts to realize the credible verification of on-chain and off-chain data, and prevents off-chain data from being tampered with or destroyed. Build a distributed data twin model and aggregate data to meet detailed data requirements; The distributed data twin model realizes local related data retrieval and carries out data trust verification based on the on-chain identification, and aggregates data according to data requirements to respond to system applications and realize trustworthy data twin aggregation; Build a distributed optimization decision-making contract model to split the optimization decision-making tasks into micro-task services; The distributed optimization decision contract model splits the optimization decision task into microtask services, considers the two situations of dependency and non-dependency between microtask services, and combines virtualization technology to realize optimization decision task scheduling for comprehensive optimization of system transmission delay and load imbalance. Build a resource scheduling strategy model to finely divide resources to achieve efficient and accurate scheduling. It divides the edge node computing power into logical computing power, parallel computing power, and neural network acceleration computing power; Based on the edge business needs, edge nodes that can meet the requirements are selected, and a resource scheduling strategy for edge business that meets the optimization needs is obtained in the feasible solution by combining the heuristic algorithm.
10. A distributed energy data management collaborative processing system based on blockchain, characterized in that: Apply the distributed energy data management collaborative processing method based on blockchain as described in any one of claims 1 to 9; It includes several communication gateways, 5G communication modules, at least one blockchain node module, a distributed optimization decision-making contract module, and terminal equipment; The communication gateway is used to collect data from distributed energy system terminals; The data include power load, charging pile power, photovoltaic power, wind power, and energy storage; Several communication gateways upload the collected data to each blockchain node module through the 5G communication module; The blockchain node module is used to synchronize consensus and monitor through trusted computing technology; The distributed optimization decision-making contract module calls the data in the blockchain node module to make optimization decisions, and generates control instructions after making decisions and sends them to the terminal device through the communication gateway.