Block chain-based electric energy quality tracing method

By introducing blockchain technology and smart contracts in the electrical quality management system, the traditional system's lack of data security, real -time, and transparency has been solved, and more efficient and reliable electrical quality management and evaluation have been achieved.

CN119379097AInactive Publication Date: 2025-01-28GUANGDONG SHUNLI TECH CO LTD

Patent Information

Application Number
CN202411540182.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional power quality management systems have shortcomings in data security, real-time and transparency, especially in distributed power networks, which are difficult to meet the needs of modern power quality management.

Method used

Adopt the electrical energy quality traceability method based on the blockchain, through real -time collection and pre -processing electrical energy quality parameters, generate standardized data blocks, and perform blockchain records and consensus verification. Combined with smart contract deployment and multi -dimensional analysis algorithms to achieve data security of data , Transparent and efficient management.

Benefits of technology

It improves the safety and transparency of electrical energy quality data, enhances the credibility of the system and the user's trust, realizes more efficient power quality evaluation and management, and improves the response ability of the power system and the stability of the power supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379097A_ABST
    Figure CN119379097A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses an electric energy quality tracing method based on a block chain, which is used for improving the efficiency and accuracy of electric energy quality tracing based on the block chain. The method comprises the following steps: carrying out block chain recording and consensus verification on a standardized power quality data block to obtain power quality block chain data; performing intelligent contract deployment and automatic evaluation on the power quality block chain data to obtain a power quality evaluation result; performing visualization processing on the electric energy quality evaluation result through a multi-dimensional analysis algorithm to obtain an electric energy quality analysis report and an abnormal alarm; performing multi-party cooperative diagnosis and processing on the power quality abnormity problem in the abnormity alarm through a cooperative diagnosis platform to obtain a problem solution and a processing record; and performing traceability analysis and trend prediction on the power quality block chain data, the power quality analysis report and the processing record to obtain a power quality improvement suggestion and an optimization scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a power quality tracing method based on blockchain. Background Art

[0002] In the field of power quality management, existing technologies mainly rely on traditional data acquisition and monitoring systems, which usually adopt a centralized architecture and collect power quality parameters such as voltage, current, frequency and harmonics in real time through sensors and monitoring equipment. After preliminary processing, these data are stored in a centralized database for subsequent analysis. With the help of data analysis tools, relevant organizations can monitor the power quality status and identify potential abnormalities and faults. However, traditional systems have certain limitations in data security, real-time and transparency. Especially in the context of the growing development of distributed power networks, this centralized architecture often cannot meet the needs of modern power quality management.

[0003] The deficiencies in existing technologies are mainly reflected in the lack of data traceability and verification capabilities. In traditional systems, once data is collected and stored, it is difficult to ensure its integrity and authenticity, and it is easily affected by tampering or loss. In addition, due to the lack of a transparent recording and tracking mechanism, users and regulators often face challenges in the audit and monitoring process and are unable to accurately obtain historical data and changing trends in power quality. This series of problems leads to inefficient power quality monitoring and management, which seriously affects the safety and reliability of the power system. Therefore, there is an urgent need for a technical solution that can provide higher data security and transparency to achieve comprehensive monitoring and effective management of power quality. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a power quality tracing method based on blockchain, which is used to improve the efficiency and accuracy of power quality tracing based on blockchain.

[0005] The present invention provides a power quality tracing method based on blockchain, comprising: real-time collection and preprocessing of power quality parameters in various links of power production, transmission, distribution and consumption to obtain standardized power quality data blocks; blockchain recording and consensus verification of the standardized power quality data blocks to obtain power quality blockchain data; smart contract deployment and automatic evaluation of the power quality blockchain data to obtain power quality evaluation results; visualization of the power quality evaluation results through a multi-dimensional analysis algorithm to obtain a power quality analysis report and an abnormal alarm; multi-party collaborative diagnosis and processing of power quality abnormalities in the abnormal alarm through a collaborative diagnosis platform to obtain problem solutions and processing records; tracing analysis and trend prediction of the power quality blockchain data, the power quality analysis report and the processing records to obtain power quality improvement suggestions and optimization plans.

[0006] In the technical solution provided by the present invention, real-time acquisition and preprocessing technology are used to comprehensively monitor the power quality parameters of each link of power production, transmission, distribution and consumption, thereby ensuring the timeliness and accuracy of power quality data. By generating and processing standardized power quality data blocks, the monitoring of power quality not only covers all links, but also realizes the unification of data format, which is convenient for subsequent analysis and comparison. Secondly, in the process of data recording and consensus verification, the introduction of blockchain technology provides security and transparency for power quality data. The distributed ledger characteristics of blockchain make the power quality data tamper-proof once recorded, and all participants can access and verify the data in real time, thereby improving the credibility of the system and the trust of users. In addition, the deployment and automated evaluation of smart contracts greatly improve the efficiency of power quality evaluation. By setting clear evaluation rules, smart contracts can be automatically executed, reducing the risk of manual intervention, and accelerating the data processing process, so that the power quality evaluation results can be quickly fed back to the relevant parties, achieving more efficient decision support. The multi-dimensional analysis algorithm introduced in the solution provides in-depth insights for power quality analysis, and can present complex power quality data to users through visualization, forming easy-to-understand power quality analysis reports and abnormal alarms. This visualization technology not only facilitates daily monitoring by power operators, but also provides an intuitive analysis basis for abnormal power quality problems, helping to quickly locate and handle faults. At the same time, through the collaborative diagnosis platform, multi-party collaborative diagnosis and processing can be achieved for power quality problems in abnormal alarms, which promotes information sharing and resource integration among experts from all parties, thereby accelerating the problem-solving process. This multi-party collaboration mechanism improves the overall responsiveness of the power system and ensures the stability and reliability of power supply. By integrating and processing power quality blockchain data, analysis reports and processing records, a comprehensive power quality data set is formed, which can not only be reconstructed in a time series, but also build a power quality knowledge graph through a relationship network. This process makes power quality management not limited to simple recording of historical data, but can deeply analyze the relationship between data, realize causal chain tracking, and thus find the root cause of power quality problems. By clustering problem types, the power system can have a clearer understanding of existing problems and potential risk points, conduct scientific trend analysis and risk assessment, and ultimately provide a clear direction and optimization plan for power quality improvement, thereby improving the efficiency and accuracy of blockchain-based power quality traceability. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0008] Figure 1 This is a flowchart of a power quality tracing method based on blockchain in an embodiment of the present invention. DETAILED DESCRIPTION

