Energy data dynamic encryption method and system based on edge computing

By dividing terminal devices into device groups and building a blockchain network in an edge computing environment, dynamic encryption strategies are generated, which solves the problem of reduced data transmission security caused by fixed encryption strategies and realizes flexible adjustment of encryption strategies and efficient utilization of network resources.

CN120896748AActive Publication Date: 2025-11-04BEIJING SHENGXINNUO TECH CO LTD

Patent Information

Application Number
CN202511079207.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-02
Publication Date
2025-11-04
Estimated Expiration
2045-08-02

AI Technical Summary

Technical Problem

In existing edge computing-based energy data transmission solutions, fixed encryption strategies cannot be flexibly adjusted, resulting in reduced data transmission security.

Method used

By dividing terminal devices into device groups based on geographical location and assigning them to corresponding edge computing nodes, a blockchain network is constructed, dynamic encryption strategies are generated, and the strategies are optimized by combining data characteristics and network characteristics, and adjusted according to the load status to generate the target encryption strategy.

Benefits of technology

It enables the encryption strategy to adapt to network conditions and adjust flexibly, thereby improving the security of data transmission and the efficiency of resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120896748A_ABST
    Figure CN120896748A_ABST
Patent Text Reader

Abstract

The invention provides an energy data dynamic encryption method and system based on edge computing, and relates to the technical field of information security, and the method comprises the steps: dividing terminal equipment in a power grid into a plurality of equipment groups, and enabling each equipment group to correspond to an edge computing node; constructing a block chain network according to the edge computing nodes; acquiring data features of data to be sent to a second edge computing node by a first edge computing node, and network features of the first edge computing node and the second edge computing node; generating a first encryption strategy according to the data features; adjusting the first encryption strategy according to the network characteristics to generate a second encryption strategy; and generating a network load balancing parameter according to the load states of other edge computing nodes in the block chain network, and adjusting the second encryption strategy according to the network load balancing parameter to generate a target encryption strategy. The technical effect of the application is that the security of data transmission is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information security, in particular to an energy data dynamic encryption method and system based on edge computing. BACKGROUND

[0002] With the rapid development of modern power grids and the popularity of energy internet, the number of terminal devices in the power grid has shown explosive growth. These terminal devices have generated a large amount of energy data, and the efficient transmission and security protection of these data have become key problems to be solved. In particular, in the edge computing environment, how to dynamically encrypt energy data between different device groups to ensure the security and real-time performance of data transmission is an important challenge in the current technical field.

[0003] The prior art usually adopts a scheme combining edge computing and fixed encryption strategy to solve the above problems. By deploying computing nodes at the network edge, the data transmission distance is reduced and the processing efficiency is improved; at the same time, the transmission data is encrypted to ensure data security. However, the above scheme uses a fixed encryption strategy, which cannot realize flexible adjustment of the encryption strategy, thereby reducing the security of data transmission. SUMMARY

[0004] The present application provides an energy data dynamic encryption method and system based on edge computing, a device and a storage medium, which are used to improve the security of data transmission.

[0005] In a first aspect, the present application provides an energy data dynamic encryption method based on edge computing, the method comprising: dividing terminal devices in a power grid into a plurality of device groups according to geographical positions, each device group corresponding to an edge computing node; constructing a blockchain network according to the edge computing nodes; obtaining data characteristics of data to be sent by a first edge computing node in the blockchain network to a second edge computing node, and first network characteristics corresponding to the first edge computing node and second network characteristics corresponding to the second edge computing node; generating a first encryption strategy according to the data characteristics; adjusting the first encryption strategy in combination with the first network characteristics and the second network characteristics to generate a second encryption strategy; generating a network load balancing parameter according to the load state of other edge computing nodes in the blockchain network, and adjusting the second encryption strategy according to the network load balancing parameter to generate a target encryption strategy.

[0006] By adopting the technical scheme, the terminal device is divided into a device group according to a geographical position and corresponds to an edge computing node, so that the data transmission distance is reduced; the edge computing nodes are connected through a blockchain network, so that the data transmission credibility is improved; a first encryption strategy is generated based on data features, and the strategy is optimized in combination with network features of a source node and a target node to generate a second encryption strategy, so that the adaptability of the encryption strategy to network conditions is realized; finally, network load balancing parameters are generated according to load states of other nodes, the second encryption strategy is adjusted according to the network load balancing parameters to obtain a target encryption strategy, so that the dynamic adjustment of the encryption strategy according to the network load is realized. The multi-level strategy optimization mechanism not only guarantees the network resource utilization efficiency, but also reduces the data transmission security.

[0007] Optionally, the first encryption strategy is generated according to the data features, including: extracting a data type identifier, a data sensitivity level and a data volume size in the data features; determining a basic encryption algorithm from a preset encryption algorithm library according to the data type identifier, wherein the basic encryption algorithm includes a symmetric encryption algorithm and an asymmetric encryption algorithm; determining an encryption strength parameter according to the data sensitivity level, wherein the encryption strength parameter includes an encryption key length, an encryption round number and a confusion parameter; adjusting an encryption block size according to the data volume size to generate a block encryption sequence, wherein the block encryption sequence includes a block size, a block number and a block encryption order; and generating the first encryption strategy in combination with the basic encryption algorithm, the encryption strength parameter and the block encryption sequence.

[0008] By adopting the technical scheme, the data type identifier, the data sensitivity level and the data volume size are extracted from the data features, so that comprehensive analysis of data attributes is realized; a suitable basic encryption algorithm is selected according to the data type identifier, so that the matching degree of the encryption mode and the data features is guaranteed; the encryption strength parameter including the key length, the encryption round number and the confusion parameter is determined according to the data sensitivity level, so that the adaptability of the encryption strength to the data security requirement is ensured; the encryption block parameter is adjusted based on the data volume size to generate the block encryption sequence including the block size, the number and the order, so that the encryption processing efficiency is improved; finally, these elements are integrated to generate the first encryption strategy, so that the encryption strategy is accurately adapted to the data features, the encryption performance is optimized while the security is guaranteed.

[0009] Optionally, the combining the base encryption algorithm, the encryption strength parameter and the block encryption sequence to generate the first encryption strategy comprises: constructing an encryption algorithm execution template according to the type of the base encryption algorithm, the encryption algorithm execution template comprising encryption initialization parameters and an encryption operation sequence; configuring the encryption key length, the encryption round number and the confusion parameter in the encryption strength parameter into the encryption algorithm execution template to generate encryption algorithm configuration information; determining a data block processing flow according to the block encryption sequence; the determining the data block processing flow according to the block encryption sequence comprises: dividing data into blocks according to the block size; dividing the data blocks into multiple parallel processing batches according to the block quantity; determining the execution priority of each processing batch and the encryption sequence of the data blocks in each batch according to the block encryption sequence; and combining the encryption algorithm configuration information and the data block processing flow to generate the first encryption strategy.

[0010] By adopting the technical scheme, the algorithm execution template comprising initialization parameters and an operation sequence is constructed, the encryption strength parameter is configured into the template to generate algorithm configuration information, and the data processing flow comprising parallel processing batches and priorities is designed in combination with the block encryption sequence, so that a structured first encryption strategy is finally generated, and the standardized execution of the encryption process and the parallel processing optimization are realized.

[0011] Optionally, the combining the first network feature and the second network feature to adjust the first encryption strategy to generate a second encryption strategy comprises: obtaining a first network delay, a first available bandwidth and a first node security level in the first network feature, and a second network delay, a second available bandwidth and a second node security level in the second network feature; calculating an end-to-end transmission delay according to the first network delay and the second network delay, and adjusting the encryption round number and the block size in the first encryption strategy according to the end-to-end transmission delay; determining a network throughput according to the first available bandwidth and the second available bandwidth, and optimizing the block quantity and the block encryption sequence in the block encryption sequence according to the network throughput; evaluating a transmission path risk value according to 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 confusion layer in the first encryption strategy or switching the first encryption strategy to an asymmetric encryption algorithm; and taking the adjusted first encryption strategy as the second encryption strategy.

[0012] By adopting the technical scheme, the network delay, available bandwidth and security level of the source node and the target node are analyzed, the end-to-end transmission delay and the network throughput are calculated, the encryption parameter and the block strategy are adjusted accordingly, the security measures are dynamically adjusted according to the transmission path risk value, the second encryption strategy adapting to the network condition is generated, and the adaptive optimization of the encryption strategy to the network environment is realized.

[0013] Optionally, the load state includes a computing resource occupation rate, a memory usage rate and a network bandwidth utilization rate, and the network load balancing parameter is generated according to the load state of the other edge computing nodes in the blockchain network, including: generating a resource load index of the other edge computing nodes according to the computing resource occupation rate; generating a storage resource load index of the other edge computing nodes according to the memory usage rate; generating a bandwidth resource load index of the other edge computing nodes according to the network bandwidth utilization rate; combining the resource load index, the storage resource load index and the bandwidth resource load index to generate a comprehensive load coefficient of the other edge computing nodes; generating a network load balancing parameter representing the load balancing degree of the blockchain network according to the mean and standard deviation of the comprehensive load coefficient; and performing weighted calculation on the computing resource load index, the storage resource load index and the bandwidth resource load index to generate a load parameter.

[0014] By adopting the technical scheme, the use of computing resources, memory and bandwidth of the other edge computing nodes is analyzed, resource load indexes of various types are generated and a load coefficient is calculated comprehensively, the network load balancing parameter is generated based on the statistical characteristics of the load coefficient, and the overall load state of the blockchain network is quantitatively evaluated, thereby providing a reliable basis for optimization of the encryption strategy.

[0015] Optionally, the second encryption strategy is adjusted according to the network load balancing parameter to generate a target encryption strategy, including: when the network load balancing parameter is not greater than a first preset threshold, the number of blocks in the second encryption strategy is increased and the block encryption order is adjusted; when the network load balancing parameter is not less than a second preset threshold, the number of blocks in the second encryption strategy is reduced and the number of encryption rounds is reduced; when the network load balancing parameter is greater than the first preset threshold and less than the second preset threshold, the encryption parameters in the second encryption strategy remain unchanged; and the adjusted second encryption strategy is taken as the target encryption strategy.

[0016] By adopting the technical scheme, the threshold interval of the load balancing parameter is set, 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 reduced when the load is heavy, and the strategy remains stable when the load is moderate, and finally the target encryption strategy is generated, thereby realizing dynamic response and optimization adjustment of the encryption strategy to the network load state.

[0017] Optionally, after the adjusting the second encryption strategy to generate a target encryption strategy, the method further comprises: performing encryption processing on 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; performing decryption processing on the encrypted data according to the target encryption strategy to obtain decrypted data; verifying the integrity of the decrypted data, and if the verification is passed, confirming that the data transmission is successful; and if the verification fails, sending a retransmission request to the first edge computing node.

[0018] By using the above technical solution, the encrypted data and the target encryption strategy are written into the blockchain data block, the secure transmission of the encryption strategy is realized, and the decryption and integrity verification are performed at the target node, which cooperates with the retransmission mechanism to ensure the reliability of the data transmission, and the end-to-end secure data transmission based on the blockchain is realized.

[0019] In a second aspect, the present application provides an energy data dynamic encryption system based on edge computing, which comprises a division module, a construction module, an acquisition module, a first generation module, a combination module and a second generation module, wherein The division module is configured to divide terminal devices in a power grid into a plurality of device groups according to geographical positions, and each device group corresponds to an edge computing node; the construction module is configured to construct a blockchain network according to the edge computing nodes; the acquisition module is configured to acquire data features of data to be sent by a first edge computing node in the blockchain network to a second edge computing node, 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 configured to generate a first encryption strategy according to the data features; the combination module is configured to adjust the first encryption strategy to generate a second encryption strategy by combining the first network feature and the second network feature; and the second generation module is configured to generate network load balancing parameters according to load states of other edge computing nodes in the blockchain network, and adjust the second encryption strategy to generate a target encryption strategy according to the network load balancing parameters.

[0020] In a third aspect, the present application provides an electronic device, which adopts the following technical solution: comprising a processor, a memory, a user interface and a network interface, the memory is configured to store instructions, the user interface and the network interface are configured to communicate with other devices, and the processor is configured to execute the instructions stored in the memory to enable the electronic device to execute the computer program of any of the above energy data dynamic encryption methods based on edge computing.

[0021] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program capable of being loaded by a processor and executing any of the above energy data dynamic encryption methods based on edge computing.

[0022] In summary, the present application includes at least one of the following beneficial technical effects: By dividing the terminal devices into device groups according to geographical location and corresponding edge computing nodes, the data transmission distance is reduced; by constructing a blockchain network to connect the edge computing nodes, the data transmission credibility is improved; based on the data characteristics, a first encryption strategy is generated, and the strategy is optimized in combination with the network characteristics of the source node and the target node to generate a second encryption strategy, realizing the adaptability of the encryption strategy to the network condition; finally, the network load balancing parameters are generated according to the load state of other nodes, and the second encryption strategy is adjusted according to the network load balancing parameters to obtain a target encryption strategy, realizing the dynamic adjustment of the encryption strategy according to the network load. This multi-level strategy optimization mechanism not only guarantees the network resource utilization efficiency, but also reduces the security of data transmission. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 is a flowchart of an energy data dynamic encryption method based on edge computing provided by an embodiment of the present application; Figure 2 is a structural diagram of an energy data dynamic encryption system based on edge computing provided by an embodiment of the present application; Figure 3 is a structural diagram of an electronic device provided by an embodiment of the present application.

[0024] Marked with reference numerals: 1000, electronic device; 1001, processor; 1002, communication bus; 1003, user interface; 1004, network interface; 1005, memory. DETAILED DESCRIPTION

[0025] In order for those skilled in the art to better understand the technical solutions in the present specification, the technical solutions in the present specification will be described in the following clearly and completely with reference to the drawings in the embodiments of the present specification. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments.

[0026] In the description of the embodiments of the present application, the words "exemplary", "for example", or "for instance" are used to mean serving as an example, instance, or illustration. Any embodiment or design solution described as "exemplary", "for example", or "for instance" in the embodiments of the present application should not be interpreted as being more preferred or having more advantages than other embodiments or design solutions. Rather, the words "exemplary", "for example", or "for instance" are used in the sense of presenting a specific example, instance, or illustration.

[0027] Figure 1 is a flow diagram of an energy data dynamic encryption method based on edge computing provided by an embodiment of the present application. As shown in the figure, the method comprises S101-S106: Figure 1 S101, the terminal devices in the power grid are divided into a plurality of device groups according to geographical location, and each device group corresponds to an edge computing node.

[0028] In specific implementation, the device group is 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 the substation to which the terminal device belongs, and the power supply range, etc. These terminal devices include, but are not limited to, smart meters, power distribution terminals, power sensors, power information collectors, and other power equipment.

[0029] Based on the geographical location information, a clustering algorithm (such as K-means clustering) is used to perform spatial clustering analysis on the terminal devices. In the clustering process, factors such as physical distance between devices, network topology distance, and business correlation degree are considered comprehensively, and terminal devices with similar geographical location, convenient network communication, and high business relevance are divided into the same device group. The size of each device group is dynamically adjusted according to the regional device density, data traffic, etc., and is usually controlled within the range of 50-200 terminal devices, to ensure the service capability and load balancing of the edge computing node.

[0030] For each divided device group, an edge computing node is deployed at its geographical center or the optimal position of network topology. The edge computing node serves as the data aggregation and processing center of all terminal devices in the group, responsible for functions such as device data collection, storage, encryption processing, and forwarding. The edge computing node has certain computing power and storage capacity, which can support data encryption operations and temporary storage needs.

[0031] S102, according to the edge computing node, a blockchain network is constructed.

[0032] When constructing the blockchain network, first, each edge computing node is assigned a unique node identifier and digital certificate, and a trust relationship between nodes is established. The alliance chain architecture is adopted, in which the edge computing nodes are privileged nodes with the right to write data, verify transactions, and generate blocks. The blockchain network adopts a practical Byzantine fault tolerance (PBFT) consensus mechanism, which can tolerate no more than 1 / 3 of the nodes to fail or behave maliciously while ensuring high transaction processing speed.

[0033] ​In the blockchain network, each data block contains multiple data transaction records, including encrypted energy data, encryption policy information, data transmission path, etc. The data blocks are linked through cryptographic hash, forming an immutable blockchain structure. To improve the processing efficiency of the blockchain network, a sharding technology is used to divide the network into multiple sub-chains, and edge computing nodes in different geographical regions belong to different shards, which can process data transactions in parallel.

[0034] A point-to-point communication network is established between edge computing nodes in the network for synchronization and consensus of blockchain data and message transmission. Nodes use gossip protocol for data propagation to ensure eventual consistency of block data in the network. At the same time, the smart contract function is implemented to automatically execute data encryption policy selection, update and verification, etc.

