CN116561733A - Verification method and device based on picture verification code - Google Patents

Verification method and device based on picture verification code Download PDF

Info

Publication number
CN116561733A
CN116561733A CN202310620462.2A CN202310620462A CN116561733A CN 116561733 A CN116561733 A CN 116561733A CN 202310620462 A CN202310620462 A CN 202310620462A CN 116561733 A CN116561733 A CN 116561733A
Authority
CN
China
Prior art keywords
verification
sentence
library
sentences
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310620462.2A
Other languages
Chinese (zh)
Inventor
王国秋
王洋
包沉浮
田伟娟
崔恺旭
周光照
吕中厚
黄英仁
张华正
高梦晗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202310620462.2A priority Critical patent/CN116561733A/en
Publication of CN116561733A publication Critical patent/CN116561733A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/36User authentication by graphic or iconic representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Abstract

The disclosure provides a verification method and device based on a picture verification code, relates to the technical field of computers, and particularly relates to the technical field of network security. The implementation scheme is as follows: respectively selecting a plurality of target verification sentences and a plurality of target verification pictures corresponding to the plurality of target verification sentences from a sentence library which is constructed in advance and comprises a plurality of verification sentences and a picture library which comprises a plurality of verification pictures, wherein each verification sentence in the sentence library is generated by a plurality of keywords, and each verification picture in the picture library is generated according to the semantics of a corresponding verification sentence in the sentence library; generating verification problems according to the target verification sentences and the target verification pictures; and in response to determining that the user performed an operation associated with the verification problem, determining that the verification was successful.

Description

