CN113472871A - Block chain-based Internet of things data integrity judgment method and system - Google Patents

Block chain-based Internet of things data integrity judgment method and system Download PDF

Info

Publication number
CN113472871A
CN113472871A CN202110709964.3A CN202110709964A CN113472871A CN 113472871 A CN113472871 A CN 113472871A CN 202110709964 A CN202110709964 A CN 202110709964A CN 113472871 A CN113472871 A CN 113472871A
Authority
CN
China
Prior art keywords
color
data
temporary storage
things
internet
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.)
Granted
Application number
CN202110709964.3A
Other languages
Chinese (zh)
Other versions
CN113472871B (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.)
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 CN202110709964.3A priority Critical patent/CN113472871B/en
Publication of CN113472871A publication Critical patent/CN113472871A/en
Application granted granted Critical
Publication of CN113472871B publication Critical patent/CN113472871B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/22Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a block chain-based method and a block chain-based system for judging the integrity of data of the Internet of things, which synchronously store the data of the Internet of things through the block chain, the data of the Internet of things stored in the block chain is used as a reference to be compared with the data of the Internet of things stored in the temporary storage terminal of the Internet of things, thus, the difference between the data of the two internet of things is determined, whether the data stored on the temporary storage terminal and the block chain is lost or not and the severity of the data loss are determined according to the difference, and then a corresponding visual reminding message is generated to enable a user to intuitively and timely connect the situation of the data loss, and the data stored in the temporary storage terminal can be processed according to the visual reminding message, so that the data can be comprehensively and effectively verified without paying extra computing power, and the storage integrity and the safety of the data are ensured.

Description