[0035] The purpose of building a blockchain network is to provide a decentralized trust foundation for energy data transmission. Through the immutable nature of the blockchain, the traceability and integrity of the data transmission process are ensured; through the smart contract mechanism, the automatic execution and management of encryption policies are realized; through distributed storage, the fault tolerance and availability of the system are improved.

[0036] S103, obtaining the data characteristics of the data to be sent by 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.

[0037] First, the data characteristics of the data to be sent by the first edge computing node are obtained. The data characteristics include three dimensions of data type identification, data sensitivity level and data size. The data type identification is used to distinguish different types of energy data, such as real-time power load data, user electricity information, device operating status, etc.; the data sensitivity level reflects the confidentiality of the data, which is divided into high, medium and low levels, among which high sensitivity data includes user privacy information and key device parameters, etc.; the data size directly affects the resource consumption of data transmission and encryption processing.

[0038] At the same time, the system obtains the first network characteristics and the second network characteristics through network detection and state monitoring. The network characteristics mainly include network delay, available bandwidth and node security level. Among them, the network delay is measured by the round-trip time of the probe packet between nodes; the available bandwidth is obtained through active measurement and historical data analysis, reflecting the current data transmission capacity of the node; the node security level is evaluated according to the node security protection measures, historical security events and current threat level.

[0039] To ensure the accuracy and timeliness of the feature information, the system adopts a combination of real-time monitoring and regular updating. Network feature information is propagated through the state sharing mechanism in the blockchain network, and each node maintains a network state table recording the feature information of other nodes. When a significant change in network state is detected, the relevant node will trigger a state update broadcast.

[0040] S104, according to the data characteristics, generate the first encryption strategy.

[0041] First, the system extracts three key indicators from the data characteristics: data type identification, data sensitivity level, and data size. For data type identification, the system queries a pre-set encryption algorithm library, which contains various symmetric encryption algorithms (such as AES, SM4, etc.) and asymmetric encryption algorithms (such as RSA, ECC, etc.), and pre-sets recommended encryption algorithm options for different types of energy data. For example, for power load data with high real-time requirements, symmetric encryption algorithms with fast operation speed are preferred; for transaction data requiring digital signatures, asymmetric encryption algorithms are selected.

[0042] According to the data sensitivity level, the system determines the encryption strength parameters, including encryption key length, encryption round number, and confusion parameter. Encryption key length directly affects encryption strength, such as AES algorithm can select 128-bit, 192-bit or 256-bit key; encryption round number determines the complexity of the encryption process, higher encryption round number provides stronger security; confusion parameter is used to increase the randomness of encrypted data, such as initialization vector (IV) and salt value (Salt). For high sensitivity data, the system will select longer key length, more encryption rounds and more complex confusion scheme.

[0043] Based on the data size, the system designs the optimization of block encryption. By adjusting the block size, the appropriate block encryption sequence is generated, including the specific block size, block number and block encryption order. Larger data blocks can improve processing efficiency but increase memory usage, smaller data blocks are beneficial to parallel processing but increase additional overhead. The system will select the optimal block scheme based on empirical values and actual test results.

[0044] After determining the above parameters, the system integrates the basic encryption algorithm, encryption strength parameters and block encryption sequence into the first encryption strategy. The strategy is presented in the form of an encryption algorithm execution template, containing complete encryption initialization parameters and encryption operation sequence. The system will temporarily store the strategy in the state database of the blockchain network, waiting for subsequent optimization and adjustment according to the network characteristics.

[0045] On the basis of the above embodiments, as an optional implementation, in S104, according to the data characteristics, generating the first encryption strategy specifically includes S41-S45: S41, extract the data type identifier, data sensitivity level, and data volume from the data features.

[0046] 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.

[0047] 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.

[0048] 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.

[0049] 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.

[0050] 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.

[0051] 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.

[0052] Based on the data size, the system designs a block encryption scheme. Through performance testing, the optimal block size range is determined, generally between 16KB and 1MB, and the specific value is dynamically adjusted according to the data size; the number of blocks is calculated according to the total data size and the block size, while considering the parallel processing capability of the system; the block encryption order adopts a priority strategy, with critical data blocks being encrypted first, and the dependency between data blocks is also considered.

[0053] S45, in combination with the basic encryption algorithm, the encryption strength parameter and the block encryption sequence, generates a first encryption strategy.

[0054] Finally, the system integrates the basic encryption algorithm, the encryption strength parameter and the block encryption sequence into a complete first encryption strategy. The strategy is stored in a standardized data structure, containing information such as algorithm identifier, key parameter, round setting, confusion configuration and block scheme. This structured strategy facilitates subsequent adjustment and optimization according to network characteristics.

[0055] Based on the above embodiment, as an optional implementation, in S45, in combination with the basic encryption algorithm, the encryption strength parameter and the block encryption sequence, generating a first encryption strategy specifically includes S451-S455: S451, according to the type of the basic encryption algorithm, constructing an encryption algorithm execution template, the encryption algorithm execution template including encryption initialization parameters and encryption operation sequence.

[0056] The system first constructs an encryption algorithm execution template according to the selected basic encryption algorithm type. For different types of encryption algorithms (symmetric / asymmetric), the template structure differs. Encryption initialization parameters include algorithm identifier, working mode (such as ECB, CBC, CTR, etc.), 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, etc. For example, for the AES algorithm, the template will contain specific operation steps such as key expansion process, round function structure and final round processing.

[0057] S452 configures the encryption key length, encryption round and confusion parameter in the encryption strength parameter into the encryption algorithm execution template to generate encryption algorithm configuration information.