Verification method and device based on picture verification code
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of network security technologies, and in particular, to a verification method and apparatus based on a picture verification code, an electronic device, a computer readable storage medium, and a computer program product.
Background
The verification code is a public full-automatic program for distinguishing whether a user is a computer or a person, is often applied to various APP and websites, can be used for preventing malicious cracking of passwords, ticket brushing, forum watering, crawlers and the like, and has important practical application values. The common verification codes at present comprise a plurality of character type verification codes, slider type verification codes, character click type verification codes and the like. However, with the rapid development of deep learning technology, these verification codes are easily automatically identified by neural network models, which may result in that the current verification method cannot achieve the purpose of distinguishing programs from people.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, the problems mentioned in this section should not be considered as having been recognized in any prior art unless otherwise indicated.
Disclosure of Invention
The present disclosure provides a verification method and apparatus based on a picture verification code, an electronic device, a computer-readable storage medium, and a computer program product.
According to an aspect of the present disclosure, there is provided a verification method based on a picture verification code, including: respectively selecting a plurality of target verification sentences and a plurality of target verification pictures corresponding to the plurality of target verification sentences from a sentence library which is constructed in advance and comprises a plurality of verification sentences and a picture library which comprises a plurality of verification pictures, wherein each verification sentence in the sentence library is generated by a plurality of keywords, and each verification picture in the picture library is generated according to the semantics of a corresponding verification sentence in the sentence library; generating verification problems according to the target verification sentences and the target verification pictures; and in response to determining that the user performed an operation associated with the verification problem, determining that the verification was successful.
According to another aspect of the present disclosure, there is provided a verification device based on a picture verification code, including: a selecting unit configured to select a plurality of target verification sentences and a plurality of target verification pictures corresponding to the plurality of target verification sentences from a sentence library including a plurality of verification sentences and a picture library including a plurality of verification pictures, which are constructed in advance, respectively, wherein each verification sentence in the sentence library is generated by a plurality of keywords, and each verification picture in the picture library is generated according to the semantics of a corresponding verification sentence in the sentence library; a generation unit configured to generate a verification question from a plurality of target verification sentences and a plurality of target verification pictures; and a determining unit configured to determine that the authentication is successful in response to determining that the user performs an operation associated with the authentication problem.
According to still another aspect of the present disclosure, there is also provided an electronic apparatus including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described above.
According to yet another aspect of the present disclosure, there is also provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the above-described method.
According to yet another aspect of the present disclosure, there is also provided a computer program product comprising a computer program, wherein the computer program is adapted to perform the above-described method when executed by a processor.
According to one or more embodiments of the present disclosure, the verification pictures forming the verification code may be generated from a verification sentence containing a plurality of keywords, and thus the verification pictures will have more complex composite semantics. Such verification pictures are not easily recognized by artificial intelligence, thus improving the reliability of network verification.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The accompanying drawings illustrate exemplary embodiments and, together with the description, serve to explain exemplary implementations of the embodiments. The illustrated embodiments are for exemplary purposes only and do not limit the scope of the claims. Throughout the drawings, identical reference numerals designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, in accordance with an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of a picture verification code based verification method according to an embodiment of the disclosure;
FIG. 3 illustrates a flowchart of a method of generating verification statements in a statement library, according to an embodiment of the disclosure;
FIG. 4 illustrates a flowchart of a method of deleting a semantically repeated validation statement in accordance with an embodiment of the present disclosure;
FIG. 5 illustrates a flow chart of a method of selecting a plurality of target verification statements from a statement library, in accordance with an embodiment of the disclosure;
FIG. 6 illustrates a schematic diagram of a verification problem interface in accordance with an embodiment of the present disclosure;
FIG. 7 illustrates a flow chart of a method of generating a verification problem in accordance with an embodiment of the present disclosure;
Fig. 8 shows a block diagram of a structure of a picture-authentication-code-based authentication device according to an embodiment of the present disclosure; and
fig. 9 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, the use of the terms "first," "second," and the like to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of the elements, unless otherwise indicated, and such terms are merely used to distinguish one element from another element. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, they may also refer to different instances based on the description of the context.
The terminology used in the description of the various examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, the elements may be one or more if the number of the elements is not specifically limited. Furthermore, the term "and/or" as used in this disclosure encompasses any and all possible combinations of the listed items.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented, in accordance with an embodiment of the present disclosure. Referring to fig. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
In embodiments of the present disclosure, server 120 may run one or more services or software applications that enable execution of a picture-captcha-based authentication method.
In some embodiments, server 120 may also provide other services or software applications, which may include non-virtual environments and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof that are executable by one or more processors. A user operating client devices 101, 102, 103, 104, 105, and/or 106 may in turn utilize one or more client applications to interact with server 120 to utilize the services provided by these components. It should be appreciated that a variety of different system configurations are possible, which may differ from system 100. Accordingly, FIG. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
A user may use client devices 101, 102, 103, 104, 105, and/or 106 to access a network and access an associated website. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface, e.g., display a verification question before the user accesses a web page, etc. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that the present disclosure may support any number of client devices.
Client devices 101, 102, 103, 104, 105, and/or 106 may include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and the like. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, linux, or Linux-like operating systems (e.g., GOOGLE Chrome OS); or include various mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, windows Phone, android. Portable handheld devices may include cellular telephones, smart phones, tablet computers, personal Digital Assistants (PDAs), and the like. Wearable devices may include head mounted displays (such as smart glasses) and other devices. The gaming system may include various handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a number of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. For example only, the one or more networks 110 may be a Local Area Network (LAN), an ethernet-based network, a token ring, a Wide Area Network (WAN), the internet, a virtual network, a Virtual Private Network (VPN), an intranet, an extranet, a blockchain network, a Public Switched Telephone Network (PSTN), an infrared network, a wireless network (e.g., bluetooth, WIFI), and/or any combination of these and/or other networks.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture that involves virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain virtual storage devices of the server). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. Server 120 may also run any of a variety of additional server applications and/or middle tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of client devices 101, 102, 103, 104, 105, and/or 106. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and/or 106. In some implementations, server 120 may include one or more applications, e.g., applications for services such as object detection and recognition, signal conversion, etc., based on data such as images, video, voice, text, digital signals, etc., to process task requests such as operational instructions, interactions, etc., received from client devices 101, 102, 103, 104, 105, and/or 106. The server can train the neural network model by using training samples according to specific deep learning tasks, test each sub-network in the super-network module of the neural network model, and determine the structure and parameters of the neural network model for executing the deep learning tasks according to the test results of each sub-network. Various data may be used as training sample data for a deep learning task, such as image data, audio data, video data, or text data. After training of the neural network model is completed, the server 120 may also automatically search out the optimal model structure through a model search technique to perform a corresponding task.
In some implementations, the server 120 may be a server of a distributed system or a server that incorporates a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The cloud server is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and virtual private server (VPS, virtual Private Server) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as verification statements and verification pictures. Database 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. Database 130 may be of different types. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve the databases and data from the databases in response to the commands.
In some embodiments, one or more of databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key value stores, object stores, or conventional stores supported by the file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with the present disclosure.
Fig. 2 illustrates a flow chart of a picture-validation-code-based validation method 200 in accordance with an embodiment of the present disclosure. As shown in fig. 2, the method 200 includes:
step 210, respectively selecting a plurality of target verification sentences and a plurality of target verification pictures corresponding to the plurality of target verification sentences from a sentence library comprising a plurality of verification sentences and a picture library comprising a plurality of verification pictures, which are constructed in advance, wherein each verification sentence in the sentence library is generated by a plurality of keywords, and each verification picture in the picture library is generated according to the semantics of a corresponding verification sentence in the sentence library;
step 220, generating verification questions according to the multiple target verification sentences and the multiple target verification pictures; and
in response to determining that the user performed the operation associated with the verification problem, a verification success is determined 230.
According to one or more embodiments of the present disclosure, the verification pictures forming the verification code may be generated from a verification sentence containing a plurality of keywords, and thus the verification pictures will have more complex composite semantics. Such verification pictures are not easily recognized by artificial intelligence, thus improving the reliability of network verification.
The sentence library and the picture library may be separately constructed before step 210. In the process of generating the verification code for multiple times by the subsequent server 120, the verification sentences and the verification pictures can be directly selected from the constructed sentence library and the picture library, and the sentence library and the picture library do not need to be repeatedly constructed during each verification.
In constructing the sentence library, a keyword library may be previously set in the database 130, and a large number of keywords may be included in the keyword library, and the keywords include, but are not limited to, words having actual semantics, such as nouns, verbs, adjectives, and the like. Noun keywords may include, for example, object nouns (e.g., car, airplane, television, book, etc.), animal nouns (e.g., cat, dog, bird, etc.), building nouns (e.g., library, television tower, palace), and the like. Verb class keywords may include, for example: running, waiting, gazing, jumping, etc. Adjective class keywords may include, for example, color class adjectives (e.g., red, yellow, green), etc., adjectives in adjective states (e.g., standing, sitting, etc.), adjectives in adjectives (e.g., happiness, disappointment, etc.), etc. Keywords may then be selected from the keyword library, which may be used to generate a verification statement. The verification statement may include, in addition to these selected keywords, certain terms that do not have the actual semantics (e.g., being, passing, etc.). The selected keywords can have a certain degree of association, so that verification sentences which do not accord with normal rules can be avoided from appearing later. For example, in the case where one of the keywords picks up the noun "dog", the other keyword needs to be associated with the noun "dog", which may be, for example, the adjective "white", the verb "jump", etc.
In some embodiments, the selected keywords may be input into a trained language model to generate a validation statement. The language model has a semantic enhancement function, and can carry out sentence filling on a plurality of isolated keywords so as to generate a complete sentence. In some embodiments, the same plurality of keywords may utilize a language model to generate a plurality of different validation statements, which may have similar but not identical semantics. In the above-described manner, a plurality of keyword combinations may be constituted by arranging and combining a plurality of keywords, each keyword combination including a plurality of keywords capable of generating a verification sentence, and a plurality of verification sentences may be generated using the plurality of keyword combinations. These verification statements may then be stored in the cloud server's associated database 130 to form a statement library for later use in generating verification code pictures.
When constructing the picture library, each verification picture in the picture library is generated by one verification sentence in the sentence library, in other words, the number of verification pictures in the picture library is the same as the number of verification sentences in the sentence library, and each verification picture in the picture library corresponds to one verification sentence in the sentence library. In some embodiments, verification statements may be input into the text-to-graph model to generate corresponding verification pictures. The meridional graph model can generate an associated image from the semantics contained in the validation statement, e.g., the validation statement is "his puppy is running on grass, looking for fresh food. Then, the text-generated graph model will generate a picture containing the corresponding semantic frames.
As described above, each verification picture in the picture library corresponds to one verification sentence in the sentence library, so in step 210, a plurality of corresponding target verification sentences and a plurality of target verification pictures can be selected from the sentence library and the picture library based on the correspondence. In some embodiments, each verification statement and each verification picture may be numbered in the database 130 storing statement and picture libraries, and the corresponding verification statement and verification picture may have the same number to facilitate selection in step 210.
In step 220, for example, 4 target verification sentences and corresponding 4 target verification pictures may be selected to generate a verification question. In some embodiments, 4 target verification sentences may be displayed to the user and more than 4 verification pictures may be displayed, which may contain, in addition to the 4 target verification pictures described above, a number of other multiple verification pictures from a picture library. The verification problem may be prompting the user to perform a related click operation, for example, prompting the user to select 4 target verification pictures which conform to the semantics of the 4 target verification sentences from the more than 4 verification pictures. In some embodiments, 4 target verification sentences may also be displayed to the user in the first order, and the 4 target verification pictures described above are displayed simultaneously. The verification problem may be prompting the user to perform related click operations in a required order, for example prompting the user to sequentially select 4 target verification pictures according to the semantics of the 4 target verification sentences according to a first order.
Although in the above-described embodiment, 4 target verification sentences and corresponding 4 target verification pictures may be selected to generate a verification problem, in other embodiments, a greater or lesser number of target verification sentences and target verification pictures may be selected to generate a verification problem according to the difficulty level required for the verification problem, and the verification problem may prompt the user to operate in a manner different from the above-described click operation.
Fig. 3 illustrates a flowchart of a method 300 of generating verification statements in a statement library, in accordance with an embodiment of the disclosure. As shown in fig. 3, the method 300 includes:
step 310, selecting a plurality of keywords from a pre-constructed keyword library, wherein the keywords at least comprise nouns, verbs and adjectives; and
step 320, inputting the plurality of keywords into the sentence generation model to generate a verification sentence in the sentence library.
In step 310, in order to make the generated verification statement have more complex semantics, the plurality of keywords may include at least nouns, verbs, and adjectives. For example, in some embodiments, a noun may be, for example, "a puppy," a verb may be "running," an adjective may be "happy," and a verification statement ultimately generated from these keywords is "his puppy runs on grass at happy ground. By setting three different types of keywords, the generated verification sentences have more complex semantics, so that the subsequently generated verification pictures are more difficult to identify by artificial intelligence or a neural network, and the verification reliability of the verification codes is improved.
In step 320, inputting the plurality of keywords into the sentence generation model to generate one verification sentence in the sentence library includes: and inputting the keywords into a template of a preset sentence generation model to generate the verification sentence. Specifically, a template suitable for a large language model (such as ChatGPT and a text-to-speech) can be designed, and after the template is filled with the keywords, the large language model can generate descriptive sentences meeting the requirements. And putting the phrases of nouns, verbs and adjectives selected in the keyword lexicon into a template of the template to construct the template. The large language model can be trained and built later; and generating a verification statement meeting the requirements by using the large language model and the constructed prompt. These verification statements are subsequently used to generate verification pictures and are themselves part of the verification code.
In some embodiments, after constructing the statement library containing the plurality of verification statements, further comprising: at least one validation statement of the plurality of validation statements that is semantically repeated is deleted. As will be appreciated by those skilled in the art, since validation statements in a statement library are obtained by a language model, the language model will generate a large number of validation statements in which there may be semantically repeated statements. If these semantically repeated verification sentences are subsequently selected as target verification sentences, there is a possibility that the user who receives verification is confused. For example, there may be two verification sentences in the sentence library that "his puppy runs on the grassland with happiness" and "the pet dog jumps over the grassland" at the same time, and the verification pictures generated subsequently by the two verification sentences may be very close, which may cause the user to be hard to distinguish. To avoid the above-mentioned problems, at least one validation statement of semantic repetition may be actively deleted.
FIG. 4 illustrates a flowchart of a method 400 of deleting a semantically repeated validation statement, as shown in FIG. 4, the method 400 comprising:
step 410, respectively performing feature coding on the verification sentences by using a language model;
step 421, for any two verification statements in the plurality of verification statements: calculating the similarity between the feature codes of the two verification sentences; and
in response to determining that the similarity is greater than the first similarity threshold, one of the two validation statements is deleted 422.
In step 410, the generated verification statement may be feature coded using an encoder of a language model (e.g., BERT, etc.), thereby obtaining feature vectors of the verification statement in a feature space.
In step 421, the cos distance can be used to calculate the similarity of feature codes of different sentences in the feature space, and in general, the closer the feature vector distance is in the feature space, the higher their similarity is for two verification sentences.
In step 422, if the similarity of the two verification sentences is greater than the first similarity threshold, then they are determined to be two sentences that repeat the semantics. The first similarity threshold may be set according to an actual application scenario of the application verification code. One verification statement of the two verification statements can be removed later so as to avoid the occurrence of the verification statement with repeated semantics or too high similarity.
In this embodiment, by calculating the similarity of feature codes, it is possible to more accurately determine which verification sentences are repeated semantically, so as to avoid the problem that the verification sentences are deleted by mistake or the verification sentences repeated semantically are deleted incompletely.
In some embodiments, the process of generating each verification picture in the picture library includes: and inputting a corresponding verification sentence in the sentence library into the text-generated graph model to generate the verification picture. Specifically, a meridional graph model can be trained and built in advance; and inputting the obtained verification statement into a draft graph model (for example, wen Xinyi grids, stable Diffusion and the like) to generate a picture of the corresponding description. In the embodiment, the verification picture can be generated through the draft graph model, so that the picture conforming to the semantics of the verification sentence does not need to be manufactured or shot manually, and the labor cost is effectively saved.
FIG. 5 illustrates a flow chart of a method 500 of selecting a plurality of target verification statements from a statement library, in accordance with an embodiment of the disclosure. As shown in fig. 5, the method 500 includes:
step 510, respectively performing feature coding on the verification sentences by using a language model; and
step 520, selecting a plurality of verification sentences with feature codes having similarity smaller than a second similarity threshold from the plurality of verification sentences as a plurality of target verification sentences.
It will be appreciated that there are some verification sentences in the sentence library that are very similar in terms of semantics, and that the verification pictures that are subsequently generated by these verification sentences may also be very close, which results in the user being indistinguishable during the verification phase. If these very semantically close verification sentences are subsequently selected as target verification sentences, there is a possibility that the user who receives verification is confused. Thus, in some embodiments, when selecting multiple target verification statements from a statement library, verification statements with a lower degree of similarity may be selected intentionally to avoid causing the user to be indistinguishable.
In step 510, the verification statement to be selected may be feature-encoded by an encoder of a language model (e.g., BERT, etc.), thereby obtaining feature vectors of the verification statement in a feature space.
In step 520, the similarity of feature codes may be determined in a similar manner to step 421 in method 400 described above, i.e., the similarity of feature codes of different sentences may be calculated in the feature space using cos distances, in general, the closer the feature vector distance is to two verification sentences in the feature space, the higher their similarity is.
After the similarity of the feature vectors of each verification statement is determined, verification statements and verification pictures with smaller similarity, namely larger semantic difference, can be used, so that interference to subsequent users subjected to verification is avoided.
The generation interface for the verification problem will be described in detail below with reference to fig. 6. FIG. 6 illustrates a schematic diagram of a verification problem interface in accordance with an embodiment of the present disclosure; fig. 7 illustrates a flowchart of a method 700 of generating a verification problem from a plurality of target verification statements and a plurality of target verification pictures, as illustrated in fig. 7, the method 700 comprising:
step 710, displaying a plurality of target verification sentences in a preset sequence, and displaying a plurality of target verification pictures; and
in step 720, a prompting operation sentence is displayed to prompt the user to perform an operation associated with the verification problem, wherein the prompting operation sentence includes prompting the user to click on a plurality of target verification pictures in an order corresponding to the preset order.
As shown in fig. 6, the relevant interactive interface for performing verification (e.g., the interactive interface of the user terminal) may display a plurality of target verification sentences as shown and a plurality of target verification pictures. Illustratively, the number of target verification sentences and target verification pictures may be 4. The 4 target verification statements include, for example: "his puppies run on grasslands at ease, looking for fresh food"; "his puppy is running at the gate with ease, waiting for the owner to go home"; "his puppy is happy to run in the garden, sniff the flower and grass smell"; and 4. "my friends' dogs run in forest happily, sniff the leaves and grasslands. After or simultaneously with displaying the 4 target verification sentences, 4 target verification pictures are also displayed, each picture in the 4 target verification pictures corresponds to one target verification sentence in the 4 target verification sentences, and an image conforming to the semantics of the target verification sentence is displayed, as shown in fig. 6.
Subsequently, the interactive interface also displays a prompt operation statement to prompt the user to perform an operation associated with the verification problem. For example, in the embodiment shown in fig. 6, the hint operation sentence may be "please click on the image most in line with the description of the following four sentences in turn". After the interactive interface is generated and the whole verification problem is finished, the user can perform relevant clicking operation. In this embodiment, the user can pass the verification after clicking the verification pictures of the upper left, the upper right, the lower left and the lower right in sequence. It should be noted here that the plurality of target verification pictures are displayed in a random arrangement, that is, the arrangement order of the plurality of target verification pictures may be the same as or different from the arrangement order of the plurality of target verification sentences.
The verification code can be generated when a user jumps from the first network interface to the second network interface, so that the safety access of the related network is ensured, and illegal programs are prevented from invading the second network interface. After the user passes the authentication through the authentication interface, the user can enter the second network interface expected by the user.
According to another aspect of the present disclosure, there is also provided a verification device based on a picture verification code. Fig. 8 shows a block diagram of a structure of a picture-based authentication device 800 according to an embodiment of the present disclosure. As shown in fig. 8, the apparatus 800 includes: a selecting unit 830 configured to select a plurality of target verification sentences and a plurality of target verification pictures corresponding to the plurality of target verification sentences from a sentence library including a plurality of verification sentences and a picture library including a plurality of verification pictures, which are constructed in advance, respectively, wherein each verification sentence in the sentence library is generated by a plurality of keywords, and each verification picture in the picture library is generated according to the semantics of a corresponding one of the verification sentences in the sentence library; a generation unit 840 configured to generate a verification question from the plurality of target verification sentences and the plurality of target verification pictures; and a determining unit 850 configured to determine that the authentication is successful in response to determining that the user performs an operation associated with the authentication problem.
In some embodiments, the apparatus 800 further comprises a sentence construction unit 810 configured to construct a sentence library, wherein the sentence construction unit 810 comprises: a selection module configured to select a plurality of keywords from a pre-built keyword library, the plurality of keywords including at least nouns, verbs, and adjectives; and a generation module configured to input a plurality of keywords into the sentence generation model to generate one verification sentence in the sentence library.
In some embodiments, the generation module is further configured to: and inputting the keywords into a template of a preset sentence generation model to generate the verification sentence.
In some embodiments, the verification device 800 further comprises: and a deleting unit configured to delete at least one verification sentence of the plurality of verification sentences, after the sentence library is constructed.
In some embodiments, the deletion unit includes: a first encoding module configured to perform feature encoding on the plurality of verification sentences, respectively, using the language model; a computing module configured to, for any two verification statements of the plurality of verification statements: calculating the similarity between the feature codes of the two verification sentences; and a deletion module configured to delete one of the two verification statements in response to determining that the similarity is greater than the first similarity threshold.
In some embodiments, the apparatus 800 further comprises a picture construction unit 820 configured to construct a picture library from the sentence library, wherein the picture construction unit 820 is further configured to: for each verification picture: and inputting verification sentences in the sentence library into the text-generated graph model to generate corresponding verification pictures.
In some embodiments, the selecting unit 830 includes: the second coding module is configured to respectively perform feature coding on the verification sentences by using the language model; and a selection module configured to select, from the plurality of verification sentences, a plurality of verification sentences having feature codes with similarities smaller than a second similarity threshold as a plurality of target verification sentences.
In some embodiments, the generating unit 840 includes: a first display module configured to display a plurality of target verification sentences in a preset order and to display a plurality of target verification pictures; and a second display module configured to display a prompt operation sentence to prompt the user to perform an operation associated with the verification problem, wherein the prompt operation sentence includes prompting the user to click a plurality of target verification pictures in an order corresponding to a preset order.
It should be appreciated that the various elements of the apparatus 800 shown in fig. 8 may correspond to the various steps in the method 200 described with reference to fig. 2. Thus, the operations, features and advantages described above with respect to method 200 apply equally to apparatus 800 and the units and modules it comprises. For brevity, certain operations, features and advantages are not described in detail herein.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
According to embodiments of the present disclosure, there is also provided an electronic device, a readable storage medium and a computer program product.
Referring to fig. 9, a block diagram of an electronic device 900 that may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 9, the apparatus 900 includes a computing unit 901 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
Various components in device 900 are connected to I/O interface 905, including: an input unit 906, an output unit 907, a storage unit 908, and a communication unit 909. The input unit 906 may be any type of device capable of inputting information to the device 900, the input unit 906 may receive input numeric or character information and generate key signal inputs related to user settings and/or function control of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and/or a remote control. The output unit 907 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 908 may include, but is not limited to, magnetic disks, optical disks. Communication unit 909 allows device 900 to exchange information/data with other devices through a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth devices, 802.11 devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the respective methods and processes described above, for example, a verification method based on a picture verification code. For example, in some embodiments, the picture verification code based verification method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the above-described picture authentication code-based authentication method may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the picture-verification-code-based verification method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the foregoing methods, systems, and apparatus are merely exemplary embodiments or examples, and that the scope of the present invention is not limited by these embodiments or examples but only by the claims following the grant and their equivalents. Various elements of the embodiments or examples may be omitted or replaced with equivalent elements thereof. Furthermore, the steps may be performed in a different order than described in the present disclosure. Further, various elements of the embodiments or examples may be combined in various ways.

