Movatterモバイル変換


[0]ホーム

URL:


CN110266765B - Real-time updating method and device for Internet of things online consensus node based on block chain - Google Patents

Real-time updating method and device for Internet of things online consensus node based on block chain
Download PDF

Info

Publication number
CN110266765B
CN110266765BCN201910422909.9ACN201910422909ACN110266765BCN 110266765 BCN110266765 BCN 110266765BCN 201910422909 ACN201910422909 ACN 201910422909ACN 110266765 BCN110266765 BCN 110266765B
Authority
CN
China
Prior art keywords
online
real
consensus
consensus node
nodes
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
Application number
CN201910422909.9A
Other languages
Chinese (zh)
Other versions
CN110266765A (en
Inventor
罗超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Chinastar M & C Ltd
Original Assignee
Xi'an Chinastar M & C Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xi'an Chinastar M & C LtdfiledCriticalXi'an Chinastar M & C Ltd
Priority to CN201910422909.9ApriorityCriticalpatent/CN110266765B/en
Publication of CN110266765ApublicationCriticalpatent/CN110266765A/en
Application grantedgrantedCritical
Publication of CN110266765BpublicationCriticalpatent/CN110266765B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention provides a real-time updating method and a real-time updating device for an internet of things online consensus node based on a block chain, wherein M consensus nodes are obtained, wherein M is an integer larger than 0; obtaining N real-time online consensus nodes from the M consensus nodes, wherein N is an integer greater than 0 and is less than or equal to M; setting an identity list of consensus nodes in each consensus node, wherein the identity list comprises identity information, online quantity and online state information of each consensus node; obtaining a first online consensus node from the N real-time online consensus nodes; judging whether the online state of the first online consensus node enters a dormant state or not; and updating the number of the real-time online consensus nodes according to the online state of the first online consensus node. The dynamic updating of the number of the online consensus nodes and the identity list is achieved, and therefore the technical effect of evaluating the accuracy of the result in real time on the audit passing rate of the consensus nodes is improved.

Description

Real-time updating method and device for Internet of things online consensus node based on block chain
Technical Field
The invention relates to the technical field of information processing of the Internet of things, in particular to a real-time updating method and device of an online consensus node of the Internet of things based on a block chain.
Background
The block chain is a distributed database, is applied to the Internet of things system, and can ensure the authenticity and reliability of the internal authorization of the Internet of things system, thereby endowing the intelligent Internet of things equipment with the identity of a commercial transaction participant.
In order to prevent the waste of data management resources caused by the fact that too many invalid data are uploaded to a server due to the fact that the number of terminals in the Internet of things system is too large. We need to select a partial terminal and define it initially as a consensus node in the blockchain. Data uploaded by each terminal is examined, screened and determined to be effective data through the consensus node, and then the effective data can be uploaded to the server, so that reasonable utilization of data storage, analysis and maintenance resources is guaranteed.
However, the applicant of the present invention finds that the prior art has at least the following technical problems:
in the prior art, in an internet of things system with low power consumption as one of main advantages, a terminal can be in a dormant state most of the time, a consensus node in the dormant state cannot provide effective data screening and auditing, the number of the effective consensus nodes in real time is not constant, and the technical problem of real-time evaluation results of the auditing passing rate of the data at the consensus node can be influenced.
Disclosure of Invention
The embodiment of the invention provides a method and a device for updating online consensus nodes of the Internet of things based on a block chain, and solves the technical problems that in the prior art, in an Internet of things system with low power consumption as one of main advantages, a terminal is in a dormant state most of the time, the consensus nodes in the dormant state cannot provide effective data screening and auditing, the number of the effective consensus nodes in real time is not constant, and the real-time evaluation result of the auditing pass rate of the data at the consensus nodes is influenced.
In view of the foregoing problems, the embodiments of the present application are provided to provide a method and an apparatus for updating an online consensus node of an internet of things in real time based on a block chain.
In a first aspect, the invention provides a real-time update method for an online consensus node of the internet of things based on a block chain, which includes: obtaining M consensus nodes, wherein M is an integer greater than 0; obtaining N real-time online consensus nodes from the M consensus nodes, wherein N is an integer greater than 0 and is less than or equal to M; setting an identity list of consensus nodes in each consensus node, wherein the identity list comprises identity information, online quantity and online state information of each consensus node; obtaining a first online consensus node from the N real-time online consensus nodes; judging whether the online state of the first online consensus node enters a dormant state or not; and updating the number of the real-time online consensus nodes according to the online state of the first online consensus node.
Preferably, the updating the number of the real-time online consensus nodes according to the online status of the first online consensus node includes: if the online state of the first online consensus node is in a dormant state, sending first informing information to the rest M-1 consensus nodes, wherein the first informing information is used for informing the M-1 consensus nodes to update the online state of the first online consensus node to be in the dormant state; and updating the number of the online common identification nodes to be N-1 according to the first notification information.
Preferably, the updating the online states of the N real-time online consensus nodes according to the online state of the first online consensus node further includes: and if the online state of the first online consensus node is kept unchanged, sending second notification information to the rest M-1 consensus nodes, wherein the second notification information is used for notifying the M-1 consensus nodes that the online state of the first online consensus node is kept unchanged.
Preferably, the updating the number of the real-time online consensus nodes according to the online status of the first online consensus node further includes: if the online state of the first online consensus node is the new online state, sending third notification information to the other M-1 consensus nodes, wherein the third notification information is used for notifying the M-1 consensus nodes to update the online state of the first online consensus node from the dormant state to the online state; and updating the number of the online consensus nodes to be N +1 according to the third notification information.
Preferably, before determining whether the online status of the first online consensus node enters the dormant state, the method further includes: acquiring identity information of a first online consensus node; judging whether the identity information of the first online consensus node is the same as the identity information of the first online consensus node in the identity list or not; if the identity information of the first online consensus node is the same as the identity information of the first online consensus node in the identity list, judging whether the online state of the first online consensus node enters a dormant state or not; and if the identity information of the first online consensus node is different from the identity information of the first online consensus node in the identity list, stopping judging whether the online state of the first online consensus node enters a dormant state or not. Preferably, after obtaining N real-time online consensus nodes from the M consensus nodes, the method includes: obtaining a predetermined audit threshold; acquiring real-time monitoring data of all terminals in the Internet of things system on the consensus node; auditing the real-time monitoring data to obtain the auditing passing rate of the consensus node; judging whether the auditing passing rate exceeds the preset auditing threshold value or not; if the audit passing rate exceeds the preset audit threshold value, determining that the real-time monitoring data are valid, and storing the real-time monitoring data into a chained database; and if the audit passing rate does not exceed the preset audit threshold value, determining that the real-time monitoring data is invalid, and discarding the real-time monitoring data.
Preferably, the auditing the real-time monitoring data to obtain the auditing passing rate of the consensus node includes: auditing the real-time monitoring data to obtain the number of approved audits of the consensus nodes; and obtaining the passing rate of the audit according to the number of the audit passes and the total number of the real-time online consensus nodes.
In a second aspect, the invention provides a device for updating online consensus nodes of the internet of things in real time based on a block chain, and the device comprises:
a first obtaining unit, configured to obtain M consensus nodes, where M is an integer greater than 0;
a second obtaining unit, configured to obtain N real-time online consensus nodes from the M consensus nodes, where N is an integer greater than 0 and N is less than or equal to M;
the first setting unit is used for setting an identity list of the consensus nodes in each consensus node, wherein the identity list comprises identity information, online quantity and online state information of each consensus node;
a third obtaining unit, configured to obtain a first online consensus node from the N real-time online consensus nodes;
a first judging unit, configured to judge whether an online state of the first online consensus node enters a dormant state;
a first updating unit, configured to update the number of the real-time online consensus nodes according to an online status of the first online consensus node.
Preferably, the apparatus further comprises:
a first sending unit, configured to send first notification information to the remaining M-1 common knowledge nodes if the presence status of the first online common knowledge node is a dormant status, where the first notification information is used to notify the M-1 common knowledge nodes to update the presence status of the first online common knowledge node to the dormant status;
and the second updating unit is used for updating the number of the online common knowledge nodes to be N-1 according to the first notification information.
Preferably, the apparatus further comprises:
a second sending unit, configured to send second notification information to the remaining M-1 consensus nodes if the presence status of the first online consensus node remains unchanged, where the second notification information is used to notify the M-1 consensus nodes that the presence status of the first online consensus node remains unchanged.
Preferably, the apparatus further comprises:
a third sending unit, configured to send third notification information to the remaining M-1 common identification nodes if the online status of the first online common identification node is the new online status, where the third notification information is used to notify the M-1 common identification nodes that the online status of the first online common identification node is updated from the dormant status to the online status;
and the third updating unit is used for updating the number of the online common knowledge nodes to be N +1 according to the third notification information.
Preferably, the apparatus further comprises:
a fourth obtaining unit, configured to obtain identity information of the first online consensus node;
a second determining unit, configured to determine whether identity information of the first online consensus node is the same as identity information of the first online consensus node in the identity list;
a third determining unit, configured to determine whether an online state of the first online consensus node enters a dormant state if the identity information of the first online consensus node is the same as the identity information of the first online consensus node in the identity list;
a first stopping unit, configured to stop determining whether an online state of the first online consensus node enters a dormant state if the identity information of the first online consensus node is different from the identity information of the first online consensus node in the identity list.
Preferably, the apparatus further comprises:
a fifth obtaining unit, configured to obtain a predetermined audit threshold;
a sixth obtaining unit, configured to obtain real-time monitoring data of all terminals in the internet of things system on the consensus node;
a seventh obtaining unit, configured to perform audit on the real-time monitoring data, and obtain an audit passing rate of the consensus node;
a fourth judging unit, configured to judge whether the audit passing rate exceeds the predetermined audit threshold;
the first determining unit is used for determining that the real-time monitoring data are valid if the auditing passing rate exceeds the preset auditing threshold value, and storing the real-time monitoring data into a chained database;
and the second determining unit is used for determining that the real-time monitoring data is invalid and discarding the real-time monitoring data if the audit passing rate does not exceed the preset audit threshold.
Preferably, the apparatus further comprises:
an eighth obtaining unit, configured to perform audit on the real-time monitoring data, and obtain the number of approved audits of the consensus node;
a ninth obtaining unit, configured to obtain the audit passing rate according to the number of audit passes and the total number of the real-time online consensus nodes.
In a third aspect, the present invention provides a device for updating online consensus nodes of the internet of things based on a blockchain, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the following steps when executing the program: obtaining M consensus nodes, wherein M is an integer greater than 0; obtaining N real-time online consensus nodes from the M consensus nodes, wherein N is an integer greater than 0 and is less than or equal to M; setting an identity list of consensus nodes in each consensus node, wherein the identity list comprises identity information, online quantity and online state information of each consensus node; obtaining a first online consensus node from the N real-time online consensus nodes; judging whether the online state of the first online consensus node enters a dormant state or not; and updating the number of the real-time online consensus nodes according to the online state of the first online consensus node.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: obtaining M consensus nodes, wherein M is an integer greater than 0; obtaining N real-time online consensus nodes from the M consensus nodes, wherein N is an integer greater than 0 and is less than or equal to M; setting an identity list of consensus nodes in each consensus node, wherein the identity list comprises identity information, online quantity and online state information of each consensus node; obtaining a first online consensus node from the N real-time online consensus nodes; judging whether the online state of the first online consensus node enters a dormant state or not; and updating the number of the real-time online consensus nodes according to the online state of the first online consensus node.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
the embodiment of the invention provides a method and a device for updating online consensus nodes of the Internet of things based on a block chain, wherein M consensus nodes are obtained, wherein M is an integer greater than 0; obtaining N real-time online consensus nodes from the M consensus nodes, wherein N is an integer greater than 0 and is less than or equal to M; setting an identity list of consensus nodes in each consensus node, wherein the identity list comprises identity information, online quantity and online state information of each consensus node; obtaining a first online consensus node from the N real-time online consensus nodes; judging whether the online state of the first online consensus node enters a dormant state or not; and updating the number of the real-time online consensus nodes according to the online state of the first online consensus node. The method solves the technical problems that in the prior art, in the Internet of things system which takes 'low power consumption' as one of main advantages, a terminal can be in a dormant state most of the time, the consensus nodes in the dormant state cannot provide effective data screening and auditing, the real-time effective consensus node number is not fixed, and the real-time evaluation result of the data auditing pass rate at the consensus nodes can be influenced, achieves the dynamic updating of the on-line consensus node number and the identity list, and accordingly improves the technical effect of improving the accuracy of the real-time evaluation result of the consensus node auditing pass rate.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Fig. 1 is a schematic flow chart of a real-time update method of an internet of things online consensus node based on a block chain in an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an online consensus node real-time updating apparatus of the internet of things based on a block chain in the embodiment of the present invention;
fig. 3 is a schematic structural diagram of another device for updating online consensus nodes of the internet of things in real time based on a block chain in the embodiment of the present invention.
Description of reference numerals: a first obtainingunit 11, a second obtainingunit 12, afirst setting unit 13, a third obtainingunit 14, afirst judging unit 15, afirst updating unit 16, abus 300, areceiver 301, aprocessor 302, atransmitter 303, amemory 304, and abus interface 306.
Detailed Description
The embodiment of the invention provides a block chain-based method and a block chain-based device for updating online consensus nodes of the Internet of things in real time, which are used for solving the technical problems that in the prior art, in an Internet of things system which takes low power consumption as one of main advantages, a terminal is in a dormant state in most of time, the consensus nodes in the dormant state cannot provide effective data screening and auditing, the number of the effective consensus nodes in real time is not constant, and the real-time evaluation result of the auditing passing rate of the data at the consensus nodes is influenced.
The technical scheme provided by the invention has the following general idea:
obtaining M consensus nodes, wherein M is an integer greater than 0; obtaining N real-time online consensus nodes from the M consensus nodes, wherein N is an integer greater than 0 and is less than or equal to M; setting an identity list of consensus nodes in each consensus node, wherein the identity list comprises identity information, online quantity and online state information of each consensus node; obtaining a first online consensus node from the N real-time online consensus nodes; judging whether the online state of the first online consensus node enters a dormant state or not; and updating the number of the real-time online consensus nodes according to the online state of the first online consensus node. The dynamic updating of the number of the online consensus nodes and the identity list is achieved, and therefore the technical effect of improving the accuracy of the real-time evaluation result of the audit passing rate of the consensus nodes is improved.
The technical solutions of the present invention are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features in the embodiments and examples of the present invention are described in detail in the technical solutions of the present application, and are not limited to the technical solutions of the present application, and the technical features in the embodiments and examples of the present application may be combined with each other without conflict.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Example one
Fig. 1 is a schematic flow chart of a real-time updating method of an internet of things online consensus node based on a block chain in the embodiment of the present invention. As shown in fig. 1, an embodiment of the present invention provides a real-time update method for an online consensus node of an internet of things based on a block chain, where the method includes:
step 110, obtaining M consensus nodes, wherein M is an integer greater than 0;
in particular, a blockchain is a distributed database, which is embodied in a distributed manner as distributed storage and distributed recording of data, i.e., the data is recorded, stored and maintained collectively by participants of a data system. The block chain can generate a set of database which records time sequence, cannot be tampered and can be trusted, the set of database is decentralized to store, and data security can be effectively guaranteed. The blockchain technology is a technology for maintaining a reliable database in a decentralization and distrust mode body. In order to prevent the waste of data management resources caused by the fact that too many invalid data are uploaded to a server due to the fact that the number of terminals in the Internet of things system is too large. We need to select and initially define a partial terminal as a consensus node in the blockchain, where M is the partial terminal and initially defines it as the number of consensus nodes in the blockchain.
Step 120, obtaining N real-time online consensus nodes from the M consensus nodes, wherein N is an integer greater than 0 and is less than or equal to M;
specifically, the M consensus nodes include all consensus nodes, and in an internet of things system with "low power consumption" as one of the main advantages, the terminal is in a dormant state most of the time, and the consensus nodes in the dormant state cannot provide effective data screening and auditing, so that some of the M consensus nodes are in an online state, some of the consensus nodes are in the dormant state, and N real-time online consensus nodes are assumed to be in the M consensus nodes, where a value of N changes in real time and N is less than or equal to M.
Step 130, an identity list of the consensus nodes is set in each consensus node, wherein the identity list comprises identity information, online quantity and online state information of each consensus node;
specifically, the steps described in this embodiment of the present application do not represent any sequence, and may be performed in multiple steps simultaneously or in sequence, where various sequences are within the protection scope of the embodiment of the present application, each consensus node has an identity list of the consensus node and a current online state list, and the identity list and the current online state list may be initialized when the consensus node leaves a factory or set when each node is powered on, and the list includes the number of current online consensus nodes, the identities of M consensus nodes, and online state information.
Further, after obtaining N real-time online consensus nodes from the M consensus nodes, the method includes: obtaining a predetermined audit threshold; acquiring real-time monitoring data of all terminals in the Internet of things system on the consensus node; auditing the real-time monitoring data to obtain the auditing passing rate of the consensus node; judging whether the auditing passing rate exceeds the preset auditing threshold value or not; if the audit passing rate exceeds the preset audit threshold value, determining that the real-time monitoring data are valid, and storing the real-time monitoring data into a chained database; and if the audit passing rate does not exceed the preset audit threshold value, determining that the real-time monitoring data is invalid, and discarding the real-time monitoring data.
Further, the auditing the real-time monitoring data to obtain the auditing passing rate of the consensus node includes: auditing the real-time monitoring data to obtain the number of approved audits of the consensus nodes; and obtaining the passing rate of the audit according to the number of the audit passes and the total number of the real-time online consensus nodes.
Specifically, real-time monitoring data of all terminals in the internet of things system need to be sent to each online consensus node in real time for screening and auditing. The preset auditing threshold value is preset according to actual conditions, specific numerical values are limited in the application, and if the auditing passing rate exceeds the threshold value p%, the data is considered to pass the auditing and needs to be stored in a chain database for processing analysis and storage maintenance. Here, the audit passing rate means that if N × p% of the N online common identification nodes audit and determine that the data is valid, the data is considered to be valid and the data passes the audit. And the audit passing rate is the ratio of the audit passing number of the consensus nodes to the number of all the online consensus nodes. And if the audit passing rate does not exceed the preset audit threshold value, determining that the real-time monitoring data is invalid, and discarding the real-time monitoring data. The application of the block chain provides great guarantee for the safety of system data, the screening and the auditing of the consensus nodes ensure the validity of the data stored in the database, and the utilization rate of storage, maintenance and management resources is improved; the structure of the chain database ensures that the data information stored in the database cannot be illegally modified and attacked, and prevents the data from being tampered or lost.
Step 140, obtaining a first online consensus node from the N real-time online consensus nodes;
specifically, the first online common node is a common node among the current N online common nodes.
Further, before determining whether the online status of the first online consensus node enters the dormant state, the method further includes: acquiring identity information of a first online consensus node; judging whether the identity information of the first online consensus node is the same as the identity information of the first online consensus node in the identity list or not; if the identity information of the first online consensus node is the same as the identity information of the first online consensus node in the identity list, judging whether the online state of the first online consensus node enters a dormant state or not; and if the identity information of the first online consensus node is different from the identity information of the first online consensus node in the identity list, stopping judging whether the online state of the first online consensus node enters a dormant state or not.
Specifically, in order to prevent a malicious node from being disguised as the first common node transmission information, the condition of the identity recognition step should be added before the online state of the first common node is judged. And receiving the identity information of the first online common identification node, comparing and verifying the identity information sent by the first common identification node with the identity information of the first common identification node stored in the identity list, and performing subsequent online state judgment only after verification is passed. Authentication methods herein include, but are not limited to, asymmetric encryption.
Step 150, judging whether the online state of the first online consensus node enters a dormant state;
specifically, each consensus node includes an identity list of M initial consensus nodes and a current online state list, and changes of list information are synchronized in each consensus node in real time, so that what state the first online consensus node is in can be known according to the changes of the list information, including a dormant state, a state of going online again after dormancy, and a state of keeping online unchanged. And judging which state of the three situations the first online common node is in.
And step 160, updating the number of the real-time online consensus nodes according to the online state of the first online consensus node.
Specifically, the number of the real-time online consensus nodes is updated according to the online status of the first online consensus node, and specifically, identity lists are synchronized among all real-time online consensus nodes. If the first consensus node is recovered to be online again from the dormant state, the online change conditions of other consensus nodes are not clear during the dormancy, and the stored identity list needs to be kept consistent with other nodes; in addition, other real-time online consensus nodes may cause inconsistency of the stored identity lists due to the network or due to self-judgment, and in order to eliminate such an error, the identity lists stored among all real-time online consensus nodes need to be updated synchronously. Therefore, real-time online consensus node information in the block chain can be obtained, the auditing passing rate can be reasonably calculated when the data reported by each terminal is screened and audited, and whether the reported data is effective or not and whether the reported data is uploaded to a correct conclusion of storage analysis of the server or not can be obtained.
The following specifically explains how to update the number of the real-time online consensus nodes for three different states of the first online consensus node.
Further, the updating the number of the real-time online consensus nodes according to the online status of the first online consensus node includes: if the online state of the first online consensus node is in a dormant state, sending first informing information to the rest M-1 consensus nodes, wherein the first informing information is used for informing the M-1 consensus nodes to update the online state of the first online consensus node to be in the dormant state; and updating the number of the online common identification nodes to be N-1 according to the first notification information.
Specifically, when a certain common node X of the current N online common nodes enters a sleep state, the node X sends active notification information, that is, the first notification information, to the remaining M-1 common nodes, where the first notification information includes the identity information of the first online node in addition to the online state update of the first common node to the sleep state. The identity information is used for the receiving node to authenticate the receiving node. Therefore, the state of X in the list is changed from an online state to a dormant state, the number of online consensus nodes is changed into N-1, whether the data uploaded by the terminal passes the audit or not is judged, the data can pass the audit only by judging that (N-1) × p% nodes are effective, and the change of the information is synchronized in each consensus node in real time.
Further, the updating the online states of the N real-time online consensus nodes according to the online state of the first online consensus node further includes: and if the online state of the first online consensus node is kept unchanged, sending second notification information to the rest M-1 consensus nodes, wherein the second notification information is used for notifying the M-1 consensus nodes that the online state of the first online consensus node is kept unchanged.
Specifically, the second notification message includes identity information of the first online node, in addition to the online status of the first common node being kept unchanged. The identity information is used for the receiving node to authenticate the receiving node. And if the X node finishes dormancy and comes on line again, the node X sends active notification information, namely the second notification information, to the rest M-1 common identification nodes, so that the state of the X in the list is changed from the online dormancy to the online state, the number of the online common identification nodes is changed from N to N +1, if N X p% of the nodes verify and judge that the data is valid, the data passes verification, and the change of the information is synchronized in each common identification node in real time.
Further, the updating the number of the real-time online consensus nodes according to the online status of the first online consensus node further includes: if the online state of the first online consensus node is the new online state, sending third notification information to the other M-1 consensus nodes, wherein the third notification information is used for notifying the M-1 consensus nodes to update the online state of the first online consensus node from the dormant state to the online state; and updating the number of the online consensus nodes to be N +1 according to the third notification information.
Specifically, if the state of the node X is not changed, the node X sends active notification information, that is, the third notification information, to the remaining M-1 consensus nodes, where the third notification information includes the identity information of the first online node, in addition to the online state of the first consensus node being updated from the dormant state to the online state. The identity information is used for the receiving node to authenticate the receiving node. After the identity passes, updating the online state of the first common identification node in the identity list to be online according to the online state change of the first common identification node in the third notification information, wherein the number of the updated online common identification nodes is N + 1.
Example two
Based on the same inventive concept as the method for updating the online consensus node of the internet of things based on the block chain in the foregoing embodiment, the present invention further provides a device for updating the online consensus node of the internet of things based on the block chain, as shown in fig. 2, where the device includes:
a first obtainingunit 11, where the first obtainingunit 11 is configured to obtain M consensus nodes, where M is an integer greater than 0;
a second obtainingunit 12, where the second obtainingunit 12 is configured to obtain N real-time online consensus nodes from the M consensus nodes, where N is an integer greater than 0 and N is less than or equal to M;
afirst setting unit 13, where thefirst setting unit 13 is configured to set an identity list of consensus nodes in each consensus node, where the identity list includes identity information, online number, and online status information of each consensus node;
a third obtainingunit 14, where the third obtainingunit 14 is configured to obtain a first online consensus node from the N real-time online consensus nodes;
afirst judging unit 15, where thefirst judging unit 15 is configured to judge whether an online state of the first online consensus node enters a dormant state;
afirst updating unit 16, where thefirst updating unit 16 is configured to update the number of the real-time online consensus nodes according to an online status of the first online consensus node.
Further, the apparatus further comprises:
a first sending unit, configured to send first notification information to the remaining M-1 common knowledge nodes if the presence status of the first online common knowledge node is a dormant status, where the first notification information is used to notify the M-1 common knowledge nodes to update the presence status of the first online common knowledge node to the dormant status;
and the second updating unit is used for updating the number of the online common knowledge nodes to be N-1 according to the first notification information.
Further, the apparatus further comprises:
a third sending unit, configured to send third notification information to the remaining M-1 common identification nodes if the online status of the first online common identification node is the new online status, where the third notification information is used to notify the M-1 common identification nodes that the online status of the first online common identification node is updated from the dormant status to the online status;
and the third updating unit is used for updating the number of the online common knowledge nodes to be N +1 according to the third notification information.
Preferably, the apparatus further comprises:
a fourth obtaining unit, configured to obtain identity information of the first online consensus node;
a second determining unit, configured to determine whether identity information of the first online consensus node is the same as identity information of the first online consensus node in the identity list;
a third determining unit, configured to determine whether an online state of the first online consensus node enters a dormant state if the identity information of the first online consensus node is the same as the identity information of the first online consensus node in the identity list;
a first stopping unit, configured to stop determining whether an online state of the first online consensus node enters a dormant state if the identity information of the first online consensus node is different from the identity information of the first online consensus node in the identity list.
Further, the apparatus further comprises:
a fourth obtaining unit, configured to obtain a predetermined audit threshold;
a fifth obtaining unit, configured to obtain real-time monitoring data of all terminals in the internet of things system on the consensus node;
a sixth obtaining unit, configured to perform audit on the real-time monitoring data to obtain an audit passing rate of the consensus node;
a second judging unit, configured to judge whether the audit passing rate exceeds the predetermined audit threshold;
the first determining unit is used for determining that the real-time monitoring data are valid if the auditing passing rate exceeds the preset auditing threshold value, and storing the real-time monitoring data into a chained database;
and the second determining unit is used for determining that the real-time monitoring data is invalid and discarding the real-time monitoring data if the audit passing rate does not exceed the preset audit threshold.
Further, the apparatus further comprises:
a seventh obtaining unit, configured to perform audit on the real-time monitoring data, and obtain the number of approved audits of the consensus node;
and the eighth obtaining unit is used for obtaining the audit passing rate according to the number of the audit passes and the total number of the real-time online consensus nodes.
Various changes and specific examples of the method for updating the online consensus node of the internet of things based on the block chain in the first embodiment of fig. 1 are also applicable to the device for updating the online consensus node of the internet of things based on the block chain in the present embodiment, and through the foregoing detailed description of the method for updating the online consensus node of the internet of things based on the block chain, those skilled in the art can clearly know the method for implementing the device for updating the online consensus node of the internet of things based on the block chain in the present embodiment, so for the brevity of the description, detailed description is omitted here.
EXAMPLE III
Based on the same inventive concept as the method for updating the online consensus node of the internet of things based on the block chain in the foregoing embodiments, the present invention further provides a device for updating the online consensus node of the internet of things based on the block chain, where a computer program is stored on the device, and when the computer program is executed by a processor, the steps of any one of the methods for updating the online consensus node of the internet of things based on the block chain in real time are implemented.
Where in fig. 3 a bus architecture (represented by bus 300),bus 300 may include any number of interconnected buses and bridges,bus 300 linking together various circuits including one or more processors, represented byprocessor 302, and memory, represented bymemory 304. Thebus 300 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. Abus interface 306 provides an interface between thebus 300 and thereceiver 301 andtransmitter 303. Thereceiver 301 and thetransmitter 303 may be the same element, i.e., a transceiver, providing a means for communicating with various other apparatus over a transmission medium.
Theprocessor 302 is responsible for managing thebus 300 and general processing, and thememory 304 may be used for storing data used by theprocessor 302 in performing operations.
Example four
Based on the same inventive concept as the method for updating the online consensus node of the internet of things in real time based on the blockchain in the foregoing embodiments, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the following steps: obtaining M consensus nodes, wherein M is an integer greater than 0; obtaining N real-time online consensus nodes from the M consensus nodes, wherein N is an integer greater than 0 and is less than or equal to M; setting an identity list of consensus nodes in each consensus node, wherein the identity list comprises identity information, online quantity and online state information of each consensus node; obtaining a first online consensus node from the N real-time online consensus nodes; judging whether the online state of the first online consensus node enters a dormant state or not; and updating the number of the real-time online consensus nodes according to the online state of the first online consensus node.
In a specific implementation, when the program is executed by a processor, any method step in the first embodiment may be further implemented.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
the embodiment of the invention provides a method and a device for updating online consensus nodes of the Internet of things based on a block chain, wherein M consensus nodes are obtained, wherein M is an integer greater than 0; obtaining N real-time online consensus nodes from the M consensus nodes, wherein N is an integer greater than 0 and is less than or equal to M; setting an identity list of consensus nodes in each consensus node, wherein the identity list comprises identity information, online quantity and online state information of each consensus node; obtaining a first online consensus node from the N real-time online consensus nodes; judging whether the online state of the first online consensus node enters a dormant state or not; and updating the number of the real-time online consensus nodes according to the online state of the first online consensus node. The method solves the technical problems that in the prior art, in the Internet of things system which takes 'low power consumption' as one of main advantages, a terminal can be in a dormant state most of the time, the consensus nodes in the dormant state cannot provide effective data screening and auditing, the real-time effective consensus node number is not fixed, and the real-time evaluation result of the data auditing pass rate at the consensus nodes can be influenced, achieves the dynamic updating of the on-line consensus node number and the identity list, and accordingly improves the technical effect of improving the accuracy of the real-time evaluation result of the consensus node auditing pass rate.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

CN201910422909.9A2019-05-212019-05-21Real-time updating method and device for Internet of things online consensus node based on block chainActiveCN110266765B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910422909.9ACN110266765B (en)2019-05-212019-05-21Real-time updating method and device for Internet of things online consensus node based on block chain

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910422909.9ACN110266765B (en)2019-05-212019-05-21Real-time updating method and device for Internet of things online consensus node based on block chain

Publications (2)

Publication NumberPublication Date
CN110266765A CN110266765A (en)2019-09-20
CN110266765Btrue CN110266765B (en)2022-03-01

Family

ID=67914898

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910422909.9AActiveCN110266765B (en)2019-05-212019-05-21Real-time updating method and device for Internet of things online consensus node based on block chain

Country Status (1)

CountryLink
CN (1)CN110266765B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111447216B (en)*2020-03-252021-12-10百度国际科技(深圳)有限公司 Method and apparatus for changing consensus nodes
CN111461886B (en)*2020-04-012022-02-01杭州溪塔科技有限公司Management method and device for system configuration independent of intelligent contracts on block chains
CN111654415B (en)*2020-05-282021-09-10腾讯科技(深圳)有限公司Block chain based information processing method, device, equipment and readable storage medium
CN115834380A (en)*2022-11-102023-03-21广东卓启云链科技有限公司Committee node consensus method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107332701A (en)*2017-06-262017-11-07中国人民银行数字货币研究所The method and system of management node
CN107368507A (en)*2017-03-282017-11-21阿里巴巴集团控股有限公司 A blockchain-based consensus method and device
CN109003099A (en)*2018-06-192018-12-14西安邮电大学Block chain node data processing method, equipment and storage medium
CN109039713A (en)*2018-07-162018-12-18夸克链科技(深圳)有限公司A kind of block chain common recognition device and algorithm
CN109102308A (en)*2018-09-052018-12-28深圳正品创想科技有限公司Merchandise news maintaining method, block chain node and its system based on block chain
CN109218079A (en)*2018-08-162019-01-15北京京东尚科信息技术有限公司A kind of block chain network, dispositions method and storage medium
CN109327528A (en)*2018-10-312019-02-12阿里巴巴集团控股有限公司Node management method and device based on block chain
CN109325854A (en)*2018-08-162019-02-12北京京东尚科信息技术有限公司Block chain network, dispositions method and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US11281644B2 (en)*2017-07-282022-03-22Hitachi, Ltd.Blockchain logging of data from multiple systems

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107368507A (en)*2017-03-282017-11-21阿里巴巴集团控股有限公司 A blockchain-based consensus method and device
CN107332701A (en)*2017-06-262017-11-07中国人民银行数字货币研究所The method and system of management node
CN109003099A (en)*2018-06-192018-12-14西安邮电大学Block chain node data processing method, equipment and storage medium
CN109039713A (en)*2018-07-162018-12-18夸克链科技(深圳)有限公司A kind of block chain common recognition device and algorithm
CN109218079A (en)*2018-08-162019-01-15北京京东尚科信息技术有限公司A kind of block chain network, dispositions method and storage medium
CN109325854A (en)*2018-08-162019-02-12北京京东尚科信息技术有限公司Block chain network, dispositions method and storage medium
CN109102308A (en)*2018-09-052018-12-28深圳正品创想科技有限公司Merchandise news maintaining method, block chain node and its system based on block chain
CN109327528A (en)*2018-10-312019-02-12阿里巴巴集团控股有限公司Node management method and device based on block chain

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"A BIOCkChain COnsensuS ProtOCOI With Horizontal Scalability";Kelong Cong,et al;《IEEE》;20190425;全文*
"Blockchains as security-enabler for industrial IoT-applications";Volker Skwarek ,et al;《Asia Pacific Journal of Innovation and Entrepreneurship》;20171231;参见第1,4小节,图3-4*
"一种基于区块链的医疗信息隐私保护和共";任延辉;《中国优秀硕士学位论文全文数据库》;20190228;全文*

Also Published As

Publication numberPublication date
CN110266765A (en)2019-09-20

Similar Documents

PublicationPublication DateTitle
CN110266765B (en)Real-time updating method and device for Internet of things online consensus node based on block chain
US11303661B2 (en)System and method for detection and prevention of attacks on in-vehicle networks
US10826684B1 (en)System and method of validating Internet of Things (IOT) devices
Tomlinson et al.Detection of automotive CAN cyber-attacks by identifying packet timing anomalies in time windows
CN110784355B (en)Fault identification method and device
CN107547572B (en)CAN bus communication method based on pseudo-random number
CN111026578A (en)Intelligent contract security detection method based on prediction machine
CN112995236B (en)Internet of things equipment safety management and control method, device and system
CN108092777B (en) Supervision method and device for digital certificate
CN110892675B (en)Method and apparatus for monitoring block chains
CN112053164A (en)Block chain-based electronic commerce data processing method and system
CN108234441B (en)Method, apparatus, electronic device and storage medium for determining forged access request
DE102018130297A1 (en) Proof of work concept for a vehicle
US11522876B2 (en)Method and device for detecting an attack on a serial communications system
CN119200980A (en) An information security data processing system based on blockchain
CN116107894A (en)Gray scale test method and device based on artificial intelligence, electronic equipment and medium
CN112883394B (en)Block chain-based big data security processing method and system
CN110599652A (en)Access control management system and method based on block chain
CN114218577A (en) An API risk determination method, device, equipment and medium
CN110674532B (en) Evidence document tamper-proof method and device
CN110166548B (en)Real-time updating method and device for online consensus node of Internet of things
CN108768774B (en)Quantitative network security evaluation method and system
EP2229646B1 (en)Software identification
HRP20221482T1 (en)Method for regulating access to data connection by an electronic device
CN113098837A (en)Industrial firewall state detection method and device, electronic equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp