Energy supply chain enterprise information management platform based on blockchain consensus mechanism

By introducing operational data analysis, feature analysis, fuzzy reasoning and network optimization modules into the blockchain energy supply chain enterprise information management platform, the problems of throughput limitation and data processing difficulties in blockchain in the energy supply chain are solved, and the efficient and stable operation and scalability of the system are achieved.

CN119476743BActive Publication Date: 2025-04-15SHAANXI DONGRUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510055524.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-04-15
Estimated Expiration
2045-01-14

AI Technical Summary

Technical Problem

Blockchain faces throughput restrictions and large-scale data processing difficulties in the information management of energy supply chain enterprises, resulting in network congestion and extended transaction confirmation time, affecting system efficiency.

Method used

An energy supply chain enterprise information management platform based on the blockchain consensus mechanism was designed, including the operation data acquisition module, the operation data analysis module, the operation feature analysis module, the fuzzy reasoning module and the network optimization module. Through real-time monitoring and optimization of the collaboration efficiency between the blockchain main chain and the second-layer network, node configuration and task allocation are dynamically adjusted.

Benefits of technology

It realizes early detection of the throughput bottleneck of the blockchain main chain, avoids system overload, dynamically optimizes the configuration of the layer 2 network nodes, improves the processing capacity and scalability of the system, and reduces operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476743B_ABST
    Figure CN119476743B_ABST
Patent Text Reader

Abstract

The present invention discloses an energy supply chain enterprise information management platform based on a blockchain consensus mechanism, which specifically relates to the field of blockchain technology, including an operation data acquisition module, an operation data analysis module, an operation feature analysis module, a fuzzy reasoning module and a network optimization module; the operation data acquisition module collects blockchain main chain and second-layer network data in real time, the operation data analysis module analyzes the main chain data, and determines whether there is a sign of throughput limitation; the operation feature analysis module extracts and analyzes the main chain and second-layer network feature data, and the result is transmitted to the fuzzy reasoning module; the fuzzy reasoning module infers the task transfer type and determines whether to build a main chain and second-layer network path; the network optimization module optimizes the second-layer network node configuration to share the load; the present invention dynamically determines whether to divert tasks through the second-layer network, and optimizes the second-layer network node configuration in real time to avoid main chain overload, improve the processing capacity of the overall system, and ensure efficient and stable operation of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and more specifically, to an energy supply chain enterprise information management platform based on a blockchain consensus mechanism. Background Art

[0002] The information management of energy supply chain enterprises based on blockchain consensus mechanism refers to the use of blockchain technology and its consensus mechanism to manage various types of information in the energy supply chain in an efficient, transparent, secure and traceable manner. In this way, enterprises can achieve real-time sharing and reliable recording of data in energy production, transmission, distribution, consumption and other links, while ensuring that all parties reach a consensus in the system, avoiding information tampering and improving decision-making efficiency.

[0003] Blockchain is a distributed ledger technology that can ensure the security, integrity and transparency of data through the collaboration and consensus of multiple nodes in a decentralized network. The "consensus mechanism" in blockchain refers to how each node in a decentralized system reaches a unified decision or record agreement without an intermediary.

[0004] In the process of information management of energy supply chain enterprises based on blockchain consensus mechanism, existing technologies face the following problems:

[0005] Throughput limitations of blockchain: Blockchain often faces limitations in throughput and transaction processing speed. The energy supply chain involves a large amount of real-time data and transactions. If the blockchain processing capacity is insufficient, it may cause network congestion and extend transaction confirmation time, thus affecting the efficiency of the system.

[0006] Difficulty in large-scale data processing: The amount of data that needs to be processed in the energy supply chain is very large, especially when it comes to real-time monitoring, sensor data collection, etc. Traditional blockchain technology is difficult to process such a large amount of data efficiently, which may lead to performance bottlenecks.

[0007] Therefore, the present invention proposes an energy supply chain enterprise information management platform based on the blockchain consensus mechanism to solve the above problems. Summary of the invention

[0008] To achieve the above object, the present invention provides the following technical solutions:

[0009] The energy supply chain enterprise information management platform based on the blockchain consensus mechanism includes operation data collection module, operation data analysis module, operation feature analysis module, fuzzy reasoning module, and network optimization module;

[0010] The operation data collection module is used to collect the operation data of the blockchain main chain and the blockchain second-layer network in real time, and obtain the blockchain main chain operation data set and the blockchain second-layer network operation data set respectively;

[0011] The operation data analysis module is used to perform operation time window analysis based on the blockchain main chain operation data set. According to the operation time window analysis results, it is determined whether there are early signs of throughput limitation on the blockchain main chain.

[0012] The operation feature analysis module is used to extract features from the blockchain main chain operation data set and the blockchain second-layer network operation data set when there are early signs of throughput limitation on the blockchain main chain, and then perform feature analysis, and transmit the results of the feature analysis to the fuzzy reasoning module;

[0013] The fuzzy reasoning module infers the transfer type corresponding to the blockchain task based on the results of feature analysis, and decides whether to build a path between the blockchain main chain and the blockchain second-layer network;

[0014] The network optimization module is used to decide whether to optimize the configuration of nodes in the second-layer network based on the reasoning results of the fuzzy reasoning module to help share the blockchain task load.

[0015] In a preferred embodiment, the runtime window analysis refers to:

[0016] The time series data of transaction throughput is obtained from the blockchain main chain operation data set, and the time series data is statistically analyzed. The mean value μ and standard deviation σ of the data are calculated respectively, and the numerical judgment interval is set to [μ-3σ,μ+3σ]. If a data point in the time series data falls into the numerical judgment interval [μ-3σ,μ+3σ], the data point is marked as a normal point. If a data point in the time series data exceeds the numerical judgment interval [μ-3σ,μ+3σ], it is marked as an abnormal point. Finally, the proportion of abnormal points to the total number of all data points is calculated.

[0017] In a preferred embodiment, judging whether there are early signs of throughput limitation on the blockchain main chain refers to:

[0018] According to the ratio of outliers, the value is compared with the preset normal distribution threshold. If the ratio of outliers to the total number of all data points is greater than or equal to the preset normal distribution threshold, it is judged that there are early signs of throughput limitation in the main chain. If the ratio of outliers to the total number of all data points is less than the preset normal distribution threshold, it is judged that there is no sign of throughput limitation in the main chain.

[0019] In a preferred embodiment, feature extraction is performed on the blockchain main chain operation data set and the blockchain second layer network operation data set respectively, and then feature analysis is performed, which means:

[0020] The main chain performance characteristic group is extracted from the blockchain main chain operation data set, and then the main chain burden evaluation index is generated based on the main chain performance characteristic group. The second-layer network status characteristic group is extracted from the blockchain second-layer network operation data set, and then the second-layer network load index is generated based on the second-layer network status characteristic group.

[0021] In a preferred embodiment, the logic for obtaining the main chain burden evaluation index is:

[0022] The main chain performance characteristics group includes the following performance indicators:

[0023] Transaction delays , Transaction confirmation time , memory pool size , Transactions per second , and the number of unconfirmed transactions , these performance indicators are recorded in time series over time period t to obtain the feature set :

[0024] ;

[0025] Standardize each indicator to obtain the main chain feature data corresponding to indicator i , i represents the index of the indicator, and then the sliding window is used to smooth the main chain feature data. The formula is: ; k represents the sliding window size, represents the standardized value of indicator i at time point j, Represents the smoothed value of indicator i within the preset time window;

[0026] Transaction delay and confirmation time reflect the processing speed of the main chain. In order to highlight the impact of high delay and confirmation time, the weighted square average formula is used to calculate the main chain time burden coefficient. :

[0027] ; , Represents the preset weights of transaction delay and confirmation time, respectively. , Respectively represent the transaction delay and confirmation time after smoothing;

[0028] The memory pool size and the number of unconfirmed transactions reflect the transaction backlog of the main chain. The normalized weighted product formula is used to calculate the main chain transaction backlog burden coefficient. ;

[0029] ; , The preset weights representing the memory pool size and the number of unconfirmed transactions, respectively. , Respectively represent the smoothed memory pool size and the number of unconfirmed transactions;

[0030] The higher the number of transactions per second, the lower the main chain burden. To highlight the inverse relationship, the reverse exponential mapping is used to obtain the main chain throughput burden coefficient. ;

[0031] ; Indicates the preset weight corresponding to the number of transactions per second, Indicates the number of transactions per second after smoothing;

[0032] The calculation formula of the main chain burden evaluation index is:

[0033] ; , , They represent the impact ratio coefficients used to adjust the time burden, transaction backlog burden, and throughput burden, respectively. Represents the main chain burden assessment index.

[0034] In a preferred embodiment, the logic for obtaining the Layer 2 network load index is:

[0035] Get the following parameters from the Layer 2 network status feature group:

[0036] Calculate the sum of the actual occupancy of all channels in the current time period, divide it by the total channel capacity, and then take the average value of the time period to obtain the average occupancy rate ZY of the channel in the time period;

[0037] Record the time it takes for all nodes to respond to requests in the current time period and calculate the average value to obtain the average node response time XY in the time period;

[0038] Count the number of channel restarts that occurred in the current time period to get the total number of times in the time period, and divide the total number by the length of the time period to get the channel restart frequency value PL;

[0039] Use the square root formula, substitute the average occupancy ZY, the average node response time XY, and the channel restart frequency value PL, and the calculation result is the Layer 2 network load index.

[0040] In a preferred embodiment, the usage logic of the fuzzy reasoning module is:

[0041] The main chain burden assessment index and the second-layer network load index corresponding to the same time period are taken as input variables, and the transfer type corresponding to the blockchain task is taken as the output variable. The input variables are fuzzified and the values ​​of the input variables are converted into fuzzy sets. The output variables are fuzzified and the output variables are converted into fuzzy sets. Fuzzy rules are formulated to describe the adaptability of various transfer types corresponding to blockchain tasks under different data type combinations. The fuzzified input variables are inferred through fuzzy rules to obtain the transfer type corresponding to the blockchain task.

[0042] In a preferred embodiment, when the transfer type corresponding to the blockchain task obtained by the fuzzy reasoning module triggers the path construction mechanism, the path between the blockchain main chain and the blockchain second-layer network is constructed. When the optimization mechanism is triggered, the network optimization module optimizes the configuration of the nodes in the second-layer network.

[0043] In a preferred embodiment, the optimized configuration refers to:

[0044] According to the main chain burden evaluation index and the second-layer network load index, the target total number of nodes in the second-layer network is dynamically calculated:

[0045] ; Y1 and Y2 represent the ideal upper limit of the main chain load and the ideal upper limit of the second layer network load respectively. Indicates the number of basic nodes in the current Layer 2 network. Indicates the target total number of nodes in the Layer 2 network. , represent the preset non-zero weight coefficients, and , The sum of is one, Indicates the Layer 2 network load index. New nodes will be dynamically allocated from the pre-configured node pool to the Layer 2 network until the target total number of nodes in the Layer 2 network is reached. .

[0046] Technical effects and advantages of the present invention:

[0047] The present invention can detect the throughput bottleneck of the blockchain main chain early through the running time window analysis, thereby avoiding transaction delays or failures caused by system overload. This early warning mechanism can effectively reduce the risk of system performance crash. It dynamically decides whether to divert tasks through the second-layer network and optimizes the second-layer network node configuration in real time to avoid main chain overload and ensure efficient and stable operation of the system.

[0048] The present invention can flexibly adjust the resources of the second-layer network according to the real-time load conditions by dynamically optimizing the configuration of the second-layer network nodes, so that the blockchain system can adapt to more loads when facing high-concurrency transactions. When the blockchain main chain is overloaded, the system can quickly decide whether to expand the processing capacity of the second-layer network (such as increasing the number of nodes), thereby improving the processing capacity of the overall system. This flexible expansion mechanism helps to improve the scalability of the blockchain system and support high-transaction volume scenarios (such as in the energy supply chain, where the transaction volume may change greatly).

[0049] The present invention combines fuzzy reasoning and network optimization modules to intelligently adjust the collaboration mode between the blockchain main chain and the second-layer network, thereby enhancing the pressure resistance of the blockchain system and the recovery ability of the system in the event of a failure. The mechanism of dynamic load distribution and on-demand expansion of node configuration can ensure that the blockchain network avoids unnecessary overhead by reasonably allocating resources under high load conditions. Especially in the case of high concurrent transactions, the system can intelligently increase or decrease the nodes in the second-layer network to avoid resource waste, improve resource utilization, and thus reduce the operating cost of the blockchain network. By optimizing the number and configuration of nodes in the second-layer network, the waste of resources or performance bottlenecks caused by insufficient or excessive nodes can be reduced, and accurate resource allocation can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to facilitate understanding by those skilled in the art, the present invention is further described below in conjunction with the accompanying drawings;

[0051] Figure 1 This is a schematic diagram of the energy supply chain enterprise information management platform based on the blockchain consensus mechanism in the present invention. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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.

[0053] The information management of energy supply chain enterprises based on blockchain consensus mechanism refers to the use of blockchain technology and its consensus mechanism to manage various types of information in the energy supply chain in an efficient, transparent, secure and traceable manner. In this way, enterprises can achieve real-time sharing and reliable recording of data in energy production, transmission, distribution, consumption and other links, while ensuring that all parties reach a consensus in the system, avoiding information tampering and improving decision-making efficiency.

[0054] Blockchain is a distributed ledger technology that can ensure the security, integrity and transparency of data through the collaboration and consensus of multiple nodes in a decentralized network. The "consensus mechanism" in blockchain refers to how each node in a decentralized system reaches a unified decision or record agreement without an intermediary.

[0055] Consensus mechanism: The blockchain consensus mechanism is an agreement among network nodes on the validity of the ledger. Common consensus mechanisms include: Proof of Work: Obtaining the right to record accounts by calculating difficult problems. Proof of Stake: Selecting accounting nodes based on the number of coins held by the nodes and the time. Byzantine Fault Tolerance: Even if some nodes fail, the system can still reach a consensus.

[0056] Application in energy supply chain: In the energy supply chain, including energy production, procurement, storage, transportation, sales and other links, the flow of information is crucial. Traditional supply chain management is vulnerable to data tampering, information delay or asymmetry and other problems. Using the consensus mechanism of blockchain, it can ensure that data records are open and transparent among multiple participants, and each transaction and information exchange has a timestamp record and cannot be tampered with, thereby improving the credibility and efficiency of the supply chain.

[0057] Enterprise information management: Information management refers to the management of various resources, processes, and business activities of an enterprise through modern information technology means (such as big data, cloud computing, the Internet of Things, etc.) to improve the efficiency of enterprise operations, reduce costs, and enhance competitiveness. In the energy supply chain, blockchain can help enterprises achieve intelligent scheduling, automated decision-making, and real-time monitoring.

[0058] In the process of information management of energy supply chain enterprises based on blockchain consensus mechanism, existing technologies face the following problems: performance bottlenecks and scalability issues:

[0059] Throughput limitations of blockchain: Blockchain, especially public blockchains based on proof of work (PoW) or proof of stake (PoS), often face limitations in throughput and transaction processing speed. The energy supply chain involves a large amount of real-time data and transactions. If the blockchain processing capacity is insufficient, it may cause network congestion and extend transaction confirmation time, thus affecting the efficiency of the system.

[0060] Difficulty in large-scale data processing: The amount of data that needs to be processed in the energy supply chain is very large, especially when it comes to real-time monitoring, sensor data collection, etc. Traditional blockchain technology is difficult to process such a large amount of data efficiently, which may lead to performance bottlenecks.

[0061] Therefore, the present invention proposes an energy supply chain enterprise information management platform based on the blockchain consensus mechanism, including an operation data acquisition module, an operation data analysis module, an operation feature analysis module, a fuzzy reasoning module, and a network optimization module;

[0062] The operation data collection module is used to collect the operation data of the blockchain main chain and the blockchain second-layer network in real time, and obtain the blockchain main chain operation data set and the blockchain second-layer network operation data set respectively;

[0063] The operation data analysis module is used to perform operation time window analysis based on the blockchain main chain operation data set. According to the operation time window analysis results, it is determined whether there are early signs of throughput limitation on the blockchain main chain.

[0064] The operation feature analysis module is used to extract features from the blockchain main chain operation data set and the blockchain second-layer network operation data set when there are early signs of throughput limitation on the blockchain main chain, and then perform feature analysis, and transmit the results of the feature analysis to the fuzzy reasoning module;

[0065] The fuzzy reasoning module infers the transfer type corresponding to the blockchain task based on the results of feature analysis, and decides whether to build a path between the blockchain main chain and the blockchain second-layer network;

[0066] The network optimization module is used to decide whether to optimize the configuration of nodes in the second-layer network based on the reasoning results of the fuzzy reasoning module to help share the blockchain task load.

[0067] This invention aims to dynamically monitor and optimize the collaboration efficiency between the blockchain main chain and the second-layer network by running data collection, analysis, feature extraction, fuzzy reasoning and network optimization, thereby achieving the following core goals:

[0068] The main chain of blockchain usually faces problems such as limited throughput, increased latency and transaction congestion. The second-layer network can share part of the load of the main chain. However, the collaboration between the two requires dynamic adjustment, and the system optimizes performance in the following ways: Real-time monitoring of the operating status of the main chain and the second-layer network to capture load changes. Discover the throughput bottleneck of the main chain in advance and divert some tasks through the second-layer network. Dynamically optimize the node configuration in the second-layer network so that it can better adapt to the needs of task sharing.

[0069] By monitoring the operating characteristics of the blockchain main chain and the second-layer network, and combining the decision-making of the fuzzy reasoning module, the system can achieve the following load management effects: through the running time window analysis, early signs of limited main chain throughput can be discovered in advance to avoid performance degradation caused by excessive load. By performing feature analysis and transfer decisions on blockchain tasks, when the main chain load is high, it is dynamically decided whether to transfer some tasks to the second-layer network for processing to relieve the pressure on the main chain.

[0070] The scalability of blockchain systems has always been a key issue that restricts their application. This system provides a new solution through the dynamic collaboration between the main chain and the second-layer network: during peak load, the network optimization module increases or adjusts the node configuration of the second-layer network to improve the processing capacity of the second-layer network, thereby enhancing the scalability of the overall system. Dynamic path construction: The fuzzy reasoning module decides whether to build a path between the main chain and the second-layer network, flexibly adapting to the needs of different tasks and achieving optimal resource allocation.

[0071] In the blockchain system, main chain overload may cause transaction delays, failures, or even system crashes. The system improves system reliability in the following ways: Early warning: Before the main chain load pressure is too large, early signs are captured by running the data analysis module and optimization measures are taken proactively. Node optimization configuration: The network optimization module dynamically configures the second-layer network nodes to improve their processing efficiency and avoid performance problems caused by insufficient second-layer network load after task transfer. Multi-layer linkage: Through the decision-making of the fuzzy reasoning module, the deep collaboration between the main chain and the second-layer network is realized to ensure the stability of the load of the entire system.

[0072] Through the combination of fuzzy reasoning module and network optimization module, the system builds an intelligent optimization decision-making mechanism between the blockchain main chain and the second-layer network: Fuzzy reasoning: By analyzing feature data, the fuzzy reasoning module can handle complex and uncertain load states, and intelligently determine the transfer type of blockchain tasks and whether optimization is required. Network optimization: According to the results of fuzzy reasoning, the number and configuration of participants in the second-layer network are dynamically adjusted to work with the main chain to ensure the optimization effect.

[0073] Through dynamic load balancing and optimized node configuration, the system can significantly reduce the operating costs of the blockchain network: avoid the main chain from increasing transaction fees or resource consumption due to excessive load. By optimizing the configuration of the second-layer network nodes, it can reduce resource waste and improve the utilization rate of unit resources. When the load is high, only necessary nodes are dynamically added to reduce unnecessary node expansion costs.

[0074] The operation time window analysis refers to: obtaining the time series data of transaction throughput from the blockchain main chain operation data set, performing statistical analysis on the time series data, calculating the mean μ and standard deviation σ of the data respectively, and setting the numerical judgment interval to [μ-3σ,μ+3σ]. If the data point in the time series data falls into the numerical judgment interval [μ-3σ,μ+3σ], the data point is marked as a normal point. If the data point in the time series data exceeds the numerical judgment interval [μ-3σ,μ+3σ], it is marked as an abnormal point. Finally, the proportion of abnormal points to the total number of all data points is calculated. Judging whether there is an early sign of throughput limitation in the blockchain main chain refers to: comparing the abnormal point proportion value with the preset normal distribution threshold value. If the proportion of abnormal points to the total number of all data points is greater than or equal to the preset normal distribution threshold value, it is judged that there is an early sign of throughput limitation in the main chain. If the proportion of abnormal points to the total number of all data points is less than the preset normal distribution threshold value, it is judged that there is no sign of throughput limitation in the main chain.

[0075] Running time window analysis is a real-time data monitoring mechanism based on statistical methods. Through statistical analysis of time series data, the fluctuation of the transaction throughput of the main chain can be grasped in real time to ensure that abnormal changes can be discovered in time. The numerical judgment interval calculated by the average value and standard deviation can dynamically adapt to the operating characteristics of the main chain according to historical data, rather than relying on fixed thresholds, to improve the accuracy of analysis.

[0076] The division of normal points and abnormal points can help quickly distinguish whether there is a decrease in throughput or abnormality in the operation of the main chain. The proportion of abnormal points exceeding the preset interval can intuitively reflect whether the operation status of the main chain deviates from the normal range. The throughput of the main chain is an important indicator of blockchain performance. The running time window analysis can capture signs of throughput decline in advance as the basis for subsequent performance optimization or load adjustment. This method is based on time series data analysis and can adapt to dynamically changing operating environments. It is suitable for blockchain main chains with different scenarios and loads.

[0077] By comparing the abnormal point ratio with the preset threshold, we can determine whether there are early signs of throughput limitation in the main chain, and give early warning to prevent system overload or performance crash: If the abnormal point ratio is higher than the preset normal distribution threshold, it means that the transaction throughput of the main chain may have approached or reached its processing limit, and there is a possibility of performance limitation. By making early judgments, we can take timely measures (such as optimizing node configuration or opening the second-layer network) to avoid congestion and delays in the main chain under high load.

[0078] The judgment results of early signs can trigger task transfer or load balancing mechanisms to divert some transactions or tasks to the second-layer network or other auxiliary systems. This process supports the healthy operation of the main chain and ensures that transactions can be processed efficiently. The abnormal point ratio value provides a quantifiable indicator for the health of the main chain performance. The system can use this indicator to intuitively judge whether the main chain is in normal operation, which is convenient for subsequent optimization and adjustment. Using the judgment results as input, combined with the fuzzy reasoning module and the network optimization module, the main chain and the second-layer network can work together to dynamically adjust the blockchain operation mode. For example, after early signs of throughput limitation appear, the system can automatically trigger optimization strategies to quickly solve performance problems.

[0079] Through real-time analysis and judgment, the main chain can be prevented from experiencing performance crashes due to overload, and the stability of the system can be improved. By identifying anomalies in advance, potential problems can be proactively resolved, and the reliability of the system can be enhanced. Signs of throughput limitation can be discovered in advance, which can avoid transaction accumulation and resource waste. With task transfer and node optimization, the collaboration efficiency of the main chain and the second-layer network can be further improved. Early warning can reduce additional expenses (such as transaction fees, waste of computing resources, etc.) caused by delayed or failed transactions. By dynamically adjusting the node and load distribution, the dependence on the main chain can be reduced, and the overall operating cost can be reduced. It is suitable for various scenarios with large fluctuations in load and transaction volume (such as payment, supply chain, decentralized finance, etc.), providing reliable support for the actual application of blockchain. The data-driven operation analysis and judgment mechanism lays the foundation for the intelligent and automated operation and management of blockchain systems.

[0080] Feature extraction is performed on the blockchain main chain operation data set and the blockchain second-layer network operation data set respectively, and then feature analysis is performed, which means: extracting the main chain performance feature group from the blockchain main chain operation data set, and then generating the main chain burden evaluation index based on the main chain performance feature group, and extracting the second-layer network status feature group from the blockchain second-layer network operation data set, and then generating the second-layer network load index based on the second-layer network status feature group.

[0081] Extracting the main chain performance feature group (such as throughput, transaction latency, memory pool size, number of unconfirmed transactions, etc.) can reflect the operating pressure and performance bottleneck of the main chain in a specific time period. The main chain burden evaluation index can quantify the load of the main chain and present it in specific values, providing a basis for subsequent optimization.

[0082] Layer 2 network status feature group and load index: Extracting the Layer 2 network status feature group (such as channel capacity utilization, node response time, channel shutdown or restart frequency, etc.) can reflect the processing capacity, stability and resource allocation of the Layer 2 network. The Layer 2 network load index further combines these features into a single indicator to help intuitively judge the load of the Layer 2 network.

[0083] The main chain and the second-layer network are two inseparable layers in the blockchain system. Their coordinated operation determines the performance of the entire system. By extracting features and generating burden assessment index and load index respectively, the following effects can be achieved:

[0084] Main chain pressure relief: When the main chain burden assessment index is high, some low-priority tasks can be diverted to the second-layer network by analyzing the main chain characteristics to alleviate the throughput pressure of the main chain.

[0085] Layer 2 network task allocation: The load index of the layer 2 network reflects its current processing capacity. When the load index is low, the layer 2 network can receive more tasks, thereby improving the efficiency of the entire blockchain system.

[0086] Triggering of dynamic optimization mechanism: If both the main chain burden evaluation index and the second-layer network load index are high, the system can dynamically adjust the number of participants in the second-layer network to ensure load balance.

[0087] The logic for obtaining the main chain burden evaluation index is:

[0088] The main chain performance characteristics group includes the following performance indicators:

[0089] Transaction delays , the time from transaction initiation to confirmation (unit: seconds), reflecting the processing speed of the main chain. Transaction confirmation time , the time from when a transaction enters the memory pool to when it enters the block (in seconds), reflecting the block processing capacity of the main chain. Memory pool size , the number of unconfirmed transactions in the memory pool, indicating the current transaction congestion level. Transactions per second , the number of transactions successfully processed per second by the main chain, reflecting the main chain throughput capacity. , the number of unprocessed transactions in the time period, reflecting the degree of transaction backlog. These performance indicators are recorded in time series over time period t to obtain the feature group :

[0090] ;

[0091] Each indicator is standardized to eliminate the dimension differences and noise interference between different indicators. The standardization methods in the prior art can be used to obtain the main chain feature data corresponding to indicator i. , i represents the index of the indicator, and then the sliding window is used to smooth the main chain feature data. The formula is: ; k represents the sliding window size, represents the standardized value of indicator i at time point j, Represents the smoothed value of indicator i within the preset time window;

[0092] Transaction delay and confirmation time reflect the processing speed of the main chain. In order to highlight the impact of high delay and confirmation time, the weighted square average formula is used to calculate the main chain time burden coefficient. :

[0093] ; , Represents the preset weights of transaction delay and confirmation time, respectively. , They represent the transaction delay and confirmation time after smoothing respectively; transaction delay and confirmation time are important manifestations of the main chain's processing capacity. The longer the time, the greater the burden on the main chain. This highlights the specific impact of delay or confirmation time on the main chain's burden and helps discover bottlenecks in transaction processing.

[0094] The memory pool size and the number of unconfirmed transactions reflect the transaction backlog of the main chain. The normalized weighted product formula is used to calculate the main chain transaction backlog burden coefficient. :

[0095] ; , The preset weights representing the memory pool size and the number of unconfirmed transactions, respectively. , It indicates the smoothed memory pool size and the number of unconfirmed transactions. The memory pool size and the number of unconfirmed transactions are important indicators of main chain congestion. The more the backlog, the more the main chain cannot process transactions in time. Through nonlinear processing, the impact of high backlog status on the burden index is magnified to ensure that the load analysis is closer to reality. When the transaction backlog burden coefficient is high, the performance degradation or congestion risk of the main chain can be identified in advance.

[0096] The higher the number of transactions per second, the lower the main chain burden. To highlight the inverse relationship, the reverse exponential mapping is used to obtain the main chain throughput burden coefficient. :

[0097] ; Indicates the preset weight corresponding to the number of transactions per second, It indicates the number of transactions per second after smoothing. The number of transactions per second is an important indicator to measure the performance of the main chain. The lower the throughput, the greater the burden on the main chain. Through reverse mapping, the burden index is lower when the throughput is high, and the burden increases significantly when the throughput is low, which can intuitively reflect the resource utilization status.

[0098] The calculation formula of the main chain burden evaluation index is:

[0099] ; , They represent the impact ratio coefficients used to adjust the time burden, transaction backlog burden, and throughput burden, respectively. Represents the main chain burden assessment index. It combines multiple indicators into a single burden assessment index to provide clear and intuitive quantitative results for the main chain operation status. The main chain burden index can be used as the basic input for load management to help determine whether tasks need to be transferred to the second-layer network to optimize the main chain performance. The main chain burden assessment index provides a data basis for the fuzzy reasoning module and supports dynamic optimization of node configuration and task allocation.

[0100] The logic for obtaining the Layer 2 network load index is as follows:

[0101] Get the following parameters from the Layer 2 network status feature group:

[0102] Calculate the sum of the actual occupancy of all channels in the current time period, divide it by the total channel capacity, and then take the average value of the time period to obtain the average channel occupancy rate ZY in the time period; it reflects the actual occupancy of resource channels in the Layer 2 network. The higher the average occupancy rate, the tighter the resources of the Layer 2 network and the greater the load.

[0103] Record the time it takes for all nodes to respond to requests in the current time period and calculate the average value to obtain the average node response time XY in the time period; measure the processing speed of each node in the Layer 2 network for requests. The longer the response time, the lower the node processing efficiency, which may become a network bottleneck.

[0104] Count the number of channel restarts that occurred in the current time period to get the total number of times in the time period, and divide the total number by the length of the time period to get the channel restart frequency value PL; count the number of times the resource channel is closed or restarted to reflect the stability of the channel. The higher the restart frequency, the more unstable the operation of the second-layer network is, and it may face the risk of insufficient processing capacity. Resource channels refer to logical or physical paths used to transmit and allocate resources in the second-layer network of the blockchain. These resources can include transaction data, payment information, execution tasks of smart contracts, and even bandwidth, storage, and computing power in the network. Resource channels are essentially mechanisms or structures used to allocate and manage resources in the network.

[0105] Use the square root formula, substitute the average occupancy rate ZY, the average node response time XY, and the channel restart frequency value PL, square them respectively, sum them up, and then take the square root. The calculation result is the second-layer network load index. When the second-layer network load index is high, the optimization mechanism can be triggered to avoid system crashes due to overload. When the load index is low, tasks can be assigned to the second-layer network to reduce the pressure on the main chain.

[0106] The second-layer network refers to an additional network layer built on top of the main chain. Its purpose is to optimize transactions and data processing through certain technologies or protocols, thereby reducing the burden on the main chain and improving the network's scalability, transaction throughput, and confirmation speed. The second-layer network usually uses a mechanism different from the main chain to process transactions, and ultimately submits the transaction results or summary data to the main chain for confirmation or recording.

[0107] If the main chain burden index is high and the second-layer network load index is low, it means that the main chain burden is already very large, and the second-layer network still has available processing capacity, then the second-layer network can be enabled to share the main chain load. Conversely, if the main chain burden index is low, or the second-layer network load is close to or exceeds the maximum processing capacity, the second-layer network will not be enabled and will continue to rely on the main chain for processing.

[0108] Although the second-layer network can significantly improve processing power and reduce the burden on the main chain, the main chain is usually the most reliable and secure transaction record system. Although the second-layer network can provide higher transaction throughput, it may be affected by security, transparency, decentralization, etc. in some cases. Some systems may tend to rely on the main chain for verification first to ensure the basic reliability of the system. Therefore, in general, the path between the blockchain main chain and the blockchain second-layer network is not built at the beginning, which also provides a certain amount of room for subsequent main chain data processing and helps share the blockchain task load when appropriate.

[0109] The usage logic of the fuzzy reasoning module is:

[0110] The main chain burden assessment index and the second-layer network load index corresponding to the same time period are taken as input variables, and the transfer type corresponding to the blockchain task is taken as the output variable. The input variables are fuzzified and the values ​​of the input variables are converted into fuzzy sets. The output variables are fuzzified and the output variables are converted into fuzzy sets. Fuzzy rules are formulated to describe the adaptability of various transfer types corresponding to blockchain tasks under different data type combinations. The fuzzified input variables are inferred through fuzzy rules to obtain the transfer type corresponding to the blockchain task.

[0111] Fuzzification is the process of converting the exact values ​​of input variables (such as the main chain burden index and the second-layer network load index) into fuzzy sets. A fuzzy set is a range with a degree of membership, which is used to represent the ambiguity or uncertainty of data. Fuzzy sets are usually described by a set of linguistic variables, such as "low burden", "medium burden", and "high burden". Use membership functions to map the values ​​of input variables to fuzzy sets. Common membership functions are: Triangular membership function: suitable for simple and fast fuzzification, defining a central value and an increasing or decreasing range on both sides. Trapezoidal membership function: used to represent a wider range, defining upper and lower limits and slope intervals. Gaussian membership function: suitable for smooth changes, usually used to process data with good continuity.

[0112] Fuzzy rules are the core part of fuzzy reasoning, which are used to define the relationship between input variables and output variables. Each rule describes the output result under a specific input condition. For example: if the main chain load is "high" and the second-layer network load is "low", then the task should be transferred to the second-layer network. If the main chain load is "high" and the second-layer network load is "high", then the second-layer network needs to be expanded and the task transferred. Rules can be determined based on experience or data analysis. Each rule calculates its fitness based on the input membership. The logical relationship of the rules usually uses fuzzy logic operations, such as "AND" or "OR".

[0113] Fuzzy reasoning is a process based on fuzzy rules and input membership, and outputs fuzzy sets. The goal of reasoning is to determine the fuzzy membership of the output variable based on the membership of the input variable.

[0114] The reasoning process uses fuzzy logic operations: AND operation: take the minimum value among the input memberships. OR operation: take the maximum value among the input memberships. Fuzzy output generation: calculate the fuzzy set of the output variable based on the rules and the input fuzzy set. This step results in a fuzzy result, which is usually composed of multiple fuzzy sets superimposed.

[0115] Defuzzification is the process of converting the result of fuzzy reasoning (a fuzzy set) into a specific clear output value. The goal of this step is to provide an accurate numerical output for the final decision. Common defuzzification methods include: Maximum membership method: select the point corresponding to the maximum membership value in the output fuzzy set as the output value. Center of gravity method: calculate the center of gravity of the fuzzy set (that is, the center of the fuzzy set area) and use the center of gravity position as the output value. This method is the most common because it can comprehensively consider the contribution of all memberships. Median method: take the middle value of the fuzzy set as the output result, which is suitable for symmetric fuzzy sets.

[0116] The output variable is the final result of the fuzzy reasoning module, which is expressed as the transfer type of the blockchain task. Specifically, transfer type 1: continue to execute tasks on the main chain. Transfer type 2: build a channel, and transfer part of the tasks to the second-layer network. Transfer type 3: build a channel, transfer part of the tasks to the second-layer network, and expand the processing capacity of the second-layer network.

[0117] When the transfer type corresponding to the blockchain task obtained by the fuzzy reasoning module triggers the path construction mechanism, that is, transfer type two or transfer type three, the path between the blockchain main chain and the blockchain second-layer network is constructed. When the optimization mechanism is triggered, that is, transfer type three, the network optimization module optimizes the configuration of the nodes in the second-layer network.

[0118] Build a channel between the main chain and the second-layer network to ensure that tasks are efficiently transferred from the main chain to the second-layer network and processed in the second-layer network. Specific purposes include: Achieving task diversion: The high load of the main chain may lead to performance bottlenecks (such as transaction delays, unconfirmed transaction backlogs, etc.). By building a channel and transferring some tasks to the second-layer network, the pressure on the main chain can be effectively relieved. Task diversion helps to improve the throughput and response speed of the main chain and enhance user experience.

[0119] Ensure efficient transmission of task data: Path construction ensures seamless data transmission between the main chain and the second-layer network (such as transaction status, smart contract calls, etc.) to avoid data loss or delay. Data transmission path optimization can reduce communication delays and improve task processing efficiency.

[0120] Improve the flexibility of task processing: After building the channel, the system can flexibly decide which tasks to keep on the main chain and which tasks to transfer to the second-layer network based on task priority and resource conditions. This flexibility ensures optimal utilization of resources and efficient task processing.

[0121] Supporting the collaboration between the main chain and the second-layer network: Pathway construction provides an infrastructure for the collaboration between the main chain and the second-layer network, allowing the second-layer network to participate in task processing while the main chain can still track the status of the task.

[0122] Optimized configuration means: dynamically calculating the target total number of nodes in the second-layer network based on the main chain burden evaluation index and the second-layer network load index:

[0123] ; Y1 and Y2 represent the ideal upper limit of the main chain load and the ideal upper limit of the second layer network load respectively. Indicates the number of basic nodes in the current Layer 2 network. Indicates the target total number of nodes in the Layer 2 network. , represent the preset non-zero weight coefficients, and , The sum of is one, Indicates the Layer 2 network load index. New nodes will be dynamically allocated from the pre-configured node pool to the Layer 2 network until the target total number of nodes in the Layer 2 network is reached. .

[0124] The core idea of ​​adjusting the number of nodes based on the load of the main chain and the second-layer network is to dynamically adjust the target number of nodes in the second-layer network according to the real-time situation of the main chain burden evaluation index and the second-layer network load index, so as to optimize the load distribution. Ensuring a high load on the main chain will significantly increase the number of target nodes. When the load index of the second-layer network is high, Ensuring a high load on the second-layer network will also drive node expansion. According to the calculated target number of nodes, new nodes can be dynamically allocated from the node pool and added to the second-layer network to ensure that the number of nodes matches the current load demand. This on-demand expansion mechanism not only avoids resource waste, but also ensures that there are sufficient node resources to support when the load increases. The dynamic configuration mechanism can quickly respond to changes in the load of the main chain and the second-layer network. In the case of a sudden increase in the amount of tasks, nodes can be added in time to avoid network performance degradation. Through automated configuration, manual intervention is reduced, and the stability and reliability of system operation are improved.

[0125] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0126] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0127] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0128] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0129] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. The energy supply chain enterprise information management platform based on the blockchain consensus mechanism is characterized by: It includes operation data acquisition module, operation data analysis module, operation feature analysis module, fuzzy reasoning module and network optimization module; The operation data collection module is used to collect the operation data of the blockchain main chain and the blockchain second-layer network in real time, and obtain the blockchain main chain operation data set and the blockchain second-layer network operation data set respectively; The operation data analysis module is used to perform operation time window analysis based on the blockchain main chain operation data set. According to the operation time window analysis results, it is determined whether there are early signs of throughput limitation on the blockchain main chain. The operation feature analysis module is used to extract features from the blockchain main chain operation data set and the blockchain second-layer network operation data set when there are early signs of throughput limitation on the blockchain main chain, and then perform feature analysis, and transmit the results of the feature analysis to the fuzzy reasoning module; The fuzzy reasoning module infers the transfer type corresponding to the blockchain task based on the results of feature analysis, and decides whether to build a path between the blockchain main chain and the blockchain second-layer network; The network optimization module is used to decide whether to optimize the configuration of nodes in the second-layer network based on the reasoning results of the fuzzy reasoning module to help share the blockchain task load; Extracting features from the blockchain main chain operation data set and the blockchain second-layer network operation data set respectively, and then performing feature analysis means: Extract the main chain performance feature group from the blockchain main chain operation data set, and generate the main chain burden evaluation index based on the main chain performance feature group; extract the second-layer network status feature group from the blockchain second-layer network operation data set, and generate the second-layer network load index based on the second-layer network status feature group; The usage logic of the fuzzy reasoning module is: The main chain burden assessment index and the second-layer network load index corresponding to the same time period are taken as input variables, and the fuzzified input variables are inferred through fuzzy rules to obtain the transfer type corresponding to the blockchain task, specifically: transfer type 1, continue to execute tasks on the main chain; transfer type 2, build a path, and transfer part of the tasks to the second-layer network; transfer type 3, build a path, and transfer part of the tasks to the second-layer network, while expanding the processing capacity of the second-layer network; when the transfer type corresponding to the blockchain task obtained by the fuzzy reasoning module triggers the path construction mechanism, that is, transfer type 2 or transfer type 3, the path between the blockchain main chain and the blockchain second-layer network is constructed; when the optimization mechanism is triggered, that is, transfer type 3, the network optimization module optimizes the configuration of the nodes in the second-layer network; Optimized configuration means dynamically calculating the target total number of nodes in the Layer 2 network based on the main chain burden evaluation index and the Layer 2 network load index.

2. The energy supply chain enterprise information management platform based on the blockchain consensus mechanism according to claim 1 is characterized in that: Run-time window analysis refers to: The time series data of transaction throughput is obtained from the blockchain main chain operation data set, and statistical analysis is performed on the time series data. The mean value μ and standard deviation σ of the data are calculated respectively, and the value judgment interval is set as , if the data points in the time series data fall into the numerical judgment interval , then the data point is marked as a normal point. If the data point in the time series data exceeds the value judgment interval , it is marked as an outlier, and finally the ratio of outliers to the total number of all data points is calculated.

3. The energy supply chain enterprise information management platform based on the blockchain consensus mechanism according to claim 2 is characterized in that: Early signs of throughput limitations on the blockchain main chain include: According to the ratio of outliers, the value is compared with the preset normal distribution threshold. If the ratio of outliers to the total number of all data points is greater than or equal to the preset normal distribution threshold, it is judged that there are early signs of throughput limitation in the main chain. If the ratio of outliers to the total number of all data points is less than the preset normal distribution threshold, it is judged that there is no sign of throughput limitation in the main chain.

4. The energy supply chain enterprise information management platform based on the blockchain consensus mechanism according to claim 3 is characterized in that: The logic for obtaining the main chain burden evaluation index is: The main chain performance characteristics group includes the following performance indicators: Transaction delays , Transaction confirmation time , memory pool size , Transactions per second , and the number of unconfirmed transactions , these performance indicators are recorded in time series over time period t to obtain the feature set ; ; Standardize each indicator to obtain the main chain feature data corresponding to indicator i , i represents the index of the indicator, and then the sliding window is used to smooth the main chain feature data. The formula is: ; k represents the sliding window size, represents the standardized value of indicator i at time point j, Represents the smoothed value of indicator i within the preset time window; Transaction delay and confirmation time reflect the processing speed of the main chain. In order to highlight the impact of high delay and confirmation time, the weighted square average formula is used to calculate the main chain time burden coefficient. : ; , Represents the preset weights of transaction delay and confirmation time, , Respectively represent the transaction delay and confirmation time after smoothing; The memory pool size and the number of unconfirmed transactions reflect the transaction backlog of the main chain. The normalized weighted product formula is used to calculate the main chain transaction backlog burden coefficient. : ; , The preset weights representing the memory pool size and the number of unconfirmed transactions, respectively. , Respectively represent the smoothed memory pool size and the number of unconfirmed transactions; The higher the number of transactions per second, the lower the main chain burden. To highlight the inverse relationship, the reverse exponential mapping is used to obtain the main chain throughput burden coefficient. : ; Indicates the preset weight corresponding to the number of transactions per second, Indicates the number of transactions per second after smoothing; The calculation formula of the main chain burden evaluation index is: ; , , They represent the impact ratio coefficients used to adjust the time burden, transaction backlog burden, and throughput burden, respectively. Represents the main chain burden assessment index.

5. The energy supply chain enterprise information management platform based on the blockchain consensus mechanism according to claim 4 is characterized in that: The logic for obtaining the Layer 2 network load index is as follows: Get the following parameters from the Layer 2 network status feature group: Calculate the sum of the actual occupancy of all channels in the current time period, divide it by the total channel capacity, and then take the average value of the time period to obtain the average occupancy rate ZY of the channel in the time period; Record the time it takes for all nodes to respond to requests in the current time period and calculate the average value to obtain the average node response time XY in the time period; Count the number of channel restarts that occurred in the current time period to get the total number of times in the time period, and divide the total number by the length of the time period to get the channel restart frequency value PL; Use the square root formula, substitute the average occupancy ZY, the average node response time XY, and the channel restart frequency value PL, and the calculation result is the Layer 2 network load index.

6. The energy supply chain enterprise information management platform based on the blockchain consensus mechanism according to claim 5 is characterized in that: Optimized configuration refers to: According to the main chain burden evaluation index and the second-layer network load index, the target total number of nodes in the second-layer network is dynamically calculated: ; Y1 and Y2 represent the ideal upper limit of the main chain load and the ideal upper limit of the second layer network load respectively. Indicates the number of basic nodes in the current Layer 2 network. Indicates the target total number of nodes in the Layer 2 network. , represent the preset non-zero weight coefficients, and , The sum of is one, Indicates the Layer 2 network load index. New nodes will be dynamically allocated from the pre-configured node pool to the Layer 2 network until the target total number of nodes in the Layer 2 network is reached. .

Citation Information

Patent Citations

  • B-F neural network traceability algorithm based on block chain and fuzzy cognitive mapping fusion

    CN112150152A

  • Block chain-based operation and maintenance data management method and apparatus, and electronic device

    CN116866341A