Claims (19)

1. A verification method based on a picture verification code comprises the following steps:
respectively selecting a plurality of target verification sentences and a plurality of target verification pictures corresponding to the plurality of target verification sentences from a sentence library which is constructed in advance and comprises a plurality of verification sentences and a picture library which comprises a plurality of verification pictures, wherein each verification sentence in the sentence library is generated by a plurality of keywords, and each verification picture in the picture library is generated according to the semantics of a corresponding verification sentence in the sentence library;
Generating verification questions according to the target verification sentences and the target verification pictures; and
in response to determining that the user performed an operation associated with the verification problem, verification is determined to be successful.
2. The authentication method of claim 1, further comprising:
constructing the sentence library, wherein the constructing the sentence library comprises:
selecting the keywords from a pre-constructed keyword library, wherein the keywords at least comprise nouns, verbs and adjectives; and
inputting the plurality of keywords into a sentence generation model to generate a validation sentence in the sentence library.
3. The verification method of claim 2, wherein the inputting the plurality of keywords into a sentence generation model to generate one verification sentence in the sentence library comprises:
and inputting the keywords into a preset template of the sentence generation module to generate the verification sentence.
4. The authentication method of claim 2, further comprising:
after the statement library is constructed, deleting at least one verification statement of the plurality of verification statements that is semantically repeated.
5. The validation method of claim 4, wherein the deleting at least one validation statement of the plurality of validation statements that is semantically repeated comprises:
Respectively carrying out feature coding on the verification sentences by using a language model;
for any two validation statements of the plurality of validation statements:
calculating the similarity between the feature codes of the two verification sentences; and
in response to determining that the similarity is greater than a first similarity threshold, deleting one of the two validation statements.
6. The authentication method according to any one of claims 1-5, further comprising:
constructing the picture library according to the statement library, wherein the constructing the picture library according to the statement library comprises:
and inputting the verification sentences in the sentence library into a text-generated graph model to generate corresponding verification pictures.
7. The verification method of any one of claims 1-5, wherein selecting a plurality of target verification statements from the statement library comprises:
respectively carrying out feature coding on the verification sentences by using a language model; and
and selecting a plurality of verification sentences with feature codes having similarity smaller than a second similarity threshold from the plurality of verification sentences as the plurality of target verification sentences.
8. The verification method of any one of claims 1-5, wherein the generating a verification question from the plurality of target verification statements and the plurality of target verification pictures comprises:
Displaying the target verification sentences in a preset sequence, and displaying the target verification pictures; and
and displaying a prompt operation statement to prompt a user to execute an operation associated with the verification problem, wherein the prompt operation statement comprises prompting the user to click the plurality of target verification pictures in an order corresponding to the preset order.
9. A picture verification code-based verification device, comprising:
a selecting unit configured to select a plurality of target verification sentences and a plurality of target verification pictures corresponding to the plurality of target verification sentences from a sentence library including a plurality of verification sentences and a picture library including a plurality of verification pictures, which are constructed in advance, respectively, wherein each verification sentence in the sentence library is generated by a plurality of keywords, and each verification picture in the picture library is generated according to the semantics of a corresponding verification sentence in the sentence library;
a generation unit configured to generate a verification question from the plurality of target verification sentences and the plurality of target verification pictures; and
and a determining unit configured to determine that the authentication is successful in response to determining that the user performs an operation associated with the authentication problem.
10. The authentication device of claim 9, further comprising:
a sentence construction unit configured to construct the sentence library, wherein the sentence construction unit includes:
a selection module configured to select the plurality of keywords from a pre-built keyword library, the plurality of keywords including at least nouns, verbs, and adjectives; and
a generation module configured to input the plurality of keywords into a sentence generation model to generate one verification sentence in the sentence library.
11. The authentication device of claim 10, wherein the generation module is further configured to:
and inputting the keywords into a preset template of the sentence generation module to generate the verification sentence.
12. The authentication device of claim 10, further comprising:
and a deleting unit configured to delete at least one verification sentence of the plurality of verification sentences, which is semantically repeated, after the sentence library is constructed.
13. The authentication apparatus according to claim 12, wherein the deletion unit includes:
a first encoding module configured to perform feature encoding on the plurality of verification sentences respectively using a language model;
A computing module configured to, for any two verification statements of the plurality of verification statements: calculating the similarity between the feature codes of the two verification sentences; and
a deletion module configured to delete one of the two verification statements in response to determining that the similarity is greater than a first similarity threshold.
14. The authentication device according to any one of claims 9-13, further comprising:
a picture construction unit configured to construct the picture library according to the sentence library, wherein the picture construction unit is further configured to:
for each verification picture: and inputting the verification sentences in the sentence library into a text-generated graph model to generate corresponding verification pictures.
15. The authentication device according to any one of claims 9-13, wherein the selection unit comprises:
a second encoding module configured to perform feature encoding on the plurality of verification sentences, respectively, using a language model; and
and the selecting module is configured to select a plurality of verification sentences with feature codes with similarity smaller than a second similarity threshold value from the plurality of verification sentences to serve as the plurality of target verification sentences.
16. The authentication device according to any one of claims 9-13, wherein the generation unit comprises:
A first display module configured to display the plurality of target verification sentences in a preset order and to display the plurality of target verification pictures; and
and a second display module configured to display a prompt operation sentence to prompt a user to perform an operation associated with the verification problem, wherein the prompt operation sentence includes prompting the user to click the plurality of target verification pictures in an order corresponding to the preset order.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the method comprises the steps of
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method of any of claims 1-8.
CN202310620462.2A 2023-05-29 2023-05-29 Verification method and device based on picture verification code Pending CN116561733A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310620462.2A CN116561733A (en) 2023-05-29 2023-05-29 Verification method and device based on picture verification code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310620462.2A CN116561733A (en) 2023-05-29 2023-05-29 Verification method and device based on picture verification code