[0009] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0010] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0011] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0012] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , Figure 1 is a flowchart of a power quality tracing method based on blockchain in an embodiment of the present invention, such as Figure 1 As shown, the following steps are included: S101, real-time collection and preprocessing of power quality parameters in each link of power production, transmission, distribution and consumption to obtain standardized power quality data blocks; S102, performing blockchain recording and consensus verification on the standardized power quality data block to obtain power quality blockchain data; S103, deploy smart contracts and automatically evaluate the power quality blockchain data to obtain power quality evaluation results; S104, visualizing the power quality assessment results through a multi-dimensional analysis algorithm to obtain a power quality analysis report and abnormal alarm; S105, performing multi-party collaborative diagnosis and processing on the power quality abnormality problem in the abnormal alarm through the collaborative diagnosis platform, and obtaining a problem solution and processing record; S106. Conduct traceability analysis and trend prediction on the power quality blockchain data, power quality analysis reports and processing records to obtain power quality improvement suggestions and optimization plans.

[0013] It should be noted that the power quality traceability method based on blockchain first deploys intelligent sensors and monitoring equipment in various links of power production, transmission, distribution and consumption to collect power quality parameters such as voltage, current, frequency, harmonics, power factor, etc. in real time. The collected raw data is initially screened and cleaned to remove obvious outliers and redundant information, and then standardized to unify the format and unit. Metadata such as timestamp, geographic location and device identification are added to each data to ensure the traceability of the data. Through the early warning mechanism, when the collected power quality parameters exceed the preset threshold, the alarm is triggered immediately. The preprocessed data is packaged into standardized data blocks, each of which contains power quality information within a certain period of time. Next, the standardized power quality data blocks are uploaded to a specially designed power quality blockchain network. This network adopts a consortium chain structure, and the participants include power production enterprises, power grid companies, distribution units, large power users and regulatory departments. When a new data block is submitted, the nodes in the network first verify the integrity and legitimacy of the data. After the verification, the improved proof-of-work (PoW) consensus algorithm is used to determine which node creates a new block. When a new block is created, it contains all the power quality data within a certain period of time, as well as the hash value, timestamp and other necessary information of the previous block. Other nodes verify the validity of the new block and add it to the chain after reaching a consensus, forming the power quality blockchain data.

[0014] Then, a series of smart contracts are deployed in the blockchain network, which are automatically executed according to the preset power quality standards and rules. The content of the smart contract includes voltage deviation determination, harmonic content assessment, frequency fluctuation analysis, comprehensive power quality evaluation, etc. The smart contract management system is responsible for the deployment, update and monitoring of the contract, and can dynamically adjust the contract content according to the latest power industry standards and regulations. When a new data block is added to the blockchain, the smart contract management system automatically scans the data content to identify whether the contract trigger conditions are met. If so, the corresponding smart contract is automatically executed to obtain the power quality assessment results. Based on the results of smart contract execution, the multi-dimensional power quality analysis system conducts in-depth analysis of power quality data from multiple dimensions such as time, space, and parameter type. Using time series analysis technology, long-term trends and periodic changes in power quality parameters are identified. Using spatial clustering algorithms, power quality differences and potential problem areas in different geographical regions are discovered. Multivariate correlation analysis is used to explore the inherent connections between different power quality parameters. The analysis results are presented in an intuitive and interactive way through a visualization platform, supporting a variety of chart types, such as heat maps, trend lines, and scatter plots. At the same time, the Geographic Information System (GIS) is integrated to associate power quality data with geographic locations to form a power quality map. The anomaly detection algorithm automatically identifies abnormal power quality patterns based on historical data and statistical models. When an anomaly is detected, the system will highlight it in the visual interface and send an alarm to relevant personnel.

[0015] For detected abnormal problems, the collaborative problem diagnosis and processing platform allows different parties to jointly participate in the problem diagnosis and resolution process. The platform automatically generates a preliminary problem diagnosis report, including problem description, possible causes, scope of impact, etc. Then, a collaborative process based on smart contracts is initiated. Stakeholders can submit their own diagnostic opinions, evidence, and solutions on the chain. Each submission is recorded on the blockchain, ensuring the transparency and traceability of the process. The reputation-based incentive mechanism encourages participants to provide valuable diagnoses and solutions. The intelligent decision support system comprehensively considers the opinions of all parties, historical cases, and current conditions to provide suggestions for the final solution. Finally, the power quality traceability system is able to track the power quality status at any point in time and any node, and analyze its historical change trends. The intelligent search engine supports multi-dimensional and multi-condition traceability queries. The knowledge graph system semantically associates information such as power quality data, problem diagnosis, and processing solutions, displays the relationship between data, and discovers potential laws and connections. The machine learning-based prediction model uses historical data to predict future power quality trends and guide preventive maintenance and system optimization. The continuous improvement management system regularly analyzes the long-term trends of power quality, identifies systemic problems and improvement opportunities, automatically generates improvement suggestions, and distributes them to relevant parties through the blockchain network.

[0016] For example, a power company deployed the power quality traceability system in its distribution network. The system collected about 1 million power quality data in one month, including parameters such as voltage, frequency, and harmonics. Through preprocessing, the data was compressed and packaged into 10,000 standardized data blocks. These data blocks were recorded on the blockchain, forming a power quality blockchain containing 10,000 blocks. The smart contract automatically performed 50,000 evaluations and found 500 potential power quality problems. The multi-dimensional analysis system generated a detailed monthly report, including 30 trend charts, 10 heat maps, and 5 associated network diagrams. Among them, the system identified that the voltage fluctuations in a distribution station area were frequent and exceeded the standard threshold. The collaborative diagnosis platform convened experts from power grid companies, equipment manufacturers, and power users for remote consultation. By analyzing historical data and on-site inspections, it was determined that the problem originated from an aging transformer. The experts proposed a solution to replace the equipment on the platform, which was recorded and executed on the blockchain. One month later, the system's trend forecast showed that the voltage stability in the area had improved by 15%, saving the power company approximately $500,000 in potential losses.

[0017] By executing the above steps, the power quality parameters of each link of power production, transmission, distribution and consumption are comprehensively monitored using real-time acquisition and preprocessing technology, thereby ensuring the timeliness and accuracy of power quality data. By generating and processing standardized power quality data blocks, the monitoring of power quality not only covers all links, but also realizes the unification of data format, which is convenient for subsequent analysis and comparison. Secondly, in the process of data recording and consensus verification, the introduction of blockchain technology provides security and transparency for power quality data. The distributed ledger characteristics of blockchain make power quality data tamper-proof once recorded, and all participants can access and verify data in real time, thereby improving the credibility of the system and the trust of users. In addition, the deployment and automated evaluation of smart contracts have greatly improved the efficiency of power quality evaluation. By setting clear evaluation rules, smart contracts can be automatically executed, reducing the risk of manual intervention, and accelerating the data processing process, so that the power quality evaluation results can be quickly fed back to the relevant parties, achieving more efficient decision support. The multi-dimensional analysis algorithm introduced in the solution provides in-depth insights for power quality analysis, and can present complex power quality data to users through visualization, forming easy-to-understand power quality analysis reports and abnormal alarms. This visualization technology not only facilitates daily monitoring by power operators, but also provides an intuitive analysis basis for abnormal power quality problems, helping to quickly locate and handle faults. At the same time, through the collaborative diagnosis platform, multi-party collaborative diagnosis and processing can be achieved for power quality problems in abnormal alarms, which promotes information sharing and resource integration among experts from all parties, thereby accelerating the problem-solving process. This multi-party collaboration mechanism improves the overall responsiveness of the power system and ensures the stability and reliability of power supply. By integrating and processing power quality blockchain data, analysis reports and processing records, a comprehensive power quality data set is formed, which can not only be reconstructed in a time series, but also build a power quality knowledge graph through a relationship network. This process makes power quality management not limited to simple recording of historical data, but can deeply analyze the relationship between data, realize causal chain tracking, and thus find the root cause of power quality problems. By clustering problem types, the power system can have a clearer understanding of existing problems and potential risk points, conduct scientific trend analysis and risk assessment, and ultimately provide a clear direction and optimization plan for power quality improvement, thereby improving the efficiency and accuracy of blockchain-based power quality traceability.

[0018] In a specific embodiment, the process of executing step S101 may specifically include the following steps: (1) Sampling and digitizing the power quality parameters to obtain original power quality data, and time-stamping the original power quality data to obtain time series power quality data; (2) Detect and remove outliers in the time series power quality data to obtain cleaned power quality data, and perform data format unification on the cleaned power quality data to obtain power quality data in a unified format; (3) performing data compression processing on the power quality data in a unified format to obtain compressed power quality data, and performing encryption processing on the compressed power quality data to obtain encrypted power quality data; (4) Segmenting the encrypted power quality data to obtain power quality data segments, and performing hash processing on the power quality data segments to obtain power quality data hash values; (5) The hash value of the power quality data and the encrypted power quality data are combined to obtain a power quality data packet, and the power quality data packet is verified and calculated to obtain a standardized power quality data block.

[0019] Specifically, the sampling frequency needs to be high enough to capture instantaneous changes in power quality, and is usually set to hundreds of times the base frequency of the power grid. The digitized data is the original power quality data, including parameters such as voltage, current, frequency, and harmonics. Subsequently, a timestamp accurate to the millisecond level is added to each piece of raw data to form time series power quality data. This timestamp ensures the time sequence and traceability of the data, laying the foundation for subsequent trend analysis and anomaly detection. Next, outlier detection and removal are performed on the time series power quality data. Statistical methods, such as the moving average method and the standard deviation method, are used to identify and remove data points that are significantly deviated from the normal range. For example, abnormal conditions such as voltage mutations or frequency drops will be marked and further analyzed. The data after outliers are removed is called cleaned power quality data. Then, the cleaned data is formatted uniformly, and data from different sources and types are converted into a unified format and unit. This ensures data consistency and facilitates subsequent analysis and processing.

[0020] In order to improve the efficiency of data transmission and storage, the power quality data in a unified format is compressed. The selection of compression algorithm needs to strike a balance between compression rate and information retention. Common methods include wavelet transform compression or differential coding compression. The size of the compressed data is significantly reduced, but the key power quality information is retained. Subsequently, the compressed data is encrypted to protect sensitive information. The encryption algorithm uses a high-intensity symmetric encryption method, such as AES (Advanced Encryption Standard), to ensure the security of data during transmission and storage. The encrypted power quality data is segmented by a sliding window algorithm to divide the continuous data stream into fixed-size data segments. This segmentation method facilitates parallel processing and flexible management. A hash value is calculated for each data segment, using a cryptographic secure hash algorithm such as SHA-256. The hash value serves as a checksum fingerprint for data integrity and can quickly detect whether the data has been tampered with.

[0021] Finally, the hash value of the power quality data and the corresponding encrypted power quality data are combined to form a power quality data packet. A checksum is calculated for each data packet, usually using a cyclic redundancy check (CRC) algorithm. The addition of the checksum further enhances the integrity protection of the data. After this series of processing, a standardized power quality data block is obtained, which contains all the information of the original data and has security, integrity and traceability. For example, a smart substation collects voltage data in one day with a sampling frequency of 10kHz. The amount of original data is about 864 million sampling points (24 hours * 3600 seconds * 10000 samples / second). After timestamping, each data point has a time information accurate to milliseconds. Anomaly detection found about 0.1% of abnormal points, which were marked and temporarily removed from the main data stream. Data format unification converts voltage values ​​into kilovolt (kV) units. Compression processing reduces the amount of data to 20% of the original, about 173 million valid data points. The encrypted data is divided into 1728 data fragments, each containing 100,000 data points. The SHA-256 hash value is calculated for each fragment to obtain a 32-byte hash string. Finally, the 1728 data packets are combined into a complete standardized power quality data block with a total size of about 350MB, which contains complete information on the voltage quality of the substation within one day, which not only ensures the authenticity and integrity of the data, but also greatly improves the efficiency of data processing and transmission.

[0022] In a specific embodiment, the process of executing step S102 may specifically include the following steps: (1) Encapsulating the standardized power quality data block into a block structure to obtain a candidate block, and digitally signing the candidate block to obtain a signed candidate block; (2) Perform consensus verification on the signed candidate blocks to obtain the verified blocks, and link the verified blocks to obtain the updated blockchain; (3) Perform distributed storage processing on the updated blockchain to obtain blockchain data stored in multiple nodes, and perform consistency check on the blockchain data stored in multiple nodes to obtain consistency check results; (4) Synchronize the blockchain data stored in multiple nodes according to the consistency check results to obtain synchronized blockchain data, and index the synchronized blockchain data to obtain indexed blockchain data; (5) Perform data integrity verification on the indexed blockchain data to obtain the verified blockchain data, and use the verified blockchain data as the power quality blockchain data.

[0023] Specifically, the data blocks are organized into a specific block structure, including a block header and a block body. The block header contains information such as the version number, the hash value of the previous block, the timestamp, the difficulty target, and the random number, while the block body contains specific power quality data. The encapsulated structure is called a candidate block, which is the basic unit ready to join the blockchain. Subsequently, the candidate block is digitally signed, usually using the elliptic curve digital signature algorithm (ECDSA). This ensures the credibility and non-repudiation of the source of the data, while preventing the data from being tampered with. The signed candidate block enters the consensus verification phase, which is a key step to ensure that all nodes in the blockchain network reach a consensus. In the power quality traceability system, an improved proof-of-work (PoW) consensus algorithm is adopted. This improvement takes into account the reputation and historical contribution of the node, improves efficiency while ensuring decentralization, and reduces energy consumption. The blocks that pass the verification will be added to the end of the existing blockchain to form an updated blockchain. This process involves updating the pointer structure of the blockchain, ensuring that the new block is linked to the previous block through cryptographic methods, and maintaining the continuity and immutability of the blockchain.

[0024] The updated blockchain data needs to be distributed and stored among multiple nodes in the network. This storage method enhances the redundancy and availability of data and prevents data loss due to single point failure. During the storage process, sharding technology is used to divide large blockchain data into smaller, manageable parts and assign them to different nodes for storage. After the distributed storage is completed, a consistency check is immediately performed to ensure that the data on all nodes is consistent. The consistency check uses the Merkle tree structure to quickly compare the data differences between different nodes. According to the results of the consistency check, if the data is inconsistent, the synchronization processing mechanism is started. The synchronization process uses an efficient data transmission protocol to only transmit inconsistent data blocks instead of the entire blockchain, thereby saving bandwidth and time. After the synchronization is completed, the blockchain data is indexed, which greatly improves the efficiency of data query. The index structure includes time index, geographic location index, and power quality parameter index, etc., allowing users to quickly locate and retrieve specific power quality data.

[0025] Finally, the indexed blockchain data is fully verified for data integrity. The hash value of each block is recalculated using a cryptographic hash function and compared with the stored hash value to ensure that the data has not been tampered with or damaged during storage and processing. The blockchain data that has passed the verification becomes the final power quality blockchain data, providing a reliable data basis for subsequent power quality analysis and traceability. For example, there are 10 nodes in the blockchain network of a power company involved in the processing and storage of power quality data. During one day of operation, the system generated 144 standardized power quality data blocks (one every 10 minutes on average). Each data block is about 2.5MB in size and contains detailed power quality parameters during that time period. The block structure encapsulation process organizes this data into candidate blocks, each block header is 80 bytes in size, and contains metadata such as version number and timestamp. The digital signature process adds 64 bytes of signature data to each candidate block. In the consensus verification stage, the improved PoW algorithm takes an average of 30 seconds to complete the verification of a block, which is 50% more efficient than the traditional PoW algorithm. After verification, the new block was added to the blockchain, the chain length increased by 144 blocks, and the total data volume increased by about 360MB. The distributed storage process dispersed the 360MB of new data on 10 nodes, increasing the storage burden of each node by an average of 36MB. The consistency check found that there were slight differences in the data of 2 nodes, and these differences were corrected within 5 seconds through synchronization. The index establishment process created an index structure of about 1MB for the new data, which significantly improved the data retrieval speed. The final integrity verification confirmed that the data of all 144 new blocks remained intact and there was no sign of tampering. The data processing and storage process for this day took a total of about 75 minutes, most of which was spent on consensus verification and data synchronization, while the actual data transmission and storage time accounted for only about 15% of the total time.

[0026] In a specific embodiment, the process of executing step S103 may specifically include the following steps: (1) Encoding the preset power quality assessment rules into a smart contract to obtain a power quality assessment smart contract, and conducting a security audit on the power quality assessment smart contract to obtain an audited smart contract; (2) Deploy the audited smart contract on the blockchain to obtain the deployed smart contract, and set the trigger conditions for the deployed smart contract to obtain an executable smart contract; (3) Monitor the power quality blockchain data in real time through the event monitoring mechanism to obtain the trigger execution conditions, and call the executable smart contract according to the trigger execution conditions to obtain the executing smart contract; (4) Pass parameters to the smart contract being executed to obtain a smart contract instance with parameters, and execute the smart contract instance with parameters through the blockchain virtual machine to obtain the smart contract execution result; (5) Formatting the smart contract execution results to obtain formatted evaluation data, and using the formatted evaluation data as the power quality evaluation results.

