A Blockchain-Based Distributed Power Line Communication Data Management System
By using blockchain technology and a distributed power line communication system, the security and error detection accuracy problems of traditional power line communication systems have been solved, enabling efficient and reliable data transmission and trusted storage, thereby improving the data management efficiency of the power system.
Patent Information
- Application Number
- CN202411668988.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-11-21
AI Technical Summary
Traditional power line communication systems suffer from security, integrity, and transparency issues in data management. They also lack the accuracy of error detection and repair, dynamic channel monitoring and adjustment capabilities, leading to data loss or tampering and making data traceability difficult.
A blockchain-based distributed power line communication data management system is adopted, including a node authentication module, a channel quality monitoring module, an error location module, an error repair module, a channel scheduling module, a data consistency verification module, and a blockchain evidence storage module. It achieves accurate error correction, dynamic transmission strategy adjustment, and reliable evidence storage through convolutional neural networks and finite state machines.
It improves the integrity and reliability of data transmission, ensures data security, reduces channel resource waste, and improves bandwidth utilization and communication efficiency.
Smart Images

Figure CN119544293B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power line communication technology, and in particular to a blockchain-based distributed power line communication data management system. Background Technology
[0002] The purpose of power line communication technology is to transmit data through existing power line networks, achieving dual transmission of data and power, avoiding the laying of additional communication lines, reducing infrastructure construction costs, using power lines as a communication medium to cover a wide geographical area, improving the communication efficiency of the power system, realizing interconnection between devices, and ensuring the stability and reliability of data transmission to meet the high requirements of smart grids for real-time communication.
[0003] The purpose of the blockchain-based distributed power line communication data management system is to solve the security, integrity, and transparency issues in data management of traditional power line communication systems. It aims to ensure that the data transmitted in power line communication remains highly secure throughout the entire communication network, prevent data from being tampered with or lost, record all communication activities, achieve data traceability and trustworthiness, and improve the efficiency and reliability of data management in the power system.
[0004] Traditional power line communication systems suffer from insufficient accuracy in error detection and repair. Conventional error detection methods are poor at identifying various types of errors in complex communication environments, resulting in some erroneous data not being detected and repaired in a timely manner, affecting the integrity of data transmission. Furthermore, they rely on fixed transmission strategies and lack the ability to dynamically monitor and adjust channel conditions. They also lack distributed architecture and reliable evidence storage methods, making data loss or tampering during data transmission prone to occur, and data traceability is difficult, posing potential risks to data management in power systems. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by proposing a blockchain-based distributed power line communication data management system.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a blockchain-based distributed power line communication data management system comprising:
[0007] Node authentication module: Based on the physical and logical addresses of the power line transformer and communication nodes, it performs address parsing, matches the physical and logical addresses one by one, detects abnormalities in the matching status, filters invalid node data, confirms the node identity, and generates an authentication node table through bidirectional mapping;
[0008] Channel quality monitoring module: Based on the node connections in the authentication node table, a finite state machine is used to sample the signal-to-noise ratio and bit error rate of the channel, compare the channel parameters with the set thresholds one by one, judge the channel state changes according to the thresholds, mark the high, medium and low channel states, analyze the state change trend, correlate the changes in the remaining bandwidth and bit error rate of the channel, and generate a channel transmission strategy.
[0009] Error location module: Based on the channel state marked in the channel transmission strategy, it performs bit-by-bit scanning on the bit stream of the communication data packet, detects data anomalies bit by bit, locates the index of the erroneous bit, summarizes the error locations to generate an error mask, and parses the error bits of the corresponding data packet in the mask to obtain the error location information;
[0010] Error repair module: Based on the error location information, a convolutional neural network is used to read the bit stream bit by bit in sequence, encode and correct the error bits, rewrite each corrected bit into the original data packet, and complete the overall repair of the data packet by iterating through all error locations to generate a set of repaired data packets;
[0011] Channel scheduling module: Based on the repaired data packet set, check the matching between the data packet size and the remaining bandwidth of the channel one by one, allocate each data packet to an available channel, adjust the data packet transmission order according to the channel status, and record each transmission path and time to establish a channel scheduling record;
[0012] Data consistency verification module: Based on the channel scheduling record, read the transmitted bit stream one by one, compare it bit by bit with the original bit stream, mark matching and non-matching data packets, trigger the retransmission process for non-matching data packets, process and summarize the comparison results to generate consistency verification results;
[0013] Blockchain Evidence Preservation Module: Based on the consistency verification result, read the path and status of successfully transmitted data packets, write the path and status information into the hash table of the blockchain network, record the evidence preservation time, store the transmission status of all data packets on the chain, and establish blockchain evidence preservation information.
[0014] As a further aspect of the present invention, the node authentication module includes an address resolution submodule, a node verification submodule, and a mapping generation submodule, wherein:
[0015] Address resolution submodule: Based on the physical and logical addresses of power line transformers and communication nodes, each address is read separately, and the physical address is compared with the logical address in byte order. Mismatched byte segments are marked, and all marks are summarized to generate the resolved address result;
[0016] Node verification submodule: Based on the parsed address results, check the markers in the comparison results one by one, compare the matching relationship between physical and logical addresses, identify abnormal nodes in all addresses, update the address table by deleting abnormal nodes, and filter out all normal nodes to generate a valid node set;
[0017] Mapping generation submodule: Based on the set of valid nodes, read the physical address and logical address of each normal node one by one, store the addresses in pairs into the mapping table, establish a node mapping structure through bidirectional association of address sets, record the mapping structure into the node table, and generate the authentication node table.
[0018] As a further aspect of the present invention, the channel quality monitoring module includes a signal-to-noise ratio sampling submodule, a bit error rate detection submodule, and a state assessment submodule, wherein:
[0019] Signal-to-noise ratio (SNR) sampling submodule: Based on the node connections in the authentication node table, read the SNR parameters from each communication channel, record all parameters by time period, segment the SNR curve for each time period, filter out abnormal fluctuation points, and generate sampled SNR data from all records;
[0020] Bit error rate detection submodule: Based on the sampled signal-to-noise ratio data, read the bit stream in the data packet one by one, compare the error bits between the actual transmitted data and the original data, count the error bits of all data packets, calculate the total bit error, mark the result after comparing each data packet with the threshold, and generate the detected bit error rate data;
[0021] State assessment submodule: Based on the detected bit error rate data, a finite state machine is used to analyze the changes in bit error rate and signal-to-noise ratio for each channel, determine the channel distribution in high, medium and low states, summarize the state change trend, select an appropriate transmission mode based on the correlation information between bit error rate and signal-to-noise ratio, and obtain the channel transmission strategy.
[0022] As a further aspect of the present invention, the finite state machine is defined according to the formula:
[0023]
[0024] Where: P e Let E represent the bit error rate, erfc(x) represent the complementary error function, and E0 represent the error rate. b N represents the energy per bit, N0 represents the noise power spectral density, W represents the channel bandwidth, M represents the modulation order, α represents the noise interference coefficient, I represents the external interference power, β represents the power control coefficient, and P represents the power per bit. t This indicates the transmission power.
[0025] As a further aspect of the present invention, the error location module includes a bitstream scanning submodule, an error bit detection submodule, and an error mask parsing submodule, wherein:
[0026] Bit stream scanning submodule: Based on the channel transmission strategy, read the bit stream from the communication data packet, traverse bit by bit and check the voltage fluctuation in the data stream, record the bit positions that do not conform to the reference range, store all abnormal positions in the table, and generate a bit abnormal position table.
[0027] Error bit detection submodule: Based on the bit anomaly location table, read the bit value of each marked position, compare the recorded transmission data with the reference data, detect the difference bit by bit and confirm the position of the error bit, and store the data packet index associated with each error bit in the structure table to generate an error bit index table;
[0028] Error mask parsing submodule: Based on the error bit index table, read the index information of all error bits, generate a mask structure according to the index, parse the mask structure to associate the corresponding data packet with the error bit index, establish a mapping table between error bits and data packets, and obtain the error location information.
[0029] As a further aspect of the present invention, the error repair module includes an error bit reading submodule, an error bit correction submodule, and a data packet reassembly submodule, wherein:
[0030] Error bit reading submodule: Based on the error location information, a convolutional neural network is used to locate the error bit in the data packet, read and extract the error bit and its location bit by bit, summarize the location and original value into an error bit record table, and generate a list of read error bits;
[0031] Error bit correction submodule: Based on the read error bit list, read the error bits in sequence and correct them, perform correction operations on the bit stream error bits, overwrite the error bits in the original data packet with the corrected bits, update the bit stream structure of each data packet, and generate a corrected bit bit data packet;
[0032] The packet reassembly submodule extracts the packet content from all corrected bit streams based on the corrected bit packets, reassembles the packets according to the original structure, traverses all erroneous bits and checks the repair status to ensure the packet structure is complete, and generates a set of repaired packets.
[0033] As a further aspect of the present invention, the convolutional neural network is configured according to the formula:
[0034]
[0035] in: x is the confidence score for the i-th bit being an error bit. i w is the bit value of the i-th bit in the input data packet. iLet d be the weight parameter of the convolution kernel for the i-th bit during the convolution process. i Let be the density information of the i-th bit at its local position in the data packet, r be the data packet transmission rate, α be the weighting coefficient of the density information, β be the weighting coefficient of the transmission rate, b be the bias term, and σ(·) be the activation function.
[0036] As a further aspect of the present invention, the channel scheduling module includes a bandwidth matching submodule, a transmission order adjustment submodule, and a transmission path recording submodule, wherein:
[0037] Bandwidth matching submodule: Based on the repaired data packet set, read the size of each data packet, and read the current available bandwidth by checking the remaining bandwidth of the channel. Calculate the ratio of the data packet size to the remaining bandwidth of the channel, mark the data packets that match the ratio as matched, and generate bandwidth matching records;
[0038] Transmission order adjustment submodule: Based on the bandwidth matching record, check the size and priority of each matching data packet, sort all matching data packets from high to low according to the remaining bandwidth of the channel, and place high priority data packets at the front according to priority to generate the adjusted transmission order;
[0039] Transmission path recording submodule: Based on the adjusted transmission order, read the transmission path information of each data packet, record the start and end times of transmission in the path table, store the path data in the order of data packets, establish a complete path structure, and generate channel scheduling records.
[0040] As a further aspect of the present invention, the data consistency verification module includes a bitstream reading submodule, a data packet comparison submodule, and a retransmission triggering submodule, wherein:
[0041] Bitstream reading submodule: Based on the channel scheduling record, read the data packets that have been transmitted one by one, expand the bitstream in the data packets bit by bit, read the original bitstream and the transmitted bitstream synchronously, and store them in a comparison table to generate the bitstream data after transmission;
[0042] Data packet comparison submodule: Based on the transmitted bit stream data, compare the original and transmitted bit streams bit by bit, mark the matching and non-matching bits in the comparison table respectively, and extract the data packet index of all non-matching bits to generate a comparison mark table;
[0043] Retransmission triggering submodule: Based on the comparison mark table, read the index position of the mismatched data packet, trigger retransmission according to the difference, compare the retransmitted data with the original data packet bit by bit to confirm, summarize the status of all data packets after the retransmission is completed, and generate a consistency verification result.
[0044] As a further aspect of the present invention, the blockchain evidence storage module includes a path reading submodule, a state storage submodule, and a hash writing submodule, wherein:
[0045] Path reading submodule: Based on the consistency verification result, read the path of successfully transmitted data packets, extract the start and end time of each data packet, organize the path and time into a structure table, and generate a path status table;
[0046] State storage submodule: Based on the path state table, read the path and time of each data packet, arrange the paths of all data packets in chronological order, organize them into a writable state table, and generate stored state data;
[0047] Hash writing submodule: Based on the stored state data, write the path and state data of each data packet one by one, store them in the hash table of the blockchain, and store the writing time as a block record, complete the on-chain notarization of the state of all data packets, and establish blockchain notarization information.
[0048] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0049] 1. In this invention, the innovative application of convolutional neural networks in the error repair module enables accurate encoding correction and rapid repair of erroneous bits, ensuring the integrity and effectiveness of data transmission. It provides higher accuracy and adaptability when reading and repairing bit streams bit by bit, copes with various error types in complex communication environments, and efficiently repairs erroneous data packets in communication.
[0050] 2. In this invention, by using a finite state machine, the signal-to-noise ratio and bit error rate of the channel are dynamically monitored and analyzed. When the channel state changes, the transmission strategy is adjusted in a timely manner to keep the communication process stable and efficient. An efficient transmission strategy is automatically generated according to the changes in the channel state, reducing channel resource waste and improving bandwidth utilization, and avoiding data transmission failures caused by channel instability. Attached Figure Description
[0051] Figure 1 This is a system flowchart of the present invention;
[0052] Figure 2 This is a schematic diagram of the system framework of the present invention. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0054] Please see Figure 1This invention provides a technical solution: a blockchain-based distributed power line communication data management system comprising:
[0055] Node authentication module: Based on the physical and logical addresses of power line transformers and communication nodes, it performs address resolution, matches the physical and logical addresses one by one, detects abnormalities in the matching status, filters invalid node data, confirms the node identity, and generates an authentication node table through bidirectional mapping;
[0056] Channel quality monitoring module: Based on the node connections in the authentication node table, a finite state machine is used to sample the signal-to-noise ratio and bit error rate of the channel, compare the channel parameters with the set thresholds one by one, judge the channel state changes according to the thresholds, mark the high, medium and low channel states, analyze the state change trend, correlate the changes in the remaining bandwidth and bit error rate of the channel, and generate the channel transmission strategy.
[0057] Error location module: Based on the channel state marked in the channel transmission strategy, it performs bit-by-bit scanning on the bit stream of communication data packets, detects data anomalies bit by bit, locates the index of the erroneous bit, summarizes the error locations to generate an error mask, and parses the corresponding error bits in the data packets in the mask to obtain the error location information;
[0058] Error repair module: Based on error location information, a convolutional neural network is used to read the bit stream bit by bit in sequence, encode and correct the erroneous bits, rewrite each corrected bit into the original data packet, and complete the overall repair of the data packet by iterating through all error locations, generating a set of repaired data packets;
[0059] Channel scheduling module: Based on the repaired data packet set, it checks the matching between the data packet size and the remaining bandwidth of the channel one by one, allocates each data packet to an available channel, adjusts the data packet transmission order according to the channel status, records each transmission path and time, and establishes a channel scheduling record;
[0060] Data consistency verification module: Based on channel scheduling records, it reads the transmitted bit stream one by one, compares it bit by bit with the original bit stream, marks matching and non-matching data packets, triggers retransmission process for non-matching data packets, summarizes the comparison results after processing, and generates consistency verification results;
[0061] Blockchain Evidence Preservation Module: Based on the consistency verification results, it reads the path and status of successfully transmitted data packets, writes the path and status information into the hash table of the blockchain network, records the evidence preservation time, stores the transmission status of all data packets on the chain, and establishes blockchain evidence preservation information.
[0062] Please see Figure 2 The node authentication module includes an address resolution submodule, a node verification submodule, and a mapping generation submodule, among which:
[0063] Address resolution submodule: Based on the physical and logical addresses of power line transformers and communication nodes, each address is read separately, and the physical address is compared with the logical address in byte order. Mismatched byte segments are marked, and all marks are summarized to generate the resolved address result;
[0064] Node verification submodule: Based on the address resolution results, it checks the markers in the comparison results one by one, compares the matching relationship between physical and logical addresses, identifies abnormal nodes in all addresses, updates the address table by deleting abnormal nodes, and filters out all normal nodes to generate a valid node set;
[0065] Mapping generation submodule: Based on the valid node set, read the physical address and logical address of each normal node one by one, store the addresses in pairs into the mapping table, establish a node mapping structure through bidirectional association of address sets, record the mapping structure into the node table, and generate the authentication node table;
[0066] Address resolution submodule: Based on the physical and logical addresses of power line transformers and communication nodes, it adopts a byte-by-byte comparison method, reading each address separately. It starts with the low address byte and gradually moves to the high address byte, comparing the physical address and logical address one by one in byte order. If a byte does not match, a marking instruction is used to mark the byte segment. The marking content is summarized by setting flag bits. Specifically, each flag bit corresponds to the mismatch status of a byte segment. By reading the flag bit information, a bitmap of marked address segments is generated. All markings are summarized to generate the resolved address result.
[0067] Node verification submodule: Based on the parsed address results, it uses a byte-by-byte search method to compare the markers in the comparison results. By checking the matching relationship between the physical address and the logical address, it identifies abnormal nodes one by one. It compares the marker bits in the parsed results with each byte of the physical address and logical address in turn. If there is a byte segment where the marker bits are both "1" in the comparison of the physical address and the logical address, it is determined to be an abnormal node. The deletion instruction is called to perform a deletion operation on the abnormal node, and the address table is updated. The deletion method is to remove the physical address and logical address corresponding to the abnormal node from the address table, perform table compression, filter all nodes with all markers being "0", and store them in the valid node set to generate a valid node set.
[0068] The mapping generation submodule: Based on the valid node set, it uses a doubly linked list structure storage algorithm to read the physical address and logical address of each normal node one by one, calls the linked list insertion function, stores the mapping of physical address and logical address into the mapping table, sorts the linked list by address during the insertion process, establishes the node mapping structure by bidirectionally associating the front and back pointers of each address set, and enters the structure into the node table by setting the linked list pointers to generate the authentication node table.
[0069] Please see Figure 2 The channel quality monitoring module includes a signal-to-noise ratio sampling submodule, a bit error rate detection submodule, and a status assessment submodule, wherein:
[0070] Signal-to-noise ratio (SNR) sampling submodule: Based on the node connections in the authentication node table, it reads the SNR parameters from each communication channel, records all parameters by time period, segments the SNR curve for each time period, filters out abnormal fluctuation points, and generates sampled SNR data from all records.
[0071] Bit error rate detection submodule: Based on the sampled signal-to-noise ratio data, read the bit stream in the data packet one by one, compare the error bits between the actual transmitted data and the original data, count the error bits of all data packets, calculate the total bit error, mark the result after comparing each data packet with the threshold, and generate the detected bit error rate data;
[0072] State assessment submodule: Based on the detected bit error rate data, a finite state machine is used to analyze the changes in bit error rate and signal-to-noise ratio for each channel, determine the channel distribution in high, medium and low states, summarize the state change trend, select an appropriate transmission mode based on the correlation information between bit error rate and signal-to-noise ratio, and obtain the channel transmission strategy.
[0073] Signal-to-noise ratio (SNR) sampling submodule: Based on node connections in the authentication node table, it adopts a time-period sampling algorithm to read SNR parameters from each communication channel, calls the read function of the communication interface, reads the SNR in each time period of the channel byte by byte, stores it in the time-series buffer queue, sets the time period to 100 milliseconds, records all SNR parameters, and uses a piecewise linear fitting algorithm to segment the SNR curve for each time period. During the segmentation process, by setting a threshold difference, it filters out fluctuation points that exceed the set threshold, records the location information of abnormal fluctuation points in the abnormal point map, and generates an abnormal fluctuation report by accumulating the abnormal point location information. It integrates all SNR data and abnormal information to generate sampled SNR data.
[0074] Bit error rate detection submodule: Based on sampled signal-to-noise ratio data, it adopts a packet-by-packet comparison method to read the bit stream in the data packets one by one. First, it calls the decoding function for each data packet to read the actual transmitted data bit by bit, and calls the original data comparison function to compare the differences between the actual transmitted data and the bit stream in the original data bit by bit, recording the error information of each bit. It also uses a counter to accumulate and count the error bits of each data packet, calls the error statistics function to calculate the total bit error of each data packet, sets the bit error rate threshold to 0.01, compares the total bit error of each data packet with the threshold. If the total error exceeds the threshold, it uses a marking function to mark the bit error rate of the data packet, and summarizes all the marking information to generate the detected bit error rate data.
[0075] State Assessment Submodule: Based on the detected bit error rate (BER) data, a finite state machine (FSM) is used for state judgment. It analyzes the BER and SNR changes for each channel one by one. First, the BER and SNR of the channel are combined in binary order. The state judgment criteria are set as a BER threshold of 0.01 and an SNR threshold of 20dB. The FSM states are distributed into three categories: high, medium, and low. By comparing the BER and SNR combinations, if the SNR is higher than the threshold and the BER is lower than the threshold, it is judged as a high state. The same logic applies to medium and low states. The state judgment function is called to generate the state of each channel, and a state change trend report is generated through a summary function. Then, based on the correlation information between BER and SNR, an algorithm selects a suitable transmission mode, calls the transmission strategy generation function, and generates the channel transmission strategy.
[0076] Finite state machines, according to the formula:
[0077]
[0078] Where: P e Let E represent the bit error rate, erfc(x) represent the complementary error function, and E0 represent the error rate. b N represents the energy per bit, N0 represents the noise power spectral density, W represents the channel bandwidth, M represents the modulation order, α represents the noise interference coefficient, I represents the external interference power, β represents the power control coefficient, and P represents the power per bit. t Indicates transmission power;
[0079] Execution process: First, the bandwidth value W is obtained based on the detected channel parameters. The higher the bandwidth, the greater the data transmission capacity, but the more significant the noise and interference. Simultaneously, the modulation order M is determined according to the currently used modulation scheme. Multiplying the bandwidth W by the modulation order M yields a quantitative indicator of transmission complexity. The energy E per bit per unit time is then detected. b Combining the product of bandwidth and modulation order ensures a more accurate reflection of the effective power level of the signal in the channel. Simultaneously, the noise power spectral density N0 in the environment is measured to describe the fundamental impact of noise on signal quality. The noise interference coefficient, represented by parameter α, balances interference factors in complex environments. The external interference power I during operation reflects the interference intensity caused by surrounding equipment or systems, ensuring that the superimposed effects of environmental noise are fully considered when calculating the bit error rate. In terms of power control, based on collected historical transmission data and bit error rate trends, a power control coefficient β is calculated using a weighted average method to adjust the signal transmission power. Subsequently, the coefficient β is compared with the transmission power P. t Multiplying these values yields the adjusted power value, which is used to compensate for signal attenuation in the channel. The bit error rate P for each channel is calculated using the complementary error function erfc(x). eThis generates accurate bit error rate analysis results, completes channel state assessment, and provides a basis for further transmission strategy optimization.
[0080] Please see Figure 2 The error location module includes a bitstream scanning submodule, an error bit detection submodule, and an error mask parsing submodule, wherein:
[0081] Bit stream scanning submodule: Based on the channel transmission strategy, it reads the bit stream from the communication data packet, traverses bit by bit and checks the voltage fluctuations in the data stream, records the bit positions that do not conform to the reference range, stores all abnormal positions in the table, and generates a bit abnormal position table.
[0082] Error bit detection submodule: Based on the bit anomaly location table, it reads the bit value of each marked position, compares the recorded transmitted data with the reference data, detects the differences bit by bit and confirms the position of the error bit, and stores the data packet index associated with each error bit in the structure table to generate the error bit index table;
[0083] Error mask parsing submodule: Based on the error bit index table, it reads the index information of all error bits, generates a mask structure according to the index, parses the mask structure to associate the corresponding data packet with the error bit index, establishes a mapping table between error bits and data packets, and obtains the error location information;
[0084] Bitstream scanning submodule: Based on the channel transmission strategy, it adopts a bit-by-bit traversal method to read the bitstream from the communication data packet. It calls the data packet reading function to scan each bitstream bit by bit. First, it calls the communication interface to read the bitstream information in the communication data packet bit by bit. It stores the corresponding voltage fluctuation data in each bitstream into the buffer. By setting a reference voltage range, it compares and checks the voltage fluctuation of each bit. The reference range is set to 0.8V to 1.2V. If the bit voltage is outside the range, it uses a marking function to record the bit position. It writes the position information of each abnormal bit into the abnormal position table and generates a bit abnormal position table by accumulating the records.
[0085] Error bit detection submodule: Based on the bit anomaly location table, it uses a bit-by-bit comparison method to read the bit value at the anomaly location bit by bit. First, it calls the bit read function to read the bit value at the marked position, and then calls the bit value comparison function to compare the recorded transmitted bit with the reference bit. If the two are inconsistent, the bit is confirmed as an error bit. The error bit record function records the location information of the error bit in the structure table. The data packet index read function is called to store the data packet index associated with the error bit in the structure table. It records each error bit and its corresponding data packet index to generate an error bit index table.
[0086] Error Mask Parsing Submodule: Based on the error bit index table, it uses a mask generation algorithm to progressively read the index information of all error bits, calls the index reading function to read the index value of each error bit, and generates a mask structure corresponding to the error bit through the mask generation function. The mask structure is generated by generating a mask byte every 8 bits, and the specific position of the error bit is marked by binary "1" and "0". The mask parsing function is called to parse the mask structure, associate each parsed mask bit with its corresponding data packet, establish a mapping table between error bits and data packets, and store the mapping relationship between error bits and data packets in a data table, thus generating the error bit and data packet mapping table.
[0087] Please see Figure 2 The error repair module includes an error bit reading submodule, an error bit correction submodule, and a packet reassembly submodule, wherein:
[0088] Error bit reading submodule: Based on error location information, a convolutional neural network is used to locate error bits in the data packet, read and extract error bits and their locations bit by bit, summarize the locations and original values into an error bit record table, and generate a list of read error bits;
[0089] Error bit correction submodule: Based on reading the error bit list, reads the error bits sequentially and corrects them, performs correction operations on the bit stream error bits, overwrites the error bits in the original data packet with the corrected bits, updates the bit stream structure of each data packet, and generates a corrected bit bit data packet;
[0090] The packet reassembly submodule extracts the packet content from all corrected bit streams based on the corrected bit packets, reassembles the packets according to the original structure, traverses all erroneous bits and checks the repair status to ensure the integrity of the packet structure, and generates a set of repaired packets.
[0091] Error Bit Reading Submodule: Based on error location information, a convolutional neural network is used to locate error bits in the data packet. First, the convolutional layer of the convolutional neural network is called, and a 3×3 convolutional kernel is used to extract local features from the bitstream data. Each convolutional kernel extracts error features from the bitstream sequentially during the sliding process. After the convolution output is passed to the ReLU activation function, the negative values in the convolution result are set to zero. After multiple layers of convolution and pooling operations, the positions with significant error features are extracted and the position information is passed to the fully connected layer. The fully connected layer calculates the specific index position of the error bit, reads and extracts the error bit and its position bit by bit, summarizes each position and the original value, and stores it in the error bit record table to generate a list of read error bits.
[0092] Error bit correction submodule: Based on reading the error bit list, it adopts a sequential correction algorithm to read the error bits in sequence and perform correction operations. First, it calls the read function to read the error bits in sequence. Then, it calls the correction function to compare the error bits in the bit stream with the correct bit values in the reference data bit by bit. If the error bit values are found to be inconsistent, it calls the overwrite instruction to overwrite the error bits in the original data packet with the correct bit values in the reference data, thus completing the correction operation. Each corrected bit is overwritten into the original data packet. Finally, it calls the bit stream update function to update the bit stream structure of each data packet and saves the corrected bit stream to the new data packet structure, generating a corrected bit bit data packet.
[0093] The packet reassembly submodule, based on corrected bit packets, employs a reassembly traversal algorithm to extract packet content from all corrected bitstreams. First, it calls the extraction function to extract the corrected bitstream bit by bit, storing each bit into a new packet according to the original packet's structure. Then, it calls the traversal check function to check the erroneous bits in each packet, confirming that all erroneous bits have been corrected. It checks the structural integrity of each packet; if an abnormal data structure is found, it calls the correction function for a secondary correction operation. After traversal, all repaired packets are reassembled to generate a repaired packet set.
[0094] Convolutional neural networks, according to the formula:
[0095]
[0096] in: x is the confidence score for the i-th bit being an error bit. i w is the bit value of the i-th bit in the input data packet. i Let d be the weight parameter of the convolution kernel for the i-th bit during the convolution process. i Let be the density information of the local position of the i-th bit in the data packet, r be the data packet transmission rate, α be the weighting coefficient of the density information, β be the weighting coefficient of the transmission rate, b be the bias term, and σ(·) be the activation function.
[0097] Execution process: First, the bitstream from the input data packet is fed into the convolutional neural network one by one for processing. The convolutional kernel moves within a sliding window according to the weight parameter w. i For each bit x i Weighted calculations are performed, and all bits are covered one by one during the sliding of the convolution window to ensure that each bit participates in the judgment. The density information d of the bit's position is introduced during the convolution process. i If the density is high, the model will determine that the probability of a bit error occurring at that location is higher, and will control d using the density information weighting coefficient α. iThe degree of influence on the results is determined by tuning α using the training dataset and finding the optimal value through grid search. The data packet transmission rate r is also considered; higher rates make data packet bits more susceptible to interference and errors. The influence of this parameter is adjusted by the transmission rate weighting coefficient β. The optimization of β is also determined through validation set performance. Finally, the weighted sum within the convolution window is combined with the density information d. i The weighted result of the transmission rate r is accumulated and a bias term b is added as a basic adjustment. The accumulated result is mapped to a probability value y between 0 and 1 through the activation function σ(·). When the probability exceeds the set threshold, the corresponding bit is marked as an error bit, and its position and original value are stored in the error bit record table. All error bits are summarized to generate a read error bit list.
[0098] Please see Figure 2 The channel scheduling module includes a bandwidth matching submodule, a transmission order adjustment submodule, and a transmission path recording submodule, wherein:
[0099] Bandwidth matching submodule: Based on the repaired data packet set, read the size of each data packet, and read the current available bandwidth by checking the remaining bandwidth of the channel. Calculate the ratio of the data packet size to the remaining bandwidth of the channel, mark the data packets that match the ratio as matched, and generate bandwidth matching records;
[0100] Transmission order adjustment submodule: Based on bandwidth matching records, it checks the size and priority of each matching data packet, sorts all matching data packets from high to low according to the remaining bandwidth of the channel, and puts high-priority data packets at the front according to priority, generating the adjusted transmission order;
[0101] Transmission path recording submodule: Based on the adjusted transmission order, it reads the transmission path information of each data packet, records the start and end times of transmission in the path table, stores the path data in the order of data packets, establishes a complete path structure, and generates channel scheduling records;
[0102] The bandwidth matching submodule, based on the repaired data packet set, uses a bandwidth ratio calculation algorithm to read the size of each data packet, calls the data packet reading function to obtain the number of bytes in each data packet, and calls the bandwidth check function when reading the remaining bandwidth of the channel. The function detects the remaining bandwidth value of the channel in real time and stores it in the bandwidth buffer queue. Then, it calls the bandwidth ratio calculation function, which calculates the ratio as "data packet size ÷ remaining channel bandwidth". The calculated ratio value is compared with the set bandwidth threshold, which is set to 80%. If the data packet size ratio is within the threshold range, the marking function is used to mark the data packet as a match, and the marking information is written to the matching record table to generate a bandwidth matching record.
[0103] Transmission order adjustment submodule: Based on bandwidth matching records, it adopts a priority sorting algorithm to check the size and priority of each matching data packet one by one. First, it calls the size check function to get the number of bytes of each data packet, and calls the priority read function to get the priority value of each data packet. The priority value is set to a range of 1 to 10. Then, it calls the sorting function to sort all matching data packets according to the sorting standard of "channel remaining bandwidth from high to low". After sorting, it calls the priority adjustment function to adjust the data packet with higher priority value to the priority position. If two data packets have the same bandwidth ratio, the one with higher priority value is ranked first, generating the adjusted transmission order.
[0104] Transmission Path Recording Submodule: Based on the adjusted transmission order, a path tracing algorithm is used to gradually read the transmission path information of each data packet. First, the path reading function is called to obtain the transmission path information of each data packet. The path information includes the timestamp data of the start and end nodes. The timestamp recording function is called to store the start and end times of transmission into the path table. The path table records the path information of each data packet in the transmission order. The sequential storage function is called to gradually rearrange the transmission data in the path table according to the adjusted transmission order. Finally, the path structure creation function is called to establish a complete path structure and generate a channel scheduling record.
[0105] Please see Figure 2 The data consistency verification module includes a bitstream reading submodule, a data packet comparison submodule, and a retransmission triggering submodule, among which:
[0106] Bitstream reading submodule: Based on the channel scheduling record, read the data packets that have been transmitted one by one, expand the bitstream in the data packets bit by bit, read the original bitstream and the transmitted bitstream synchronously, and store them in a comparison table to generate the bitstream data after transmission;
[0107] Data packet comparison submodule: Based on the transmitted bit stream data, it compares the original and transmitted bit streams bit by bit, marks the matching and non-matching bits in the comparison table, and extracts the data packet index of all non-matching bits to generate a comparison mark table;
[0108] Retransmission triggering submodule: Based on the comparison mark table, read the index position of the mismatched data packet, and trigger retransmission according to the difference. The retransmitted data is compared with the original data packet bit by bit to confirm. After the retransmission is completed, the status of all data packets is summarized and a consistency verification result is generated.
[0109] Bitstream reading submodule: Based on channel scheduling records, it uses a bit-by-bit expansion algorithm to read the transmitted data packets one by one. It calls the data packet reading function to expand the bitstream in the data packet bit by bit. The expansion method is to read byte by byte and decompose it into individual bits. It calls the bitstream synchronization reading function to read the original bitstream and the transmitted bitstream synchronously. The synchronization reading window size is set to 8 bits. After each synchronization reading, the synchronized bitstream is written into the comparison table. By storing the bitstream bit by bit into the comparison table, the offset and bit position of the bitstream are recorded to generate the transmitted bitstream data.
[0110] The packet comparison submodule, based on the transmitted bitstream data, uses a bit-by-bit comparison algorithm to compare the original and transmitted bitstreams bit by bit. First, it calls the comparison function to read each bit of the original bitstream and the transmitted bitstream bit by bit. The window size for each comparison is set to 8 bits. Then, it calls the matching mark function to mark the matching and non-matching bits in the comparison table. The mark value of the matching bit is set to "1", and the mark value of the non-matching bit is set to "0". The packet index of each non-matching bit is extracted by calling the index extraction function and the index information is stored in the non-matching bit index table to generate the comparison mark table.
[0111] The retransmission trigger submodule, based on the comparison mark table, uses a difference retransmission trigger algorithm. It reads the index positions of mismatched data packets, first calling the index reading function to read the index positions of mismatched bits in the comparison mark table one by one, then calling the retransmission trigger function to trigger the retransmission operation based on the differences in the bitstream. The retransmitted data packets are read bit by bit and transmitted to the comparison module. The bitstream comparison function is called to compare the retransmitted data with the bitstream in the original data packets bit by bit, confirming that the retransmitted bit values are consistent with the original bitstream. After the retransmission is completed, the status summary function is called to summarize the transmission status of all data packets and store it in the status table, generating a consistency verification result.
[0112] Please see Figure 2 The blockchain evidence storage module includes a path reading submodule, a state storage submodule, and a hash writing submodule, wherein:
[0113] Path reading submodule: Based on the consistency check result, read the path of successfully transmitted data packets, extract the start and end time of each data packet, organize the path and time into a structure table, and generate a path status table;
[0114] State storage submodule: Based on the path state table, it reads the path and time of each data packet, arranges the paths of all data packets in chronological order, organizes them into a writable state table, and generates stored state data;
[0115] Hash Write Submodule: Based on the stored state data, write the path and state data of each data packet one by one and store them in the hash table of the blockchain. Store the write time as a block record, complete the on-chain notarization of the state of all data packets, and establish blockchain notarization information.
[0116] The path reading submodule, based on the consistency check results, uses a path extraction algorithm to read the path of successfully transmitted data packets. First, it calls the path reading function to read the transmission path of each data packet one by one. The path information includes the start node and the end node. Then, it calls the time extraction function to extract the start time and end time of each data packet. The time format is set to Unix timestamp. The extracted path and time information are organized into a structure table. By traversing all data packets, the path and corresponding time information of each data packet are stored in the structure table in byte alignment, and finally, a path status table is generated.
[0117] The state storage submodule is based on the path state table and uses a time sorting algorithm to read the path and time of each data packet. First, the path reading function is called to read the path and time information in the path state table one by one. The time information of each data packet is sorted in ascending order with the time unit in milliseconds. The time sorting function is called to sort the timestamps of the data packets step by step. The sorted path information is then rearranged in chronological order. Finally, the write buffer function is called to organize all the sorted paths into a writable state table structure, and finally, the stored state data is generated.
[0118] The hash write submodule, based on stored state data, uses the SHA-256 hash algorithm to write the path and state data of each data packet one by one. It calls the hash generation function to read the path and state data of each data packet in sequence, calls the SHA-256 hash generator to generate a 256-bit hash value using the byte stream of path and state data as input, and writes each hash value into a hash table. Then, it calls the blockchain write function to write the hash of each data packet into the blockchain, records the write time as a Unix timestamp, and calls the block record function to store the write time and hash value as a block record. This completes the on-chain notarization of the state of all data packets and establishes blockchain notarization information.
[0119] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A blockchain-based distributed power line communication data management system, characterized by, The system comprises: a node authentication module: based on the physical address and logical address of the power line transformer and the communication node, address resolution is performed, the physical address and the logical address are matched one by one, and abnormal conditions in the matching state are detected, invalid node data is filtered, the node identity is confirmed, an authentication node table is generated through bidirectional mapping; a channel quality monitoring module: based on the node connection in the authentication node table, a finite state machine is used to sample the signal-to-noise ratio and the bit error rate of the channel, the channel parameters are compared with the set threshold value in sequence, the channel state change is judged according to the threshold value, and the high, medium and low channel states are marked, the state change trend is analyzed, the change of the residual bandwidth and the bit error rate of the channel is associated, and a channel transmission strategy is generated; an error positioning module: based on the channel state marked in the channel transmission strategy, a bit-by-bit scan is performed on the bit stream of the communication data packet, the data abnormality is detected bit by bit, the index of the error bit is located, the error position is summarized to generate an error mask, and the error bit corresponding to the data packet in the mask is analyzed to obtain the error position information; an error repair module: based on the error position information, a convolutional neural network is used to sequentially read the bit stream bit by bit, the error bit is corrected, each repaired bit is written back to the original data packet, the overall repair of the data packet is completed through cyclic iteration of all error positions, and a repaired data packet set is generated; a channel scheduling module: based on the repaired data packet set, the matching of the data packet size and the residual bandwidth of the channel is checked one by one, each data packet is allocated to an available channel, the data packet transmission order is adjusted according to the channel state, and each transmission path and time is recorded to establish a channel scheduling record; a data consistency verification module: based on the channel scheduling record, the transmitted bit stream is read one by one, compared bit by bit with the original bit stream, and the matching and non-matching data packets are marked, the non-matching data packets are retransmitted, and the comparison results are summarized after processing to generate a consistency verification result; a blockchain storage module: based on the consistency verification result, the data packet path and state of the transmission success are read, the path and state information is written into the hash table of the blockchain network, and the storage time is recorded, the transmission state of all data packets is stored on the chain, and the blockchain storage information is established.
2. The blockchain-based distributed powerline communication data management system of claim 1, wherein, The node authentication module comprises an address resolution submodule, a node verification submodule and a mapping generation submodule, wherein: the address resolution submodule: based on the physical address and logical address of the power line transformer and the communication node, each address is read separately, the physical address is compared with the logical address in byte order, the byte segments that do not match are marked, and all the marks are summarized to generate an address resolution result; the node verification submodule: based on the address resolution result, the marks in the comparison result are checked one by one, the matching relationship between the physical and logical addresses is compared, all abnormal nodes in the addresses are identified, the address table is updated by deleting the abnormal nodes, and all normal nodes are screened to generate a valid node set; The mapping generation submodule reads the physical address and the logical address of each normal node one by one based on the effective node set, stores the address pairs in a mapping table, establishes a node mapping structure through a bidirectional association address set, records the mapping structure in a node table, and generates an authentication node table.
3. The blockchain-based distributed powerline communication data management system of claim 1, wherein, The channel quality monitoring module comprises a signal-to-noise ratio sampling submodule, a bit error rate detection submodule, and a state evaluation submodule, wherein: The signal-to-noise ratio sampling submodule reads the signal-to-noise ratio parameters from each communication channel based on the node connection in the authentication node table, records all the parameters in time periods, performs segmented processing on the signal-to-noise ratio curve in each time period, screens out abnormal fluctuation points, and generates sampling signal-to-noise ratio data; The bit error rate detection submodule reads the bit stream in each data packet one by one based on the sampling signal-to-noise ratio data, compares the error bits between the actual transmission data and the original data, statistically processes all the data packets, calculates the total bit error amount, marks the result after comparing each data packet with a threshold, and generates detection bit error rate data; The state evaluation submodule analyzes the bit error rate and the signal-to-noise ratio change of each channel one by one based on the detection bit error rate data, judges the distribution of high, medium and low state channels, summarizes the state change trend, selects a suitable transmission mode according to the bit error and signal-to-noise ratio correlation information, and obtains a channel transmission strategy.
4. The blockchain-based distributed powerline communication data management system of claim 1, wherein, The finite state machine is according to the formula: where: P e denotes the bit error rate, erfc(x) denotes the complementary error function, E b denotes the energy per bit, N0denotes the noise power spectral density, W denotes the channel bandwidth, M denotes the modulation order, a denotes the noise interference coefficient, I denotes the external interference power, b denotes the power control coefficient, P t denotes the transmission power.
5. The blockchain-based distributed powerline communication data management system of claim 1, wherein, The bit error positioning module comprises a bit stream scanning submodule, an error bit detection submodule, and an error mask analysis submodule, wherein: The bit stream scanning submodule reads the bit stream from the communication data packet based on the channel transmission strategy, iterates and checks the voltage fluctuation in the data stream bit by bit, records the bit positions that do not conform to the reference range, stores all the abnormal positions in a table, and generates a bit abnormal position table; The error bit detection submodule reads the bit value of each marked position based on the bit abnormal position table, compares the recorded transmission data with the reference data, detects the difference bit by bit and confirms the error bit position, stores each error bit position and the data packet index in a structure table, and generates an error bit index table; The error mask analysis submodule reads the index information of all error bits based on the error bit index table, generates a mask structure according to the index, analyzes the mask structure to associate the corresponding data packet and error bit index, establishes a mapping table between the error bit and the data packet, and obtains the error position information.
6. The blockchain-based distributed powerline communication data management system of claim 1, wherein, The error repair module comprises an error bit reading submodule, an error bit correction submodule, and a data packet recombination submodule, wherein: The error bit reading submodule uses a convolutional neural network to locate the error bit in the data packet based on the error position information, reads and extracts the error bit and its position bit by bit, and generates a read error bit list by summarizing the position and the original value into an error bit record table; The error bit correction submodule reads and corrects the error bit in sequence based on the read error bit list, performs a correction operation on the bit stream error bit, covers the corrected bit in the original data packet, updates the bit stream structure of each data packet, and generates a corrected bit data packet. The data packet recombination submodule extracts the data packet content from all the corrected bit streams based on the correction bit data packet, recombines the data packet according to the original structure, traverses all the error bit positions and checks the repair condition, ensures the integrity of the data packet structure, and generates a set of repaired data packets.
7. The blockchain-based distributed powerline communication data management system of claim 1, wherein, The convolutional neural network is according to the formula: wherein: is the confidence score of the i-th bit being an error bit, x i is the bit value of the i-th bit in the input data packet, w i is the weight parameter of the convolution kernel for the i-th bit during the convolution process, d i is the density information of the local position of the i-th bit in the data packet, r is the transmission rate of the data packet, a is the weight coefficient of the density information, b is the bias term, and s (·) is the activation function.
8. The blockchain-based distributed powerline communication data management system of claim 1, wherein, The channel scheduling module includes a bandwidth matching submodule, a transmission sequence adjustment submodule, and a transmission path recording submodule, wherein: The bandwidth matching submodule reads the size of each data packet based on the repaired data packet set, reads the current available bandwidth by checking the remaining bandwidth of the channel, calculates the proportion of the data packet size to the remaining bandwidth of the channel, marks the data packets meeting the proportion as matched, and generates a bandwidth matching record; The transmission sequence adjustment submodule checks the size and priority of the matched data packets one by one based on the bandwidth matching record, sorts all the matched data packets according to the remaining bandwidth of the channel from high to low, and arranges the high-priority data packets in the front row according to the priority, and generates an adjusted transmission sequence; The transmission path recording submodule reads the transmission path information of each data packet based on the adjusted transmission sequence, records the start and end times of the transmission in the path table, and stores the path data in the order of the data packets, establishes a complete path structure, and generates a channel scheduling record.
9. The blockchain-based distributed powerline communication data management system of claim 1, wherein, The data consistency verification module includes a bit stream reading submodule, a data packet comparison submodule, and a retransmission triggering submodule, wherein: The bit stream reading submodule reads the transmission completed data packet one by one based on the channel scheduling record, and expands the bit stream in the data packet bit by bit, reads the original bit stream and the transmission bit stream synchronously, and stores them in a comparison table, and generates the transmission bit stream data; The data packet comparison submodule compares the original and transmission bit streams bit by bit based on the transmission bit stream data, marks the matched and unmatched bits in the comparison table, and extracts the data packet index of all the unmatched bits, and generates a comparison marking table; The retransmission triggering submodule reads the index position of the unmatched data packet based on the comparison marking table, triggers retransmission according to the difference, compares the retransmission data with the original data packet bit by bit, and confirms the completion of the retransmission, and generates a consistency verification result.
10. The blockchain-based distributed powerline communication data management system of claim 1, wherein, The blockchain storage module includes a path reading submodule, a state storage submodule, and a hash writing submodule, wherein: The path reading submodule reads the data packet path of the successful transmission based on the consistency verification result, extracts the start and end time of each data packet, arranges the path and time into a structure table, and generates a path state table; The state storage submodule reads the path and time of each data packet based on the path state table, arranges all the data packet paths in time sequence, and arranges them into a writable state table, and generates storage state data; The hash writing submodule writes the path and state data of each data packet into the hash table of the blockchain one by one based on the storage state data, stores the writing time as a block record, completes the on-chain storage of all data packet states, and establishes blockchain storage information.
Citation Information
Patent Citations
5G power distribution network feeder automation control method and device and storage medium
CN116996432A
Communication control method based on power line network dual-mode communication
CN118611706A