Block chain-based Internet of things data integrity judgment method and system
Technical Field
The invention relates to the technical field of data management of the Internet of things, in particular to a block chain-based method and a block chain-based system for judging the integrity of the data of the Internet of things.
Background
The internet of things is widely applied to distributed storage and reading of data, and a user can read the data at any time and any place on different occasions and at different times through the internet of things. The internet of things is inevitably attacked by the outside in the operation process to cause the stored data to be tampered or lost, which seriously affects the data security of the internet of things. In the prior art, data stored in a temporary storage terminal of the internet of things is detected regularly, so that whether the data stored in the temporary storage terminal is tampered or not is determined, but the data is frequently detected by paying extra computing power, so that the cost of data storage of the internet of things is increased, and the safety of data storage without the internet of things cannot be guaranteed.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a block chain-based method and a block chain-based system for judging the integrity of data of the Internet of things, wherein the method comprises the steps of collecting a data set transmitted by the Internet of things, preprocessing and converting the data set, and storing the data set into a temporary storage terminal of the Internet of things and a block of a block chain; when data needs to be acquired from a temporary storage terminal, comparing a data set read from the temporary storage terminal with a data set read from a block of a block chain, and determining the data symbol difference between the two data sets; then according to the data code element difference, sending a first visual reminding message for representing the data loss degree in the data set stored in the block chain to the user; according to the data code element difference, sending a second visual reminding message representing the low data loss degree in a data set stored by a temporary storage terminal of the Internet of things to the user; determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message; therefore, the method and the system for judging the integrity of the data of the Internet of things in the block chain synchronously store the data of the Internet of things through the block chain, the data of the Internet of things stored in the block chain is used as a reference to be compared with the data of the Internet of things stored in the temporary storage terminal of the Internet of things, thus, the difference between the data of the two internet of things is determined, whether the data stored on the temporary storage terminal and the block chain is lost or not and the severity of the data loss are determined according to the difference, and then a corresponding visual reminding message is generated to enable a user to intuitively and timely connect the situation of the data loss, and the data stored in the temporary storage terminal can be processed according to the visual reminding message, so that the data can be comprehensively and effectively verified without paying extra computing power, and the storage integrity and the safety of the data are ensured.
The invention provides a block chain-based Internet of things data integrity judgment method, which is characterized by comprising the following steps:
step S1, collecting a data set transmitted by the Internet of things, preprocessing and converting the data set, and storing the data set into a temporary storage terminal of the Internet of things and a block of a block chain respectively;
step S2, when data needs to be obtained from the temporary storage terminal, comparing the data set read from the temporary storage terminal with the data set read from the block of the block chain, so as to determine the data symbol difference between the two data sets;
step S3, according to the data code element difference, sending a first visual reminding message for representing the data loss degree in the data set stored in the block chain to the user; sending a second visual reminding message representing the low data loss degree in a data set stored by a temporary storage terminal of the Internet of things to a user according to the data code element difference; determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message;
further, in step S1, the acquiring a data set transmitted by the internet of things, and storing the data set after preprocessing and converting the data set to a temporary storage terminal of the internet of things and a block of a block chain respectively specifically includes:
step S101, collecting a data set transmitted by the Internet of things, simultaneously recording corresponding clock information when the data set is collected, and performing data deduplication processing on the data set;
step S102, determining the starting time and the ending time of the data set according to the clock information, and determining the duration time of the data set; equally dividing the duration into a number of time intervals; dividing the data set subjected to data deduplication processing into a plurality of data subsets corresponding to each time interval;
step S103, after the data contained in each data subset is converted into binary form data, all the data subsets are stored in a temporary storage terminal of the Internet of things and all the data subsets are respectively stored in different blocks of a block chain;
further, in step S2, when data needs to be obtained from the temporary storage terminal, comparing the data set read from the temporary storage terminal with the data set read from the block of the block chain, so as to determine the data symbol difference between the two data sets specifically includes:
when data needs to be acquired from the temporary storage terminal, comparing the data subsets read from the temporary storage terminal with the data subsets read from the blocks of the block chain by using the following formula (1) so as to determine a data symbol difference evaluation value between the two data subsets,
Figure BDA0003133200950000031
in the above formula (1), DnThe method comprises the steps of converting I-bit binary data contained in an nth data subset read from a temporary storage terminal into a polynomial, converting I-bit binary data contained in a data subset read from an nth block of a block chain into the polynomial, and then evaluating a data symbol difference between the two polynomials, wherein I represents the number of binary data bits contained in the nth data subset read from the temporary storage terminal and the number of binary data bits contained in the data subset read from the nth block of the block chain, and Q represents the number of binary data bits contained in the data subset read from the nth block of the block chainniRepresenting the ith bit binary data symbol, W, in a subset of data read from the nth block of the chain of blocksniRepresenting an ith bit binary data code element in an nth data subset read from a temporary storage terminal, and e representing a natural constant;
further, in step S3, according to the data symbol difference, a first visual alert message is sent to the user to indicate that the degree of data loss in the data set stored in the blockchain is low; sending a second visual reminding message representing the low data loss degree in a data set stored by a temporary storage terminal of the Internet of things to a user according to the data code element difference; and determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message specifically comprises:
step S301, displaying a rectangular strip on an interface of a display terminal corresponding to the Internet of things, equally dividing the rectangular strip into a plurality of small rectangular strips, wherein each small rectangular strip corresponds to each block of a block chain one by one, and the total number of the small rectangular strips and the total number of the blocks contained in the block chain are N;
generating an instruction for controlling a color display state of each small rectangular bar according to the data symbol difference evaluation value by using the following formula (2), so that the color state displayed by each small rectangular bar is used as a first visual reminding message,
Figure BDA0003133200950000041
in the above formula (2), SnIndicating the instruction content for controlling the color type of the display of the nth small rectangular bar when SnWhen the value is 0, the display control unit controls the nth small rectangular bar to display the first color, and when the value is SnWhen the color is 1, the display control unit controls the nth small rectangular bar to display the second color, and when the color is SnWhen the color is 2, the display control unit controls the nth small rectangular bar to display the third color, and when the color is SnWhen the color is 3, the display control unit controls the nth small rectangular bar to display the fourth color, and when the color is SnWhen the color is 4, the display control unit controls the nth small rectangular bar to display the fifth color, and when the color is SnWhen the color is 5, the display control unit controls the nth small rectangular bar to display the sixth color, and when the color is SnWhen 6, the display controls the nth small rectangular bar to display the seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color are different from each other, and when the nth small rectangular bar displays the nth small rectangular bar in sequence respectivelyA first color, a second color, a third color, a fourth color, a fifth color, a sixth color, and a seventh color, indicating that the lower the degree of data loss with respect to the data subset stored in the nth tile, e represents a natural constant,
Figure BDA0003133200950000042
represents a sign of a rounding-down operation;
step S302, displaying a circular area on the interface of the display terminal corresponding to the Internet of things, generating an instruction for controlling the color display state of the circular area according to the data code element difference evaluation value by using the following formula (3), so as to take the color state displayed in the circular area as a second visual reminding message,
Figure BDA0003133200950000051
in the above formula (3), Y represents the content of an instruction for controlling the color type of the circular region display, and when Y is 0, it represents that the circular region display a first color, when Y is 1, it represents that the circular region display a second color, when Y is 2, it represents that the circular region display a third color, when Y is 3, it represents that the circular region display a fourth color, when Y is 4, it represents that the circular region display a fifth color, when Y is 5, it represents that the circular region display a sixth color, when Y is 6, it represents that the circular region display a seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color, and the seventh color are different from each other, and when the circular regions respectively display the first color, the second color, the third color, the fourth color, the fifth color, the seventh color, and when the circular regions sequentially display the first color, the second color, the third color, the fourth color, the fifth color, the sixth color, and the seventh color, respectively, The sixth color and the seventh color show that the lower the data loss degree in the data set stored by the temporary storage terminal of the internet of things, N represents the total number of blocks contained in the block chain, e represents a natural constant,
Figure BDA0003133200950000052
represents a sign of a rounding-down operation;
step S303, when the circular area displays any one of the first color, the second color, the third color and the fourth color, deleting all data subsets stored in the temporary storage terminal; when the circular area displays any one of the fifth color, the sixth color and the seventh color, all data subsets stored by the temporary storage terminal are kept.
The invention also provides an internet of things data integrity judgment system based on the block chain, which is characterized by comprising an internet of things data acquisition and storage module, a data comparison module, a block chain data loss determination module, an internet of things temporary storage terminal data loss determination module and an internet of things temporary storage terminal data processing module; wherein the content of the first and second substances,
the data acquisition and storage module of the Internet of things is used for acquiring a data set transmitted by the Internet of things, preprocessing and converting the data set and then respectively storing the data set into a temporary storage terminal of the Internet of things and a block of a block chain;
the data comparison module is used for comparing a data set read from the temporary storage terminal with a data set read from a block of the block chain when data needs to be acquired from the temporary storage terminal, so as to determine the data code element difference between the two data sets;
the block chain data loss determining module is used for sending a first visual reminding message for representing the high and low data loss degree in a data set stored in a block chain to a user according to the data code element difference;
the data loss determining module of the temporary storage terminal of the Internet of things is used for sending a second visual reminding message for representing the low degree of data loss in the data set stored by the temporary storage terminal of the Internet of things to the user according to the data code element difference;
the Internet of things temporary storage terminal data processing module is used for determining whether to delete the data set stored by the temporary storage terminal according to the second visual reminding message;
further, the internet of things data acquisition and storage module is used for acquiring a data set transmitted by the internet of things, and respectively stores the data set after preprocessing and conversion into a temporary storage terminal of the internet of things and a block of a block chain, and the data acquisition and storage module specifically comprises:
collecting a data set transmitted by the Internet of things, simultaneously recording corresponding clock information when the data set is collected, and carrying out data deduplication processing on the data set;
determining the starting time and the ending time of the data set according to the clock information, so as to determine the duration of the data set; equally dividing the duration into a number of time intervals; dividing the data set subjected to data deduplication processing into a plurality of data subsets corresponding to each time interval;
after data contained in each data subset is converted into binary form data, all the data subsets are stored into a temporary storage terminal of the Internet of things and all the data subsets are respectively stored into different blocks of a block chain;
further, the data comparison module is configured to, when data needs to be acquired from the temporary storage terminal, compare a data set read from the temporary storage terminal with a data set read from a block of the block chain, so as to determine a data symbol difference between the two data sets specifically includes:
when data needs to be acquired from the temporary storage terminal, comparing the data subsets read from the temporary storage terminal with the data subsets read from the blocks of the block chain by using the following formula (1) so as to determine a data symbol difference evaluation value between the two data subsets,
Figure BDA0003133200950000061
in the above formula (1), DnThe method comprises the steps of converting I-bit binary data contained in an nth data subset read from a temporary storage terminal into a polynomial, converting I-bit binary data contained in a data subset read from an nth block of a block chain into a polynomial, and evaluating a data symbol difference between the two polynomials, wherein I represents a data symbol difference value read from the temporary storage terminalThe number of binary data bits contained in the nth subset of data and the number of binary data bits, Q, contained in the subset of data read from the nth block of the chain of blocksniRepresenting the ith bit binary data symbol, W, in a subset of data read from the nth block of the chain of blocksniRepresenting an ith bit binary data code element in an nth data subset read from a temporary storage terminal, and e representing a natural constant;
further, the sending, by the blockchain data loss determining module, a first visual alert message representing a high degree of data loss in the data set stored in the blockchain to the user according to the data symbol difference specifically includes:
displaying a rectangular strip on an interface of a display terminal corresponding to the Internet of things, equally dividing the rectangular strip into a plurality of small rectangular strips, wherein each small rectangular strip corresponds to each block of a block chain one by one, and the total number of the small rectangular strips and the total number of the blocks contained in the block chain are N;
generating an instruction for controlling a color display state of each small rectangular bar according to the data symbol difference evaluation value by using the following formula (2), so that the color state displayed by each small rectangular bar is used as a first visual reminding message,
Figure BDA0003133200950000071
in the above formula (2), SnIndicating the instruction content for controlling the color type of the display of the nth small rectangular bar when SnWhen the value is 0, the display control unit controls the nth small rectangular bar to display the first color, and when the value is SnWhen the color is 1, the display control unit controls the nth small rectangular bar to display the second color, and when the color is SnWhen the color is 2, the display control unit controls the nth small rectangular bar to display the third color, and when the color is SnWhen the color is 3, the display control unit controls the nth small rectangular bar to display the fourth color, and when the color is SnWhen the color is 4, the display control unit controls the nth small rectangular bar to display the fifth color, and when the color is SnWhen the color is 5, the display control unit controls the nth small rectangular bar to display the sixth color, and when the color is SnWhen 6, the nth control is smallThe rectangle bars display a seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color are different from each other, and when the nth small rectangle bar sequentially displays the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color, respectively, it indicates that the lower the data loss degree of the data subset stored with the nth block is, e represents a natural constant,
Figure BDA0003133200950000081
represents a sign of a rounding-down operation;
and the number of the first and second groups,
the internet of things temporary storage terminal data loss determining module is used for sending a second visual reminding message which represents that the data loss degree in the data set stored by the temporary storage terminal of the internet of things is low to the user according to the data code element difference, and the second visual reminding message specifically comprises the following steps:
displaying a circular area on an interface of a display terminal corresponding to the Internet of things, generating an instruction for controlling the color display state of the circular area according to the data code element difference evaluation value by using the following formula (3), and taking the color state displayed by the circular area as a second visual reminding message,
Figure BDA0003133200950000082
in the above formula (3), Y represents the content of an instruction for controlling the color type of the circular region display, and when Y is 0, it represents that the circular region display a first color, when Y is 1, it represents that the circular region display a second color, when Y is 2, it represents that the circular region display a third color, when Y is 3, it represents that the circular region display a fourth color, when Y is 4, it represents that the circular region display a fifth color, when Y is 5, it represents that the circular region display a sixth color, when Y is 6, it represents that the circular region display a seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color, and the seventh color are different from each other, so as to be different from each otherAnd when the circular area respectively displays a first color, a second color, a third color, a fourth color, a fifth color, a sixth color and a seventh color in sequence, the lower the data loss degree in the data set stored by the temporary storage terminal of the Internet of things is, N represents the total number of blocks contained in the block chain, e represents a natural constant,
Figure BDA0003133200950000083
represents a sign of a rounding-down operation;
and the number of the first and second groups,
the internet of things temporary storage terminal data processing module is used for determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message, and specifically comprises the following steps:
when the circular area displays any one of a first color, a second color, a third color and a fourth color, deleting all data subsets stored by the temporary storage terminal; when the circular area displays any one of the fifth color, the sixth color and the seventh color, all data subsets stored by the temporary storage terminal are kept.
Compared with the prior art, the method and the system for judging the integrity of the data of the Internet of things based on the block chain synchronously store the data of the Internet of things through the block chain, the data of the Internet of things stored in the block chain is used as a reference to be compared with the data of the Internet of things stored in the temporary storage terminal of the Internet of things, thus, the difference between the data of the two internet of things is determined, whether the data stored on the temporary storage terminal and the block chain is lost or not and the severity of the data loss are determined according to the difference, and then a corresponding visual reminding message is generated to enable a user to intuitively and timely connect the situation of the data loss, and the data stored in the temporary storage terminal can be processed according to the visual reminding message, so that the data can be comprehensively and effectively verified without paying extra computing power, and the storage integrity and the safety of the data are ensured.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
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 schematic flow diagram of a block chain-based internet of things data integrity determination method provided by the invention.
Fig. 2 is a schematic structural diagram of the system for judging the integrity of data of the internet of things based on the block chain provided by the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 schematic flow chart of a block chain-based internet of things data integrity determination method according to an embodiment of the present invention. The block chain-based Internet of things data integrity judgment method comprises the following steps:
step S1, collecting a data set transmitted by the Internet of things, preprocessing and converting the data set, and storing the data set into a temporary storage terminal of the Internet of things and a block of a block chain respectively;
step S2, when data needs to be obtained from the temporary storage terminal, comparing the data set read from the temporary storage terminal with the data set read from the block of the block chain, so as to determine the data symbol difference between the two data sets;
step S3, according to the data code element difference, sending a first visual reminding message for representing the data loss degree in the data set stored in the block chain to the user; according to the data code element difference, sending a second visual reminding message representing the low data loss degree in a data set stored by a temporary storage terminal of the Internet of things to the user; and determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message.
The beneficial effects of the above technical scheme are: the method for judging the integrity of the data of the Internet of things in the block chain synchronously stores the data of the Internet of things through the block chain, the data of the Internet of things stored in the block chain is used as a reference and is compared with the data of the Internet of things stored in a temporary storage terminal of the Internet of things, so that the difference between the data of the two Internet of things is determined, and according to the difference, whether the data stored in the temporary storage terminal and the block chain is lost or not and the severity of the data loss are determined, and then corresponding visual reminding messages are generated to enable a user to be intuitively and timely connected with the condition that the data are lost, and the data stored in the temporary storage terminal can be processed according to the visual reminding messages, so that the data can be comprehensively and effectively verified without paying extra operational capacity, and the storage integrity and the safety of the data are ensured.
Preferably, in step S1, the acquiring a data set transmitted by the internet of things, preprocessing and converting the data set, and storing the data set in a temporary storage terminal of the internet of things and a block of a block chain respectively includes:
step S101, collecting a data set transmitted by the Internet of things, simultaneously recording corresponding clock information when the data set is collected, and performing data deduplication processing on the data set;
step S102, determining the starting time and the ending time of the data set according to the clock information, and determining the duration of the data set; equally dividing the duration into a number of time intervals; dividing the data set subjected to data deduplication processing into a plurality of data subsets corresponding to each time interval;
step S103, after the data contained in each data subset is converted into binary form data, all the data subsets are stored in a temporary storage terminal of the Internet of things and all the data subsets are respectively stored in different blocks of the block chain.
The beneficial effects of the above technical scheme are: the internet of things transmits data among different node terminals in the operation process, and in order to analyze and process the data, the data is collected and stored for subsequent analysis and processing. In the process of collecting the data sets transmitted by the Internet of things, clock information corresponding to the data sets when the data sets are collected is recorded, so that the clock information can be used as marks of the data sets. In addition, the data deduplication processing is carried out on the data set, so that repeated data parts in the data set can be effectively eliminated, and the redundancy of the data set is effectively reduced.
This does not facilitate fast processing of the data sets, as the data sets collected are typically large in size. And the acquired duration of the data set is equally divided into a plurality of time intervals, and each time interval corresponds to a part of data of the data set, so that the data set is divided into data subsets corresponding to each time interval one by one according to the time intervals, and the data quantity of the data subsets is reduced, and the reliability of processing the data subsets is improved. In addition, after the data contained in each data subset is converted into binary form data, the binary form data is synchronously stored in a temporary storage terminal of the Internet of things and different blocks of a block chain for double data backup, wherein the storage of each data subset in the different blocks of the block chain indicates that each block is only used for storing one unique data subset.
Preferably, in step S2, when data needs to be obtained from the temporary storage terminal, comparing the data set read from the temporary storage terminal with the data set read from the tile of the tile chain, so as to determine the data symbol difference between the two data sets specifically includes:
when data needs to be obtained from the temporary storage terminal, comparing the data subset read from the temporary storage terminal with the data subset read from the block of the block chain by using the following formula (1) so as to determine the evaluation value of the data symbol difference between the two data subsets,
Figure BDA0003133200950000121
in the above formula (1), DnThe method comprises the steps of converting I-bit binary data contained in an nth data subset read from a temporary storage terminal into a polynomial, converting I-bit binary data contained in a data subset read from an nth block of a block chain into the polynomial, and then evaluating a data symbol difference between the two polynomials, wherein I represents the number of binary data bits contained in the nth data subset read from the temporary storage terminal and the number of binary data bits contained in the data subset read from the nth block of the block chain, and Q represents the number of binary data bits contained in the data subset read from the nth block of the block chainniRepresenting the ith bit binary data symbol, W, in a subset of data read from the nth block of the chain of blocksniRepresenting the ith bit binary data symbol in the nth data subset read from the temporary storage terminal, and e representing a natural constant.
The beneficial effects of the above technical scheme are: after the data of each data subset is converted into the data in the binary form, the data in the binary form correspondingly comprises a plurality of data code elements in the binary form, the binary form data respectively stored in the temporary storage terminal and each block are compared by using the formula (1), and the binary form data are converted into the polynomial form in the formula (1), so that the data code elements in each binary form can be accurately compared, and the data difference degree between the two data code elements can be conveniently and quantitatively judged.
Preferably, in step S3, according to the data symbol difference, a first visual alert message is sent to the user to indicate that the degree of data loss in the data set stored in the blockchain is low; according to the data code element difference, sending a second visual reminding message representing the low data loss degree in a data set stored by a temporary storage terminal of the Internet of things to the user; and determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message specifically comprises:
step S301, displaying a rectangular strip on an interface of a display terminal corresponding to the Internet of things, equally dividing the rectangular strip into a plurality of small rectangular strips, wherein each small rectangular strip corresponds to each block of a block chain one by one, and the total number of the small rectangular strips and the total number of the blocks contained in the block chain are N;
generating an instruction for controlling a color display state of each small rectangular bar according to the data symbol difference evaluation value by using the following formula (2), thereby using the color state displayed by each small rectangular bar as a first visual reminding message,
Figure BDA0003133200950000131
in the above formula (2), SnIndicating the instruction content for controlling the color type of the display of the nth small rectangular bar when SnWhen the value is 0, the display control unit controls the nth small rectangular bar to display the first color, and when the value is SnWhen the color is 1, the display control unit controls the nth small rectangular bar to display the second color, and when the color is SnWhen the color is 2, the display control unit controls the nth small rectangular bar to display the third color, and when the color is SnWhen the color is 3, the display control unit controls the nth small rectangular bar to display the fourth color, and when the color is SnWhen the color is 4, the display control unit controls the nth small rectangular bar to display the fifth color, and when the color is SnWhen the color is 5, the display control unit controls the nth small rectangular bar to display the sixth color, and when the color is SnWhen 6, the display controls the nth small rectangular bar to display the seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color are different from each other, and when the nth small rectangular bar sequentially displays the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color, respectivelyIndicating that the lower the degree of data loss of the data subset stored with the nth chunk, e represents a natural constant,
Figure BDA0003133200950000132
represents a sign of a rounding-down operation;
step S302, displaying a circular area on the interface of the display terminal corresponding to the Internet of things, generating an instruction for controlling the color display state of the circular area according to the data code element difference evaluation value by using the following formula (3), so as to take the color state displayed by the circular area as a second visual reminding message,
Figure BDA0003133200950000141
in the above formula (3), Y represents the content of an instruction for controlling the color type of the circular region display, and when Y is 0, it represents that the circular region display a first color, when Y is 1, it represents that the circular region display a second color, when Y is 2, it represents that the circular region display a third color, when Y is 3, it represents that the circular region display a fourth color, when Y is 4, it represents that the circular region display a fifth color, when Y is 5, it represents that the circular region display a sixth color, when Y is 6, it represents that the circular region display a seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color, and the seventh color are different from each other, and when the circular regions respectively display the first color, the second color, the third color, the fourth color, the fifth color, the seventh color, and when the circular regions sequentially display the first color, the second color, the third color, the fourth color, the fifth color, the sixth color, and the seventh color, respectively, The sixth color and the seventh color show that the lower the data loss degree in the data set stored by the temporary storage terminal of the internet of things, N represents the total number of blocks contained in the block chain, e represents a natural constant,
Figure BDA0003133200950000142
represents a sign of a rounding-down operation;
step S303, when the circular area displays any one of the first color, the second color, the third color and the fourth color, deleting all data subsets stored in the temporary storage terminal; when the circular area displays any one of the fifth color, the sixth color and the seventh color, all data subsets stored by the temporary storage terminal are kept.
The beneficial effects of the above technical scheme are: by displaying a rectangular strip on an interface of a display terminal corresponding to the internet of things and utilizing the formula (2), the data loss condition of the data subset stored in each block in the block chain can be accurately determined, and the data loss condition is converted into colors used for controlling the display of different small rectangular strips in the rectangular strip, so that a user can quickly and intuitively determine the data loss severity of the data subset stored in each block by directly watching the color of each small rectangular strip. In addition, by displaying the circular area on the interface of the display terminal corresponding to the internet of things and using the formula (3), the data loss condition of the data subset stored in the temporary storage terminal of the internet of things can be determined definitely, and the data loss condition is converted into the color for controlling the circular area to display, so that the user can quickly and intuitively determine the data loss severity of the data subset stored in the temporary storage terminal by directly determining the color of each circular area. Finally, when the circular area displays any one of the first color, the second color, the third color and the fourth color, the situation that the data subset stored in the temporary storage terminal is seriously lost is shown, namely the data subset has serious potential safety hazard, and all the data subsets stored in the temporary storage terminal are deleted, so that the data safety problem of the whole Internet of things can be effectively avoided; when the circular area displays any one of the fifth color, the sixth color and the seventh color, it is indicated that the data loss condition of the data subset stored in the temporary storage terminal is slight, so that the data subset can be restored to the original state through corresponding data restoration, and meanwhile, the data safety hazard to the whole internet of things is avoided.
Fig. 2 is a schematic structural diagram of a system for determining integrity of data of an internet of things based on a block chain according to an embodiment of the present invention. The block chain-based Internet of things data integrity judgment system comprises an Internet of things data acquisition and storage module, a data comparison module, a block chain data loss determination module, an Internet of things temporary storage terminal data loss determination module and an Internet of things temporary storage terminal data processing module; wherein the content of the first and second substances,
the data acquisition and storage module of the Internet of things is used for acquiring a data set transmitted by the Internet of things, preprocessing and converting the data set and then respectively storing the data set into a temporary storage terminal of the Internet of things and a block of a block chain;
the data comparison module is used for comparing a data set read from the temporary storage terminal with a data set read from a block of the block chain when data needs to be acquired from the temporary storage terminal, so as to determine the data code element difference between the two data sets;
the block chain data loss determining module is used for sending a first visual reminding message for representing the high and low data loss degree in a data set stored in a block chain to a user according to the data code element difference;
the data loss determining module of the temporary storage terminal of the Internet of things is used for sending a second visual reminding message for representing the low degree of data loss in the data set stored by the temporary storage terminal of the Internet of things to the user according to the data code element difference;
the data processing module of the temporary storage terminal of the internet of things is used for determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message.
The beneficial effects of the above technical scheme are: this thing networking data integrality judgement system in block chain carries out synchronous storage to thing networking data through the block chain, it utilizes the thing networking data of block chain storage as the reference, compare with the thing networking data of thing networking temporary storage terminal storage, confirm the difference between two thing networking data with this, and according to these differences, confirm whether the data of temporary storage terminal and block chain storage lose and the severity that the data lost, generate corresponding visual warning message then and make the user can connect the condition that the data is lost directly perceivedly and in time, and can also handle the data of temporary storage terminal storage according to visual warning message, also can carry out comprehensive effectual verification to data like this under the condition of need not paying extra operational capability, and guarantee the storage integrality and the security of data.
Preferably, the internet of things data acquisition and storage module is configured to acquire a data set transmitted by the internet of things, and respectively store the data set after preprocessing and conversion into the temporary storage terminal of the internet of things and the block of the block chain specifically includes:
collecting a data set transmitted by the Internet of things, simultaneously recording corresponding clock information when the data set is collected, and carrying out data deduplication processing on the data set;
determining the starting time and the ending time of the data set according to the clock information, so as to determine the duration of the data set; equally dividing the duration into a number of time intervals; dividing the data set subjected to data deduplication processing into a plurality of data subsets corresponding to each time interval;
after the data contained in each data subset is converted into binary form data, all the data subsets are stored into a temporary storage terminal of the Internet of things and all the data subsets are respectively stored into different blocks of a block chain.
The beneficial effects of the above technical scheme are: the internet of things transmits data among different node terminals in the operation process, and in order to analyze and process the data, the data is collected and stored for subsequent analysis and processing. In the process of collecting the data sets transmitted by the Internet of things, clock information corresponding to the data sets when the data sets are collected is recorded, so that the clock information can be used as marks of the data sets. In addition, the data deduplication processing is carried out on the data set, so that repeated data parts in the data set can be effectively eliminated, and the redundancy of the data set is effectively reduced.
This does not facilitate fast processing of the data sets, as the data sets collected are typically large in size. And the acquired duration of the data set is equally divided into a plurality of time intervals, and each time interval corresponds to a part of data of the data set, so that the data set is divided into data subsets corresponding to each time interval one by one according to the time intervals, and the data quantity of the data subsets is reduced, and the reliability of processing the data subsets is improved. In addition, after the data contained in each data subset is converted into binary form data, the binary form data is synchronously stored in a temporary storage terminal of the Internet of things and different blocks of a block chain for double data backup, wherein the storage of each data subset in the different blocks of the block chain indicates that each block is only used for storing one unique data subset.
Preferably, the data comparing module is configured to, when data needs to be acquired from the temporary storage terminal, compare the data set read from the temporary storage terminal with the data set read from the block of the block chain, so as to determine the data symbol difference between the two data sets specifically includes:
when data needs to be obtained from the temporary storage terminal, comparing the data subset read from the temporary storage terminal with the data subset read from the block of the block chain by using the following formula (1) so as to determine the evaluation value of the data symbol difference between the two data subsets,
Figure BDA0003133200950000171
in the above formula (1), DnThe method comprises the steps of converting I-bit binary data contained in an nth data subset read from a temporary storage terminal into a polynomial, converting I-bit binary data contained in a data subset read from an nth block of a block chain into the polynomial, and then evaluating a data symbol difference between the two polynomials, wherein I represents the number of binary data bits contained in the nth data subset read from the temporary storage terminal and the number of binary data bits contained in the data subset read from the nth block of the block chain, and Q represents the number of binary data bits contained in the data subset read from the nth block of the block chainniRepresenting the ith bit binary data symbol, W, in a subset of data read from the nth block of the chain of blocksniIndicating the nth number read from the register terminalThe ith bit binary data symbol in the data subset, e represents a natural constant.
The beneficial effects of the above technical scheme are: after the data of each data subset is converted into the data in the binary form, the data in the binary form correspondingly comprises a plurality of data code elements in the binary form, the binary form data respectively stored in the temporary storage terminal and each block are compared by using the formula (1), and the binary form data are converted into the polynomial form in the formula (1), so that the data code elements in each binary form can be accurately compared, and the data difference degree between the two data code elements can be conveniently and quantitatively judged.
Preferably, the block chain data loss determining module is configured to send, to the user according to the data symbol difference, a first visual alert message that represents that the degree of data loss in the data set stored in the block chain is low, specifically including:
displaying a rectangular strip on an interface of a display terminal corresponding to the Internet of things, equally dividing the rectangular strip into a plurality of small rectangular strips, wherein each small rectangular strip corresponds to each block of a block chain one by one, and the total number of the small rectangular strips and the total number of the blocks contained in the block chain are N;
generating an instruction for controlling a color display state of each small rectangular bar according to the data symbol difference evaluation value by using the following formula (2), thereby using the color state displayed by each small rectangular bar as a first visual reminding message,
Figure BDA0003133200950000181
in the above formula (2), SnIndicating the instruction content for controlling the color type of the display of the nth small rectangular bar when SnWhen the value is 0, the display control unit controls the nth small rectangular bar to display the first color, and when the value is SnWhen the color is 1, the display control unit controls the nth small rectangular bar to display the second color, and when the color is SnWhen the color is 2, the display control unit controls the nth small rectangular bar to display the third color, and when the color is SnWhen 3, the nth small rectangle is controlledThe bar shows the fourth color when SnWhen the color is 4, the display control unit controls the nth small rectangular bar to display the fifth color, and when the color is SnWhen the color is 5, the display control unit controls the nth small rectangular bar to display the sixth color, and when the color is SnWhen 6, the nth small rectangular bar is controlled to display a seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color are different from each other, and when the nth small rectangular bar sequentially displays the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color, respectively, the lower the degree of data loss of the data subset stored with the nth tile is indicated, e represents a natural constant,
Figure BDA0003133200950000191
represents a sign of a rounding-down operation;
and the number of the first and second groups,
the internet of things temporary storage terminal data loss determining module is used for sending a second visual reminding message for representing the low data loss degree in the data set stored by the temporary storage terminal of the internet of things to the user according to the data code element difference, and specifically comprises the following steps:
displaying a circular area on an interface of a display terminal corresponding to the Internet of things, generating an instruction for controlling the color display state of the circular area according to the data code element difference evaluation value by using the following formula (3), and taking the color state displayed by the circular area as a second visual reminding message,
Figure BDA0003133200950000192
in the above formula (3), Y indicates the content of an instruction for controlling the color type of the circular area display, and when Y is 0, it indicates that the circular area display the first color, when Y is 1, it indicates that the circular area display the second color, when Y is 2, it indicates that the circular area display the third color, when Y is 3, it indicates that the circular area display the fourth color, when Y is 4, it indicates that the circular area display the fifth color, and when Y is 5, it indicates that the circular area display the fifth colorThe circular area displays a sixth color, when Y is 6, the circular area is controlled to display a seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color are different from each other, and when the circular area sequentially displays the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color respectively, the lower the data loss degree in the data set stored by the temporary storage terminal of the Internet of things is indicated, N represents the total number of blocks contained in the block chain, e represents a natural constant,
Figure BDA0003133200950000193
represents a sign of a rounding-down operation;
and the number of the first and second groups,
the internet of things temporary storage terminal data processing module is used for determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message, and specifically comprises the following steps:
when the circular area displays any one of the first color, the second color, the third color and the fourth color, deleting all data subsets stored in the temporary storage terminal; when the circular area displays any one of the fifth color, the sixth color and the seventh color, all data subsets stored by the temporary storage terminal are kept.
The beneficial effects of the above technical scheme are: by displaying a rectangular strip on an interface of a display terminal corresponding to the internet of things and utilizing the formula (2), the data loss condition of the data subset stored in each block in the block chain can be accurately determined, and the data loss condition is converted into colors used for controlling the display of different small rectangular strips in the rectangular strip, so that a user can quickly and intuitively determine the data loss severity of the data subset stored in each block by directly watching the color of each small rectangular strip. In addition, by displaying the circular area on the interface of the display terminal corresponding to the internet of things and using the formula (3), the data loss condition of the data subset stored in the temporary storage terminal of the internet of things can be determined definitely, and the data loss condition is converted into the color for controlling the circular area to display, so that the user can quickly and intuitively determine the data loss severity of the data subset stored in the temporary storage terminal by directly determining the color of each circular area. Finally, when the circular area displays any one of the first color, the second color, the third color and the fourth color, the situation that the data subset stored in the temporary storage terminal is seriously lost is shown, namely the data subset has serious potential safety hazard, and all the data subsets stored in the temporary storage terminal are deleted, so that the data safety problem of the whole Internet of things can be effectively avoided; when the circular area displays any one of the fifth color, the sixth color and the seventh color, it is indicated that the data loss condition of the data subset stored in the temporary storage terminal is slight, so that the data subset can be restored to the original state through corresponding data restoration, and meanwhile, the data safety hazard to the whole internet of things is avoided.
From the content of the above embodiments, the method and system for judging the integrity of the data of the internet of things based on the block chain synchronously store the data of the internet of things through the block chain, the data of the Internet of things stored in the block chain is used as a reference to be compared with the data of the Internet of things stored in the temporary storage terminal of the Internet of things, thus, the difference between the data of the two internet of things is determined, whether the data stored on the temporary storage terminal and the block chain is lost or not and the severity of the data loss are determined according to the difference, and then a corresponding visual reminding message is generated to enable a user to intuitively and timely connect the situation of the data loss, and the data stored in the temporary storage terminal can be processed according to the visual reminding message, so that the data can be comprehensively and effectively verified without paying extra computing power, and the storage integrity and the safety of the data are ensured.
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)

1. The block chain-based Internet of things data integrity judgment method is characterized by comprising the following steps:
step S1, collecting a data set transmitted by the Internet of things, preprocessing and converting the data set, and storing the data set into a temporary storage terminal of the Internet of things and a block of a block chain respectively;
step S2, when data needs to be obtained from the temporary storage terminal, comparing the data set read from the temporary storage terminal with the data set read from the block of the block chain, so as to determine the data symbol difference between the two data sets;
step S3, according to the data code element difference, sending a first visual reminding message for representing the data loss degree in the data set stored in the block chain to the user; sending a second visual reminding message representing the low data loss degree in a data set stored by a temporary storage terminal of the Internet of things to a user according to the data code element difference; and determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message.
2. The block chain based internet of things data integrity judgment method of claim 1, wherein:
in step S1, the acquiring a data set transmitted by the internet of things, and storing the data set after preprocessing and converting the data set into a temporary storage terminal of the internet of things and a block of a block chain respectively specifically includes:
step S101, collecting a data set transmitted by the Internet of things, simultaneously recording corresponding clock information when the data set is collected, and performing data deduplication processing on the data set;
step S102, determining the starting time and the ending time of the data set according to the clock information, and determining the duration time of the data set; equally dividing the duration into a number of time intervals; dividing the data set subjected to data deduplication processing into a plurality of data subsets corresponding to each time interval;
step S103, after the data contained in each data subset is converted into binary form data, all the data subsets are stored in a temporary storage terminal of the Internet of things and all the data subsets are respectively stored in different blocks of the block chain.
3. The block chain based internet of things data integrity judgment method as claimed in claim 2, wherein:
in step S2, when data needs to be obtained from the temporary storage terminal, comparing the data set read from the temporary storage terminal with the data set read from the block of the block chain, so as to determine the data symbol difference between the two data sets specifically includes:
when data needs to be acquired from the temporary storage terminal, comparing the data subsets read from the temporary storage terminal with the data subsets read from the blocks of the block chain by using the following formula (1) so as to determine a data symbol difference evaluation value between the two data subsets,
Figure FDA0003133200940000021
in the above formula (1), DnThe method comprises the steps of converting I-bit binary data contained in an nth data subset read from a temporary storage terminal into a polynomial, converting I-bit binary data contained in a data subset read from an nth block of a block chain into the polynomial, and then evaluating a data symbol difference between the two polynomials, wherein I represents the number of binary data bits contained in the nth data subset read from the temporary storage terminal and the number of binary data bits contained in the data subset read from the nth block of the block chain, and Q represents the number of binary data bits contained in the data subset read from the nth block of the block chainniRepresenting the ith bit binary data symbol, W, in a subset of data read from the nth block of the chain of blocksniRepresenting the ith bit binary data code in the nth data subset read from the temporary storage terminalThe element, e, represents a natural constant.
4. The block chain based internet of things data integrity judgment method as claimed in claim 3, wherein:
in step S3, according to the data symbol difference, sending a first visual alert message to a user, where the first visual alert message represents that the degree of data loss in the data set stored in the blockchain is high or low; sending a second visual reminding message representing the low data loss degree in a data set stored by a temporary storage terminal of the Internet of things to a user according to the data code element difference; and determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message specifically comprises:
step S301, displaying a rectangular strip on an interface of a display terminal corresponding to the Internet of things, equally dividing the rectangular strip into a plurality of small rectangular strips, wherein each small rectangular strip corresponds to each block of a block chain one by one, and the total number of the small rectangular strips and the total number of the blocks contained in the block chain are N;
generating an instruction for controlling a color display state of each small rectangular bar according to the data symbol difference evaluation value by using the following formula (2), so that the color state displayed by each small rectangular bar is used as a first visual reminding message,
Figure FDA0003133200940000031
in the above formula (2), SnIndicating the instruction content for controlling the color type of the display of the nth small rectangular bar when SnWhen the value is 0, the display control unit controls the nth small rectangular bar to display the first color, and when the value is SnWhen the color is 1, the display control unit controls the nth small rectangular bar to display the second color, and when the color is SnWhen the color is 2, the display control unit controls the nth small rectangular bar to display the third color, and when the color is SnWhen the color is 3, the display control unit controls the nth small rectangular bar to display the fourth color, and when the color is SnWhen the color is 4, the display control unit controls the nth small rectangular bar to display the fifth color, and when the color is SnWhen it is 5, it means to control the nthThe small rectangular bar shows the sixth color when SnWhen 6, the nth small rectangular bar is controlled to display a seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color are different from each other, and when the nth small rectangular bar sequentially displays the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color, respectively, the lower the degree of data loss of the data subset stored with the nth tile is indicated, e represents a natural constant,
Figure FDA0003133200940000032
represents a sign of a rounding-down operation;
step S302, displaying a circular area on the interface of the display terminal corresponding to the Internet of things, generating an instruction for controlling the color display state of the circular area according to the data code element difference evaluation value by using the following formula (3), so as to take the color state displayed in the circular area as a second visual reminding message,
Figure FDA0003133200940000041
in the above formula (3), Y represents the content of an instruction for controlling the color type of the circular region display, and when Y is 0, it represents that the circular region display a first color, when Y is 1, it represents that the circular region display a second color, when Y is 2, it represents that the circular region display a third color, when Y is 3, it represents that the circular region display a fourth color, when Y is 4, it represents that the circular region display a fifth color, when Y is 5, it represents that the circular region display a sixth color, when Y is 6, it represents that the circular region display a seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color, and the seventh color are different from each other, and when the circular regions respectively display the first color, the second color, the third color, the fourth color, the fifth color, the seventh color, and when the circular regions sequentially display the first color, the second color, the third color, the fourth color, the fifth color, the sixth color, and the seventh color, respectively, When the color is the sixth color and the seventh color, the data stored by the temporary storage terminal of the Internet of things are shownThe lower the degree of data loss in the set, N represents the total number of blocks contained by the block chain, e represents a natural constant,
Figure FDA0003133200940000042
represents a sign of a rounding-down operation;
step S303, when the circular area displays any one of the first color, the second color, the third color and the fourth color, deleting all data subsets stored in the temporary storage terminal; when the circular area displays any one of the fifth color, the sixth color and the seventh color, all data subsets stored by the temporary storage terminal are kept.
5. The system for judging the integrity of the data of the Internet of things based on the block chain is characterized by comprising an Internet of things data acquisition and storage module, a data comparison module, a block chain data loss determination module, an Internet of things temporary storage terminal data loss determination module and an Internet of things temporary storage terminal data processing module; the data acquisition and storage module of the Internet of things is used for acquiring a data set transmitted by the Internet of things, preprocessing and converting the data set and then respectively storing the data set into a temporary storage terminal of the Internet of things and a block of a block chain;
the data comparison module is used for comparing a data set read from the temporary storage terminal with a data set read from a block of the block chain when data needs to be acquired from the temporary storage terminal, so as to determine the data code element difference between the two data sets;
the block chain data loss determining module is used for sending a first visual reminding message for representing the high and low data loss degree in a data set stored in a block chain to a user according to the data code element difference;
the data loss determining module of the temporary storage terminal of the Internet of things is used for sending a second visual reminding message for representing the low degree of data loss in the data set stored by the temporary storage terminal of the Internet of things to the user according to the data code element difference;
and the Internet of things temporary storage terminal data processing module is used for determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message.
6. The system of claim 5, wherein the system comprises:
the internet of things data acquisition and storage module is used for acquiring a data set transmitted by the internet of things, preprocessing and converting the data set, and then respectively storing the data set into a temporary storage terminal of the internet of things and a block of a block chain, and specifically comprises the following steps:
collecting a data set transmitted by the Internet of things, simultaneously recording corresponding clock information when the data set is collected, and carrying out data deduplication processing on the data set;
determining the starting time and the ending time of the data set according to the clock information, so as to determine the duration of the data set; equally dividing the duration into a number of time intervals; dividing the data set subjected to data deduplication processing into a plurality of data subsets corresponding to each time interval;
after the data contained in each data subset is converted into binary form data, all the data subsets are stored into a temporary storage terminal of the Internet of things and all the data subsets are respectively stored into different blocks of a block chain.
7. The system of claim 6, wherein the system comprises:
the data comparison module is configured to, when data needs to be acquired from the temporary storage terminal, compare a data set read from the temporary storage terminal with a data set read from a block of the block chain, so as to determine a data symbol difference between the two data sets, specifically including:
when data needs to be acquired from the temporary storage terminal, comparing the data subsets read from the temporary storage terminal with the data subsets read from the blocks of the block chain by using the following formula (1) so as to determine a data symbol difference evaluation value between the two data subsets,
Figure FDA0003133200940000061
in the above formula (1), DnThe method comprises the steps of converting I-bit binary data contained in an nth data subset read from a temporary storage terminal into a polynomial, converting I-bit binary data contained in a data subset read from an nth block of a block chain into the polynomial, and then evaluating a data symbol difference between the two polynomials, wherein I represents the number of binary data bits contained in the nth data subset read from the temporary storage terminal and the number of binary data bits contained in the data subset read from the nth block of the block chain, and Q represents the number of binary data bits contained in the data subset read from the nth block of the block chainniRepresenting the ith bit binary data symbol, W, in a subset of data read from the nth block of the chain of blocksniRepresenting the ith bit binary data symbol in the nth data subset read from the temporary storage terminal, and e representing a natural constant.
8. The system of claim 7, wherein the system comprises:
the block chain data loss determining module is configured to send, to a user according to the data symbol difference, a first visual alert message that represents a high or low degree of data loss in a data set stored in a block chain, and specifically includes:
displaying a rectangular strip on an interface of a display terminal corresponding to the Internet of things, equally dividing the rectangular strip into a plurality of small rectangular strips, wherein each small rectangular strip corresponds to each block of a block chain one by one, and the total number of the small rectangular strips and the total number of the blocks contained in the block chain are N;
generating an instruction for controlling a color display state of each small rectangular bar according to the data symbol difference evaluation value by using the following formula (2), so that the color state displayed by each small rectangular bar is used as a first visual reminding message,
Figure FDA0003133200940000071
in the above formula (2), SnIndicating the instruction content for controlling the color type of the display of the nth small rectangular bar when SnWhen the value is 0, the display control unit controls the nth small rectangular bar to display the first color, and when the value is SnWhen the color is 1, the display control unit controls the nth small rectangular bar to display the second color, and when the color is SnWhen the color is 2, the display control unit controls the nth small rectangular bar to display the third color, and when the color is SnWhen the color is 3, the display control unit controls the nth small rectangular bar to display the fourth color, and when the color is SnWhen the color is 4, the display control unit controls the nth small rectangular bar to display the fifth color, and when the color is SnWhen the color is 5, the display control unit controls the nth small rectangular bar to display the sixth color, and when the color is SnWhen 6, the nth small rectangular bar is controlled to display a seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color are different from each other, and when the nth small rectangular bar sequentially displays the first color, the second color, the third color, the fourth color, the fifth color, the sixth color and the seventh color, respectively, the lower the degree of data loss of the data subset stored with the nth tile is indicated, e represents a natural constant,
Figure FDA0003133200940000072
represents a sign of a rounding-down operation; and the number of the first and second groups,
the internet of things temporary storage terminal data loss determining module is used for sending a second visual reminding message which represents that the data loss degree in the data set stored by the temporary storage terminal of the internet of things is low to the user according to the data code element difference, and the second visual reminding message specifically comprises the following steps:
displaying a circular area on an interface of a display terminal corresponding to the Internet of things, generating an instruction for controlling the color display state of the circular area according to the data code element difference evaluation value by using the following formula (3), and taking the color state displayed by the circular area as a second visual reminding message,
Figure FDA0003133200940000081
in the above formula (3), Y represents the content of an instruction for controlling the color type of the circular region display, and when Y is 0, it represents that the circular region display a first color, when Y is 1, it represents that the circular region display a second color, when Y is 2, it represents that the circular region display a third color, when Y is 3, it represents that the circular region display a fourth color, when Y is 4, it represents that the circular region display a fifth color, when Y is 5, it represents that the circular region display a sixth color, when Y is 6, it represents that the circular region display a seventh color, and the first color, the second color, the third color, the fourth color, the fifth color, the sixth color, and the seventh color are different from each other, and when the circular regions respectively display the first color, the second color, the third color, the fourth color, the fifth color, the seventh color, and when the circular regions sequentially display the first color, the second color, the third color, the fourth color, the fifth color, the sixth color, and the seventh color, respectively, The sixth color and the seventh color show that the lower the data loss degree in the data set stored by the temporary storage terminal of the internet of things, N represents the total number of blocks contained in the block chain, e represents a natural constant,
Figure FDA0003133200940000082
represents a sign of a rounding-down operation;
and the number of the first and second groups,
the internet of things temporary storage terminal data processing module is used for determining whether to delete the data set stored in the temporary storage terminal according to the second visual reminding message, and specifically comprises the following steps:
when the circular area displays any one of a first color, a second color, a third color and a fourth color, deleting all data subsets stored by the temporary storage terminal; when the circular area displays any one of the fifth color, the sixth color and the seventh color, all data subsets stored by the temporary storage terminal are kept.
CN202110709964.3A 2021-06-25 2021-06-25 Block chain-based Internet of things data integrity judgment method and system Active CN113472871B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110709964.3A CN113472871B (en) 2021-06-25 2021-06-25 Block chain-based Internet of things data integrity judgment method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110709964.3A CN113472871B (en) 2021-06-25 2021-06-25 Block chain-based Internet of things data integrity judgment method and system

