CN114116886A - Access control data management method and system based on block chain - Google Patents

Access control data management method and system based on block chain Download PDF

Info

Publication number
CN114116886A
CN114116886A CN202111207680.0A CN202111207680A CN114116886A CN 114116886 A CN114116886 A CN 114116886A CN 202111207680 A CN202111207680 A CN 202111207680A CN 114116886 A CN114116886 A CN 114116886A
Authority
CN
China
Prior art keywords
user
access control
entrance guard
data
time
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
CN202111207680.0A
Other languages
Chinese (zh)
Other versions
CN114116886B (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.)
Beijing Zhonghuan Xinrong Technology Co ltd
Original Assignee
Deming Shangpin Technology Group 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 Deming Shangpin Technology Group Co ltd filed Critical Deming Shangpin Technology Group Co ltd
Priority to CN202111207680.0A priority Critical patent/CN114116886B/en
Publication of CN114116886A publication Critical patent/CN114116886A/en
Application granted granted Critical
Publication of CN114116886B publication Critical patent/CN114116886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/109Time management, e.g. calendars, reminders, meetings or time accounting
    • G06Q10/1091Recording time for administrative or management purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Educational Administration (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Time Recorders, Dirve Recorders, Access Control (AREA)

Abstract

The invention provides a block chain-based access control data management method and system, wherein a user automatically acquires face and limb images of the user through an access control, records the time of the user corresponding to the access control, and determines the identity information of the user and the direction of the user passing through the access control after analyzing the acquired images; then packing and encrypting the access control data and uploading the data to the block chain, so that the access control data can be safely and reliably stored; in addition, still with the entrance guard data synchronization of block chain storage to user's terminal, send entrance guard's warning message of checking card to user's terminal, not only can utilize the block chain to carry out concentrated storage to user's entrance guard data like this to improve entrance guard data storage's security and reduce entrance guard data and lose or the probability of being stolen, but also can be synchronous to the terminal so that the user in time inquires the entrance guard data of self and send entrance guard's warning message of checking card, with this efficiency that improves user's self entrance guard and checks card.

Description

Access control data management method and system based on block chain
Technical Field
The invention relates to the technical field of entrance guard safety management, in particular to an entrance guard data management method and system based on a block chain.
Background
Entrance guards are usually installed at entrances and exits of companies and other places, and employees need to punch cards into the entrance guards when passing through the entrances and exits, so that records of punching card time are formed, and the records of punching card time are used for subsequent attendance management. At present, the time records of card punching formed by the employees through the entrance guard card punching are collectively uploaded to an attendance database of a company, but the data storage security level of the existing attendance database for the time records of card punching is low, so that the situation that data is lost or stolen is easy to occur. Meanwhile, the time record of the card punching cannot be directly sent to the staff, so that the staff cannot know the actual card punching condition of the staff in time, and the staff forget to punch the card or the time for punching the card is insufficient.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides an access control data management method and system based on a block chain, wherein the method comprises the steps of automatically acquiring face and limb images of a user through an access control by the user, recording the time corresponding to the user passing through the access control, and determining the identity information of the user and the direction of the user passing through the access control after analyzing the acquired images; then packing and encrypting the access control data and uploading the data to the block chain, so that the access control data can be safely and reliably stored; in addition, still synchronous to user's terminal with the entrance guard data of block chain storage, the user can obtain self entrance guard time record of checking card through the inquiry terminal like this, and can also decipher and behind the analysis entrance guard data, send entrance guard time record of checking card and remind the message to user's terminal, so not only can utilize the block chain to carry out concentrated storage to user's entrance guard data, with this security that improves entrance guard data storage and reduce the probability that entrance guard data lose or are stolen, and can also be synchronous to the terminal with entrance guard data so that the user in time inquires self entrance guard data and sends entrance guard time record of checking card and remind the message, with this efficiency that improves user self entrance guard time and time record of checking card.
The invention provides a block chain-based access control data management method, which is characterized by comprising the following steps of:
step S1, when the user passes through the entrance guard, collecting the face image and the limb image of the user, and simultaneously recording the time corresponding to the user passing through the entrance guard; analyzing the face image to determine identity information of the user; analyzing the limb image to determine the direction of the user passing through the entrance guard;
step S2, packing the time corresponding to the user passing the entrance guard, the direction of the entrance guard and the identity information of the user to form entrance guard data; after the access control data are encrypted, storing the encrypted access control data into a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user;
step S3, obtaining encrypted entrance guard data from the block chain, decrypting and analyzing the entrance guard data, and determining whether a card punching time record formed by a user through entrance guard correspondingly meets the requirement of the preset entrance guard card punching time or not; when the condition is not met, sending an entrance guard card punching reminding message to a terminal of a user;
further, in the step S1, when the user passes through the door access, the face image and the limb image of the user are collected, and the time when the user passes through the door access is recorded; analyzing the face image to determine identity information of the user; analyzing the limb image to determine the direction of the user through the door access specifically comprises:
step S101, when a user passes through an access control, scanning and shooting the face of the user to obtain a face image of the user, and shooting the upper body and the lower limbs of the user to obtain upper body and lower limb images of the user; meanwhile, taking the initial moment of shooting the upper body and the lower limbs of the user as the time corresponding to the user passing through the entrance guard;
step S102, identifying the face image so as to determine facial feature information of the user; comparing the facial feature information with a preset user identity information database so as to determine the identity information of the user; the preset user identity information database comprises a one-to-one mapping relation between facial feature information of different users and identity information of the users;
step S103, identifying the upper body and lower limb images so as to determine the front orientation and the toe orientation of the upper body of the user; if the front face of the upper body faces the entrance guard and the tiptoes face the entrance guard, determining that the user is approaching and passing the entrance guard currently; if the front of the upper body faces back to the entrance guard and the toes face back to the entrance guard, determining that the user passes through and is far away from the entrance guard currently;
further, in step S2, packing the time corresponding to the user passing through the door access, the direction of the door access and the identity information of the user to form door access data; after the access control data are encrypted, storing the encrypted access control data into a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user specifically comprises the following steps:
step S201, comparing the time corresponding to the user passing through the entrance guard with a preset time interval; if the time corresponding to the user passing through the access control is within the preset time interval, determining the time corresponding to the user passing through the access control as valid time; otherwise, determining the time corresponding to the user passing through the access control as invalid time;
step S202, packaging the effective time, the direction of the user through the entrance guard and the identity information of the user to form entrance guard data; after the access control data are encrypted, storing the encrypted access control data into a block chain;
step S203, synchronously storing the access control data stored in the block chain to the terminal of the user in a mirror mode;
further, in step S3, obtaining encrypted access control data from the block chain, decrypting and analyzing the access control data, so as to determine whether a card punching time record formed by the user through the access control correspondingly meets a preset access control card punching time requirement; when not satisfied, the reminding message of checking the card of entrance guard is sent to user's terminal specifically includes:
step S301, acquiring encrypted access control data from a block chain, decrypting and analyzing the access control data, and determining a time point when a user enters the access control data at the earliest time and passes through the access control data and a time point when the user exits the access control data at the latest time and is far away from the access control data; determining the time interval corresponding to the two time points, and taking the time interval as a time record for determining the time for the user to punch the card correspondingly through the entrance guard;
step S302, comparing the time interval with a preset entrance guard card punching time interval threshold, and if the time interval is greater than or equal to the preset entrance guard card punching time interval threshold, determining that a card punching time record correspondingly formed by a user through an entrance guard meets the preset entrance guard card punching time requirement; if the time interval is smaller than the preset entrance guard card punching time interval threshold, determining that a card punching time record formed by a user through entrance guard correspondingly does not meet the preset entrance guard card punching time requirement;
step S303, when a card punching time record formed by a user through corresponding access control does not meet the requirement of the preset access control card punching time, acquiring the real-time position of the user through a terminal so as to determine the distance between the user and the access control currently; comparing the distance with a preset distance threshold, and if the distance is smaller than the preset distance threshold, sending an entrance guard card punching reminding message to a terminal of a user; otherwise, the entrance guard card punching reminding message is not sent to the terminal of the user;
further, in step S202, after encrypting the access control data, storing the encrypted access control data in the block chain specifically includes:
the access control data is encrypted by using the following formula (1), because the access control data is formed by packaging the effective time, the direction of the user passing through the access control and the identity information of the user, in order to ensure the reliability of encryption processing, the three parts are subjected to cross encryption processing,
Figure BDA0003307502810000041
in the above-mentioned formula (1),
Figure BDA0003307502810000042
representing the corresponding binary form data after the door access data are encrypted; t is2Representing binary form data corresponding to effective time in the access control data; -representing a bitwise negation operation;
Figure BDA0003307502810000043
representing a circular left shift operation; len () represents the number of binary form data in parentheses; h2Representing that the user passes the corresponding binary of the access control direction in the access control dataPreparing form data; g2Binary form data corresponding to the identity information of the user in the access control data is represented; the binary data on the left and right sides of the comma are connected;
through the process, the encrypted access control data is encrypted
Figure BDA0003307502810000044
Storing to a block chain;
in step S202, the mirror-synchronizing storing the access control data stored in the block chain to the terminal of the user specifically includes:
synchronously storing the access control data stored in the block chain to a terminal of a user in a mirror image manner, in the data mirror image process, as the received data transmission can not carry out mirror image copy on all the access control data, the access control data stored in the block chain needs to be divided and then carried out data mirror image copy, so as to ensure that the data size of each mirror image copy can not exceed the maximum data amount allowed to be transmitted in the mirror image copy process, in addition, as the access control data is divided and then carried out mirror image copy, the last 20-bit sub-data of the previous section of divided data can be divided into the first 20-bit sub-data of the next section of divided data again in the dividing process, and whether the first 20-bit sub-data of the next section of divided data is consistent with the last 20-bit sub-data of the previous section of divided data is judged in the mirror image copy process, so as to judge whether the data copied by the access control image is accurate, the process is shown in the following formula (2),
Figure BDA0003307502810000051
in the formula (2), λ (i) represents a determination value indicating whether mirror image copying of ith data of the gate inhibition data partition stored in the block chain is accurate or not;
Figure BDA0003307502810000052
the corresponding binary form data is obtained after mirror image copying is carried out on ith data which represents the door control data segmentation stored in the block chain;&indicating that a bit is being pressedPerforming AND operation; (11.. 1) represents binary data in which 20 binary "1" s are all present; z2]The inversion operation is represented, namely binary data in brackets are inverted; n represents the number of data obtained by dividing the access control data stored in the block chain;
if lambda (i) is 0, the ith data after the entrance guard data stored in the block chain is divided is successfully subjected to mirror image copying and is synchronously stored to the terminal of the user;
if lambda (i) ≠ 0, it indicates that the ith data after the entrance guard data stored in the block chain is segmented is not successfully mirror-copied and synchronously stored in the terminal of the user; at the moment, the ith data obtained by dividing the access control data stored in the block chain is collected again, and the formula (2) is used again for calculation until mirror image copying is successful; if the number of times of re-collecting the ith data exceeds 10 times, feeding back a mirror image copy error message so as to repair the ith data;
further, in step S301, obtaining encrypted access control data from a block chain, and decrypting the access control data specifically includes:
because the encrypted access control data stored in the blockchain comprises a comma connecting three different data parts, the corresponding three different data parts can be obtained from the encrypted access control data according to the position of the comma in the encrypted access control data, each different data part is decrypted by using the following formula (3),
Figure BDA0003307502810000053
in the above formula (3), D2Representing binary form data obtained by decrypting the encrypted access control data acquired from the block chain; [ F (1)]2Representing binary form data corresponding to a first part of data obtained by dividing according to the position of a comma in the encrypted access control data; [ F (2)]2Representing binary form data corresponding to second part of data obtained by dividing according to the position of the comma in the encrypted access control data; [ F (3)]2Indicating encrypted access numbers based on commaBinary form data corresponding to the third part of data obtained by dividing according to the position in the binary form data;
Figure BDA0003307502810000061
indicating a circular right shift operation.
The invention provides an entrance guard data management system based on a block chain, which is characterized by comprising an image acquisition and analysis module, a time recording module, an entrance guard data packing and processing module, a user entrance guard card punching time analysis module and a card punching reminding module; wherein the content of the first and second substances,
the image acquisition and analysis module is used for acquiring a face image and a limb image of a user when the user passes through the entrance guard; analyzing the face image to determine identity information of the user; analyzing the limb image to determine the direction of the user passing through the entrance guard;
the time recording module is used for recording the time corresponding to the user passing through the entrance guard;
the entrance guard data packing and processing module is used for packing the time corresponding to the user passing through the entrance guard, the direction of the entrance guard and the identity information of the user to form entrance guard data; after the access control data are encrypted, storing the encrypted access control data into a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user;
the user access control card punching time analysis module is used for acquiring encrypted access control data from the block chain, decrypting and analyzing the access control data, and determining whether a card punching time record formed by a user through access control correspondingly meets the requirement of preset access control card punching time or not;
the card punching reminding module is used for sending an entrance guard card punching reminding message to a terminal of a user when a card punching time record formed by the user through corresponding entrance guard does not meet the requirement of the preset entrance guard card punching time;
further, the image acquisition and analysis module is used for acquiring a face image and a limb image of a user when the user passes through the entrance guard; analyzing the face image to determine identity information of the user; analyzing the limb image to determine the direction of the user through the door access specifically comprises:
when a user passes through the access control, the face of the user is scanned and shot so as to obtain a face image of the user, and the upper body and the lower limbs of the user are shot so as to obtain an upper body and lower limb image of the user;
identifying the face image so as to determine facial feature information of the user; comparing the facial feature information with a preset user identity information database so as to determine the identity information of the user; the preset user identity information database comprises a one-to-one mapping relation between facial feature information of different users and identity information of the users;
identifying the upper body and lower limb images so as to determine the front orientation and the toe orientation of the upper body of the user; if the front face of the upper body faces the entrance guard and the tiptoes face the entrance guard, determining that the user is approaching and passing the entrance guard currently; if the front of the upper body faces back to the entrance guard and the toes face back to the entrance guard, determining that the user passes through and is far away from the entrance guard currently;
and the number of the first and second groups,
the time recording module is used for recording the time corresponding to the user through the entrance guard and specifically comprises:
taking the initial moment of shooting the upper body and the lower limbs of the user as the time corresponding to the user passing through the entrance guard;
further, the door control data packing and processing module is used for packing the time corresponding to the user passing through the door control, the direction of the door control and the identity information of the user to form door control data; after the access control data are encrypted, storing the encrypted access control data into a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user specifically comprises the following steps:
comparing the time corresponding to the user passing through the access control with a preset time interval; if the time corresponding to the user passing through the access control is within the preset time interval, determining the time corresponding to the user passing through the access control as valid time; otherwise, determining the time corresponding to the user passing through the access control as invalid time;
packing the effective time, the direction of the access control by the user and the identity information of the user to form access control data; after the access control data are encrypted, storing the encrypted access control data into a block chain;
synchronously storing the access control data stored in the block chain to a terminal of a user in a mirror mode;
further, user's entrance guard time analysis module of checking card is used for obtaining encrypted entrance guard data from the block chain, and the deciphering and analysis entrance guard data to this confirms that the user corresponds the time record of checking card that forms through the entrance guard and whether satisfies the time requirement of presetting entrance guard time of checking card specifically includes:
acquiring encrypted access control data from the block chain, decrypting and analyzing the access control data so as to determine a time point when a user firstly walks in and passes through the access control in the access control data and a time point when the user finally goes out and is far away from the access control; determining the time interval corresponding to the two time points, and taking the time interval as a time record for determining the time for the user to punch the card correspondingly through the entrance guard;
comparing the time interval with a preset entrance guard card punching time interval threshold, and if the time interval is greater than or equal to the preset entrance guard card punching time interval threshold, determining that a card punching time record formed by a user through an entrance guard correspondingly meets the preset entrance guard card punching time requirement; if the time interval is smaller than the preset entrance guard card punching time interval threshold, determining that a card punching time record formed by a user through entrance guard correspondingly does not meet the preset entrance guard card punching time requirement;
and the number of the first and second groups,
the card punching reminding module is used for sending an entrance guard card punching reminding message to a user terminal when a user does not meet the requirement of presetting entrance guard card punching time through a card punching time record formed by entrance guard correspondence, and specifically comprises the following steps:
when a card punching time record formed by a user through corresponding access control does not meet the requirement of the preset access control card punching time, acquiring the real-time position of the user through a terminal so as to determine the distance between the current user and the access control; comparing the distance with a preset distance threshold, and if the distance is smaller than the preset distance threshold, sending an entrance guard card punching reminding message to a terminal of a user; otherwise, the entrance guard card punching reminding message is not sent to the terminal of the user.
Compared with the prior art, the block chain-based access control data management method and system automatically acquire the face and limb images of the user through the access control by the user, record the time of the user passing through the access control, and determine the identity information of the user and the direction of the user passing through the access control after analyzing the acquired images; then packing and encrypting the access control data and uploading the data to the block chain, so that the access control data can be safely and reliably stored; in addition, still synchronous to user's terminal with the entrance guard data of block chain storage, the user can obtain self entrance guard time record of checking card through the inquiry terminal like this, and can also decipher and behind the analysis entrance guard data, send entrance guard time record of checking card and remind the message to user's terminal, so not only can utilize the block chain to carry out concentrated storage to user's entrance guard data, with this security that improves entrance guard data storage and reduce the probability that entrance guard data lose or are stolen, and can also be synchronous to the terminal with entrance guard data so that the user in time inquires self entrance guard data and sends entrance guard time record of checking card and remind the message, with this efficiency that improves user self entrance guard time and time record of checking card.
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 chart of a block chain-based access control data management method provided by the present invention.
Fig. 2 is a schematic structural diagram of the block chain-based access control data management system provided in the present 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 access control data management method according to an embodiment of the present invention. The block chain-based access control data management method comprises the following steps:
step S1, when the user passes through the entrance guard, collecting the face image and the limb image of the user, and simultaneously recording the time corresponding to the user passing through the entrance guard; analyzing the face image to determine the identity information of the user; analyzing the limb image to determine the direction of the user passing through the entrance guard;
step S2, packing the time corresponding to the user passing the entrance guard, the direction of the entrance guard and the identity information of the user to form entrance guard data; after the access control data are encrypted, the encrypted access control data are stored in a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user;
step S3, obtaining the encrypted entrance guard data from the block chain, decrypting and analyzing the entrance guard data, and determining whether the card punching time record formed by the user through the entrance guard correspondingly meets the requirement of the preset entrance guard card punching time; and when the condition is not met, sending an entrance guard card punching reminding message to the terminal of the user.
The beneficial effects of the above technical scheme are: according to the block chain-based access control data management method, a user automatically acquires face and limb images of the user through an access control, the time of the user corresponding to the access control is recorded, and after the acquired images are analyzed, identity information of the user and the direction of the user passing through the access control are determined; then packing and encrypting the access control data and uploading the data to the block chain, so that the access control data can be safely and reliably stored; in addition, still synchronous to user's terminal with the entrance guard data of block chain storage, the user can obtain self entrance guard time record of checking card through the inquiry terminal like this, and can also decipher and behind the analysis entrance guard data, send entrance guard time record of checking card and remind the message to user's terminal, so not only can utilize the block chain to carry out concentrated storage to user's entrance guard data, with this security that improves entrance guard data storage and reduce the probability that entrance guard data lose or are stolen, and can also be synchronous to the terminal with entrance guard data so that the user in time inquires self entrance guard data and sends entrance guard time record of checking card and remind the message, with this efficiency that improves user self entrance guard time and time record of checking card.
Preferably, in step S1, when the user passes through the door lock, the face image and the limb image of the user are collected, and the time when the user passes through the door lock is recorded; analyzing the face image to determine the identity information of the user; analyzing the limb image to determine the direction of the user through the door access specifically comprises:
step S101, when a user passes through an access control, scanning and shooting the face of the user to obtain a face image of the user, and shooting the upper body and the lower limbs of the user to obtain upper body and lower limb images of the user; meanwhile, taking the initial moment of shooting the upper body and the lower limbs of the user as the time corresponding to the user passing through the entrance guard;
step S102, identifying the face image so as to determine facial feature information of the user; then comparing the facial feature information with a preset user identity information database so as to determine the identity information of the user; the preset user identity information database comprises a one-to-one mapping relation between facial feature information of different users and identity information of the users;
step S103, identifying the upper body and lower limb images so as to determine the front orientation and the tiptoe orientation of the upper body of the user; if the front face of the upper body faces the entrance guard and the tiptoes face the entrance guard, determining that the user is approaching and passing the entrance guard currently; if the front of the upper body faces back to the entrance guard and the toes face back to the entrance guard, it is determined that the user has currently passed through and is away from the entrance guard.
The beneficial effects of the above technical scheme are: in practical application, the entrance guard can be provided with infrared sensing equipment, and the infrared sensing equipment can include infrared transmitter and infrared receiver, and infrared transmitter is used for transmitting infrared light to infrared receiver. When the user passes through entrance guard, the infrared light that infrared transmitter sent is sheltered from, and infrared receiver can not receive infrared light, and camera equipment such as camera this moment is triggered and shoots user's face image and limbs image, and corresponding time-recorder can be with the time that the user passes through entrance guard corresponding as the user at the initial moment of shooing upper part of the body and the low limbs to user's simultaneously. Then, the face image of the user is identified, so that facial feature information (such as relative position information of facial features) of the facial features of the user is obtained, and the facial feature information is compared with a preset user identity information database, so that identity information of the user passing through the access control at present can be accurately determined. And the upper body and the lower limb images are subjected to contour recognition, so that the front orientation and the toe orientation of the upper body of the user can be determined, the relative positions between the front orientation of the upper body and the toe orientation and the entrance guard are determined by the fact that the user walks into the entrance guard or leaves the entrance guard, so that the user can be accurately determined whether to enter the entrance guard or go out of the entrance guard through the entrance guard at each time, and the entrance and exit state of the user at the entrance guard can be conveniently and accurately grasped.
Preferably, in step S2, the entrance guard data is formed by packaging the time corresponding to the user passing through the entrance guard, the direction of the entrance guard and the identity information of the user; after the access control data are encrypted, the encrypted access control data are stored in a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user specifically comprises the following steps:
step S201, comparing the time corresponding to the user passing through the entrance guard with a preset time interval; if the time corresponding to the user passing through the access control is within the preset time interval, determining the time corresponding to the user passing through the access control as valid time; otherwise, determining the time corresponding to the user passing through the access control as invalid time;
step S202, packaging the effective time, the direction of the access control by the user and the identity information of the user to form access control data; after the access control data are encrypted, the encrypted access control data are stored in a block chain;
and step S203, synchronously storing the access control data stored in the block chain to the terminal of the user in a mirror mode.
The beneficial effects of the above technical scheme are: in practical application, a user can form a corresponding time record every time the user enters through the entrance guard or goes out through the entrance guard, but for company attendance checking, whether the time corresponding to the user entering through the entrance guard on duty and going out from work through the entrance guard is respectively located in a preset on-duty card punching time period and a preset off-duty card punching time period is required to be checked, and the time corresponding to the user passing through the entrance guard is compared with a preset time interval (such as the on-duty card punching time period or the off-duty card punching time period), so that whether the time record formed by the user through the entrance guard currently is valid can be accurately judged; specifically, when the on-duty card-reading time period is set to be 8-9 points, the off-duty card-reading time period is set to be 17-18 points, the time of the user entering the gate inhibition device within 8-9 points is effective time, the time of the user going out through the gate inhibition device within 17-18 points is effective time, and for example, the time of the user entering the gate inhibition device or the time of the user going out through the gate inhibition device within 12-13 points is ineffective time, so that the screening accuracy of the time records can be improved under the condition that the user enters and exits the gate inhibition device for multiple times within one day and correspondingly forms multiple time records. Then, the effective time and the user form access control data by packaging the direction of the access control and the identity information of the user, so that each access control data packet can reflect various states corresponding to the user through the access control on different levels. The access control data are encrypted and stored in the block chain, centralized management and reading of the access control data can be facilitated, only the access control data stored in the block chain are synchronously stored to terminals of a smart phone and the like of a user in a mirror image mode, the access control card punching time record of the user can be conveniently inquired anytime and anywhere, and therefore convenience and timeliness of the user for inquiring the access control data are improved.
Preferably, in step S3, the encrypted access control data is obtained from the block chain, and the access control data is decrypted and analyzed, so as to determine whether the card-punching time record formed by the user through the access control correspondingly meets the preset access control card-punching time requirement; when not satisfied, the reminding message of checking the card of entrance guard is sent to user's terminal specifically includes:
step S301, acquiring encrypted access control data from a block chain, decrypting and analyzing the access control data, and determining a time point when a user enters the access control data at the earliest time and passes through the access control data and a time point when the user exits the access control data at the latest time and is far away from the access control data; determining the time interval corresponding to the two time points, and taking the time interval as a time record for determining the time for the user to punch the card correspondingly through the entrance guard;
step S302, comparing the time interval with a preset entrance guard card punching time interval threshold, and if the time interval is greater than or equal to the preset entrance guard card punching time interval threshold, determining that a card punching time record correspondingly formed by a user through an entrance guard meets the preset entrance guard card punching time requirement; if the time interval is smaller than the preset entrance guard card punching time interval threshold, determining that a card punching time record formed by a user through entrance guard correspondingly does not meet the preset entrance guard card punching time requirement;
step S303, when a card punching time record formed by a user through corresponding access control does not meet the requirement of the preset access control card punching time, acquiring the real-time position of the user through a terminal so as to determine the distance between the user and the access control currently; comparing the distance with a preset distance threshold, and if the distance is smaller than the preset distance threshold, sending an entrance guard card punching reminding message to a terminal of a user; otherwise, the entrance guard card punching reminding message is not sent to the terminal of the user.
The beneficial effects of the above technical scheme are: reading encrypted access control data from the block chain, and decrypting and analyzing the access control data to obtain a time point when the user firstly walks in and passes through the access control and a time point when the user secondly passes through and is far away from the access control, so that a stay time interval of the user can be determined according to the two time points; and comparing the stay time interval with a preset entrance guard time interval threshold value, and quantitatively evaluating the stay time interval of the user so as to quickly determine whether the stay time of the user meets the preset entrance guard time requirement. In addition, when it is determined that the time record of the user corresponding to the entrance guard does not meet the preset entrance guard time requirement, the distance between the user and the entrance guard is obtained (for example, the distance between the user and the entrance guard is determined by positioning the user terminal), and when the distance is smaller than the preset distance threshold, an entrance guard time prompt message is sent to the user terminal, so that the user can be timely informed of the early time of the user and the time of the user not meeting the corresponding entrance guard time requirement, and the user can conveniently make additional time of the user; the entrance guard card punching reminding message can be but is not limited to a message for reminding a user of punching a card for going off duty too early.
Preferably, in step S202, after encrypting the access control data, storing the encrypted access control data in the blockchain specifically includes:
the access control data is encrypted by using the following formula (1), because the access control data is formed by packaging three parts of the valid time, the direction of the user passing through the access control and the identity information of the user, in order to ensure the reliability of encryption processing, the three parts are subjected to cross encryption processing,
Figure BDA0003307502810000141
in the above-mentioned formula (1),
Figure BDA0003307502810000142
representing the corresponding binary form data after the door access data are encrypted; t is2Binary form data corresponding to effective time in the access control data is represented; -representing a bitwise negation operation;
Figure BDA0003307502810000143
representing a circular left shift operation; len () represents the number of binary form data in parentheses; h2Binary form data corresponding to the direction of the user passing through the access control in the access control data; g2Binary form data corresponding to the identity information of the user in the access control data is represented; the binary data on the left and right sides of the comma are connected;
through the process, the encrypted access control data is encrypted
Figure BDA0003307502810000144
Storing to a block chain; the encryption process has the advantages that the data lengths of the three parts are crossed to be used as encryption operators, so that the encryption reliability is ensured, and then the length of each part is kept unchanged after encryption by using a calculation mode of cyclic shift and bitwise negation, so that the subsequent decryption calculation is facilitated;
in step S202, the mirror-synchronizing storing the access control data stored in the block chain to the terminal of the user specifically includes:
the method comprises the steps of synchronously storing access control data stored in a block chain to a terminal of a user in a mirror image mode, carrying out mirror image copy on all the access control data after receiving data transmission in the data mirror image process, dividing the access control data stored in the block chain, and then carrying out data mirror image copy, so as to ensure that the size of the data copied in each mirror image mode cannot exceed the maximum data amount allowed to be transmitted in the mirror image copy process, further, carrying out mirror image copy on the access control data after being divided, dividing the last 20-bit sub-data of the previous section of divided data into the first 20-bit sub-data of the next section of divided data again in the dividing process, and judging whether the first 20-bit sub-data of the next section of divided data is consistent with the last 20-bit sub-data of the previous section of divided data in the mirror image copy process so as to judge whether the data copied in the mirror image mode of the access control is accurate, the process is shown in the following formula (2),
Figure BDA0003307502810000145
in the formula (2), λ (i) represents a determination value of whether mirror image copying of ith data of the gate inhibition data partition stored in the block chain is accurate or not;
Figure BDA0003307502810000151
the corresponding binary form data after mirror image copying is carried out on the ith data which represents the access control data segmentation stored in the block chain;&indicating a bitwise AND operation; (11.. 1) represents binary data in which 20 binary "1" s are all present; z2]The inversion operation is represented, namely binary data in brackets are inverted; n represents the number of data obtained by dividing the access control data stored in the block chain;
if lambda (i) is 0, the ith data after the entrance guard data stored in the block chain is divided is successfully subjected to mirror image copying and is synchronously stored in the terminal of the user;
if lambda (i) ≠ 0, it indicates that the ith data after the entrance guard data stored in the block chain is divided is not successfully mirror-copied and synchronously stored in the terminal of the user; at the moment, the ith data which is obtained by dividing the access control data stored in the block chain is collected again, and the formula (2) is used again for calculation until mirror image copying is successful; if the number of times of re-collecting the ith data exceeds 10 times, feeding back a mirror image copy error message so as to repair the ith data;
the formula (2) is to verify whether the mirror image copy is correct, and it needs to verify whether the head and tail of the divided data are equal to the head of the previous data and the head of the next data, but there are two special places that the first and last data need to be taken out and analyzed separately.
Preferably, in step S301, acquiring encrypted access control data from the block chain, and decrypting the access control data specifically includes:
because the encrypted access control data stored in the blockchain comprises a comma connecting three different data parts, the corresponding three different data parts can be obtained from the encrypted access control data according to the position of the comma in the encrypted access control data, each different data part is decrypted by using the following formula (3),
Figure BDA0003307502810000152
in the above formula (3), D2Representing binary form data obtained by decrypting the encrypted access control data acquired from the block chain; [ F (1)]2Representing binary form data corresponding to a first part of data obtained by dividing according to the position of a comma in the encrypted access control data; [ F (2)]2Representing binary form data corresponding to second part of data obtained by dividing according to the position of the comma in the encrypted access control data; [ F (3)]2Representing binary form data corresponding to a third part of data obtained by dividing according to the position of the comma in the encrypted access control data;
Figure BDA0003307502810000161
representing a circular right shift operation;
the decryption process of the formula (3) is performed by inverse operation, and because the length of the data is not changed by an encryption operator in the encryption process, the reliability of decryption is ensured.
The beneficial effects of the above technical scheme are: the access control data is encrypted by using the formula (1), the data length intersection of the three parts of the access control data is further used as an encryption operator, the encryption reliability is ensured, and then the length of each part after encryption is ensured to be unchanged by using a calculation mode of cyclic shift and bitwise negation, so that the subsequent decryption calculation is facilitated; then, judging whether the mirrored access control data is accurate by using the formula (2), and further ensuring the reliability and accuracy of synchronously storing the mirrored access control data to a terminal of a user; and finally, the formula (3) is used for decrypting the encrypted access control data acquired from the block chain, and the operational property that the data length is kept unchanged in the encryption process is used for decryption, so that the decryption reliability and the decrypted data accuracy are ensured.
Fig. 2 is a schematic structural diagram of the block chain-based access control data management system according to the embodiment of the present invention. The block chain-based access control data management system comprises an image acquisition and analysis module, a time recording module, an access control data packing and processing module, a user access control card punching time analysis module and a card punching reminding module; wherein the content of the first and second substances,
the image acquisition and analysis module is used for acquiring a face image and a limb image of a user when the user passes through the entrance guard; analyzing the face image to determine the identity information of the user; analyzing the limb image to determine the direction of the user passing through the entrance guard;
the time recording module is used for recording the time corresponding to the user passing through the entrance guard;
the entrance guard data packing and processing module is used for packing the time corresponding to the user passing through the entrance guard, the direction of the entrance guard and the identity information of the user to form entrance guard data; after the access control data are encrypted, the encrypted access control data are stored in a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user;
the user access control card punching time analysis module is used for acquiring encrypted access control data from the block chain, decrypting and analyzing the access control data so as to determine whether a card punching time record formed by a user through access control correspondingly meets the requirement of preset access control card punching time;
the card punching reminding module is used for sending an entrance guard card punching reminding message to a terminal of a user when a card punching time record formed by the user through corresponding entrance guard does not meet the requirement of the preset entrance guard card punching time.
The beneficial effects of the above technical scheme are: the block chain-based access control data management system automatically acquires face and limb images of a user through an access control by the user, records the time of the user corresponding to the access control, and determines the identity information of the user and the direction of the user passing through the access control after analyzing the acquired images; then packing and encrypting the access control data and uploading the data to the block chain, so that the access control data can be safely and reliably stored; in addition, still synchronous to user's terminal with the entrance guard data of block chain storage, the user can obtain self entrance guard time record of checking card through the inquiry terminal like this, and can also decipher and behind the analysis entrance guard data, send entrance guard time record of checking card and remind the message to user's terminal, so not only can utilize the block chain to carry out concentrated storage to user's entrance guard data, with this security that improves entrance guard data storage and reduce the probability that entrance guard data lose or are stolen, and can also be synchronous to the terminal with entrance guard data so that the user in time inquires self entrance guard data and sends entrance guard time record of checking card and remind the message, with this efficiency that improves user self entrance guard time and time record of checking card.
Preferably, the image acquisition and analysis module is used for acquiring a face image and a limb image of a user when the user passes through an entrance guard; analyzing the face image to determine the identity information of the user; analyzing the limb image to determine the direction of the user through the door access specifically comprises:
when a user passes through the access control, the face of the user is scanned and shot so as to obtain a face image of the user, and the upper body and the lower limbs of the user are shot so as to obtain an upper body and lower limb image of the user;
identifying the face image so as to determine facial feature information of the user; then comparing the facial feature information with a preset user identity information database so as to determine the identity information of the user; the preset user identity information database comprises a one-to-one mapping relation between facial feature information of different users and identity information of the users;
identifying the upper body and lower limb images so as to determine the front orientation and the tiptoe orientation of the upper body of the user; if the front face of the upper body faces the entrance guard and the tiptoes face the entrance guard, determining that the user is approaching and passing the entrance guard currently; if the front of the upper body faces back to the entrance guard and the toes face back to the entrance guard, determining that the user passes through and is far away from the entrance guard currently;
and the number of the first and second groups,
this time recording module is used for recording the user and specifically includes through the time that entrance guard corresponds:
and taking the initial moment of shooting the upper body and the lower limbs of the user as the time corresponding to the user passing through the entrance guard.
The beneficial effects of the above technical scheme are: in practical application, the entrance guard can be provided with infrared sensing equipment, and the infrared sensing equipment can include infrared transmitter and infrared receiver, and infrared transmitter is used for transmitting infrared light to infrared receiver. When the user passes through entrance guard, the infrared light that infrared transmitter sent is sheltered from, and infrared receiver can not receive infrared light, and camera equipment such as camera this moment is triggered and shoots user's face image and limbs image, and corresponding time-recorder can be with the time that the user passes through entrance guard corresponding as the user at the initial moment of shooing upper part of the body and the low limbs to user's simultaneously. Then, the face image of the user is identified, so that facial feature information (such as relative position information of facial features) of the facial features of the user is obtained, and the facial feature information is compared with a preset user identity information database, so that identity information of the user passing through the access control at present can be accurately determined. And the upper body and the lower limb images are subjected to contour recognition, so that the front orientation and the toe orientation of the upper body of the user can be determined, the relative positions between the front orientation of the upper body and the toe orientation and the entrance guard are determined by the fact that the user walks into the entrance guard or leaves the entrance guard, so that the user can be accurately determined whether to enter the entrance guard or go out of the entrance guard through the entrance guard at each time, and the entrance and exit state of the user at the entrance guard can be conveniently and accurately grasped.
Preferably, the door access data packaging and processing module is used for packaging the time corresponding to the user passing through the door access, the direction of the door access and the identity information of the user to form door access data; after the access control data are encrypted, the encrypted access control data are stored in a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user specifically comprises the following steps:
comparing the time corresponding to the user passing through the access control with a preset time interval; if the time corresponding to the user passing through the access control is within the preset time interval, determining the time corresponding to the user passing through the access control as valid time; otherwise, determining the time corresponding to the user passing through the access control as invalid time;
packing the effective time, the direction of the access control by the user and the identity information of the user to form access control data; after the access control data are encrypted, the encrypted access control data are stored in a block chain;
and synchronously storing the access control data stored in the block chain to the terminal of the user in a mirror mode.
The beneficial effects of the above technical scheme are: in practical application, a user can form a corresponding time record every time the user enters through the entrance guard or goes out through the entrance guard, but for company attendance checking, whether the time corresponding to the user entering through the entrance guard on duty and going out from work through the entrance guard is respectively located in a preset on-duty card punching time period and a preset off-duty card punching time period is required to be checked, and the time corresponding to the user passing through the entrance guard is compared with a preset time interval (such as the on-duty card punching time period or the off-duty card punching time period), so that whether the time record formed by the user through the entrance guard currently is valid can be accurately judged; specifically, when the on-duty card-reading time period is set to be 8-9 points, the off-duty card-reading time period is set to be 17-18 points, the time of the user entering the gate inhibition device within 8-9 points is effective time, the time of the user going out through the gate inhibition device within 17-18 points is effective time, and for example, the time of the user entering the gate inhibition device or the time of the user going out through the gate inhibition device within 12-13 points is ineffective time, so that the screening accuracy of the time records can be improved under the condition that the user enters and exits the gate inhibition device for multiple times within one day and correspondingly forms multiple time records. Then, the effective time and the user form access control data by packaging the direction of the access control and the identity information of the user, so that each access control data packet can reflect various states corresponding to the user through the access control on different levels. The access control data are encrypted and stored in the block chain, centralized management and reading of the access control data can be facilitated, only the access control data stored in the block chain are synchronously stored to terminals of a smart phone and the like of a user in a mirror image mode, the access control card punching time record of the user can be conveniently inquired anytime and anywhere, and therefore convenience and timeliness of the user for inquiring the access control data are improved.
Preferably, the user access control card-punching time analysis module is configured to acquire encrypted access control data from the block chain, decrypt and analyze the access control data, and determine whether a card-punching time record formed by a user through access control corresponds to a preset access control card-punching time requirement specifically includes:
acquiring encrypted access control data from the block chain, decrypting and analyzing the access control data so as to determine a time point when a user enters the access control data at the earliest time and passes through the access control and a time point when the user exits the access control data at the latest time and is far away from the access control; determining the time interval corresponding to the two time points, and taking the time interval as a time record for determining the time for the user to punch the card correspondingly through the entrance guard;
comparing the time interval with a preset entrance guard card punching time interval threshold, and if the time interval is greater than or equal to the preset entrance guard card punching time interval threshold, determining that a card punching time record formed by a user correspondingly through an entrance guard meets the preset entrance guard card punching time requirement; if the time interval is smaller than the preset entrance guard card punching time interval threshold, determining that a card punching time record formed by a user through entrance guard correspondingly does not meet the preset entrance guard card punching time requirement;
and the number of the first and second groups,
this warning module of checking card is used for when the user passes through the time record of checking card that entrance guard corresponds the formation and does not satisfy when predetermineeing entrance guard time requirement of checking card, sends entrance guard time of checking card to user's terminal and reminds the message specifically to include:
when a card punching time record formed by a user through corresponding access control does not meet the requirement of the preset access control card punching time, acquiring the real-time position of the user through a terminal so as to determine the distance between the current user and the access control; comparing the distance with a preset distance threshold, and if the distance is smaller than the preset distance threshold, sending an entrance guard card punching reminding message to a terminal of a user; otherwise, the entrance guard card punching reminding message is not sent to the terminal of the user.
The beneficial effects of the above technical scheme are: reading encrypted access control data from the block chain, and decrypting and analyzing the access control data to obtain a time point when the user firstly walks in and passes through the access control and a time point when the user secondly passes through and is far away from the access control, so that a stay time interval of the user can be determined according to the two time points; and comparing the stay time interval with a preset entrance guard time interval threshold value, and quantitatively evaluating the stay time interval of the user so as to quickly determine whether the stay time of the user meets the preset entrance guard time requirement. In addition, when it is determined that the time record of the user corresponding to the entrance guard does not meet the preset entrance guard time requirement, the distance between the user and the entrance guard is obtained (for example, the distance between the user and the entrance guard is determined by positioning the user terminal), and when the distance is smaller than the preset distance threshold, an entrance guard time prompt message is sent to the user terminal, so that the user can be timely informed of the early time of the user and the time of the user not meeting the corresponding entrance guard time requirement, and the user can conveniently make additional time of the user; the entrance guard card punching reminding message can be but is not limited to a message for reminding a user of punching a card for going off duty too early.
According to the content of the embodiment, the block chain-based access control data management method and system automatically acquire the face and limb images of the user through the access control by the user, record the time that the user passes through the access control, and determine the identity information of the user and the direction of the user passing through the access control after analyzing the acquired images; then packing and encrypting the access control data and uploading the data to the block chain, so that the access control data can be safely and reliably stored; in addition, still synchronous to user's terminal with the entrance guard data of block chain storage, the user can obtain self entrance guard time record of checking card through the inquiry terminal like this, and can also decipher and behind the analysis entrance guard data, send entrance guard time record of checking card and remind the message to user's terminal, so not only can utilize the block chain to carry out concentrated storage to user's entrance guard data, with this security that improves entrance guard data storage and reduce the probability that entrance guard data lose or are stolen, and can also be synchronous to the terminal with entrance guard data so that the user in time inquires self entrance guard data and sends entrance guard time record of checking card and remind the message, with this efficiency that improves user self entrance guard time and time record of checking card.
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 (10)

1. The block chain-based access control data management method is characterized by comprising the following steps of:
step S1, when the user passes through the entrance guard, collecting the face image and the limb image of the user, and simultaneously recording the time corresponding to the user passing through the entrance guard; analyzing the face image to determine identity information of the user; analyzing the limb image to determine the direction of the user passing through the entrance guard;
step S2, packing the time corresponding to the user passing the entrance guard, the direction of the entrance guard and the identity information of the user to form entrance guard data; after the access control data are encrypted, storing the encrypted access control data into a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user;
step S3, obtaining encrypted entrance guard data from the block chain, decrypting and analyzing the entrance guard data, and determining whether a card punching time record formed by a user through entrance guard correspondingly meets the requirement of the preset entrance guard card punching time or not; and when the condition is not met, sending an entrance guard card punching reminding message to the terminal of the user.
2. The block chain-based access control data management method of claim 1, characterized in that:
in the step S1, when the user passes through the door access, the face image and the limb image of the user are collected, and the time when the user passes through the door access is recorded; analyzing the face image to determine identity information of the user; analyzing the limb image to determine the direction of the user through the door access specifically comprises:
step S101, when a user passes through an access control, scanning and shooting the face of the user to obtain a face image of the user, and shooting the upper body and the lower limbs of the user to obtain upper body and lower limb images of the user; meanwhile, taking the initial moment of shooting the upper body and the lower limbs of the user as the time corresponding to the user passing through the entrance guard;
step S102, identifying the face image so as to determine facial feature information of the user; comparing the facial feature information with a preset user identity information database so as to determine the identity information of the user; the preset user identity information database comprises a one-to-one mapping relation between facial feature information of different users and identity information of the users;
step S103, identifying the upper body and lower limb images so as to determine the front orientation and the toe orientation of the upper body of the user; if the front face of the upper body faces the entrance guard and the tiptoes face the entrance guard, determining that the user is approaching and passing the entrance guard currently; if the front of the upper body faces back to the entrance guard and the toes face back to the entrance guard, it is determined that the user has currently passed through and is away from the entrance guard.
3. The block chain-based access control data management method of claim 1, characterized in that:
in step S2, packing the time corresponding to the user passing through the door access, the direction of the door access and the identity information of the user to form door access data; after the access control data are encrypted, storing the encrypted access control data into a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user specifically comprises the following steps:
step S201, comparing the time corresponding to the user passing through the entrance guard with a preset time interval; if the time corresponding to the user passing through the access control is within the preset time interval, determining the time corresponding to the user passing through the access control as valid time; otherwise, determining the time corresponding to the user passing through the access control as invalid time;
step S202, packaging the effective time, the direction of the user through the entrance guard and the identity information of the user to form entrance guard data; after the access control data are encrypted, storing the encrypted access control data into a block chain;
and step S203, synchronously storing the access control data stored in the block chain to the terminal of the user in a mirror mode.
4. The block chain-based access control data management method of claim 3, characterized in that:
in step S3, obtaining encrypted access control data from the block chain, decrypting and analyzing the access control data, so as to determine whether a card punch time record formed by the user through the access control correspondingly meets a preset access control card punch time requirement; when not satisfied, the reminding message of checking the card of entrance guard is sent to user's terminal specifically includes:
step S301, acquiring encrypted access control data from a block chain, decrypting and analyzing the access control data, and determining a time point when a user enters the access control data at the earliest time and passes through the access control data and a time point when the user exits the access control data at the latest time and is far away from the access control data; determining the time interval corresponding to the two time points, and taking the time interval as a time record for determining the time for the user to punch the card correspondingly through the entrance guard;
step S302, comparing the time interval with a preset entrance guard card punching time interval threshold, and if the time interval is greater than or equal to the preset entrance guard card punching time interval threshold, determining that a card punching time record correspondingly formed by a user through an entrance guard meets the preset entrance guard card punching time requirement; if the time interval is smaller than the preset entrance guard card punching time interval threshold, determining that a card punching time record formed by a user through entrance guard correspondingly does not meet the preset entrance guard card punching time requirement;
step S303, when a card punching time record formed by a user through corresponding access control does not meet the requirement of the preset access control card punching time, acquiring the real-time position of the user through a terminal so as to determine the distance between the user and the access control currently; comparing the distance with a preset distance threshold, and if the distance is smaller than the preset distance threshold, sending an entrance guard card punching reminding message to a terminal of a user; otherwise, the entrance guard card punching reminding message is not sent to the terminal of the user.
5. The block chain-based access control data management method of claim 4, characterized in that:
in step S202, after encrypting the access control data, storing the encrypted access control data in a block chain specifically includes:
the access control data is encrypted by using the following formula (1), because the access control data is formed by packaging the effective time, the direction of the user passing through the access control and the identity information of the user, in order to ensure the reliability of encryption processing, the three parts are subjected to cross encryption processing,
Figure FDA0003307502800000031
in the above-mentioned formula (1),
Figure FDA0003307502800000032
representing the corresponding binary form data after the door access data are encrypted; t is2Representing binary form data corresponding to effective time in the access control data; -representing a bitwise negation operation;
Figure FDA0003307502800000033
representing a circular left shift operation; len () represents the number of binary form data in parentheses; h2Binary form data corresponding to the access passing direction of the user in the access control data; g2Binary form data corresponding to the identity information of the user in the access control data is represented; the binary data on the left and right sides of the comma are connected;
through the process, the encrypted access control data is encrypted
Figure FDA0003307502800000041
Storing to a block chain;
in step S202, the mirror-synchronizing storing the access control data stored in the block chain to the terminal of the user specifically includes:
synchronously storing the access control data stored in the block chain to a terminal of a user in a mirror image manner, in the data mirror image process, as the received data transmission can not carry out mirror image copy on all the access control data, the access control data stored in the block chain needs to be divided and then carried out data mirror image copy, so as to ensure that the data size of each mirror image copy can not exceed the maximum data amount allowed to be transmitted in the mirror image copy process, in addition, as the access control data is divided and then carried out mirror image copy, the last 20-bit sub-data of the previous section of divided data can be divided into the first 20-bit sub-data of the next section of divided data again in the dividing process, and whether the first 20-bit sub-data of the next section of divided data is consistent with the last 20-bit sub-data of the previous section of divided data is judged in the mirror image copy process, so as to judge whether the data copied by the access control image is accurate, the process is shown in the following formula (2),
Figure FDA0003307502800000042
in the formula (2), λ (i) represents a determination value indicating whether mirror image copying of ith data of the gate inhibition data partition stored in the block chain is accurate or not;
Figure FDA0003307502800000043
the corresponding binary form data is obtained after mirror image copying is carried out on ith data which represents the door control data segmentation stored in the block chain;&indicating a bitwise AND operation; (11.. 1) represents binary data in which 20 binary "1" s are all present; z2]The inversion operation is represented, namely binary data in brackets are inverted; n represents the number of data obtained by dividing the access control data stored in the block chain;
if lambda (i) is 0, the ith data after the entrance guard data stored in the block chain is divided is successfully subjected to mirror image copying and is synchronously stored to the terminal of the user;
if lambda (i) ≠ 0, it indicates that the ith data after the entrance guard data stored in the block chain is segmented is not successfully mirror-copied and synchronously stored in the terminal of the user; at the moment, the ith data obtained by dividing the access control data stored in the block chain is collected again, and the formula (2) is used again for calculation until mirror image copying is successful; and if the number of times of re-collecting the ith data exceeds 10 times, feeding back a mirror image copy error message so as to repair the ith data.
6. The block chain-based access control data management method of claim 5, wherein:
in step S301, obtaining encrypted access control data from a block chain, and decrypting the access control data specifically includes:
because the encrypted access control data stored in the blockchain comprises a comma connecting three different data parts, the corresponding three different data parts can be obtained from the encrypted access control data according to the position of the comma in the encrypted access control data, each different data part is decrypted by using the following formula (3),
Figure FDA0003307502800000051
in the above formula (3), D2Representing binary form data obtained by decrypting the encrypted access control data acquired from the block chain; [ F (1)]2Representing binary form data corresponding to a first part of data obtained by dividing according to the position of a comma in the encrypted access control data; [ F (2)]2Representing binary form data corresponding to second part of data obtained by dividing according to the position of the comma in the encrypted access control data; [ F (3)]2Representing binary form data corresponding to a third part of data obtained by dividing according to the position of the comma in the encrypted access control data;
Figure FDA0003307502800000052
indicating a circular right shift operation.
7. The block chain-based access control data management system is characterized by comprising an image acquisition and analysis module, a time recording module, an access control data packaging and processing module, a user access control card punching time analysis module and a card punching reminding module; wherein the content of the first and second substances,
the image acquisition and analysis module is used for acquiring a face image and a limb image of a user when the user passes through the entrance guard; analyzing the face image to determine identity information of the user; analyzing the limb image to determine the direction of the user passing through the entrance guard;
the time recording module is used for recording the time corresponding to the user passing through the entrance guard;
the entrance guard data packing and processing module is used for packing the time corresponding to the user passing through the entrance guard, the direction of the entrance guard and the identity information of the user to form entrance guard data; after the access control data are encrypted, storing the encrypted access control data into a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user;
the user access control card punching time analysis module is used for acquiring encrypted access control data from the block chain, decrypting and analyzing the access control data, and determining whether a card punching time record formed by a user through access control correspondingly meets the requirement of preset access control card punching time or not;
the card punching reminding module is used for sending an entrance guard card punching reminding message to a terminal of a user when a card punching time record formed by the user through corresponding entrance guard does not meet the requirement of the preset entrance guard card punching time.
8. The block chain based access control data management system of claim 7, wherein:
the image acquisition and analysis module is used for acquiring a face image and a limb image of a user when the user passes through the entrance guard; analyzing the face image to determine identity information of the user; analyzing the limb image to determine the direction of the user through the door access specifically comprises:
when a user passes through the access control, the face of the user is scanned and shot so as to obtain a face image of the user, and the upper body and the lower limbs of the user are shot so as to obtain an upper body and lower limb image of the user;
identifying the face image so as to determine facial feature information of the user; comparing the facial feature information with a preset user identity information database so as to determine the identity information of the user; the preset user identity information database comprises a one-to-one mapping relation between facial feature information of different users and identity information of the users;
identifying the upper body and lower limb images so as to determine the front orientation and the toe orientation of the upper body of the user; if the front face of the upper body faces the entrance guard and the tiptoes face the entrance guard, determining that the user is approaching and passing the entrance guard currently; if the front of the upper body faces back to the entrance guard and the toes face back to the entrance guard, determining that the user passes through and is far away from the entrance guard currently;
and the number of the first and second groups,
the time recording module is used for recording the time corresponding to the user through the entrance guard and specifically comprises:
and taking the initial moment of shooting the upper body and the lower limbs of the user as the time corresponding to the user passing through the entrance guard.
9. The block chain based access control data management system of claim 7, wherein:
the entrance guard data packing and processing module is used for packing the time corresponding to the user passing through the entrance guard, the direction of the entrance guard and the identity information of the user to form entrance guard data; after the access control data are encrypted, storing the encrypted access control data into a block chain; meanwhile, synchronizing the access control data stored in the block chain to the terminal of the user specifically comprises the following steps:
comparing the time corresponding to the user passing through the access control with a preset time interval; if the time corresponding to the user passing through the access control is within the preset time interval, determining the time corresponding to the user passing through the access control as valid time; otherwise, determining the time corresponding to the user passing through the access control as invalid time;
packing the effective time, the direction of the access control by the user and the identity information of the user to form access control data; after the access control data are encrypted, storing the encrypted access control data into a block chain;
and synchronously storing the access control data stored in the block chain to the terminal of the user in a mirror mode.
10. The block chain based access control data management system of claim 7, wherein:
the user entrance guard time analysis module of checking card is used for obtaining encrypted entrance guard data from the block chain, deciphers and analyzes the entrance guard data to this confirms whether the user meets the time requirement of presetting entrance guard time of checking card that corresponds the formation through entrance guard specifically includes:
acquiring encrypted access control data from the block chain, decrypting and analyzing the access control data so as to determine a time point when a user firstly walks in and passes through the access control in the access control data and a time point when the user finally goes out and is far away from the access control; determining the time interval corresponding to the two time points, and taking the time interval as a time record for determining the time for the user to punch the card correspondingly through the entrance guard;
comparing the time interval with a preset entrance guard card punching time interval threshold, and if the time interval is greater than or equal to the preset entrance guard card punching time interval threshold, determining that a card punching time record formed by a user through an entrance guard correspondingly meets the preset entrance guard card punching time requirement; if the time interval is smaller than the preset entrance guard card punching time interval threshold, determining that a card punching time record formed by a user through entrance guard correspondingly does not meet the preset entrance guard card punching time requirement;
and the number of the first and second groups,
the card punching reminding module is used for sending an entrance guard card punching reminding message to a user terminal when a user does not meet the requirement of presetting entrance guard card punching time through a card punching time record formed by entrance guard correspondence, and specifically comprises the following steps:
when a card punching time record formed by a user through corresponding access control does not meet the requirement of the preset access control card punching time, acquiring the real-time position of the user through a terminal so as to determine the distance between the current user and the access control; comparing the distance with a preset distance threshold, and if the distance is smaller than the preset distance threshold, sending an entrance guard card punching reminding message to a terminal of a user; otherwise, the entrance guard card punching reminding message is not sent to the terminal of the user.
CN202111207680.0A 2021-10-18 2021-10-18 Access control data management method and system based on block chain Active CN114116886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111207680.0A CN114116886B (en) 2021-10-18 2021-10-18 Access control data management method and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111207680.0A CN114116886B (en) 2021-10-18 2021-10-18 Access control data management method and system based on block chain

Publications (2)

Publication Number Publication Date
CN114116886A true CN114116886A (en) 2022-03-01
CN114116886B CN114116886B (en) 2022-12-20

Family

ID=80375887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111207680.0A Active CN114116886B (en) 2021-10-18 2021-10-18 Access control data management method and system based on block chain

Country Status (1)

Country Link
CN (1) CN114116886B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011048742A (en) * 2009-08-28 2011-03-10 Nec Computertechno Ltd Device, circuit, method and program for mirroring control
CN108629337A (en) * 2018-06-11 2018-10-09 深圳市益鑫智能科技有限公司 A kind of face recognition door control system based on block chain
CN109215154A (en) * 2018-09-26 2019-01-15 广州高清视信数码科技股份有限公司 A kind of attendance checking sign-in method and system based on block chain
JP2019209585A (en) * 2018-06-04 2019-12-12 キヤノン株式会社 Image formation apparatus, control method and program of image formation apparatus
CN112241541A (en) * 2020-10-21 2021-01-19 广东金杭科技有限公司 Community security application method based on block chain and portrait recognition technology
CN112507972A (en) * 2020-12-28 2021-03-16 贵州东冠科技有限公司 Performance assessment system based on block chain
CN113487779A (en) * 2021-07-22 2021-10-08 深圳创维-Rgb电子有限公司 Access control method, access terminal and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011048742A (en) * 2009-08-28 2011-03-10 Nec Computertechno Ltd Device, circuit, method and program for mirroring control
JP2019209585A (en) * 2018-06-04 2019-12-12 キヤノン株式会社 Image formation apparatus, control method and program of image formation apparatus
CN108629337A (en) * 2018-06-11 2018-10-09 深圳市益鑫智能科技有限公司 A kind of face recognition door control system based on block chain
CN109215154A (en) * 2018-09-26 2019-01-15 广州高清视信数码科技股份有限公司 A kind of attendance checking sign-in method and system based on block chain
CN112241541A (en) * 2020-10-21 2021-01-19 广东金杭科技有限公司 Community security application method based on block chain and portrait recognition technology
CN112507972A (en) * 2020-12-28 2021-03-16 贵州东冠科技有限公司 Performance assessment system based on block chain
CN113487779A (en) * 2021-07-22 2021-10-08 深圳创维-Rgb电子有限公司 Access control method, access terminal and storage medium

Also Published As

Publication number Publication date
CN114116886B (en) 2022-12-20

Similar Documents

Publication Publication Date Title
EP1872351B1 (en) Vehicle speed monitoring system
US7362210B2 (en) System and method for gate access control
KR101185191B1 (en) System for Managing diligence of worker
CN103268652B (en) Based on Gate-ban Monitoring System and the method for residence permit badge
KR102031241B1 (en) Apparatus and Method for Managing Self-driving information based on Block Chain
EP3514760B1 (en) Method and system for privacy compliant data recording
CN108320582B (en) Parking management system with remaining parking space counting function
JP2013069155A (en) Face authentication database construction method, face authentication device, and face authentication program
EP3348033A1 (en) A trusted geolocation beacon and a method for operating a trusted geolocation beacon
CN114116886B (en) Access control data management method and system based on block chain
CN109446774B (en) Identity recognition application method and system
CN117176858A (en) Communication terminal information acquisition method and system
JP2006099687A (en) User authentication device
US8850198B2 (en) Method for validating a road traffic control transaction
CN114710802A (en) Network wireless signal detection device
CN114596643A (en) Parking management method, parking management device and storage medium
EP3929884B1 (en) Device, method and program
KR102130385B1 (en) Hybrid mobile terminal for identification by mode, Hybrid system for identification by mode
CN111402443B (en) Supervision attendance method, client and storage medium thereof
CN116453066B (en) Intelligent video monitoring method and system for park
JP2003178274A (en) Issuing device and issuing system for information storage medium used for access control
Thapa ENHANCED VEHICLE NUMBER PLATE RECOGNITION AND PARKING MANAGEMENT SYSTEM
CN115440053A (en) Vehicle violation snapshot method, device and system, electronic device and storage medium
CN117409504A (en) Body temperature detection system and method for security protection of intelligent park
WO2024030820A1 (en) Auto-programming door and camera relationships for a security system

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
TA01 Transfer of patent application right

Effective date of registration: 20221206

Address after: South 204, Investment Promotion Bureau, No. 15, Xinbei Road, Miyun District, Beijing 101599

Applicant after: Beijing Zhonghuan Xinrong Technology Co.,Ltd.

Address before: 102400 No. 1, zone 1, Guba Road, Chengguan Street, Fangshan District, Beijing - s679

Applicant before: Deming Shangpin Technology Group Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant