CN113836503A - Internet of things data modification state recording method and system based on block chain - Google Patents

Internet of things data modification state recording method and system based on block chain Download PDF

Info

Publication number
CN113836503A
CN113836503A CN202110910781.8A CN202110910781A CN113836503A CN 113836503 A CN113836503 A CN 113836503A CN 202110910781 A CN202110910781 A CN 202110910781A CN 113836503 A CN113836503 A CN 113836503A
Authority
CN
China
Prior art keywords
modification
time
data
internet
things
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
Application number
CN202110910781.8A
Other languages
Chinese (zh)
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.)
Zhongbiao Huian Information Technology Co Ltd
Original Assignee
Zhongbiao Huian Information Technology Co 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 Zhongbiao Huian Information Technology Co Ltd filed Critical Zhongbiao Huian Information Technology Co Ltd
Priority to CN202110910781.8A priority Critical patent/CN113836503A/en
Publication of CN113836503A publication Critical patent/CN113836503A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2133Verifying human interaction, e.g., Captcha

Abstract

The embodiment of the invention discloses a block chain-based Internet of things data modification state recording method and system, and belongs to the technical field of Internet of things. The method comprises the following steps: the client receives a data modification instruction input by a user and sends the data modification instruction to the server; the server side responds to the data modification instruction and carries out man-machine verification on the current login user of the client side; after the man-machine verification is passed, the server side calculates the modification ending time of the jth file according to the modification starting time and the modification duration of the jth file stored in the block chain-based Internet of things database at this time, and records the modification time information of the jth file at this time; and the server screens out modified data in the Internet of things database based on the block chain, and marks the modified data. The invention not only ensures the safety of the modified data, but also carries out subsequent quick check on the modified data.

Description

Internet of things data modification state recording method and system based on block chain
Technical Field
The invention belongs to the technical field of Internet of things, and particularly relates to a block chain-based Internet of things data modification state recording method and system.
Background
The Internet of Things (IOT) is a future society that connects sensors, controllers, machines and devices through network technology and realizes intelligent management and control of machines and devices through object-to-object connection, which helps people to advance to more intelligent and convenient. Along with the development of internet of things, the problem that it exists also shows prominently, specifically including the operation cost height, have problems such as information security hidden danger, for example: because the internet of things adopts a centralized system structure, the cost of calculation, storage and bandwidth required by centralized service becomes more and more huge with the increase of the number of access terminals; in addition, the central server stores a large amount of data information, and once the data information is attacked by malicious attack, all the data information in the whole internet of things is leaked.
In recent years, with the rapid development of information technology, block chaining has come into play. Essentially, the block chain is a distributed shared account book and a database, and has the characteristics of decentralization, no tampering, trace leaving in the whole process, traceability, collective maintenance, openness and transparency and the like. The block chain technology can provide a point-to-point direct interconnection mode for the Internet of things for data transmission and an encryption protection and verification mechanism, so that the problems of the Internet of things are solved well, and the block chain technology and the Internet of things technology are combined to be necessary.
The Internet of things based on the block chain is an information sharing platform, stores a large amount of data information of the terminal, and supports an access terminal user to modify and perfect the data information. However, because the internet of things based on the block chain is an emerging technology, the current method for modifying and recording data of the internet of things based on the block chain cannot effectively verify the authority of a terminal user, so that the data has the hidden danger of being maliciously modified by an illegal user, meanwhile, the relevant information of the modified data cannot be displayed to the terminal user in time, and the problem that the user is very inconvenient to search the modified data in an internet of things database, the data safety is low, and the modified data cannot be checked conveniently is solved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a block chain-based method and system for recording a data modification state of an internet of things, so as to solve the problems of low security of data and inconvenient viewing after modification in the prior art. The invention can carry out man-machine verification on the user and mark the modified data in time, thereby not only ensuring the safety of the data, but also marking the modified data in time.
In a first aspect, an embodiment of the present invention provides a block chain-based method for modifying a state record of data of an internet of things, including the following steps:
the client receives a data modification instruction input by a user and sends the data modification instruction to the server;
the server side responds to the data modification instruction and carries out man-machine verification on the current login user of the client side;
after the man-machine verification is passed, the server side calculates the modification ending time of the jth file according to the modification starting time and the modification duration of the jth file stored in the block chain-based Internet of things database at this time, and records the modification time information of the jth file at this time; wherein j is 1,2, …, N is the total number of files stored in the block chain-based internet of things database;
and the server screens out the modified data in the Internet of things database based on the block chain, and marks the modified data.
In an optional embodiment, the marking the modified data includes:
marking modified data stored in the block chain-based Internet of things database with modification information so that the modified data is displayed through equipment used by a user and the modification information is displayed at the same time; wherein the modification information at least comprises modification user information and modification time information; the device used by the user is the same as or different from the client.
In an optional embodiment, the marking the modified data further includes:
marking the text format of the modified data as a specified format so that the modified data is displayed in the specified format by a device used by a user.
In an optional embodiment, the screening, by the server, modified data in the block chain-based internet of things database includes:
the server side calculates a first MD5 value of each file in the block chain-based Internet of things database at the beginning of the current period and a second MD5 value of each file at the end of the current period according to a preset period;
the server side judges whether the first MD5 value and the second MD5 value of each file in the current period are consistent or not;
if the first MD5 value and the second MD5 value of the ith file in the current period are inconsistent, judging the ith file to be modified data; i is 1,2, …, N.
In an alternative embodiment, the predetermined period is 100 seconds.
In an optional embodiment, the performing, by the server, human-machine authentication on the current login user of the client in response to the data modification instruction includes:
the server side responds to a data modification instruction of the client side and generates a first time verification code corresponding to the current time according to a first formula;
the server side sends the first time verification code to equipment used by a user; the equipment used by the user is the same as or different from the client;
the server receives a second time verification code sent by the client and calculates a man-machine verification flag value according to a second formula so as to determine whether the man-machine verification of the current login user of the client is successful; the second time verification code is obtained by the client through a verification code input interface provided for the current login user;
the first formula is:
P=3600*h+60*m+s
the second formula is:
Figure BDA0003203568200000031
wherein σ is a value of a human verification flag, P is a first time verification code, h is a number of hours when the time verification code is generated, m is a number of minutes when the time verification code is generated, and s is a number of seconds when the time verification code is generated; p' is a second time verification code; when σ ≠ 1, the human-computer authentication succeeds, and when σ ≠ 1, the human-computer authentication fails.
In an optional embodiment, after the human-computer verification is passed, the step of calculating, by the server, modification ending time for a jth file according to modification starting time and modification duration for the jth file stored in the block chain-based internet of things database at this time includes:
after the man-machine verification is passed, the server generates a third time verification code corresponding to the current time according to the first formula, and starts timing;
the server side responds to the storage modification instruction of the client side, stops timing and takes the current timing time as the modification duration of the jth file;
the server calculates the modification ending time of the jth file according to a third formula;
wherein the third formula is:
Figure BDA0003203568200000041
in the third formula, thjIs the number of hours in the end modification time for the jth file, tm jIs the number of minutes in the end modification time for said jth file, ts jThe number of seconds in the modification time for the end of the jth file; y is a third time verification code; // is the division integer symbol; t isjAnd the modification duration of the jth file at this time is obtained.
In a second aspect, an embodiment of the present invention provides a block chain-based internet of things data modification state recording system, including: a client and a server;
the client is used for receiving a data modification instruction input by a user and sending the data modification instruction to the server;
the server side comprises:
the man-machine verification module is used for responding to a data modification instruction of the client and performing man-machine verification on a current login user of the client;
the time recording module is used for calculating the modification ending time of the jth file according to the modification starting time and the modification duration of the jth file stored in the block chain-based Internet of things database at this time after the man-machine verification is passed, and recording the modification time information of the jth file at this time; wherein j is 1,2, …, N is the total number of files stored in the block chain-based internet of things database;
and the marking module is used for screening out modified data in the Internet of things database based on the block chain and marking the modified data.
In an optional embodiment, the marking module is specifically configured to mark modification information on modified data stored in the block chain-based internet of things database, so that the modified data is displayed through a device used by a user while the modification information is displayed; wherein the modification information at least comprises modification user information and modification time information; the device used by the user is the same as or different from the client.
In an optional embodiment, the marking module is further configured to mark a text format of the modified data into a specified format, so that the modified data is displayed in the specified format through a device used by a user.
The invention provides a novel Internet of things data modification state recording scheme based on a block chain. The Internet of things data modification state recording scheme based on the block chain can improve the data security and can mark, check and display the modified data in time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for recording a data modification state of an internet of things based on a block chain according to an embodiment of the present invention;
FIG. 2 is a flowchart of an implementation method of S102;
FIG. 3 is a flowchart of one implementation of S103;
FIG. 4 is a flowchart of one implementation of S104;
fig. 5 is a schematic structural diagram of a data modification state recording system of the internet of things based on a block chain according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a method for recording a data modification state of an internet of things based on a block chain according to an embodiment of the present invention. Referring to fig. 1, the method comprises the steps of:
s101: the client receives a data modification instruction input by a current login user and sends the data modification instruction to the server;
for example: a user can initiate a data modification instruction by clicking a preset button on a currently used human-computer interaction interface of the client, and the client sends the data modification instruction to the server to request data modification service.
S102: the server side responds to the data modification instruction and carries out man-machine verification on the current login user of the client side;
in an alternative embodiment, as shown in fig. 2, the step S102 may include steps S201 to S203:
s201: the server side responds to a data modification instruction of the client side and generates a first time verification code corresponding to the current time according to a first formula;
wherein the first formula is:
P=3600*h+60*m+s (1)
in the first formula, P is a first time validation code, h is the number of hours when the time validation code is generated, m is the number of minutes when the time validation code is generated, and s is the number of seconds when the time validation code is generated.
In this embodiment, when performing the man-machine authentication, the server generates a 6-bit time authentication code according to the time when the client (i.e., the terminal) sends the application modification, and sends the generated time authentication code to the user, for example, when the time for generating the first time authentication code is 10:20:30, h is 10, m is 20, s is 30, and the first time authentication code is P3600 + 10+60 + 20+30 is 037230.
S202: the server side sends the first time verification code to equipment used by a user;
wherein the equipment used by the user is the same as or different from the client;
in this embodiment, after receiving the data modification instruction, the server generates a first time verification code according to the current time, for example, the current time is 10:20:30, and then the server generates the first time verification code according to the current time and according to a predetermined verification code generation rule, and sends the first time verification code to the client or the device used by the user, so that the user performs subsequent input for performing the human-computer verification.
S203: the server receives a second time verification code sent by the client and calculates a man-machine verification flag value according to a second formula so as to determine whether the man-machine verification of the current login user of the client is successful;
and the second time verification code is obtained by the client through a verification code input interface provided for the current login user. In this embodiment, after receiving the first time verification code, the user inputs the time verification code through a predetermined input interface of the client, and the client sends the second time verification code input by the current user to the server for verification.
Wherein the second formula is:
Figure BDA0003203568200000071
in the second formula, sigma is a human machine verification flag value, P is a first time verification code, and P' is a second time verification code; when the sigma is equal to 1, namely the first time verification code is the same as the second time verification code, the current login user of the client is a legal user, the man-machine verification is successful, and when the sigma is equal to 1, namely the first time verification code is different from the second time verification code, the current login user of the client is an illegal user, and the man-machine verification fails.
S103: after the man-machine verification is passed, the server side calculates the modification ending time of the jth file according to the modification starting time and the modification duration of the jth file stored in the block chain-based Internet of things database at this time, and records the modification time information of the jth file at this time;
wherein j is 1,2, …, and N is the total number of files stored in the block chain-based internet of things database.
In an alternative embodiment, as shown in fig. 3, the step S103 may include S301 to S303:
s301: after the man-machine verification is passed, the server generates a third time verification code corresponding to the current time according to the first formula, and starts timing;
in this embodiment, assuming that the current time is 10:20:40 after the man-machine authentication is passed, the server generates 037240 a third time verification code Y according to the first formula and the first formula.
S302: the server side responds to the storage modification instruction of the client side, stops timing and takes the current timing time as the modification duration of the jth file;
in this embodiment, assuming that the time for starting the timing after the verification by the human-computer in S301 is 10:20:40, the timing is stopped when the server responds to the saving and modifying instruction of the client in S302, and the timing time is 10S, the modification time T for the jth file this time is 10Sj=10s。
S303: the server calculates the modification ending time of the jth file according to a third formula;
wherein the third formula is:
Figure BDA0003203568200000081
in the third formula (3), th jIs the number of hours in the end modification time for the jth file, tm jIs the number of minutes in the end modification time for said jth file, ts jThe number of seconds in the modification time for the end of the jth file; y is a third time verification code; // is the division integer symbol; t isjAnd the modification duration of the jth file at this time is obtained.
Assuming that the time of the server after the man-machine verification is passed is 10:20:40, the modification time length T of the jth file at this time isjFor 10s, according to the first formula, the third time verification code Y is calculated to be 037240, and then according to the third formula, t can be calculatedh j,tm jAnd ts jThe values of (a) are as follows:
th j=(Y+Tj)//3600=(037240+10)//3600=10
tm j=(Y+Tj-3600*thj)//60=(037240+10-3600*10)//60=20
ts j=(Y+Tj-3600*thj-60*tm j)=(037240+10-3600*10-60*20)
=50
the end modification time for the jth file is 10:20:50 according to the above calculation.
S104: and the server screens out the modified data in the Internet of things database based on the block chain.
In this step, since the data modification action is executed at the client, the server may obtain the current modified data according to the related information uploaded by the client, or the server may periodically check the data condition stored in its database to screen out the modified data.
In an alternative embodiment, as shown in fig. 4, the step S104 includes:
s401: the server side calculates a first MD5 value of an ith file in the block chain-based Internet of things database at the beginning of the current period and a second MD5 value of the ith file at the end of the current period according to a preset period;
preferably, the predetermined period is 100 seconds, i is 1,2, …, N, and the initial value is 1.
In this embodiment, the MD5 value used is obtained by using the MD5 algorithm (information-summary algorithm 5). The MD5 algorithm is currently available in many programming languages. Taking Java as an example, the MessageDigest class in Java. Processing an input file by using java, nio, MappedByteBuffer and java, nio, channels, FileChannel classes, initializing an MD5 algorithm by using a MessageDiget, getInstance ("MD 5"), initializing by using an update () method in the MessageDiget class, and calling a digest () method to obtain an MD5 value represented by byte data, wherein the MD5 value is a 128-bit hash value.
S402: the server side judges whether the first MD5 value and the second MD5 value of the ith file in the current period are consistent, if not, the step S403 is executed, and if so, the step S404 is executed;
in this embodiment, it is determined whether the first MD5 value and the second MD5 value of each file in the current period are consistent, for example, the first MD5 value and the second MD5 value may be calculated according to a bitwise xor, the same value at the corresponding position is 0, the difference is 1, and the calculation formula is a fourth formula, which is specifically as follows:
Figure BDA0003203568200000091
wherein epsiloniIs the result of bitwise XOR of the first MD5 value and the second MD5 value as an indication of whether file i is modified or notiWhen 1, the file i is indicated to be modified by human; when epsiloniWhen the file is equal to 0, the file i is not artificially modified and has no operation;
Figure BDA0003203568200000092
for the first MD5 value of file i,
Figure BDA0003203568200000093
a second MD5 value for file i;
Figure BDA0003203568200000094
the same is 0 and the different is 1 in corresponding positions for the calculation of bitwise exclusive or.
S403: and judging the ith file as modified data.
S404:i=i+1;
S405: and judging whether i is larger than N, if so, ending the process, and otherwise, executing the step S401.
In this embodiment, the service end calculates and records MD5 values of the files in the block chain-based internet of things database every 100 seconds (or other period values), compares the MD5 value of each file calculated this time with the MD5 value of the same file calculated last time, and if the MD5 values of the same file at the beginning and the end of each period are not changed, it indicates that the data of the file is not modified, otherwise, it indicates that the file is modified data in the period.
S105: the modified data is marked.
In an alternative embodiment, the step S105 includes:
marking modified data stored in the block chain-based Internet of things database with modification information so that the modified data is displayed through equipment used by a user and the modification information is displayed at the same time; wherein the modification information at least comprises modification user information and modification time information; the device used by the user is the same as or different from the client. For example, by marking the modification information, when the modified data is displayed through the device used by the user, the latest modification user information and modification time information corresponding to the data may be displayed in other forms after a predetermined pop-up window is displayed near the modified data on the display interface of the client, or all history modification information corresponding to the data may also be displayed, and the like, which is not described herein again.
Preferably, the step S105 may further include: marking the text format of the modified data as a specified format so that the modified data is displayed in the specified format by a device used by a user. For example, the text format of the modified data may be further marked as "font color" as "red", so that when the modified data is viewed by the user next time, the content of the modified part is shown in red font, which is convenient for the user to quickly know the modified data.
According to the method for recording the data modification state of the Internet of things based on the block chain, firstly, man-machine verification is carried out on a user, the user is allowed to modify the file stored in the Internet of things database based on the block chain after the verification is passed, then, the modification finishing time of the file is calculated according to the file modification starting time and the modification duration, the modification time information of the file is recorded, finally, modification information (such as user information modification, modification time and the like or red marking processing is carried out on the modified data) is marked on the modified data and displayed to the user, so that the change condition in the data file and the information and modification time of a modifier can be intuitively reflected to the user in time, permission verification is added at the same time, the attack modification of the data by an illegal program is prevented, the safety of the data is guaranteed, and the modified data is convenient to check.
Corresponding to the method for recording the data modification state of the internet of things based on the block chain provided by the embodiment of the present invention, the embodiment of the present invention further provides a system for recording the data modification state of the internet of things based on the block chain, as shown in fig. 5, the system includes: the method comprises the following steps: a client 1 and a server 2; the client 1 is used for receiving a data modification instruction input by a user and sending the data modification instruction to the server 2;
the server 2 includes:
the man-machine authentication module 21 is used for responding to a data modification instruction of the client 1 and performing man-machine authentication on a current login user of the client 1;
the time recording module 22 is configured to calculate, after the human-computer verification is passed, modification ending time for a jth file according to modification starting time and modification duration for the jth file stored in the block chain-based internet of things database at this time, and record modification time information for the jth file at this time; wherein j is 1,2, …, N is the total number of files stored in the block chain-based internet of things database;
and the marking module 23 is configured to screen out modified data in the block chain-based internet of things database, and mark the modified data.
In an optional embodiment, the marking module 23 is specifically configured to mark modification information on modified data stored in the block chain-based internet of things database, so that the modified data is displayed through a device used by a user while the modification information is displayed; wherein the modification information at least comprises modification user information and modification time information; the device used by the user is the same as or different from the client.
In an optional embodiment, the marking module 23 is further configured to mark the text format of the modified data into a specified format, so that the modified data is displayed in the specified format by a device used by a user.
The function and the beneficial effect of the block chain-based data modification state recording system of the internet of things provided by the embodiment of the invention are similar to those of the block chain-based data modification state recording method of the internet of things, and are not described again here.
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. The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. The Internet of things data modification state recording method based on the block chain is characterized by comprising the following steps:
the client receives a data modification instruction input by a user and sends the data modification instruction to the server;
the server side responds to the data modification instruction and carries out man-machine verification on the current login user of the client side;
after the man-machine verification is passed, the server side calculates the modification ending time of the jth file according to the modification starting time and the modification duration of the jth file stored in the block chain-based Internet of things database at this time, and records the modification time information of the jth file at this time; wherein j is 1,2, …, N is the total number of files stored in the block chain-based internet of things database;
and the server screens out the modified data in the Internet of things database based on the block chain, and marks the modified data.
2. The method for recording the data modification state of the internet of things based on the blockchain as claimed in claim 1, wherein the marking the modified data comprises:
marking modified data stored in the block chain-based Internet of things database with modification information so that the modified data is displayed through equipment used by a user and the modification information is displayed at the same time; wherein the modification information at least comprises modification user information and modification time information; the device used by the user is the same as or different from the client.
3. The method for recording the data modification state of the internet of things based on the blockchain as claimed in claim 2, wherein the marking the modified data further comprises:
marking the text format of the modified data as a specified format so that the modified data is displayed in the specified format by a device used by a user.
4. The method for recording data modification state of the internet of things based on the blockchain as claimed in claim 1, wherein the step of screening out the modified data in the database of the internet of things based on the blockchain by the server side comprises the following steps:
the server side calculates a first MD5 value of each file in the block chain-based Internet of things database at the beginning of the current period and a second MD5 value of each file at the end of the current period according to a preset period;
the server side judges whether the first MD5 value and the second MD5 value of each file in the current period are consistent or not;
if the first MD5 value and the second MD5 value of the ith file in the current period are inconsistent, judging the ith file to be modified data; i is 1,2, …, N.
5. The method for data modification state recording of the internet of things based on the blockchain as claimed in claim 4, wherein the predetermined period is 100 seconds.
6. The method for recording data modification state of the internet of things based on the blockchain as claimed in claim 1, wherein the step of performing human-computer verification on the current login user of the client by the server in response to the data modification instruction comprises the steps of:
the server side responds to a data modification instruction of the client side and generates a first time verification code corresponding to the current time according to a first formula;
the server side sends the first time verification code to equipment used by a user; the equipment used by the user is the same as or different from the client;
the server receives a second time verification code sent by the client and calculates a man-machine verification flag value according to a second formula so as to determine whether the man-machine verification of the current login user of the client is successful; the second time verification code is obtained by the client through a verification code input interface provided for the current login user;
the first formula is:
P=3600*h+60*m+s
the second formula is:
Figure FDA0003203568190000021
wherein σ is a value of a human verification flag, P is a first time verification code, h is a number of hours when the time verification code is generated, m is a number of minutes when the time verification code is generated, and s is a number of seconds when the time verification code is generated; p' is a second time verification code; when σ ≠ 1, the human-computer authentication succeeds, and when σ ≠ 1, the human-computer authentication fails.
7. The method for recording data modification state of internet of things based on block chains as claimed in claim 6, wherein after the human-computer verification is passed, the server calculates the modification ending time of the jth file according to the modification starting time and the modification duration of the jth file stored in the internet of things database based on block chains, and the method comprises the following steps:
after the man-machine verification is passed, the server generates a third time verification code corresponding to the current time according to the first formula, and starts timing;
the server side responds to the storage modification instruction of the client side, stops timing and takes the current timing time as the modification duration of the jth file;
the server calculates the modification ending time of the jth file according to a third formula;
wherein the third formula is:
Figure FDA0003203568190000031
in the third formula, thjModifying the time for the end of said jth fileHours in, tm jIs the number of minutes in the end modification time for said jth file, ts jThe number of seconds in the modification time for the end of the jth file; y is a third time verification code; // is the division integer symbol; t isjAnd the modification duration of the jth file at this time is obtained.
8. Thing networking data modification state recording system based on block chain, its characterized in that includes: a client and a server;
the client is used for receiving a data modification instruction input by a user and sending the data modification instruction to the server;
the server side comprises:
the man-machine verification module is used for responding to a data modification instruction of the client and performing man-machine verification on a current login user of the client;
the time recording module is used for calculating the modification ending time of the jth file according to the modification starting time and the modification duration of the jth file stored in the block chain-based Internet of things database at this time after the man-machine verification is passed, and recording the modification time information of the jth file at this time; wherein j is 1,2, …, N is the total number of files stored in the block chain-based internet of things database;
and the marking module is used for screening out modified data in the Internet of things database based on the block chain and marking the modified data.
9. The system for recording a modification status of data of the internet of things based on a blockchain according to claim 8, wherein the marking module is specifically configured to mark modification information on the modified data stored in the database of the internet of things based on a blockchain, so that the modified data is displayed by a device used by a user while the modification information is displayed; wherein the modification information at least comprises modification user information and modification time information; the device used by the user is the same as or different from the client.
10. The system for block chain based internet of things data modification status recording of claim 9, wherein the tagging module is further configured to tag a text format of the modified data into a specified format, so that the modified data is displayed in the specified format by a device used by a user.
CN202110910781.8A 2021-08-10 2021-08-10 Internet of things data modification state recording method and system based on block chain Pending CN113836503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110910781.8A CN113836503A (en) 2021-08-10 2021-08-10 Internet of things data modification state recording method and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110910781.8A CN113836503A (en) 2021-08-10 2021-08-10 Internet of things data modification state recording method and system based on block chain

Publications (1)

Publication Number Publication Date
CN113836503A true CN113836503A (en) 2021-12-24

Family

ID=78963186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110910781.8A Pending CN113836503A (en) 2021-08-10 2021-08-10 Internet of things data modification state recording method and system based on block chain

Country Status (1)

Country Link
CN (1) CN113836503A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344631A (en) * 2018-09-18 2019-02-15 百度在线网络技术(北京)有限公司 The data modification and block verification method, device, equipment and medium of block chain
CN110263015A (en) * 2019-05-07 2019-09-20 深圳壹账通智能科技有限公司 Data source tracing method, device, equipment and readable storage medium storing program for executing based on block chain
CN110309109A (en) * 2019-05-23 2019-10-08 中国平安财产保险股份有限公司 Data monitoring method, device, computer equipment and storage medium
US20200112437A1 (en) * 2018-10-09 2020-04-09 International Business Machines Corporation Certifying authenticity of data modifications
CN112948847A (en) * 2021-02-02 2021-06-11 山东伏羲智库互联网研究院 Data sharing system based on block chain and data correctness verification method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344631A (en) * 2018-09-18 2019-02-15 百度在线网络技术(北京)有限公司 The data modification and block verification method, device, equipment and medium of block chain
US20200112437A1 (en) * 2018-10-09 2020-04-09 International Business Machines Corporation Certifying authenticity of data modifications
CN110263015A (en) * 2019-05-07 2019-09-20 深圳壹账通智能科技有限公司 Data source tracing method, device, equipment and readable storage medium storing program for executing based on block chain
CN110309109A (en) * 2019-05-23 2019-10-08 中国平安财产保险股份有限公司 Data monitoring method, device, computer equipment and storage medium
CN112948847A (en) * 2021-02-02 2021-06-11 山东伏羲智库互联网研究院 Data sharing system based on block chain and data correctness verification method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨波,许丽娟,陈刚: "《电子商务概论 第2版》", 30 September 2017, 北京邮电大学出版社 *

Similar Documents

Publication Publication Date Title
Nikitin et al. {CHAINIAC}: Proactive {Software-Update} transparency via collectively signed skipchains and verified builds
CN109656778B (en) Data acquisition method and device, computer equipment and storage medium
TW201516733A (en) System and method for verifying changes to UEFI authenticated variables
CN111310233A (en) Application interface display method, device, equipment and storage medium
CN112163240A (en) Block chain based distributed government affair architecture unifying method and system
CN109086578A (en) A kind of method that soft ware authorization uses, equipment and storage medium
CN112257086A (en) User privacy data protection method and electronic equipment
CN111274482A (en) Intelligent education system and method based on virtual reality and big data
CN110598375A (en) Data processing method, device and storage medium
CN107147711A (en) Application service update method and device
CN114266033A (en) Verification code generation method and device, verification code login system and electronic equipment
CN114117376A (en) Identity authentication method, method for distributing dynamic password and corresponding equipment
CN113572619B (en) Container cloud mirror image credible implementation method and system based on nottry
CN112101945B (en) Method and system for supervising block chain content
CN115516420A (en) Controllable scope of authentication keys for software updates
CN113836503A (en) Internet of things data modification state recording method and system based on block chain
CN109698974A (en) A kind of method, apparatus, electronic equipment and the medium of display progress
CN111953633A (en) Access control method and access control device based on terminal environment
CN110618989A (en) Information processing method, information processing device and related product
CN114979109A (en) Behavior track detection method and device, computer equipment and storage medium
CN113868628A (en) Signature verification method and device, computer equipment and storage medium
CN116070191A (en) Information processing method and device, storage medium, and program product
CN109698973B (en) Progress updating method and device, electronic equipment and medium
CN114065301A (en) Clock environment credibility verification method, device, equipment and storage medium
CN114491661A (en) Log tamper-proofing method and system based on block chain

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211224