Publications (2)

Publication Number Publication Date
CN113472871A true CN113472871A (en) 2021-10-01
CN113472871B CN113472871B (en) 2022-08-19

Family

ID=77872884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110709964.3A Active CN113472871B (en) 2021-06-25 2021-06-25 Block chain-based Internet of things data integrity judgment method and system

Country Status (1)

Country Link
CN (1) CN113472871B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106856464A (en) * 2015-12-09 2017-06-16 上海和辉光电有限公司 A kind of sync symbols detecting system
US20200259633A1 (en) * 2017-10-24 2020-08-13 Copa Fin Limited Data storage and verification
CN112486736A (en) * 2020-12-28 2021-03-12 山西中液互联能源有限公司 Block chain based data backup system and backup method
CN112800016A (en) * 2020-12-31 2021-05-14 武汉思普崚技术有限公司 Log data classification and sorting method and device
CN112926085A (en) * 2021-03-05 2021-06-08 合肥都市链情商务有限公司 Database data storage and tamper-proof system and method based on block chain contract

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106856464A (en) * 2015-12-09 2017-06-16 上海和辉光电有限公司 A kind of sync symbols detecting system
US20200259633A1 (en) * 2017-10-24 2020-08-13 Copa Fin Limited Data storage and verification
CN112486736A (en) * 2020-12-28 2021-03-12 山西中液互联能源有限公司 Block chain based data backup system and backup method
CN112800016A (en) * 2020-12-31 2021-05-14 武汉思普崚技术有限公司 Log data classification and sorting method and device
CN112926085A (en) * 2021-03-05 2021-06-08 合肥都市链情商务有限公司 Database data storage and tamper-proof system and method based on block chain contract

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
关广超: "短波软件接收机数字模块的设计与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 *

Also Published As

Publication number Publication date
CN113472871B (en) 2022-08-19

Similar Documents

Publication Publication Date Title
CN108444727B (en) Vehicle remote monitoring method, monitoring device and monitoring system
CN105808759B (en) Data preprocessing method and system for track mining
CN111629165B (en) Alarm video processing method, device, equipment and storage medium
CN111444067A (en) Rule engine-based configuration system monitoring method, device and equipment
CN111915122A (en) Data monitoring method, device, equipment and storage medium
CN112835776A (en) Page event reproduction method, page event acquisition method, page event reproduction device and electronic equipment
CN104965999A (en) Analysis and integration method and device for sequencing of medium-short gene segment
CN111522859A (en) Alarm analysis method and device, computer equipment and storage medium
CN115186502A (en) Vehicle abnormal data identification method and device, electronic device and storage medium
CN113472871B (en) Block chain-based Internet of things data integrity judgment method and system
CN114500574A (en) Monitoring method, device and medium for improving grain depot safety based on block chain
CN115808622A (en) Battery fault identification method, device, equipment and storage medium
CN112285478A (en) Method and device for detecting vehicle quiescent current, medium, equipment and vehicle
EP4339822A1 (en) Document processing method, apparatus and device, and medium
CN110562296A (en) LKJ (LKJ series-control) based running file data continuous fluctuation abnormity identification method
CN114572005B (en) Vehicle mileage backup method and terminal equipment
CN116014901B (en) Method for monitoring working state of power transmission and transformation equipment based on digital twin technology
CN112069387A (en) Internet event propagation outbreak prediction method and device, electronic equipment and medium
CN110942591A (en) Driving safety reminding system and method
CN116887340B (en) Real-time pushing system for short message status report
CN114706871B (en) Data monitoring method and system based on comprehensive monitoring management
CN110298935B (en) Method for acquiring user operation habit information, diagnosis equipment and server
JP4758330B2 (en) Power plant operating history data management device
JP2009282737A (en) Facility information management device
CN117572852A (en) Vehicle component fault analysis method, device, equipment, medium and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant