System and method for detecting data transmission safety in block chain scene
Technical Field
The invention relates to the field of data security, in particular to a system and a method for detecting data transmission security in a block chain scene.
Background
Data transmission is a communication process in which data is transferred from one place to another. Data transmission systems typically consist of a transmission channel and data circuit termination devices at both ends of the channel, and in some cases multiplexing devices at both ends of the channel. The transmission channel may be a dedicated communication channel or may be provided by a data switching network, a telephone switching network or other type of switching network. The input/output devices of the data transmission system are terminals or computers, collectively called data terminal devices, which transmit data information, typically a combination of letters, numbers and symbols, and in order to transmit the data information, each letter, number or symbol is represented by a binary code.
The security of data transmission refers to effectively preventing database damage or data loss phenomenon caused by man-made misoperation, program defect, virus or hacker in the data transmission process, and some sensitive or confidential data may not be read by qualified personnel or operators, thereby causing data disclosure and other consequences.
Disclosure of Invention
The invention aims to provide a data transmission safety detection system and method in a blockchain scene, so as to solve the problems in the background technology.
In order to solve the technical problems, the invention provides the following technical scheme: a data transmission security detection system in a blockchain scenario, comprising: the system comprises a monitoring data acquisition module, a monitoring data analysis module, a data encryption module, a data storage module, a data decryption module and an encryption information comparison module, wherein the monitoring data acquisition module is used for reading monitoring data, the monitoring data analysis module is used for analyzing the monitoring data, the data encryption module is used for encrypting the data, the data storage module is used for storing target data, the data decryption module is used for processing passwords input during decoding and decrypting the data, and the encryption information detection module is used for comparing the transmitted data with the data before transmission.
Further, the monitoring data acquisition module is used for acquiring monitoring data needing to be analyzed; the monitoring data analysis module comprises a face analysis module, an observation analysis module and a sight line analysis module, wherein the face analysis module is used for obtaining a monitoring data through the formula of A=S 1 the/S analyzes the face shielding rate of the person in monitoring,
wherein A represents the face shielding rate of the person T in monitoring and S 1 The method comprises the steps that the area of a face of a person T in monitoring is shielded, S represents the total area of the face of the person T in monitoring, and the person T represents any person in monitoring data;
when there is no complete positive face image of the person T in the monitoring, the method is represented by the formula a= (S-S 2 ) Analysis of the face occlusion rate of the person under monitoring is performed by a/alpha S,
wherein A represents the face shielding rate of the person T in monitoring and S 2 Representing the exposure of the face of the person T in monitoringS represents the total area of the face of the person T in monitoring, alpha represents the slope of the face image of the person T in monitoring relative to the complete positive face image, and when the face shielding rate A of the person T in monitoring exceeds a threshold value, all monitoring data of the person T are transmitted to an observation analysis module;
the observation analysis module is used for obtaining the formula b=t 1 T to analyze the head and eye movements of the person T under monitoring,
wherein B represents the observation index of the person T in monitoring, T 1 The time when the sight line of the person T is concentrated in a place beyond the counter is represented, T represents the total time when the person T enters the monitoring area, and when B reaches a threshold value, all monitoring data of the B are transmitted to the sight line analysis module;
the sight line analysis module is used for passing the formula beta= { (L) White color -L Label (C) )/L E }/(L Label (C) /L E ) Analyzing the sight line position of the person T in monitoring by x 60 DEG to determine the angle of the sight line deviating from the median position, wherein beta represents the angle of the sight line deviating from the median position of the sight line, L White color Represents the white length of one side of the lateral midline of the eye, which is close to the camera, L Label (C) Representing the white length of the side of the lateral midline of the eye, which is close to the camera, when the eye is in front of the front view, L E Represents the lateral midline length of the eye; when beta is a negative number, the sight line of the person T is deflected to the direction of the monitoring camera, and when beta is a positive number, the sight line of the person T is deflected to the direction away from the monitoring camera;
and determining the position of the sight line of the person T through the angle beta of the sight line of the person T deviated from the central position of the sight line, marking the key position, and uploading the monitoring data to the block chain link point and sending the early warning information to the system when the superposition time of the position of the sight line of the person T and the key position exceeds a dangerous threshold value. The method is characterized in that 60 degrees are half of the effective visual field range of eyes, considering that the monitoring camera cannot shoot the front image of the complete person T every time, half of the effective visual field range is selected for analysis, because eyes are irregularly shaped, the length of the transverse middle line of the eyes is selected, the length of the white of the eyes is approximately equal to the circumferential length of eyeballs and the white of the eyes, the important positions comprise the positions of the monitoring camera, the positions of the safety channels and the positions of alarm buttons, and the danger can be predicted in advance and the risk is reduced by predicting whether the person T has illegal intention or not through the face shielding rate of the person T and the times of observing the positions of the important points.
Further, the data encryption module comprises a dynamic password module and a hash operation module, wherein the dynamic password module is used for encrypting and protecting data, and the hash operation module is used for carrying out hash operation on the data to obtain an original hash value. The data is protected through the dynamic password module, the safety of data transmission is greatly enhanced, the data is recorded by using the hash algorithm, when the data is changed, the obtained hash values are quite different, the data cannot be pushed back from the hash values, and the safety of the front data and the rear data is ensured.
Further, the dynamic password module comprises an IP information acquisition module, a real-time information reading module and a dynamic password production module, wherein the IP information acquisition module is used for acquiring the IP address of the decryption device, the real-time information reading module is used for acquiring weather information of the actual position of the IP address of the decryption device and time information during decryption, and the dynamic password production module is used for producing a dynamic password through the IP address of the decryption device, the weather information of the actual position of the IP address of the decryption device and the time information during decryption. The three information of the IP address, the weather information and the time information are used as the decrypted passwords, so that the randomness of the passwords can be greatly improved, the difficulty of decrypting the passwords is improved, the safety of data is improved, weather can be used as the passwords, and other random characteristics can be selected as the passwords, such as the regional population number and the regional school number.
Further, the data storage module is configured to store information to be stored in the blockchain node. By storing the data through the blockchain, the security of the data is greatly improved due to the decentralization characteristic of the blockchain, so that the privacy of a client can be better protected, the client can only see when the monitoring is called, and the possibility of falsifying and deleting the monitored data is reduced.
Further, the data decryption module is configured to perform hash operation on the password input during decoding to obtain a dynamic password hash value, and use the dynamic password hash value as encryption of second dynamic password unlock data. And encrypting the dynamic password by using a hash algorithm to prevent password data from being stolen.
And the encryption information comparison module performs hash operation on the data after obtaining the data after unlocking the encryption to obtain a detection hash value, and compares the detection hash value with the original hash value.
Further, a data transmission security detection method in a blockchain scenario, applied to a data transmission security detection system in a blockchain scenario as set forth in any one of claims 1 to 4, is characterized by comprising the steps of:
s1: acquiring monitoring data and analyzing the monitoring data;
s2: encrypting and protecting data by using a dynamic password;
s3: carrying out hash operation on the data by using a hash algorithm to obtain an original hash value;
s4: storing the information to be stored in the blockchain node;
s5: carrying out hash operation on the password input during decoding to obtain a dynamic password hash value, and taking the dynamic password hash value as encryption of second dynamic password unlocking data;
s6: after the data after the encryption is released is obtained, carrying out hash operation on the data to obtain a detection hash value, and comparing the detection hash value with an original hash value.
Further, the step S1 includes the following steps:
s101: acquiring monitoring data;
s102: acquiring area S of blocked face of person T in monitoring 1 The total face area S of the person T in monitoring;
s103: calculating the face shielding rate A of the person T in monitoring;
s104: when the complete face image of the person T does not exist in the monitoring, acquiring the exposed area S of the face of the person T in the monitoring 2 Acquiring the total face area S of the person T in monitoring and acquiring the face image of the person T in monitoringSlope α relative to the full face image;
s105: the face shielding rate a of the person T in the monitoring is calculated,
s106: acquiring time T when the line of sight of person T is concentrated in a place other than the counter 1 Acquiring the total time T of the personnel T entering the monitoring area;
s107: calculating an observation index B of a person T in monitoring;
s108: when B reaches the threshold value, acquiring the eye white length L of one side of the transverse midline of the eye, which is close to the camera White color Acquiring the white length L of one side of the lateral midline of the eye, which is close to the camera, when the eye is in front of the front view Label (C) Acquiring the length L of the lateral midline of the eye E ;
S109: calculating an angle beta of the sight line deviating from the center position;
s110: and determining the position of the sight line of the person T, marking the key position, and when the overlapping time of the position of the sight line of the person T and the key position exceeds a time threshold, encrypting and uploading the monitoring data to the block chain link point and sending the early warning information to the system.
Further, the step S2 includes the following steps:
s201: acquiring an IP address A of decryption equipment;
s202: acquiring the actual position of an IP address of decryption equipment;
s203: acquiring local weather information by reading information of a weather bureau at an actual position where an IP address of the decryption equipment is located;
s204: acquiring time information T during decryption;
s205: acquiring the last digit of each segment in four segments of numbers in an IP address A of decryption equipment and obtaining a four-digit number C;
s206: obtaining a three-bit code B through local weather information n ;
S207: obtaining an eight-bit code D through the time information T during decryption;
s208: forming dynamic password CB n D。
Compared with the prior art, the invention has the following beneficial effects: the danger can be predicted in advance by predicting whether the person T has illegal intention or not through the face shielding rate of the person T and the times of observing the positions of the heavy points, so that the risk is reduced; the data is stored through the block chain, the security of the data is improved by using the decentralization characteristic of the block chain, the uncertainty of the password is improved by using the IP address, the time information and the weather information, the difficulty of password decoding is improved, the password is encrypted for the second time by using the hash algorithm, and the password is prevented from being directly decoded after being stolen by the irrelevance of the hash value.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a schematic diagram of a system for detecting data transmission security in a blockchain scenario according to the present invention;
FIG. 2 is a schematic diagram illustrating steps of a method for detecting security of data transmission in a blockchain scenario according to the present invention;
FIG. 3 is a schematic diagram illustrating the steps of encrypting and protecting data by using dynamic passwords in a data transmission security detection method in a blockchain scenario according to the present invention;
fig. 4 is a schematic diagram illustrating steps of monitoring data analysis in a data transmission security detection method in a blockchain scenario according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1-4, the present invention provides the following technical solutions: a data transmission security detection system in a blockchain scenario, comprising: the system comprises a monitoring data acquisition module, a monitoring data analysis module, a data encryption module, a data storage module, a data decryption module and an encryption information comparison module, wherein the monitoring data acquisition module is used for reading monitoring data, the monitoring data analysis module is used for analyzing the monitoring data, the data encryption module is used for encrypting the data, the data storage module is used for storing target data, the data decryption module is used for processing passwords input during decoding and decrypting the data, and the encryption information detection module is used for comparing the transmitted data with the data before transmission.
The monitoring data acquisition module is used for acquiring monitoring data to be analyzed; the monitoring data analysis module comprises a face analysis module, an observation analysis module and a sight line analysis module, wherein the face analysis module is used for obtaining a monitoring data through the formula of A=S 1 the/S analyzes the face shielding rate of the person in monitoring,
wherein A represents the face shielding rate of the person T in monitoring and S 1 The method comprises the steps that the area of a face of a person T in monitoring is shielded, S represents the total area of the face of the person T in monitoring, and the person T represents any person in monitoring data;
when there is no complete positive face image of the person T in the monitoring, the method is represented by the formula a= (S-S 2 ) Analysis of the face occlusion rate of the person under monitoring is performed by a/alpha S,
wherein A represents the face shielding rate of the person T in monitoring and S 2 The method comprises the steps that the exposed area of the face of a person T in monitoring is represented, S represents the total area of the face of the person T in monitoring, alpha represents the slope of the face image of the person T in monitoring relative to the complete face image, and when the face shielding rate A of the person T in monitoring exceeds a threshold value, all monitoring data of the person T are transmitted to an observation analysis module;
the observation analysis module is used for obtaining the formula b=t 1 T to analyze the head and eye movements of the person T under monitoring,
wherein B represents the observation index of the person T in monitoring, T 1 Indicating the time when the line of sight of the person T is concentrated in the place outside the counter, T indicating the total time for the person T to enter the monitoring area, and when B reaches the threshold value, the person T is taken to beThe monitoring data are transmitted to the sight analysis module;
the sight line analysis module is used for passing the formula beta= { (L) White color -L Label (C) )/L E }/(L Label (C) /L E ) Analyzing the sight line position of the person T in monitoring by x 60 DEG to determine the angle of the sight line deviating from the median position, wherein beta represents the angle of the sight line deviating from the median position of the sight line, L White color Represents the white length of one side of the lateral midline of the eye, which is close to the camera, L Label (C) Representing the white length of the side of the lateral midline of the eye, which is close to the camera, when the eye is in front of the front view, L E Represents the lateral midline length of the eye;
and determining the position of the sight line of the person T through the angle beta of the sight line of the person T deviated from the central position of the sight line, marking the key position, and uploading the monitoring data to the block chain link point and sending the early warning information to the system when the superposition time of the position of the sight line of the person T and the key position exceeds a dangerous threshold value.
In this embodiment, the area S of the person T in monitoring that is blocked 1 =160cm 2 Total area s=200cm of face of person T in monitoring 2 The face shielding rate A=0.8 of the person T in monitoring exceeds the face shielding rate threshold value 0.67, the person T is observed and analyzed, and the time T when the sight of the person T is concentrated in the place outside the counter 1 The total time t=30min of the person T entering the monitoring area is=21 min, the observation index b=0.7 of the person T in monitoring exceeds the threshold value 0.5, the line of sight analysis is performed on the person T, and the white length L of the side of the eyes close to the camera in the lateral midline of the eyes White color Eye white length L at the side near the camera in the lateral midline of the eye when the eye is looking forward =2.5 mm Label (C) Eye lateral midline length L =5 mm E The method comprises the steps that an angle beta= -45 degrees of a sight line deviating from a sight line center position is 15mm, the sight line position is located on a shop safety channel, the time of the sight line position on the shop safety channel is 3min, the time of the sight line position on other key positions in the shop is 12min, the superposition time of the sight line position of a person T and the key positions is 15min, and the sight line position exceeds a danger threshold value, monitoring data of the person is uploaded to block chain link points and early warning information is sent to a system.
The data encryption module comprises a dynamic password module and a hash operation module, wherein the dynamic password module is used for encrypting and protecting data, and the hash operation module is used for carrying out hash operation on the data to obtain an original hash value.
In this embodiment, the original hash value of a piece of data is 202cb962ac59075b964b07152d234b70
The dynamic password production module is used for producing a dynamic password through the IP address of the decryption device, the weather information of the actual position of the IP address of the decryption device and the time information during decryption.
The data storage module is used for storing information to be stored in the blockchain node.
The data decryption module is used for carrying out hash operation on the password input during decoding to obtain a dynamic password hash value, and taking the dynamic password hash value as encryption of second dynamic password unlocking data.
And the encryption information comparison module performs hash operation on the data after obtaining the data after unlocking the encryption to obtain a detection hash value, and compares the detection hash value with the original hash value.
A data transmission security detection method in a blockchain scenario, applied to a data transmission security detection system in a blockchain scenario as defined in any one of claims 1 to 4, comprising the steps of:
s1: acquiring monitoring data and analyzing the monitoring data;
s2: encrypting and protecting data by using a dynamic password;
s3: carrying out hash operation on the data by using a hash algorithm to obtain an original hash value;
s4: storing the information to be stored in the blockchain node;
s5: carrying out hash operation on the password input during decoding to obtain a dynamic password hash value, and taking the dynamic password hash value as encryption of second dynamic password unlocking data;
s6: after the data after the encryption is released is obtained, carrying out hash operation on the data to obtain a detection hash value, and comparing the detection hash value with an original hash value.
The step S1 includes the steps of:
s101: acquiring monitoring data;
s102: acquiring area S of blocked face of person T in monitoring 1 The total face area S of the person T in monitoring;
s103: calculating the face shielding rate A of the person T in monitoring;
s104: when the complete face image of the person T does not exist in the monitoring, acquiring the exposed area S of the face of the person T in the monitoring 2 Acquiring the total face area S of a person T in monitoring, and acquiring the slope alpha of a face image of the person T in monitoring relative to a complete face image;
s105: the face shielding rate a of the person T in the monitoring is calculated,
s106: acquiring time T when the line of sight of person T is concentrated in a place other than the counter 1 Acquiring the total time T of the personnel T entering the monitoring area;
s107: calculating an observation index B of a person T in monitoring;
s108: when B reaches the threshold value, acquiring the eye white length L of one side of the transverse midline of the eye, which is close to the camera White color Acquiring the white length L of one side of the lateral midline of the eye, which is close to the camera, when the eye is in front of the front view Label (C) Acquiring the length L of the lateral midline of the eye E ;
S109: calculating an angle beta of the sight line deviating from the center position;
s110: and determining the position of the sight line of the person T, marking the key position, and when the overlapping time of the position of the sight line of the person T and the key position exceeds a time threshold, encrypting and uploading the monitoring data to the block chain link point and sending the early warning information to the system.
The step S2 includes the steps of:
s201: acquiring an IP address A of decryption equipment;
s202: acquiring the actual position of an IP address of decryption equipment;
s203: acquiring local weather information by reading information of a weather bureau at an actual position where an IP address of the decryption equipment is located;
s204: acquiring time information T during decryption;
s205: acquiring the last digit of each segment in four segments of numbers in an IP address A of decryption equipment and obtaining a four-digit number C;
s206: obtaining a three-bit code B through local weather information n ;
S207: obtaining an eight-bit code D through the time information T during decryption;
s208: forming dynamic password CB n D。
In this embodiment, the IP address of a decryption device is 110.112.8.257, the actual location is in the state of hangzhou, zhejiang, the decryption time is 2019.03.08, the weather of the day is a sunny day by the weather exchange query, B 1 =sun, obtaining dynamic coded CB n D=0287 sun20190308, the hash value is 202cb962ac59075b964b07152D234b70 obtained by hash operation, and the hash value is equal to the original hash value, and the data is detected as safe.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Finally, it should be noted that: the foregoing description is only a preferred embodiment of the present invention, and the present invention is not limited thereto, but it is to be understood that modifications and equivalents of some of the technical features described in the foregoing embodiments may be made by those skilled in the art, although the present invention has been described in detail with reference to the foregoing embodiments. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.