QR code security verification method, device and computer-readable storage medium
By detecting the scanning time and number of times a QR code is scanned within a preset response time, the target scanning terminal is identified, and a QR code matching permissions and region is generated, thus solving the problem of low QR code information security and achieving higher scanning security.
Patent Information
- Application Number
- CN202210504963.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-10
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-05-10
AI Technical Summary
In existing technologies, QR codes are easily scanned by non-target scanning devices after scanning, resulting in reduced information security.
By detecting the scanning behavior of multiple scanning terminals within a preset response time, the scanning time and number of times are obtained, the target scanning terminal is identified, and only valid scanning operations are responded to, generating a QR code that matches the scanning terminal's permissions and region.
This effectively prevents unauthorized scanning of QR codes, improving the security of QR code information and enhancing the accuracy and security of scanning operations.
Smart Images

Figure CN114912554B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a two-dimensional code security verification method, device and computer-readable storage medium. Background Art
[0002] Regarding the use of QR codes, the app generally generates the QR code, and the scanner scans the QR code generated by the app, and locates the QR code encoding sequence according to the positioning pattern in the QR code to interpret the QR code information. However, with the above scanning method, the QR code is easily scanned by other non-target scanners within the response time after the target scanner scans the QR code, thereby reducing the security of the QR code information. Summary of the invention
[0003] The embodiments of the present invention provide a two-dimensional code security verification method, device and computer-readable storage medium, aiming to solve the technical problem of how to improve the security of two-dimensional code information.
[0004] An embodiment of the present invention provides a two-dimensional code security verification method, the method comprising:
[0005] When receiving a QR code generation request from a code output terminal, in response to the QR code generation request, the QR code is sent to the code output terminal;
[0006] When multiple scanning terminals are detected scanning the QR code within a preset response time, the scanning time of the QR code is obtained;
[0007] Determine the target scanning end according to the scanning time;
[0008] When it is determined that the scanning operation of the target code scanning end is valid, respond to the scanning operation of the target code scanning end.
[0009] In one embodiment, when it is detected that multiple code scanning terminals scan the two-dimensional code within the preset response time, before the step of obtaining the scanning time of the two-dimensional code, it also includes:
[0010] When multiple scanning terminals are detected to scan the QR code within a preset response time, the number of times the QR code is scanned is obtained;
[0011] Determine whether the number of scans is greater than a preset number;
[0012] When the number of scanned times is greater than the preset number of times, determining that multiple scanning terminals are detected scanning the QR code within a preset response time;
[0013] When the number of scanned times is less than or equal to the preset number of times, respond to the scanning operation of each of the scanning terminals.
[0014] In one embodiment, upon receiving a QR code generation request from a code output terminal, the step of sending the QR code to the code output terminal in response to the QR code generation request includes:
[0015] Upon receiving a QR code generation request from a code output end, determining a request type of the QR code generation request in response to the QR code generation request;
[0016] When the request type is an offline type, request input into the code scanning area;
[0017] Upon receiving the code scanning area, obtaining a network segment associated with the code scanning area;
[0018] generating the QR code associated with the network segment;
[0019] The two-dimensional code is sent to the code output end.
[0020] In one embodiment, the step of determining the target scanning end according to the scanning time includes:
[0021] Parsing the random code in the QR code;
[0022] Determine a first code scanning terminal having code scanning authority according to the random code;
[0023] The target code scanning end is determined in the first code scanning end according to the scanned time.
[0024] In one embodiment, the step of determining the target code scanning end in the first code scanning end according to the scanned time includes:
[0025] Request each of the code scanning terminals to send an authorization code;
[0026] When receiving each of the authorization codes, comparing each of the authorization codes with the random code;
[0027] The scanning end corresponding to the authorization code matching the random code is used as the first scanning end.
[0028] In one embodiment, before the step of determining the target code scanning end according to the scanned time in the first code scanning end, the method further includes:
[0029] Parsing the version number in the QR code;
[0030] Determine whether the QR code is generated by the system according to the version number;
[0031] When it is determined according to the version number that the two-dimensional code is generated by the system, the step of parsing the random code in the two-dimensional code is performed.
[0032] In one embodiment, when it is detected that multiple scanning terminals scan the two-dimensional code within a preset response time, the step of obtaining the scanning time of the two-dimensional code includes:
[0033] When multiple scanners are detected scanning the two-dimensional code within a preset response time, at least one area to be analyzed associated with the scanned time is determined in the two-dimensional code;
[0034] The area to be analyzed is analyzed to obtain the scanning time.
[0035] An embodiment of the present invention also provides a two-dimensional code security verification device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, it implements the various steps of the two-dimensional code security verification method described above.
[0036] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various steps of the two-dimensional code security verification method described above are implemented.
[0037] In the technical solution of this embodiment, when the security verification device of the QR code receives the QR code generation request from the code output terminal, it responds to the QR code generation request and sends the QR code to the code output terminal; when it detects that multiple scanning terminals scan the QR code within a preset response time, it obtains the scanning time of the QR code; determines the target scanning terminal according to the scanning time; and responds to the scanning operation of the target scanning terminal when it determines that the scanning operation of the target scanning terminal is valid. Since the security verification device of the QR code generates a QR code and sends it to the code output terminal when it receives the QR code generation request, when the code output terminal presents the QR code, it can detect whether multiple scanning terminals have scanned the above QR code within the preset response time. When multiple scanning terminals scan the above QR code, it can determine the target scanning terminal among the multiple scanning terminals and determine that the scanning operation of the target scanning terminal is valid, which can effectively prevent the non-target scanning terminal from successfully scanning the QR code, thereby improving the security of the QR code information. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A schematic diagram of the hardware architecture of a two-dimensional code security verification device according to an embodiment of the present invention;
[0040] Figure 2 A schematic diagram of a flow chart of a first embodiment of a two-dimensional code security verification method of the present invention;
[0041] Figure 3 A schematic diagram of a flow chart of a second embodiment of a two-dimensional code security verification method of the present invention;
[0042] Figure 4 This is a detailed flow chart of step S10 of the third embodiment of the two-dimensional code security verification method of the present invention;
[0043] Figure 5 Detailed flowchart of step S20 of the fourth embodiment of the two-dimensional code security verification method of the present invention. DETAILED DESCRIPTION
[0044] In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0045] The main solution of the present invention is:
[0046] As an implementation method, the QR code security verification device can be as follows Figure 1 .
[0047] The embodiment of the present invention relates to a security verification device for a two-dimensional code, which includes: a processor 101, such as a CPU, a memory 102, and a communication bus 103. The communication bus 103 is used to realize connection and communication between these components.
[0048] The memory 102 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Figure 1 , the memory 103 as a computer-readable storage medium may include a detection program; and the processor 101 may be used to call the detection program stored in the memory 102 and perform the following operations:
[0049] When receiving a QR code generation request from a code output terminal, in response to the QR code generation request, the QR code is sent to the code output terminal;
[0050] When multiple scanning terminals are detected scanning the QR code within a preset response time, the scanning time of the QR code is obtained;
[0051] Determine the target scanning end according to the scanning time;
[0052] When it is determined that the scanning operation of the target code scanning end is valid, respond to the scanning operation of the target code scanning end.
[0053] In one embodiment, the processor 101 may be used to call the detection program stored in the memory 102 and perform the following operations:
[0054] When multiple scanning terminals are detected to scan the QR code within a preset response time, the number of times the QR code is scanned is obtained;
[0055] Determine whether the number of scans is greater than a preset number;
[0056] When the number of scanned times is greater than the preset number of times, determining that multiple scanning terminals are detected scanning the QR code within a preset response time;
[0057] When the number of scanned times is less than or equal to the preset number of times, respond to the scanning operation of each of the scanning terminals.
[0058] In one embodiment, the processor 101 may be used to call the detection program stored in the memory 102 and perform the following operations:
[0059] Upon receiving a QR code generation request from a code output end, determining a request type of the QR code generation request in response to the QR code generation request;
[0060] When the request type is an offline type, request input into the code scanning area;
[0061] Upon receiving the code scanning area, obtaining a network segment associated with the code scanning area;
[0062] generating the QR code associated with the network segment;
[0063] The two-dimensional code is sent to the code output end.
[0064] In one embodiment, the processor 101 may be used to call the detection program stored in the memory 102 and perform the following operations:
[0065] Parsing the random code in the QR code;
[0066] Determine a first code scanning terminal having code scanning authority according to the random code;
[0067] The target code scanning end is determined in the first code scanning end according to the scanned time.
[0068] In one embodiment, the processor 101 may be used to call the detection program stored in the memory 102 and perform the following operations:
[0069] Request each of the code scanning terminals to send an authorization code;
[0070] When receiving each of the authorization codes, comparing each of the authorization codes with the random code;
[0071] The scanning end corresponding to the authorization code matching the random code is used as the first scanning end.
[0072] In one embodiment, the processor 101 may be used to call the detection program stored in the memory 102 and perform the following operations:
[0073] Parsing the version number in the QR code;
[0074] Determine whether the QR code is generated by the system according to the version number;
[0075] When it is determined according to the version number that the two-dimensional code is generated by the system, the step of parsing the random code in the two-dimensional code is performed.
[0076] In one embodiment, the processor 101 may be used to call the detection program stored in the memory 102 and perform the following operations:
[0077] When multiple scanners are detected scanning the two-dimensional code within a preset response time, at least one area to be analyzed associated with the scanned time is determined in the two-dimensional code;
[0078] The area to be analyzed is analyzed to obtain the scanning time.
[0079] In one embodiment, the processor 101 may be used to call the detection program stored in the memory 102 and perform the following operations:
[0080] Send a prompt message indicating successful scanning to the code output terminal.
[0081] In the technical solution of this embodiment, when the security verification device of the QR code receives the QR code generation request from the code output terminal, it responds to the QR code generation request and sends the QR code to the code output terminal; when it detects that multiple scanning terminals scan the QR code within a preset response time, it obtains the scanning time of the QR code; determines the target scanning terminal according to the scanning time; and responds to the scanning operation of the target scanning terminal when it determines that the scanning operation of the target scanning terminal is valid. Since the security verification device of the QR code generates a QR code and sends it to the code output terminal when it receives the QR code generation request, when the code output terminal presents the QR code, it can detect whether multiple scanning terminals have scanned the above QR code within the preset response time. When multiple scanning terminals scan the above QR code, it can determine the target scanning terminal among the multiple scanning terminals and determine that the scanning operation of the target scanning terminal is valid, which can effectively prevent the non-target scanning terminal from successfully scanning the QR code, thereby improving the security of the QR code information.
[0082] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0083] Reference Figure 2 , Figure 2 The first embodiment of the two-dimensional code security verification method of the present invention comprises the following steps:
[0084] Step S10: upon receiving a QR code generation request from a code outputting end, in response to the QR code generation request, sending the QR code to the code outputting end.
[0085] The most common form of a two-dimensional code is QR Code, which stands for Quick Response. It is a very popular encoding method on mobile devices in recent years. It can store more information and represent more data types than traditional bar codes.
[0086] Two-dimensional barcode / two-dimensional code (2-dimensional bar code) uses a certain geometric figure to record data symbol information in black and white distributed in a plane (two-dimensional direction) according to a certain rule; in the code compilation, the concept of "0" and "1" bit streams that constitute the internal logic basis of the computer is cleverly used, and several geometric figures corresponding to binary are used to represent text numerical information, which is automatically read by image input equipment or photoelectric scanning equipment to realize automatic information processing: it has some common features of barcode technology: each code system has its specific character set; each character occupies a certain width; has certain verification functions, etc. At the same time, it also has the function of automatically identifying information in different rows and processing graphic rotation change points.
[0087] In this embodiment, the QR code security verification device can generate a QR code. When the code output end sends a QR code generation request to the QR code security verification device, the QR code security verification device will generate a new QR code to the code output end, where the code output end includes but is not limited to smart terminals such as mobile terminals.
[0088] Step S20, when it is detected that multiple scanning terminals scan the two-dimensional code within a preset response time, the scanning time of the two-dimensional code is obtained.
[0089] In this embodiment, the preset response time can be configured by the administrator, and can be limited based on the response time for completing a QR code scanning operation. For example, the response time is set to 1 second. When multiple scanning terminals scan the QR code within 1 second, the specific time when the QR code is scanned by the scanning terminal is obtained, that is, the scanning time.
[0090] Optionally, when the QR code generated by the QR code security verification device is scanned, the QR code security verification device can obtain the time when the QR code is scanned.
[0091] Optionally, the QR code generated by the QR code security verification device carries a link that records the scanning time, and the QR code security verification device can obtain the above-mentioned scanning time based on the browsing record of the link.
[0092] Step S30, determining the target scanning end according to the scanning time.
[0093] In this embodiment, according to the time sequence of the scanned times, the scanning end that scanned the code earlier is used as the target scanning end.
[0094] Optionally, the random code in the QR code is parsed; a first scanning terminal with scanning authority is determined according to the random code; and the target scanning terminal is determined in the first scanning terminal according to the scanned time. By verifying the scanning terminal with the random code, scanning terminals without scanning authority can be eliminated in advance, so that subsequent processing does not need to waste unnecessary computing resources.
[0095] Optionally, each of the code scanning terminals is requested to send an authorization code; upon receiving each of the authorization codes, each of the authorization codes is compared with the random code; and the code scanning terminal corresponding to the authorization code matching the random code is used as the first code scanning terminal. When the code scanning terminal enters the authorization code and the verification is successful, it is determined that the code scanning terminal has the code scanning permission, thereby improving the security of the QR code information.
[0096] Optionally, the version number in the QR code is parsed; whether the QR code is generated by the system is determined according to the version number; when the QR code is determined to be generated by the system according to the version number, the step of parsing the random code in the QR code is performed. By detecting whether the QR code is generated by the system, it is possible to detect whether the QR code presented by the code output end has been tampered with during the code output period, which can effectively prevent the scanning end from scanning an illegal QR code.
[0097] Optionally, the QR code of this embodiment is a dynamic QR code that can be verified online, which can reduce the probability of security risks such as screenshots and information modification.
[0098] Optionally, when the number of times the QR code is allowed to be scanned is 1, the scanning end corresponding to the earliest scanning time is used as the target scanning end.
[0099] Step S40, when it is determined that the scanning operation of the target code scanning end is valid, respond to the scanning operation of the target code scanning end.
[0100] In the technical solution of the present embodiment, since the QR code security verification device generates a QR code and sends it to the code output end when receiving a QR code generation request, when the code output end presents the QR code, it can detect whether multiple scanning ends have scanned the above QR code within a preset response time. When multiple scanning ends scan the above QR code, the target scanning end can be determined from the multiple scanning ends, and it is determined that the scanning operation of the target scanning end is valid, which can effectively prevent non-target scanning ends from successfully scanning the QR code, thereby improving the security of the QR code information.
[0101] Reference Figure 3 , Figure 3 The second embodiment of the two-dimensional code security verification method of the present invention is based on the first embodiment and includes, before step S20:
[0102] Step S50, when it is detected that multiple scanners scan the two-dimensional code within a preset response time, the number of times the two-dimensional code is scanned is obtained.
[0103] In this embodiment, when the two-dimensional code generated by the two-dimensional code security verification device is scanned, the two-dimensional code security verification device can obtain the number of times the two-dimensional code has been scanned.
[0104] Optionally, the QR code generated by the QR code security verification device carries a link that records the number of scans, and the QR code security verification device can parse the QR code to obtain the above-mentioned number of scans.
[0105] Step S60, determining whether the scanned times is greater than a preset times.
[0106] In this embodiment, the preset number is the number of times the QR code is allowed to be scanned, which can be determined by the QR code generation request of the code output end.
[0107] Step S70, when the number of scans is greater than the preset number, it is determined that multiple scanning terminals are detected scanning the QR code within a preset response time.
[0108] Step S80, when the number of scans is less than or equal to the preset number of times, respond to the scanning operation of each of the scanning terminals.
[0109] In the technical solution of this embodiment, the number of scans is limited. When a certain number of scanning terminals are allowed to scan the code at the same time, the effective scanning operation can be determined based on the number of scans and the number of scanning terminals. There is no need to verify the scanning time for each scanning terminal, which improves the efficiency of determining the QR code scanning operation in specific situations.
[0110] Reference Figure 4 , Figure 4 This is a third embodiment of the two-dimensional code security verification method of the present invention, based on any one of the first to second embodiments, step S10 includes:
[0111] Step S11, when receiving a two-dimensional code generation request from a code output end, responding to the two-dimensional code generation request, determining a request type of the two-dimensional code generation request.
[0112] Step S12: When the request type is an offline type, request to enter a code scanning area.
[0113] In this embodiment, the above-mentioned scanning area refers to an area where the QR code can be effectively scanned. The above-mentioned scanning area is an optional item, and the user can select the option of not limiting the scanning area in the prompt window.
[0114] Network segments usually use the same physical layer between devices must be directly connected to each other through the same transmission medium (such as two hosts directly connected by a cross-twisted pair), but two groups of network devices whose transmission media are not directly connected, if their transmission media are connected through extension devices such as repeaters and hubs working at the physical layer, they are still regarded as devices in the same physical layer, and are one network segment instead of two. In addition, devices working at the data link layer or higher layers such as bridges, switches, routers, etc., the two groups of devices connected by them are still in their own independent physical layers, so they are two network segments.
[0115] The bridge realizes the bridging function of two network segments, and also acts as a repeater, that is, extending the line distance and regenerating and forwarding signals. In principle, the switch also works at the data link layer, and can realize information exchange between multiple network segments. The bridge and switch can isolate two network segments, and can prevent the data in a certain network segment from being broadcasted to another network segment unconditionally. This is because after the bridge receives the data frame, it determines whether the destination address of the received data frame is in the same network segment as the source address. If so, it will not be forwarded. The switch is called a multi-port bridge, and each port of the switch can connect to a network segment.
[0116] The academic definition discussed above is the strict definition of "network segment" at the physical layer. "Network segment" also has some loose meanings, such as referring to a broadcast domain on Ethernet, which is an independent internal interaction area on the data link layer. Or in the introduction to Chinese network knowledge, this word is more often misused to refer to "subnet", which is different parts of the network layer separated by devices such as gateways or routers. For example, devices with IP addresses of 192.168.0.1 to 192.168.0.254 are located in the same subnet with mask 255.255.255.0. This sentence is often said to be "located in the 192.168.0.x" network segment. If the structure below the network layer is not involved, this will not cause confusion. However, when discussing the underlying structure of the Internet in depth, we should avoid using "network segment" to refer to "subnet".
[0117] Step S13, when the code scanning area is received, obtain the network segment associated with the code scanning area.
[0118] In this embodiment, the QR code security verification device divides the code scanning area based on network segments, thereby implementing geographical restrictions on the code scanning terminal.
[0119] Step S14, generating the QR code associated with the network segment.
[0120] In this embodiment, the association relationship between the QR code and the network segment can be stored in a QR code security verification device.
[0121] Step S15, sending the two-dimensional code to the code output terminal.
[0122] Optionally, determine the IP address corresponding to each scanning terminal, wherein the QR code carries the QR code information of the IP address of the requested scanning terminal; determine whether the IP address belongs to the network segment; when the IP addresses all belong to the network segment, determine the scanning time points corresponding to each scanning terminal, and use the scanning terminal corresponding to the earliest target scanning time point among the scanning time points as the target scanning terminal. When the scanning terminal scans the QR code, it can be determined whether the scan is valid based on the IP address of the scanning terminal and the network segment associated with the QR code.
[0123] Optionally, when the number of target IP addresses belonging to the network segment in the IP address is greater than or equal to a preset number, the scanning end corresponding to the target IP address is used as the target scanning end. Among them, when the code output end limits the number of scans and the geographical restrictions at the same time, through the above embodiment, the effective scanning operation can be directly determined based on the number of scanning ends and the limited number of scans. There is no need to compare the scanning time for each scanning end, which improves the determination efficiency in specific situations.
[0124] Optionally, when the IP addresses do not belong to the network segment, a prompt message indicating that the code scanning failed is sent to each of the code scanning terminals. When it is determined that the IP addresses of each code scanning terminal do not belong to the network segment corresponding to the QR code, the scanning operation efficiency of all code scanning terminals can be directly determined, thereby improving the determination efficiency in specific situations.
[0125] In the technical solution of this embodiment, the particularities of offline QR codes are taken into account, including regionality. In order to protect the information security of the code issuing end, a regional restriction function is provided. The code issuing end can limit the scanning area. In this embodiment, the QR code method generated by the QR code security verification device can further improve the security of the QR code security verification.
[0126] Reference Figure 5 , Figure 5 This is a fourth embodiment of the two-dimensional code security verification method of the present invention, based on any one of the first to third embodiments, step S20 includes:
[0127] Step S21, when it is detected that multiple scanners scan the two-dimensional code within a preset response time, at least one area to be analyzed associated with the scanned time is determined in the two-dimensional code.
[0128] In this embodiment, with respect to the scanned time, the security verification device for the two-dimensional code may disperse the area corresponding to the scanned time into multiple areas of the two-dimensional code.
[0129] Optionally, when multiple scanners are detected scanning the two-dimensional code within a preset response time, multiple areas to be analyzed associated with the scanning time are determined in the two-dimensional code.
[0130] Step S22, analyzing the area to be analyzed to obtain the scanning time.
[0131] In the technical solution of this embodiment, considering the particularity of the non-target scanning end, its scanning angle may cause the scanned QR code part to be blocked. Using the technical solution of this embodiment, the scanning operation of the non-target scanning end can be effectively prevented from taking effect, further improving the security of the QR code information.
[0132] To achieve the above-mentioned purpose, an embodiment of the present invention also provides a two-dimensional code security verification device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, it implements the various steps of the two-dimensional code security verification method described above.
[0133] To achieve the above objectives, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various steps of the two-dimensional code security verification method as described above are implemented.
[0134] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program implemented on one or more computer-usable computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0135] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0136] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0138] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0139] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0140] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these 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 these modifications and variations.
Claims
1. A two-dimensional code security verification method, characterized in that: The method comprises: When receiving a QR code generation request from a code output terminal, in response to the QR code generation request, the QR code is sent to the code output terminal; When multiple scanning terminals are detected scanning the QR code within a preset response time, the scanning time of the QR code is obtained; Parsing the version number in the QR code; Determine whether the QR code is generated by the system according to the version number; When it is determined according to the version number that the two-dimensional code is generated by the system, parsing the random code in the two-dimensional code; Request each of the code scanning terminals to send an authorization code; When receiving each of the authorization codes, comparing each of the authorization codes with the random code; The scanning terminal corresponding to the authorization code matching the random code is used as the first scanning terminal; Determine a target scanning terminal in the first scanning terminal according to the scanning time, wherein when the number of times the QR code is allowed to be scanned is one, or the Internet Protocol address of the scanning terminal belongs to the network segment associated with the scanning area, the scanning terminal that scans the code earliest is used as the target scanning terminal; When it is determined that the scanning operation of the target code scanning end is valid, respond to the scanning operation of the target code scanning end.
2. The security verification method of a two-dimensional code according to claim 1, characterized in that: Before the step of obtaining the scanning time of the two-dimensional code when multiple scanning terminals are detected to scan the two-dimensional code within the preset response time, the step further includes: When multiple scanning terminals are detected to scan the QR code within a preset response time, the number of times the QR code is scanned is obtained; Determine whether the number of scans is greater than a preset number; When the number of scanned times is greater than the preset number of times, determining that multiple scanning terminals are detected scanning the QR code within a preset response time; When the number of scanned times is less than or equal to the preset number of times, respond to the scanning operation of each of the scanning terminals.
3. The security verification method of a two-dimensional code according to claim 1, characterized in that: The step of sending the QR code to the code output terminal in response to the QR code generation request upon receiving the QR code generation request from the code output terminal comprises: Upon receiving a QR code generation request from a code output end, determining a request type of the QR code generation request in response to the QR code generation request; When the request type is an offline type, request input into the code scanning area; Upon receiving the code scanning area, obtaining a network segment associated with the code scanning area; generating the QR code associated with the network segment; The two-dimensional code is sent to the code output end.
4. The security verification method of a two-dimensional code according to claim 1, characterized in that: When it is detected that multiple scanning terminals scan the two-dimensional code within the preset response time, the step of obtaining the scanning time of the two-dimensional code includes: When multiple scanners are detected scanning the two-dimensional code within a preset response time, at least one area to be analyzed associated with the scanned time is determined in the two-dimensional code; The area to be analyzed is analyzed to obtain the scanning time.
5. The security verification method of a two-dimensional code according to claim 1, characterized in that: After the step of responding to the scanning operation of the target code scanning end when determining that the scanning operation of the target code scanning end is valid, the method further includes: Send a prompt message indicating successful scanning to the code output terminal.
6. A two-dimensional code security verification device, characterized in that: The two-dimensional code security verification device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the two-dimensional code security verification method as described in any one of claims 1 to 5 are implemented.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the two-dimensional code security verification method according to any one of claims 1 to 5 are implemented.
