Verification method and device based on image verification code
By generating verification code questions with compound semantics and using user operation verification to succeed, the problem of existing verification codes being easily recognized is solved and the reliability of network verification is improved.
Patent Information
- Application Number
- CN202310620462.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-05-29
AI Technical Summary
Existing verification code methods are easily automatically recognized by neural network models and cannot effectively distinguish between programs and people, resulting in unreliable verification.
By selecting multiple target verification sentences and pictures from the pre-built statement library and picture library, a verification question with compound semantics is generated, and the user's operation is used to determine the success of the verification.
It improves the reliability of network verification, makes the verification code difficult to be recognized by artificial intelligence, and enhances security.
Smart Images

Figure CN116561733B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, in particular to the field of network security technology, and specifically to a verification method and device based on a picture verification code, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] A verification code is a public fully automatic program used to distinguish whether a user is a computer or a human. It is often used in various apps and websites to prevent malicious password cracking, ticket fraud, forum flooding, crawlers, etc. It has important practical application value. Currently, common verification codes include character-based verification codes, slider-based verification codes, and text-based verification codes. However, with the rapid development of deep learning technology, these verification codes can be easily automatically recognized by neural network models, which may cause the current verification method to be unable to achieve the purpose of distinguishing between programs and humans.
[0003] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0004] The present disclosure provides a verification method and device based on a picture verification code, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] According to one aspect of the present disclosure, a verification method based on a picture verification code is provided, comprising: selecting a plurality of target verification statements and a plurality of target verification pictures corresponding to the plurality of target verification statements from a pre-built sentence library containing a plurality of verification statements and a picture library containing a plurality of verification pictures, respectively, wherein each verification statement 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 statement in the sentence library; generating verification questions according to the plurality of target verification statements and the plurality of target verification pictures; and determining that the verification is successful in response to determining that the user performs an operation associated with the verification question.
[0006] According to another aspect of the present disclosure, a verification device based on a picture verification code is provided, including: a selection unit, configured to respectively select multiple target verification statements and multiple target verification pictures corresponding to the multiple target verification statements from a pre-built sentence library containing multiple verification statements and a picture library containing multiple verification pictures, wherein each verification statement in the sentence library is generated by multiple keywords, and each verification picture in the picture library is generated according to the semantics of a corresponding verification statement in the sentence library; a generation unit, configured to generate verification questions according to the multiple target verification statements and the multiple target verification pictures; and a determination unit, configured to determine that the verification is successful in response to determining that the user performs an operation associated with the verification question.
[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above method.
[0008] According to yet another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above method.
[0009] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program executes the above method when a processor executes the computer program.
[0010] According to one or more embodiments of the present disclosure, the verification picture forming the verification code can be generated by a verification sentence containing multiple keywords, so the verification picture will have more complex compound semantics. Such verification pictures are not easily recognized by artificial intelligence, thereby improving the reliability of network verification.
[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0013] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;
[0014] Figure 2 A flow chart of a verification method based on a picture verification code according to an embodiment of the present disclosure is shown;
[0015] Figure 3 A flowchart of a method for generating a verification statement in a statement library according to an embodiment of the present disclosure is shown;
[0016] Figure 4 A flowchart of a method for deleting semantically repeated verification statements according to an embodiment of the present disclosure is shown;
[0017] Figure 5 A flowchart of a method for selecting multiple target verification statements from a statement library according to an embodiment of the present disclosure is shown;
[0018] Figure 6 A schematic diagram of a verification question interface according to an embodiment of the present disclosure is shown;
[0019] Figure 7 A flowchart of a method for generating verification questions according to an embodiment of the present disclosure is shown;
[0020] Figure 8 A structural block diagram of a verification device based on a picture verification code according to an embodiment of the present disclosure is shown; and
[0021] Fig. 9 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0022] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0023] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0024] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0025] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0026] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 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. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0027] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the execution of a verification method based on a picture verification code.
[0028] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0029] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0030] A user may use client devices 101, 102, 103, 104, 105 and / or 106 to access a network and visit related websites. 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, for example, displaying verification questions before the user accesses a web page. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.
[0031] 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, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. 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 (such as 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 phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.
[0032] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of 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.
[0033] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0034] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The 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.
[0035] In some embodiments, the server 120 may include one or more applications to analyze and merge data feeds and / or event updates received from users of the client devices 101, 102, 103, 104, 105, and / or 106. The 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 the client devices 101, 102, 103, 104, 105, and / or 106. In some embodiments, the server 120 may include one or more applications, such as applications for services such as target detection and recognition, signal conversion, etc. based on data such as images, videos, voices, texts, digital signals, etc., to process task requests such as operation instructions, interactions, etc. received from the client devices 101, 102, 103, 104, 105, and / or 106. The server may train a neural network model using training samples according to a specific deep learning task, and may test each subnetwork in a supernetwork module of the neural network model, and determine the structure and parameters of the neural network model for performing the deep learning task according to the test results of each subnetwork. Various data can be used as training sample data for deep learning tasks, such as image data, audio data, video data or text data, etc. After the training of the neural network model is completed, the server 120 can also automatically search for the optimal model structure through model search technology to perform the corresponding task.
[0036] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with 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. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0037] 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 images. The databases 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. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data from the databases in response to commands.
[0038] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0039] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.
[0040] Figure 2 FIG. 2 shows a flow chart of a verification method 200 based on a picture verification code according to an embodiment of the present disclosure. Figure 2 As shown, the method 200 includes:
[0041] Step 210, selecting a plurality of target verification sentences and a plurality of target verification pictures corresponding to the plurality of target verification sentences from a pre-built sentence library containing a plurality of verification sentences and a pre-built picture library containing 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;
[0042] Step 220, generating verification questions according to the multiple target verification statements and the multiple target verification images; and
[0043] Step 230, in response to determining that the user performs an operation associated with the verification question, determining that the verification is successful.
[0044] According to one or more embodiments of the present disclosure, the verification picture forming the verification code can be generated by a verification sentence containing multiple keywords, so the verification picture will have more complex compound semantics. Such verification pictures are not easily recognized by artificial intelligence, thereby improving the reliability of network verification.
[0045] Before step 210, the sentence library and the picture library may be constructed respectively. In the subsequent process of the server 120 generating verification codes multiple times, the verification sentence and the verification picture may be directly selected from the constructed sentence library and the picture library, without having to repeatedly construct the sentence library and the picture library for each verification.
[0046] When constructing a sentence library, a keyword library can be set in advance in the database 130, and the keyword library can contain a large number of keywords, including but not limited to nouns, verbs, adjectives and other words with actual semantics. Noun keywords can include, for example, object nouns (for example, nouns such as cars, airplanes, televisions, and books), animal nouns (for example, nouns such as cats, dogs, and birds), and architectural nouns (for example, libraries, television towers, and palaces), etc. Verb keywords can include, for example, verbs such as running, waiting, watching, and jumping. Adjective keywords can include, for example, color adjectives (for example, red, yellow, and green), adjectives describing states (for example, standing, sitting, etc.), and adjectives describing moods (for example, happy, disappointed, etc.). Then, several keywords can be selected from the keyword library, and a verification statement can be generated using these keywords. In addition to these selected keywords, the verification statement can also include some function words that do not have actual semantics (for example, being, being, passing, etc.). The above selected keywords can have a certain degree of correlation to avoid the subsequent verification statements that are not in line with common sense. For example, when one of the keywords is the noun "dog", other keywords need to be associated with the noun "dog", such as the adjective "white", the verb "jump", etc.
[0047] In some embodiments, a number of selected keywords can be input into a trained language model to generate a verification statement. The language model has a semantic enhancement function, and can perform sentence filling on isolated keywords to generate a complete sentence. In some embodiments, the same multiple keywords can use the language model to generate multiple different verification statements, and these verification statements can have similar but not completely the same semantics. In the manner described above, multiple keyword combinations can be formed by arranging and combining multiple keywords, each keyword combination contains multiple keywords that can generate verification statements, and multiple verification statements can be generated using multiple keyword combinations. These verification statements can be subsequently stored in the relevant database 130 of the cloud server to form a sentence library for subsequent generation of verification code images.
[0048] When constructing the picture library, each verification picture in the picture library is generated by a 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 a verification sentence in the sentence library. In some embodiments, the verification sentence can be input into the Wensheng graph model to generate the corresponding verification picture. The Wensheng graph model can generate an associated image based on the semantics contained in the verification sentence. For example, the verification sentence is "His puppy is happily running on the grass, looking for fresh food." Then, the Wensheng graph model will generate a picture containing the corresponding semantic picture.
[0049] As described above, each verification picture in the picture library corresponds to a verification sentence in the sentence library, so in step 210, multiple corresponding target verification sentences and multiple target verification pictures can be selected from the sentence library and the picture library based on the corresponding relationship. In some embodiments, each verification sentence and each verification picture can be numbered in the database 130 storing the sentence library and the picture library, and the corresponding verification sentences and verification pictures can have the same number to facilitate selection in step 210.
[0050] In step 220, for example, 4 target verification statements and corresponding 4 target verification pictures can be selected to generate verification questions. In some embodiments, 4 target verification statements can be displayed to the user, and more than 4 verification pictures can be displayed, and these verification pictures, in addition to the above 4 target verification pictures, also contain several other verification pictures from the picture library. The verification question can be to prompt the user to perform relevant point selection operations, for example, it can be to prompt the user to select 4 target verification pictures that meet the semantics of the above 4 target verification statements from the above more than 4 verification pictures. In some embodiments, 4 target verification statements can also be displayed to the user in a first order, and the above 4 target verification pictures can be displayed at the same time. The verification question can be to prompt the user to perform relevant point selection operations in the required order, for example, it can be to prompt the user to select 4 target verification pictures that meet the semantics of the above 4 target verification statements in the first order.
[0051] Although in the above embodiment, 4 target verification statements and corresponding 4 target verification pictures can be selected to generate verification questions, in other embodiments, a larger or smaller number of target verification statements and target verification pictures can be selected to generate verification questions according to the difficulty required by the verification questions, and the verification questions can prompt the user to operate in a manner different from the above-mentioned point selection operation.
[0052] Figure 3 FIG. 3 is a flow chart showing a method 300 for generating a verification statement in a statement library according to an embodiment of the present disclosure. Figure 3 As shown, the method 300 includes:
[0053] Step 310, selecting a plurality of keywords from a pre-built keyword library, wherein the plurality of keywords at least include nouns, verbs, and adjectives; and
[0054] Step 320: Input multiple keywords into the sentence generation model to generate a verification sentence in the sentence library.
[0055] In step 310, in order to make the generated verification statement have more complex semantics, the multiple keywords may include at least nouns, verbs, and adjectives. For example, in some embodiments, the noun may be, for example, "puppy", the verb may be "running", and the adjective may be "happy", and the verification statement finally generated by these keywords is "his puppy ran happily on the grass". By setting three different types of keywords, the generated verification statement can have more complex semantics, making the subsequently generated verification picture more difficult to be recognized by artificial intelligence or neural network, thereby improving the verification reliability of the verification code.
[0056] In step 320, inputting multiple keywords into the sentence generation model to generate a verification sentence in the sentence library includes: inputting multiple keywords into the prompt template of the pre-set sentence generation model to generate the verification sentence. Specifically, a prompt template suitable for a large language model (such as ChatGPT, Wenxinyiyan) can be designed. After the template is filled with the above keywords, the large language model can generate a description sentence that meets the requirements. Put the "noun, verb, adjective" phrase selected from the keyword thesaurus into the prompt template to construct a prompt. The large language model can be trained and constructed later; the large language model and the constructed prompt are used to generate verification sentences that meet the requirements. These verification sentences will be used to generate verification pictures later, and these verification sentences themselves are also part of the verification code.
[0057] In some embodiments, after constructing a sentence library containing multiple verification statements, it also includes: deleting at least one verification statement with semantic repetition in the multiple verification statements. Those skilled in the art will understand that since the verification statements in the sentence library are obtained through a language model, the language model will generate a large number of verification statements, and there may be semantically repeated statements in these verification statements. If these semantically repeated verification statements are subsequently selected as target verification statements, it may cause confusion to the user who is being verified. For example, the following two verification statements may exist in the sentence library at the same time, "His puppy is running happily on the grass", and "The pet dog happily jumps over the grass", and the verification pictures subsequently generated by these two verification statements may also be very close, which makes it difficult for users to distinguish. In order to avoid the above problems, at least one semantically repeated verification statement can be actively deleted.
[0058] Figure 4 A flowchart of a method 400 for deleting semantically repeated verification statements according to an embodiment of the present disclosure is shown. Figure 4 As shown, the method 400 includes:
[0059] Step 410, using a language model to perform feature encoding on multiple verification sentences respectively;
[0060] Step 421, for any two verification statements among the multiple verification statements: calculating the similarity between the feature codes of the two verification statements; and
[0061] Step 422: In response to determining that the similarity is greater than the first similarity threshold, one of the two verification statements is deleted.
[0062] In step 410, the generated verification sentence may be feature encoded using an encoder of a language model (such as BERT, etc.), thereby obtaining a feature vector of the verification sentence in a feature space.
[0063] In step 421, the similarity of feature encodings of different sentences may be calculated using the cosine distance in the feature space. Generally speaking, the closer the distance between feature vectors of two verification sentences in the feature space, the higher their similarity.
[0064] In step 422, if the similarity between the two verification statements is greater than a first similarity threshold, they are determined to be two statements with repeated semantics. The first similarity threshold can be set according to the actual application scenario of the application verification code. Subsequently, one of the two verification statements can be removed to avoid the occurrence of verification statements with repeated semantics or too high similarity.
[0065] In this embodiment, by calculating the similarity of the feature codes, it is possible to more accurately determine which are semantically repeated verification statements, thereby avoiding the problem of erroneous deletion of verification statements or incomplete deletion of semantically repeated verification statements.
[0066] In some embodiments, the process of generating each verification image in the image library includes: inputting a corresponding verification sentence in the sentence library into the text graph model to generate the verification image. Specifically, the text graph model can be trained and constructed in advance; the verification sentence obtained above is input into the text graph model (for example: Wenxin Yige, Stable Diffusion, etc.) to generate a picture of the corresponding description. In this embodiment, the verification picture can be generated by the text graph model, so there is no need to manually make or take pictures that conform to the semantics of the verification sentence, thereby effectively saving labor costs.
[0067] Figure 5 FIG. 5 is a flowchart of a method 500 for selecting multiple target verification statements from a statement library according to an embodiment of the present disclosure. Figure 5 As shown, the method 500 includes:
[0068] Step 510, using a language model to perform feature encoding on multiple verification sentences respectively; and
[0069] Step 520 : Select multiple verification sentences whose feature coding similarity is less than a second similarity threshold from the multiple verification sentences as multiple target verification sentences.
[0070] It is understandable that there are some verification statements with very similar semantics in the statement library, and the verification pictures generated by these verification statements may also be very similar, which makes it difficult for users to distinguish them during the verification stage. If these verification statements with very similar semantics are subsequently selected as target verification statements, it may cause confusion to the users undergoing verification. Therefore, in some embodiments, when selecting multiple target verification statements from the statement library, verification statements with a lower degree of similarity can be deliberately selected to avoid making it difficult for users to distinguish them.
[0071] In step 510, the encoder of the language model (such as BERT, etc.) may be used to perform feature encoding on the verification sentence to be selected, thereby obtaining a feature vector of the verification sentence in the feature space.
[0072] In step 520, the similarity of feature encodings can be determined in a manner similar to step 421 in the above method 400, that is, the similarity of feature encodings of different sentences can be calculated using the cosine distance in the above feature space. Generally speaking, the closer the distance between the feature vectors of two verification sentences in the feature space, the higher their similarity.
[0073] After determining the similarity of the feature vectors of each verification sentence, verification sentences and verification pictures with less similarity, that is, with greater semantic differences, may be used to avoid interference to subsequent users who are to be verified.
[0074] The following will be combined Figure 6 Detailed description of the generation interface for validation questions. Figure 6 A schematic diagram of a verification question interface according to an embodiment of the present disclosure is shown; Figure 7 FIG. 7 is a flowchart of a method 700 for generating verification questions according to a plurality of target verification statements and a plurality of target verification images according to an embodiment of the present disclosure. Figure 7 As shown, the method 700 includes:
[0075] Step 710, displaying a plurality of target verification statements in a preset order and displaying a plurality of target verification pictures; and
[0076] Step 720, displaying a prompt operation statement to prompt the user to perform an operation associated with the verification question, wherein the prompt operation statement includes prompting the user to click on multiple target verification pictures in an order corresponding to a preset order.
[0077] like Figure 6 As shown, the relevant interactive interface for verification (such as the interactive interface of the user terminal) can display multiple target verification sentences and multiple target verification pictures as shown in the figure. Exemplarily, the number of target verification sentences and target verification pictures can be 4. The 4 target verification sentences include, for example: 1. "His puppy is running happily on the grass, looking for fresh food"; 2. "His puppy is running happily at the door, waiting for the owner to come home"; 3. "His puppy is running happily in the garden, smelling the fragrance of flowers and grass"; and 4. "My friend's dog is running happily in the forest, smelling the smell of leaves and grass." After or at the same time as the 4 target verification sentences are displayed, 4 target verification pictures are also displayed. Each of the 4 target verification pictures corresponds to one of the above 4 target verification sentences, and displays an image that is semantically consistent with the target verification sentence, such as Figure 6shown.
[0078] Subsequently, the interactive interface also displays a prompt operation statement to prompt the user to perform an operation associated with the verification question. Figure 6 In the illustrated embodiment, the prompt operation statement may be "Please click on the image that best matches the following four descriptions in turn". After the interactive interface has generated the entire verification question, the user may perform related click operations. In this embodiment, the user may pass the verification after clicking on the upper left, upper right, lower left and lower right verification images in turn. It should be noted here that the multiple target verification images are displayed in a random arrangement, that is, the arrangement order of the multiple target verification images may be the same as or different from the arrangement order of the multiple target verification statements.
[0079] The verification code can be generated when the user jumps from the first network interface to the second network interface to ensure the security of access to the relevant network and prevent illegal programs from invading the second network interface. After the user passes the verification in the verification interface, the user can enter the second network interface expected by the user.
[0080] According to another aspect of the present disclosure, a verification device based on a picture verification code is also provided. Figure 8 FIG. 8 is a structural block diagram of a verification device 800 based on a picture verification code according to an embodiment of the present disclosure. Figure 8 As shown, the device 800 includes: a selection unit 830, configured to select a plurality of target verification statements and a plurality of target verification pictures corresponding to the plurality of target verification statements from a pre-built sentence library containing a plurality of verification statements and a picture library containing a plurality of verification pictures, respectively, wherein each verification statement 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 statement in the sentence library; a generation unit 840, configured to generate verification questions according to the plurality of target verification statements and the plurality of target verification pictures; and a determination unit 850, configured to determine that the verification is successful in response to determining that the user performs an operation associated with the verification question.
[0081] In some embodiments, the device 800 also includes a sentence construction unit 810, configured to construct a sentence library, wherein the sentence construction unit 810 includes: a selection module, configured to select multiple keywords from a pre-constructed keyword library, the multiple keywords include at least nouns, verbs and adjectives; and a generation module, configured to input the multiple keywords into a sentence generation model to generate a verification sentence in the sentence library.
[0082] In some embodiments, the generation module is further configured to: input a plurality of keywords into a prompt template of a preset sentence generation model to generate the verification sentence.
[0083] In some embodiments, the verification device 800 further includes: a deleting unit configured to delete at least one verification statement with repeated semantics from among the multiple verification statements after building the statement library.
[0084] In some embodiments, the deletion unit includes: a first encoding module, configured to use a language model to perform feature encoding on multiple verification statements respectively; a calculation module, configured to calculate the similarity between the feature encodings of any two verification statements among the multiple verification statements; 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.
[0085] In some embodiments, the device 800 also includes a picture construction unit 820, which is configured to construct a picture library based on the sentence library, wherein the picture construction unit 820 is further configured to: for each verification picture: input the verification sentence in the sentence library into the text graph model to generate a corresponding verification picture.
[0086] In some embodiments, the selection unit 830 includes: a second encoding module, configured to use a language model to perform feature encoding on multiple verification statements respectively; and a selection module, configured to select multiple verification statements whose feature encoding similarity is less than a second similarity threshold from the multiple verification statements as multiple target verification statements.
[0087] In some embodiments, the generation unit 840 includes: a first display module, configured to display multiple target verification statements in a preset order and display multiple target verification pictures; and a second display module, configured to display a prompt operation statement to prompt the user to perform an operation associated with the verification question, wherein the prompt operation statement includes prompting the user to click on multiple target verification pictures in an order corresponding to the preset order.
[0088] It should be understood that Figure 8 The various units of the device 800 shown in FIG. 8 can be used in conjunction with the reference Figure 2 The steps in the method 200 described above correspond to each other. Therefore, the operations, features and advantages described above for the method 200 are also applicable to the device 800 and the units and modules included therein. For the sake of brevity, some operations, features and advantages are not repeated here.
[0089] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0090] According to an embodiment of the present disclosure, an electronic device, a readable storage medium and a computer program product are also provided.
[0091] refer to Fig. 9, a block diagram of an electronic device 900 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0092] like Fig. 9 As shown, the device 900 includes a computing unit 901, which 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 via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0093] Multiple components in the device 900 are connected to the 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 can be any type of device that can input information to the device 900. The input unit 906 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 907 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 908 can include but is not limited to a disk, an optical disk. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0094] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as a verification method based on a picture verification code. For example, in some embodiments, a verification method based on a picture verification code may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the verification method based on the picture verification code described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the verification method based on the picture verification code in any other appropriate manner (for example, by means of firmware).
[0095] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0096] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0097] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0098] To provide interaction with a user, the systems and techniques described herein 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 the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0099] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend 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: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0100] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0101] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0102] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalents. Various elements in the embodiments or examples may be omitted or may be replaced by their equivalent elements. In addition, each step may be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples may be combined in various ways.
Claims
1. A verification method based on a picture verification code, comprising: Selecting a plurality of target verification statements and a plurality of target verification pictures corresponding to the plurality of target verification statements from a pre-built sentence library containing a plurality of verification statements and a pre-built picture library containing a plurality of verification pictures, respectively, wherein each verification statement 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 statement in the sentence library; generating verification questions according to the plurality of target verification statements and the plurality of target verification images; and In response to determining that the user performs an operation associated with the verification question, determining that the verification is successful, The statement library is constructed in the following way: Selecting the plurality of keywords from a pre-built keyword library, the plurality of keywords at least including nouns, verbs and adjectives, and the plurality of keywords having a semantic association relationship; and inputting the plurality of keywords into a sentence generation model to generate a verification sentence in the sentence library, The image library is constructed in the following way: Input the verification sentences in the sentence library into the text graph model to generate corresponding verification pictures, And wherein, the selecting a plurality of target verification statements from the statement library comprises: Using a language model to perform feature encoding on the multiple verification sentences respectively; and A plurality of verification statements whose feature encoding similarities are less than a second similarity threshold are selected from the plurality of verification statements as the plurality of target verification statements.
2. The verification method according to claim 1, wherein: The step of inputting the plurality of keywords into the sentence generation model to generate a verification sentence in the sentence library comprises: The multiple keywords are input into a preset prompt template of the sentence generation model to generate the verification sentence.
3. The verification method according to claim 1, further comprising: After the sentence library is constructed, at least one verification sentence with repeated semantics among the multiple verification sentences is deleted.
4. The verification method according to claim 3, wherein: The deleting at least one verification statement with repeated semantics from among the multiple verification statements comprises: Using a language model to perform feature encoding on the multiple verification sentences respectively; For any two verification statements among the multiple 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 a first similarity threshold, one of the two verification statements is deleted.
5. The verification method according to any one of claims 1 to 4, wherein: Generating verification questions according to the multiple target verification statements and the multiple target verification pictures includes: Displaying the plurality of target verification statements in a preset order and displaying the plurality of target verification pictures; and A prompt operation statement is displayed to prompt the user to perform an operation associated with the verification question, wherein the prompt operation statement includes prompting the user to click on the multiple target verification pictures in an order corresponding to the preset order.
6. A verification device based on a picture verification code, comprising: A selection unit is configured to select a plurality of target verification statements and a plurality of target verification pictures corresponding to the plurality of target verification statements from a pre-built statement library containing a plurality of verification statements and a pre-built picture library containing a plurality of verification pictures, respectively, wherein each verification statement in the statement 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 statement in the statement library; a generating unit, configured to generate verification questions according to the plurality of target verification statements and the plurality of target verification pictures; and a determining unit configured to determine that the verification is successful in response to determining that the user performs an operation associated with the verification question, The statement library is constructed using a statement construction unit, and the statement construction unit includes: a selection module configured to select the plurality of keywords from a pre-built keyword library, the plurality of keywords at least including nouns, verbs and adjectives, and the plurality of keywords having a semantic association relationship; and a generation module configured to input the plurality of keywords into a sentence generation model to generate a verification sentence in the sentence library, The picture library is constructed using a picture construction unit, and the picture construction unit is configured as follows: Input the verification sentences in the sentence library into the text graph model to generate corresponding verification pictures, And wherein, the selection unit includes: A second encoding module is configured to perform feature encoding on the plurality of verification sentences respectively using a language model; and The selection module is configured to select a plurality of verification statements whose feature coding similarity is less than a second similarity threshold from the plurality of verification statements as the plurality of target verification statements.
7. The verification device according to claim 6, wherein: The generation module is also configured to: The multiple keywords are input into a preset prompt template of the sentence generation model to generate the verification sentence.
8. The verification device according to claim 6, further comprising: The deleting unit is configured to delete at least one verification statement with repeated semantics from among the multiple verification statements after the statement library is constructed.
9. The verification device according to claim 8, wherein: The deleting unit comprises: A first encoding module is configured to perform feature encoding on the plurality of verification sentences respectively using a language model; A calculation module configured to calculate, for any two verification statements among the plurality of verification statements: a similarity between feature codes of the two verification statements; and The deletion module is configured to delete one of the two verification statements in response to determining that the similarity is greater than a first similarity threshold.
10. The verification device according to any one of claims 6 to 9, wherein: The generating unit comprises: a first display module configured to display the plurality of target verification statements in a preset order and to display the plurality of target verification pictures; and The second display module is configured to display a prompt operation statement to prompt the user to perform an operation associated with the verification question, wherein the prompt operation statement includes prompting the user to click on the multiple target verification pictures in an order corresponding to the preset order.
11. An electronic device, comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5.
13. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Verification code generating method based on animation semantics
CN106340049A
Graphic verification method based on picture data encryption index
CN108390862A
