A method, apparatus, electronic device and storage medium for generating access control QR codes

CN117496622BActive Publication Date: 2026-08-14BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-01
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0006]本发明提供了一种门禁二维码生成方法、装置、电子设备及存储介质,用于解决现有的门禁二维码容易被技术破解的技术问题

Benefits of technology

[0043]从以上技术方案可以看出,本发明具有以下优点:本发明公开了一种门禁二维码生成方法,包括:主控组件接收用户在触控组件上绘制的随机图形;提取随机图形中的目标坐标点及各目标坐标点的目标绘制时间点;采用目标坐标点和目标绘制时间点生成开门凭证;采用开门凭证生成门禁二维码。本发明通过用户随机绘制生成图形,并从随机生成的图形选择若干个目标坐标点及其绘制时间点来生成开门凭证,从而使得开门凭证的生成更具随机性,且无需服务器参与,提高基于开门凭证生成的门禁二维码的安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117496622B_ABST
    Figure CN117496622B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, electronic device, and storage medium for generating access control QR codes, addressing the technical problem that existing access control QR codes are easily cracked. The invention includes: a main control component receiving a random graphic drawn by a user on a touch component; extracting target coordinate points and target drawing time points from the random graphic; generating an access voucher using the target coordinate points and target drawing time points; and generating an access control QR code using the access voucher. This invention reduces the repetition of access vouchers by using random graphic coordinates; then, by combining unique factors such as time and device ID, it encrypts and generates access vouchers using an algorithm, enhancing the uniqueness of the access vouchers and thus improving their security. Even the same graphic can be distinguished by differences in starting coordinates, drawing order, coordinate deviation, time, and other factors, making the generated access vouchers difficult to crack based on their generation method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of access control technology, and in particular to a method, apparatus, electronic device, and storage medium for generating access control QR codes. Background Technology

[0002] Currently, access control systems primarily use passwords, IC cards, and biometric identification methods for identity verification. These technologies share the common feature that the identity credentials (such as static passwords, IC cards, fingerprints, or facial recognition) are fixed and unchanging, thus creating varying degrees of risk of identity theft.

[0003] With the rapid development of mobile payment in China, the use of QR codes has become widespread. A QR code is a black-and-white graphic that records data symbols and information, arranged in a two-dimensional plane using specific geometric shapes. Its coding cleverly utilizes the concepts of "0" and "1," which form the basis of computer logic, using several geometric shapes corresponding to binary to represent textual and numerical information. This information is automatically processed through image input devices or photoelectric scanning devices. It shares some common characteristics with barcode technology: each code system has its specific character set; each character occupies a certain width; and it has certain verification functions. It also has the ability to automatically recognize information from different rows and handle points where the graphic rotates.

[0004] The use of QR codes has greatly facilitated people's lives. In addition to mobile payments, QR codes can also serve as access credentials, applied to smart locks, smart doors, turnstiles, and other smart home access devices, supplementing door opening identification methods and improving both security and convenience.

[0005] Currently, QR codes are mainly generated through algorithmic encryption or converted from other keys, which poses a risk of password cracking due to key leakage. Summary of the Invention

[0006] This invention provides a method, apparatus, electronic device, and storage medium for generating access control QR codes, which solves the technical problem that existing access control QR codes are easily cracked.

[0007] This invention provides a method for generating access control QR codes, applied to an access control system, the access control system including a main control component and a touch control component; the method includes:

[0008] The main control component receives random graphics drawn by the user on the touch component;

[0009] Extract the target coordinate points and the target drawing time points of each target coordinate point from the random graphic;

[0010] The door opening certificate is generated using the target coordinates and the target drawing time.

[0011] The access control QR code is generated using the access certificate.

[0012] Optionally, the access control system further includes an image acquisition component and a lock control component; the method further includes:

[0013] When the image acquisition component acquires the access control QR code to be recognized, it parses the access control QR code to be recognized to obtain the verification credential;

[0014] The credential to be verified is matched with the access credentials stored in the main control component;

[0015] When a match is successful, the QR code is deemed valid, and an unlocking command is sent to the lock control component; the unlocking command is used to trigger the unlocking operation of the lock control component.

[0016] Optionally, the step of extracting the target coordinate points and the target drawing time points of each target coordinate point in the random graphic includes:

[0017] Obtain the total drawing time of the random graphic and the drawing time of each coordinate point within the random graphic;

[0018] The acquisition interval is calculated based on the total drawing time and the preset acquisition quantity;

[0019] Based on the drawing time of each coordinate point within the random graphic and the acquisition interval, a target coordinate point is determined among the coordinate points, and the target drawing time of the target coordinate point is determined.

[0020] Optionally, the step of generating the door opening certificate using the target coordinate point and the target drawing time point includes:

[0021] Combine the target coordinates and the target drawing time to generate an opening certificate.

[0022] Optionally, the step of generating an access control QR code using the access certificate includes:

[0023] Obtain the device ID of the main control component;

[0024] The device ID is used as a security key to encrypt the access credential, resulting in encrypted data.

[0025] The encrypted data is converted into an access control QR code.

[0026] The present invention also provides an access control QR code generation device, applied to an access control system, the access control system including a main control component and a touch control component; the device includes:

[0027] A random graphic receiving module is used by the main control component to receive random graphics drawn by the user on the touch component;

[0028] The coordinate and time extraction module is used to extract the target coordinate points and the target drawing time points of each target coordinate point in the random graphic.

[0029] The door opening voucher generation module is used to generate a door opening voucher using the target coordinate point and the target drawing time point;

[0030] The access control QR code generation module is used to generate an access control QR code using the access certificate.

[0031] Optionally, the access control system further includes an image acquisition component and a lock control component; the device further includes:

[0032] The verification credential parsing module is used to parse the access control QR code to be recognized and obtain the verification credential when the image acquisition component acquires the access control QR code to be recognized.

[0033] The matching module is used to match the credential to be verified with the door opening credential stored in the main control component;

[0034] The unlocking module is used to determine the validity of the QR code when a match is successful and send an unlocking command to the lock control component; the unlocking command is used to trigger the unlocking operation of the lock control component.

[0035] Optionally, the coordinate and time extraction module includes:

[0036] The total drawing time and drawing time point acquisition submodule is used to obtain the total drawing time of the random graphic and the drawing time point of each coordinate point within the random graphic;

[0037] The acquisition interval calculation submodule is used to calculate the acquisition interval based on the total drawing time and the preset acquisition quantity;

[0038] The coordinate and time extraction submodule is used to determine the target coordinate point among the coordinate points based on the drawing time point of each coordinate point in the random graphic and the acquisition interval, and to determine the target drawing time point of the target coordinate point.

[0039] The present invention also provides an electronic device, the device comprising a processor and a memory:

[0040] The memory is used to store program code and transmit the program code to the processor;

[0041] The processor is used to execute the access control QR code generation method as described above, according to the instructions in the program code.

[0042] The present invention also provides a computer-readable storage medium for storing program code for executing the access control QR code generation method as described in any of the preceding claims.

[0043] As can be seen from the above technical solutions, the present invention has the following advantages: The present invention discloses a method for generating access control QR codes, comprising: a main control component receiving a random graphic drawn by a user on a touch component; extracting target coordinate points and target drawing time points of each target coordinate point from the random graphic; generating an access credential using the target coordinate points and target drawing time points; and generating an access control QR code using the access credential. The present invention generates access credentials by having the user randomly draw a graphic and then selecting several target coordinate points and their drawing time points from the randomly generated graphic, thereby making the generation of access credentials more random and eliminating the need for server intervention, thus improving the security of access control QR codes generated based on access credentials. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 A flowchart illustrating the steps of a method for generating access control QR codes, as provided in an embodiment of the present invention;

[0046] Figure 2 A flowchart illustrating the steps of a method for generating access control QR codes, as provided in another embodiment of the present invention;

[0047] Figure 3 This is a schematic diagram of a drawing reference provided for an embodiment of the present invention;

[0048] Figure 4 This is a structural block diagram of an access control QR code generation device provided in an embodiment of the present invention. Detailed Implementation

[0049] This invention provides a method, apparatus, electronic device, and storage medium for generating access control QR codes, which addresses the technical problem that existing access control QR codes are easily cracked.

[0050] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0051] Please see Figure 1 , Figure 1 This is a flowchart illustrating the steps of a method for generating access control QR codes, as provided in an embodiment of the present invention.

[0052] This invention provides a method for generating access control QR codes, which is applied to an access control system. The access control system includes a main control component and a touch component. The main control component can be a central control device used to process and forward received data. The touch component can be a touch screen used to receive user input commands and collect user drawing actions.

[0053] The method may specifically include the following steps:

[0054] Step 101: The main control component receives a random graphic drawn by the user on the touch component;

[0055] In this embodiment of the invention, the touch component can be installed on or next to the door and connected to the main control component (either via wired or wireless connection). When a user needs to generate their own access control QR code, they can randomly draw a graphic on the touch component. Furthermore, the touch component can also provide the user with a drawing reference image, which the user can use to draw a random graphic.

[0056] In one example, the random graphic can be composed of curves or straight lines, and there is no limit to the number of strokes used to draw it; it can be drawn with a single stroke or multiple strokes. When the random graphic is drawn with multiple strokes, a preset drawing time threshold can be set to combine graphics drawn within a certain time interval into a random graphic used to generate the door opening voucher.

[0057] Step 102: Extract the target coordinate points and the target drawing time points of each target coordinate point from the random graphic;

[0058] In this embodiment of the invention, after the main control component obtains the random graphic drawn by the user, it can determine the coordinates of each point on the random graphic according to the drawing direction of the random graphic, and then select several coordinates as target coordinate points from the coordinates of the random graphic, and determine the target drawing time point of each target coordinate point.

[0059] Step 103: Generate the door opening certificate using the target coordinate point and the target drawing time point;

[0060] After determining the target coordinate point in the random graphic, the target coordinate point and the target drawing time point can be used to generate the door opening certificate.

[0061] In one example, the door opening certificate can be a string composed of the target coordinates and the corresponding target drawing time points arranged in a certain order.

[0062] Step 104: Generate an access control QR code using the access certificate.

[0063] After generating the access pass using the target coordinates and the corresponding target drawing time, the access pass can be converted into an access control QR code.

[0064] In specific implementations, any method known in existing technology can be used to generate access control QR codes, such as converting the access credential into a string (X-String) using Base64 Encoding, and then converting the X-String into an access control QR code (X-qr code) using open-source tools. This embodiment of the invention does not impose specific limitations on this.

[0065] This invention generates access vouchers by randomly drawing graphics by the user and selecting several target coordinate points and their drawing time points from the randomly generated graphics. This makes the generation of access vouchers more random and does not require server involvement, thereby improving the security of access control QR codes generated based on access vouchers.

[0066] Please see Figure 2 , Figure 2 A flowchart illustrating the steps of a method for generating access control QR codes, as provided in another embodiment of the present invention. Specifically, it may include the following steps:

[0067] Step 201: The main control component receives a random graphic drawn by the user on the touch component;

[0068] In this embodiment of the invention, the touch component can be installed on or next to the door and connected to the main control component (either via wired or wireless connection). When a user needs to generate their own access control QR code, the touch component can provide the user with a drawing reference image, which the user can then use to draw random graphics.

[0069] In one example, drawing a reference diagram can be done as follows: Figure 3 As shown. It is not limited to using pentagrams, circles, or other complex shapes.

[0070] Step 202: Extract the target coordinate points and the target drawing time points of each target coordinate point from the random graphic;

[0071] In this embodiment of the invention, after the main control component obtains the random graphic drawn by the user, it can determine the coordinates of each point on the random graphic according to the drawing direction of the random graphic, and then select several coordinates as target coordinate points from the coordinates of the random graphic, and determine the target drawing time point of each target coordinate point.

[0072] In one example, the steps of extracting target coordinate points and the target drawing time points of each target coordinate point from a random graphic may specifically include the following sub-steps:

[0073] S21, obtain the total drawing time of the random graphic and the drawing time of each coordinate point within the random graphic;

[0074] S22, calculate the collection interval based on the total drawing time and the preset collection quantity;

[0075] S23. Based on the drawing time and collection interval of each coordinate point in the random graphic, determine the target coordinate point among the coordinate points, and determine the drawing time of the target coordinate point.

[0076] In the specific implementation, the main control component can first record the starting and ending coordinates of the user's drawing, and obtain the total drawing time between the starting and ending coordinates. Then, it calculates the collection interval based on the total drawing time and the preset collection quantity, so as to select several intermediate coordinates in the random graphic.

[0077] Record the start time of the user drawing a random graphic as T0 and the end time as T1. Preset the number of coordinates to be collected, denoted by n, and t / n represents the collection interval for each point. The start coordinates and end coordinates are X1 and Xn, respectively. According to the collection interval t / n of the drawing time points, the corresponding coordinate values ​​X1, X2, X3, ..., Xn-1, Xn of each time point T0, T0+t / n, T0+2t / n, ..., T0+(n-1)t / n, T1 are taken as the target coordinate points.

[0078] The obtained target coordinates and corresponding target drawing time points are combined to form the original inscription data, which is then stored in the main control component. The resulting original inscription data is shown in Table 1 below (taking three coordinates as an example):

[0079]

[0080] Table 1

[0081] Step 203: Generate the door opening certificate using the target coordinate point and the target drawing time point;

[0082] After determining the target coordinate point in the random graphic, the target coordinate point and the target drawing time point can be used to generate the door opening certificate.

[0083] In one example, the steps of generating an opening voucher using target coordinates and target drawing time can specifically include: combining the target coordinates and target drawing time to generate the opening voucher.

[0084] In the specific implementation, the target coordinates can be represented in hexadecimal to obtain a coordinate string; the target drawing time can be converted into a timestamp and represented in hexadecimal to obtain a time string; then the coordinate string and the time string are combined to obtain the door opening voucher code. The obtained door opening voucher is then stored in local space for subsequent identification and comparison. Taking the three coordinates in Table 1 as an example, the obtained door opening voucher codes are shown in Table 2 below:

[0085]

[0086]

[0087] Table 2

[0088] Step 204: Generate an access control QR code using the access certificate;

[0089] After generating the access pass, you can use the access pass to generate an access control QR code.

[0090] In one example, the step of generating an access control QR code using an access credential may specifically include the following sub-steps:

[0091] S41, obtain the device ID of the main control component;

[0092] S42, using the device ID as the security key to encrypt the door opening credential, obtain encrypted data;

[0093] S43 converts encrypted data into access control QR codes.

[0094] In the specific implementation, before converting the door opening credential into an access control QR code, it can first be encrypted. The device ID of the main control component is used as the security key. The door opening credential is encrypted into an X-Code using open source algorithms such as AES, DES, and RC4. Then, the X-Code is converted into a string X-String using open source tools, and the string is converted into a QR code X-qr code using open source tools, and then sent to the user.

[0095] Optionally, when multiple devices need to use the same access credential, the device ID of the main control component can be used to request security factor K from the cloud, and security factor K can be used as the key for encryption.

[0096] Step 205: When the access control QR code to be recognized is acquired by the image acquisition component, the access control QR code to be recognized is parsed to obtain the verification credential;

[0097] Step 206: Match the credential to be verified with the access credentials stored in the main control component;

[0098] Step 207: When the match is successful, the QR code is determined to be valid, and an unlock command is sent to the lock control component; the unlock command is used to trigger the unlock operation of the lock control component.

[0099] In this embodiment of the invention, the image acquisition component can be a camera or a QR code scanner. When a user arrives at the entrance door, the camera or QR code scanner is activated to recognize the access control QR code presented by the user. The recognized QR code is then sent to the main control component. The main control component identifies and parses the QR code to obtain a verification credential. This credential is then matched with locally stored access credentials. If a match is successful, the main control component controls the lock or door control component to unlock the door. If a match fails, the lock or door control component is not activated.

[0100] This invention reduces the repetitiveness of access vouchers by using random graphic coordinates; then, it combines unique factors such as time and device ID to generate access vouchers through algorithmic encryption, thereby enhancing the uniqueness of access vouchers and improving their security; even the same graphic can be distinguished by differences in starting coordinates, drawing order, coordinate deviation, time, and other factors, making it difficult to crack the generated access vouchers from the generation method.

[0101] Please see Figure 4 , Figure 4 This is a structural block diagram of an access control QR code generation device provided in an embodiment of the present invention.

[0102] This invention provides an access control QR code generation device for use in access control systems, which include a main control component and a touch control component; the device includes:

[0103] The random graphic receiving module 401 is used by the main control component to receive random graphics drawn by the user on the touch component;

[0104] The coordinate and time extraction module 402 is used to extract the target coordinate points and the target drawing time points of each target coordinate point in a random graphic.

[0105] The door opening voucher generation module 403 is used to generate a door opening voucher using the target coordinate point and the target drawing time point;

[0106] Access control QR code generation module 404 is used to generate access control QR codes using access credentials.

[0107] In this embodiment of the invention, the access control system further includes an image acquisition component and a lock control component; the device further includes:

[0108] The verification credential parsing module is used to parse the access control QR code to be recognized when it is acquired by the image acquisition component to obtain the verification credential.

[0109] The matching module is used to match the credential to be verified with the access credentials stored in the master control component;

[0110] The unlocking module is used to determine the validity of the QR code when a match is successful and send an unlocking command to the lock control component; the unlocking command is used to trigger the unlocking operation of the lock control component.

[0111] In this embodiment of the invention, the coordinate and time extraction module 402 includes:

[0112] The submodule for obtaining total drawing time and drawing time points is used to obtain the total drawing time of a random graphic and the drawing time point of each coordinate point within the random graphic.

[0113] The acquisition interval calculation submodule is used to calculate the acquisition interval based on the total drawing time and the preset acquisition quantity;

[0114] The coordinate and time extraction submodule is used to determine the target coordinate point among the coordinate points based on the drawing time point and collection interval of each coordinate point in the random graphic, and to determine the target drawing time point of the target coordinate point.

[0115] In this embodiment of the invention, the door opening certificate generation module 403 includes:

[0116] The door opening voucher generation submodule is used to combine the target coordinate point and the target drawing time point to generate the door opening voucher.

[0117] In this embodiment of the invention, the access control QR code generation module 404 includes:

[0118] The Device ID Acquisition Submodule is used to obtain the device ID of the main control component;

[0119] The encryption submodule is used to encrypt the access credential using the device ID as the security key to obtain encrypted data.

[0120] The access control QR code conversion submodule is used to convert encrypted data into access control QR codes.

[0121] This invention also provides an electronic device, which includes a processor and a memory:

[0122] The memory is used to store program code and transfer the program code to the processor;

[0123] The processor is used to execute the access control QR code generation method of this invention according to the instructions in the program code.

[0124] This invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store program code, which is used to execute the access control QR code generation method of this invention.

[0125] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0126] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0127] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0128] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0129] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0131] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0132] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0133] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating access control QR codes, characterized in that, Applied to an access control system, the access control system including a main control component and a touch component; the method includes: The main control component receives one or more random graphics without a preset trajectory drawn by the user on the touch component within a preset drawing time threshold. Extracting target coordinate points and target drawing time points of each target coordinate point from the random graphic; the step of extracting target coordinate points and target drawing time points of each target coordinate point from the random graphic includes: Record the starting and ending coordinates of the user drawing the random graphic, and obtain the total drawing time between the starting and ending coordinates; The collection interval is calculated based on the total drawing time and the preset number of collections. Several target coordinate points are selected in the random graphic, and the target drawing time point corresponding to each target coordinate point is determined. The target coordinates are expressed in hexadecimal to obtain a coordinate string; the target drawing time is converted into a timestamp and expressed in hexadecimal to obtain a time string; the coordinate string and the time string are combined to generate an opening voucher. The access control QR code is generated using the access credential; the process of generating the access control QR code using the access credential includes: obtaining the device ID of the main control component, encrypting the access credential using the device ID as a security key to obtain encrypted data, and converting the encrypted data into the access control QR code.

2. The method according to claim 1, characterized in that, The access control system further includes an image acquisition component and a lock control component; the method further includes: When the image acquisition component acquires the access control QR code to be recognized, it parses the access control QR code to be recognized to obtain the verification credential; The credential to be verified is matched with the access credentials stored in the main control component; When a match is successful, the QR code is deemed valid, and an unlocking command is sent to the lock control component; the unlocking command is used to trigger the unlocking operation of the lock control component.

3. A QR code generation device for access control, characterized in that, The device is applied to an access control system, which includes a main control component and a touch control component; the device includes: The random graphic receiving module is used by the main control component to receive one or more random graphics without a preset trajectory drawn by the user on the touch component within a preset drawing time threshold. A coordinate and time extraction module is used to extract target coordinate points and the target drawing time points of each target coordinate point in the random graphic; the coordinate and time extraction module includes: The drawing information recording submodule is used to record the starting and ending coordinates of the random graphic drawn by the user; The total drawing time acquisition submodule is used to obtain the total drawing time between the start coordinates and the end coordinates; The sampling interval calculation submodule is used to calculate the sampling interval based on the total drawing time and the preset number of samples. The coordinate and time extraction submodule is used to select several target coordinate points in the random graphic according to the acquisition interval, and determine the target drawing time point corresponding to each target coordinate point; The door opening voucher generation module is used to express the target coordinate point in hexadecimal to obtain a coordinate string; convert the target drawing time point into a timestamp and express it in hexadecimal to obtain a time string; and combine the coordinate string and the time string to generate a door opening voucher. Access control QR code generation module, used to generate access control QR code using the access certificate; The access control QR code generation module is specifically used to obtain the device ID of the main control component, use the device ID as a security key to encrypt the access credential, and obtain encrypted data; and convert the encrypted data into the access control QR code.

4. The apparatus according to claim 3, characterized in that, The access control system further includes an image acquisition component and a lock control component; the device also includes: The verification credential parsing module is used to parse the access control QR code to be recognized and obtain the verification credential when the image acquisition component acquires the access control QR code to be recognized. The matching module is used to match the credential to be verified with the door opening credential stored in the main control component; The unlocking module is used to determine the validity of the QR code when a match is successful and send an unlocking command to the lock control component; the unlocking command is used to trigger the unlocking operation of the lock control component.

5. An electronic device, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the access control QR code generation method according to any one of claims 1-2 according to the instructions in the program code.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the access control QR code generation method according to any one of claims 1-2.

Citation Information

Patent Citations

  • Gesture unlocking method and system

    CN104932797A

  • An IOS device gesture operation implementation method for real machine testing

    CN109670292A