[0058] The encryption strength parameters determined previously are configured into the execution template to form specific encryption algorithm configuration information. The encryption key length determines the specific parameters of the key expansion process; the encryption round determines the iteration number of the core encryption transformation; the confusion parameter is used to enhance the encryption effect, such as the generation method of the initialization vector, the selection of the padding strategy, etc. The configuration process of these parameters will be verified for legality to ensure that the parameter combination meets the algorithm security requirements.

[0059] S453, determine the data block processing flow according to the block encryption sequence.

[0060] The system designs a specific data block processing flow according to the block encryption sequence. First, the original data is divided into blocks according to the determined block size, and each data block is attached with a unique identifier for tracking and management. Then, the system evaluates the current computing resources and parallel processing capabilities, and divides these data blocks into multiple processing batches, each containing an appropriate amount of data blocks to fully utilize the parallel processing capabilities of the system. For each processing batch, the system sets the execution priority between batches and the processing order of data blocks within the batch according to the previously determined block encryption sequence. For example, batches containing critical business data will be assigned a higher execution priority, while data blocks within the batch may be sorted according to data dependency or importance.

[0061] S454, 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 data blocks within each batch according to the block encryption sequence.

[0062] S455, combine the encryption algorithm configuration information and the data block processing flow to generate a first encryption strategy.

[0063] Finally, the system integrates the encryption algorithm configuration information and the data block processing flow into a complete first encryption strategy. This strategy is stored in a structured format, containing algorithm configuration part and execution flow part. The algorithm configuration part records all parameter settings of the encryption algorithm in detail, and the execution flow part describes the data block, batch division and processing order, etc. The strategy also contains necessary metadata such as version information, timestamp and strategy identifier, etc., for subsequent management and tracking.

[0064] S105, adjust the first encryption strategy in combination with the first network feature and the second network feature to generate a second encryption strategy.

[0065] The system first obtains the first network feature (including the first network delay, the first available bandwidth and the first node security level) of the first edge computing node and the second network feature (including the second network delay, the second available bandwidth and the second node security level) of the second edge computing node. Network delay is obtained by periodic probe packet measurement, in milliseconds; available bandwidth is obtained by network traffic monitoring, in Mbps; node security level is evaluated based on node security configuration, protection measures and historical security events, divided into high, medium and low three levels.

[0066] The system calculates the end-to-end transmission delay based on the first network delay and the second network delay, which directly affects the real-time performance of data transmission. When the end-to-end transmission delay is high, the system adjusts the encryption rounds and block size in the first encryption strategy accordingly. For example, in a high-delay situation, the encryption rounds may be reduced to reduce processing time, while the block size is increased to reduce the number of transmissions. In a low-delay environment, a higher encryption round can be maintained to provide stronger security protection.

[0067] Based on the first available bandwidth and the second available bandwidth, 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. In the case of sufficient bandwidth, the number of blocks processed in parallel can be increased; while in the case of limited bandwidth, the number of blocks needs to be reduced and the encryption order needs to be adjusted to ensure that critical data is transmitted first.

[0068] The system also evaluates the risk value of the transmission path based on the first node security level and the second node security level. When the calculated transmission path risk value exceeds the preset threshold, the system takes additional security measures. This includes adding a dynamic confusion layer in the first encryption strategy, or switching the symmetric encryption algorithm to a higher-security asymmetric encryption algorithm. The dynamic confusion layer can include packet reordering, filling random data, and other techniques to increase the unpredictability of data transmission.

[0069] Based on the above embodiments, as an optional implementation, in S105, the first encryption strategy is adjusted based on the first network characteristics and the second network characteristics to generate a second encryption strategy, which specifically includes S51-S55: S51, obtaining the first network delay, the first available bandwidth and the first node security level in the first network characteristics, and the second network delay, the second available bandwidth and the second node security level in the second network characteristics.

[0070] The system first extracts key indicators from the first network characteristics and the second network characteristics. The first network delay and the second network delay are measured by ICMP probe packets or TCP handshake time, with a unit of milliseconds; the first available bandwidth and the second available bandwidth are obtained by periodic bandwidth detection, with a unit of Mbps; the first node security level and the second node security level are evaluated based on the security configuration, protection measures and historical security events of the node, and are divided into three levels: high, medium and low.

[0071] S52, calculating the end-to-end transmission delay based on the first network delay and the second network delay, and adjusting the encryption rounds and block size in the first encryption strategy based on the end-to-end transmission delay.

[0072] The system obtains an end-to-end transmission delay through the first network delay and the second network delay. The delay reflects the network transmission time required for data to be transmitted from the source node to the target node. When the end-to-end transmission delay exceeds a first delay threshold (e.g., 100 ms), the system reduces the encryption rounds in the first encryption strategy, for example, reduces the standard number of encryption rounds of AES encryption by 25%; when the delay is lower than a second delay threshold (e.g., 20 ms), the encryption rounds are maintained or appropriately increased. At the same time, the system dynamically adjusts the block size according to the delay value: in a high-delay environment, the block size is increased to reduce the number of transmissions, and in a low-delay environment, the block size is reduced to improve the parallelism of processing.

[0073] S53, according to the first available bandwidth and the second available bandwidth, determine the network throughput, and optimize the block quantity and block encryption order in the block encryption sequence according to the network throughput.

[0074] The system calculates the network throughput according to the first available bandwidth and the second available bandwidth, and takes the smaller value of the two as the actual available bandwidth using the principle of the shortest stick. Based on the network throughput, the system optimizes the block encryption sequence: when the throughput is sufficient (e.g., greater than 100 Mbps), the number of blocks for parallel processing is increased, and a uniformly distributed block encryption order is adopted; when the throughput is limited (e.g., less than 10 Mbps), the number of blocks is reduced and the encryption order is adjusted to be priority-oriented, ensuring that important data blocks are processed first.

[0075] S54, according to the first node security level and the second node security level, evaluate the transmission path risk value, if the transmission path risk value exceeds a preset threshold, increase the dynamic confusion layer in the first encryption strategy or switch the first encryption strategy to an asymmetric encryption algorithm.

[0076] S55, take the adjusted first encryption strategy as the second encryption strategy.

[0077] The system analyzes the first node security level and the second node security level comprehensively to obtain the transmission path risk value. The specific calculation method is: the high, medium and low security levels are respectively assigned as 3, 2 and 1, and the average value of the security level values of the two nodes is calculated, which 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 increases a dynamic confusion layer based on the original encryption strategy, such as introducing packet reordering, random padding, etc.; or switches the original symmetric encryption algorithm to a more secure asymmetric encryption algorithm, such as switching from AES to RSA.

[0078] S106, according to the load state of other edge computing nodes in the blockchain network, generate a network load balancing parameter, and adjust the second encryption strategy according to the network load balancing parameter to generate a target encryption strategy.

[0079] The system first collects the load status information of other edge computing nodes in the blockchain network, including the computing resource occupancy rate, memory usage rate, and network bandwidth utilization rate. The computing resource occupancy rate reflects the CPU usage of the node, which is obtained by monitoring the processor load; the memory usage rate represents the occupancy degree of the node's storage resources, which is obtained through the memory management system; and the network bandwidth utilization rate indicates the data transmission burden of the node, which is obtained through network traffic statistics. These data are updated and shared regularly through the state synchronization mechanism of the blockchain network.

[0080] Based on these raw load data, the system calculates three load indices respectively: the resource load index reflects the computing capacity occupancy, the storage resource load index represents the memory resource usage, and the bandwidth resource load index describes the network transmission load level. Each index is converted to a standardized value between 0 and 1 through normalization processing, facilitating subsequent calculations. The system calculates the comprehensive load coefficient of each node by weighting the three indices, and the weight values are determined according to actual application scenarios and historical experience.

[0081] By analyzing the comprehensive load coefficients of all nodes, the system calculates the load balancing degree of the entire network, i.e., the network load balancing parameter. This parameter mainly considers the mean and standard deviation of the comprehensive load coefficient. The mean reflects the overall network load level, and the standard deviation represents the balance degree of the load distribution. A smaller standard deviation indicates a more balanced network load distribution, while a larger standard deviation indicates an unbalanced load.

[0082] According to the calculated network load balancing parameter, the system adjusts the second encryption strategy accordingly. When the network load balancing parameter is not greater than the first preset threshold, it indicates that the overall network load is light, and the system will increase the number of blocks in the second encryption strategy and optimize the block encryption order to improve parallel processing capability and resource utilization. When the parameter is not less than the second preset threshold, it indicates that the network load is heavy, and the system will reduce the number of blocks and the number of encryption rounds to reduce the processing burden. When the parameter is between the two thresholds, the second encryption strategy remains unchanged, maintaining the current processing capability.

[0083] After these adjustments, the system generates the final target encryption strategy. This strategy not only considers data characteristics and network characteristics, but also fully adapts to the load status of the entire blockchain network, enabling optimal configuration of network resources while ensuring data security. The target encryption strategy will be used in the actual data encryption transmission process and recorded and shared through the blockchain network, ensuring the traceability and consistency of the encryption transmission process.

[0084] On the basis of the above embodiments, as an optional implementation, in S106, the load state includes a computing resource occupancy rate, a memory usage rate and a network bandwidth utilization rate, and the network load balancing parameter is generated according to the load state of other edge computing nodes in the blockchain network, and specifically includes S61-S64: S61, according to the computing resource occupancy rate, a resource load index of other edge computing nodes is generated; according to the memory usage rate, a storage resource load index of other edge computing nodes is generated; and according to the network bandwidth utilization rate, a bandwidth resource load index of other edge computing nodes is generated.

[0085] The system first collects three types of basic load data from other edge computing nodes: the computing resource occupancy rate reflects the CPU usage, which is obtained by reading the processor load data, and the value range is 0-100%; the memory usage rate indicates the memory resource occupancy, which is obtained by monitoring the memory management system, and the value range is 0-100%; and the network bandwidth utilization rate describes the data transmission burden, which is calculated by network traffic statistics, and the value range is 0-100%.

[0086] S62, the comprehensive load coefficient of other edge computing nodes is generated by combining the resource load index, the storage resource load index and the bandwidth resource load index.

[0087] Based on these raw data, the system calculates three standardized load indexes. The resource load index is obtained by dividing the computing resource occupancy rate by 100, reflecting the occupancy degree of the node computing capacity; the storage resource load index is obtained by dividing the memory usage rate by 100, indicating the use of the node storage resource; and the bandwidth resource load index is obtained by dividing the network bandwidth utilization rate by 100, reflecting the load level of the node network transmission. This standardization process maps all indexes to the range of 0-1, which is convenient for subsequent calculation.

[0088] S63, according to the mean and standard deviation of the comprehensive load coefficient, a network load balancing parameter representing the load balancing degree of the blockchain network is generated.

[0089] The system generates the comprehensive load coefficient by using a weighted calculation method. The computing resource weight is set to 0.4, the storage resource weight is set to 0.3, and the bandwidth resource weight is set to 0.3. The three load indexes are multiplied by the corresponding weights and summed to obtain the comprehensive load coefficient of each node. The setting of the weight value takes into account the influence degree of different resources on the system performance, and the computing resource is given a higher weight because it directly affects the encryption processing speed.

[0090] S64, the computing resource load index, the storage resource load index and the bandwidth resource load index are weighted and calculated to generate the load parameter.

[0091] The statistical analysis of the comprehensive load coefficient of all nodes is performed to calculate the mean and standard deviation. The mean reflects the overall load level of the network, and the standard deviation represents the dispersion degree of the load distribution. The system normalizes the mean and standard deviation and generates a network load balancing parameter by weighted combination. A smaller standard deviation indicates a balanced network load distribution, and a larger standard deviation indicates an unbalanced load distribution.

[0092] Based on the above embodiments, as an optional implementation, in S106, the second encryption strategy is adjusted according to the network load balancing parameter to generate a target encryption strategy, which specifically includes S71-S74: S71, when the network load balancing parameter is not greater than the first preset threshold, the number of blocks in the second encryption strategy is increased, and the block encryption order is adjusted.

[0093] The system first sets two key thresholds: the first preset threshold is set to 0.3, indicating the judgment standard of light network load; and the second preset threshold is set to 0.7, indicating the judgment standard of heavy network load. These two thresholds divide the network load state into three intervals, corresponding to different strategy adjustment schemes. The setting of the thresholds is based on actual operation experience and can be adjusted according to specific application scenarios.

[0094] When the network load balancing parameter is not greater than the first preset threshold 0.3, it indicates that the overall network load is light and the resource utilization is low. At this time, the system increases the number of blocks in the second encryption strategy, for example, increases the original number of blocks by 50% to fully utilize the idle resources; at the same time, the block encryption order is adjusted, and parallel processing is adopted to allow multiple data blocks to be encrypted at the same time. The specific adjustments include: increasing the number of parallel processing threads, optimizing the scheduling strategy of data blocks, adjusting the allocation method of processing queues, etc.

[0095] S72, when the network load balancing parameter is not less than the second preset threshold, the number of blocks in the second encryption strategy is reduced, and the encryption round number is reduced.

[0096] When the network load balancing parameter is not less than the second preset threshold 0.7, it indicates that the overall network load is heavy, and measures need to be taken to reduce the load. The system reduces the number of blocks in the second encryption strategy, for example, reduces the number of blocks to 60% of the original number to reduce the processing pressure; at the same time, the encryption round number is reduced, such as reducing the number of AES encryption rounds by 25% to improve the processing speed under the premise of ensuring basic security. These adjustments help to alleviate the network load pressure and ensure the stable operation of the system.

[0097] S73, when the network load balancing parameter is greater than the first preset threshold and less than the second preset threshold, the encryption parameters in the second encryption strategy are kept unchanged.

[0098] S74, the adjusted second encryption policy is taken as the target encryption policy.

[0099] 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 time, the parameters in the second encryption policy remain unchanged, including the number of blocks, the number of encryption rounds, the processing order, etc., maintaining the current processing capacity and security level. This strategy stability helps the system maintain stable performance.

[0100] After the above adjustment, the system determines the optimized second encryption policy as the target encryption policy. This final encryption policy takes into account both data security requirements and current network load conditions, and can maintain good performance under different load conditions. The changes in parameters during the strategy adjustment process are within the pre-set safety range, ensuring that the adjusted strategy still meets the basic security requirements.

[0101] After adjusting the second encryption policy to generate the target encryption policy, it also includes: According to the target encryption policy, the data is encrypted to obtain encrypted data; the encrypted data and the target encryption policy are written into the data block in the blockchain network; after the second edge computing node receives the encrypted data, the target encryption policy is obtained from the data block; according to the target encryption policy, the encrypted data is decrypted to obtain decrypted data; the integrity of the decrypted data is verified, if the verification is passed, the data transmission is confirmed to be successful; if the verification fails, a retransmission request is sent to the first edge computing node.

[0102] After the generation of the target encryption policy is completed, the system needs to perform the actual data encryption transmission and verification process. This process includes data encryption, blockchain storage, data decryption and integrity verification, etc., to ensure that the data can be safely and reliably transmitted from the first edge computing node to the second edge computing node.

[0103] According to 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, performing data blocking according to the set block size, and following the specified number of encryption rounds for encryption operations, finally obtaining encrypted data. At the same time, the system calculates the hash value of the original data for subsequent integrity verification.

[0104] The system packages the encrypted data and the target encryption policy into a blockchain transaction and writes it into the data block in the blockchain network. In addition to the encrypted data and the encryption policy, the data block also includes metadata information such as data identifier, timestamp, source node identifier, target node identifier, etc. These information is organized into a standard block structure, and through the consensus mechanism of the blockchain network, the data is ensured to be tamper-proof and traceable.

[0105] 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.

[0106] 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.

[0107] 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.

[0108] 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, 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.

[0109] It should be noted that the system provided by the above-mentioned embodiments, when realizing its functions, is only exemplified by the above-mentioned division of each functional module, and in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the system and method embodiments provided by the above-mentioned embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0110] See Figure 3 A structural schematic diagram of an electronic device is provided for the embodiments of the present application. As shown in Figure 3 The electronic device 1000 can 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.

[0111] The communication bus 1002 is used to realize the connection and communication between the components.

[0112] The user interface 1003 can include a display screen (Display), a camera (Camera), and optionally a standard wired interface, a wireless interface.

[0113] The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface).

[0114] The processor 1001 can include one or more processing cores. The processor 1001 connects various parts within the server through various interfaces and lines, and performs various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Alternatively, the processor 1001 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 1001 can integrate a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes operating systems, user interfaces, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 1001, but can be realized by a separate chip.

[0115] The memory 1005 can include a random access memory (RAM) and a read-only memory (ROM). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory 1005 can also be at least one storage device located away from the above-mentioned processor 1001. As shown, the memory 1005 as a computer storage medium can include an operating system, a network communication module, a user interface module, and an application program of an energy data dynamic encryption method based on edge computing. Figure 3

