CN112527905B - A blockchain IoT data fusion method for multi-node pumping units - Google Patents
A blockchain IoT data fusion method for multi-node pumping units Download PDFInfo
- Publication number
- CN112527905B CN112527905B CN202011499117.0A CN202011499117A CN112527905B CN 112527905 B CN112527905 B CN 112527905B CN 202011499117 A CN202011499117 A CN 202011499117A CN 112527905 B CN112527905 B CN 112527905B
- Authority
- CN
- China
- Prior art keywords
- information
- node
- base station
- aggregation node
- aggregation
- 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
- 238000005086 pumping Methods 0.000 title claims abstract description 22
- 238000007500 overflow downdraw method Methods 0.000 title claims abstract description 16
- 230000002776 aggregation Effects 0.000 claims abstract description 141
- 238000004220 aggregation Methods 0.000 claims abstract description 141
- 230000004913 activation Effects 0.000 claims abstract description 9
- 238000000034 method Methods 0.000 claims description 27
- 230000008569 process Effects 0.000 claims description 11
- 238000012795 verification Methods 0.000 claims description 9
- 230000004927 fusion Effects 0.000 claims description 6
- 230000005059 dormancy Effects 0.000 claims description 5
- 230000007958 sleep Effects 0.000 claims description 3
- 238000012790 confirmation Methods 0.000 claims description 2
- 238000012545 processing Methods 0.000 abstract description 3
- 238000004364 calculation method Methods 0.000 description 4
- 230000004931 aggregating effect Effects 0.000 description 2
- 238000005265 energy consumption Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000006855 networking Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000013524 data verification Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000004146 energy storage Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 238000010408 sweeping Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2255—Hash tables
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
-
- 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
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Multimedia (AREA)
- Computing Systems (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及物联网数据处理技术领域,具体为一种抽油机多节点的区块链物联网数据融合方法。The invention relates to the technical field of Internet of Things data processing, in particular to a multi-node blockchain Internet of Things data fusion method for pumping units.
背景技术Background technique
物联网是指通过各种信息传感器,实时采集任何需要监控、连接、互动的物体或过程,采集其声、光、热、电、力学、化学、生物、位置等各种需要的信息,通过各类可能的网络接入,实现物与物、物与人的泛在连接,实现对物品和过程的智能化感知、识别和管理。物联网是一个基于互联网、传统电信网等的信息承载体,它让所有能够被独立寻址的普通物理对象形成互联互通的网络,通常是无线传感器进行组网。The Internet of Things refers to the real-time collection of any object or process that needs to be monitored, connected, and interacted with through various information sensors, and collects various required information such as sound, light, heat, electricity, mechanics, chemistry, biology, and location. It realizes the kind of possible network access, realizes the ubiquitous connection between things and things, and between things and people, and realizes the intelligent perception, identification and management of objects and processes. The Internet of Things is an information carrier based on the Internet, traditional telecommunication networks, etc. It allows all ordinary physical objects that can be independently addressed to form an interconnected network, usually wireless sensors for networking.
在物联网运行过程中,需要传感器节点将采集的数据传输至基站(在一些环境中也可能是无线路由器)。达成该任务最简单的方式是直接发送至基站,即网络中每个节点把采集到的数据直接发送至基站。但是这种方式对于远离基站的传感器节点而言,会导致传输数据消耗大量的能量,在同等规格的情况下,该节点的使用寿命会明显短于网络中的距离基站较近的传感器节点。为解决上述问题,一系列以节约能量为目的的数据收集算法相继被提出。During the operation of the Internet of Things, sensor nodes are required to transmit the collected data to the base station (in some environments, it may also be a wireless router). The easiest way to achieve this task is to send directly to the base station, that is, each node in the network sends the collected data directly to the base station. However, for sensor nodes far away from the base station, this method will consume a lot of energy for transmitting data. Under the same specification, the service life of this node will be significantly shorter than that of sensor nodes closer to the base station in the network. In order to solve the above problems, a series of data collection algorithms aimed at saving energy have been proposed one after another.
除上述问题外,由于现有的组网设备种类繁多,如果需要进行有效的决策,则需要利用数据融合技术,对采集到的若干信息,在一定准则下加以自动分析、综合,以完成所需的决策和评估任务。且,现有的数据融合技术,需要注重数据的验证和认证,添加了复杂的运算,如果由算力较小的设备承担较多的运算任务,会增加网络的时延、降低了网络的鲁棒性。In addition to the above problems, due to the wide variety of existing networking equipment, if effective decision-making is required, it is necessary to use data fusion technology to automatically analyze and synthesize the collected information under certain criteria to complete the required decision-making and evaluation tasks. Moreover, the existing data fusion technology needs to pay attention to data verification and authentication, adding complex calculations. If more computing tasks are undertaken by devices with less computing power, it will increase the network delay and reduce the network’s robustness. Stickiness.
针对上述问题,中国专利公开号为CN102075A的专利文献中,公开了一种用于保障物联网数据融合信息安全的方法。通过设计的监督机制,使得监督信息完整可达,避免了以往当节点受到攻击时,其他安全机制存在的报文信息被恶意丢弃的现象;同时,监督信息与融合信息同源,可信性高。该文献声称该方法,对于硬件、使用环境等外部环境因素的依赖度低,新建网络、已有网络使用本方案的开销区别小,能应对网络、数据的变化,可扩展性强。但是上述方案在使用过程中,物联网采集的数据容易被篡改,造成数据可信度低,需要提升数据的安全性、可靠性。In view of the above problems, in the patent document of Chinese Patent Publication No. CN102075A, a method for ensuring the information security of the data fusion of the Internet of Things is disclosed. Through the designed supervision mechanism, the supervision information is complete and accessible, avoiding the malicious discarding of message information in other security mechanisms when the node is attacked in the past; at the same time, the supervision information and the fusion information have the same source, with high credibility . The literature claims that this method has low dependence on external environmental factors such as hardware and operating environment, and the cost difference between new networks and existing networks using this solution is small, and it can cope with network and data changes, and has strong scalability. However, during the use of the above scheme, the data collected by the Internet of Things is easily tampered with, resulting in low data reliability, and it is necessary to improve the security and reliability of the data.
在现有的应用场景中,通常是用于工业生产和智能家居的环境中,在智能家居的应用场景中,通常是以路由器作为基站,以各类智能设备作为节点采集和处理各类数据。在工业场景中,例如,以在油田工作的抽油机为例,通常设置有若干节点采集和处理各类数据,以保证整个抽油机的正常工作,但是由于节点较多,在某一节点不可信时(外部攻击或者其他原因),还存在较大的安全隐患。In existing application scenarios, it is usually used in industrial production and smart home environments. In smart home application scenarios, routers are usually used as base stations, and various smart devices are used as nodes to collect and process various types of data. In industrial scenarios, for example, taking a pumping unit working in an oil field as an example, several nodes are usually set up to collect and process various data to ensure the normal operation of the entire pumping unit. When it is untrustworthy (external attack or other reasons), there are still major security risks.
因此,现在急需一种以节约能量为目的,不会过多增加网络时延,能够保证数据的安全性、可靠性的抽油机多节点的区块链物联网数据融合方法。Therefore, there is an urgent need for a multi-node blockchain IoT data fusion method for pumping units that aims to save energy, does not increase network delay too much, and can ensure data security and reliability.
发明内容Contents of the invention
本发明意在提供一种以节约能量为目的,不会过多增加网络时延,能够保证数据的安全性、可靠性的抽油机多节点的区块链物联网数据融合方法。The present invention intends to provide a multi-node block chain Internet of things data fusion method for pumping units, which aims at saving energy, does not increase network delay too much, and can ensure data security and reliability.
本申请提供如下技术方案:This application provides the following technical solutions:
一种抽油机多节点的区块链物联网数据融合方法,包括如下步骤:A multi-node blockchain Internet of things data fusion method for pumping units, comprising the following steps:
S1:在本周期中,基站根据基础库内存储的节点信息选取存储有上链前历史信息的哈希值H0的聚合节点,并发送激活信息唤醒聚合节点;S1: In this cycle, the base station selects the aggregation node that stores the hash value H0 of the historical information before going up the chain according to the node information stored in the basic database, and sends activation information to wake up the aggregation node;
S2:聚合节点向基站发送该聚合节点存储的H0,基站接收该聚合节点的H0并重新计算基础库内存储的上链前历史信息的哈希值H00,然后将H0与H00进行比对得到第一结果,若第一结果为相同,则执行S3;若第一结果为不相同,则基站将接收到的至少两个聚合节点的H0进行比对得到第二结果;若第二结果为相同,则基站向预设地址发送基础库内存储的上链前历史信息被篡改的报警信息;若第二结果为不相同,则基站向预设地址发送系统无法确认安全性的报警信息;S2: The aggregation node sends the H0 stored by the aggregation node to the base station, and the base station receives the H0 of the aggregation node and recalculates the hash value H00 of the historical information stored in the basic database before going up to the chain, and then compares H0 with H00 to obtain the first One result, if the first result is the same, execute S3; if the first result is different, the base station compares the received H0 of at least two aggregation nodes to obtain the second result; if the second result is the same, Then the base station sends to the preset address an alarm message indicating that the historical information stored in the base database has been tampered with before going up to the chain; if the second result is not the same, the base station sends an alarm message that the system cannot confirm the security to the preset address;
S3:基站向聚合节点广播报文信息,聚合节点在接收到报文信息后广播启动信息,普通节点在接收到第一条的启动信息后启动并忽略其他的启动信息,启动信息中包括该聚合节点的地址,然后普通节点被唤醒,将需要报文的初始信息根据启动信息的地址发送至聚合节点;S3: The base station broadcasts the message information to the aggregation node. The aggregation node broadcasts the start information after receiving the message information. The ordinary node starts after receiving the first start information and ignores other start information. The start information includes the aggregation The address of the node, and then the ordinary node is awakened, and the initial information of the required message is sent to the aggregation node according to the address of the startup information;
S4:聚合节点收到初始信息处理成待上链信息,然后向基站和其他聚合节点进行广播,接收到待上链信息的基站和其他聚合节点以H0和待上链信息进行哈希运算对应生成新增的哈希值H1并向外广播H1,基站和其他任一聚合节点在接收H1后,停止未完成的哈希运算,基站将待上链信息和H1保存至上链前历史信息生成新的上链前历史信息,聚合节点将H0更新为H1,完成一次初始信息的上链;S4: The aggregation node receives the initial information and processes it into the information to be linked, and then broadcasts it to the base station and other aggregation nodes. The base station and other aggregation nodes that receive the information to be linked will perform hash operations on H0 and the information to be linked to generate corresponding information The newly added hash value H1 and broadcast H1 to the outside, the base station and any other aggregation node stop the unfinished hash operation after receiving H1, and the base station saves the information to be uploaded and H1 to the historical information before uploading to generate a new For historical information before uploading to the chain, the aggregation node updates H0 to H1 to complete an initial information upload;
S5:完成一次初始信息的上链后,重复S4,直至无聚合节点向外广播待上链信息,基站在预设时间内未接收到待上链信息后,向聚合节点发送确认信息并在接收到聚合节点反馈的已完成本周期报文回执信息后向聚合节点发送休眠信息,聚合节点在接收到休眠信息后,保存最后的完成初始信息上链后的哈希值HN以备下一周期的校验,然后休眠;S5: After completing the uplink of the initial information, repeat S4 until no aggregation node broadcasts the information to be uplinked. After the base station does not receive the information to be uplinked within the preset time, it sends a confirmation message to the aggregation node and receives it. The aggregation node sends the dormancy information to the aggregation node after receiving the message receipt information that has completed this cycle. After receiving the dormancy information, the aggregation node saves the last hash value HN after the initial information is uploaded to the chain for the next cycle. Verify, then sleep;
S6:基站记录最后一个反馈已完成本周期报文回执信息的聚合节点信息和本周期用时T,并在基础数据库中更新发送初始信息最快的且满足最低性能要求的普通节点为新增的聚合节点向其发送HN,基站保存完成初始信息上链后的信息,并删除HN,以备下一周期校验。S6: The base station records the information of the last aggregation node that fed back the message receipt information of this cycle and the time T of this cycle, and updates the common node that sends the initial information the fastest and meets the minimum performance requirements in the basic database as a new aggregation The node sends the HN to it, and the base station saves the information after the initial information is uploaded to the chain, and deletes the HN for the next cycle of verification.
本发明的原理及优势:在一个周期开始前,基站的基础数据库内存储有节点信息,具体而言就是那些是聚合节点那些是普通节点,然后还保存有所有的上链前历史信息;聚合节点存储有理论上是上链前历史信息对应的哈希值H0。在本周期启动后,基站向聚合节点发送激活信息,同时基站计算上链前历史信息现有的哈希值H00,将H0和H00进行对比,以确定基站和聚合节点内的信息未被篡改。在这个阶段,利用的是聚合节点在唤醒阶段的等待时间,在现有的整个系统中,这个时间通常是无法缩短的,因此并不会耗费额外的时间。且由于H00是再次重新计算的,能够保证数据的可信度。The principle and advantages of the present invention: before the start of a period, the basic database of the base station stores node information, specifically those are aggregation nodes and those are ordinary nodes, and then all historical information before uplink is stored; aggregation nodes It stores the hash value H0 theoretically corresponding to the historical information before going to the chain. After the start of this cycle, the base station sends activation information to the aggregation node. At the same time, the base station calculates the existing hash value H00 of the historical information before going up the chain, and compares H0 with H00 to ensure that the information in the base station and the aggregation node has not been tampered with. In this stage, the waiting time of the aggregation node in the wake-up stage is used. In the existing entire system, this time is usually irreducible, so no additional time is consumed. And because H00 is recalculated again, the credibility of the data can be guaranteed.
在S3和S4中,是聚合节点向普通节点广播启动信息,普通节点根据接收到的第一个启动信息,向该聚合节点发送初始信息。这样的方式是充分考虑到各个聚合节点的性能的差异性,性能(包括了硬件性能和网络连通性)较好的聚合节点能够接收到更多的普通节点的信息并进行处理,然后向外广播,由基站和所有的聚合节点进行哈希运算,最终将初始信息上链。这样的方式,能够保证各个聚合节点向基站反馈信息的可信度。虽然是基站和所有的聚合节点均参与到了哈希运算中,存在一定的算力浪费,但是实际上,由于仅进行单一的哈希运算,不存在更多的比较,整体的速度与不进行哈希运算直接通过基站顺序记录相比,并不会有太大的时间差异。但是提升了整个系统的可信程度。In S3 and S4, the aggregation node broadcasts the startup information to the common nodes, and the normal node sends initial information to the aggregation node according to the first startup information received. This way is to fully consider the performance differences of each aggregation node. The aggregation node with better performance (including hardware performance and network connectivity) can receive and process more information from ordinary nodes, and then broadcast it to the outside world. , the base station and all aggregation nodes perform hash operations, and finally upload the initial information to the chain. In this way, the credibility of information fed back by each aggregation node to the base station can be guaranteed. Although the base station and all aggregation nodes participate in the hash operation, there is a certain waste of computing power, but in fact, because only a single hash operation is performed, there is no more comparison, and the overall speed is the same as that without hashing. There will not be much time difference compared with the Greek operation directly recorded sequentially by the base station. But it improves the credibility of the whole system.
在S5和S6,是完成本周期内整个系统的周期同步后,进行下一周期的准备。S6是基站根据本周期用时T,调整聚合节点的相关信息,保留优化的可能性。In S5 and S6, after the cycle synchronization of the entire system in this cycle is completed, the preparation for the next cycle is carried out. S6 is that the base station adjusts the relevant information of the aggregation node according to the time T of the current cycle, and retains the possibility of optimization.
本方案中,普通节点仅需要将相关信息发送至聚合节点,对于普通节点而言,实现了节约其能量损耗的目的。在对每个普通节点的信息进行同步的过程时,通过区块链的方式将数据融合保存。本方案中,在开始阶段,利用聚合节点唤醒的等待时间,让基站进行哈希值运算,不会增加系统额外的等待时延;在进行数据加密的过程中,仅需要聚合节点以及基站进行哈希值运算,减去了其他的验证过程,与基站直接进行顺序保存相比,并不会增加过多的网络时延。由于每个周期,每次数据写入均进行相关的验证,保证的数据的安全性。In this solution, ordinary nodes only need to send relevant information to the aggregation node. For ordinary nodes, the purpose of saving energy consumption is realized. In the process of synchronizing the information of each common node, the data is fused and saved through the blockchain. In this solution, at the initial stage, the waiting time for the aggregation node to wake up is used to allow the base station to perform hash value calculation, which will not increase the additional waiting delay of the system; in the process of data encryption, only the aggregation node and the base station are required to perform the hash value calculation. The Hive operation, minus other verification processes, will not increase too much network delay compared with the base station's direct sequence preservation. Since every cycle and every data writing is related to the verification, the security of the data is guaranteed.
进一步,还包括S7,基站对至少两个以上的本周期用时T进行分析,选取用时最少的一个周期所对应的聚合节点信息,在下一周期按照该聚合节点信息发送激活信息唤醒聚合节点。Further, it also includes S7, the base station analyzes the time T of at least two or more current cycles, selects the aggregation node information corresponding to the cycle with the least time, and sends activation information according to the aggregation node information in the next cycle to wake up the aggregation node.
这样的方式能够能加优化聚合节点的设置。This way can optimize the settings of aggregation nodes.
进一步,在S1中,基础库内存储的节点信息包括了满足聚合节点性能的最低性能要求。Further, in S1, the node information stored in the basic library includes the minimum performance requirements to meet the aggregation node performance.
这样的方式能够保证聚合节点的性能符合要求。This way can ensure that the performance of the aggregation node meets the requirements.
进一步,性能要求包括:芯片主频、芯片核心数、RAM数值以及ROM数值。Further, the performance requirements include: chip main frequency, chip core number, RAM value and ROM value.
这样的方式能够保证聚合节点的性能符合要求。This way can ensure that the performance of the aggregation node meets the requirements.
进一步,S6中,最低性能要求为预设数值。Further, in S6, the minimum performance requirement is a preset value.
这样的方式能够保证聚合节点的性能符合要求。This way can ensure that the performance of the aggregation node meets the requirements.
进一步,S4中,聚合节点向外广播H1时,会附上时间戳,若基站和其他任一聚合节点在同时接到两个H1时,会读取时间戳内的时间信息,然后认可时间优先的H1。Furthermore, in S4, when the aggregation node broadcasts H1 to the outside, it will attach a timestamp. If the base station and any other aggregation node receive two H1s at the same time, they will read the time information in the timestamp, and then recognize that the time is the priority H1.
这样的方式能够保证数据的及时性和准确性。This way can ensure the timeliness and accuracy of data.
进一步,S2中,预设地址为用户预设的不可更改的紧急联系方式。Further, in S2, the preset address is an unchangeable emergency contact method preset by the user.
这样的方式能够更加方便和有效的提醒到用户。This way can remind the user more conveniently and effectively.
进一步,S2中,若存在某一聚合节点,第一结果、第二结果均不相同且其他聚合节点第一结果相同,则基站向其他聚合节点广播该聚合节点为不可信节点,该聚合节点基础库内存储的节点信息变更为普通节点。Further, in S2, if there is an aggregation node, the first result and the second result are different and the first results of other aggregation nodes are the same, then the base station broadcasts to other aggregation nodes that the aggregation node is an untrusted node, and the aggregation node is based on The node information stored in the library is changed to a normal node.
将聚合节点修改为普通节点,保证系统的安全性。Modify the aggregation node to a common node to ensure the security of the system.
进一步,S4中,接收到待上链信息的基站和其他聚合节点以H0和待上链信息进行哈希运算对应生成新增的哈希值H1并向外广播H1,基站和其他任一聚合节点在接收H1两次后,停止未完成的哈希运算。Further, in S4, the base station and other aggregation nodes that have received the information to be linked up use H0 and the information to be linked up to perform a hash operation to generate a new hash value H1 and broadcast H1 to the outside. The base station and any other aggregation node After receiving H1 twice, stop the outstanding hash operation.
这样的方式多经历一次验证,能够保证数据的正确性。This method undergoes one more verification to ensure the correctness of the data.
附图说明Description of drawings
图1为本申请一种抽油机多节点的区块链物联网数据融合方法实施例中的逻辑框图。Fig. 1 is a logic block diagram in an embodiment of a multi-node blockchain Internet of Things data fusion method for pumping units of the present application.
具体实施方式detailed description
下面通过具体实施方式对本申请技术方案进行进一步详细说明:The technical solution of the present application will be further described in detail below through specific implementation methods:
实施例一Embodiment one
如图1所示,本实施例公开的一种抽油机多节点的区块链物联网数据融合方法,包括如下步骤:As shown in Figure 1, a multi-node block chain Internet of Things data fusion method for pumping units disclosed in this embodiment includes the following steps:
S1基站唤醒聚合节点:在本周期中(一个周期的选择本领域技术人员可以根据实际节点的数量和性能进行确定),基站根据基础库内存储的节点信息选取存储有上链前历史信息的哈希值H0的聚合节点,并发送激活信息唤醒聚合节点;具体的聚合节点是有性能要求的,具体要求如下:芯片主频450MHz、芯片核心数2、RAM数值10MB以及ROM数值50MB,任一数值低于上述要求的均不能成为聚合节点;S1 base station wakes up the aggregation node: in this cycle (the selection of a cycle can be determined by those skilled in the art according to the number and performance of the actual nodes), the base station selects the hash nodes that store the historical information before going up the chain according to the node information stored in the basic database. Aggregation nodes with a value of H0, and send activation information to wake up the aggregation nodes; the specific aggregation nodes have performance requirements, and the specific requirements are as follows: the main frequency of the chip is 450MHz, the number of chip cores is 2, the value of RAM is 10MB, and the value of ROM is 50MB, any value Those below the above requirements cannot be aggregated nodes;
S2哈希值一次验证:聚合节点向基站发送该聚合节点存储的H0,基站接收该聚合节点的H0并重新计算基础库内存储的上链前历史信息的哈希值H00,然后将H0与H00进行比对得到第一结果,若第一结果为相同,则执行S3;若第一结果为不相同,则基站将接收到的至少两个聚合节点的H0进行比对得到第二结果;若第二结果为相同,则基站向预设地址发送基础库内存储的上链前历史信息被篡改的报警信息;若第二结果为不相同,则基站向预设地址发送系统无法确认安全性的报警信息;具体的,预设地址为烧录在单片机中的网址信息。S2 One-time verification of the hash value: the aggregation node sends the H0 stored by the aggregation node to the base station, and the base station receives the H0 of the aggregation node and recalculates the hash value H00 of the historical information stored in the basic database before going up to the chain, and then compares H0 with H00 Perform comparison to obtain the first result, if the first result is the same, execute S3; if the first result is not the same, the base station compares the received H0 of at least two aggregation nodes to obtain the second result; if the first The two results are the same, then the base station sends to the preset address an alarm message indicating that the historical information stored in the basic database has been tampered with; if the second result is not the same, the base station sends an alarm that the system cannot confirm the security to the preset address information; specifically, the default address is the URL information burned in the microcontroller.
S3启动报文:基站向聚合节点广播报文信息,聚合节点在接收到报文信息后广播启动信息,普通节点在接收到第一条的启动信息后启动并忽略其他的启动信息,启动信息中包括该聚合节点的地址,然后普通节点被唤醒,将需要报文的初始信息根据启动信息的地址发送至聚合节点;S3 startup message: the base station broadcasts message information to the aggregation node, the aggregation node broadcasts the startup information after receiving the message information, and the ordinary node starts after receiving the first startup information and ignores other startup information. Including the address of the aggregation node, then the ordinary node is awakened, and the initial information of the required message is sent to the aggregation node according to the address of the startup information;
S4初始信息开始上链:聚合节点收到初始信息处理成待上链信息,然后向基站和其他聚合节点进行广播,接收到待上链信息的基站和其他聚合节点以H0和待上链信息进行哈希运算对应生成新增的哈希值H1并向外广播H1,基站和其他任一聚合节点在接收H1后,停止未完成的哈希运算,基站将待上链信息和H1保存至上链前历史信息生成新的上链前历史信息,聚合节点将H0更新为H1,完成一次初始信息的上链;聚合节点向外广播H1时,会附上时间戳,若基站和其他任一聚合节点在同时接到两个H1时,会读取时间戳内的时间信息,然后认可时间优先的H1。上述方式能够上性能较好的基站或者聚合节点承担更多的运算,保证处理效率。S4 The initial information starts to go up the chain: the aggregation node receives the initial information and processes it into the information to be linked up, and then broadcasts it to the base station and other aggregation nodes. The hash operation corresponds to generate a new hash value H1 and broadcast H1 to the outside. After receiving H1, the base station and any other aggregation node stop the unfinished hash operation, and the base station saves the information to be uploaded and H1 to the chain. Historical information generates new historical information before going up to the chain. The aggregation node updates H0 to H1 to complete an initial information uplink; when the aggregation node broadcasts H1 to the outside, it will attach a timestamp. If the base station and any other aggregation node are in When receiving two H1s at the same time, it will read the time information in the timestamp, and then recognize the H1 with time priority. In the above method, base stations or aggregation nodes with better performance can undertake more calculations to ensure processing efficiency.
S5初始信息完成上链:完成一次初始信息的上链后,重复S4,直至无聚合节点向外广播待上链信息,基站在预设时间内未接收到待上链信息后,向聚合节点发送确认信息并在接收到聚合节点反馈的已完成本周期报文回执信息后向聚合节点发送休眠信息,聚合节点在接收到休眠信息后,保存最后的完成初始信息上链后的哈希值HN以备下一周期的校验(此处的HN为下一周期的H0),然后休眠;S5 The initial information is uploaded to the chain: After the initial information is uploaded to the chain once, repeat S4 until no aggregation node broadcasts the information to be uploaded to the outside. After the base station does not receive the information to be uploaded within the preset time, it sends the Confirm the information and send the dormancy information to the aggregating node after receiving the receipt information of the completion of this cycle message fed back by the aggregating node. Prepare the verification of the next cycle (the HN here is the H0 of the next cycle), and then sleep;
S6优化单一聚合节点:基站记录最后一个反馈已完成本周期报文回执信息的聚合节点信息和本周期用时T,并在基础数据库中更新发送初始信息最快的且满足最低性能要求的普通节点为新增的聚合节点向其发送HN,基站保存完成初始信息上链后的信息,并删除HN,以备下一周期校验(下一周期时,基站再次得到的HN为H00)。即通过这样的方式是实现动态的调节聚合节点和普通节点的数量或占比。S6 Optimize a single aggregation node: the base station records the information of the last aggregation node that fed back the message receipt information of this cycle and the time T of this cycle, and updates the common node that sends the initial information the fastest and meets the minimum performance requirements in the basic database as The newly added aggregation node sends HN to it, and the base station saves the information after the initial information is uploaded to the chain, and deletes the HN for the next cycle of verification (the HN obtained by the base station again in the next cycle is H00). That is to say, in this way, the number or proportion of aggregation nodes and ordinary nodes can be adjusted dynamically.
S7优化全局,基站对50个的周期用时T进行分析,选取用时最少的一个周期所对应的聚合节点信息,在下一周期按照该聚合节点信息发送激活信息唤醒聚合节点。S7 optimizes the overall situation. The base station analyzes the time T of 50 cycles, selects the aggregation node information corresponding to the cycle with the least time, and sends activation information to wake up the aggregation node in the next cycle according to the aggregation node information.
以具体场景为例进行说明,如在智能家居的场景中,普通节点为各个房间中对应的传感器,基站为家里的路由器,聚合节点通常为智能设备,例如智能冰箱、扫地机器人甚至手机等智能设备。例如,在无用户时,路由器需要获取各个普通节点的数据,但是又需要保证数据的安全性。即可向智能设备发送激活信息。在这个场景中,智能设备通常是保持休眠但是未彻底关机的状态的,因此可以被唤醒。然后智能设备向路由器发送H0,路由器将H00与H0对比。如果第一结果相同,则表明是安全的,可以继续。如果第一结果不相同,甚至第二结果都不相同,则路由器读取已经烧录有预设网址信息的单片机中的信息,路由器读取预设网址信息向预设网址发送信息报警。Take a specific scenario as an example. For example, in a smart home scenario, ordinary nodes are the corresponding sensors in each room, base stations are home routers, and aggregation nodes are usually smart devices, such as smart refrigerators, sweeping robots, and even mobile phones. . For example, when there are no users, the router needs to obtain the data of each common node, but needs to ensure the security of the data. The activation information can be sent to the smart device. In this scenario, the smart device usually remains dormant but not completely shut down, so it can be woken up. Then the smart device sends H0 to the router, and the router compares H00 with H0. If the first result is the same, it is safe to proceed. If the first result is not the same, or even the second result is not the same, the router reads the information in the single-chip microcomputer that has been burned with the preset website information, and the router reads the preset website information and sends a message alarm to the preset website.
然后智能设备向外广播报文信息,例如温度传感器、智能阀门之类的普通节点收到报文信息后,就将相关信息反馈至智能设备。智能设备相关广播,然后智能设备和路由器都进行哈希运算,先算出的向外广播H1,然后所有设备进行同步,完成一次的信息同步。然后重复此步骤,完成所有的接收到报文信息的普通节点的发送的信息的同步。Then the smart device broadcasts the message information to the outside. After ordinary nodes such as temperature sensors and smart valves receive the message information, they feed back the relevant information to the smart device. The smart device broadcasts, and then both the smart device and the router perform a hash operation, and the calculated H1 is broadcast to the outside, and then all devices are synchronized to complete one information synchronization. Then repeat this step to complete the synchronization of information sent by all common nodes that have received message information.
完成之后,路由器保存相关信息,删除最后的哈希值,智能设备删除相关信息,保存最后的哈希值,在下一周期时再进行核验,保证信息的安全性。After the completion, the router saves the relevant information, deletes the last hash value, and the smart device deletes the relevant information, saves the last hash value, and then checks in the next cycle to ensure the security of the information.
在另一实施例中,以抽油机的使用场景进行补充说明。普通节点为设置在抽油机相关节点的传感器,聚合节点为满足性能要求的信号中继器或者传感器/控制器,基站为接收终端。In another embodiment, a supplementary description is made with the use scene of the pumping unit. Ordinary nodes are sensors set on relevant nodes of pumping units, aggregation nodes are signal repeaters or sensors/controllers that meet performance requirements, and base stations are receiving terminals.
实施例2Example 2
与实施例1相比,不同之处仅在于,S2中,若存在某一聚合节点,第一结果、第二结果均不相同且其他聚合节点第一结果相同,则基站向其他聚合节点广播该聚合节点为不可信节点,该聚合节点基础库内存储的节点信息变更为普通节点。Compared with Embodiment 1, the only difference is that in S2, if there is a certain aggregation node, the first result and the second result are different and the first results of other aggregation nodes are the same, then the base station broadcasts the aggregation node to other aggregation nodes. The aggregation node is an untrusted node, and the node information stored in the basic library of the aggregation node is changed to a normal node.
实施例3Example 3
与实施例1相比,不同之处仅在于,S4中,接收到待上链信息的基站和其他聚合节点以H0和待上链信息进行哈希运算对应生成新增的哈希值H1并向外广播H1,基站和其他任一聚合节点在接收H1两次后,停止未完成的哈希运算。Compared with Embodiment 1, the only difference is that in S4, the base station and other aggregation nodes that have received the information to be uplinked use H0 and the information to be uplinked to perform a hash operation to generate a new hash value H1 and send it to H1 is broadcast outside, and the base station and any other aggregation node stop the unfinished hash operation after receiving H1 twice.
实施例4Example 4
与实施例3相比,不同之处仅在于,在S6中,基站记录最后一个反馈已完成本周期报文回执信息的聚合节点信息和本周期用时T,并在基础数据库中更新发送初始信息最快的且满足最低性能要求的普通节点为新增的聚合节点向其发送HN,该新增的聚合节点读取并记录本周期中的电源供电电压V1,并在下一周期完成后再次读取电源供电电压V2,若V1>V2,则该新增的聚合节点向基站反馈该节点为储能式设备(非直接供电设备,即下一周期的供电电压比本次的供电电压更低,说明明显增加能耗,且不是电网供电,如果继续作为聚合节点会影响其使用寿命),基站在下一周期将该新增的聚合节点变更为普通节点。Compared with Embodiment 3, the only difference is that in S6, the base station records the information of the last aggregation node that feeds back the message receipt information of this cycle and the time T of this cycle, and updates the initial information in the basic database. The normal node that is fast and meets the minimum performance requirements sends HN to it for the newly added aggregation node. The newly added aggregation node reads and records the power supply voltage V1 in this cycle, and reads the power supply again after the next cycle is completed. Power supply voltage V2, if V1>V2, then the newly added aggregation node will feed back to the base station that the node is an energy storage device (indirect power supply device, that is, the power supply voltage of the next cycle is lower than the current power supply voltage, indicating that it is obviously Increase energy consumption, and it is not powered by the grid. If it continues to be an aggregation node, it will affect its service life), the base station will change the newly added aggregation node to a normal node in the next cycle.
以上的仅是本发明的实施例,该发明不限于此实施案例涉及的领域,方案中公知的具体结构及特性等常识在此未作过多描述,所属领域普通技术人员知晓申请日或者优先权日之前发明所属技术领域所有的普通技术知识,能够获知该领域中所有的现有技术,并且具有应用该日期之前常规实验手段的能力,所属领域普通技术人员可以在本申请给出的启示下,结合自身能力完善并实施本方案,一些典型的公知结构或者公知方法不应当成为所属领域普通技术人员实施本申请的障碍。应当指出,对于本领域的技术人员来说,在不脱离本发明结构的前提下,还可以作出若干变形和改进,这些也应该视为本发明的保护范围,这些都不会影响本发明实施的效果和专利的实用性。本申请要求的保护范围应当以其权利要求的内容为准,说明书中的具体实施方式等记载可以用于解释权利要求的内容。The above is only an embodiment of the present invention, and the invention is not limited to the field involved in this implementation case. The common knowledge such as the specific structure and characteristics known in the scheme is not described here, and those of ordinary skill in the art know the filing date or priority All ordinary technical knowledge in the technical field to which the invention belongs before the date, can know all the prior art in this field, and have the ability to apply the conventional experimental methods before the date, those of ordinary skill in the art can, under the inspiration given by this application, To perfect and implement this solution in combination with one's own ability, some typical known structures or known methods should not become obstacles for those of ordinary skill in the art to implement this application. It should be pointed out that for those skilled in the art, under the premise of not departing from the structure of the present invention, several modifications and improvements can also be made, and these should also be regarded as the protection scope of the present invention, and these will not affect the implementation of the present invention. Effects and utility of patents. The scope of protection required by this application shall be based on the content of the claims, and the specific implementation methods and other records in the specification may be used to interpret the content of the claims.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011499117.0A CN112527905B (en) | 2020-12-17 | 2020-12-17 | A blockchain IoT data fusion method for multi-node pumping units |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011499117.0A CN112527905B (en) | 2020-12-17 | 2020-12-17 | A blockchain IoT data fusion method for multi-node pumping units |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112527905A CN112527905A (en) | 2021-03-19 |
CN112527905B true CN112527905B (en) | 2023-01-17 |
Family
ID=75001201
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011499117.0A Active CN112527905B (en) | 2020-12-17 | 2020-12-17 | A blockchain IoT data fusion method for multi-node pumping units |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112527905B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107171812A (en) * | 2017-07-18 | 2017-09-15 | 光载无限(北京)科技有限公司 | It is a kind of based on block chain without key signature infrastructure construction method |
CN107992621A (en) * | 2017-12-22 | 2018-05-04 | 杭州云象网络技术有限公司 | A kind of intelligent cinematic industry service system based on block chain multichain technological incorporation |
CN108632293A (en) * | 2018-05-16 | 2018-10-09 | 山东建筑大学 | Architectural Equipment Internet of things system based on block chain technology and method |
CN109040271A (en) * | 2018-08-15 | 2018-12-18 | 深圳市引方科技有限公司 | A kind of network equipment completeness protection method under distributed environment |
CN109302491A (en) * | 2018-11-13 | 2019-02-01 | 爱普(福建)科技有限公司 | A kind of industry internet framework and its operation method based on block chain |
CN109460996A (en) * | 2018-10-26 | 2019-03-12 | 全链通有限公司 | Processing method, equipment and the computer readable storage medium of publicly-owned block chain |
CN109586934A (en) * | 2018-12-27 | 2019-04-05 | 链极智能科技(上海)有限公司 | A kind of block chain bottom-layer network transaction Synchronous fluorimetry method |
CN109961281A (en) * | 2017-12-22 | 2019-07-02 | 中国电信股份有限公司 | Flow settlement method, system and base station and computer readable storage medium |
CN110674222A (en) * | 2019-10-08 | 2020-01-10 | 腾讯科技(深圳)有限公司 | Data sharing method, device, equipment and medium |
CN111224804A (en) * | 2018-11-26 | 2020-06-02 | 中国移动通信集团辽宁有限公司 | IoT device initialization method, device, IoT device and storage medium |
CN111597228A (en) * | 2020-05-13 | 2020-08-28 | 山大地纬软件股份有限公司 | Multi-chain system and method for improving block chain expansibility |
CN111625779A (en) * | 2020-05-29 | 2020-09-04 | 河南科技大学 | Block chain-based social network digital content copyright protection method |
CN111782551A (en) * | 2020-08-04 | 2020-10-16 | 腾讯科技(深圳)有限公司 | Test method and device for block chain item and computer equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10713686B2 (en) * | 2014-03-22 | 2020-07-14 | Retailmenot, Inc. | Peer-to-peer geotargeting content with ad-hoc mesh networks |
US10739997B2 (en) * | 2017-11-20 | 2020-08-11 | International Business Machines Corporation | Deletion of blocks in a blockchain |
US10528776B1 (en) * | 2018-08-28 | 2020-01-07 | Digiprint Ip Llc | Tracking and authentication of products via distributed ledgers and NFC tags |
-
2020
- 2020-12-17 CN CN202011499117.0A patent/CN112527905B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107171812A (en) * | 2017-07-18 | 2017-09-15 | 光载无限(北京)科技有限公司 | It is a kind of based on block chain without key signature infrastructure construction method |
CN109961281A (en) * | 2017-12-22 | 2019-07-02 | 中国电信股份有限公司 | Flow settlement method, system and base station and computer readable storage medium |
CN107992621A (en) * | 2017-12-22 | 2018-05-04 | 杭州云象网络技术有限公司 | A kind of intelligent cinematic industry service system based on block chain multichain technological incorporation |
CN108632293A (en) * | 2018-05-16 | 2018-10-09 | 山东建筑大学 | Architectural Equipment Internet of things system based on block chain technology and method |
CN109040271A (en) * | 2018-08-15 | 2018-12-18 | 深圳市引方科技有限公司 | A kind of network equipment completeness protection method under distributed environment |
CN109460996A (en) * | 2018-10-26 | 2019-03-12 | 全链通有限公司 | Processing method, equipment and the computer readable storage medium of publicly-owned block chain |
CN109302491A (en) * | 2018-11-13 | 2019-02-01 | 爱普(福建)科技有限公司 | A kind of industry internet framework and its operation method based on block chain |
CN111224804A (en) * | 2018-11-26 | 2020-06-02 | 中国移动通信集团辽宁有限公司 | IoT device initialization method, device, IoT device and storage medium |
CN109586934A (en) * | 2018-12-27 | 2019-04-05 | 链极智能科技(上海)有限公司 | A kind of block chain bottom-layer network transaction Synchronous fluorimetry method |
CN110674222A (en) * | 2019-10-08 | 2020-01-10 | 腾讯科技(深圳)有限公司 | Data sharing method, device, equipment and medium |
CN111597228A (en) * | 2020-05-13 | 2020-08-28 | 山大地纬软件股份有限公司 | Multi-chain system and method for improving block chain expansibility |
CN111625779A (en) * | 2020-05-29 | 2020-09-04 | 河南科技大学 | Block chain-based social network digital content copyright protection method |
CN111782551A (en) * | 2020-08-04 | 2020-10-16 | 腾讯科技(深圳)有限公司 | Test method and device for block chain item and computer equipment |
Non-Patent Citations (2)
Title |
---|
《基于双区块链的基站动环信息监控系统》;樊建峰等;《计算机科学》;20190819;第46卷(第12期);155-164 * |
《抽油机传动系统节能研究》;张晓菊等;《机床与液压》;20201115;第48卷(第21期);111-116 * |
Also Published As
Publication number | Publication date |
---|---|
CN112527905A (en) | 2021-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104812030B (en) | Towards the blending agent access control method of chain type wireless sensor network | |
CN106230645B (en) | Low-power-consumption wireless communication method used between monitoring node and convergence gateway | |
CN105934976B (en) | The method, apparatus and master-slave network electricity-saving system of master-slave network suspend mode and wake-up | |
Ge et al. | Q‐learning based flexible task scheduling in a global view for the Internet of Things | |
CN102869077A (en) | ZigBee-protocol-based data acquisition and transmission method of wireless sensor network | |
CN104936312A (en) | IoT intelligent node and method with data preprocessing and device management functions | |
CN113453304B (en) | Self-adaptive synchronous MAC protocol based on virtual clustering and path reservation | |
Sarang et al. | Energy‐efficient asynchronous QoS MAC protocol for wireless sensor networks | |
CN103619057B (en) | 802.15.4e wireless device low-power consumption network-building methods based on 4 20mA loops power takings | |
CN106506046A (en) | A power-saving method for a terminal node of a broadband carrier communication system | |
Wang et al. | LIAA: A listen interval adaptive adjustment scheme for green communication in event-sparse IoT systems | |
Zhao et al. | Energy efficient and cluster based routing protocol for WSN | |
Chen et al. | An efficient power saving polling scheme in the internet of energy | |
Deng et al. | Early wake-up ahead node for fast code dissemination in wireless sensor networks | |
CN101547451B (en) | Wireless sensor network local region covering algorithm based on delayed start | |
Wang et al. | Adaptive energy saving algorithms for Internet of Things devices integrating end and edge strategies | |
CN111385860B (en) | Message priority based Bluetooth Mesh low-power consumption node on-demand awakening method | |
CN109714804A (en) | Cluster head election algorithm based on relative surplus energy and SEP agreement | |
CN112527905B (en) | A blockchain IoT data fusion method for multi-node pumping units | |
CN103873195B (en) | Media access control method suitable for household power line network | |
CN106714264B (en) | Energy-saving method and system for nodes of Internet of things | |
CN111246549B (en) | Method and device for providing node dormancy and wakeup time | |
CN108810842A (en) | A kind of wireless sensor network node and the MAC protocol method for the node | |
CN101895592B (en) | Routing and addressing method based on tree topology address assignment | |
CN103327572A (en) | Neighbor discovering method of IEEE802.15.4e (Institute of Electrical and Electric Engineer 802.15.4e) network |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20241009 Address after: No. 56, Block B-4D, Xiaozhuang Riverbank South, Shengli Road West, Xincheng District, Tongliao Economic and Technological Development Zone, Inner Mongolia Autonomous Region 028000 Patentee after: Tongliao Chuangyuan Software Development Co.,Ltd. Country or region after: China Address before: 028000 No.22 Huolinhe street, Horqin district, Tongliao City, Inner Mongolia Autonomous Region Patentee before: Inner Mongolia University For The Nationalities Country or region before: China |
|
TR01 | Transfer of patent right |