CN110493345A - Method and system for software upgrade of Internet of Things terminal based on block chain - Google Patents
Method and system for software upgrade of Internet of Things terminal based on block chain Download PDFInfo
- Publication number
- CN110493345A CN110493345A CN201910785146.4A CN201910785146A CN110493345A CN 110493345 A CN110493345 A CN 110493345A CN 201910785146 A CN201910785146 A CN 201910785146A CN 110493345 A CN110493345 A CN 110493345A
- Authority
- CN
- China
- Prior art keywords
- software
- terminal
- information
- software upgrade
- upgrade
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
- H04L63/123—Applying verification of the received information received data contents, e.g. message integrity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- General Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
技术领域technical field
本发明是关于物联网领域,特别是关于一种基于区块链的物联网终端软件升级方法及系统。The present invention relates to the field of the Internet of Things, in particular to a block chain-based method and system for upgrading the software of an Internet of Things terminal.
背景技术Background technique
WannaCry是一种电脑软件勒索病毒,该恶意软件会扫描电脑上的TCP445端口,以类似于蠕虫病毒的方式传播,攻击主机并加密主机上存储的文件,然后要求以比特币的形式支付赎金。近期WannaCry勒索病毒全球大爆发,至少150个国家、30万名用户中招,造成损失达80亿美元,已经影响到金融,能源,医疗等众多行业,造成严重的危害。究其原因,即用户未能及时升级系统软件所导致。因此软件升级功能必不可少,不仅能使用户得到新版软件新功能的体验,又能防范软件漏洞。软件升级不仅要实现软件版本的检查和验证,还必须保证下载数据的完整性。目前软件升级模式同时是基于C/S(客户端/服务器)模式的软件升级模式,如图1所示,服务器端作为中心节点,客户端从服务器端下载最新版本软件进行安装升级。WannaCry is a computer software ransomware virus that scans the TCP445 port on the computer, spreads in a manner similar to a worm, attacks the host and encrypts files stored on the host, and then demands ransom payment in the form of Bitcoin. The recent global outbreak of WannaCry ransomware has infected at least 300,000 users in at least 150 countries, causing a loss of US$8 billion. It has affected many industries such as finance, energy, and medical care, causing serious harm. The reason is that the user failed to upgrade the system software in time. Therefore, the software upgrade function is essential, which not only enables users to experience the new functions of the new version of the software, but also prevents software loopholes. Software upgrades not only need to check and verify the software version, but also must ensure the integrity of the downloaded data. The current software upgrade mode is also based on the C/S (client/server) mode. As shown in Figure 1, the server is used as the central node, and the client downloads the latest version of the software from the server to install and upgrade.
随着物联网和5G技术的发展,万物互联的时代的即将来临,预计到2020年,联网设备达250亿台,并将持续增长。大规模物联网在给人生活带来便利的同时,也提出了更高的安全需求。在物联网海量终端设备场景下,现有基于C/S模式的软件升级方式容易造成网络阻塞问题,导致软件升级不及时引发安全风险。并且基于中心化的缺点还在于易出现单点故障的问题,即若软件中心升级服务器瘫痪,整个系统就会出错,并且也难以防范软件升级补丁数据篡改问题,致使可靠性和安全性较低。因此需要研究新的方案解决海量终端设备软件升级难题。With the development of the Internet of Things and 5G technology, the era of the Internet of Everything is coming. It is estimated that by 2020, there will be 25 billion connected devices and will continue to grow. While the large-scale Internet of Things brings convenience to people's lives, it also raises higher security requirements. In the scenario of a large number of terminal devices in the Internet of Things, the existing software upgrade method based on the C/S mode is likely to cause network congestion problems, resulting in untimely software upgrades and causing security risks. And the disadvantage of centralization is that it is prone to single point of failure, that is, if the software center upgrade server is paralyzed, the entire system will go wrong, and it is difficult to prevent software upgrade patch data tampering, resulting in low reliability and security. Therefore, it is necessary to study a new solution to solve the software upgrade problem of massive terminal equipment.
公开于该背景技术部分的信息仅仅旨在增加对本发明的总体背景的理解,而不应当被视为承认或以任何形式暗示该信息构成已为本领域一般技术人员所公知的现有技术。The information disclosed in this Background section is only for enhancing the understanding of the general background of the present invention and should not be taken as an acknowledgment or any form of suggestion that the information constitutes the prior art that is already known to those skilled in the art.
发明内容Contents of the invention
本发明的目的在于提供一种基于区块链的物联网终端软件升级方法及系统,其能够适用于物联网海量终端设备场景下的批量升级,软件升级更加及时和可靠。The purpose of the present invention is to provide a block chain-based method and system for upgrading Internet of Things terminal software, which can be applied to batch upgrades in the scenario of massive Internet of Things terminal devices, and the software upgrade is more timely and reliable.
为实现上述目的,本发明提供了一种基于区块链的物联网终端软件升级方法,其包括:第一终端进行某一软件升级后,将该软件的软件升级信息通过共识算法记录在区块链的某个区块上;所述第一终端接收到第二终端发送的软件升级请求后,将相应的软件数据包发送给所述第二终端,其中,所述软件升级请求是所述第二终端在查询到所述区块链中存在新的软件升级信息后发送的。To achieve the above object, the present invention provides a blockchain-based IoT terminal software upgrade method, which includes: after the first terminal upgrades a certain software, the software upgrade information of the software is recorded in the block through a consensus algorithm on a certain block of the chain; after the first terminal receives the software upgrade request sent by the second terminal, it sends the corresponding software data packet to the second terminal, wherein the software upgrade request is the first The second terminal sends it after inquiring that there is new software upgrade information in the block chain.
在本发明的一实施方式中,所述软件升级信息包括终端标识和软件标识、索引、软件版本号、软件大小、hash校验信息、时间戳信息以及数字签名,其中,所述索引作为所述区块的输入,所述软件标识、所述软件大小、所述hash校验信息以及所述时间戳信息作为所述区块的输出。In one embodiment of the present invention, the software upgrade information includes terminal identification and software identification, index, software version number, software size, hash verification information, time stamp information and digital signature, wherein the index is used as the The input of the block, the software identification, the size of the software, the hash verification information and the time stamp information are used as the output of the block.
本发明还提供了一种基于区块链的物联网终端软件升级方法,其包括:第二终端定期查询区块链中是否存在新的软件升级信息,其中,所述软件升级信息是第一终端在进行软件升级后通过共识算法记录在区块链的某个区块上的;当所述第二终端查询到所述区块链中存在新的软件升级信息,则向所述第一终端发送软件升级请求;所述第二终端接收所述第一终端发送的相应的软件数据包;所述第二终端将所述新的软件升级信息与所述软件数据包的信息进行比对校验,若校验通过,则所述第二终端进行软件升级并将该软件升级信息通过共识算法记录在所述区块链上。The present invention also provides a block chain-based method for upgrading the terminal software of the Internet of Things, which includes: the second terminal periodically inquires whether there is new software update information in the block chain, wherein the software update information is the first terminal After the software is upgraded, it is recorded on a certain block of the block chain through a consensus algorithm; when the second terminal inquires that there is new software upgrade information in the block chain, it sends a message to the first terminal A software upgrade request; the second terminal receives the corresponding software data packet sent by the first terminal; the second terminal compares the new software upgrade information with the information of the software data packet, If the verification is passed, the second terminal performs a software upgrade and records the software upgrade information on the block chain through a consensus algorithm.
在本发明的一实施方式中,所述软件升级信息包括终端标识和软件标识、索引、软件版本号、软件大小、hash校验信息、时间戳信息以及数字签名,其中,所述索引作为所述区块的输入,用于指示软件来源,所述软件标识、所述软件大小、所述hash校验信息以及所述时间戳信息作为所述区块的输出。In one embodiment of the present invention, the software upgrade information includes terminal identification and software identification, index, software version number, software size, hash verification information, time stamp information and digital signature, wherein the index is used as the The input of the block is used to indicate the source of the software, and the software identifier, the size of the software, the hash verification information and the time stamp information are used as the output of the block.
在本发明的一实施方式中,所述第二终端将所述新的软件升级信息与所述软件数据包的信息进行比对校验,若校验通过,则所述第二终端进行软件升级并将该软件升级信息通过共识算法记录在所述区块链上包括:所述第二终端将所述新的软件升级信息中的软件版本号与接收的所述软件数据包中的软件版本号进行比对,若两者一致则所述第二终端再将所述新的软件升级信息中的hash校验信息与所述软件数据包的hash校验信息进行一致性比对,如果该两个hash校验信息一致,则校验通过,所述第二终端进行软件升级并将该软件升级信息通过共识算法记录在所述区块链上。In an embodiment of the present invention, the second terminal compares and verifies the new software upgrade information with the information of the software data package, and if the verification is passed, the second terminal performs software upgrade And recording the software upgrade information on the block chain through a consensus algorithm includes: the second terminal compares the software version number in the new software upgrade information with the software version number in the received software data packet Compare, if the two are consistent, then the second terminal will compare the hash verification information in the new software upgrade information with the hash verification information of the software data package, if the two If the hash verification information is consistent, the verification is passed, and the second terminal performs software upgrade and records the software upgrade information on the block chain through a consensus algorithm.
本发明还提供了一种基于区块链的物联网终端软件升级系统,其包括:软件升级信息记录模块、软件数据包发送模块、软件升级信息查询模块、软件升级请求发送模块、软件数据包接收模块、软件升级信息校验模块、软件升级模块。The present invention also provides a blockchain-based Internet of Things terminal software upgrade system, which includes: a software upgrade information recording module, a software data packet sending module, a software upgrade information query module, a software upgrade request sending module, and a software data packet receiving module module, a software upgrade information verification module, and a software upgrade module.
软件升级信息记录模块用于第一终端进行某一软件升级后,将该软件的软件升级信息通过共识算法记录在区块链的某个区块上。软件数据包发送模块用于所述第一终端接收到第二终端发送的软件升级请求后,将相应的软件数据包发送给所述第二终端,其中,所述软件升级请求是所述第二终端在查询到所述区块链中存在新的软件升级信息后发送的。软件升级信息查询模块,用于第二终端定期查询区块链中是否存在新的软件升级信息,其中,所述软件升级信息是第一终端在进行软件升级后通过共识算法记录在区块链的某个区块上的。软件升级请求发送模块,与所述软件升级信息查询模块相耦合,用于当所述第二终端查询到所述区块链中存在新的软件升级信息,则向所述第一终端发送软件升级请求。软件数据包接收模块,用于所述第二终端接收所述第一终端发送的相应的软件数据包。软件升级信息校验模块与所述软件数据包接收模块相耦合,用于将所述新的软件升级信息与所述软件数据包的信息进行比对校验。软件升级模块与所述软件升级信息校验模块相耦合,用于当所述软件升级信息校验模块校验通过后,对所述第二终端进行软件升级并将该软件升级信息通过共识算法记录在所述区块链上。The software upgrade information recording module is used for recording the software upgrade information of the software on a certain block of the block chain through a consensus algorithm after the first terminal upgrades a certain software. The software data packet sending module is used for the first terminal to send the corresponding software data packet to the second terminal after receiving the software upgrade request sent by the second terminal, wherein the software upgrade request is the second It is sent after the terminal inquires that there is new software upgrade information in the block chain. The software upgrade information query module is used for the second terminal to periodically query whether there is new software upgrade information in the block chain, wherein the software upgrade information is recorded in the block chain by the consensus algorithm after the first terminal performs the software upgrade on a certain block. A software upgrade request sending module, coupled with the software upgrade information query module, is used to send a software upgrade to the first terminal when the second terminal inquires that there is new software upgrade information in the block chain ask. A software data packet receiving module, configured for the second terminal to receive a corresponding software data packet sent by the first terminal. The software upgrade information verification module is coupled to the software data packet receiving module, and is used for comparing and verifying the new software upgrade information with the information of the software data packet. The software upgrade module is coupled with the software upgrade information verification module, and is used to upgrade the software of the second terminal after the verification of the software upgrade information verification module is passed, and record the software upgrade information through a consensus algorithm on said blockchain.
在本发明的一实施方式中,所述软件升级信息包括终端标识和软件标识、索引、软件版本号、软件大小、hash校验信息、时间戳信息以及数字签名,其中,所述索引作为所述区块的输入,用于指示软件来源,所述软件标识、所述软件大小、所述hash校验信息以及所述时间戳信息作为所述区块的输出。In one embodiment of the present invention, the software upgrade information includes terminal identification and software identification, index, software version number, software size, hash verification information, time stamp information and digital signature, wherein the index is used as the The input of the block is used to indicate the source of the software, and the software identifier, the size of the software, the hash verification information and the time stamp information are used as the output of the block.
在本发明的一实施方式中,所述软件升级信息校验模块用于将所述新的软件升级信息中的软件版本号与接收的所述软件数据包中的软件版本号进行比对,若两者一致则再将所述新的软件升级信息中的hash校验信息与所述软件数据包的hash校验信息进行一致性比对,如果该两个hash校验信息一致,则校验通过,对所述第二终端进行软件升级。In an embodiment of the present invention, the software upgrade information verification module is used to compare the software version number in the new software upgrade information with the software version number in the received software data package, if If the two are consistent, then the hash verification information in the new software upgrade information is compared with the hash verification information of the software data package. If the two hash verification information are consistent, the verification is passed , performing software upgrade on the second terminal.
与现有技术相比,根据本发明的基于区块链的物联网终端软件升级方法及系统,终端设备可以通过查询区块链软件升级信息,从物联网其它设备下载最新版本软件,自发地完成软件升级,具有去中心化的优势,同时保证软件升级的及时性和可追溯性,本方案通过区块链数据的不可篡改性保证了软件升级的安全可靠性,并且本法案无需要部署中心服务器,可以有效降低成本,因此本方案非常适用于物联网海量终端设备场景下的批量升级。Compared with the prior art, according to the block chain-based Internet of Things terminal software upgrade method and system of the present invention, the terminal device can download the latest version of software from other Internet of Things devices by querying the block chain software upgrade information, and complete the process spontaneously. Software upgrades have the advantage of decentralization, while ensuring the timeliness and traceability of software upgrades. This solution ensures the safety and reliability of software upgrades through the non-tamperable modification of blockchain data, and this bill does not need to deploy a central server , can effectively reduce costs, so this solution is very suitable for batch upgrades in the scenario of massive IoT terminal devices.
附图说明Description of drawings
图1是根据现有技术的基于C/S架构的软件升级模式;Fig. 1 is the software upgrade mode based on the C/S architecture according to the prior art;
图2是根据本发明一实施方式的基于区块链的软件升级模型;Fig. 2 is a block chain-based software upgrade model according to an embodiment of the present invention;
图3是根据本发明一实施方式的基于区块链的软件升级方法的执行流程;Fig. 3 is the execution flow of the block chain-based software upgrade method according to an embodiment of the present invention;
图4是根据本发明一实施方式的基于区块链的物联网终端软件升级系统的模块组成。Fig. 4 is a module composition of a blockchain-based IoT terminal software upgrade system according to an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图,对本发明的具体实施方式进行详细描述,但应当理解本发明的保护范围并不受具体实施方式的限制。The specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific embodiments.
除非另有其它明确表示,否则在整个说明书和权利要求书中,术语“包括”或其变换如“包含”或“包括有”等等将被理解为包括所陈述的元件或组成部分,而并未排除其它元件或其它组成部分。Unless expressly stated otherwise, throughout the specification and claims, the term "comprise" or variations thereof such as "includes" or "includes" and the like will be understood to include the stated elements or constituents, and not Other elements or other components are not excluded.
为了安全高效地实现海量终端设备软件升级,本发明提出一种基于区块链的物联网终端软件升级方法及系统,物联网存在多种终端设备,每个终端会有多种软件,每个软件的升级信息通过共识算法保存在区块链上,终端设备可以通过查询区块链软件升级信息,从物联网其它设备下载最新版本软件,自发地完成软件升级,具有去中心化的优势,同时保证软件升级的及时性和可追溯性。本方案通过区块链数据的不可篡改性保证了其安全可靠性,为物联网终端软件升级提供了新的解决方案。In order to safely and efficiently upgrade the software of massive terminal devices, the present invention proposes a blockchain-based method and system for upgrading the software of Internet of Things terminals. The upgrade information is stored on the blockchain through the consensus algorithm. Terminal devices can query the software upgrade information of the blockchain, download the latest version of software from other devices in the Internet of Things, and complete the software upgrade spontaneously, which has the advantage of decentralization and guarantees Timeliness and traceability of software upgrades. This solution ensures the security and reliability of the blockchain data through the non-tamperable modification, and provides a new solution for the software upgrade of the Internet of Things terminal.
图2是根据本发明一实施方式的基于区块链的软件升级模型。每个区块上包含多个软件升级信息,以Merkle树的形式组织,通过共识算法校验后保存在区块链上,从而保证数据记录的真实可靠性。Fig. 2 is a block chain-based software upgrade model according to an embodiment of the present invention. Each block contains multiple software upgrade information, organized in the form of a Merkle tree, and stored on the blockchain after verification by the consensus algorithm, thereby ensuring the authenticity and reliability of data records.
在本实施方式中,软件升级信息如表1所示,它首先包括终端设备和软件标识,以说明生成记录来源。每个升级记录只有一个输入和一个输出,输入主要是索引,指示新版本软件来源,通过索引链接可以追溯软件来源和传播过程。输出包括软件版本号、软件大小、Hash校验信息和时间戳信息,为了防止恶意软件的传播,软件版本号和Hash校验信息必须和索引指向的软件升级信息保证一致,否则无法通过共识算法验证,因此第一个索引的为空的软件升级信息至为关键,必须由管理员授权的终端设备进行发布。最后是数字签名,以防止伪造软件升级信息。In this embodiment, the software upgrade information is shown in Table 1, which firstly includes the terminal device and the software identification to illustrate the source of the generated record. Each upgrade record has only one input and one output. The input is mainly an index, which indicates the source of the new version of the software. The source of the software and the propagation process can be traced through the index link. The output includes software version number, software size, Hash verification information and timestamp information. In order to prevent the spread of malware, the software version number and Hash verification information must be consistent with the software upgrade information pointed to by the index, otherwise it cannot pass the consensus algorithm verification , so the empty software upgrade information of the first index is critical and must be issued by a terminal device authorized by the administrator. The last is a digital signature to prevent forged software upgrade information.
表1.软件升级信息Table 1. Software Upgrade Information
图3是根据本实施方式的基于区块链的软件升级方法的执行流程。图中不同的图形代表不同种类的终端设备,A,B和C为同种终端设备,具体的软件升级执行过程如下:Fig. 3 is an execution flow of the blockchain-based software upgrade method according to this embodiment. Different graphics in the figure represent different types of terminal equipment. A, B and C are the same type of terminal equipment. The specific software upgrade process is as follows:
终端A已经完成某个软件升级后,则将软件升级信息通过共识算法记录在区块链上位置(m,i)上,其中m表示该区块在区块链所在的位置,i表示为区块m上第i个升级记录;终端B定期通过区块链查询软件的最新版本,当发现终端A在区块链位置(m,i)上的最新软件升级信息,则终端B需要进行软件升级;终端B直接向终端A发送软件升级请求;接到终端B的软件升级请求后,A将最新版本的软件数据包传送给B,如图所示,数据传输需要经过C终端节点;终端B收到A发送的软件数据包后,通过比对区块链(m,i)的记录信息,校验其完整性;通过验证后,B完成软件升级,然后继续将升级信息通过共识算法记录在区块链上。如图3所示,记录的位置为(n,j),其索引指向即为(m,i)。After terminal A has completed a certain software upgrade, it will record the software upgrade information on the position (m, i) on the blockchain through the consensus algorithm, where m represents the position of the block in the blockchain, and i represents the area The i-th upgrade record on block m; terminal B regularly queries the latest version of the software through the blockchain, and when it finds the latest software upgrade information of terminal A on the blockchain position (m, i), terminal B needs to upgrade the software ;Terminal B directly sends a software upgrade request to terminal A; after receiving the software upgrade request from terminal B, A transmits the latest version of the software data package to B, as shown in the figure, the data transmission needs to pass through the C terminal node; terminal B receives After receiving the software data packet sent by A, verify its integrity by comparing the record information of the blockchain (m, i); after passing the verification, B completes the software upgrade, and then continues to record the upgrade information in the block through the consensus algorithm on the block chain. As shown in FIG. 3 , the position of the record is (n, j), and its index points to (m, i).
其中,进行软件升级信息校验时,终端B将新的软件升级信息中的软件版本号与接收的软件数据包中的软件版本号进行比对,若两者一致则终端B再将新的软件升级信息中的hash校验信息与软件数据包的hash校验信息进行一致性比对,如果该两个hash校验信息一致,则校验通过,终端B进行软件升级并将该软件升级信息通过共识算法记录在所述区块链上。Among them, when performing software upgrade information verification, terminal B compares the software version number in the new software upgrade information with the software version number in the received software data packet, and if the two are consistent, terminal B then updates the new software The hash verification information in the upgrade information is compared with the hash verification information of the software data package. If the two hash verification information are consistent, the verification is passed. Terminal B performs software upgrade and passes the software upgrade information. The consensus algorithm is recorded on said blockchain.
网络中其它终端设备的升级过程以此类推,直至完成所有的终端软件的升级。通过这种方式,可以实现终端设备软件升级版本的可追溯性。The upgrade process of other terminal devices in the network can be deduced by analogy until all terminal software upgrades are completed. In this way, the traceability of the software upgrade version of the terminal device can be realized.
基于同样的发明构思,本发明还提供了一种基于区块链的物联网终端软件升级系统,图4是根据本发明一实施方式的基于区块链的物联网终端软件升级系统,该系统包括:软件升级信息记录模块10、软件数据包发送模块11、软件升级信息查询模块12、软件升级请求发送模块13、软件数据包接收模块14、软件升级信息校验模块15以及软件升级模块16。Based on the same inventive concept, the present invention also provides a block chain-based Internet of Things terminal software upgrade system. FIG. 4 is a block chain-based Internet of Things terminal software upgrade system according to an embodiment of the present invention. The system includes : software upgrade information recording module 10, software data packet sending module 11, software upgrade information query module 12, software upgrade request sending module 13, software data packet receiving module 14, software upgrade information verification module 15 and software upgrade module 16.
软件升级信息记录模块10用于第一终端进行某一软件升级后,将该软件的软件升级信息通过共识算法记录在区块链的某个区块上。其中,软件升级信息包括终端标识和软件标识、索引、软件版本号、软件大小、hash校验信息、时间戳信息以及数字签名,其中,索引作为区块的输入,软件标识、软件大小、hash校验信息以及时间戳信息作为区块的输出。The software upgrade information recording module 10 is used for recording the software upgrade information of the software on a certain block of the block chain through a consensus algorithm after the first terminal performs a certain software upgrade. Among them, the software upgrade information includes terminal identification and software identification, index, software version number, software size, hash verification information, time stamp information and digital signature, wherein, the index is used as the input of the block, and the software identification, software size, hash verification information verification information and timestamp information as the output of the block.
软件数据包发送模块11用于第一终端接收到第二终端发送的软件升级请求后,将相应的软件数据包发送给第二终端,其中,软件升级请求是第二终端在查询到区块链中存在新的软件升级信息后发送的。The software data packet sending module 11 is used for the first terminal to send the corresponding software data packet to the second terminal after receiving the software upgrade request sent by the second terminal, wherein the software upgrade request is that the second terminal queries the block chain Sent after new software upgrade information exists in .
软件升级信息查询模块12用于第二终端定期查询区块链中是否存在新的软件升级信息,其中,软件升级信息是第一终端在进行软件升级后通过共识算法记录在区块链的某个区块上的。The software upgrade information query module 12 is used for the second terminal to periodically inquire whether there is new software upgrade information in the block chain, wherein the software upgrade information is recorded in a block chain by the consensus algorithm after the first terminal performs the software upgrade. on the block.
软件升级请求发送模块13与软件升级信息查询模块12相耦合,用于当第二终端查询到区块链中存在新的软件升级信息,则向第一终端发送软件升级请求。The software upgrade request sending module 13 is coupled with the software upgrade information query module 12, and is used to send a software upgrade request to the first terminal when the second terminal inquires that there is new software upgrade information in the block chain.
软件数据包接收模块14用于第二终端接收第一终端发送的相应的软件数据包。The software data packet receiving module 14 is used for the second terminal to receive the corresponding software data packet sent by the first terminal.
软件升级信息校验模块15与软件数据包接收模块14相耦合,用于第二终端将新的软件升级信息与软件数据包的信息进行比对校验。The software upgrade information verification module 15 is coupled with the software data packet receiving module 14, and is used for the second terminal to compare and verify the new software upgrade information with the information of the software data packet.
软件升级模块16与软件升级信息校验模块15相耦合,用于当软件升级信息校验模块15校验通过后,第二终端进行软件升级并将该软件升级信息通过共识算法记录在区块链上。其中,软件升级信息校验模块15校验包括:将新的软件升级信息中的软件版本号与接收的软件数据包中的软件版本号进行比对,若两者一致则再将新的软件升级信息中的hash校验信息与软件数据包的hash校验信息进行一致性比对,如果该两个hash校验信息一致,则校验通过,第二终端进行软件升级并将该软件升级信息通过共识算法记录在区块链上。The software upgrade module 16 is coupled with the software upgrade information verification module 15, and is used for when the software upgrade information verification module 15 checks and passes, the second terminal performs software upgrade and records the software upgrade information in the block chain through the consensus algorithm. superior. Wherein, the verification of the software upgrade information verification module 15 includes: comparing the software version number in the new software upgrade information with the software version number in the received software data package, if the two are consistent, then the new software is upgraded The hash verification information in the information is compared with the hash verification information of the software data package for consistency. If the two hash verification information are consistent, the verification is passed, and the second terminal performs software upgrade and passes the software upgrade information. The consensus algorithm is recorded on the blockchain.
综上,根据本实施方式的基于区块链的物联网终端软件升级方法及系统,利用区块链技术,提出一种去中心化的软件升级方案,通过对等终端设备节点互相实现软件升级,在该方案中,终端软件的每一次升级都会通过共识算法记录在区块链上,其它终端节点可以通过查询区块链软件升级信息,选择邻近节点获取最新软件版本,进行软件升级,保证了软件升来源和历史版本的可追溯性,通过区块链数据的不可篡改性保证了软件来源的完整性,有效防止恶意软件的传播,并且本方案还提供了物联网终端设备软件升级的具体执行过程,并对其安全和性能进行分析,通过引入智能合约,设定相关的触发条件,可以决定终端软件升级的时间和软件来源等信息,灵活定制更好更加适合实际应用需求的软件升级方式,另外本方案重新定义了区块链软件升级信息的数据结构,用以保存软件升级过程的相关信息,每个记录分别仅有一个输入和输出,保证升级过程的可追溯性,并通过数字签名保证了记录的有效性。总之,本实施方式的软件升级方式与基于C/S模式的软件升级方式相比,软件升级更加安全可靠、高效及时并且软件升级来源以及版本历史能够追溯,成本更低。In summary, according to the blockchain-based IoT terminal software upgrade method and system of this embodiment, a decentralized software upgrade solution is proposed by using blockchain technology, and software upgrades are realized through peer-to-peer terminal device nodes. In this scheme, every upgrade of the terminal software will be recorded on the blockchain through the consensus algorithm. Other terminal nodes can query the blockchain software upgrade information, select adjacent nodes to obtain the latest software version, and perform software upgrades, ensuring that the software The traceability of the upgrade source and historical version ensures the integrity of the software source through the non-tamperable modification of the blockchain data, effectively preventing the spread of malicious software, and this solution also provides the specific execution process of the software upgrade of the IoT terminal device , and analyze its security and performance. By introducing smart contracts and setting relevant trigger conditions, information such as the time of terminal software upgrade and software source can be determined, and the software upgrade method that is better and more suitable for actual application needs can be customized flexibly. In addition, This solution redefines the data structure of blockchain software upgrade information to store relevant information about the software upgrade process. Each record has only one input and output to ensure the traceability of the upgrade process, and through digital signatures to ensure Record Validity. In short, compared with the software upgrade method based on the C/S mode, the software upgrade method of this embodiment is more secure, reliable, efficient and timely, and the source and version history of the software upgrade can be traced, and the cost is lower.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
前述对本发明的具体示例性实施方案的描述是为了说明和例证的目的。这些描述并非想将本发明限定为所公开的精确形式,并且很显然,根据上述教导,可以进行很多改变和变化。对示例性实施例进行选择和描述的目的在于解释本发明的特定原理及其实际应用,从而使得本领域的技术人员能够实现并利用本发明的各种不同的示例性实施方案以及各种不同的选择和改变。本发明的范围意在由权利要求书及其等同形式所限定。The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. These descriptions are not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling others skilled in the art to make and use various exemplary embodiments of the invention, as well as various Choose and change. It is intended that the scope of the invention be defined by the claims and their equivalents.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910785146.4A CN110493345A (en) | 2019-08-23 | 2019-08-23 | Method and system for software upgrade of Internet of Things terminal based on block chain |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910785146.4A CN110493345A (en) | 2019-08-23 | 2019-08-23 | Method and system for software upgrade of Internet of Things terminal based on block chain |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN110493345A true CN110493345A (en) | 2019-11-22 |
Family
ID=68551740
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910785146.4A Pending CN110493345A (en) | 2019-08-23 | 2019-08-23 | Method and system for software upgrade of Internet of Things terminal based on block chain |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110493345A (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111182527A (en) * | 2019-12-27 | 2020-05-19 | 深圳市云伽智能技术有限公司 | OTA firmware upgrading method, device, terminal equipment and storage medium thereof |
| CN111917583A (en) * | 2020-07-31 | 2020-11-10 | 中国联合网络通信集团有限公司 | Software upgrade method for IoT terminal, IoT platform and IoT terminal |
| CN112256305A (en) * | 2020-11-04 | 2021-01-22 | 暗链科技(深圳)有限公司 | Block chain software updating method and system |
| CN112433744A (en) * | 2020-12-30 | 2021-03-02 | 广东金赋科技股份有限公司 | Tax terminal application system upgrading and migrating method based on intelligent contract |
| CN112947967A (en) * | 2021-03-08 | 2021-06-11 | 中国联合网络通信集团有限公司 | Software updating method, block chain application store and software uploading terminal |
| CN112994939A (en) * | 2021-02-23 | 2021-06-18 | 合肥师范学院 | Remote automatic upgrading method and system for equipment software of Internet of things |
| WO2021140008A1 (en) * | 2020-01-06 | 2021-07-15 | British Telecommunications Public Limited Company | Distributed transactional database consensus |
| CN114095187A (en) * | 2020-07-30 | 2022-02-25 | 中国移动通信有限公司研究院 | Application method and device of threat information |
| CN114327531A (en) * | 2020-11-30 | 2022-04-12 | 青岛海尔电冰箱有限公司 | Refrigerator program upgrading method based on block chain and refrigerator |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101958933A (en) * | 2010-09-27 | 2011-01-26 | 深圳市同洲电子股份有限公司 | Method and device for upgrading terminal software |
| US20140304697A1 (en) * | 2011-12-01 | 2014-10-09 | Tencent Technology (Shenzhen) Company Limited | Method and system for upgrading software |
| CN104615501A (en) * | 2015-03-05 | 2015-05-13 | 徐州徐工施维英机械有限公司 | Method, controller, management platform and system used for fault recovery |
| CN106603311A (en) * | 2017-01-18 | 2017-04-26 | 北京洋浦伟业科技发展有限公司 | OTA upgrade method, client, server and system |
| CN108270874A (en) * | 2018-02-05 | 2018-07-10 | 武汉斗鱼网络科技有限公司 | The update method and device of application program |
| CN109814905A (en) * | 2019-01-17 | 2019-05-28 | 上海边界智能科技有限公司 | A kind of method for upgrading software and device based on block chain |
| CN109889589A (en) * | 2019-02-18 | 2019-06-14 | 闪联信息技术工程中心有限公司 | One kind realizing embedded hardware OTA upgrade-system and method based on block chain |
-
2019
- 2019-08-23 CN CN201910785146.4A patent/CN110493345A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101958933A (en) * | 2010-09-27 | 2011-01-26 | 深圳市同洲电子股份有限公司 | Method and device for upgrading terminal software |
| US20140304697A1 (en) * | 2011-12-01 | 2014-10-09 | Tencent Technology (Shenzhen) Company Limited | Method and system for upgrading software |
| CN104615501A (en) * | 2015-03-05 | 2015-05-13 | 徐州徐工施维英机械有限公司 | Method, controller, management platform and system used for fault recovery |
| CN106603311A (en) * | 2017-01-18 | 2017-04-26 | 北京洋浦伟业科技发展有限公司 | OTA upgrade method, client, server and system |
| CN108270874A (en) * | 2018-02-05 | 2018-07-10 | 武汉斗鱼网络科技有限公司 | The update method and device of application program |
| CN109814905A (en) * | 2019-01-17 | 2019-05-28 | 上海边界智能科技有限公司 | A kind of method for upgrading software and device based on block chain |
| CN109889589A (en) * | 2019-02-18 | 2019-06-14 | 闪联信息技术工程中心有限公司 | One kind realizing embedded hardware OTA upgrade-system and method based on block chain |
Cited By (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111182527B (en) * | 2019-12-27 | 2022-07-26 | 深圳市云伽智能技术有限公司 | OTA (over the air) firmware upgrading method and device, terminal equipment and storage medium thereof |
| CN111182527A (en) * | 2019-12-27 | 2020-05-19 | 深圳市云伽智能技术有限公司 | OTA firmware upgrading method, device, terminal equipment and storage medium thereof |
| WO2021140008A1 (en) * | 2020-01-06 | 2021-07-15 | British Telecommunications Public Limited Company | Distributed transactional database consensus |
| CN114095187A (en) * | 2020-07-30 | 2022-02-25 | 中国移动通信有限公司研究院 | Application method and device of threat information |
| CN114095187B (en) * | 2020-07-30 | 2023-05-09 | 中国移动通信有限公司研究院 | Threat intelligence application method, device and computer-readable storage medium |
| CN111917583A (en) * | 2020-07-31 | 2020-11-10 | 中国联合网络通信集团有限公司 | Software upgrade method for IoT terminal, IoT platform and IoT terminal |
| CN112256305A (en) * | 2020-11-04 | 2021-01-22 | 暗链科技(深圳)有限公司 | Block chain software updating method and system |
| CN112256305B (en) * | 2020-11-04 | 2022-05-10 | 暗链科技(深圳)有限公司 | Block chain software updating method and system |
| CN114327531A (en) * | 2020-11-30 | 2022-04-12 | 青岛海尔电冰箱有限公司 | Refrigerator program upgrading method based on block chain and refrigerator |
| WO2022111214A1 (en) * | 2020-11-30 | 2022-06-02 | 青岛海尔电冰箱有限公司 | Blockchain-based refrigerator program upgrade method and refrigerator |
| CN112433744A (en) * | 2020-12-30 | 2021-03-02 | 广东金赋科技股份有限公司 | Tax terminal application system upgrading and migrating method based on intelligent contract |
| CN112994939B (en) * | 2021-02-23 | 2022-02-18 | 合肥师范学院 | A method and system for remote automatic upgrade of Internet of things equipment software |
| CN112994939A (en) * | 2021-02-23 | 2021-06-18 | 合肥师范学院 | Remote automatic upgrading method and system for equipment software of Internet of things |
| CN112947967A (en) * | 2021-03-08 | 2021-06-11 | 中国联合网络通信集团有限公司 | Software updating method, block chain application store and software uploading terminal |
| CN112947967B (en) * | 2021-03-08 | 2023-09-26 | 中国联合网络通信集团有限公司 | Software updating method, blockchain application store and software uploading terminal |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110493345A (en) | Method and system for software upgrade of Internet of Things terminal based on block chain | |
| KR102618665B1 (en) | Version history management using blockchain | |
| US11445022B2 (en) | System and method for service level agreement based data verification | |
| US10630463B2 (en) | Meta block chain | |
| KR102519327B1 (en) | Traceable key block-chain ledger | |
| US20210157788A1 (en) | Data processing method and apparatus based on blockchain network, electronic device, and storage medium | |
| CN103034512B (en) | The method and apparatus of more new procedures | |
| CN108334753B (en) | Pirate application verification method and distributed server node | |
| CN108881312A (en) | Intelligent contract upgrade method, system and relevant device and storage medium | |
| US20140150096A1 (en) | Method for assuring integrity of mobile applications and apparatus using the method | |
| CN111258599B (en) | Firmware upgrade method, system and computer readable storage medium | |
| EP3362939A1 (en) | Migrating secrets using hardware roots of trust for devices | |
| EP3362936A1 (en) | Trusted platforms using minimal hardware resources | |
| WO2019201040A1 (en) | File update management method and system and terminal apparatus | |
| EP3333747A1 (en) | Methods and systems for detecting rollback attacks | |
| CN112035144B (en) | Upgrading method and device of block chain system, computer equipment and storage medium | |
| US8484347B1 (en) | System and method for malware detection in peer-to-peer computer networks | |
| CN111273920A (en) | Method and device for writing data into installation package and storage medium | |
| CN118394395A (en) | A controller upgrade method, vehicle, device and medium | |
| US11307790B2 (en) | Method, device, and computer program product for managing data placement | |
| CN111460436B (en) | A blockchain-based unstructured data operation method and system | |
| KR102927511B1 (en) | System and method for managing generative ai content using blockchain | |
| CN114078052A (en) | Execution method of intelligent contracts in block chain, node and block chain system | |
| US12052133B2 (en) | Blockchain-based network device management methods and devices | |
| US20250037119A1 (en) | Converting bridged tokens to native tokens on a blockchain |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191122 |
|
| RJ01 | Rejection of invention patent application after publication |