[0027] Specifically, the preset power quality assessment rules are coded into smart contracts, and the assessment criteria such as voltage deviation, harmonic content, and frequency fluctuation are converted into executable code logic. The coding uses a special language for smart contracts to ensure that the contract can run in environments such as the Ethereum Virtual Machine (EVM). After the coding is completed, a comprehensive security audit is conducted on the power quality assessment smart contract, including static code analysis, dynamic testing, and formal verification methods to find potential vulnerabilities and logical errors. The audit process focuses on common security issues such as reentrancy attacks and integer overflows to ensure that the contract can run safely under various circumstances. The audited smart contract is then deployed to the blockchain network. The deployment process includes compiling the contract code into bytecode and sending it to the blockchain network through special transactions. Once deployed successfully, the smart contract will obtain a unique address for subsequent calls and interactions. Trigger conditions are set for the deployed smart contract, which define when the contract is automatically executed. In the power quality traceability system, trigger conditions may include specific time intervals, power quality parameters exceeding preset thresholds, etc. After setting the trigger conditions, the smart contract becomes executable and is ready to respond to events that meet the conditions.

[0028] The power quality blockchain data is monitored in real time through the event monitoring mechanism. This mechanism sets up multiple monitoring nodes in the blockchain network to continuously scan the newly added block data. When data that meets the preset trigger conditions is detected, such as a voltage sag exceeding 10% or a harmonic distortion rate exceeding 5%, a trigger execution condition is generated. Based on these conditions, the system automatically calls the corresponding executable smart contract and converts it to an executing state. Parameters are passed to the executing smart contract, and real-time power quality data is passed into the contract as input parameters. Parameters may include specific voltage values, current values, frequency values, etc. The parameter passing process ensures that the contract can calculate and judge based on the latest data. The smart contract instance with parameters is then submitted to the blockchain virtual machine for execution. The virtual machine provides an isolated execution environment for the smart contract to ensure the security and consistency of the execution process. During the execution process, the contract analyzes and evaluates the input power quality data according to the preset logic to obtain the execution result.

[0029] Finally, the execution results of the smart contract are formatted. The original execution output is converted into a standardized format to facilitate subsequent storage, transmission and analysis. The formatting process may include data type conversion, unit unification, structured encapsulation and other operations. The processed data serves as the final power quality assessment result, providing a basis for power quality traceability and analysis.

[0030] For example, a power company deployed a smart contract for evaluating the voltage quality of the distribution network. The contract code includes the evaluation logic for voltage deviation, fluctuation, and flicker. The security audit process found and fixed a potential integer overflow vulnerability. After deployment, the contract was set to automatically trigger once every hour, and also triggered execution when the voltage deviation exceeded ±7%. In one execution, the event monitoring mechanism captured the voltage value of a distribution line as 207V (nominal voltage 220V), triggering the contract execution. The contract received this voltage value as an input parameter and calculated the voltage deviation to be -5.91%. The virtual machine executed the contract logic and determined that although the voltage deviation exceeded the normal range (±5%), it did not reach the critical level (±10%). The execution results include the deviation percentage, duration, and severity rating. The formatting process converts these results into JSON format, including timestamp, location information, specific parameter values, and evaluation conclusions. This result is recorded on the blockchain and triggers a low-level alarm to remind the operation and maintenance personnel to pay attention to the voltage status of the line.

[0031] In a specific embodiment, the process of executing step S104 may specifically include the following steps: (1) Perform data classification processing on the power quality assessment results to obtain classified power quality data, and perform trend analysis on the classified power quality data through a time series analysis algorithm to obtain power quality trend data; (2) Analyze the geographical distribution of power quality trend data to obtain the geographical distribution characteristics of power quality, and generate a thermal map of the geographical distribution characteristics of power quality to obtain a power quality thermal map; (3) Perform parameter correlation analysis on the classified power quality data to obtain a power quality parameter correlation matrix, and perform network diagram generation processing on the power quality parameter correlation matrix to obtain a power quality correlation network diagram; (4) Perform abnormal pattern recognition on the power quality trend data to obtain abnormal power quality data, and perform threshold comparison processing on the abnormal power quality data to obtain abnormal alarm; (5) Integrate and process the power quality trend data, power quality thermal diagram, power quality correlation network diagram and abnormal alarm to obtain comprehensive analysis results, and use the comprehensive analysis results as a power quality analysis report.

[0032] Specifically, the power quality assessment results are analyzed in detail through data classification processing. According to different power quality indicators, such as voltage fluctuation, frequency deviation, harmonic content, etc., the data can be divided into different categories to obtain classified power quality data. The purpose of this classification processing is to clarify the characteristics of different types of power quality problems, make subsequent data analysis more targeted, and improve the overall data processing efficiency. After obtaining the classified data, the trend analysis is performed on it using the time series analysis algorithm, which can mine the changing rules of power quality. For example, time series analysis can use the autoregressive moving average (ARMA) model, set a suitable time window, calculate the expected trend of future power quality changes based on historical data, and generate power quality trend data. Next, the geographical distribution analysis of power quality trend data can reveal the distribution characteristics of power quality in different regions. By introducing geographic information system (GIS) technology and using the geographical coordinates of power quality monitoring points, the trend data is mapped into geographic space, so as to obtain the geographical distribution characteristics of power quality, and further generate a heat map. The heat map intuitively displays the advantages and disadvantages of power quality in different regions through the changes in color depth, which helps decision makers quickly identify problem areas. For example, if the power quality heat map of a certain area shows that there are more red areas, it means that the power quality in the area is generally low and needs to be paid special attention and improved.

[0033] When performing parameter correlation analysis on power quality data, a power quality parameter correlation matrix is ​​formed, which reveals the relationship between different power quality parameters. For example, the relationship between voltage fluctuation and harmonic content can be determined by calculating the Pearson correlation coefficient between parameters, and a matrix composed of parameter relationships can be obtained. On this basis, the power quality parameter correlation matrix is ​​visualized to generate a power quality correlation network diagram. The nodes in the network diagram represent power quality parameters, and the strength of the edges represents the degree of correlation between the parameters. It can not only help identify the parameters that mainly affect power quality, but also provide guidance for further optimization measures. The process of abnormal pattern recognition of power quality trend data is also crucial. By setting reasonable thresholds and using machine learning algorithms such as support vector machines (SVM) or isolation forest algorithms to perform abnormal detection on power quality trend data, potential power quality problems can be effectively identified. For example, when the voltage fluctuation exceeds the set threshold, the system will trigger an abnormal alarm to prompt relevant staff to intervene and handle it in time.

[0034] Finally, a comprehensive analysis result is formed by integrating power quality trend data, power quality thermal diagram, power quality correlation network diagram and abnormal alarm. This comprehensive analysis result will be used as a power quality analysis report to provide a reference for relevant decisions. Through the above analysis, the report formed not only includes the current status of power quality, but also covers potential risks and improvement directions, guiding the optimization and improvement of power quality.

[0035] For example, suppose that in a certain assessment, the classification of voltage fluctuation data shows that 50% of the samples have fluctuations greater than ±5% (the set normal range). After trend analysis, it is found that these fluctuations are on the rise in a specific time period. Combined with the geographical distribution analysis, it is found that these fluctuations are concentrated in several important power supply areas, and the heat map shows that the power quality in these areas is poor. Through parameter correlation analysis, it is found that these fluctuations have a high correlation with harmonic content and trigger alarms in abnormal pattern recognition. After these data are integrated, the power quality analysis report formed will point out the key improvement directions for the power company, prompting it to take targeted measures and ultimately achieve continuous improvement in power quality.

[0036] In a specific embodiment, the process of executing step S105 may specifically include the following steps: (1) Classify the abnormal alarms to obtain the classified abnormal problems, and perform preliminary diagnosis and analysis on the classified abnormal problems to obtain a preliminary diagnosis report; (2) The preliminary diagnostic report is shared among multiple parties through blockchain smart contracts to obtain shared diagnostic information, and the shared diagnostic information is managed with permissions to obtain accessible diagnostic data; (3) Collecting opinions from multiple parties on accessible diagnostic data to obtain a set of multiple diagnostic opinions, and summarizing the set of multiple diagnostic opinions through a consensus algorithm to obtain a comprehensive diagnostic result; (4) Match the comprehensive diagnosis results with similar cases to obtain a set of candidate solutions, and then evaluate and screen the candidate solution set through a multi-criteria decision-making algorithm to obtain a solution to the problem; (5) The execution process of the problem solution is recorded in real time to obtain the execution process data, and the execution process data is stored and processed on the blockchain to obtain the processing record.

[0037] Specifically, machine learning algorithms, such as support vector machines (SVM) or decision trees, are used to automatically classify alarms into categories such as voltage anomalies, harmonic interference, and frequency deviation. The classified anomalies then enter the preliminary diagnosis and analysis phase, using expert systems and rule bases to quickly evaluate each type of problem and generate a preliminary diagnosis report. This report contains a description of the problem, possible causes, and preliminary recommendations. Next, the preliminary diagnosis report is shared by multiple parties through blockchain smart contracts. Smart contracts automatically encrypt and distribute the diagnostic report to predefined stakeholders, such as power companies, equipment suppliers, and regulators. During the sharing process, a role-based access control (RBAC) mechanism is used to strictly manage the permissions of the shared diagnostic information. Different roles are given different access rights to ensure that sensitive information is only visible to specific users, thereby obtaining accessible diagnostic data.

[0038] The next key step is to collect opinions from multiple parties on the accessible diagnostic data. Through the collaborative tools on the blockchain platform, experts from all parties are allowed to submit their diagnostic opinions and suggestions. Each opinion is recorded on the blockchain, ensuring the transparency and traceability of the process. The collected multi-party diagnostic opinion set is then aggregated and processed through a consensus algorithm. The consensus algorithm used here is different from the blockchain consensus. It is a decision fusion algorithm based on expert weights. It considers the experience and historical accuracy of each expert, and performs a weighted average of different opinions to finally obtain a comprehensive diagnostic result. The comprehensive diagnostic result then enters the similar case matching stage. Using case-based reasoning (CBR) technology, the current problem is compared with the records in the historical case library. The matching process considers multiple features, such as problem type, symptom description, environmental factors, etc. By calculating the similarity score, the most relevant historical cases are selected to form a set of candidate solutions. These candidate solutions are then evaluated and screened through a multi-criteria decision-making algorithm. The algorithm comprehensively considers multiple factors such as the feasibility, cost, time efficiency and potential risks of the solution, calculates a comprehensive score for each solution, and finally selects the best solution to the problem.

[0039] Finally, the execution process of the selected problem solution is recorded in real time. This includes recording detailed information such as each execution step, resources used, obstacles encountered, and actual effects. These execution process data are uploaded to the blockchain network in real time, and after encryption and consensus verification, they become tamper-proof blockchain records. This approach ensures the transparency and traceability of the entire problem-solving process, providing valuable data support for subsequent analysis and optimization.

[0040] For example, a distribution network had a serious voltage fluctuation problem during one operation. The system first classified this abnormal alarm as a "voltage quality problem" and speculated through preliminary diagnostic analysis that it might be caused by a sudden load change or a grid equipment failure. This preliminary diagnostic report was shared with the grid operator, equipment manufacturer and local regulatory authorities through smart contracts. The grid operator's experts accessed the full report through the permission management system, while the equipment manufacturer could only see some of the relevant information. During the multi-party opinion collection stage, the three experts put forward their views respectively: the grid operator suspected that it was a distribution transformer tap switching problem, the equipment manufacturer believed that it might be an abnormality in the static VAR compensator (SVC) control system it produced, and the regulatory authorities suggested checking whether there were large industrial users who violated the rules in electricity use. These opinions were summarized through a consensus algorithm, which assigned different weights according to the accuracy of the parties' past problem solving. The final comprehensive diagnostic result tended to be the most likely problem with the distribution transformer. The system then matched three similar historical cases in the case library, involving transformer tap switching failure, SVC failure and sudden load increase by large users. The multi-criteria decision-making algorithm comprehensively evaluated the solutions for these three situations, and finally selected the solution of inspecting and repairing the transformer tap switching mechanism, taking into account the maintenance difficulty, impact scope and resolution time.

[0041] During the execution process, every operation step of the maintenance team was recorded: from power outage, checking the tap switching mechanism, discovering mechanical jams, replacing parts to finally restoring power. These data are uploaded to the blockchain in real time, forming a complete record of the problem-solving process. The whole process took 4 hours and finally successfully solved the voltage fluctuation problem, and the voltage quality indicators returned to the national standard range.

[0042] In a specific embodiment, the process of executing step S106 may specifically include the following steps: (1) Integrate the power quality blockchain data, power quality analysis report and processing records to obtain a comprehensive power quality data set, and reconstruct the time series of the comprehensive power quality data set to obtain time-series power quality data; (2) Construct a relational network for the time-series power quality data to obtain a power quality knowledge graph, and perform semantic analysis on the power quality knowledge graph to obtain power quality semantically associated data; (3) Tracing the causal chain of power quality semantically associated data to obtain the root cause data of power quality problems, and clustering the root cause data of power quality problems to obtain the distribution of power quality problem types; (4) Perform trend analysis on the time-series power quality data to obtain the power quality development trend prediction results, and conduct risk assessment on the power quality development trend prediction results to obtain the potential risk point identification results; (5) Comprehensively analyze the distribution of power quality problem types and the identification results of potential risk points to obtain the direction of power quality improvement, and generate solutions for the direction of power quality improvement to obtain power quality improvement suggestions and optimization solutions.

[0043] Specifically, by collating the power quality blockchain data, the first step of integration is to combine these data with power quality analysis reports and processing records to form a comprehensive power quality data set. This data set not only contains power quality data from different links, but also covers relevant analysis results and processing information, thereby providing comprehensive basic data for subsequent analysis. By cleaning and formatting this information, the consistency and availability of the data are ensured, for example, using a unified timestamp and data format to process the data so that it is suitable for time series analysis. Next, the time series reconstruction is performed on the comprehensive power quality data set to facilitate the analysis of the changes in power quality over time. In this process, the time series algorithm is used to interpolate, smooth and trend the power quality parameters at different time points to construct power quality data with time series characteristics. This reconstruction process can reveal the long-term trend and short-term fluctuations of power quality, thereby providing basic data for the subsequent construction of the relationship network.

[0044] When constructing the relationship network, the association analysis method in graph theory is used to generate the power quality knowledge graph. By analyzing the correlation between power quality parameters, the mutual influence between different parameters can be found, for example, the relationship between voltage fluctuation and load change. After constructing the knowledge graph, further semantic analysis is performed to extract potential power quality related data, which can be used to identify the potential root causes of power quality problems and form a complete power quality knowledge system. When identifying the root source data, the causal chain tracing method is used to track the cause of the power quality problem. This process involves extracting relevant parameters and events from the identified power quality problems, and analyzing the interaction between these factors by establishing a causal relationship model. For example, if the power quality is found to be abnormal, it may be caused by a sharp increase in load during a certain period of time. By clustering these factors, the distribution of power quality problem types can be obtained, which helps to identify the most common power quality problems and the conditions under which they occur.

[0045] When conducting power quality trend analysis, firstly, based on the time-series power quality data, regression analysis or time series prediction models are used to analyze the development trend of power quality. These models can capture trends and seasonal fluctuations in the data. For example, if the data shows that power quality fluctuates in the summer due to increased air conditioning load, the power quality changes in the next few months can be predicted. In addition, risk assessment is performed on the prediction results to identify potential risk points, such as the risk of power quality failure during certain load peak periods. Finally, the distribution of power quality problem types and the results of potential risk point identification are comprehensively analyzed to form the direction of power quality improvement. This process identifies the links that need to be optimized by associating the identified power quality problems with the predicted risk points. For example, if it is found that the power quality fluctuations are mainly concentrated in a specific period of time, specific improvement suggestions can be put forward by optimizing load management or upgrading equipment. Based on these improvement suggestions, a systematic optimization plan is formed to ensure the stability and reliability of power quality in the future.

[0046] For example, an analysis showed that during the peak hours in summer, the voltage fluctuation rate was 15%, while after analyzing the comprehensive power quality data set, it was found that the load during this period increased by an average of 30%. By establishing a causal chain, it was determined that the voltage fluctuation was mainly caused by the increase in load. At this time, load management strategies can be implemented, such as optimizing the distribution of peak loads or introducing intelligent dispatching systems to reduce the impact of peak loads on power quality. This process not only improves the stability of power quality, but also provides data support for the operation of the power system, and ultimately forms a practical improvement plan.

[0047] The above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the embodiments, a person skilled in the art should understand that the specific implementation modes of the present invention can still be modified or replaced by equivalents, and any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A power quality tracing method based on blockchain, characterized in that: include: Real-time collection and preprocessing of power quality parameters in each link of power production, transmission, distribution and consumption to obtain standardized power quality data blocks; Performing blockchain recording and consensus verification on the standardized power quality data block to obtain power quality blockchain data; Performing smart contract deployment and automated evaluation on the power quality blockchain data to obtain a power quality evaluation result; Visualizing the power quality assessment results through a multi-dimensional analysis algorithm to obtain a power quality analysis report and abnormal alarm; The power quality abnormality problem in the abnormal alarm is diagnosed and processed by multiple parties through a collaborative diagnosis platform to obtain a solution and processing record; The power quality blockchain data, the power quality analysis report and the processing record are subjected to traceability analysis and trend prediction to obtain power quality improvement suggestions and optimization plans.

2. The power quality tracing method based on blockchain according to claim 1 is characterized in that: The step of collecting and preprocessing the power quality parameters of each link of power production, transmission, distribution and consumption in real time to obtain standardized power quality data blocks includes: Sampling and digitizing the power quality parameters to obtain original power quality data, and timestamping the original power quality data to obtain time series power quality data; Performing outlier detection and removal on the time series power quality data to obtain cleaned power quality data, and performing data format unification processing on the cleaned power quality data to obtain power quality data in a unified format; Performing data compression processing on the power quality data in the unified format to obtain compressed power quality data, and performing encryption processing on the compressed power quality data to obtain encrypted power quality data; Segmenting the encrypted power quality data to obtain power quality data segments, and hashing the power quality data segments to obtain power quality data hash values; The power quality data hash value and the encrypted power quality data are combined to obtain a power quality data packet, and the power quality data packet is checked and calculated to obtain the standardized power quality data block.

3. The power quality tracing method based on blockchain according to claim 1 is characterized in that: The step of recording and verifying the standardized power quality data block through blockchain to obtain power quality blockchain data includes: Performing block structure encapsulation on the standardized power quality data block to obtain a candidate block, and performing digital signature processing on the candidate block to obtain a signed candidate block; Performing consensus verification on the signed candidate blocks to obtain verified blocks, and linking the verified blocks to obtain an updated blockchain; Performing distributed storage processing on the updated blockchain to obtain blockchain data stored in multiple nodes, and performing consistency check on the blockchain data stored in multiple nodes to obtain consistency check results; Synchronize the blockchain data stored in the multiple nodes according to the consistency check result to obtain synchronized blockchain data, and index the synchronized blockchain data to obtain indexed blockchain data; The indexed blockchain data is subjected to data integrity verification to obtain verified blockchain data, and the verified blockchain data is used as the power quality blockchain data.

4. The power quality tracing method based on blockchain according to claim 1 is characterized in that: The step of performing smart contract deployment and automated evaluation on the power quality blockchain data to obtain a power quality evaluation result includes: Performing smart contract coding on the preset power quality assessment rules to obtain a power quality assessment smart contract, and performing a security audit on the power quality assessment smart contract to obtain an audited smart contract; Deploy the audited smart contract on the blockchain to obtain a deployed smart contract, and set trigger conditions for the deployed smart contract to obtain an executable smart contract; The power quality blockchain data is monitored in real time through an event monitoring mechanism to obtain a trigger execution condition, and the executable smart contract is called according to the trigger execution condition to obtain the executing smart contract; Passing parameters to the smart contract being executed to obtain a smart contract instance with parameters, and executing the smart contract instance with parameters through a blockchain virtual machine to obtain a smart contract execution result; The smart contract execution result is formatted to obtain formatted evaluation data, and the formatted evaluation data is used as the power quality evaluation result.

5. The power quality tracing method based on blockchain according to claim 1 is characterized in that: The step of visualizing the power quality assessment result by a multi-dimensional analysis algorithm to obtain a power quality analysis report and an abnormality alarm comprises: Performing data classification processing on the power quality assessment results to obtain classified power quality data, and performing trend analysis on the classified power quality data using a time series analysis algorithm to obtain power quality trend data; Performing a geographical distribution analysis on the power quality trend data to obtain geographical distribution characteristics of power quality, and performing a thermal map generation process on the geographical distribution characteristics of power quality to obtain a power quality thermal map; Performing parameter association analysis on the classified power quality data to obtain a power quality parameter association matrix, and performing network diagram generation processing on the power quality parameter association matrix to obtain a power quality association network diagram; Performing abnormal pattern recognition on the power quality trend data to obtain abnormal power quality data, and performing threshold comparison processing on the abnormal power quality data to obtain the abnormal alarm; The power quality trend data, the power quality thermal diagram, the power quality associated network diagram and the abnormal alarm are integrated and processed to obtain a comprehensive analysis result, and the comprehensive analysis result is used as the power quality analysis report.

6. The power quality tracing method based on blockchain according to claim 1 is characterized in that: The step of performing multi-party collaborative diagnosis and processing on the power quality abnormality problem in the abnormal alarm through the collaborative diagnosis platform to obtain a problem solution and a processing record includes: Performing problem classification processing on the abnormal alarm to obtain classified abnormal problems, and performing preliminary diagnosis and analysis on the classified abnormal problems to obtain a preliminary diagnosis report; The preliminary diagnostic report is shared by multiple parties through a blockchain smart contract to obtain shared diagnostic information, and the shared diagnostic information is managed for rights to obtain accessible diagnostic data; Collecting multiple opinions on the accessible diagnostic data to obtain a set of multiple diagnostic opinions, and aggregating the set of multiple diagnostic opinions through a consensus algorithm to obtain a comprehensive diagnostic result; Performing similar case matching on the comprehensive diagnosis results to obtain a candidate solution set, and evaluating and screening the candidate solution set through a multi-criteria decision-making algorithm to obtain a solution to the problem; The execution process of the problem solution is recorded in real time to obtain execution process data, and the execution process data is processed by blockchain storage to obtain the processing record.

7. The power quality tracing method based on blockchain according to claim 6 is characterized in that: The step of performing source tracing analysis and trend prediction on the power quality blockchain data, the power quality analysis report and the processing record to obtain power quality improvement suggestions and optimization solutions includes: Integrate the power quality blockchain data, the power quality analysis report and the processing record to obtain a comprehensive power quality data set, and reconstruct the comprehensive power quality data set in time series to obtain time-series power quality data; Constructing a relational network for the time-series power quality data to obtain a power quality knowledge graph, and performing semantic analysis on the power quality knowledge graph to obtain power quality semantic association data; Performing causal chain tracing on the power quality semantically associated data to obtain power quality problem root cause data, and performing clustering processing on the power quality problem root cause data to obtain power quality problem type distribution; Performing trend analysis on the time-series power quality data to obtain a power quality development trend prediction result, and performing risk assessment on the power quality development trend prediction result to obtain a potential risk point identification result; A comprehensive analysis is performed on the distribution of the power quality problem types and the potential risk point identification results to obtain the power quality improvement direction, and a solution generation process is performed on the power quality improvement direction to obtain the power quality improvement suggestion and optimization solution.

Citation Information

Patent Citations

  • Electric energy quality data comprehensive service system

    CN103872782A

  • Ammeter and collector key control method and device based on block chain

    CN118659869A

Cited By

  • Project quality potential defect insurance system based on block chain and Internet of Things

    CN119863323A

  • Block chain-based optical storage and charging integrated micro-grid distributed energy scheduling system

    CN121417368A