Photovoltaic energy transaction system based on alliance chain cross-chain data collaborative privacy protection
Through the alliance chain cross-chain data collaborative privacy protection system, the problem of weak data trustworthiness guarantee mechanism in distributed photovoltaic energy transactions is solved, the secure transmission and efficient interaction of sensitive information are achieved, and the changes in supply and demand dynamically adapt to changes in supply and demand are improved, and the security and efficiency of the transaction system are improved.
Patent Information
- Application Number
- CN202510530225.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-08
AI Technical Summary
In the distributed photovoltaic energy trading system, the data trustworthiness guarantee mechanism is weak, there is a risk of single point failure and data privacy leakage, low cross-chain interaction efficiency, lack of dynamic bidding strategies, and it is impossible to respond quickly to changes in supply and demand.
The alliance chain cross-chain data collaborative privacy protection system is adopted, and through user identity and permission management, verification encryption and on-chain module, dynamic bidding module and smart contract module, combined with zero-knowledge proof and homomorphic encryption technology, sensitive information encryption transmission and interactive validity verification are realized, and a dynamic bidding model based on spatio-temporal sequence prediction is built to optimize transaction matching.
Ensure that sensitive information is not leaked, improve the security and credibility of the interaction process, improve cross-chain interaction efficiency, dynamically adapt to supply and demand changes, and improve the degree of transaction automation and the time and space adaptability of equipment resources.
Smart Images

Figure CN120450860A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of alliance chain technology, and in particular to a photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection. Background Art
[0002] In the field of distributed photovoltaics, scholars both domestically and internationally have conducted systematic research and developed a multi-dimensional technical approach. To meet the development needs of a distributed photovoltaic interactive environment, some studies have proposed type- and voltage-based access mechanisms, leveraging dedicated power lines and virtual power plant aggregation to create interactive scenarios. Regarding interactive mechanism design, some studies have adopted a two-tier coordination mechanism based on a multi-agent system, promoting the joint optimization of multiple virtual power plants through a cooperative game model. The payment functions and bargaining methods designed in this way provide a solid foundation for distributed interactive pricing mechanisms. Furthermore, some studies have incorporated blockchain technology into photovoltaic prosumer trading scenarios, designing a day-ahead + real-time two-stage trading mechanism and implementing a flexible electricity price strategy. Furthermore, to further apply blockchain technology to the distributed energy sector, existing technologies, targeting the characteristics of distributed energy trading systems, combine cloud-edge collaboration with blockchain technology. These technologies have proposed distributed energy trading systems based on cloud-edge collaboration and blockchain to improve the efficiency and reliability of distributed energy trading.
[0003] However, while these approaches have achieved some success, they still have limitations. In distributed energy trading systems based on cloud-edge collaboration and blockchain, the cloud-edge collaboration architecture relies on central servers for data cleansing, creating single points of failure and data tampering risks, which can easily leak user privacy. In other words, existing technologies have weak data trust mechanisms. Summary of the Invention
[0004] (1) Technical problems solved
[0005] In response to the shortcomings of the existing technology, the present invention provides a photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection, which solves the technical problem of weak data credibility assurance mechanism in the existing technology.
[0006] (2) Technical solution
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0008] In a first aspect, the present invention provides a photovoltaic energy trading system based on cross-chain data collaborative privacy protection of alliance chains, comprising:
[0009] User identity and authority management module, used to authenticate user identities and manage user authorities;
[0010] The verification, encryption, and blockchain module is used to obtain and verify the user's qualification data. After qualification verification, the electricity demand of the electricity user, the energy storage status of the power supplier, and the preset price range of the transaction parties are encrypted and packaged, and the packaged data blocks are uploaded to the blockchain. The user is also assigned a corresponding chain identity, with the power supplier corresponding to the production node and the electricity user corresponding to the consumption node.
[0011] The dynamic bidding module is used to match the electricity demand of the electricity demander, the energy storage status of the power supplier, and the preset price range, historical interaction data and real-time monitoring data of the two parties to form a transaction pair;
[0012] The smart contract module is used to form a smart contract based on the transaction pair, and is also used to feed back the smart contract to the user end so that the user can verify the interaction terms. After receiving the user's confirmation and signature, the alliance chain submits the contract to the consensus node, and completes the interaction validity verification and repeated interaction screening through zero-knowledge proof technology. After verifying the validity of the signature, the node updates the interaction status.
[0013] Preferably, the dynamic bidding module includes a first matching unit and a second matching unit;
[0014] Among them, the first matching unit is used to match the production nodes and consumption nodes whose preset price ranges of the two parties to the transaction overlap to form a transaction pair; the second matching unit is used to process the historical interaction data and real-time monitoring data through the spatiotemporal series prediction model to obtain the electric power forecast value and the electricity demand forecast value; adjust the initial benchmark electricity price according to the electric power forecast value and the electricity demand forecast value to obtain the adjusted benchmark electricity price; use the adjusted benchmark electricity price as the pricing, and automatically match the transaction pairs according to the energy storage status of the production node and the electricity demand of the consumption node.
[0015] Preferably, the transaction matching of production nodes and consumption nodes whose preset price ranges of both parties overlap includes:
[0016] The median of the lowest price and the highest price in the overlapping range is used as the pricing to match the production nodes and consumption nodes whose preset price ranges of the two parties to the transaction overlap to form a transaction pair.
[0017] Preferably, the adjusting the initial benchmark electricity price according to the electric power forecast value and the electricity demand forecast value to obtain the adjusted benchmark electricity price includes:
[0018] The demand gap and supply surplus ratio are calculated based on the predicted power value and the predicted power demand value. Specifically:
[0019] If demand is greater than supply, calculate the demand ratio gap.
[0020] If supply exceeds demand, calculate the excess supply ratio.
[0021] The adjusted benchmark electricity price needs to be calculated based on the supply-demand gap or oversupply ratio:
[0022] P adjusted =P base ×(1+α×GapRatio)
[0023] Among them, GapRatio refers to the demand ratio gap GapRatio Demand or GapRatio Supply ;P base is the initial benchmark electricity price; P adjusted is the adjusted benchmark electricity price; α is the adaptive adjustment parameter.
[0024] Preferably, the photovoltaic energy trading system further comprises a feedback adjustment module, and the feedback adjustment module is used to perform feedback adjustment on the adaptive adjustment parameter α and the initial benchmark electricity price through a multi-objective function and a particle swarm optimization algorithm.
[0025] Preferably, the multi-objective function includes:
[0026] F=δ1O1+δ2O2+δ3O3+δ4O4
[0027] Among them, O1 is the balance between supply and demand, O2 is the transaction efficiency, O3 is user satisfaction O4 is market stability, ω j Set according to the proportion of transaction power of user j; C j represents the rating of user j; m represents the number of users who give ratings; σP is the standard deviation of historical electricity prices, μP is the average electricity price; δ1, δ2, δ3, and δ4 all represent weights.
[0028] Preferably, the feedback module is further used to correct the adaptive adjustment parameter α based on the high interaction success rate and user satisfaction counted by the smart contract at the end of each interaction cycle, and the corrected α is used to guide the adjustment of the benchmark electricity price in the next cycle.
[0029] Preferably, the electricity demand of the electricity demander, the energy storage status of the power supplier and the preset price range of the transaction parties are encrypted, including
[0030] The Paillier homomorphic encryption algorithm is used to encrypt the electricity demand of the electricity demander, the energy storage status of the power supplier, and the preset price range of the two parties to the transaction.
[0031] In the second aspect, the present invention provides a computer-readable storage medium, which is used to store computer instructions, programs, code sets or instruction sets. When it runs on a computer, it enables the computer to execute the functions corresponding to each module in the photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection as described above.
[0032] In a third aspect, the present invention provides an electronic device, comprising:
[0033] One or more processors; and a computer-readable storage medium, which is used to store computer instructions, programs, code sets or instruction sets, which, when running on a computer, enable the one or more processors to implement the functions corresponding to each module in the photovoltaic energy trading system based on cross-chain alliance chain data collaborative privacy protection as described above.
[0034] (3) Beneficial effects
[0035] This invention provides a photovoltaic energy trading system based on cross-chain data collaborative privacy protection through alliance chains. Compared with existing technologies, it has the following advantages:
[0036] The present invention encrypts the preset price range of both parties to the transaction. Only after receiving the user's confirmation that the smart contract is correct and signed, the alliance chain submits the contract to the consensus node, and completes the interaction validity verification and repeated interaction screening through zero-knowledge proof technology. After the node verifies the validity of the signature, it updates the interaction status to ensure that sensitive information is not leaked and the interaction process is safe and reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.
[0038] Figure 1 This is a flowchart of a photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection to implement P2P transactions in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0040] The embodiments of the present application solve the technical problem of weak data credibility assurance mechanism in the prior art by providing a photovoltaic energy trading system based on cross-chain data collaborative privacy protection of alliance chain, thereby ensuring that sensitive information is not leaked and that the interaction process is safe and reliable.
[0041] The technical solution in the embodiments of the present application is to solve the above technical problems, and the overall idea is as follows:
[0042] The existing technology mainly has the following defects:
[0043] 1. Weak data credibility assurance mechanism:
[0044] The cloud-edge collaborative architecture relies on central servers for data cleaning, which poses a single point of failure and data tampering risks, and user privacy is easily leaked.
[0045] 2. Inefficient cross-chain interactions:
[0046] The existing cross-chain solution adopts a full-node verification mode, and the interaction confirmation time is as long as minutes. It cannot achieve rapid interaction between household photovoltaic users under high concurrency conditions, and the efficiency of distributed energy consumption is low.
[0047] 3. Lack of dynamic bidding strategy:
[0048] Traditional matching technologies use fixed reputation weights and fail to account for output deviations caused by sudden weather changes. Pricing models fail to incorporate real-time supply and demand, leading to issues such as low interactive matching rates during peak solar hours at noon.
[0049] In order to solve the above problems, the embodiment of the present invention provides a photovoltaic energy trading system based on cross-chain data collaborative privacy protection of alliance chain by constructing a dynamic bidding model based on spatiotemporal series prediction, integrating real-time data-driven optimization mechanism; combining zero-knowledge proof, homomorphic encryption and other technologies to enhance privacy protection; designing cross-chain dynamic permission management and lightweight verification process, users can switch roles according to their needs, realize multi-chain collaborative and efficient interaction, and ultimately improve the dynamic adaptability, privacy security and cross-chain interaction efficiency of energy trading, and improve the degree of automation of household photovoltaic P2P energy trading and the spatiotemporal adaptability of equipment resources.
[0050] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.
[0051] An embodiment of the present invention provides a photovoltaic energy trading system based on cross-chain data collaborative privacy protection of alliance chains, the system comprising:
[0052] User identity and authority management module, used to authenticate user identities and manage user authorities;
[0053] The verification, encryption, and blockchain module is used to obtain and verify the user's qualification data. After qualification verification, the electricity demand of the electricity user, the energy storage status of the power supplier, and the preset price range of the transaction parties are encrypted and packaged, and the packaged data blocks are uploaded to the blockchain. The user is also assigned a corresponding chain identity, with the power supplier corresponding to the production node and the electricity user corresponding to the consumption node.
[0054] The dynamic bidding module is used to match the electricity demand of the electricity demander, the energy storage status of the power supplier, and the preset price range, historical interaction data and real-time monitoring data of the two parties to form a transaction pair;
[0055] The smart contract module is used to form a smart contract based on the transaction pair, and is also used to feed back the smart contract to the user end so that the user can verify the interaction terms. After receiving the user's confirmation and signature, the alliance chain submits the contract to the consensus node, and completes the interaction validity verification and repeated interaction screening through zero-knowledge proof technology. After verifying the validity of the signature, the node updates the interaction status.
[0056] This embodiment encrypts the preset price range of both parties to the transaction. Only after receiving the user's confirmation and signature on the smart contract, the alliance chain submits the contract to the consensus node, completes the interaction validity verification and repeated interaction screening through zero-knowledge proof technology, and updates the interaction status after verifying the validity of the signature, ensuring that sensitive information is not leaked and the interaction process is safe and reliable.
[0057] The following combination Figure 1 A detailed description of each module:
[0058] User identity and rights management module:
[0059] To meet the needs of regulatory audits, the consortium chain will restrict participating roles. Interactive users must undergo real-name authentication, and identity trust is achieved through biometric identification and credit assessment. Therefore, in the embodiment of the present invention, user identity authentication and user rights management are performed in the user identity and rights management module. The specific implementation process is as follows:
[0060] Users must first submit their identity information and select a user identity to complete account creation. User identities are categorized into three types: ① Production Nodes (the units that generate and sell electricity and are responsible for responding to energy trading requests); ② Consumer Nodes (the units that consume electricity and are responsible for initiating energy trading requests to the energy source blockchain network); and ③ Notarization Nodes (the virtual power plant, comprising the power trading center and the power dispatching and control center), which are responsible for packaging and broadcasting energy trading requests to each production node. User identities can be changed in real time based on the state of energy supply and demand, corresponding to production nodes, consumer nodes, and notarization nodes in the blockchain network.
[0061] Verification, encryption and chain module:
[0062] After the user registers and logs in, the system will collect data such as electricity demand, power supply cost and energy storage status, preset price range, etc. in real time, and the user will upload parameters. Before the interaction officially begins, the verification, encryption and chain-uploading modules in the alliance chain will verify the qualification data, encrypt and package the verified qualification data, and upload the packaged data blocks to the chain; and assign the corresponding chain identity to the user, with the power supplier corresponding to the production node and the power demander corresponding to the consumption node. The specific implementation process is as follows:
[0063] Qualification data primarily includes proof of production capacity submitted by power suppliers and proof of demand provided by electricity buyers. This data is reviewed by production nodes, consumer nodes, and impartial parties to ensure its legitimacy and validity, with a regulatory system monitoring the review process. Audit records are synchronized to the consortium blockchain, forming a traceable permissions management database.
[0064] After qualification verification, the system will use industry-standard encryption algorithms to encrypt and package the electricity demand of the electricity user, the energy storage status of the power supplier, and the preset price range of both parties through a privacy protection mechanism. The encrypted data is packaged into a data block and linked to the previous data block to form a growing business chain. The system automatically assigns corresponding chain identities: the power supplier corresponds to the production node, and the electricity user corresponds to the consumption node. The delegated proof of stake (DPoS) in the consensus mechanism algorithm has been proven in research to ensure interactive security and improve interaction efficiency. The encrypted data is broadcast to the supply and demand nodes via the notary node. During this process, the system uses technologies such as zero-knowledge proof and ring signature to ensure the security of cross-chain data interaction.
[0065] Among them, the use of technologies such as zero-knowledge proof and ring signature to ensure the security of cross-chain data interaction includes:
[0066] After qualification verification is complete, the system uses the Paillier homomorphic encryption algorithm to encrypt the electricity demand of the electricity user, the energy storage status of the power supplier, and the preset price range of both parties to the transaction, generating ciphertext to ensure that the data stored on the business chain cannot be directly parsed. Subsequently, using zero-knowledge proof technology, the zero-knowledge succinct non-interactive knowledge argument algorithm zk-SNARKs is used to generate an interactive validity proof π. Its constraints include that the power consumption does not exceed the power generation capacity and the price is within the market range, without revealing the user's identity or specific values.
[0067] At this point, a Merkle tree root hash verification is inserted. After ensuring that the encrypted data has not been tampered with, the user signs the interaction hash value using AOS ring signature technology. Multiple public keys are randomly selected from consortium chain nodes to form an anonymous ring, generating a signature Sig_ring that cannot be traced to a specific identity, thus anonymizing the initiator of the interaction. Finally, the encrypted data, proof π, and ring signature Sig_ring are submitted to the chain for storage. Only the user holds the private key to the original data.
[0068] After receiving the interaction data, the smart contract invokes a zk-SNARKs verifier to perform millisecond-level verification of π, ensuring compliance. Once verified, the contract performs homomorphic addition on the encrypted prices and power levels of multiple transactions, generating aggregated ciphertext, including the total transaction volume E(total) and the average price E(avg), supporting statistical calculations in an encrypted state. Interaction matching rules, such as price priority and supply-demand balance, are triggered within the encrypted environment, generating anonymous orders and completing matching, preventing the disclosure of specific user interaction details. This process combines the transparency of blockchain with the security of private computing, achieving "data available without visibility."
[0069] To ensure the reliability of the privacy mechanism, a time-based key update protocol is introduced to automatically generate a new key pair when every N transactions are completed. The old key is destroyed through a threshold signature mechanism to prevent the risk of cracking by using the same key for a long time.
[0070] At the same time, a verifiable random function (VRF) based on zero-knowledge proofs is used to spot-check sample data to ensure it has not been tampered with. Homomorphic encryption-based ciphertext data analysis models are used to identify unusual interactions, such as high-frequency, low-price interactions. For example, ciphertext differential privacy techniques are used to detect data distribution anomalies. Furthermore, formal verification tools scan smart contracts and ZKP circuits for logical vulnerabilities, simulating scenarios such as replay attacks and man-in-the-middle attacks to test the anti-cracking capabilities of ring signatures.
[0071] Dynamic bidding module:
[0072] The dynamic bidding module includes: a first matching unit and a second matching unit.
[0073] The first matching unit is used to perform transaction matching on production nodes and consumption nodes whose preset price ranges overlap.
[0074] In the specific implementation process, the lowest price (P min ) and the highest price (P max ) as the pricing:
[0075]
[0076] For production nodes and consumption nodes whose preset price ranges do not overlap, automatic matching is performed through the second matching unit.
[0077] It should be noted that in the specific implementation process, before matching transaction pairs, the system also filters the preset price ranges that include abnormal electricity prices and abnormally high prices. For example, the abnormal preset price ranges such as P_min<0 and P_max<0 in the preset price range need to be filtered out.
[0078] The second matching unit is used to process the historical interaction data and the real-time monitoring data through the spatiotemporal series prediction model to obtain the electric power forecast value and the electricity demand forecast value; adjust the initial benchmark electricity price according to the electric power forecast value and the electricity demand forecast value to obtain the adjusted benchmark electricity price; use the adjusted benchmark electricity price as the pricing, and automatically match the transaction pairs according to the energy storage status of the production node and the electricity demand of the consumption node.
[0079] The second matching unit includes a data processing layer, a bidding layer and a matching layer.
[0080] The data processing layer extracts peak and valley period characteristics, electricity price fluctuation coefficients, and user behavior patterns from historical data and normalizes them. It also normalizes real-time meteorological data (updated hourly) to [0, 1], generating 24-hour × 5-dimensional sliding window features.
[0081] The bidding layer is used to process the normalized peak and valley period characteristics, electricity price fluctuation coefficient, user behavior patterns and meteorological data through a multimodal deep learning model to obtain the power generation power forecast value and the electricity demand forecast value, and adjust the initial benchmark electricity price according to the power generation power forecast value and the electricity demand forecast value to obtain the adjusted benchmark electricity price.
[0082] The multimodal deep learning model processes the normalized peak and valley period characteristics, electricity price fluctuation coefficient, user behavior patterns, and meteorological data to obtain the power generation power forecast and electricity demand forecast, including:
[0083] The system uses normalized peak and valley time characteristics, electricity price fluctuation coefficients, user behavior patterns, and meteorological data to predict power generation efficiency and electricity demand using a multimodal deep learning model (LSTM-CNN-Embedding). For example, meteorological data includes 24 hours of five indicators (sunshine, temperature, precipitation, wind speed, and cloud cover); historical time series data includes 24 hours of seven days (power generation, electricity consumption, and electricity prices); and user behavior patterns include categorical features (season and household size) embedded into a 16-dimensional vector.
[0084] Among them, the structure of the multimodal deep learning model includes:
[0085] LSTM layer: 128→64 units, extracting temporal dependencies;
[0086] CNN layer: 32 filters, 3×1 convolution kernel, extracting local meteorological features;
[0087] Fully connected layer: 256→128 units, ReLU activation.
[0088] Before the model is used, it needs to be trained and optimized. The loss functions during training and optimization include the loss function for power generation prediction and the loss function for power consumption prediction. The loss function for power generation prediction adopts MAE+sunshine intensity weight penalty term, and the loss function for power consumption prediction adopts Huber loss function.
[0089] It should be noted that during the specific implementation process, if there is a sudden meteorological change (such as a sudden drop in light intensity by 20%), the multimodal deep learning model needs to be fine-tuned in real time to correct the prediction results.
[0090] Among them, the triggering conditions of the real-time fine-tuning mechanism include: the setting of updating meteorological data every hour. If the changes in meteorological indicators mentioned above, such as light intensity and precipitation, exceed the threshold (such as light intensity drops by more than 20% compared with the previous hour), fine-tuning is triggered.
[0091] The fine-tuning process includes:
[0092] Data processing: Extract the latest 1-hour data from meteorological data (sunshine, temperature, precipitation, etc.) and historical time series data (power generation, electricity consumption), and preprocess it according to the input feature dimension requirements mentioned above (such as normalization and generating a 24-hour × 5-item time series window).
[0093] Model optimization: For the LSTM layer in the multimodal deep learning model mentioned above, the time-dependent parameters were fine-tuned based on the new data. For the CNN layer, the ability to extract local meteorological features was enhanced, and the 3×1 convolution kernel weights were updated to quickly adapt to the impact of sudden weather events on photovoltaic output and correct the power generation efficiency prediction results.
[0094] The initial benchmark electricity price is adjusted according to the predicted electric power value and the predicted electricity demand value to obtain the adjusted benchmark electricity price, which specifically includes:
[0095] The demand gap and supply surplus ratio are calculated based on the predicted power value and the predicted power demand value. Specifically:
[0096] If demand is greater than supply, calculate the demand ratio gap.
[0097] If supply exceeds demand, calculate the excess supply ratio.
[0098] When a demand gap exists, based on GapRatio Demand Raise electricity prices to stimulate supply; when there is oversupply, based on GapRatio Supply Lowering electricity prices to promote consumption. Specifically, it is necessary to dynamically adjust the coefficient based on the supply-demand gap or oversupply ratio and calculate the adjusted base electricity price:
[0099] P adjusted =P base ×(1+α×GapRatio)
[0100] Among them, GapRatio refers to the demand ratio gap GapRatio Demand or GapRatio Supply ;P base The initial benchmark electricity price is set by the system based on local electricity prices, historical interaction data, regional electricity costs, etc., and serves as the basic reference value for electricity price adjustment; P adjusted is the adjusted benchmark electricity price; α is the adaptive adjustment parameter, the larger the demand gap or supply surplus ratio, the higher the value. The specific adaptive adjustment rules are:
[0101] ① When demand exceeds supply, the value of α is as follows:
[0102] At that time, GapRatio Demand ≤10%, α=0.1; (electricity price increase)
[0103] 10% at that time <GapRatio Demand ≤20%, α=0.2;
[0104] At that time, GapRatio Demand When >20%, α=0.3.
[0105] ② When supply exceeds demand, the value of α is as follows:
[0106] When GapRatiosupply When ≤10%, α=-0.05 (electricity price reduction);
[0107] When 10% <GapRatio supply When ≤20%, α=-0.1;
[0108] When GapRatio supply When >20%, α=-0.15.
[0109] The matching layer is used to automatically match transaction pairs based on the energy storage status of the production node and the electricity demand of the consumption node, using the adjusted benchmark electricity price as pricing.
[0110] In the specific implementation process, the system also includes a feedback adjustment module:
[0111] The adaptive adjustment parameter α and the initial benchmark electricity price are feedback-regulated through multi-objective function and particle swarm optimization (PSO) algorithm.
[0112] Among them, the multi-objective function F = δ1O1+δ2O2+δ3O3+δ4O4
[0113]
[0114]
[0115] User satisfaction O3=C,
[0116]
[0117] Among them, σP is the standard deviation of historical electricity prices, and μP is the average electricity price.
[0118] Example weights δ1 = 0.35, δ2 = 0.3, δ3 = 0.2, δ4 = 0.15.
[0119] In the specific implementation process, particle swarm optimization (PSO) is used to maximize the objective function F:
[0120] Initialization: Particle position X i =[α threshold , P base ]](α rule threshold, base electricity price), speed V i Random initialization, through comparative experiments to test the effects of different parameter combinations, finally select the particle swarm size N (balance between computational cost and search accuracy), the maximum number of iterations T (to achieve stable convergence under computational resource constraints), and dynamically reduce the inertia weight during the iteration process. Balance global search and local development capabilities.
[0121] Iterative update: calculate particle fitness F and update individual optimal Pbest and the global optimal g best , through the formula ( Dynamically decrease, c1 = c2 = 1.5) update speed, and then pass Update location.
[0122] Termination and application: reaching the maximum number of iterations or g best When stable, output the optimal parameter α threshold 、P base , update smart contracts and realize real-time data-driven dynamic optimization of strategies.
[0123] Finally, on-chain execution and feedback are carried out: the matching results and dynamic electricity prices are written into the alliance chain, triggering the smart contract to complete the transaction settlement; the unmatched data is fed back to the model, and combined with real-time data (interaction success rate S, user satisfaction C), it drives the optimization of the next round of prediction and price recommendation strategies, forming a "prediction-bidding-feedback-optimization" closed loop.
[0124] Among them, combining real-time data (interaction success rate S, user satisfaction C) drives the optimization of the next round of prediction and price recommendation strategies, including:
[0125]
[0126] Set according to the proportion of transaction power of user j; C j represents the rating of user j; m represents the number of users who gave ratings), and the dynamic coefficient α is adjusted according to different scenarios.
[0127] The process of adjusting the dynamic coefficient α according to different scenarios is as follows:
[0128] At the end of each interaction cycle, the smart contract counts S, calculates C, and modifies α according to the above scenario rules, as follows:
[0129] ① High interaction success rate (S>0.8):
[0130] High user satisfaction (C≥0.6): The strategy is effective, slightly improving market activity and executing α final =α initial ×1.1.
[0131] Low user satisfaction (C<0.6): Optimize price fluctuations and implement α final =α initial ×(1-0.3×(1-C)).
[0132] ② Low interaction success rate (S≤0.8):
[0133] High user satisfaction (C≥0.6): Focus on optimizing supply and demand matching, α initialIncrease by 20% to enhance the regulation of supply and demand gap.
[0134] Low user satisfaction (C<0.6): Comprehensive optimization strategy, reset P base The median price of electricity traded in the past 7 days; limit α (when the supply-demand gap is ≤5%, α final =0; otherwise α final =α initial ×0.5)
[0135] At the end of each interaction cycle, the smart contract counts S, calculates C, and modifies α according to the above scenario rules to guide the adjustment of the benchmark electricity price for the next cycle, forming a "monitoring-analysis-optimization" closed loop.
[0136] Smart contract module:
[0137] This module is used to form smart contracts based on transaction pairs, and record relevant information of both parties (transaction pairs) during the transaction process, including the account addresses involved in the transaction, etc. It will also accurately record specific details such as the transaction price, transaction quantity, transaction time, etc. to ensure the accuracy and traceability of the transaction, ensure that the entire transaction process is accurately executed according to the predetermined rules, and provide complete data support for subsequent audits, queries, etc.
[0138] It should be noted that during the implementation process, once the supply and demand relationship is established, the system allows users to customize smart contracts based on their individual needs. Through a visual interface, users can set interaction parameters such as the interaction subject identification, energy category, interaction quantity, price, and time window.
[0139] Once the smart contract is customized, the system will provide feedback to the user so they can verify the terms of the interaction. After the user confirms and signs the contract, the consortium chain submits the contract to the consensus node. Using zero-knowledge proof technology, the contract is verified for validity and duplicate interactions, ensuring both high-quality interactions and data security. After verifying the signature, the node updates the interaction status, permanently recording all interaction elements (subject, energy quantity, price, and timestamp) on the consortium chain.
[0140] An embodiment of the present invention also provides a computer-readable storage medium, which is used to store computer instructions, programs, code sets or instruction sets. When the computer is run on a computer, it enables the computer to execute the functions corresponding to each module in the photovoltaic energy trading system based on the above-mentioned alliance chain cross-chain data collaborative privacy protection.
[0141] An embodiment of the present invention further provides an electronic device, including:
[0142] One or more processors; and a computer-readable storage medium, which is used to store computer instructions, programs, code sets or instruction sets, which, when running on a computer, enable the one or more processors to implement the functions corresponding to each module in the photovoltaic energy trading system based on the above-mentioned alliance chain cross-chain data collaborative privacy protection.
[0143] In summary, compared with the existing technology, the present invention has the following beneficial effects:
[0144] 1. The embodiment of the present invention encrypts the preset price range of both parties to the transaction. Only after receiving the user's confirmation and signature on the smart contract, the alliance chain submits the contract to the consensus node. The interaction validity verification and repeated interaction screening are completed through zero-knowledge proof technology. After the node verifies the validity of the signature, it updates the interaction status to ensure that sensitive information is not leaked and the interaction process is safe and reliable.
[0145] 2. This embodiment of the present invention utilizes a dynamic bidding strategy based on spatiotemporal series predictions, deeply analyzing parameters such as seasonal cycles, sunshine, temperature, and precipitation to accurately predict trends in the energy interaction environment. For example, during high summer temperatures, it can predict a surge in air conditioning electricity demand, prompting users to adjust their electricity purchasing or sales strategies. During rainy winter months, it can predict a decrease in photovoltaic power generation efficiency, helping users plan energy storage or source external power in advance. This provides scientific guidance to users, addresses the issue of delayed response to changes in the interaction environment in most existing models, and enhances the scientific nature of interactive decision-making.
[0146] 3. The cross-chain interaction mechanism of this embodiment of the present invention builds a theoretical model framework based on consortium blockchain technology, with verification nodes and docking nodes acting as the hubs for data matching. Verification nodes verify the authenticity of interaction data, while docking nodes are responsible for data transmission and matching between different chains, and multiple factors are integrated to screen interaction partners. This allows users to break free from the limitations of a single chain and search for better electricity prices or flexible interaction conditions across different chains, greatly expanding the scope of interaction, improving interaction flexibility, and enhancing the spatial and temporal adaptability of device resources.
[0147] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0148] 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 they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. 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 various embodiments of the present invention.
Claims
1. A photovoltaic energy trading system based on cross-chain data collaborative privacy protection of alliance chains, characterized by: include: User identity and authority management module, used to authenticate user identities and manage user authorities; The verification, encryption, and blockchain module is used to obtain and verify the user's qualification data. After qualification verification, the electricity demand of the electricity user, the energy storage status of the power supplier, and the preset price range of the transaction parties are encrypted and packaged, and the packaged data blocks are uploaded to the blockchain. The user is also assigned a corresponding chain identity, with the power supplier corresponding to the production node and the electricity user corresponding to the consumption node. The dynamic bidding module is used to match the electricity demand of the electricity demander, the energy storage status of the power supplier, and the preset price range, historical interaction data and real-time monitoring data of the two parties to form a transaction pair; The smart contract module is used to form a smart contract based on the transaction pair, and is also used to feed back the smart contract to the user end so that the user can verify the interaction terms. After receiving the user's confirmation and signature, the alliance chain submits the contract to the consensus node, and completes the interaction validity verification and repeated interaction screening through zero-knowledge proof technology. After verifying the validity of the signature, the node updates the interaction status.
2. The photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection according to claim 1 is characterized in that: The dynamic bidding module includes a first matching unit and a second matching unit; Among them, the first matching unit is used to match the production nodes and consumption nodes whose preset price ranges of the two parties to the transaction overlap to form a transaction pair; the second matching unit is used to process the historical interaction data and real-time monitoring data through the spatiotemporal series prediction model to obtain the electric power forecast value and the electricity demand forecast value; adjust the initial benchmark electricity price according to the electric power forecast value and the electricity demand forecast value to obtain the adjusted benchmark electricity price; use the adjusted benchmark electricity price as the pricing, and automatically match the transaction pairs according to the energy storage status of the production node and the electricity demand of the consumption node.
3. The photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection as claimed in claim 2 is characterized in that: The transaction matching of production nodes and consumption nodes whose preset price ranges of both parties overlap includes: The median of the lowest price and the highest price in the overlapping range is used as the pricing to match the production nodes and consumption nodes whose preset price ranges of the two parties to the transaction overlap to form a transaction pair.
4. The photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection as claimed in claim 2 is characterized in that: The adjusting the initial benchmark electricity price according to the electric power forecast value and the electricity demand forecast value to obtain the adjusted benchmark electricity price includes: The demand gap and supply surplus ratio are calculated based on the predicted power value and the predicted power demand value. Specifically: If demand is greater than supply, calculate the demand ratio gap. If supply exceeds demand, calculate the excess supply ratio. The adjusted benchmark electricity price needs to be calculated based on the supply-demand gap or oversupply ratio: P adjusted =P base ×(1+α×GapRatio) Among them, GapRatio refers to the demand ratio gap GapRatio Demand or GapRatio Supply ;P base is the initial benchmark electricity price; P adjusted is the adjusted benchmark electricity price; α is the adaptive adjustment parameter.
5. The photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection as claimed in claim 4 is characterized in that: The photovoltaic energy trading system further includes a feedback adjustment module, which is used to perform feedback adjustment on the adaptive adjustment parameter α and the initial benchmark electricity price through a multi-objective function and a particle swarm optimization algorithm.
6. The photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection as claimed in claim 5 is characterized in that: The multi-objective functions include: F=δ1O1+δ2O2+δ3O3+δ4O4 Among them, O1 is the balance between supply and demand, O2 is the transaction efficiency, O3 is user satisfaction O4 is market stability, ω j Set according to the proportion of transaction power of user j; C j represents the rating of user j; m represents the number of users who give ratings; σP is the standard deviation of historical electricity prices, μP is the average electricity price; δ1, δ2, δ3, and δ4 all represent weights.
7. The photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection as claimed in claim 5 is characterized in that: The feedback module is also used to correct the adaptive adjustment parameter α based on the high interaction success rate and user satisfaction counted by the smart contract at the end of each interaction cycle. The corrected α is used to guide the adjustment of the benchmark electricity price in the next cycle.
8. The photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection according to any one of claims 1 to 7, characterized in that: The sensitive information such as the electricity demand of the electricity demander, the energy storage status of the power supplier and the preset price range of the transaction parties is encrypted, including using the Paillier homomorphic encryption algorithm to encrypt the electricity demand of the electricity demander, the energy storage status of the power supplier and the preset price range of the transaction parties.
9. A computer-readable storage medium, characterized in that The computer storage medium is used to store computer instructions, programs, code sets or instruction sets. When it runs on a computer, it enables the computer to perform the functions corresponding to each module in the photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection as described in any one of claims 1 to 8.
10. An electronic device, characterized in that: include: one or more processors; And a computer-readable storage medium, which is used to store computer instructions, programs, code sets or instruction sets, which, when running on a computer, enable the one or more processors to implement the functions corresponding to each module in the photovoltaic energy trading system based on alliance chain cross-chain data collaborative privacy protection as described in any one of claims 1 to 8.