An energy data dynamic encryption method and system based on edge computing
By dividing devices into groups and building a blockchain network in an edge computing environment, dynamic encryption strategies are generated, solving the problem that encryption strategies cannot be flexibly adjusted in existing technologies. This achieves the adaptability of encryption strategies and dynamic adjustment of network load, improving the security and efficiency of data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING SHENGXINNUO TECH CO LTD
- Filing Date
- 2025-08-02
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies cannot flexibly adjust encryption strategies in edge computing environments, resulting in reduced data transmission security.
By dividing terminal devices into device groups based on geographical location and corresponding edge computing nodes, a blockchain network is constructed, a dynamic encryption strategy is generated, optimized by combining data characteristics and network characteristics, and the encryption strategy is adjusted according to the load status, thereby achieving the adaptability of the encryption strategy and the dynamic adjustment of network load.
It improves the security and efficiency of data transmission, ensures the efficient utilization of network resources, but reduces the security of data transmission.
Smart Images

Figure CN120896748B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, specifically to a dynamic encryption method and system for energy data based on edge computing. Background Technology
[0002] With the rapid development of modern power grids and the widespread adoption of the energy internet, the number of terminal devices in power grids has exploded. These terminal devices generate massive amounts of energy data, and the efficient transmission and secure protection of this data have become critical issues that urgently need to be addressed. Especially in edge computing environments, how to dynamically encrypt energy data between different groups of devices to ensure the security and real-time performance of data transmission is a significant challenge in the current technological field.
[0003] Existing technologies typically employ a combination of edge computing and fixed encryption strategies to address these issues. By deploying computing nodes at the network edge, data transmission distances are reduced, improving processing efficiency; simultaneously, encrypted data ensures security. However, this approach uses fixed encryption strategies, which cannot be flexibly adjusted, thus reducing data transmission security. Summary of the Invention
[0004] This application provides a method, system, device, and storage medium for dynamic encryption of energy data based on edge computing, which can improve the security of data transmission.
[0005] In a first aspect, this application provides a dynamic encryption method for energy data based on edge computing. The method includes: dividing terminal devices in the power grid into multiple device groups according to their geographical locations, with each device group corresponding to an edge computing node; constructing a blockchain network based on the edge computing nodes; obtaining data characteristics of data to be sent from a first edge computing node to a second edge computing node in the blockchain network, as well as a first network characteristic corresponding to the first edge computing node and a second network characteristic corresponding to the second edge computing node; generating a first encryption strategy based on the data characteristics; adjusting the first encryption strategy by combining the first network characteristic and the second network characteristic to generate a second encryption strategy; generating network load balancing parameters based on the load status of other edge computing nodes in the blockchain network, and adjusting the second encryption strategy based on the network load balancing parameters to generate a target encryption strategy.
[0006] By adopting the above technical solution, data transmission distance is reduced by dividing terminal devices into device groups based on geographical location and corresponding them to edge computing nodes; the reliability of data transmission is improved by constructing a blockchain network to connect edge computing nodes; a first encryption strategy is generated based on data characteristics, and the strategy is optimized by combining the network characteristics of the source and target nodes to generate a second encryption strategy, realizing the adaptability of the encryption strategy to network conditions; finally, network load balancing parameters are generated according to the load status of other nodes, and the second encryption strategy is adjusted accordingly to obtain the target encryption strategy, realizing the dynamic adjustment of the encryption strategy with network load. This multi-level strategy optimization mechanism ensures both network resource utilization efficiency and data transmission security.
[0007] Optionally, generating a first encryption strategy based on the data characteristics includes: extracting data type identifier, data sensitivity level, and data size from the data characteristics; determining a basic encryption algorithm from a preset encryption algorithm library based on the data type identifier, wherein the basic encryption algorithm includes symmetric encryption algorithms and asymmetric encryption algorithms; determining encryption strength parameters based on the data sensitivity level, wherein the encryption strength parameters include encryption key length, number of encryption rounds, and obfuscation parameters; adjusting the encryption block size based on the data size to generate a block encryption sequence, wherein the block encryption sequence includes block size, number of blocks, and block encryption order; and generating the first encryption strategy by combining the basic encryption algorithm, encryption strength parameters, and block encryption sequence.
[0008] By adopting the above technical solution, a comprehensive analysis of data attributes is achieved by extracting data type identifiers, data sensitivity levels, and data volume from data characteristics. Appropriate basic encryption algorithms are selected based on data type identifiers, ensuring the matching degree between the encryption method and data characteristics. Encryption strength parameters, including key length, number of encryption rounds, and obfuscation parameters, are determined based on data sensitivity levels, ensuring the adaptability of encryption strength to data security requirements. Encryption block parameters are adjusted based on data volume to generate a block encryption sequence containing block size, number, and order, improving encryption processing efficiency. Finally, these elements are integrated to generate the first encryption strategy, achieving precise adaptation of the encryption strategy to data characteristics, optimizing encryption performance while ensuring security.
[0009] Optionally, generating the first encryption strategy by combining the basic encryption algorithm, encryption strength parameters, and block encryption sequence includes: constructing an encryption algorithm execution template according to the type of the basic encryption algorithm, the encryption algorithm execution template including encryption initialization parameters and encryption operation sequence; configuring the encryption key length, encryption round number, and obfuscation parameters in the encryption strength parameters into the encryption algorithm execution template to generate encryption algorithm configuration information; determining the data block processing flow according to the block encryption sequence; determining the data block processing flow according to the block encryption sequence includes: dividing the data into blocks according to the block size; dividing the data blocks into multiple parallel processing batches according to the number of blocks; determining the execution priority of each processing batch and the encryption order of the data blocks within each batch according to the block encryption order; and combining the encryption algorithm configuration information and the data block processing flow to generate the first encryption strategy.
[0010] By adopting the above technical solution, an algorithm execution template containing initialization parameters and operation sequences is constructed. The encryption strength parameters are configured into the template to generate algorithm configuration information. Combined with the block encryption sequence design, a data processing flow containing parallel processing batches and priorities is designed. Finally, a structured first encryption strategy is generated, realizing the standardized execution and parallel processing optimization of the encryption process.
[0011] Optionally, the step of adjusting the first encryption strategy by combining the first network features and the second network features to generate a second encryption strategy includes: obtaining the first network delay, the first available bandwidth, and the first node security level from the first network features, and the second network delay, the second available bandwidth, and the second node security level from the second network features; calculating the end-to-end transmission delay based on the first network delay and the second network delay, and adjusting the number of encryption rounds and the block size in the first encryption strategy based on the end-to-end transmission delay; determining the network throughput based on the first available bandwidth and the second available bandwidth, and optimizing the number of blocks and the block encryption order in the block encryption sequence based on the network throughput; evaluating the transmission path risk value based on the first node security level and the second node security level, and if the transmission path risk value exceeds a preset threshold, adding a dynamic obfuscation layer to the first encryption strategy or switching the first encryption strategy to an asymmetric encryption algorithm; and using the adjusted first encryption strategy as the second encryption strategy.
[0012] By adopting the above technical solution, the end-to-end transmission latency and network throughput are calculated by analyzing the network latency, available bandwidth and security level of the source node and the target node. Based on this, the encryption parameters and block segmentation strategy are adjusted, and the security measures are dynamically adjusted according to the transmission path risk value to generate a second encryption strategy that adapts to the network conditions. This achieves adaptive optimization of the encryption strategy for the network environment.
[0013] Optionally, the load status includes computing resource utilization, memory utilization, and network bandwidth utilization. Generating network load balancing parameters based on the load status of other edge computing nodes in the blockchain network includes: generating a resource load index for other edge computing nodes based on the computing resource utilization; generating a storage resource load index for other edge computing nodes based on the memory utilization; generating a bandwidth resource load index for other edge computing nodes based on the network bandwidth utilization; generating a comprehensive load coefficient for other edge computing nodes by combining the resource load index, the storage resource load index, and the bandwidth resource load index; generating network load balancing parameters characterizing the degree of load balancing in the blockchain network based on the mean and standard deviation of the comprehensive load coefficient; and weighting the computing resource load index, storage resource load index, and bandwidth resource load index to generate the load parameters.
[0014] By adopting the above technical solution, and by analyzing the computing resources, memory and bandwidth usage of other edge computing nodes, various resource load indices are generated and load coefficients are calculated in combination. Based on the statistical characteristics of the load coefficients, network load balancing parameters are generated, thereby realizing a quantitative assessment of the overall load status of the blockchain network and providing a reliable basis for optimizing encryption strategies.
[0015] Optionally, adjusting the second encryption strategy based on the network load balancing parameters to generate a target encryption strategy includes: when the network load balancing parameters are not greater than a first preset threshold, increasing the number of blocks in the second encryption strategy and adjusting the block encryption order; when the network load balancing parameters are not less than a second preset threshold, decreasing the number of blocks in the second encryption strategy and reducing the number of encryption rounds; when the network load balancing parameters are greater than the first preset threshold and less than the second preset threshold, keeping the encryption parameters in the second encryption strategy unchanged; and using the adjusted second encryption strategy as the target encryption strategy.
[0016] By adopting the above technical solution and setting the threshold range of load balancing parameters, the number of blocks is increased to improve resource utilization when the network load is light, the number of blocks is reduced and the encryption strength is lowered when the load is heavy, and the policy is kept stable when the load is moderate. Finally, the target encryption policy is generated, realizing the dynamic response and optimization adjustment of the encryption policy to the network load status.
[0017] Optionally, after adjusting the second encryption strategy to generate the target encryption strategy, the method further includes: encrypting the data according to the target encryption strategy to obtain encrypted data; writing the encrypted data and the target encryption strategy into a data block in the blockchain network; after the second edge computing node receives the encrypted data, obtaining the target encryption strategy from the data block; decrypting the encrypted data according to the target encryption strategy to obtain decrypted data; verifying the integrity of the decrypted data; if the verification passes, confirming successful data transmission; if the verification fails, sending a retransmission request to the first edge computing node.
[0018] By adopting the above technical solution, the encrypted data and target encryption policy are written into the blockchain data block to achieve secure transmission of the encryption policy. The target node performs decryption and integrity verification, and the retransmission mechanism ensures the reliability of data transmission, thus realizing end-to-end secure data transmission based on blockchain.
[0019] Secondly, this application provides a dynamic encryption system for energy data based on edge computing, the system comprising: a partitioning module, a construction module, an acquisition module, a first generation module, a combination module, and a second generation module; wherein,
[0020] The segmentation module is used to divide the terminal devices in the power grid into multiple device groups according to their geographical location, with each device group corresponding to an edge computing node; the construction module is used to construct a blockchain network based on the edge computing nodes; the acquisition module is used to acquire the data characteristics of data to be sent from a first edge computing node to a second edge computing node in the blockchain network, as well as the first network characteristics corresponding to the first edge computing node and the second network characteristics corresponding to the second edge computing node; the first generation module is used to generate a first encryption strategy based on the data characteristics; the combination module is used to combine the first network characteristics and the second network characteristics to adjust the first encryption strategy and generate a second encryption strategy; the second generation module is used to generate network load balancing parameters based on the load status of other edge computing nodes in the blockchain network, and adjust the second encryption strategy based on the network load balancing parameters to generate a target encryption strategy.
[0021] Thirdly, this application provides an electronic device that adopts the following technical solution: it includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to enable the electronic device to execute a computer program such as any of the above-mentioned edge computing-based dynamic encryption methods for energy data.
[0022] Fourthly, this application provides a computer-readable storage medium that employs the following technical solution: storing a computer program capable of being loaded by a processor and executing any of the above-mentioned edge computing-based dynamic encryption methods for energy data.
[0023] In summary, this application includes at least one of the following beneficial technical effects:
[0024] By grouping terminal devices into device clusters based on geographical location and assigning them to corresponding edge computing nodes, data transmission distance is reduced. Connecting these edge computing nodes through a blockchain network improves data transmission reliability. A first encryption strategy is generated based on data characteristics, and this strategy is optimized by incorporating network characteristics of the source and target nodes to generate a second encryption strategy, achieving adaptability of the encryption strategy to network conditions. Finally, network load balancing parameters are generated based on the load status of other nodes, and the second encryption strategy is adjusted accordingly to obtain the target encryption strategy, achieving dynamic adjustment of the encryption strategy according to network load. This multi-layered strategy optimization mechanism ensures efficient network resource utilization while reducing data transmission security. Attached Figure Description
[0025] Figure 1 This is a flowchart illustrating a dynamic encryption method for energy data based on edge computing, provided in an embodiment of this application.
[0026] Figure 2 This is a schematic diagram of the structure of an energy data dynamic encryption system based on edge computing provided in an embodiment of this application;
[0027] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0028] Explanation of reference numerals in the attached figures: 1000, electronic device; 1001, processor; 1002, communication bus; 1003, user interface; 1004, network interface; 1005, memory. Detailed Implementation
[0029] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0030] In the description of the embodiments in this application, words such as "illustrative," "for example," or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "illustrative," "for example," or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of words such as "illustrative," "for example," or "for example" is intended to present the relevant concepts in a specific manner.
[0031] Figure 1 This is a flowchart illustrating a dynamic encryption method for energy data based on edge computing, provided in an embodiment of this application. Figure 1 As shown, the method includes S101-S106:
[0032] S101 divides the terminal devices in the power grid into multiple device groups according to their geographical location, with each device group corresponding to an edge computing node.
[0033] In practice, equipment groups are divided based on the power grid coverage area. First, the geographical location information of all terminal devices in the power grid is obtained, including latitude and longitude coordinates, the area of their respective substations, and their power supply range. These terminal devices include, but are not limited to, smart meters, distribution terminals, power sensors, and electricity consumption data collectors.
[0034] Based on geographic location information, clustering algorithms (such as K-means clustering) are used to perform spatial clustering analysis on terminal devices. During the clustering process, factors such as physical distance between devices, network topology distance, and business relevance are comprehensively considered. Terminal devices that are geographically close, have convenient network communication, and are highly relevant to their business are grouped into the same device group. The size of each device group is dynamically adjusted according to regional device density and data traffic, typically controlled within the range of 50-200 terminal devices to ensure the service capacity and load balancing of edge computing nodes.
[0035] For each defined device group, an edge computing node is deployed at its geographical center or the optimal location in the network topology. This edge computing node serves as the data aggregation and processing center for all terminal devices within the group, responsible for data collection, storage, encryption processing, and forwarding. The edge computing node possesses sufficient computing power and storage capacity to support data encryption operations and temporary storage needs.
[0036] S102 builds a blockchain network based on edge computing nodes.
[0037] When building a blockchain network, each edge computing node is first assigned a unique node identifier and digital certificate to establish trust relationships between nodes. A consortium blockchain architecture is adopted, where edge computing nodes, as privileged nodes, have permissions for data writing, transaction verification, and block generation. The blockchain network employs a Practical Byzantine Fault-Tolerant (PBFT) consensus mechanism, which can tolerate failures or malicious behavior from no more than one-third of the nodes while ensuring high transaction processing speed.
[0038] In a blockchain network, each data block contains multiple data transaction records, including encrypted energy data, encryption policy information, and data transmission paths. Data blocks are linked by cryptographic hashes to form an immutable blockchain structure. To improve the processing efficiency of the blockchain network, sharding technology is used to divide the network into multiple sub-chains. Edge computing nodes in different geographical regions belong to different shards, and each shard can process data transactions in parallel.
[0039] A peer-to-peer communication network is established between edge computing nodes in the network for blockchain data synchronization and message passing during the consensus process. The nodes use the gossip protocol for data propagation to ensure eventual consistency of block data within the network. Simultaneously, smart contract functionality is implemented to automatically execute operations such as the selection, updating, and verification of data encryption strategies.
[0040] The purpose of building a blockchain network is to provide a decentralized trust foundation for energy data transmission. Through the immutability of blockchain, the traceability and integrity of data transmission are ensured; through smart contract mechanisms, the automated execution and management of encryption strategies are achieved; and through distributed storage, the system's fault tolerance and availability are improved.
[0041] S103, obtain the data characteristics of the data to be sent from the first edge computing node to the second edge computing node in the blockchain network, and the first network characteristics corresponding to the first edge computing node and the second network characteristics corresponding to the second edge computing node.
[0042] First, the data characteristics of the data to be sent by the first edge computing node are obtained. These characteristics include three dimensions: data type identifier, data sensitivity level, and data volume. The data type identifier distinguishes different types of energy data, such as real-time power load data, user electricity consumption information, and equipment operating status. The data sensitivity level reflects the confidentiality of the data and is divided into high, medium, and low levels, with high-sensitivity data including user privacy information and key equipment parameters. The data volume directly affects the resource consumption for data transmission and encryption processing.
[0043] Simultaneously, the system acquires first and second network characteristics through network probing and status monitoring. Network characteristics primarily include network latency, available bandwidth, and node security level. Network latency is measured by the round-trip time of probe packets between nodes; available bandwidth is obtained through active measurement and historical data analysis, reflecting the node's current data transmission capacity; and the node security level is determined by a comprehensive assessment of the node's security measures, historical security events, and current threat level.
[0044] To ensure the accuracy and timeliness of feature information, the system employs a combination of real-time monitoring and periodic updates. Network feature information is propagated through a state-sharing mechanism within the blockchain network. Each node maintains a network state table, recording the feature information of other nodes. When a significant change in the network state is detected, the relevant node triggers a state update broadcast.
[0045] S104, Generate the first encryption strategy based on the data characteristics.
[0046] First, the system extracts three key indicators from the data characteristics: data type identifier, data sensitivity level, and data volume. For the data type identifier, the system queries a pre-defined encryption algorithm library, which includes various symmetric encryption algorithms (such as AES and SM4) and asymmetric encryption algorithms (such as RSA and ECC). Recommended encryption algorithm options are preset for different types of energy data. For example, for real-time power load data, a fast symmetric encryption algorithm is preferred; while for transaction data requiring digital signatures, an asymmetric encryption algorithm is selected.
[0047] Based on the data sensitivity level, the system determines encryption strength parameters, including encryption key length, number of encryption rounds, and obfuscation parameters. The encryption key length directly affects encryption strength; for example, the AES algorithm can choose a 128-bit, 192-bit, or 256-bit key. The number of encryption rounds determines the complexity of the encryption process; a higher number of rounds provides stronger security. Obfuscation parameters are used to increase the randomness of the encrypted data, such as the initialization vector (IV) and salt. For highly sensitive data, the system will choose a longer key length, more encryption rounds, and a more complex obfuscation scheme.
[0048] Based on the data volume, the system employs an optimized design for block encryption. By adjusting the block size, a suitable block encryption sequence is generated, including the specific block size, number of blocks, and encryption order. Larger data blocks can improve processing efficiency but increase memory usage, while smaller data blocks are beneficial for parallel processing but incur additional overhead. The system selects the optimal block partitioning scheme based on empirical values and actual test results.
[0049] After determining the above parameters, the system integrates the basic encryption algorithm, encryption strength parameters, and block encryption sequence into a first encryption strategy. This strategy is presented as an encryption algorithm execution template, containing complete encryption initialization parameters and encryption operation sequences. The system will temporarily store this strategy in the blockchain network's state database, awaiting subsequent optimization and adjustment based on network characteristics.
[0050] Based on the above embodiments, as an optional implementation, in S104, generating the first encryption strategy according to the data characteristics specifically includes S41-S45:
[0051] S41, extract the data type identifier, data sensitivity level, and data volume from the data features.
[0052] First, the system extracts three core indicators from the data characteristics: data type identifiers are used to distinguish the business attributes of the data, such as user electricity consumption data being identified as "USER_POWER" and device status data being identified as "DEVICE_STATUS"; data sensitivity level is classified into three levels (high, medium, and low), where high sensitivity level includes user privacy information and key device parameters, medium sensitivity level includes general business data, and low sensitivity level includes publicly searchable data; data size is measured in bytes, which directly affects the subsequent block processing strategy.
[0053] S42, determine the basic encryption algorithm from the preset encryption algorithm library according to the data type identifier, wherein the basic encryption algorithm includes symmetric encryption algorithm and asymmetric encryption algorithm.
[0054] The system queries a pre-defined encryption algorithm library and selects an appropriate basic encryption algorithm based on the data type identifier. The library contains various mature encryption algorithms, including symmetric encryption algorithms such as AES-128, AES-256, and SM4, and asymmetric encryption algorithms such as RSA-2048 and ECC. For data with high real-time requirements (such as real-time load data), fast symmetric encryption algorithms are prioritized; for data requiring authentication (such as control commands), asymmetric encryption algorithms supporting digital signatures are selected. The algorithm selection process references a pre-established data type-algorithm mapping table, which is based on security requirements and performance test results.
[0055] S43. Determine the encryption strength parameters based on the data sensitivity level. The encryption strength parameters include encryption key length, number of encryption rounds, and obfuscation parameters.
[0056] Based on the data sensitivity level, the system sets corresponding encryption strength parameters. The encryption key length increases with the sensitivity level; for example, the AES algorithm uses a 128-bit key for low sensitivity and a 256-bit key for high sensitivity. The number of encryption rounds also increases with sensitivity; for example, low-sensitivity data uses the standard number of rounds, while high-sensitivity data uses 25% to 50% more encryption rounds. Obfuscation parameters include the initialization vector (IV), salt value, and padding scheme; high-sensitivity data uses a longer initialization vector and a more complex padding strategy.
[0057] S44, adjust the size of the encryption blocks according to the amount of data, and generate a block encryption sequence. The block encryption sequence includes the block size, the number of blocks, and the block encryption order.
[0058] Based on the data volume, a block encryption scheme is designed for the system. The optimal block size range is determined through performance testing, generally between 16KB and 1MB, with the specific value dynamically adjusted according to the data volume. The number of blocks is calculated based on the total data volume and the block size, while also considering the system's parallel processing capabilities. A priority strategy is adopted for the block encryption order, with critical data blocks being encrypted first, and the dependencies between data blocks are also taken into account.
[0059] S45 combines the basic encryption algorithm, encryption strength parameters, and block encryption sequence to generate the first encryption strategy.
[0060] Finally, the system integrates the basic encryption algorithm, encryption strength parameters, and block encryption sequences into a complete first encryption strategy. This strategy is stored in a standardized data structure, containing information such as algorithm identifiers, key parameters, round settings, obfuscation configurations, and block segmentation schemes. This structured strategy facilitates subsequent adjustments and optimizations based on network characteristics.
[0061] Based on the above embodiments, as an optional implementation, in S45, the generation of the first encryption strategy by combining the basic encryption algorithm, encryption strength parameters, and block encryption sequences specifically includes S451-S455:
[0062] S451, Based on the type of the basic encryption algorithm, construct an encryption algorithm execution template, which includes encryption initialization parameters and encryption operation sequence.
[0063] The system first constructs an encryption algorithm execution template based on the selected basic encryption algorithm type. The template structure differs for different types of encryption algorithms (symmetric / asymmetric). Encryption initialization parameters include the algorithm identifier, operating mode (e.g., ECB, CBC, CTR), key generation parameters, etc.; the encryption operation sequence defines the complete encryption process, including key expansion, data preprocessing, core encryption transformation, and post-processing steps. For example, for the AES algorithm, the template would include specific operation steps such as the key expansion process, round function structure, and final round processing.
[0064] S452 configures the encryption key length, encryption rounds, and obfuscation parameters in the encryption strength parameters into the encryption algorithm execution template, generating encryption algorithm configuration information.
[0065] The previously determined encryption strength parameters are configured into the execution template to form the specific encryption algorithm configuration information. The encryption key length determines the specific parameters of the key expansion process; the number of encryption rounds determines the number of iterations of the core encryption transformation; and obfuscation parameters are used to enhance the encryption effect, such as the generation method of the initialization vector and the selection of the padding strategy. The configuration process of these parameters is subject to legality verification to ensure that the parameter combination meets the algorithm's security requirements.
[0066] S453, determine the data block processing flow based on the block encryption sequence.
[0067] The system designs a specific data block processing flow based on the block encryption sequence. First, the original data is divided into blocks according to a predetermined block size, and each data block is assigned a unique identifier for tracking and management. Then, the system assesses current computing resources and parallel processing capabilities, dividing these data blocks into multiple processing batches. Each batch contains an appropriate number of data blocks to fully utilize the system's parallel processing capacity. For each processing batch, the system sets the execution priority between batches and the processing order of data blocks within a batch based on the previously determined block encryption order. For example, batches containing critical business data will be given a higher execution priority, while data blocks within a batch may be ordered according to data dependencies or importance.
[0068] S454, Based on the block encryption sequence, the data block processing flow is determined to include: dividing the data into blocks according to the block size; dividing the data blocks into multiple parallel processing batches according to the number of blocks; and determining the execution priority of each processing batch and the encryption order of the data blocks within each batch according to the block encryption order.
[0069] S455 combines the encryption algorithm configuration information and the data block processing flow to generate the first encryption strategy.
[0070] Ultimately, the system integrates the encryption algorithm configuration information and data block processing flow into a complete first encryption strategy. This strategy is stored in a structured format, containing both an algorithm configuration section and an execution flow section. The algorithm configuration section records all parameter settings for the encryption algorithm in detail, while the execution flow section describes information such as data block division, batch partitioning, and processing order. The strategy also includes necessary metadata, such as version information, timestamps, and strategy identifiers, facilitating subsequent management and tracking.
[0071] S105, combining the first network characteristics and the second network characteristics, adjust the first encryption strategy to generate a second encryption strategy.
[0072] The system first acquires the first network characteristics of the first edge computing node (including the first network latency, the first available bandwidth, and the first node security level) and the second network characteristics of the second edge computing node (including the second network latency, the second available bandwidth, and the second node security level). The network latency is obtained through periodic probe packet measurements, in milliseconds; the available bandwidth is obtained through network traffic monitoring, in Mbps; and the node security level is determined based on the node's security configuration, protection measures, and historical security events, and is divided into three levels: high, medium, and low.
[0073] The system calculates the end-to-end transmission latency based on the first and second network delays. This latency directly affects the real-time performance of data transmission. When the end-to-end transmission latency is high, the system adjusts the number of encryption rounds and the block size in the first encryption strategy accordingly. For example, in high-latency situations, the number of encryption rounds may be reduced to decrease processing time, while the block size may be increased to reduce the number of transmissions. In low-latency environments, a higher number of encryption rounds can be maintained to provide stronger security protection.
[0074] Based on the first and second available bandwidths, the system determines the actual network throughput. Network throughput determines the efficiency of data transmission, and the system optimizes the number of blocks and the encryption order in the block encryption sequence accordingly. When bandwidth is sufficient, the number of blocks processed in parallel can be increased; while when bandwidth is limited, the number of blocks needs to be reduced and the encryption order adjusted to ensure that critical data is transmitted first.
[0075] The system also assesses the risk value of the transmission path based on the security levels of the first and second nodes. When the calculated risk value of the transmission path exceeds a preset threshold, the system takes additional security measures. This includes adding a dynamic obfuscation layer to the first encryption strategy or switching the symmetric encryption algorithm to a more secure asymmetric encryption algorithm. The dynamic obfuscation layer may include techniques such as packet reordering and padding with random data to increase the unpredictability of data transmission.
[0076] Based on the above embodiments, as an optional implementation, in S105, adjusting the first encryption strategy by combining the first network features and the second network features to generate the second encryption strategy specifically includes S51-S55:
[0077] S51, obtain the first network latency, first available bandwidth and first node security level in the first network characteristics, and the second network latency, second available bandwidth and second node security level in the second network characteristics.
[0078] The system first extracts key indicators from the first and second network characteristics. The first and second network delays are measured in milliseconds using ICMP probe packets or TCP handshake time; the first and second available bandwidths are obtained through periodic bandwidth probing, in Mbps; the first and second node security levels are determined based on a comprehensive evaluation of the node's security configuration, protection measures, and historical security events, and are categorized into high, medium, and low levels.
[0079] S52, calculate the end-to-end transmission delay based on the first network delay and the second network delay, and adjust the number of encryption rounds and the block size in the first encryption strategy according to the end-to-end transmission delay.
[0080] The system obtains the end-to-end transmission latency by using the first and second network delays. This latency reflects the network transmission time required for data to travel from the source node to the target node. When the end-to-end transmission latency exceeds the first latency threshold (e.g., 100ms), the system reduces the number of encryption rounds in the first encryption strategy, for example, reducing the standard number of AES encryption rounds by 25%; when the latency is below the second latency threshold (e.g., 20ms), the system maintains or appropriately increases the number of encryption rounds. Simultaneously, the system dynamically adjusts the block size based on the latency value: increasing the block size in high-latency environments to reduce the number of transmissions, and decreasing the block size in low-latency environments to improve processing parallelism.
[0081] S53, determine the network throughput based on the first available bandwidth and the second available bandwidth, and optimize the number of blocks and the block encryption order in the block encryption sequence based on the network throughput.
[0082] The system calculates network throughput based on the first and second available bandwidths, and uses the "weakest link" principle to take the smaller of the two as the actual available bandwidth. Based on network throughput, the system optimizes the block encryption sequence: when throughput is sufficient (e.g., greater than 100Mbps), the number of blocks processed in parallel is increased, and a uniformly distributed block encryption order is adopted; when throughput is limited (e.g., less than 10Mbps), the number of blocks is reduced, and the encryption order is adjusted to a priority-oriented order to ensure that important data blocks are processed first.
[0083] S54. Based on the security level of the first node and the security level of the second node, assess the transmission path risk value. If the transmission path risk value exceeds a preset threshold, add a dynamic obfuscation layer to the first encryption strategy or switch the first encryption strategy to an asymmetric encryption algorithm.
[0084] S55, the adjusted first encryption strategy is used as the second encryption strategy.
[0085] The system comprehensively analyzes the security levels of the first and second nodes to obtain the transmission path risk value. The specific calculation method is as follows: assign high, medium, and low security levels values of 3, 2, and 1 respectively, and calculate the average of the two node security level values. This average value is the transmission path risk value. When the risk value exceeds a preset threshold (e.g., 2.5), the system takes additional security measures: either adding a dynamic obfuscation layer to the original encryption strategy, such as introducing packet reordering or random padding techniques; or switching the original symmetric encryption algorithm to a more secure asymmetric encryption algorithm, such as switching from AES to RSA.
[0086] S106. Based on the load status of other edge computing nodes in the blockchain network, generate network load balancing parameters, and adjust the second encryption strategy according to the network load balancing parameters to generate the target encryption strategy.
[0087] The system first collects load status information from other edge computing nodes in the blockchain network, including computing resource utilization, memory usage, and network bandwidth utilization. Computing resource utilization reflects the node's CPU usage and is obtained by monitoring processor load; memory usage indicates the node's storage resource consumption and is obtained through the memory management system; network bandwidth utilization indicates the node's data transmission burden and is obtained through network traffic statistics. This data is updated and shared periodically through the blockchain network's state synchronization mechanism.
[0088] Based on this raw load data, the system calculates three load indices: the resource load index reflects computing power utilization, the storage resource load index characterizes memory resource usage, and the bandwidth resource load index describes network transmission load levels. Each index is normalized to a standardized value between 0 and 1 for easier subsequent calculations. The system performs a weighted calculation on these three indices to generate a comprehensive load coefficient for each node, with the weights determined based on the actual application scenario and historical experience.
[0089] By analyzing the overall load coefficient of all nodes, the system calculates the load balance of the entire network, i.e., the network load balance parameter. This parameter mainly considers the mean and standard deviation of the overall load coefficient. The mean reflects the overall load level of the network, while the standard deviation indicates the degree of load distribution balance. A smaller standard deviation indicates a more balanced network load distribution, while a larger standard deviation indicates the existence of load imbalance.
[0090] Based on the calculated network load balancing parameters, the system adjusts the second encryption strategy accordingly. When the network load balancing parameters are not greater than the first preset threshold, it indicates that the overall network load is light. The system increases the number of blocks in the second encryption strategy and optimizes the block encryption order to improve parallel processing capability and resource utilization. When the parameters are not less than the second preset threshold, it indicates that the network load is heavy. The system reduces the number of blocks and decreases the number of encryption rounds to alleviate the processing burden. When the parameters are between the two thresholds, the second encryption strategy remains unchanged to maintain the current processing capacity.
[0091] After these adjustments, the system generates the final target encryption strategy. This strategy not only considers data and network characteristics but also fully adapts to the load conditions of the entire blockchain network, enabling optimized allocation of network resources while ensuring data security. The target encryption strategy will be used in the actual encrypted data transmission process and recorded and shared through the blockchain network to ensure the traceability and consistency of the encrypted transmission process.
[0092] Based on the above embodiments, as an optional implementation, in S106, the load status includes computing resource utilization, memory utilization, and network bandwidth utilization. The generation of network load balancing parameters based on the load status of other edge computing nodes in the blockchain network specifically includes S61-S64:
[0093] S61, generate resource load indices for other edge computing nodes based on computing resource utilization; generate storage resource load indices for other edge computing nodes based on memory utilization; generate bandwidth resource load indices for other edge computing nodes based on network bandwidth utilization.
[0094] The system first collects three types of basic load data from other edge computing nodes: computing resource utilization rate reflects CPU usage and is obtained by reading processor load data, with a value range of 0-100%; memory utilization rate represents memory resource usage and is obtained by monitoring the memory management system, with a value range of 0-100%; network bandwidth utilization rate describes data transmission burden and is calculated through network traffic statistics, with a value range of 0-100%.
[0095] S62 combines the resource load index, storage resource load index, and bandwidth resource load index to generate a comprehensive load coefficient for other edge computing nodes.
[0096] Based on this raw data, the system calculates three standardized load indices. The resource load index, obtained by dividing the computing resource utilization rate by 100, reflects the degree of utilization of the node's computing power; the storage resource load index, obtained by dividing the memory utilization rate by 100, represents the usage status of the node's storage resources; and the bandwidth resource load index, obtained by dividing the network bandwidth utilization rate by 100, reflects the load level of the node's network transmission. This standardization process maps all indices to the range of 0-1, facilitating subsequent calculations.
[0097] S63 generates network load balancing parameters that characterize the degree of load balancing in the blockchain network based on the mean and standard deviation of the comprehensive load coefficient.
[0098] The system uses a weighted calculation method to generate the overall load coefficient. The weights for computing resources are set to 0.4, storage resources to 0.3, and bandwidth resources to 0.3. The three load indices are multiplied by their corresponding weights and summed to obtain the overall load coefficient for each node. The weight values take into account the varying degrees of impact of different resources on system performance; computing resources, because they directly affect encryption processing speed, are given a higher weight.
[0099] S64 calculates the load parameters by weighting the computing resource load index, storage resource load index, and bandwidth resource load index.
[0100] Statistical analysis is performed on the overall load coefficient of all nodes to calculate the mean and standard deviation. The mean reflects the overall load level of the network, while the standard deviation indicates the dispersion of the load distribution. After normalizing the mean and standard deviation, the system generates network load balancing parameters through a weighted combination. A smaller standard deviation indicates a balanced network load distribution, while a larger standard deviation indicates the existence of load imbalance.
[0101] Based on the above embodiments, as an optional implementation, in S106, adjusting the second encryption strategy according to the network load balancing parameters to generate the target encryption strategy specifically includes S71-S74:
[0102] S71, when the network load balancing parameter is not greater than the first preset threshold, increase the number of blocks in the second encryption strategy and adjust the block encryption order.
[0103] The system first sets two key thresholds: the first preset threshold is set at 0.3, representing the standard for judging a light network load; the second preset threshold is set at 0.7, representing the standard for judging a heavy network load. These two thresholds divide the network load status into three intervals, each corresponding to a different strategy adjustment scheme. The threshold settings are based on actual operating experience and can be adjusted according to specific application scenarios.
[0104] When the network load balancing parameter is no greater than the first preset threshold of 0.3, it indicates that the overall network load is relatively light and resource utilization is low. In this case, the system increases the number of blocks in the second encryption strategy, for example, by increasing the original number of blocks by 50% to fully utilize idle resources; simultaneously, it adjusts the block encryption order, adopting a parallel processing method to allow multiple data blocks to be encrypted simultaneously. Specific adjustments include: increasing the number of parallel processing threads, optimizing the data block scheduling strategy, and adjusting the allocation method of the processing queue.
[0105] S72, when the network load balancing parameters are not less than the second preset threshold, reduce the number of blocks in the second encryption strategy and reduce the number of encryption rounds.
[0106] When the network load balancing parameter is not less than the second preset threshold of 0.7, it indicates that the overall network load is heavy and load reduction measures are needed. The system will reduce the number of blocks in the second encryption strategy, for example, reducing the number of blocks to 60% of the original number, to alleviate processing pressure; at the same time, it will reduce the number of encryption rounds, such as reducing the number of AES encryption rounds by 25%, to improve processing speed while ensuring basic security. These adjustments help alleviate network load pressure and ensure stable system operation.
[0107] S73, when the network load balancing parameter is greater than the first preset threshold and less than the second preset threshold, the encryption parameter in the second encryption strategy remains unchanged.
[0108] S74, the adjusted second encryption strategy is used as the target encryption strategy.
[0109] When the network load balancing parameter is between 0.3 and 0.7, it indicates that the network load is at a reasonable level. At this point, keeping the parameters of the second encryption strategy unchanged, including the number of blocks, the number of encryption rounds, and the processing order, maintains the current processing capacity and security level. This strategy stability helps the system maintain stable performance.
[0110] After the above adjustments, the system determined the optimized second encryption strategy as the target encryption strategy. This final encryption strategy considers both data security requirements and adapts to the current network load conditions, maintaining good performance under different load conditions. All parameter changes during the strategy adjustment process remained within preset security ranges, ensuring that the adjusted strategy still meets basic security requirements.
[0111] After adjusting the second encryption strategy to generate the target encryption strategy, the specific steps also include:
[0112] The data is encrypted according to the target encryption policy to obtain encrypted data; the encrypted data and the target encryption policy are written into a data block in the blockchain network; after the second edge computing node receives the encrypted data, it obtains the target encryption policy from the data block; the encrypted data is decrypted according to the target encryption policy to obtain decrypted data; the integrity of the decrypted data is verified. If the verification passes, the data transmission is confirmed to be successful; if the verification fails, a retransmission request is sent to the first edge computing node.
[0113] After generating the target encryption strategy, the system needs to execute the actual data encryption transmission and verification process. This process includes steps such as data encryption, blockchain storage, data decryption, and integrity verification to ensure that data can be securely and reliably transmitted from the first edge computing node to the second edge computing node.
[0114] Based on the generated target encryption policy, the system first encrypts the data to be transmitted at the first edge computing node. The encryption process strictly follows the parameters defined in the policy, including using the specified encryption algorithm, dividing the data into blocks according to the set block size, and performing encryption operations according to the prescribed number of encryption rounds, ultimately obtaining encrypted data. Simultaneously, the system calculates the hash value of the original data for subsequent integrity verification.
[0115] The system packages encrypted data and the target encryption policy into a blockchain transaction and writes it into a data block in the blockchain network. In addition to the encrypted data and encryption policy, the data block also includes metadata information such as data identifiers, timestamps, source node identifiers, and target node identifiers. This information is organized into a standard block structure, and the blockchain network's consensus mechanism ensures the immutability and traceability of the data.
[0116] When the second edge computing node receives encrypted data, it first extracts the target encryption policy from the corresponding data block. The system verifies the integrity and validity of the policy to ensure that the obtained policy parameters have not been tampered with. The decryption process is strictly executed according to the parameters specified in the target encryption policy, including using the same decryption algorithm, reassembling the data according to the same block size, and performing the corresponding decryption operations, ultimately obtaining the decrypted data.
[0117] The system verifies the integrity of the decrypted data. This verification process involves calculating the hash value of the decrypted data and comparing it to the hash value of the original data. If the two hash values match perfectly, it indicates that the data was not damaged or tampered with during transmission and decryption. The system confirms successful data transmission and records the success status in the blockchain network.
[0118] If the hash value comparison fails, it indicates that the data may have been corrupted or tampered with during transmission. In this case, the second edge computing node generates a retransmission request, which includes the identifier of the failed data block and error type information. The retransmission request is sent to the first edge computing node via the blockchain network, triggering the data retransmission mechanism. Upon receiving the retransmission request, the first edge computing node re-executes the encryption and transmission process until the data transmission is successful.
[0119] Based on the above method, this application also discloses a dynamic encryption system for energy data based on edge computing, such as... Figure 2 As shown, Figure 2 This is a schematic diagram of the structure of an energy data dynamic encryption system based on edge computing, provided in an embodiment of this application. The system includes: a partitioning module, a construction module, an acquisition module, a first generation module, a combination module, and a second generation module; wherein,
[0120] The system comprises the following modules: a partitioning module for dividing terminal devices in the power grid into multiple device groups based on their geographical location, with each device group corresponding to an edge computing node; a construction module for constructing a blockchain network based on the edge computing nodes; an acquisition module for acquiring data characteristics of data to be sent from a first edge computing node to a second edge computing node in the blockchain network, as well as first network characteristics corresponding to the first edge computing node and second network characteristics corresponding to the second edge computing node; a first generation module for generating a first encryption strategy based on the data characteristics; a combination module for adjusting the first encryption strategy by combining the first and second network characteristics to generate a second encryption strategy; and a second generation module for generating network load balancing parameters based on the load status of other edge computing nodes in the blockchain network, and adjusting the second encryption strategy based on the network load balancing parameters to generate a target encryption strategy.
[0121] It should be noted that the system provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0122] Please see Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 3 As shown, the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002.
[0123] The communication bus 1002 is used to realize the connection and communication between these components.
[0124] The user interface 1003 may include a display screen and a camera. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0125] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0126] The processor 1001 may include one or more processing cores. The processor 1001 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and by calling data stored in the memory 1005. Optionally, the processor 1001 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 1001 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 1001 and may be implemented as a separate chip.
[0127] The memory 1005 may include random access memory (RAM) or read-only memory. Optionally, the memory 1005 may include a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 3 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a dynamic encryption method for energy data based on edge computing.
[0128] exist Figure 3 In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain the user input data; while the processor 1001 can be used to call an application program stored in the memory 1005 that is a dynamic encryption method for energy data based on edge computing. When executed by one or more processors, the electronic device performs one or more of the methods described in the above embodiments.
[0129] An electronic device readable storage medium stores instructions that, when executed by one or more processors, cause the electronic device to perform one or more of the methods described in the above embodiments.
[0130] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0131] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0132] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some service interfaces; indirect couplings or communication connections between devices or units may be electrical or other forms.
[0133] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0134] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0135] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0136] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A dynamic encryption method for energy data based on edge computing, characterized in that, The method includes: dividing terminal devices in the power grid into multiple device groups according to geographical location, with each device group corresponding to an edge computing node; constructing a blockchain network based on the edge computing nodes; obtaining data features of data to be sent from a first edge computing node to a second edge computing node in the blockchain network, and a first network feature corresponding to the first edge computing node and a second network feature corresponding to the second edge computing node; generating a first encryption strategy based on the data features; including: extracting data type identifier, data sensitivity level, and data size from the data features; determining a basic encryption algorithm from a preset encryption algorithm library based on the data type identifier, wherein the basic encryption algorithm includes symmetric encryption algorithms and asymmetric encryption algorithms; determining encryption strength parameters based on the data sensitivity level, wherein the encryption strength parameters include encryption key length, number of encryption rounds, and obfuscation parameters; adjusting the encryption block size based on the data size to generate a block encryption sequence, wherein the block encryption... The sequence includes block size, number of blocks, and block encryption order. Combining the basic encryption algorithm, encryption strength parameters, and block encryption sequence, the first encryption strategy is generated, including: constructing an encryption algorithm execution template based on the type of the basic encryption algorithm, the encryption algorithm execution template including encryption initialization parameters and encryption operation sequence; configuring the encryption key length, encryption round number, and obfuscation parameters from the encryption strength parameters into the encryption algorithm execution template to generate encryption algorithm configuration information; determining the data block processing flow based on the block encryption sequence; determining the data block processing flow based on the block encryption sequence includes: dividing the data into blocks according to the block size; dividing the data blocks into multiple parallel processing batches according to the number of blocks; determining the execution priority of each processing batch and the encryption order of the data blocks within each batch according to the block encryption order; combining the encryption algorithm configuration information and the data block processing flow to generate the first encryption strategy. By combining the first network characteristics and the second network characteristics, the first encryption strategy is adjusted to generate a second encryption strategy; based on the load status of other edge computing nodes in the blockchain network, network load balancing parameters are generated, and based on the network load balancing parameters, the second encryption strategy is adjusted to generate a target encryption strategy.
2. The method according to claim 1, characterized in that, The step of adjusting the first encryption strategy by combining the first network features and the second network features to generate a second encryption strategy includes: obtaining the first network delay, the first available bandwidth, and the first node security level from the first network features, and the second network delay, the second available bandwidth, and the second node security level from the second network features; calculating the end-to-end transmission delay based on the first network delay and the second network delay, and adjusting the number of encryption rounds and the block size in the first encryption strategy based on the end-to-end transmission delay; determining the network throughput based on the first available bandwidth and the second available bandwidth, and optimizing the number of blocks and the block encryption order in the block encryption sequence based on the network throughput; evaluating the transmission path risk value based on the first node security level and the second node security level, and if the transmission path risk value exceeds a preset threshold, adding a dynamic obfuscation layer to the first encryption strategy or switching the first encryption strategy to an asymmetric encryption algorithm; and using the adjusted first encryption strategy as the second encryption strategy.
3. The method according to claim 1, characterized in that, The load status includes computing resource utilization, memory utilization, and network bandwidth utilization. Generating network load balancing parameters based on the load status of other edge computing nodes in the blockchain network includes: generating a resource load index for other edge computing nodes based on the computing resource utilization; generating a storage resource load index for other edge computing nodes based on the memory utilization; generating a bandwidth resource load index for other edge computing nodes based on the network bandwidth utilization; generating a comprehensive load coefficient for other edge computing nodes by combining the resource load index, the storage resource load index, and the bandwidth resource load index; generating network load balancing parameters characterizing the degree of load balancing in the blockchain network based on the mean and standard deviation of the comprehensive load coefficient; and weighting the computing resource load index, storage resource load index, and bandwidth resource load index to generate the load parameters.
4. The method according to claim 1, characterized in that, The step of adjusting the second encryption strategy according to the network load balancing parameters to generate a target encryption strategy includes: when the network load balancing parameters are not greater than a first preset threshold, increasing the number of blocks in the second encryption strategy and adjusting the block encryption order; when the network load balancing parameters are not less than a second preset threshold, decreasing the number of blocks in the second encryption strategy and reducing the number of encryption rounds; when the network load balancing parameters are greater than the first preset threshold and less than the second preset threshold, keeping the encryption parameters in the second encryption strategy unchanged; and using the adjusted second encryption strategy as the target encryption strategy.
5. The method according to claim 1, characterized in that, After adjusting the second encryption strategy to generate the target encryption strategy, the method further includes: encrypting the data according to the target encryption strategy to obtain encrypted data; writing the encrypted data and the target encryption strategy into a data block in the blockchain network; after the second edge computing node receives the encrypted data, retrieving the target encryption strategy from the data block; decrypting the encrypted data according to the target encryption strategy to obtain decrypted data; verifying the integrity of the decrypted data; if the verification passes, confirming successful data transmission; if the verification fails, sending a retransmission request to the first edge computing node.
6. A dynamic encryption system for energy data based on edge computing, characterized in that, The system includes: a partitioning module, a construction module, an acquisition module, a first generation module, a combination module, and a second generation module; wherein, the partitioning module is used to divide terminal devices in the power grid into multiple device groups according to geographical location, and each device group corresponds to an edge computing node; the construction module is used to construct a blockchain network based on the edge computing nodes; the acquisition module is used to acquire data features of data to be sent from the first edge computing node to the second edge computing node in the blockchain network, and a first network feature corresponding to the first edge computing node and a second network feature corresponding to the second edge computing node; the first generation module is used to generate a first encryption strategy based on the data features, including: extracting data type identifier, data sensitivity level, and data size from the data features; determining a basic encryption algorithm from a preset encryption algorithm library based on the data type identifier, wherein the basic encryption algorithm includes symmetric encryption algorithms and asymmetric encryption algorithms; determining encryption strength parameters based on the data sensitivity level, wherein the encryption strength parameters include encryption key length, encryption rounds, and obfuscation parameters; adjusting the encryption block size based on the data size to generate a block encryption sequence, wherein the block encryption sequence includes block size, number of blocks, and block encryption order; and combining the basic encryption algorithm... The method, encryption strength parameters, and block encryption sequence are used to generate the first encryption strategy, including: constructing an encryption algorithm execution template according to the type of the basic encryption algorithm, the encryption algorithm execution template including encryption initialization parameters and encryption operation sequence; configuring the encryption key length, the number of encryption rounds, and the obfuscation parameters in the encryption strength parameters into the encryption algorithm execution template to generate encryption algorithm configuration information; determining the data block processing flow according to the block encryption sequence; the determination of the data block processing flow according to the block encryption sequence includes: dividing the data into blocks according to the block size; dividing the data into blocks according to the number of blocks. The data is divided into multiple parallel processing batches; the execution priority of each processing batch and the encryption order of data blocks within each batch are determined according to the block encryption order; the encryption algorithm configuration information and the data block processing flow are combined to generate a first encryption strategy; the combination module is used to combine the first network characteristics and the second network characteristics to adjust the first encryption strategy and generate a second encryption strategy; the second generation module is used to generate network load balancing parameters according to the load status of other edge computing nodes in the blockchain network, and adjust the second encryption strategy according to the network load balancing parameters to generate a target encryption strategy.
7. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer program is stored that can be loaded by a processor and executed as described in any one of claims 1-5.