[0116] In Figure 3 ​In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an interface for the user to input, and obtain data input by the user; and the processor 1001 can be used to call an application program of an energy data dynamic encryption method based on edge computing stored in the memory 1005, and when executed by one or more processors, make the electronic device execute the method described in one or more of the above embodiments.

[0117] An electronic device readable storage medium stores instructions. When executed by one or more processors, the electronic device performs the method described in one or more of the above embodiments.

[0118] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, certain steps can be performed in other orders or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0119] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0120] In several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some services interfaces, devices or units, and can be electrical or other forms.

[0121] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0122] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0123] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable memory. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned memory includes: a U disk, a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0124] The above is only exemplary embodiments of the present disclosure, and cannot limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure are still within the scope of the present disclosure. Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon considering the specification and practicing the disclosure herein. The present application is intended to cover any variations, uses or adaptive changes of the present disclosure that follow the general principles of the present disclosure and include common knowledge or conventional techniques in the art that are not described in the present disclosure. The specification and examples are only considered as exemplary, and the scope and spirit of the present 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: The terminal devices in the power grid are divided into multiple device groups according to their geographical location, and each device group corresponds to an edge computing node; A blockchain network is constructed based on the edge computing nodes; 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, 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; Based on the data characteristics, a first encryption strategy is generated; By combining the first network features and the second network features, 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 the second encryption strategy is adjusted according to the network load balancing parameters to generate the target encryption strategy.

2. The method according to claim 1, characterized in that, The step of generating a first encryption strategy based on the data characteristics includes: Extract the data type identifier, data sensitivity level, and data volume from the data features; A basic encryption algorithm is determined 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; The encryption strength parameters are determined based on the data sensitivity level, and the encryption strength parameters include encryption key length, number of encryption rounds, and obfuscation parameters. The size of the encrypted blocks is adjusted according to the amount of data to generate a block encryption sequence, which includes the block size, the number of blocks, and the block encryption order. The first encryption strategy is generated by combining the basic encryption algorithm, encryption strength parameters, and block encryption sequence.

3. The method according to claim 2, characterized in that, The first encryption strategy is generated by combining the basic encryption algorithm, encryption strength parameters, and block encryption sequences, including: Based on the type of the basic encryption algorithm, an encryption algorithm execution template is constructed, which includes encryption initialization parameters and encryption operation sequence; Configure the encryption key length, the number of encryption rounds, and the obfuscation parameter in the encryption strength parameter into the encryption algorithm execution template to generate encryption algorithm configuration information; Based on the block encryption sequence, the data block processing flow is determined; The process of 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; 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. The encryption algorithm configuration information and the data block processing procedure are combined to generate a first encryption strategy.

4. 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: Obtain the first network latency, first available bandwidth, and first node security level from the first network characteristics, and the second network latency, second available bandwidth, and second node security level from the second network characteristics; 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 based on the end-to-end transmission delay; Based on the first available bandwidth and the second available bandwidth, the network throughput is determined, and the number of blocks and the block encryption order in the block encryption sequence are optimized based on the network throughput. Based on the security level of the first node and the security level of the second node, the transmission path risk value is evaluated. If the transmission path risk value exceeds a preset threshold, a dynamic obfuscation layer is added to the first encryption strategy or the first encryption strategy is switched to an asymmetric encryption algorithm. The adjusted first encryption strategy is used as the second encryption strategy.

5. The method according to claim 1, characterized in that, The load status includes computing resource utilization, memory usage, and network bandwidth utilization. Generating network load balancing parameters based on the load status of other edge computing nodes in the blockchain network includes: Based on the computing resource utilization rate, generate the resource load index of other edge computing nodes; based on the memory utilization rate, generate the storage resource load index of other edge computing nodes; based on the network bandwidth utilization rate, generate the bandwidth resource load index of other edge computing nodes. By combining the resource load index, the storage resource load index, and the bandwidth resource load index, a comprehensive load coefficient for other edge computing nodes is generated. Based on the mean and standard deviation of the comprehensive load coefficient, network load balancing parameters characterizing the degree of load balancing in the blockchain network are generated. The load parameters are generated by weighting the computing resource load index, storage resource load index, and bandwidth resource load index.

6. 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 the target encryption strategy includes: When the network load balancing parameter is not greater than the first preset threshold, the number of blocks in the second encryption strategy is increased, and the block encryption order is adjusted. When the network load balancing parameter is not less than the second preset threshold, the number of blocks in the second encryption strategy is reduced, and the number of encryption rounds is decreased. 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. The adjusted second encryption strategy is used as the target encryption strategy.

7. 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: The data is encrypted according to the target encryption strategy 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 strategy from the data block; The encrypted data is decrypted according to the target encryption strategy to obtain the 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.

8. 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 the terminal devices in the power grid into multiple device groups according to their 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 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, 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 combining module is used to combine the first network feature and the second network feature 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 to adjust the second encryption strategy based on the network load balancing parameters to generate the target encryption strategy.

9. 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-7.

10. 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-7.

Citation Information

Patent Citations

  • Certificate chain driven edge computing gateway trusted asymmetric encryption communication protocol

    CN119628841A

  • Multi-strategy encrypted transaction data processing method, system and equipment and storage medium

    CN120074933A

  • Intelligent portable WiFi traffic monitoring method and system based on 5G

    CN120075872A

  • Intelligent data security encryption method in edge computing environment

    CN120342679A

  • Encryption transmission and self-healing control cooperation system facing virtual power plant terminal

    CN120415710A

Cited By

  • Power information protection method and system based on communication security

    CN122001657A