Data monitoring system based on block chain
By designing a blockchain-based data monitoring system, it solves the problems of difficulty in timely monitoring blockchain system performance abnormalities and data storage security in the existing technology, and achieves high security and timely early warning of data.
Patent Information
- Application Number
- CN202411694791.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-05-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology is difficult to monitor performance abnormalities of blockchain systems in a timely manner, resulting in a high risk of data inconsistency and data is easily leaked when stored.
A blockchain-based data monitoring system is designed, including a data acquisition module, a data processing module and a node monitoring module. The data processing module divides the standard data into several data segments, sets a unique encoding, and generates a coding sequence through a random sorting algorithm, performs asymmetric encryption, and uploads it to the blockchain system through smart contracts. The node monitoring module obtains the performance index data of each node, calculates the data abnormality index, and generates early warning information.
It improves data security, can timely monitor performance abnormalities of blockchain system, reduces the risk of data inconsistency, and limits data operation permissions through the use of smart contracts, enhancing data storage security.
Smart Images

Figure CN119938436A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of blockchain, and specifically is a data monitoring system based on blockchain. Background Art
[0002] At present, the monitoring methods applied on blockchain mainly adopt traditional means for monitoring, including computing resource monitoring, network monitoring, virtualization, container cloud monitoring and application APM solutions, etc. The technology used mainly obtains data through point collection, and finally presents the statistical results to system operation and maintenance personnel through data statistics. This method is very practical in traditional application scenarios and can present the system operation status more comprehensively.
[0003] The existing technology achieves data monitoring to a certain extent by deploying a number of monitoring nodes in the blockchain system and checking the data at irregular intervals; however, the throughput and data synchronization delay of each node in the existing blockchain system will affect the consistency of the data. The existing technology is difficult to monitor the performance anomalies of the blockchain system in a timely manner, resulting in a high risk of data inconsistency; in addition, the existing technology also has the problem of easy leakage of data during storage.
[0004] The present invention provides a data monitoring system based on blockchain to solve the above technical problems. Summary of the invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a blockchain-based data monitoring system to solve the problem that the prior art is difficult to timely monitor the performance anomalies of the blockchain system, resulting in a high risk of data inconsistency; in addition, the prior art also has the technical problem that data is easily leaked during storage.
[0006] To achieve the above-mentioned purpose, the first aspect of the present invention provides a blockchain-based data monitoring system, comprising: a data processing module, and a data acquisition module and a node monitoring module connected thereto;
[0007] The data acquisition module is used to obtain the original data sent by the data acquisition terminal; pre-process the original data to obtain standard data;
[0008] The data processing module is used to divide the standard data into several data segments; encode the several data segments respectively to obtain a coding sequence; encrypt the coding sequence based on an asymmetric encryption algorithm to obtain an encrypted sequence label; upload the encrypted sequence label to the blockchain system based on a smart contract;
[0009] The node monitoring module is used to obtain performance indicator data of each node in the blockchain system; generate warning information based on the performance indicator data and the set alarm frequency threshold; wherein the performance indicator data includes transaction throughput, query throughput and average data synchronization time; the warning information includes primary warning information and secondary warning information.
[0010] Preferably, dividing the standard data into several data segments includes:
[0011] Extract standard data, divide the standard data according to the set data capacity size, and obtain a number of data segments; wherein, when the data size of the divided data is smaller than the set data capacity size, divide it into a single complete data segment.
[0012] Preferably, the encoding of the plurality of data segments respectively comprises:
[0013] Extract several data segments, set a corresponding unique code for each data segment; sort the several unique codes according to a random sorting algorithm to obtain a coding sequence.
[0014] The present invention sets a corresponding unique code for each data segment; sorts a number of unique codes according to a random sorting algorithm to obtain a code sequence; since the unique codes are randomly sorted, it is difficult to restore the original standard data even if the mapping relationship between the unique codes and the data segments is cracked. Compared with sorting the unique codes according to the order of the data segments in the standard data, it has higher security and is conducive to improving data security.
[0015] Preferably, the encrypting the coding sequence based on an asymmetric encryption algorithm comprises:
[0016] An asymmetric encryption algorithm is used to generate a private key, and the encoded sequence is encrypted with the private key to obtain an encrypted sequence label.
[0017] Preferably, uploading the encrypted sequence tag to the blockchain system based on the smart contract includes:
[0018] Extract the encrypted sequence tag; deploy the smart contract in the blockchain system, upload the encrypted sequence tag to the blockchain system through the smart contract, and set corresponding data operation permissions for different users in the smart contract to limit the data operation scope of different users.
[0019] Preferably, the generating of warning information based on the performance indicator data and the set alarm frequency threshold includes:
[0020] Extract the performance indicator data of each node; calculate the data anomaly index of the blockchain system based on the performance indicator data of each node; determine whether the data anomaly index is greater than the set anomaly threshold; if yes, mark the warning information as a first-level warning; if no, mark the warning information as a second-level warning.
[0021] Preferably, the calculation of the data anomaly index of the blockchain system based on the performance indicator data of each node includes:
[0022] Extract the performance indicator data of each node in the blockchain system; through the formula The data anomaly index SYZ is calculated; where JYTi is the transaction throughput of node i, CXTi is the query throughput of node i, STCi is the average data synchronization time of node i, and e is a natural constant; a, b, and c are all proportional coefficients greater than 0; i = 1, 2, ..., n, and n is the total number of nodes in the blockchain system.
[0023] The present invention calculates the data anomaly index by incorporating the transaction throughput, query throughput and average data synchronization time of each node into a comprehensive formula. This method comprehensively considers the impact of transaction throughput, query throughput and average data synchronization time on the risk of data anomaly in the blockchain system. For example, the average data synchronization time can reflect the delay in data synchronization between nodes: when the average data synchronization time increases, the data consistency between different nodes will decrease. Therefore, the data anomaly index calculated can accurately reflect the degree of data anomaly risk stored in the blockchain system. This not only facilitates timely early warning based on the data anomaly index, but also helps to reduce the risk of data inconsistency.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] 1. The present invention sets a corresponding unique code for each data segment; sorts a number of unique codes according to a random sorting algorithm to obtain a code sequence; since the unique codes are randomly sorted, even if the mapping relationship between the unique codes and the data segments is cracked, it is difficult to restore the original standard data, which is more secure than sorting the unique codes according to the order of the data segments in the standard data, and is conducive to improving data security.
[0026] 2. The present invention calculates the data anomaly index by using a formula based on the transaction throughput, query throughput and average data synchronization time of each node, comprehensively considering the impact of transaction throughput, query throughput and average data synchronization time on the abnormal risk of data stored in the blockchain system, so that the calculated data anomaly index can accurately reflect the risk level of data anomalies stored in the blockchain system, facilitates subsequent timely warning based on the data anomaly index, and helps reduce the risk of data inconsistency. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 This is a schematic diagram of the principle of the blockchain-based data monitoring system of the present invention;
[0029] Figure 2 This is an overall flow chart of the blockchain-based data monitoring system of the present invention. DETAILED DESCRIPTION
[0030] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than 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.
[0031] See also Figure 1-Figure 2 , the first aspect of the present invention provides a blockchain-based data monitoring system, including: a data processing module, and a data acquisition module and a node monitoring module connected thereto;
[0032] Data acquisition module: used to obtain the original data sent by the data acquisition terminal; pre-process the original data to obtain standard data;
[0033] Data processing module: used to divide standard data into several data segments; encode several data segments respectively to obtain a coding sequence; encrypt the coding sequence based on an asymmetric encryption algorithm to obtain an encrypted sequence label; upload the encrypted sequence label to the blockchain system based on a smart contract;
[0034] Node monitoring module: used to obtain performance indicator data of each node in the blockchain system; generate warning information based on performance indicator data and the set alarm frequency threshold; among which, performance indicator data includes transaction throughput, query throughput and average data synchronization time; warning information includes first-level warning information and second-level warning information.
[0035] In this embodiment, the standard data is divided into several data segments, including:
[0036] Extract standard data, divide the standard data according to the set data capacity size, and obtain a number of data segments; wherein, when the data size of the divided data is smaller than the set data capacity size, divide it into a single complete data segment.
[0037] Exemplarily, the set data capacity size is set to 10 Mb, assuming that the data size of the standard data is 57 Mb, the standard data is divided according to the set data capacity size to obtain 6 data segments.
[0038] In this embodiment, several data segments are encoded respectively, including:
[0039] Extract several data segments, set a corresponding unique code for each data segment through a hash algorithm; sort the several unique codes according to a random sorting algorithm to obtain a coding sequence.
[0040] Furthermore, the mapping relationship between the data segments and the corresponding unique codes is retained in the database.
[0041] The core of the present invention is to assign a unique code to each data segment and arrange these codes through a random sorting algorithm to form a code sequence. This innovative design ensures that even if the correspondence between the unique code and the data segment is cracked, the original standard data is difficult to restore because the code sequence is randomly generated. Compared with sorting by the original order of the data segments, this random sorting method significantly improves the security of the data.
[0042] In this embodiment, the encoding sequence is encrypted based on an asymmetric encryption algorithm, including:
[0043] The asymmetric encryption algorithm RSA is used to generate a private key, and the encoding sequence is encrypted by the private key to obtain an encrypted sequence label; wherein, the asymmetric encryption algorithm also includes ECC and DSA.
[0044] In this embodiment, uploading the encrypted sequence tag to the blockchain system based on the smart contract includes:
[0045] Extract the encrypted sequence tag; deploy the smart contract in the blockchain system, upload the encrypted sequence tag to the blockchain system through the smart contract, and set corresponding data operation permissions for different users in the smart contract to limit the data operation scope of different users.
[0046] Exemplarily, extract the encrypted sequence tag; use a smart contract programming language (such as Solidity, Vyper, etc.) to write a smart contract, deploy the smart contract in the blockchain system, upload the encrypted sequence tag to the blockchain system through the smart contract, and set corresponding data operation permissions for different users in the smart contract to limit the data operation scope of different users.
[0047] In this embodiment, the warning information is generated based on the performance indicator data and the set alarm frequency threshold, including:
[0048] Extract the performance indicator data of each node; calculate the data anomaly index of the blockchain system based on the performance indicator data of each node; determine whether the data anomaly index is greater than the set anomaly threshold; if yes, mark the warning information as a first-level warning; if no, mark the warning information as a second-level warning.
[0049] Exemplarily, the data anomaly index SYZ is set to 113.08, and the anomaly threshold is set to 100; since the data anomaly index is greater than the set anomaly threshold, the warning information is marked as a first-level warning, and the staff investigates the cause of the anomaly in the blockchain system.
[0050] In this embodiment, the data anomaly index of the blockchain system is calculated based on the performance indicator data of each node, including:
[0051] Extract the performance indicator data of each node in the blockchain system; through the formula The data anomaly index SYZ is calculated; where JYTi is the transaction throughput of node i, CXTi is the query throughput of node i, STCi is the average data synchronization time of node i, and e is a natural constant; a, b, c are all proportional coefficients greater than 0, and the values of a, b, c are set by experts in related fields based on experience; i = 1, 2, ..., n, and n is the total number of nodes in the blockchain system.
[0052] For example, assume that there are 3 nodes in the blockchain system; set a=60, b=250, c=0.1;
[0053] Node 1's transaction throughput JYT1 = 5.6 TPS, query throughput CXT1 = 23 QPS, and average data synchronization time STC1 = 21s;
[0054] Node 2's transaction throughput JYT2 = 6.3 TPS, query throughput CXT2 = 24 QPS, and average data synchronization time STC2 = 34 s;
[0055] Node 3’s transaction throughput JYT3 = 5.8 TPS, query throughput CXT3 = 26 QPS, and average data synchronization time STC3 = 26s;
[0056] The data anomaly index of the blockchain system is calculated by the formula SYZ≈113.08.
[0057] The present invention calculates the data anomaly index by using a formula based on the transaction throughput, query throughput and average data synchronization time of each node, and comprehensively considers the influence of transaction throughput, query throughput and average data synchronization time on the abnormal risk of data stored in the blockchain system; for example, when the transaction throughput and query throughput are too low, the data processing capacity of the blockchain system is limited, resulting in transaction backlogs and delays, which in turn leads to an increased probability of data errors; the average data synchronization time can reflect the delay in data synchronization between nodes, and the longer the average data synchronization time, the worse the consistency of data in different nodes; the calculated data anomaly index can accurately reflect the risk level of data anomalies stored in the blockchain system, facilitate subsequent timely warnings based on the data anomaly index, and help reduce the risk of data inconsistency.
[0058] Part of the data in the above formula is calculated by removing the dimension and taking its numerical value. The formula is a formula closest to the actual situation obtained by software simulation of a large amount of collected data; the preset parameters and preset thresholds in the formula are set by technical personnel in this field according to actual conditions or obtained through simulation of a large amount of data.
[0059] Working principle of the present invention:
[0060] The present invention obtains the original data sent by the data acquisition terminal; pre-processes the original data to obtain standard data; divides the standard data into a number of data segments; encodes the data segments respectively to obtain a coding sequence; encrypts the coding sequence based on an asymmetric encryption algorithm to obtain an encrypted sequence label; uploads the encrypted sequence label to the blockchain system based on a smart contract; obtains the performance indicator data of each node in the blockchain system; and generates early warning information based on the performance indicator data and a set alarm frequency threshold.
[0061] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A data monitoring system based on blockchain, comprising: The data processing module, and the data acquisition module and node monitoring module connected thereto are characterized in that: The data acquisition module is used to obtain the original data sent by the data acquisition terminal; pre-process the original data to obtain standard data; The data processing module is used to divide the standard data into several data segments; encode the several data segments respectively to obtain a coding sequence; encrypt the coding sequence based on an asymmetric encryption algorithm to obtain an encrypted sequence label; upload the encrypted sequence label to the blockchain system based on a smart contract; The node monitoring module is used to obtain performance indicator data of each node in the blockchain system; generate warning information based on the performance indicator data and the set alarm frequency threshold; wherein the performance indicator data includes transaction throughput, query throughput and average data synchronization time; the warning information includes primary warning information and secondary warning information.
2. A data monitoring system based on blockchain according to claim 1, characterized in that: The standard data is divided into several data segments, including: Extract standard data, divide the standard data according to the set data capacity size, and obtain a number of data segments; wherein, when the data size of the divided data is smaller than the set data capacity size, divide it into a single complete data segment.
3. According to claim 1, a data monitoring system based on blockchain is characterized in that: The encoding of the plurality of data segments respectively comprises: Extract several data segments, set a corresponding unique code for each data segment; sort the several unique codes according to a random sorting algorithm to obtain a coding sequence.
4. A data monitoring system based on blockchain according to claim 1, characterized in that: The encrypting of the coding sequence based on the asymmetric encryption algorithm comprises: An asymmetric encryption algorithm is used to generate a private key, and the encoded sequence is encrypted with the private key to obtain an encrypted sequence label.
5. According to claim 1, a data monitoring system based on blockchain is characterized in that: The method of uploading the encrypted sequence tag to the blockchain system based on the smart contract includes: Extract the encrypted sequence tag; deploy the smart contract in the blockchain system, upload the encrypted sequence tag to the blockchain system through the smart contract, and set corresponding data operation permissions for different users in the smart contract to limit the data operation scope of different users.
6. A blockchain-based data monitoring system according to claim 1, characterized in that: The generating of early warning information based on the performance indicator data and the set alarm frequency threshold includes: Extract the performance indicator data of each node; calculate the data anomaly index of the blockchain system based on the performance indicator data of each node; determine whether the data anomaly index is greater than the set anomaly threshold; if yes, mark the warning information as a first-level warning; if no, mark the warning information as a second-level warning.
7. A data monitoring system based on blockchain according to claim 6, characterized in that: The data anomaly index of the blockchain system is calculated based on the performance indicator data of each node, including: Extract the performance indicator data of each node in the blockchain system; through the formula The data anomaly index SYZ is calculated; where JYTi is the transaction throughput of node i, CXTi is the query throughput of node i, STCi is the average data synchronization time of node i, and e is a natural constant; a, b, and c are all proportional coefficients greater than 0; i = 1, 2, ..., n, and n is the total number of nodes in the blockchain system.