Publications (1)

Publication Number Publication Date
CN116561733A true CN116561733A (en) 2023-08-08

Family

ID=87498134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310620462.2A Pending CN116561733A (en) 2023-05-29 2023-05-29 Verification method and device based on picture verification code

Country Status (1)

Country Link
CN (1) CN116561733A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899499A (en) * 2015-05-29 2015-09-09 南京理工大学 Internet image search based Web verification code generation method
CN106340049A (en) * 2015-07-15 2017-01-18 中国传媒大学 Verification code generating method based on animation semantics
CN108123806A (en) * 2017-12-19 2018-06-05 重庆亚凡科技有限公司 The generation method of question-type picture validation code
CN108200016A (en) * 2017-12-19 2018-06-22 重庆亚凡科技有限公司 Question-type picture verifies terminal
CN108390862A (en) * 2018-01-29 2018-08-10 丹露成都网络技术有限公司 A kind of graphic verification method based on image data encrypted indexes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899499A (en) * 2015-05-29 2015-09-09 南京理工大学 Internet image search based Web verification code generation method
CN106340049A (en) * 2015-07-15 2017-01-18 中国传媒大学 Verification code generating method based on animation semantics
CN108123806A (en) * 2017-12-19 2018-06-05 重庆亚凡科技有限公司 The generation method of question-type picture validation code
CN108200016A (en) * 2017-12-19 2018-06-22 重庆亚凡科技有限公司 Question-type picture verifies terminal
CN108390862A (en) * 2018-01-29 2018-08-10 丹露成都网络技术有限公司 A kind of graphic verification method based on image data encrypted indexes

Similar Documents

Publication Publication Date Title
US20190103092A1 (en) Rapid deployment of dialogue system
CN112567394A (en) Techniques for constructing knowledge graphs in limited knowledge domains
US20210133535A1 (en) Parameter sharing decoder pair for auto composing
KR101935585B1 (en) Game command recognition method and game command recognition apparatus
CN113728308B (en) Visualization of training sessions for conversational robots
CN113807440A (en) Method, apparatus, and medium for processing multimodal data using neural networks
CN114612749B (en) Neural network model training method and device, electronic device and medium
KR20220049604A (en) Object recommendation method and apparatus, computer device and medium
CN112559721B (en) Method, device, equipment, medium and program product for adjusting man-machine dialogue system
CN116501960B (en) Content retrieval method, device, equipment and medium
US20230047628A1 (en) Human-object interaction detection
US20240104154A1 (en) Ranking of recall data
CN114611532B (en) Language model training method and device, and target translation error detection method and device
CN116303962A (en) Dialogue generation method, training method, device and equipment for deep learning model
CN113656587A (en) Text classification method and device, electronic equipment and storage medium
CN117296058A (en) Variant Inconsistent Attacks (VIA) as a simple and effective method of combating attacks
JP2023002690A (en) Semantics recognition method, apparatus, electronic device, and storage medium
CN115914148A (en) Conversational agent with two-sided modeling
CN115862031B (en) Text processing method, neural network training method, device and equipment
CN114219046B (en) Model training method, matching method, device, system, electronic equipment and medium
CN114547270B (en) Text processing method, training method, device and equipment for text processing model
CN116561733A (en) Verification method and device based on picture verification code
CN115879469A (en) Text data processing method, model training method, device and medium
CN115170887A (en) Target detection model training method, target detection method and device thereof
CN114547252A (en) Text recognition method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination