Disclosure of Invention
The invention aims to provide a data analysis system based on a block chain.
The purpose of the invention can be realized by the following technical scheme: a data analysis system based on a block chain comprises a database, a login verification module, a data acquisition module, a data preprocessing module, a data distribution node, a data storage module, a data encryption module and a cloud platform;
the database is used for establishing a data identification string code sequence library;
the data acquisition module is used for acquiring data streams;
the data preprocessing module is used for preprocessing the data acquired by the data acquisition module and acquiring an identification data stream by combining the data identification string code group in the data identification string code sequence library with the data stream;
the data distribution node is used for classifying the data flow according to the property of the data flow;
the data encryption module is used for encrypting and decrypting personal data streams needing to be encrypted, and the data encryption module is used for setting data stream extraction passwords for the data streams needing to be transmitted, so that data encryption and data decryption of the data streams are realized.
Further, the process of establishing the data identification string code sequence library comprises the following steps: establishing a data matching interval in a database through a block chain technology; the data matching interval acquires a data stream through a data acquisition module and uploads the data stream to the data matching interval; establishing a data identification string code sequence library linked with the data matching interval, wherein the data identification string code sequence library is linked with the data matching interval through an index sequence; importing a data identification string code group into a data identification string code sequence library, wherein different data identification string code groups correspond to different data stream length ranges in the actual use process; corresponding sub-index sequences are set for different data string code groups.
Further, the data stream acquisition process includes: building a block chain local area network space, and recording data streams in the local area network space; and marking the types of the acquired data streams, wherein the types of the data streams comprise personal data streams and platform data streams.
Further, the preprocessing process of the data stream comprises: acquiring the type of the data stream, acquiring a platform protocol of the data stream when the data stream is a platform data stream, and uploading the content of the data stream to a data storage module for storage through the platform protocol; when the data stream is the personal data stream, acquiring the data length of the data stream, and marking the data length of the data stream; establishing a temporary data combination interval, uploading a data stream to the data combination interval, linking the data stream with a data identification string code base with the length of the corresponding data stream through an index sequence according to the data length of the data stream, and retrieving a data identification string code group with the corresponding length through a sub-index sequence; and combining the obtained data identification string code group with the data stream in a temporary data combination interval to form the identification data stream.
Further, the classification processing procedure of the data stream includes: acquiring the security requirement of the data stream, and classifying the data stream; acquiring the content of the data stream, judging that the data stream is a conventional personal data stream when the content of the data stream does not contain an encryption instruction, and sending the conventional personal data stream to a data storage module for storage; when the content of the data stream contains an encryption instruction, the data stream is judged to be an encrypted personal data stream, and the encrypted personal data stream is sent to a data encryption module to encrypt the encrypted personal data stream.
Further, the process of data encryption comprises: setting a data stream extraction password for the content of the data stream, and converting the data stream extraction password into a data decoding sequence; combining the obtained data decoding sequence with the identification data stream to form an encrypted data stream; and generating a key according to the encrypted data stream, sending the key to the mobile phone terminal bound by the user, and recording the sending time of the key as t 0.
Further, the data decryption process includes: after a user logs in the system, selecting an encrypted personal data stream to acquire decryption authority; inputting a key in the system, returning to the encrypted personal data stream selection again when the key input by the user is incorrect, and invalidating the key of the data stream when the key input by the user exceeds the preset times of the system, regenerating an information data stream through the steps M1-M3 to extract a password, and then sending the password to the mobile phone terminal bound by the user; when the input key is correct, acquiring a time point t1 of the key input by the user; the duration of obtaining the key is Ty = t1-t0 through t1 and t 0; when Ty is less than or equal to T, the secret key is not expired, and the data stream is decrypted through the secret key; and when Ty is more than T, if the key is overdue, locking the data stream and sending prompt information to the mobile phone terminal bound by the user.
Further, the login verification module is used for registering personal information of a user, the personal information of the user comprises the name, age and sex of the user and a telephone number of real-name authentication, the telephone number of the real-name authentication is set as a login account, and the personal information of the user is uploaded to the data storage module for storage after the user is registered; when a user needs to log in the system, the user can log in the system by verifying the bound mobile phone number, and after the user inputs the mobile phone number, the user can log in the system by inputting the login verification code received by the mobile phone.
The invention has the beneficial effects that: according to the property of the data stream, the data stream is classified, so that the data stream is divided into a platform data stream and a personal data stream, the personal data stream is divided into a conventional personal data stream and an encrypted personal data stream, and then the encrypted personal data stream passes through an encryption module to generate a secret key, so that the processes of data encryption and data decryption of the encrypted personal data stream are completed, the data encryption module only needs to encrypt the data stream needing to be encrypted, the effectiveness of the system for encrypting the data stream is improved, unnecessary data encryption and decryption processes are reduced, and the working efficiency of the system is improved.
Detailed Description
As shown in fig. 1, a data analysis system based on a block chain includes a database, a login verification module, a data acquisition module, a data preprocessing module, a data distribution node, a data storage module, a data encryption module, and a cloud platform;
the login verification module is used for registering personal information of a user, the personal information of the user comprises the name, age and sex of the user and a telephone number of real-name authentication, the telephone number of the real-name authentication is set as a login account, and the personal information of the user is uploaded to the data storage module to be stored after the user registration is finished; when a user needs to log in the system, the user can log in the system by verifying the bound mobile phone number, and after the user inputs the mobile phone number, the user can log in the system by inputting the login verification code received by the mobile phone.
The database is used for establishing a data identification string code sequence library, and specifically comprises the following steps:
step S1: establishing a data matching interval in a database through a block chain technology; the data matching interval acquires a data stream through a data acquisition module and uploads the data stream to the data matching interval;
step S2: establishing a data identification string code sequence library linked with the data matching interval, wherein the data identification string code sequence library is linked with the data matching interval through an index sequence;
step S3: importing a data identification string code group into a data identification string code sequence library, wherein different data identification string code groups correspond to different data stream length ranges in the actual use process;
step S4: corresponding sub-index sequences are set for different data string code groups.
The data acquisition module is used for acquiring data streams, and the specific process comprises the following steps:
step H1: building a block chain local area network space, and recording data streams in the local area network space;
step H2: marking the type of the acquired data stream, wherein the type of the data stream comprises a personal data stream and a platform data stream;
step H3: and sending the data stream obtained by the data acquisition module to a data preprocessing module.
The data preprocessing module is used for preprocessing the data acquired by the data acquisition module, and the specific process comprises the following steps:
step Y1: acquiring the type of the data stream, acquiring a platform protocol of the data stream when the data stream is a platform data stream, and uploading the content of the data stream to a data storage module for storage through the platform protocol;
step Y2: when the data stream is the personal data stream, acquiring the data length of the data stream, and marking the data length of the data stream;
step Y3: establishing a temporary data combination interval, uploading a data stream to the data combination interval, linking the data stream with a data identification string code base with the length of the corresponding data stream through an index sequence according to the data length of the data stream, and retrieving a data identification string code group with the corresponding length through a sub-index sequence;
step Y4: combining the obtained data identification string code group with the data stream in a temporary data combination interval to form an identification data stream;
step Y5: sending the steps Y1-Y4 to a data distribution node, and carrying out classification processing on the data;
the data distribution node is used for classifying the data flow according to the property of the data flow, and the specific process comprises the following steps:
step F1: acquiring the security requirement of the data stream, and classifying the data stream;
step F2: acquiring the content of the data stream, judging that the data stream is a conventional personal data stream when the content of the data stream does not contain an encryption instruction, and sending the conventional personal data stream to a data storage module for storage;
step F3: when the content of the data stream contains an encryption instruction, the data stream is judged to be an encrypted personal data stream, and the encrypted personal data stream is sent to a data encryption module to encrypt the encrypted personal data stream.
The data encryption module is used for encrypting and decrypting personal data streams needing to be encrypted, and data streams needing to be transmitted are set with data stream extraction passwords through the data encryption module, so that data encryption and data decryption of the data streams are realized, and the data encryption process comprises the following steps:
step M1: setting a data stream extraction password for the content of the data stream, and converting the data stream extraction password into a data decoding sequence;
step M2: combining the obtained data decoding sequence with the identification data stream to form an encrypted data stream;
step M3: generating a key according to the encrypted data stream, sending the key to a mobile phone terminal bound by a user, and recording the sending time of the key as t 0;
the data decryption process comprises the following steps:
step P1: after a user logs in the system, selecting an encrypted personal data stream to acquire decryption authority;
step P2: inputting a key in the system, returning to the encrypted personal data stream selection again when the key input by the user is incorrect, and invalidating the key of the data stream when the key input by the user exceeds the preset times of the system, regenerating an information data stream through the steps M1-M3 to extract a password, and then sending the password to the mobile phone terminal bound by the user;
step P3: when the input key is correct, acquiring a time point t1 of the key input by the user; the duration of obtaining the key is Ty = t1-t0 through t1 and t 0; when Ty is less than or equal to T, the secret key is not expired, and the data stream is decrypted through the secret key; and when Ty is more than T, if the key is overdue, locking the data stream and sending prompt information to the mobile phone terminal bound by the user.
It should be further noted that, the data stream is classified according to the nature of the data stream, so that the data stream is divided into the platform data stream and the personal data stream, the personal data stream is divided into the conventional personal data stream and the encrypted personal data stream, and then the encrypted personal data stream is passed through the encryption module to generate the key, thereby completing the processes of data encryption and data decryption of the encrypted personal data stream, so that the data encryption module only needs to encrypt the data stream which needs to be encrypted, thereby improving the effectiveness of the system in encrypting the data stream, reducing the unnecessary processes of data encryption and decryption, and improving the work efficiency of the system.
The foregoing is illustrative and explanatory of the structure of the invention, and various modifications, additions or substitutions in a similar manner to the specific embodiments described may be made by those skilled in the art without departing from the structure or scope of the invention as defined in the claims. Although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the spirit and scope of the present invention.