CN114877943B - Ecological environment monitoring device based on block chain - Google Patents
Ecological environment monitoring device based on block chain Download PDFInfo
- Publication number
- CN114877943B CN114877943B CN202210554205.9A CN202210554205A CN114877943B CN 114877943 B CN114877943 B CN 114877943B CN 202210554205 A CN202210554205 A CN 202210554205A CN 114877943 B CN114877943 B CN 114877943B
- Authority
- CN
- China
- Prior art keywords
- data
- sub
- node
- blockchain
- environmental
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012806 monitoring device Methods 0.000 title claims abstract description 31
- 230000007613 environmental effect Effects 0.000 claims abstract description 79
- 238000012544 monitoring process Methods 0.000 claims abstract description 51
- 238000003860 storage Methods 0.000 claims abstract description 49
- 238000012545 processing Methods 0.000 claims abstract description 34
- 238000004458 analytical method Methods 0.000 claims abstract description 6
- 238000000034 method Methods 0.000 claims description 13
- 238000013500 data storage Methods 0.000 claims description 10
- 230000011218 segmentation Effects 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 6
- 238000005520 cutting process Methods 0.000 claims description 3
- 239000003256 environmental substance Substances 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 2
- 239000003550 marker Substances 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 14
- 238000004590 computer program Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 241000282412 Homo Species 0.000 description 2
- 238000007405 data analysis Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006798 recombination Effects 0.000 description 2
- 238000005215 recombination Methods 0.000 description 2
- 238000012552 review Methods 0.000 description 2
- 241000282414 Homo sapiens Species 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 238000003912 environmental pollution Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 206010037844 rash Diseases 0.000 description 1
- 230000008521 reorganization Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01D—MEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
- G01D21/00—Measuring or testing not otherwise provided for
- G01D21/02—Measuring two or more variables by means not covered by a single other subclass
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- General Physics & Mathematics (AREA)
- Bioethics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention discloses an ecological environment monitoring device based on a blockchain, and relates to the technical field of blockchains. The device comprises: the system comprises a receiving module, a data processing module, a block chain and a monitoring module; the receiving module is used for receiving node environment mark data collected by environment monitoring nodes arranged at a plurality of preset monitoring positions; the data processing module is used for processing the node environment mark data received by the receiving module and then sending the data to the blockchain for storage; and the monitoring module is used for analyzing the node environment mark data stored in the blockchain through a preset analysis method to obtain an ecological environment monitoring result of each preset monitoring position. The invention can store the environmental sign data in the blockchain, can effectively prevent the data from being tampered maliciously, achieves the aim of decentralization, and effectively ensures the safety of the environmental sign data.
Description
Technical Field
The invention belongs to the technical field of block chains, and particularly relates to an ecological environment monitoring device based on a block chain.
Background
The activities of humans affect the natural environment, which eventually also counteracts humans. In order to pursue a healthier living environment, people begin to develop environmental monitoring from phenomena, and the purposes of analyzing and tracing pollution sources are achieved by accumulating long-term data. With the development of technology, modern technological means such as chemistry, physics, biology, medicine, telemetry, remote sensing and computers are utilized to collect environmental sign data reflecting the quality of ecological environment and the variation trend thereof, and then the environmental quality is assessed by the environmental sign data, so that the follow-up analysis is convenient to put forward relevant countermeasures for controlling environmental pollution, and a precaution mode and an early warning and forecasting mode are established, thereby protecting the living environment of human beings.
The traditional recording and storage mode of the environmental sign data is manual recording in a paper mode, but the mode is extremely low in efficiency, inconvenient for subsequent data analysis, and incapable of performing data analysis work at all when the data volume is large. With the development of computer technology and communication networks, methods for recording and storing environmental sign data have been changed to electronic forms, from local storage to remote storage, so as to facilitate data sharing. However, the current electronic record storage method adopts a centralized storage mode, and once the central storage device is maliciously damaged and modified, data loss is caused, so that serious adverse effects are caused.
Disclosure of Invention
In view of the above, the embodiment of the invention provides an ecological environment monitoring device based on a blockchain, which is used for solving the problem that once a central storage device is maliciously damaged and modified, data is lost, causing serious consequences in the existing environment marking data storage scheme. The invention can store the environmental sign data in the blockchain, can effectively prevent the data from being tampered maliciously, achieves the aim of decentralization, and effectively ensures the safety of the environmental sign data.
The embodiment of the invention provides an ecological environment monitoring device based on a block chain, which comprises the following components: the system comprises a receiving module, a data processing module, a block chain and a monitoring module;
the receiving module is used for receiving node environment mark data collected by environment monitoring nodes arranged at a plurality of preset monitoring positions;
the data processing module is used for processing the node environment mark data received by the receiving module and then sending the data to the blockchain for storage;
and the monitoring module is used for analyzing the node environment mark data stored in the blockchain through a preset analysis method to obtain an ecological environment monitoring result of each preset monitoring position.
In an alternative embodiment, the node environmental label data comprises at least one of environmental chemical data, environmental physical data, environmental biological data, environmental medical data, environmental telemetry data of a predetermined monitoring location.
In an optional embodiment, the monitoring module is specifically configured to determine whether the environmental label data of each node exceeds a preset threshold, and if yes, send early warning information to the user; the early warning information at least comprises corresponding monitoring position identification and node environment mark data.
In an alternative embodiment, the blockchain-based ecological environment monitoring device further includes:
and the historical data storage module is used for regularly cutting the node environment mark data stored before the appointed duration from the current moment in the block chain according to a preset period to store the node environment mark data.
In an alternative embodiment, the data processing module is specifically configured to segment the environmental label data of each node according to the standard data length of the storage node of the blockchain, and store the segmented data into the storage node of the blockchain.
In an alternative embodiment, the data processing module includes:
the segmentation unit is used for sequentially segmenting the current node environment marking data from front to back according to the difference value between the standard data length of the storage node of the block chain and the preset serial number length to obtain a first sub-data sequence corresponding to the current node environment marking data; if the segmentation unit segments the current node environment mark data to the last part of residual data with the length smaller than the difference value between the standard data length of the storage node of the blockchain and the preset serial number length, the last part of residual data is used as the last part of first sub-data of a first sub-data sequence corresponding to the current node environment mark data, and the serial number is the position order of the first sub-data in the first sub-data sequence;
the first data compensation unit is used for carrying out data compensation once on each first sub data in the first sub data sequence corresponding to each node environment mark data, and writing sequence number information to obtain a second sub data sequence corresponding to each node environment mark data;
the second data compensation unit is used for carrying out secondary data compensation on the last second sub data in the second sub data sequence corresponding to the environment marking data of each node to obtain third sub data corresponding to the last second sub data, and replacing the last second sub data in the second sub data sequence with the third sub data corresponding to the second sub data to obtain a final sub data sequence corresponding to the environment marking data of each node;
and the storage unit is used for storing the final sub-data sequence corresponding to the environment mark data of each node into the storage node of the blockchain.
In an alternative embodiment, the data processing module further includes:
the judging unit is used for calculating the division number of the environmental marking data of each node according to a first formula, judging whether the number of the first sub data corresponding to the environmental marking data of the current node obtained by the dividing unit is consistent with the division number of the environmental marking data of the current node after the dividing unit finishes dividing the environmental marking data of the current node, if so, informing the first data compensating unit to perform data compensation once on each first sub data in a first sub data sequence corresponding to the environmental marking data of the current node, otherwise, informing the dividing unit to re-divide the environmental marking data of the current node;
wherein, the first formula is:
N=math.Ceil{[L(D 2 )+N×8]/l 0 }
in the first formula, N is the number of divided parts of the current node environment marking data, and the solving process is to substitute the value of N into the first formula in an integer increasing way from 0 in sequence until the value of N is the number of divided parts of the current node environment marking data when the first formula is satisfied; d (D) 2 Binary form representing the current node context flag data;L(D 2 ) A number of data bits representing a binary form of the current node context flag data; l (L) 0 A standard data length representing a storage node of the blockchain; and (2) math.Ceil { } represents an integer which is greater than or equal to the number in brackets and is closest to the number in brackets, and the preset sequence number length is 8.
In an optional embodiment, the first data compensation unit is specifically configured to perform data compensation on each first sub data in the first sub data sequence corresponding to the environmental label data of each node according to a second formula once;
the second data compensation unit is specifically configured to perform secondary data compensation on the last second sub-data in the second sub-data sequence corresponding to the environmental identifier data of each node according to a third formula;
wherein the second formula is:
|D 2 (i)|=D 2 (i)×(256) 2 +(i) 2
in the second formula, |D 2 (i) The I represents second sub-data in a binary form obtained after data compensation is carried out on the ith first sub-data in the first sub-data sequence corresponding to the current node environment mark data once; d (D) 2 (i) Representing the binary form of the ith first sub data in the first sub data sequence corresponding to the segmented current node environment mark data; () 2 Representing the conversion of the values in brackets into binary numbers;
the third formula is:
‖D 2 (N)‖=|D 2 (N)|×2^[l 0 -L(|D 2 (N)|)]
in the third formula, ||D 2 (N) II represents third sub-data in a binary form obtained by performing secondary data compensation on the last second sub-data in the second sub-data sequence corresponding to the current node environment mark data; l (|D) 2 (N) |) represents the number of data bits in binary form of the i-th first sub data in the first sub data sequence corresponding to the current node environment flag data; 2 l 0 -L(|D 2 (N)|)]L representing 2 0 -L(|D 2 (N) |) power.
In an optional embodiment, the storage unit is specifically configured to store a final sub-data sequence corresponding to each node environmental identifier data and a data length association of the node environmental identifier data in a storage node of the blockchain.
The invention provides an ecological environment monitoring device based on a block chain, which comprises a receiving module, a data processing module, the block chain and a monitoring module. The method comprises the steps that firstly, a receiving module receives node environment marking data collected by an environment monitoring node, then a data processing module processes the node environment marking data and stores the node environment marking data in a blockchain, and finally, a monitoring module analyzes the node environment marking data stored in the blockchain to obtain an ecological environment monitoring result. The invention can store the environmental sign data in the blockchain, can effectively prevent the data from being tampered maliciously, achieves the aim of decentralization, and effectively ensures the safety of the environmental sign data.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an embodiment of a block-chain-based ecological environment monitoring device according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a block-chain-based ecological environment monitoring device according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a third embodiment of a blockchain-based ecological environment monitoring device according to the present invention;
fig. 4 is a schematic diagram of a fourth embodiment of an ecological environment monitoring device based on a blockchain according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic structural diagram of an embodiment of an ecological environment monitoring device based on blockchain according to the embodiment of the present invention. Referring to fig. 1, the apparatus includes: the system comprises a receiving module 1, a data processing module 2, a block chain 3 and a monitoring module 4;
the receiving module 1 is configured to receive node environment flag data collected by environment monitoring nodes disposed at a plurality of predetermined monitoring positions.
In this embodiment, the node environmental label data includes at least one of environmental chemical data, environmental physical data, environmental biological data, environmental medical data, environmental telemetry data, and environmental telemetry data of a predetermined monitoring location. The node environment mark data effectively reflect the ecological environment quality and the change trend thereof, and the data are analyzed later, so that a better environment optimization scheme can be obtained conveniently.
The data processing module 2 is used for processing the node environment marking data received by the receiving module 1 and then sending the data to the blockchain storage 3. Preferably, the data processing module 2 is specifically configured to segment the environmental label data of each node according to the standard data length of the storage node of the blockchain 3, and store the segmented data into the storage node of the blockchain 3.
In this embodiment, the blockchain is a chain composed of one block after another, and certain information is stored in each block. This chain is kept in all servers, and the entire blockchain is secure as long as one server in the entire system can work. These servers, referred to as nodes in the blockchain system, may provide storage space for the entire blockchain system. If the information in the blockchain is to be modified, it is necessary to sign consent of more than half of the nodes and modify the information in all the nodes, which are usually held in different subject hands, so it is an extremely difficult matter to tamper with the information in the blockchain, with data being difficult to tamper with and de-centralize. The node environment mark data is divided and stored according to the standard data length of the storage node (namely the service node) of the block chain, so that the data storage and reading efficiency is effectively improved, in addition, the data storage achieves the effect of decentralization, the safety of the data is ensured, and meanwhile, the data is prevented from being tampered maliciously.
And the monitoring module 4 is used for analyzing the node environment mark data stored in the blockchain 3 by a preset analysis method to obtain the ecological environment monitoring result of each preset monitoring position. Preferably, the monitoring module 4 is specifically configured to determine whether the environmental label data of each node exceeds a preset threshold, and if yes, send early warning information to the user; the early warning information at least comprises corresponding monitoring position identification and node environment mark data.
In this embodiment, after the node environmental sign data is stored in the blockchain, the monitoring module may read the true and reliable node environmental sign data from the blockchain, and perform the next intelligent analysis to obtain the ecological environment monitoring result, so as to facilitate the subsequent provision of environmental treatment measures. Meanwhile, the monitoring module can judge whether the node environment mark data is abnormal or not in real time, such as natural disasters, volcanic eruptions and the like, and if so, early warning information can be timely sent to a user, so that further loss is effectively avoided.
The embodiment of the invention provides an ecological environment monitoring device based on a blockchain, which comprises a receiving module, a data processing module, the blockchain and a monitoring module. The method comprises the steps that firstly, a receiving module receives node environment marking data collected by an environment monitoring node, then a data processing module divides the node environment marking data and stores the node environment marking data in a blockchain, and finally, a monitoring module analyzes the node environment marking data stored in the blockchain to obtain an ecological environment monitoring result. The invention can store the environmental sign data in the blockchain, can effectively prevent the data from being tampered maliciously, achieves the aim of decentralization, and effectively ensures the safety of the environmental sign data.
Fig. 2 is a schematic diagram of a second embodiment of an ecological environment monitoring device based on a blockchain according to an embodiment of the present invention. Referring to fig. 2, in this embodiment, based on the structure of the first embodiment of the block-chain-based ecological environment monitoring device, the block-chain-based ecological environment monitoring device further includes: the historical data storage module 5 is used for regularly cutting the node environment mark data stored before the appointed duration from the current moment in the blockchain 3 according to a preset period to store the node environment mark data.
In this embodiment, the node environmental label data is various, the corresponding data volume is relatively large, and the stored data volume is very huge along with the accumulation of the daily period, but the access times of the history node environmental label data are continuously reduced along with the time, the history node environmental label data are periodically taken out from the blockchain 3 to be stored independently, and the history node environmental label data stored in the blockchain 3 can be deleted later, so that the storage and calculation resources of the blockchain are saved, and the execution efficiency of the device is improved.
The embodiment of the invention provides an ecological environment monitoring device based on a blockchain, which comprises a receiving module, a data processing module, the blockchain, a monitoring module and a historical data storage module. The method comprises the steps that a receiving module receives node environment marking data collected by an environment monitoring node, a data processing module divides the node environment marking data and stores the node environment marking data in a blockchain, a monitoring module analyzes the node environment marking data stored in the blockchain to obtain an ecological environment monitoring result, and a history data storage module stores the history node environment marking data independently at regular intervals. According to the invention, the environmental mark data can be stored in the blockchain, the data can be effectively prevented from being tampered maliciously, the aim of decentralizing is achieved, the safety of the environmental mark data is effectively ensured, in addition, the history node environmental mark data is independently stored, and the execution efficiency of the device is effectively improved.
Fig. 3 is a schematic diagram of a third embodiment of an ecological environment monitoring device based on a blockchain according to an embodiment of the present invention. Referring to fig. 3, in this embodiment, based on the structure of the first embodiment of the blockchain-based ecological environment monitoring device, the data processing module 2 further includes:
the dividing unit 21 is configured to sequentially divide the current node environment identifier data from front to back according to a difference between a standard data length of the storage node of the blockchain and a preset serial number length, so as to obtain a first sub-data sequence corresponding to the current node environment identifier data; and if the current node environment marking data is segmented into the last part of the first sub data sequence corresponding to the current node environment marking data by the segmentation unit, wherein the last part of the first sub data is used as the last part of the first sub data sequence corresponding to the current node environment marking data when the last part of the residual data length is smaller than the difference value between the standard data length of the storage node of the blockchain and the preset serial number length, and the serial number is the position order of the first sub data in the first sub data sequence.
And the first data compensation unit 22 is configured to perform data compensation once on each first sub data in the first sub data sequence corresponding to each node environmental label data, and write sequence number information into the first sub data sequence to obtain a second sub data sequence corresponding to each node environmental label data.
In this embodiment, the data compensation is performed once on each part of the first sub data in the first sub data sequence, and the compensated data is the position information (i.e. serial number information) of each part of the first sub data in the first sub data sequence, so that the node environment mark data after subsequent segmentation is conveniently recombined, and the node environment mark data before segmentation is restored.
And the second data compensation unit 23 is configured to perform secondary data compensation on the last second sub data in the second sub data sequence corresponding to the environmental label data of each node to obtain third sub data corresponding to the last second sub data, and replace the last second sub data in the second sub data sequence with the third sub data corresponding to the second sub data sequence to obtain a final sub data sequence corresponding to the environmental label data of each node.
In this embodiment, the second data compensation unit 23 mainly performs secondary data compensation on the last second sub data in the second sub data sequence, so that the data length of the second data compensation unit is consistent with the data length of other second sub data in the second sub data sequence, which is convenient for storage and reading, and effectively improves the efficiency of storage and reading.
The storage unit 24 is configured to store the final sub-data sequence corresponding to the environment identifier data of each node in the storage node of the blockchain 3.
According to the ecological environment monitoring device based on the blockchain, the data processing module divides the node environment marking data according to the standard data length of the storage node of the blockchain in the process of dividing the node environment marking data and storing the node environment marking data in the blockchain, compensates the first sequence number and the second data length of the divided node environment marking data, and finally stores the compensated data in the blockchain, so that the efficiency of storing and reading the node environment marking data is effectively improved.
Fig. 4 is a schematic diagram of a third embodiment of an ecological environment monitoring device based on a blockchain according to an embodiment of the present invention. Referring to fig. 4, in this embodiment, based on the structure of the third embodiment of the blockchain-based ecological environment monitoring device, the data processing module 2 further includes:
a judging unit 25, configured to calculate the number of divisions of each node environmental label data according to the first formula, and judge whether the number of first sub-data corresponding to the current node environmental label data obtained by the dividing unit 21 is consistent with the number of divisions of the current node environmental label data after the dividing unit 21 finishes dividing the current node environmental label data, if yes, notify the first data compensating unit 22 to perform data compensation once for each first sub-data in the first sub-data sequence corresponding to the current node environmental label data, otherwise notify the dividing unit 21 to re-divide the current node environmental label data; preferably, the first formula is:
N=math.Ceil{[L(D 2 )+N×8]/l 0 } (1)
in the first formula, N is the number of divided parts of the current node environment marking data, and the solving process is to substitute the value of N into the first formula in an integer increasing way from 0 in sequence until the value of N is the number of divided parts of the current node environment marking data when the first formula is satisfied; d (D) 2 A binary form representing the current node context flag data; l (D) 2 ) A number of data bits representing a binary form of the current node context flag data; l (L) 0 A standard data length representing a storage node of the blockchain; math. Ceil { } represents an integer which is the closest to and greater than or equal to the number in brackets; the preset serial number length is 8.
In the present embodiment, it is assumed that L (D 2 ) 30, l 0 If 20, according to the first formula, n=3 is obtained, the node environment flag data needs to be divided into 3 parts, the length of the first part is 12, the length of the second part is 12, and the length of the last part is 6. The number of the divided parts of the marking data is obtained according to the data length of the marking data and the standard data length of the storage nodes of the blockchain, so that the marking data of the node environment is ensured to be rapidly divided, the number of the divided data is automatically checked in a closed loop mode through the dividing score, and the accuracy and the reliability of the divided data are ensured.
As an optional embodiment, the first data compensation unit 22 is specifically configured to perform data compensation on each first sub-data in the first sub-data sequence corresponding to the environmental label data of each node according to the second formula once. Preferably, the second formula is:
|D 2 (i)|=D 2 (i)×(256) 2 +(i) 2 (2)
in the second formula, |D 2 (i) The I represents second sub-data in a binary form obtained after data compensation is carried out on the ith first sub-data in the first sub-data sequence corresponding to the current node environment mark data once; d (D) 2 (i) Representing the binary form of the ith first sub data in the first sub data sequence corresponding to the segmented current node environment mark data; () 2 Indicating that the values in brackets are converted to binary numbers.
In the present embodiment, it is assumed that L (D 2 ) 30, l 0 If 20, according to the first formula, n=3 is calculated, the node environment flag data needs to be divided into 3 parts, the first part has a length of 12, the second part has a length of 12, the last part has a length of 6, and then |d is calculated according to the second formula 2 (1)|=D 2 (1)00000001,|D 2 (1)|=D 2 (2)00000010,|D 2 (3)|=D 2 (3) 00000011, wherein |D 2 (3) The length of i is 14. And carrying out data compensation on the segmented data once according to the segmentation number of the marking data, namely supplementing each segmented data with position information (which can be understood as a serial number) in the original node environment marking data, so that the recombination position of each piece of data can be known when the segmented data is subsequently recombined, and the original node environment marking data is restored.
The second data compensation unit 23 is specifically configured to perform secondary data compensation on the last second sub-data in the second sub-data sequence corresponding to the environmental sign data of each node according to a third formula; preferably, the third formula is:
‖D 2 (N)‖=|D 2 (N)|×2^[l 0 -L(|D 2 (N)|)] (3)
in the third formula, ||D 2 (N) II represents third sub-data in a binary form obtained by performing secondary data compensation on the last second sub-data in the second sub-data sequence corresponding to the current node environment mark data; l (|D) 2 (N) |) represents the number of data bits in binary form of the i-th first sub data in the first sub data sequence corresponding to the current node environment flag data; 2 l 0 -L(|D 2 (N)|)]L representing 2 0 -L(|D 2 (N) |) power.
In the present embodiment, let |d 2 (3)|=D 2 (3)00000011,|D 2 (3) Length of I is 14, l 0 =20, then iid according to the second formula 2 (N)‖=|D 2 (N)|×2^[l 0 -L(|D 2 (N)|)]=D 2 (3)00000011×2^[20-14)]=D 2 (3) 00000011000000, length 20. All the divided data lengths can be made to be the standard data length of the block chain through a third formula. The method and the device realize secondary data compensation of the last data after primary data compensation according to the standard data length of the storage node of the block chain, further obtain the final data which can be uploaded to the block chain node, further supplement the last data with uneven segmentation, and ensure that the bits of the data stored to the block chain are consistent.
The storage unit 24 is specifically configured to store the final sub-data sequence corresponding to each node environmental label data and the data length of the node environmental label data in association with each other in a storage node of the blockchain 3.
In the present embodiment, 1 st to N-1 st sub-data after one data compensation, and II D 2 (N) ULIB is uploaded to a plurality of nodes of the blockchain for data storage, and the ecological environment monitoring device needs to store the data length of the mark data, namely L (D) 2 ) And the subsequent data review and the data reorganization review are facilitated.
The embodiment of the invention provides an ecological environment monitoring device based on a blockchain, which comprises a receiving module, a data processing module, the blockchain and a monitoring module. Firstly, a receiving module receives node environment marking data acquired by an environment monitoring node, then a data processing module segments the node environment marking data according to the standard data length of a storage node of a blockchain, and then the segmented node environment marking data is subjected to compensation of a first sequence number and a second data length, so that the data length after all segmentation is consistent with the standard data length of the storage node of the blockchain, and the segmented data also has the information of the sequence number, thereby being convenient for the recombination of the follow-up segmented data; and finally, storing the compensated data into a block chain, and reading and analyzing the data by a module to be monitored. According to the invention, the environment marking data can be stored according to the standard data length of the storage node of the blockchain, the data storage efficiency is effectively improved, the data can be effectively prevented from being tampered maliciously, the purpose of decentralization is achieved, and the safety of the environment marking data is effectively ensured.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof. The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (6)
1. An ecological environment monitoring device based on a blockchain, comprising: the system comprises a receiving module, a data processing module, a block chain and a monitoring module; the receiving module is used for receiving node environment mark data collected by environment monitoring nodes arranged at a plurality of preset monitoring positions;
the data processing module is used for processing the node environment mark data received by the receiving module and then sending the data to the blockchain for storage; the monitoring module is used for analyzing the node environment mark data stored in the blockchain through a preset analysis method to obtain an ecological environment monitoring result of each preset monitoring position;
the data processing module is specifically configured to segment environmental label data of each node according to a standard data length of a storage node of the blockchain, and store the segmented data into the storage node of the blockchain; the data processing module comprises:
the segmentation unit is used for sequentially segmenting the current node environment marking data from front to back according to the difference value between the standard data length of the storage node of the block chain and the preset serial number length to obtain a first sub-data sequence corresponding to the current node environment marking data; if the segmentation unit segments the current node environment mark data to the last part of residual data with the length smaller than the difference value between the standard data length of the storage node of the blockchain and the preset serial number length, the last part of residual data is used as the last part of first sub-data of a first sub-data sequence corresponding to the current node environment mark data, and the serial number is the position order of the first sub-data in the first sub-data sequence;
the first data compensation unit is used for carrying out data compensation once on each first sub data in the first sub data sequence corresponding to each node environment mark data, and writing sequence number information to obtain a second sub data sequence corresponding to each node environment mark data;
the second data compensation unit is used for carrying out secondary data compensation on the last second sub data in the second sub data sequence corresponding to the environment marking data of each node to obtain third sub data corresponding to the last second sub data, and replacing the last second sub data in the second sub data sequence with the third sub data corresponding to the second sub data to obtain a final sub data sequence corresponding to the environment marking data of each node;
the storage unit is used for storing the final sub-data sequence corresponding to the environment mark data of each node into the storage node of the block chain;
the data processing module further comprises:
the judging unit is used for calculating the division number of the environmental marking data of each node according to a first formula, judging whether the number of the first sub data corresponding to the environmental marking data of the current node obtained by the dividing unit is consistent with the division number of the environmental marking data of the current node after the dividing unit finishes dividing the environmental marking data of the current node, if so, informing the first data compensating unit to perform data compensation once on each first sub data in a first sub data sequence corresponding to the environmental marking data of the current node, otherwise, informing the dividing unit to re-divide the environmental marking data of the current node;
wherein, the first formula is:
N=math.Ceil{[L(D 2 )+N×8]/l 0 }
in the first formula, N is the number of divided parts of the current node environment marking data, and the solving process is to substitute the value of N into the first formula in an integer increasing way from 0 in sequence until the value of N is the number of divided parts of the current node environment marking data when the first formula is satisfied; d (D) 2 A binary form representing the current node context flag data; l (D) 2 ) A number of data bits representing a binary form of the current node context flag data; l (L) 0 Representation ofStandard data length of storage nodes of the blockchain; and (2) math.Ceil { } represents an integer which is greater than or equal to the number in brackets and is closest to the number in brackets, and the preset sequence number length is 8.
2. The blockchain-based ecological environment monitoring device of claim 1, wherein the node environmental marker data includes at least one of environmental chemical data, environmental physical data, environmental biological data, environmental medical data, environmental telemetry data of a predetermined monitoring location.
3. The ecological environment monitoring device based on the blockchain as in claim 1, wherein the monitoring module is specifically configured to determine whether the environmental label data of each node exceeds a preset threshold, and if yes, send early warning information to a user; the early warning information at least comprises corresponding monitoring position identification and node environment mark data.
4. The blockchain-based ecological environment monitoring device of claim 1, further comprising:
and the historical data storage module is used for regularly cutting the node environment mark data stored before the appointed duration from the current moment in the block chain according to a preset period to store the node environment mark data.
5. The blockchain-based ecological environment monitoring device according to claim 1, wherein the first data compensation unit is specifically configured to perform data compensation on each first sub data in the first sub data sequence corresponding to each node environment identifier data once according to a second formula;
the second data compensation unit is specifically configured to perform secondary data compensation on the last second sub-data in the second sub-data sequence corresponding to the environmental identifier data of each node according to a third formula;
wherein the second formula is:
|D 2 (i)|=D 2 (i)×(256) 2 +(i) 2
in the second formula, |D 2 (i) The I represents second sub-data in a binary form obtained after data compensation is carried out on the ith first sub-data in the first sub-data sequence corresponding to the current node environment mark data once; d (D) 2 (i) Representing the binary form of the ith first sub data in the first sub data sequence corresponding to the segmented current node environment mark data; () 2 Representing the conversion of the values in brackets into binary numbers;
the third formula is:
∥D 2 (N)∥=|D 2 (N)|×2^[l 0 -L(|D 2 (N)|)]
in the third formula, D 2 (N) the first sub data represents the third sub data in a binary form obtained by carrying out secondary data compensation on the last second sub data in the second sub data sequence corresponding to the current node environment mark data;
L(|D 2 (N) |) represents the number of data bits in binary form of the i-th first sub data in the first sub data sequence corresponding to the current node environment flag data; 2++l0-L (|D) 2 (N)|)]L0-L (|D) representing 2 2 (N) |) power.
6. The blockchain-based ecological environment monitoring device according to claim 1, wherein the storage unit is specifically configured to store a final sub-data sequence corresponding to each node environmental label data and a data length of the node environmental label data in association with each other in a storage node of the blockchain.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210554205.9A CN114877943B (en) | 2022-05-19 | 2022-05-19 | Ecological environment monitoring device based on block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210554205.9A CN114877943B (en) | 2022-05-19 | 2022-05-19 | Ecological environment monitoring device based on block chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114877943A CN114877943A (en) | 2022-08-09 |
CN114877943B true CN114877943B (en) | 2024-04-09 |
Family
ID=82678238
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210554205.9A Active CN114877943B (en) | 2022-05-19 | 2022-05-19 | Ecological environment monitoring device based on block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114877943B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116579551B (en) * | 2023-04-28 | 2023-12-08 | 广东技术师范大学 | Intelligent management system and method based on intelligent manufacturing |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109819017A (en) * | 2018-12-25 | 2019-05-28 | 中链科技有限公司 | Environmental monitoring and data processing method and device based on block chain |
CN110737658A (en) * | 2019-09-06 | 2020-01-31 | 平安国际智慧城市科技股份有限公司 | Data fragment storage method, device, terminal and readable storage medium |
CN111291414A (en) * | 2020-03-11 | 2020-06-16 | 深圳市网心科技有限公司 | Data storage method and device, computer device and storage medium |
CN112632077A (en) * | 2020-12-28 | 2021-04-09 | 深圳壹账通智能科技有限公司 | Data storage method, device, equipment and storage medium based on redis |
CN112882445A (en) * | 2020-06-05 | 2021-06-01 | 洋浦美诺安电子科技有限责任公司 | Intelligent monitoring and management system for 5G and block chain for intelligent manufacturing |
CN112988075A (en) * | 2021-04-26 | 2021-06-18 | 睿至科技集团有限公司 | Method and system for storing user data through block chain technology |
-
2022
- 2022-05-19 CN CN202210554205.9A patent/CN114877943B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109819017A (en) * | 2018-12-25 | 2019-05-28 | 中链科技有限公司 | Environmental monitoring and data processing method and device based on block chain |
CN110737658A (en) * | 2019-09-06 | 2020-01-31 | 平安国际智慧城市科技股份有限公司 | Data fragment storage method, device, terminal and readable storage medium |
CN111291414A (en) * | 2020-03-11 | 2020-06-16 | 深圳市网心科技有限公司 | Data storage method and device, computer device and storage medium |
CN112882445A (en) * | 2020-06-05 | 2021-06-01 | 洋浦美诺安电子科技有限责任公司 | Intelligent monitoring and management system for 5G and block chain for intelligent manufacturing |
CN112632077A (en) * | 2020-12-28 | 2021-04-09 | 深圳壹账通智能科技有限公司 | Data storage method, device, equipment and storage medium based on redis |
CN112988075A (en) * | 2021-04-26 | 2021-06-18 | 睿至科技集团有限公司 | Method and system for storing user data through block chain technology |
Non-Patent Citations (1)
Title |
---|
Cloud Storage Strategy of Blockchain Based on Genetic Prediction Dynamic Files;Jiali Tang et al.;《Electronics》;1-14页 * |
Also Published As
Publication number | Publication date |
---|---|
CN114877943A (en) | 2022-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20240220686A1 (en) | Urban-region road network vehicle-passage flow prediction method and system based on hybrid deep learning model | |
Ford et al. | Smart grid energy fraud detection using artificial neural networks | |
CN108154244A (en) | The O&M methods, devices and systems of real estate power equipment | |
TW200502802A (en) | Method, device and system for intelligent right data search management as well as the storage medium storing and executing computer program of this method | |
Sasmito et al. | Implementation of rapid application development method in the development of geographic information systems of industrial centers | |
CN108960527A (en) | The method for early warning and relevant apparatus of labor turnover | |
CN112150237B (en) | Multi-model fused order overdue early warning method, device, equipment and storage medium | |
CN112700131B (en) | AB test method and device based on artificial intelligence, computer equipment and medium | |
CN114877943B (en) | Ecological environment monitoring device based on block chain | |
CN116843071B (en) | Transportation network operation index prediction method and device for intelligent port | |
CN113590824A (en) | Method and device for constructing causal graph and related equipment | |
CN109064104A (en) | Material equipment management method, system and terminal device | |
CN116091185A (en) | Customer loss early warning method and device | |
CN116843216A (en) | Index early warning method and device, computer equipment and storage medium | |
CN108960528A (en) | The prediction technique and relevant apparatus of labor turnover reason | |
CN109344255B (en) | Label filling method and terminal equipment | |
CN114036157A (en) | Method and device for monitoring transmission line tree obstacle, computer equipment and storage medium | |
CN109388711A (en) | Method and device for clustering log streams | |
CN111709597B (en) | Power grid production domain operation monitoring system | |
CN117217505A (en) | Resource management system based on book field | |
CN116843395A (en) | Alarm classification method, device, equipment and storage medium of service system | |
CN113762225B (en) | Automatic monitoring alarm system for chemical workshop | |
CN112686762B (en) | Policy data violation detection method and device, computer equipment and storage medium | |
CN115114073A (en) | Alarm information processing method and device, storage medium and electronic equipment | |
CN115865610A (en) | Network alarm information processing method, device and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |