Garbage recovery supervision system and method based on block chain
1. A garbage recovery supervision system based on a block chain is characterized in that the system is divided into a five-layer structure, participates in a terminal layer, a password service layer and a network communication layer in a block chain network in a node mode, and guarantees a contract layer and a data storage layer, wherein the contract layer and the data storage layer guarantee real chaining of data, data cannot be tampered and data can be traced; wherein:
the terminal layer comprises an intelligent garbage can node, a garbage truck node, a garbage treatment center node, a garbage factory node and a supervision node; the intelligent garbage can node is responsible for recording the weight of various types of garbage collected by the garbage can, and the signature uploads the data in the terminal data format to the block chain network; the garbage truck nodes are responsible for recording the received information of each intelligent garbage can node and signing and uploading data in a garbage truck data format to the block chain network; the garbage disposal center node is responsible for recording the collected information of the garbage truck node and signing and uploading the data in the garbage disposal center data format to the block chain network; the garbage truck node is responsible for recording the collected information of the garbage truck node and signing and uploading data in a garbage disposal plant data format to the block chain network; the supervision node has the authority of viewing the data in the block chain network;
the password service layer respectively generates corresponding key pairs for the intelligent garbage can node, the garbage truck node, the garbage disposal center node, the garbage factory node and the supervision node in the terminal layer through an encryption algorithm of the Etheng;
the network communication layer ensures the reliability of the data transmission of the intelligent garbage can nodes, the garbage truck nodes, the garbage disposal center nodes, the garbage plant nodes, the supervision nodes and the block chain network in the terminal layer through Http;
the contract layer is responsible for chaining and inquiring data on the chain according to formats, wherein the data are uploaded by the intelligent garbage can node, the garbage truck node, the garbage processing center node, the garbage factory node and the supervision node in the terminal layer by compiling a transaction management intelligent contract;
and the data storage layer adopts a non-relational database of MongoDB to carry out block data persistence.
2. The garbage collection monitoring system of claim 1, wherein the cryptographic service layer uses a hash algorithm and an elliptic curve digital signature algorithm.
3. The garbage collection monitoring system of claim 1, wherein the contract layer mainly comprises the following modules: the system comprises a chain winding module, a verification module, a timing public distribution chain information module, a tracing module and a data information difference detection module; wherein:
the uplink module is used for sending the verification of the request after counting the interactive information after each node of the terminal layer completes the interaction with the node of the next flow, and signature uplink is obtained after the authorization;
the verification module is used for verifying the signer of the information, and if the signer of the information is true, the authorization information is returned; otherwise, returning the impermissible information;
the timing public distribution chain information module is used for counting and numbering the newly added information on the time chain at intervals, returning the newly added information to all nodes on the terminal layer, and displaying the information;
the tracing module generates a hash value calculated by the password service layer after each message is acquired from the intelligent dustbin node, and the hash value is subjected to signature authentication by the node information in the terminal layer in sequence; when tracing back a hash value, pass on the traversal chain
According to the record information of the hash value, carrying out data information difference detection according to each segment of signature information, and displaying a processing result;
and the data information difference detection module is used for marking the garbage processing flow which is not in the error value range.
4. The garbage collection monitoring system of claim 1, wherein the data content stored by the data storage layer comprises a hash value, a data value, a signature, and stage information;
hash value: the intelligent garbage can node performs hash-256 operation according to the timestamp, the weight of the garbage and the public key information of the intelligent garbage can node;
data values: the specific value of the garbage information of the batch;
signature: the garbage recycling process of a batch can pass through four stages of recycling of an intelligent garbage can, a garbage truck, a garbage processing center and a garbage factory, and each stage is signed after being processed by a corresponding node;
stage (2): representing at which stage this piece of information is.
5. The garbage collection supervision method based on the block chain according to claim 1 is characterized by comprising the following specific steps:
(1) when the garbage truck node arrives, the intelligent garbage can node records the garbage type information of the intelligent garbage can node and signs the information through the network communication layer and uploads the information to the contract layer;
(2) when the garbage truck node collects the information of one garbage truck node, the intelligent device records the information of the intelligent garbage can node collected at this time and uploads the information to a contract layer through a network communication layer signature;
(3) when the garbage disposal center node receives the information of one garbage truck node, the information of the garbage truck node collected at this time is recorded through intelligent equipment and is uploaded to a contract layer through a network communication layer signature;
(4) the garbage factory node records the information of each garbage disposal in a fixed period, records the information of the garbage disposal center node collected at this time through intelligent equipment and uploads the information to a contract layer through a network communication layer signature;
(5) the contract layer classifies the information according to different information sources of the received nodes, and then encrypts and chains the information by using the public key of the supervision node;
(6) the supervisory node obtains the chain encryption information by calling the relevant API of the contract layer and decrypts the encryption information by the private key.
Background
At the present stage, the environmental protection aspect of our country is extremely valued. The coming of related laws and regulations enables a large number of enterprises to participate in the aspect, but the garbage recycling process is various.
The traditional garbage recycling process is as follows:
1. classifying the residential garbage in each region and then throwing the classified residential garbage at a fixed point;
2. in the morning and evening of each day, the garbage classification vehicle goes to each region to collect garbage in the garbage can;
3. the garbage classification vehicle is transported to a small garbage treatment center for simple treatment and compression;
4. conveying the compressed garbage to a garbage disposal plant for final garbage disposal;
5. the garbage disposal plant periodically reports the garbage disposal result to relevant departments to obtain subsidies.
The processing result of each link is too centralized, and the problem source is difficult to find when problems occur in the recycling process.
Chapter viii "regulations on management of domestic waste in Shanghai City": a supervision and inspection system of domestic garbage source reduction, whole-process classification, resource utilization and harmless disposal is established in the city, and relevant departments should disclose inspection conditions and treatment results to the society in time and accept social supervision.
Disclosure of Invention
In order to solve the problems, the invention provides a garbage collection monitoring system based on the characteristics of non-falsification and traceability of block chain storage information. Meanwhile, the system can regularly disclose the inspection result by a contract layer for social supervision, thereby realizing the purpose of supervision.
The technical scheme of the invention is specifically introduced as follows.
The invention provides a garbage recovery monitoring system based on a block chain, which is of a five-layer structure and comprises a terminal layer, a password service layer and a network communication layer, wherein the terminal layer participates in a block chain network in a node mode, the password service layer and the network communication layer ensure the safe transmission of data, and a contract layer and a data storage layer ensure the real chaining of the data, wherein the contract layer and the data storage layer ensure the data to be not falsified and traceable; wherein:
the terminal layer comprises an intelligent garbage can node, a garbage truck node, a garbage treatment center node, a garbage factory node and a supervision node;
the intelligent garbage can node is responsible for recording the weight of various types of garbage collected by the garbage can, and the signature uploads the data in the terminal data format to the block chain network; the garbage truck nodes are responsible for recording the received information of each intelligent garbage can node and signing and uploading data in a garbage truck data format to the block chain network; the garbage disposal center node is responsible for recording the collected information of the garbage truck node and signing and uploading the data in the garbage disposal center data format to the block chain network; the garbage truck node is responsible for recording the collected information of the garbage truck node and signing and uploading data in a garbage disposal plant data format to the block chain network; the supervision node has the authority of viewing the data in the block chain network;
the password service layer respectively generates corresponding key pairs for the intelligent garbage can node, the garbage truck node, the garbage disposal center node, the garbage factory node and the supervision node in the terminal layer through an encryption algorithm of the Etheng;
the network communication layer ensures the reliability of data transmission of the intelligent garbage can nodes, the garbage truck nodes, the garbage disposal center nodes, the garbage plant nodes, the supervision nodes and the block chain network in the terminal layer through http;
the contract layer is responsible for chaining and inquiring data on the chain according to formats, wherein the data are uploaded by the intelligent garbage can node, the garbage truck node, the garbage processing center node, the garbage factory node and the supervision node in the terminal layer by compiling a transaction management intelligent contract;
and the data storage layer adopts a non-relational database of MongoDB to carry out block data persistence.
The invention also provides a garbage recovery supervision method based on the block chain, which comprises the following steps:
(1) when the garbage truck node arrives, the intelligent garbage can node records the garbage type information of the intelligent garbage can node and signs the information through the network communication layer and uploads the information to the contract layer;
(2) when the garbage truck node collects the information of one garbage truck node, the intelligent device records the information of the intelligent garbage can node collected at this time and uploads the information to a contract layer through a network communication layer signature;
(3) when the garbage disposal center node receives the information of one garbage truck node, the information of the garbage truck node collected at this time is recorded through intelligent equipment and is uploaded to a contract layer through a network communication layer signature;
(4) the garbage factory node records the information of each garbage disposal in a fixed period, records the information of the garbage disposal center node collected at this time through intelligent equipment and uploads the information to a contract layer through a network communication layer signature;
(5) the contract layer classifies the information according to different information sources of the received nodes, and then encrypts and chains the information by using the public key of the supervision node;
(6) the supervisory node obtains the chain encryption information by calling the relevant API of the contract layer and decrypts the encryption information by the private key.
Compared with the prior art, the invention has the beneficial effects that: the invention is based on the block chain technology, the technology has the characteristics of decentralization, no tampering, traceability and the like, and is suitable for system design under cooperation of a plurality of peer nodes; secondly, the garbage recycling process is a multi-party cooperation process, if the supervision of related departments only obtains the report information of a company every month, the data information has possibility of counterfeiting, so a mechanism of verifying and endorsement by multiple parties is adopted to maintain the reliability of the information, and a traceable and verifiable garbage supervision platform is established based on a block chain technology.
Drawings
Fig. 1 is a level diagram of the garbage collection monitoring system based on block chains according to the present invention.
Fig. 2 is a garbage truck node worker interface.
FIG. 3 is a supervisory node working interface.
Detailed Description
The technical solution of the present invention will be described in detail with reference to the accompanying drawings and embodiments.
Example 1
Fig. 1 is a level diagram of the garbage collection monitoring system based on block chains according to the present invention. Fig. 2 is a garbage truck node worker interface. FIG. 3 is a supervisory node working interface.
A garbage recovery supervisory system based on a block chain comprises the following working procedures:
1. the resident garbage in each region is classified and then put in a fixed point (the weight of each garbage can be completely recorded due to the appearance of a large number of intelligent garbage cans);
2. the garbage classification vehicle is used for weighing and endorsing the collected garbage (because the recorded data exist in the process 1, the link is easy to be found if the garbage classification vehicle intentionally does harm);
3. the garbage treatment center receives garbage transported by each garbage truck, performs classification compression treatment and endorsement operation (because of the reasons of the processes 1 and 2, the deteriorations in the process can be found);
4. the garbage disposal plant carries out disposal according to garbage types and carries out endorsement operation (because of the reasons of 1,2 and 3, if the link is found to be bad);
5. related departments supervise the workload of each link through the platform, so that the supervision of the related departments is facilitated, and the whole process is more transparent. If the conditions allow, the data can be displayed on the intelligent garbage can in the process 1, and the supervision of the public is facilitated.
The block chain is technically characterized in that the purpose of decentralization is to prevent rogue node confusion. Each link in the garbage classification is participated by different people, and each link can become a party doing harm. Such a need is well suited to be solved with blockchain technology.
The details of the specific hierarchy of work are as follows:
the terminal layer comprises intelligent garbage can nodes, garbage truck nodes, garbage treatment center nodes, garbage plant nodes and a supervision platform. Its main function is to provide an application layer interface for the services provided by the underlying layer blockchain. Such as: and uploading various junk information, timestamps, statistical personnel information and the like.
The cipher layer service layer mainly functions to provide a computational cryptography level of protection for nodes participating in a blockchain network, such as: the SHA-256 algorithm is performed on the identity card number of each worker to generate a key seed, and then an elliptic curve algorithm is used to generate a key pair for the workers. This ensures that all data information is truly manipulated by the person holding the private key. Meanwhile, in order to ensure that the private key of the staff is not leaked, the signature and the private key can be generated locally, but the public key and the identity information of the staff need to be registered on the platform.
The network communication layer adopts an Http protocol for data transmission, the terminal node firstly performs verification operation after acquiring transmitted data, and since all the registration of the staff is registered on the platform, the platform has a public key thereof, at this time, the public key provided by the platform is required to be used for message verification, and uplink operation is performed on the data information after successful verification.
The contract layer is a code program, and the content written by the contract layer is made by the platform with reference to the actual business scene. The contract layer mainly provides several functions: the system comprises a chain winding function, a verification function, a timing public distribution chain information function, a tracing function and a data information difference detection function.
1) The uplink function: after each terminal node completes the interaction with the node of the next flow, the information of the interaction is counted and then sent to the platform center for verification, and the signature uplink is obtained after the verification is approved
2) And (4) verification function: after receiving the request message, the intelligent contract of the platform verifies the signer of the message, and if the signer is true, the intelligent contract returns the permit message; otherwise, no permission information is returned.
3) Timing the information function on the public cloth chain: the intelligent contract of the platform sets the function as a timing service, counts and numbers the newly added information on the time chain at intervals and returns the newly added information to all nodes in the platform; and displaying information on the platform page.
4) Tracing function: and generating a hash value calculated by a password service layer after each piece of information is acquired from the source node, and sequentially carrying out signature authentication on all the node information in the garbage processing flow. When a hash value is traced back, the recorded information on the hash value on the chain is traversed, a data information difference detection function is carried out according to each piece of signature information, and a processing result is displayed on a platform.
5) Data information difference detection function: because the real service scene inevitably has error behaviors, an error value (a specific numerical value is set by a platform) exists in each garbage per ton, and when the error value is not in the range, the garbage processing flow is labeled.
A data storage layer: the platform bottom layer applies MongoDB database storage, and the storage of data is stored in a non-relational database in a key-value form. Stored data content: hash value, data value, signature and phase.
1) Hash value: the intelligent garbage can (source node) is obtained by performing hash-256 operation according to the timestamp, the weight of the garbage and the public key information of the intelligent garbage can.
2) Data values: the specific value of the garbage information of the batch, such as wet garbage: 50kg, dry garbage: 20kg etc
3) Signature: a batch of garbage track-keeping processes goes through 4 stages, and each stage is signed after being processed by different nodes.
4) Stage (2): representing at which stage this piece of information is.
The above contents are the specific details of the invention, and the invention designs a set of monitoring platform by using the block chain technology to effectively monitor the related enterprises, and strictly standardizes the processing flow and the transparentization of each resource information.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:一种基于标签技术的主网设备画像装置及方法