Methods, devices, electronic equipment, and storage media for batch verification codes
By generating verification codes in batches in the front-end cache and using index values to query and compare verification information, the problem of frequent access to back-end interfaces in existing technologies is solved, thus improving the efficiency and performance of verification code verification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-27
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, the backend service needs to be called to regenerate the verification code every time it is retrieved, resulting in frequent access to the backend interface and causing a performance bottleneck.
By generating and storing verification codes in batches in the front-end cache, and using index values to query and compare verification information, the frequency of back-end service calls is reduced.
This reduces the frequency of access to the backend interface, decreases the pressure on the backend server, and improves the efficiency of CAPTCHA verification.
Smart Images

Figure CN116346359B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology or other related fields. Specifically, it relates to a method, apparatus, electronic device and storage medium for verifying batch verification codes. Background Technology
[0002] With the rapid development of the Internet, a large number of web pages and data information are generated. In order to ensure the security of related data and information, certain encryption and verification technologies are used to ensure data security. Among them, CAPTCHA is a common data verification method.
[0003] In related technologies, Figure 1 This is a schematic diagram of a verification method using CAPTCHA in existing technology, such as... Figure 1 As shown, the interaction flow between the front-end page and the back-end service includes:
[0004] (1) Generate verification code
[0005] The front-end page initiates a request to obtain a verification code. After receiving the verification code request from the front-end page, the back-end service randomly generates a verification code, stores the verification code in the cache with a certain type (e.g., String), and returns the cached key and the generated verification code to the front-end.
[0006] (2) Verify the verification code
[0007] After the frontend receives the verification code, it displays it on the frontend page in a certain format. After the user enters the verification information, a verification code verification request is initiated. The frontend sends the cached verification code key and the user-entered verification code to the backend. Upon receiving the request, the backend uses the verification code sent by the frontend to retrieve the previously generated verification code from the cache and compares it with the user-entered verification code sent by the frontend. If they match, the verification passes; otherwise, the verification fails.
[0008] (3) Re-obtain the verification code
[0009] When a verification code that cannot be clearly identified appears or the user needs to change the verification code, repeat step (1) to obtain the verification code and use step (2) to verify it.
[0010] The existing CAPTCHA verification method shown above has obvious drawbacks: it requires calling the backend service to regenerate the CAPTCHA every time it needs to be obtained again, resulting in frequent access to the backend interface.
[0011] There is currently no effective solution to the above problems. Summary of the Invention
[0012] This invention provides a batch verification method, apparatus, electronic device, and storage medium for verification codes, which at least solves the technical problem in related technologies that requires calling the backend service to regenerate the verification code every time the verification code is obtained again, resulting in frequent access to the backend interface.
[0013] According to one aspect of the present invention, a batch verification method for CAPTCHAs is provided, applied to a front-end device used by a user, the front-end device being connected to a back-end server, comprising: acquiring batch verification codes and storing the batch verification codes in a front-end cache, wherein the batch verification codes contain N verification codes to be used, the batch verification codes corresponding to batch keywords, the front-end device comprising: the front-end cache and a front-end screen interface, where N is an integer greater than or equal to 2; extracting a target verification code from the batch verification codes in the front-end cache, and displaying the target verification code on the front-end screen interface, wherein the target verification code corresponds to an index value, the index value representing the extraction relationship of the target verification code from the batch verification codes; receiving user input information and sending the batch keywords, the index value of the target verification code, and the user input information to the back-end server, wherein the user input information refers to information generated by the user performing a verification operation on the front-end screen interface, the back-end server querying the pre-cached target verification codes based on the batch keywords and the index value, and comparing the verification information in the user input information with the target verification codes to obtain a verification result; and receiving the verification result returned by the back-end server.
[0014] Optionally, before obtaining the batch verification codes, the method further includes: sending a verification code acquisition request to the backend server, wherein, after receiving the verification code acquisition request, the backend server randomly generates N image verification codes, combines the N image verification codes into the batch verification codes, stores the batch verification codes in a key-value pair cache, and generates batch keywords and a verification code list corresponding to the batch verification codes; and receives the batch verification codes, the batch keywords corresponding to the batch verification codes, and the verification code list returned by the backend server.
[0015] Optionally, the step of extracting the target verification code from the batch verification codes cached by the front end includes: obtaining a list of verification codes associated with the batch verification codes and generating an index order corresponding to the list of verification codes; obtaining a verification code from the batch verification codes cached by the front end according to the index order, and using the obtained verification code as the target verification code.
[0016] Optionally, after displaying the target verification code on the front-end screen interface, the method further includes: receiving a change operation, responding to the change operation, obtaining the next verification code after the target verification code from the batch verification codes according to the index order, and displaying the next verification code on the front-end screen interface.
[0017] Optionally, after receiving the replacement operation, the method further includes: querying whether all the verification codes in the batch verification codes have been used up; if all the verification codes in the batch verification codes have been used up, obtaining new batch verification codes; if not all the verification codes in the batch verification codes have been used up, responding to the replacement operation.
[0018] Optionally, after receiving the verification result returned by the backend server, the method further includes: if the verification result indicates that the verification code indicated by the verification information in the user input information is consistent with the target verification code, confirming that the verification is successful and displaying a verification success notification on the front-end screen interface; if the verification result indicates that the verification code indicated by the verification information in the user input information is inconsistent with the target verification code, confirming that the verification is unsuccessful and displaying a re-verification notification on the front-end screen interface.
[0019] According to another aspect of the present invention, a batch verification method for CAPTCHAs is also provided, applied to a backend server, the backend server being connected to a frontend device used by a user, comprising: receiving batch keywords, CAPTCHA index values, and user input information input by the frontend device, wherein the user input information refers to information generated by the user performing a verification operation on a target CAPTCHA displayed on the frontend screen interface of the frontend device; querying a target CAPTCHA from the batch CAPTCHAs based on the CAPTCHA index value pre-stored in a batch keyword index key-value pair cache, wherein the batch CAPTCHAs are pre-cached in a key-value pair cache of the backend server; comparing the verification information of the user input information with the target CAPTCHA to obtain a verification result; and sending the verification result to the frontend device.
[0020] Optionally, before receiving the batch keywords, verification code index values, and user input information from the front-end device, the method further includes: receiving a verification code retrieval request sent by the front-end device; responding to the verification code retrieval request, randomly generating N graphic verification codes, and combining the N graphic verification codes into the batch verification code, where N is an integer greater than or equal to 2; storing the batch verification code in the key-value pair cache, and generating a batch keyword and a verification code list corresponding to the batch verification code; and sending the batch verification code, the batch keyword, and the verification code list to the front-end device.
[0021] According to another aspect of the present invention, a batch verification code verification device is also provided, applied to a front-end device used by a user, the front-end device being connected to a back-end server, comprising: a first acquisition unit, configured to acquire batch verification codes and store the batch verification codes in a front-end cache, wherein the batch verification codes include N verification codes to be used, and the batch verification codes correspond to batch keywords, the front-end device including: the front-end cache and a front-end screen interface, where N is an integer greater than or equal to 2; and an extraction unit, configured to extract a target verification code from the batch verification codes in the front-end cache and display the target verification code on the front-end screen interface, wherein the target verification code corresponds to a batch keyword. An index value, which represents the extraction relationship of the target verification code extracted from the batch verification code; a first sending unit, configured to receive user input information and send the batch keywords, the index value of the target verification code, and the user input information to the backend server, wherein the user input information refers to information generated by the user performing a verification operation on the front-end screen interface, the backend server queries the pre-cached target verification code based on the batch keywords and the index value, and compares the verification information in the user input information with the target verification code to obtain a verification result; a first receiving unit, configured to receive the verification result returned by the backend server.
[0022] Optionally, the batch verification device further includes: a first sending module, configured to send a verification code acquisition request to the backend server before acquiring the batch verification code, wherein, after receiving the verification code acquisition request, the backend server randomly generates N image verification codes, combines the N image verification codes into the batch verification code, stores the batch verification code in a key-value pair cache, and generates a batch keyword and a verification code list corresponding to the batch verification code; and a first receiving module, configured to receive the batch verification code, the batch keyword corresponding to the batch verification code, and the verification code list returned by the backend server.
[0023] Optionally, the extraction unit includes: a first acquisition module, configured to acquire a list of verification codes associated with the batch verification codes and generate an index order corresponding to the list of verification codes; and a second acquisition module, configured to acquire a verification code from the batch verification codes cached in the front end according to the index order and use the acquired verification code as the target verification code.
[0024] Optionally, the batch verification device further includes: a second receiving module, configured to receive a change operation after the target verification code is displayed on the front-end screen interface, and respond to the change operation by retrieving the next verification code after the target verification code from the batch verification codes according to the index order, and display the next verification code on the front-end screen interface.
[0025] Optionally, the batch verification device further includes: a first query module, used to query whether all the verification codes in the batch verification code have been used up after receiving the replacement operation; a third acquisition module, used to acquire new batch verification codes if all the verification codes in the batch verification code have been used up; and a first response module, used to respond to the replacement operation if not all the verification codes in the batch verification code have been used up.
[0026] Optionally, the batch verification device further includes: a display module, configured to, after receiving the verification result returned by the backend server, if the verification result indicates that the verification code indicated by the verification information in the user input information matches the target verification code, confirm that the verification is successful and display a verification success notification on the front-end screen interface; and a confirmation module, configured to, if the verification result indicates that the verification code indicated by the verification information in the user input information does not match the target verification code, confirm that the verification is unsuccessful and display a re-verification notification on the front-end screen interface.
[0027] According to another aspect of the present invention, a batch verification code verification device is also provided, applied to a backend server, the backend server being connected to a frontend device used by a user, comprising: a second receiving unit, configured to receive batch keywords, verification code index values, and user input information input by the frontend device, wherein the user input information refers to information generated by the user performing a verification operation on a target verification code displayed on the frontend screen interface of the frontend device; a query unit, configured to query a target verification code in the batch verification codes based on the verification code index value pre-stored in the batch verification code cache of the batch keyword index key-value pair, wherein the batch verification codes are pre-cached in the key-value pair cache of the backend server; a comparison unit, configured to compare the verification information of the user input information with the target verification code to obtain a verification result; and a second sending unit, configured to send the verification result to the frontend device.
[0028] Optionally, the batch verification device further includes: a third receiving module, configured to receive a verification code acquisition request sent by the front-end device before receiving the batch keywords, verification code index values, and user input information input by the front-end device; a second response module, configured to respond to the verification code acquisition request, randomly generate N graphic verification codes, and combine the N graphic verification codes into the batch verification code, where N is an integer greater than or equal to 2; a storage module, configured to store the batch verification code in the key-value pair cache, and generate a batch keyword and a verification code list corresponding to the batch verification code; and a second sending module, configured to send the batch verification code, the batch keywords, and the verification code list to the front-end device.
[0029] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute the above-described batch verification code verification method.
[0030] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-described batch verification code verification method.
[0031] In this disclosure, during the verification process, batch verification codes are obtained and stored in a front-end cache. The target verification code is extracted from the batch verification codes in the front-end cache and displayed on the front-end screen interface. Then, user input information is received, and the batch keywords, the index value of the target verification code, and the user input information are sent to the back-end server. The user input information refers to the information generated by the user performing the verification operation on the front-end screen interface. The back-end server queries the pre-cached target verification code based on the batch keywords and the index value, compares the verification information in the user input information with the target verification code, obtains the verification result, and receives the verification result returned by the back-end server.
[0032] In this disclosure, by generating verification codes in batches and returning them to the front-end device, the front-end device first iterates through the batch of verification codes when it needs to retrieve them again. Only after the iteration is complete will it initiate the back-end service to regenerate the verification codes in batches, thereby reducing the frequency of back-end interface access. This solves the technical problem in related technologies where the back-end service needs to be called to regenerate the verification codes every time they are retrieved, resulting in frequent access to the back-end interface. Attached Figure Description
[0033] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0034] Figure 1 This is a schematic diagram of a verification method using CAPTCHA in existing technology;
[0035] Figure 2 This is a flowchart of an optional batch verification method according to an embodiment of the present invention;
[0036] Figure 3 This is a flowchart of another optional batch verification method according to an embodiment of the present invention;
[0037] Figure 4 This is a schematic diagram illustrating an optional method for verifying batch verification codes according to an embodiment of the present invention;
[0038] Figure 5 This is a schematic diagram of an optional batch verification device according to an embodiment of the present invention;
[0039] Figure 6 This is a schematic diagram of another optional batch verification device according to an embodiment of the present invention;
[0040] Figure 7 This is a hardware structure block diagram of an electronic device (or mobile device) for a batch verification code verification method according to an embodiment of the present invention. Detailed Implementation
[0041] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0042] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0043] To facilitate understanding of the present invention by those skilled in the art, some terms or nouns involved in the various embodiments of the present invention are explained below:
[0044] CAPTCHA: To prevent malicious page refreshing, brute-force login, etc., a public, fully automated program is provided to distinguish whether the operator is a computer or a natural person. It is generated and verified by a computer.
[0045] Redis, a remote dictionary service, is an open-source caching database that enables key-value, in-memory, or persistent storage services.
[0046] It should be noted that the batch verification method and apparatus of this disclosure can be used in the field of information security technology for identification and verification based on information security verification codes, and can also be used in any field other than information security technology for identification and verification based on information security verification codes. This disclosure does not limit the application field of the batch verification method and apparatus of this disclosure.
[0047] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) disclosed herein are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of such data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding access points are provided for users to choose to authorize or refuse. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, a request to obtain the information must be sent to the aforementioned user or organization through the interface, and the relevant information will be obtained only after receiving consent from the aforementioned user or organization.
[0048] The following embodiments of the present invention can be applied to various systems / applications / devices that use CAPTCHAs for identification and verification based on information security. The present invention overcomes the drawback of existing technologies that require calling the backend service to regenerate the CAPTCHA every time it is retrieved, resulting in frequent access to the backend interface. By generating CAPTCHAs in batches and returning them to the frontend device, the frontend device first iterates through the batch of CAPTCHAs when retrieving them, and only after the iteration is complete does it initiate the backend service to regenerate the CAPTCHAs in batches. This reduces the frequency of backend interface access, and is simple, feasible, efficient, and easy to use.
[0049] The present invention will now be described in detail with reference to various embodiments.
[0050] Example 1
[0051] According to an embodiment of the present invention, an embodiment of a batch verification code verification method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0052] This invention provides a batch verification method for CAPTCHAs, which is applied to a front-end device used by a user and connected to a back-end server.
[0053] Figure 2 This is a flowchart of an optional batch verification method for a verification code according to an embodiment of the present invention, such as... Figure 2 As shown, the method includes the following steps:
[0054] Step S201: Obtain batch verification codes and store them in the front-end cache. The batch verification codes contain N verification codes to be used and each batch verification code corresponds to a batch keyword. The front-end devices include the front-end cache and the front-end screen interface, where N is an integer greater than or equal to 2.
[0055] Step S202: Extract the target verification code from the batch verification codes cached on the front end, and display the target verification code on the front end screen interface. The target verification code has an index value, which represents the extraction relationship of the target verification code from the batch verification codes.
[0056] Step S203: Receive user input information and send the batch keywords, the index value of the target verification code, and the user input information to the backend server. The user input information refers to the information generated by the user performing the verification operation on the front-end screen interface. The backend server queries the pre-cached target verification code based on the batch keywords and the index value, and compares the verification information in the user input information with the target verification code to obtain the verification result.
[0057] Step S204: Receive the verification result returned by the backend server.
[0058] Through the above steps, batch verification codes can be obtained during the verification process and stored in the front-end cache. The target verification code is extracted from the batch verification codes in the front-end cache and displayed on the front-end screen interface. Then, user input information is received, and the batch keywords, the index value of the target verification code, and the user input information are sent to the back-end server. The user input information refers to the information generated by the user performing the verification operation on the front-end screen interface. The back-end server queries the pre-cached target verification code based on the batch keywords and index value, compares the verification information in the user input information with the target verification code, obtains the verification result, and receives the verification result returned by the back-end server. In this embodiment, by generating verification codes in batches and returning them to the front-end device, when the front-end device re-obtains verification codes, it first traverses the batch verification codes. Only after traversing all the codes does it initiate the back-end service to re-generate verification codes in batches, reducing the frequency of back-end interface access. This solves the technical problem in related technologies where the back-end service needs to be called to regenerate verification codes every time a verification code is obtained, resulting in frequent access to the back-end interface.
[0059] The embodiments of the present invention will now be described in detail with reference to the steps described above.
[0060] It should be noted that this embodiment uses the user's front-end device as the execution subject for illustration. The types of front-end devices include, but are not limited to: mobile terminals (e.g., mobile phones, tablets, iPads, panel lights), PCs, desktop computers, financial terminals with operating screens, etc. The front-end device is connected to the back-end server.
[0061] In practical applications, this front-end device can also be used in other devices with touchscreens, such as vehicle displays and ATMs.
[0062] Optionally, before obtaining the batch verification codes, the process further includes: sending a verification code retrieval request to the backend server, wherein, after receiving the verification code retrieval request, the backend server randomly generates N image verification codes, combines the N image verification codes into a batch verification code, stores the batch verification code in a key-value pair cache, and generates a batch keyword and a verification code list corresponding to the batch verification code; and receiving the batch verification code, the batch keyword corresponding to the batch verification code, and the verification code list returned by the backend server.
[0063] This embodiment improves upon existing CAPTCHA technology by generating CAPTCHAs in batches. Upon receiving a CAPTCHA retrieval request, the backend server randomly generates N image CAPTCHAs (image verification). Alternatively, in the actual generation process, a batch of characters can be randomly generated based on the CAPTCHA retrieval request, and these characters will be used as the batch CAPTCHAs. The generated batch CAPTCHAs are stored in a cache using a specified storage format. For example, the batch CAPTCHAs can be stored in a Redis cache as a List. The Redis cache key and the generated batch CAPTCHA List are then returned to the frontend.
[0064] The number of batch verification codes generated randomly each time is not limited. After a batch of verification codes is generated, a batch keyword can be generated for the batch verification codes to facilitate subsequent comparison and indexing. In this embodiment, the batch keyword is represented as Key, and the batch verification codes are obtained by indexing with Key.
[0065] It should be noted that the batch verification codes, the corresponding batch verification codes, and the list of verification codes formed by combining all the verification codes in the batch verification codes will be pre-stored in the cache of the backend server.
[0066] Step S201: Obtain batch verification codes and store them in the front-end cache.
[0067] Because batch verification codes are obtained, each time the front-end device performs verification, if the user cannot see the verification code clearly or wants to change it, the next verification code can be directly retrieved from the front-end cache of that front-end device without having to request the verification code again.
[0068] Step S202: Extract the target verification code from the batch verification codes cached on the front end, and display the target verification code on the front end screen interface. The target verification code has an index value, which represents the extraction relationship of the target verification code from the batch verification codes.
[0069] Optionally, the step of extracting the target verification code from the batch verification codes cached on the front end includes: obtaining a list of verification codes associated with the batch verification codes and generating an index order corresponding to the verification code list; obtaining a verification code from the batch verification codes cached on the front end according to the index order, and using the obtained verification code as the target verification code.
[0070] In this embodiment, after obtaining the batch verification codes, the front-end device stores them in the front-end cache, and retrieves a verification code from the batch verification codes in the front-end cache according to the index order, and displays it on the front-end in a certain form.
[0071] Alternatively, after displaying the target verification code on the front-end screen interface, the method further includes: receiving and responding to the change operation, retrieving the next verification code following the target verification code from the batch verification codes according to the index order, and displaying the next verification code on the front-end screen interface.
[0072] In this embodiment, after receiving the replacement operation, the method further includes: querying whether all the verification codes in the batch verification codes have been used up; if all the verification codes in the batch verification codes have been used up, obtaining new batch verification codes; if not all the verification codes in the batch verification codes have been used up, responding to the replacement operation.
[0073] When a verification code cannot be clearly identified or the user needs to change the verification code, the next verification code is first retrieved from the batch verification codes cached on the front end in index order. If the code is retrieved, the verification code is checked again. If the code is not retrieved, it means that the batch of verification codes has been used up, and a new batch of verification codes is retrieved again.
[0074] Step S203: Receive user input information and send the batch keywords, the index value of the target verification code, and the user input information to the backend server. The user input information refers to the information generated by the user performing the verification operation on the front-end screen interface. The backend server queries the pre-cached target verification code based on the batch keywords and the index value, and compares the verification information in the user input information with the target verification code to obtain the verification result.
[0075] After the user enters the verification code and other relevant information, a verification code verification request is initiated. The front-end device receives the user's input information and sends the cached batch keyword key, the index value of the displayed verification code, and the user's input information (including the user's input verification code) to the back-end server.
[0076] After receiving the verification code request, the backend server uses the batch verification code key sent by the frontend device to retrieve the previously generated batch verification codes from the cached Redis. Then, it extracts the corresponding verification code from the retrieved batch verification codes by displaying the index value of the verification code, and compares it with the verification code filled in by the user in the user input information sent by the frontend device. If they match, the verification is successful; otherwise, the verification fails.
[0077] Step S204: Receive the verification result returned by the backend server.
[0078] Optionally, after receiving the verification result returned by the backend server, the method further includes: if the verification code indicated by the verification information in the user input information in the verification result is consistent with the target verification code, confirming that the verification is successful and displaying a verification success notification on the front-end screen interface; if the verification code indicated by the verification information in the user input information in the verification result is inconsistent with the target verification code, confirming that the verification is unsuccessful and displaying a re-verification notification on the front-end screen interface.
[0079] Through the above embodiments, batch verification codes can be generated at once and retrieved from the front-end cache in the front-end and back-end caches in an indexed order for display. The verification codes can then be located on the back-end for verification using the index. This eliminates the need to call the back-end interface to retrieve the verification codes every time, reducing access frequency and lowering the access pressure on the back-end server from the front-end devices.
[0080] The invention will now be described using another alternative embodiment.
[0081] Example 2
[0082] This invention illustrates the implementation using a backend server as the executing entity.
[0083] This invention also provides a batch verification method for CAPTCHAs, applied to a backend server, which is connected to the frontend device used by the user.
[0084] Figure 3 This is a flowchart of another optional batch verification method according to an embodiment of the present invention, such as... Figure 3 As shown, it includes:
[0085] Step S301: Receive batch keywords, verification code index value and user input information from the front-end device. The user input information refers to the information generated by the user performing a verification operation on the target verification code displayed on the front-end screen interface of the front-end device.
[0086] Step S302: Based on the batch verification codes pre-stored in the batch keyword index key-value pair cache, query the target verification code in the batch verification codes based on the verification code index value, wherein the batch verification codes are pre-cached in the key-value pair cache of the backend server;
[0087] Step S303: Compare the verification information entered by the user with the target verification code to obtain the verification result;
[0088] Step S304: Send the verification result to the front-end device.
[0089] Through the above steps, when verifying the CAPTCHA, the backend server receives the batch keywords, CAPTCHA index value, and user input information from the frontend device. The user input information refers to the information generated by the user performing a verification operation on the target CAPTCHA displayed on the frontend screen interface of the frontend device. Based on the batch CAPTCHAs pre-stored in the batch keyword index key-value pair cache, the server queries the target CAPTCHA in the batch CAPTCHAs based on the CAPTCHA index value. The backend server pre-caches the batch CAPTCHAs in its key-value pair cache. The server compares the verification information of the user input information with the target CAPTCHA to obtain the verification result, and then sends the verification result to the frontend device.
[0090] In this embodiment, by generating verification codes in batches and returning them to the front-end device, the front-end device first iterates through the batch of verification codes when it needs to retrieve them again. Only after it has finished iterating through them does it initiate the back-end service to regenerate the verification codes in batches, thereby reducing the frequency of access to the back-end interface. This solves the technical problem in related technologies where the back-end service needs to be called to regenerate the verification codes every time they need to retrieve them again, resulting in frequent access to the back-end interface.
[0091] The embodiments of the present invention will now be described in detail with reference to the steps described above.
[0092] It should be noted that this embodiment illustrates the execution entity as a backend server that interfaces with the user's frontend device. The backend server interfaces with at least one frontend device, and the types of frontend devices include, but are not limited to: mobile terminals (e.g., mobile phones, tablets, iPads, LED displays), PCs, desktop computers, financial terminals with operating screens, etc. The frontend device is connected to the backend server. In specific applications, this frontend device can also be used in other devices with touchscreens, such as vehicle displays and ATMs.
[0093] Optionally, before receiving the batch keywords, verification code index value, and user input information from the front-end device, the method further includes: receiving a verification code retrieval request sent by the front-end device; responding to the verification code retrieval request, randomly generating N image verification codes, and combining the N image verification codes into a batch verification code, where N is an integer greater than or equal to 2; storing the batch verification code in a key-value pair cache, and generating a batch keyword and verification code list corresponding to the batch verification code; and sending the batch verification code, batch keywords, and verification code list to the front-end device.
[0094] This embodiment improves upon existing CAPTCHA technology by generating CAPTCHAs in batches. Upon receiving a CAPTCHA retrieval request, the backend server randomly generates N image CAPTCHAs (image verification). Alternatively, in the actual generation process, a batch of characters can be randomly generated based on the CAPTCHA retrieval request, and these characters will be used as the batch CAPTCHAs. The generated batch CAPTCHAs are stored in a cache using a specified storage format. For example, the batch CAPTCHAs can be stored in a Redis cache as a List. The Redis cache key and the generated batch CAPTCHA List are then returned to the frontend.
[0095] The number of batch verification codes generated randomly each time is not limited. After a batch of verification codes is generated, a batch keyword can be generated for the batch verification codes to facilitate subsequent comparison and indexing. In this embodiment, the batch keyword is represented as Key, and the batch verification codes are obtained by indexing with Key.
[0096] It should be noted that the batch verification codes, the corresponding batch verification codes, and the list of verification codes formed by combining all the verification codes in the batch verification codes will be pre-stored in the cache of the backend server.
[0097] Step S301: Receive batch keywords, verification code index value, and user input information from the front-end device. The user input information refers to the information generated by the user performing a verification operation on the target verification code displayed on the front-end screen interface of the front-end device.
[0098] The backend server receives a verification code verification request, which carries the batch keywords entered by the frontend device, the verification code index value, and the user input information.
[0099] Step S302: Based on the batch verification codes pre-stored in the batch keyword index key-value pair cache, query the target verification code in the batch verification codes based on the verification code index value. The batch verification codes are pre-cached in the key-value pair cache of the backend server.
[0100] The backend server uses the batch verification code keywords sent by the frontend device to retrieve the previously generated batch verification codes from Redis, and then retrieves the corresponding target verification code from the generated batch verification codes by displaying the index value of the verification code.
[0101] Step S303: Compare the verification information entered by the user with the target verification code to obtain the verification result.
[0102] After the backend server obtains the corresponding target verification code, it compares it with the verification code entered by the user and sent by the frontend device. If they match, the verification passes; otherwise, the verification fails.
[0103] Step S304: Send the verification result to the front-end device.
[0104] Optionally, when the front-end device encounters a verification code that cannot be clearly identified or the user needs to change the verification code, it first retrieves the next verification code from the batch verification codes cached on the front end in index order. If the code is retrieved, the verification code is checked again. If the code is not retrieved, it means that the batch of verification codes has been used up, and a new batch of verification codes is retrieved again.
[0105] Through the above embodiments, batch verification codes can be generated at once and retrieved from the front-end cache in the front-end and back-end caches in an indexed order for display. The verification codes can then be located on the back-end for verification using the index. This eliminates the need to call the back-end interface to retrieve the verification codes every time, reducing access frequency and lowering the access pressure on the back-end server from the front-end devices.
[0106] The invention will now be described in conjunction with another alternative embodiment.
[0107] Figure 4 This is a schematic diagram illustrating an optional method for verifying batch verification codes according to an embodiment of the present invention, such as... Figure 4 As shown, the interaction process between the front-end device and the back-end server includes:
[0108] (1) Generate verification code
[0109] When a front-end device initiates a request to obtain a verification code, the back-end server, upon receiving the request, randomly generates a batch of characters, i.e., batch verification codes, and stores the batch verification codes in a Redis cache using a List type. The back-end server then returns the Redis cached key (corresponding to the batch keywords mentioned above) and the generated batch verification code List (corresponding to the verification code list mentioned above) to the front-end device.
[0110] (2) Verify the verification code
[0111] After receiving the batch verification codes, the front-end device stores them in the front-end cache. Then, it retrieves a verification code from the cached batch verification codes using an index, displays it on the front-end device in a specific format, and initiates a verification code verification request after the user enters the code. The front-end device sends the Redis cache key for the batch verification codes, the index value of the displayed verification code, and the user-entered verification code to the back-end server. Upon receiving the request, the back-end server uses the Redis key sent by the front-end device to retrieve the previously generated batch verification codes from Redis. Then, it uses the index value of the displayed verification code to retrieve the corresponding target verification code from the generated batch verification codes and compares it with the user-entered verification code sent by the front-end device. If they match, the verification passes; otherwise, it fails.
[0112] (3) Re-obtain the verification code
[0113] When a verification code cannot be clearly identified or the user needs to change the verification code, the next verification code is first obtained from the batch verification codes cached on the front end in index order. If it is obtained, step (2) is repeated to verify the verification code. If it is not obtained, it means that the batch verification codes have been used up, and step (1) is repeated to obtain a new batch of verification codes.
[0114] The above implementation method can generate multiple verification codes at once, store them in the front-end and back-end server caches using a List type, retrieve and display them from the front-end device cache using an index, and then locate the verification code on the back-end server for verification using the index. This eliminates the need to call the back-end server interface to retrieve the verification code every time, reducing access frequency and reducing access pressure.
[0115] The invention will now be described using another alternative embodiment.
[0116] Example 3
[0117] The batch verification device for verification codes provided in this embodiment includes multiple implementation units, each of which corresponds to a specific implementation step in Embodiment 1 above.
[0118] This invention provides a batch verification device for CAPTCHAs, which is applied to a front-end device used by a user and connected to a back-end server.
[0119] Figure 5 This is a schematic diagram of an optional batch verification device according to an embodiment of the present invention, such as... Figure 5 As shown, the verification device may include: a first acquisition unit 50, an extraction unit 51, a first transmission unit 52, and a first receiving unit 53, wherein...
[0120] The first acquisition unit 50 is used to acquire batch verification codes and store the batch verification codes in the front-end cache. The batch verification codes contain N verification codes to be used and the batch verification codes correspond to batch keywords. The front-end device includes: front-end cache and front-end screen interface, where N is an integer greater than or equal to 2.
[0121] Extraction unit 51 is used to extract the target verification code from the batch verification codes cached at the front end and display the target verification code on the front end screen interface. The target verification code has an index value, which represents the extraction relationship between the batch verification codes and the target verification code.
[0122] The first sending unit 52 is used to receive user input information and send the batch keywords, the index value of the target verification code, and the user input information to the backend server. The user input information refers to the information generated by the user performing a verification operation on the front-end screen interface. The backend server queries the pre-cached target verification code based on the batch keywords and the index value, and compares the verification information in the user input information with the target verification code to obtain the verification result.
[0123] The first receiving unit 53 is used to receive the verification result returned by the backend server.
[0124] The aforementioned batch verification code verification device can acquire batch verification codes through the first acquisition unit 50 and store them in the front-end cache during the verification process. The extraction unit 51 extracts the target verification code from the batch verification codes in the front-end cache and displays it on the front-end screen interface. Then, the first sending unit 52 receives user input information and sends the batch keywords, the index value of the target verification code, and the user input information to the back-end server. The user input information refers to the information generated by the user performing a verification operation on the front-end screen interface. The back-end server queries the pre-cached target verification code based on the batch keywords and index value, compares the verification information in the user input information with the target verification code, and obtains the verification result. The first receiving unit 53 receives the verification result returned by the back-end server. In this embodiment, by batch generating verification codes and returning them to the front-end device, when the front-end device re-acquires verification codes, it first traverses the batch verification codes. Only after traversing all the codes does it initiate the back-end service to re-batch generate verification codes, reducing the frequency of back-end interface access. This solves the technical problem in related technologies where the back-end service needs to be called to regenerate verification codes every time a verification code is re-acquired, resulting in frequent access to the back-end interface.
[0125] Optionally, the batch verification device further includes: a first sending module, used to send a verification code acquisition request to a backend server before acquiring the batch verification code, wherein, after receiving the verification code acquisition request, the backend server randomly generates N image verification codes, combines the N image verification codes into a batch verification code, stores the batch verification code in a key-value pair cache, and generates a batch keyword and a verification code list corresponding to the batch verification code; and a first receiving module, used to receive the batch verification code, the batch keyword corresponding to the batch verification code, and the verification code list returned by the backend server.
[0126] Optionally, the extraction unit includes: a first acquisition module, used to acquire a list of verification codes associated with the batch verification codes and generate an index order corresponding to the list of verification codes; and a second acquisition module, used to acquire a verification code from the batch verification codes cached at the front end according to the index order and use the acquired verification code as the target verification code.
[0127] Optionally, the batch verification device further includes: a second receiving module, used to receive a change operation after the target verification code is displayed on the front-end screen interface, and respond to the change operation by retrieving the next verification code after the target verification code from the batch verification codes according to the index order, and displaying the next verification code on the front-end screen interface.
[0128] Optionally, the batch verification device further includes: a first query module, used to query whether all the verification codes in the batch verification code have been used up after receiving the replacement operation; a third acquisition module, used to acquire new batch verification codes if all the verification codes in the batch verification code have been used up; and a first response module, used to respond to the replacement operation if not all the verification codes in the batch verification code have been used up.
[0129] Optionally, the batch verification device further includes: a display module, used to, after receiving the verification result returned by the backend server, if the verification code indicated by the verification information in the verification information indicated by the verification result in the user input information matches the target verification code, confirm that the verification is successful and display a verification success notification on the front-end screen interface; and a confirmation module, used to, if the verification code indicated by the verification information in the verification information indicated by the verification result in the user input information does not match the target verification code, confirm that the verification is unsuccessful and display a re-verification notification on the front-end screen interface.
[0130] The invention will now be described in conjunction with another alternative embodiment.
[0131] This invention provides another batch verification device for CAPTCHAs, which is applied to a backend server and connected to the frontend device used by the user.
[0132] Figure 6This is a schematic diagram of another optional batch verification device according to an embodiment of the present invention, such as... Figure 6 As shown, the batch verification code verification device includes: a second receiving unit 60, a query unit 61, a comparison unit 62, and a second sending unit 63, wherein,
[0133] The second receiving unit 60 is used to receive the batch keywords, verification code index value and user input information input by the front-end device. The user input information refers to the information generated by the user performing a verification operation on the target verification code displayed on the front-end screen interface of the front-end device.
[0134] The query unit 61 is used to query the target verification code in the batch verification code based on the verification code index value based on the batch verification code pre-stored in the batch keyword index key-value pair cache. The batch verification codes are pre-cached in the key-value pair cache of the backend server.
[0135] The comparison unit 62 is used to compare the verification information of the user input information with the target verification code to obtain the verification result;
[0136] The second sending unit 63 is used to send the verification result to the front-end device.
[0137] In the aforementioned batch verification code verification device, when the backend server verifies the verification code, it receives the batch keywords, verification code index value, and user input information from the frontend device through the second receiving unit 60. The user input information refers to the information generated by the user performing a verification operation on the target verification code displayed on the frontend screen interface of the frontend device. The query unit 61 queries the target verification code in the batch verification code based on the batch verification code index value and the batch verification code cached in advance. The batch verification codes are pre-cached in the key-value pair cache of the backend server. The comparison unit 62 compares the verification information of the user input information with the target verification code to obtain the verification result. The verification result is then sent to the frontend device through the second sending unit 63.
[0138] In this embodiment, by generating verification codes in batches and returning them to the front-end device, the front-end device first iterates through the batch of verification codes when it needs to retrieve them again. Only after it has finished iterating through them does it initiate the back-end service to regenerate the verification codes in batches, thereby reducing the frequency of access to the back-end interface. This solves the technical problem in related technologies where the back-end service needs to be called to regenerate the verification codes every time they need to retrieve them again, resulting in frequent access to the back-end interface.
[0139] Optionally, the batch verification device further includes: a third receiving module, used to receive a verification code retrieval request sent by the front-end device before receiving the batch keywords, verification code index value, and user input information input by the front-end device; a second response module, used to respond to the verification code retrieval request, randomly generate N graphic verification codes, and combine the N graphic verification codes into a batch verification code, where N is an integer greater than or equal to 2; a storage module, used to store the batch verification codes in a key-value pair cache, and generate a batch keyword and a verification code list corresponding to the batch verification codes; and a second sending module, used to send the batch verification codes, batch keywords, and verification code list to the front-end device.
[0140] The aforementioned batch verification code verification device may also include a processor and a memory. The first acquisition unit 50, extraction unit 51, first sending unit 52, first receiving unit 53, second receiving unit 60, query unit 61, comparison unit 62, and second sending unit 63 are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0141] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and kernel parameters can be adjusted to verify the selected verification codes against the user-input verification codes.
[0142] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0143] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: obtaining batch verification codes and storing the batch verification codes in a front-end cache, wherein the batch verification codes contain N verification codes to be used, and the batch verification codes correspond to batch keywords; the front-end device includes: a front-end cache and a front-end screen interface, where N is an integer greater than or equal to 2; extracting a target verification code from the batch verification codes in the front-end cache and displaying the target verification code on the front-end screen interface, wherein the target verification code corresponds to an index value, and the index value represents the extraction relationship of extracting the target verification code from the batch verification codes; receiving user input information and sending the batch keywords, the index value of the target verification code, and the user input information to a back-end server, wherein the user input information refers to the information generated by the user performing a verification operation on the front-end screen interface; the back-end server queries the pre-cached target verification code based on the batch keywords and the index value, and compares the verification information in the user input information with the target verification code to obtain a verification result; and receiving the verification result returned by the back-end server.
[0144] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the above-described batch verification code verification method.
[0145] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-described batch verification code verification method.
[0146] Figure 7 This is a hardware structure block diagram of an electronic device (or mobile device) for a batch verification code verification method according to an embodiment of the present invention. Figure 7 As shown, an electronic device may include one or more ( Figure 7 The processor 702 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 704 for storing data may also be included, denoted as 702a, 702b, ..., 702n. In addition, it may include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 7 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device may also include components that are more... Figure 7 The more or fewer components shown, or having the same Figure 7 The different configurations shown.
[0147] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0148] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0149] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0150] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0151] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0152] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0153] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for verifying batched codes, characterized by, The application is applied to a front-end device used by a user, the front-end device is connected with a back-end server, and comprises: A batch verification code is acquired and stored in a front-end cache, wherein the batch verification code contains N to-be-used verification codes, the batch verification code corresponds to a batch keyword, the front-end device comprises the front-end cache and a front-end screen interface, and N is an integer greater than or equal to 2; A target verification code is extracted from the batch verification code in the front-end cache, and the target verification code is displayed on the front-end screen interface, wherein the target verification code corresponds to an index value, and the index value represents an extraction relationship of the target verification code extracted from the batch verification code; User input information is received, and the batch keyword, the index value of the target verification code and the user input information are sent to the back-end server, wherein the user input information is information generated by the user performing a verification operation on the front-end screen interface, the back-end server queries the target verification code pre-cached based on the batch keyword and the index value, and compares verification information in the user input information with the target verification code to obtain a verification result; The verification result returned by the back-end server is received; Before the batch verification code is acquired, a verification code acquisition request is sent to the back-end server, wherein after receiving the verification code acquisition request, the back-end server randomly generates N graphic verification codes, combines the N graphic verification codes into the batch verification code, stores the batch verification code into a key-value pair cache, generates a batch keyword corresponding to the batch verification code and a verification code list, and pre-stores the batch verification code and the corresponding batch keyword and the verification code list in the cache of the back-end server; and the batch verification code, the batch keyword corresponding to the batch verification code and the verification code list returned by the back-end server are received.
2. The authentication method of claim 1, wherein, The step of extracting the target verification code from the batch verification code in the front-end cache comprises: A verification code list associated with the batch verification code is acquired, and an index sequence corresponding to the verification code list is generated; A verification code is acquired from the batch verification code in the front-end cache according to the index sequence, and the acquired verification code is taken as the target verification code.
3. The authentication method of claim 2, wherein, After the target verification code is displayed on the front-end screen interface, the following further comprises: A replacement operation is received, and in response to the replacement operation, a next verification code after the target verification code is acquired from the batch verification code according to the index sequence, and the next verification code is displayed on the front-end screen interface.
4. The authentication method of claim 3, wherein, After the replacement operation is received, the following further comprises: It is inquired whether the verification codes in the batch verification code have all been used up; In the case that the verification codes in the batch verification code have all been used up, new batch verification codes are re-acquired; In the case that the verification codes in the batch verification code have not all been used up, the replacement operation is responded to.
5. The method of claim 1, wherein, After the verification result returned by the back-end server is received, the following further comprises: In a case where the verification result indicates that the verification code indicated by the verification information in the user input information is consistent with the target verification code, it is confirmed that the verification is passed, and a verification pass notification is displayed on the front-end screen interface; In a case where the verification result indicates that the verification code indicated by the verification information in the user input information is inconsistent with the target verification code, it is confirmed that the verification is failed, and a re-verification notification is displayed on the front-end screen interface.
6. A method of verifying batched codes, characterized by, The application is applied to a back-end server connected with a front-end device used by a user, and comprises: receiving batch keywords, verification code index values and user input information input by the front-end device, wherein the user input information is information generated by a user performing a verification operation on a target verification code displayed on a front-end screen interface of the front-end device; based on the batch verification codes pre-stored in the batch keyword index key-value pair cache, querying a target verification code in the batch verification codes based on the verification code index value, wherein the batch verification codes are pre-cached in the key-value pair cache of the back-end server; comparing verification information of the user input information with the target verification code to obtain a verification result; sending the verification result to the front-end device; before receiving the batch keywords, verification code index values and user input information input by the front-end device, the application further comprises: receiving a verification code acquisition request sent by the front-end device; in response to the verification code acquisition request, randomly generating N graphical verification codes, and combining the N graphical verification codes into the batch verification codes, wherein N is an integer greater than or equal to 2; storing the batch verification codes into the key-value pair cache, and generating a batch keyword corresponding to the batch verification codes and a verification code list, wherein the batch verification codes and the corresponding batch keyword and the verification code list are pre-placed in the cache of the back-end server; and sending the batch verification codes, the batch keyword and the verification code list to the front-end device.
7. An apparatus for verifying a batch code, characterized by The application is applied to a front-end device used by a user, and the front-end device is connected with a back-end server, and comprises: a first acquisition unit configured to acquire batch verification codes and store the batch verification codes in a front-end cache, wherein the batch verification codes contain N verification codes to be used, the batch verification codes correspond to a batch keyword, the front-end device comprises the front-end cache and a front-end screen interface, and N is an integer greater than or equal to 2; an extraction unit configured to extract a target verification code from the batch verification codes in the front-end cache and display the target verification code on the front-end screen interface, wherein the target verification code corresponds to an index value, and the index value represents an extraction relationship of extracting the target verification code from the batch verification codes; and The first sending unit is configured to receive user input information and send the batch keyword, the index value of the target verification code, and the user input information to the backend server, wherein the user input information is information generated by a user performing a verification operation on the front-end screen interface, the backend server queries the target verification code pre-cached based on the batch keyword and the index value, and compares verification information in the user input information with the target verification code to obtain a verification result; The first receiving unit is configured to receive the verification result returned by the backend server; The first sending module is configured to send a verification code acquisition request to the backend server before acquiring a batch verification code, wherein the backend server randomly generates N graphical verification codes after receiving the verification code acquisition request, combines the N graphical verification codes into the batch verification code, stores the batch verification code into a key-value pair cache, and generates a batch keyword corresponding to the batch verification code and a verification code list, the batch verification code and the corresponding batch keyword, and the verification code list are pre-stored in the cache of the backend server; and the first sending module is configured to receive the batch verification code, the batch keyword corresponding to the batch verification code, and the verification code list returned by the backend server.
8. A batch verification device for verification codes, characterized in that, The backend server is applied to, and is connected with a front-end device used by a user, and comprises: The second receiving unit is configured to receive a batch keyword, a verification code index value, and user input information input by the front-end device, wherein the user input information is information generated by a user performing a verification operation on a target verification code displayed on a front-end screen interface of the front-end device; The query unit is configured to query a target verification code in the batch verification code based on the batch keyword and the verification code index value, wherein the batch verification code is pre-stored in the key-value pair cache of the backend server; The comparison unit is configured to compare verification information of the user input information with the target verification code to obtain a verification result; The second sending unit is configured to send the verification result to the front-end device; The third receiving module is configured to receive a verification code acquisition request sent by the front-end device before receiving a batch keyword, a verification code index value, and user input information input by the front-end device; the second response module is configured to respond to the verification code acquisition request, randomly generate N graphical verification codes, and combine the N graphical verification codes into the batch verification code, wherein N is an integer greater than or equal to 2; the storage module is configured to store the batch verification code into the key-value pair cache, and generate a batch keyword corresponding to the batch verification code and a verification code list, the batch verification code and the corresponding batch keyword, and the verification code list are pre-stored in the cache of the backend server; and the second sending module is configured to send the batch verification code, the batch keyword, and the verification code list to the front-end device.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises a stored computer program, wherein the computer readable storage medium controls a device where the computer readable storage medium is located to execute the batch verification code verification method in any one of claims 1 to 6 when the computer program is running.
10. An electronic device, comprising: The computer readable storage medium comprises a stored computer program, wherein the computer readable storage medium controls a device where the computer readable storage medium is located to execute the batch verification code verification method in any one of claims 1 to 6 when the computer program is running.
Citation Information
Patent Citations
Service calling method and device based on JSON verification
CN115544470A