Access verification method and device, electronic equipment and storage medium
By generating images that meet and do not meet the prompt text description on the access device for verification, the problem that the image verification code is easily cracked is solved, which improves verification security and complexity and prevents automated attacks.
Patent Information
- Application Number
- CN202411376990.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-09-29
AI Technical Summary
Existing image verification codes are easily cracked by the model of the cracking verification mechanism, resulting in insufficient verification security.
By receiving the randomly generated prompt text from the access device, images that meet and do not meet the description of the prompt text, and verify them on the access device to ensure that the verification results are based on randomly generated images and avoid model learning and cracking.
Improve the security of image verification code, prevent the model that cracks the verification mechanism from learning randomly generated images, enhances the complexity and diversity of verification, and is difficult to crack by automated attacks.
Smart Images

Figure CN119323019A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data verification technology, and in particular to an access verification method, device, electronic device and storage medium. Background Art
[0002] The verification code is a public fully automatic program to distinguish between computer operations and human operations. Among them, image verification, as a new generation of Internet verification mechanism, completes the verification by clicking or sliding the image verification code.
[0003] In the related art, in order to prevent websites or software from being hacked, the verification picture of the image verification code is usually set to be very blurred, and the verification part in the image verification code is deformed and rotated and complex interference is added. However, when the image library providing the image verification code is leaked, the model that can crack the verification mechanism can be trained through the image library, so that the image verification mechanism can be easily cracked to achieve the purpose of intrusion. Therefore, it is urgent to provide an access verification method to solve the above technical problems. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose an access verification method, device, electronic device and storage medium, which can prevent the image verification code from being cracked by the model of the verification mechanism and improve the verification security.
[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes an access verification method, the method comprising:
[0006] Receiving a prompt text randomly generated and sent by an access device, and generating at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text;
[0007] Sending the first image and the second image to the access device, so that the prompt text is displayed in a first area within the verification control of the access device, and each of the first image and each of the second image is displayed in a second area within the verification control;
[0008] receiving a target image sent by the access device, wherein the target image is an image determined by the access device according to an image selection operation for the second area;
[0009] A verification result is determined based on the first image and the target image.
[0010] In some embodiments, generating at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text includes:
[0011] Determine a first text vector corresponding to the prompt text;
[0012] Modify the target word segmentation that meets the modification conditions in the prompt text to obtain a modified text;
[0013] Determine a second text vector corresponding to the modified text;
[0014] Generate at least one first image that matches the description of the prompt text based on the first text vector;
[0015] At least one second image that does not conform to the description of the prompt text is generated based on the second text vector.
[0016] In some embodiments, the step of changing the target word segmentation in the prompt text that meets the change condition to obtain the modified text includes:
[0017] Acquire multiple candidate word segments constituting the prompt text;
[0018] Determine the segmentation type corresponding to each candidate segmentation;
[0019] Determine a candidate participle whose participle type is a preset participle type as a target participle;
[0020] At least one of the target segmentations in the prompt text is changed to a segmentation of the same segmentation type to obtain a modified text.
[0021] In some embodiments, determining the first text vector corresponding to the prompt text includes:
[0022] Performing word segmentation processing on the prompt text to obtain multiple first word segmentations;
[0023] Encode each of the first participles to obtain a corresponding first participle vector;
[0024] Combining a plurality of the first word segmentation vectors into a first text vector;
[0025] The determining a second text vector corresponding to the modified text includes:
[0026] Performing word segmentation processing on the modified text to obtain a plurality of second word segmentations;
[0027] Encode each of the second participles to obtain a corresponding second participle vector;
[0028] Combine multiple of the second word segmentation vectors into a second text vector.
[0029] In some embodiments, determining a verification result based on the first image and the target image includes:
[0030] When the target image is the first image, and the target number of the target image is the same as the first number of the first image, it is determined that the verification is passed.
[0031] To achieve the above purpose, a second aspect of an embodiment of the present application proposes an access verification method, the method comprising:
[0032] In response to the access instruction, sending a randomly generated prompt text to the server, so that the server feeds back at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text;
[0033] receiving the first image and the second image sent by the server, and displaying a verification control, wherein a first area within the verification control displays the prompt text, and a second area within the verification control displays each of the first image and each of the second images;
[0034] In response to an image selection operation on the second area, determining a target image selected by the image selection operation;
[0035] The target image is sent to the server, so that the server determines a verification result according to the target image and the first image.
[0036] To achieve the above-mentioned purpose, a third aspect of an embodiment of the present application proposes an access verification device, including:
[0037] A generating unit, configured to receive a prompt text randomly generated and sent by an access device, and generate at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text;
[0038] A first sending unit, configured to send the first image and the second image to the access device, so that the prompt text is displayed in a first area within the verification control of the access device, and each of the first image and each of the second image is displayed in a second area within the verification control;
[0039] A receiving unit, configured to receive a target image sent by the access device, wherein the target image is an image determined by the access device according to an image selection operation for the second area;
[0040] The first determining unit is used to determine a verification result based on the first image and the target image.
[0041] In some embodiments, a generating unit comprises:
[0042] A first determining subunit, used to determine a first text vector corresponding to the prompt text;
[0043] A modification subunit, used for modifying a target word segmentation in the prompt text that meets a modification condition to obtain a modified text;
[0044] A second determining subunit, used to determine a second text vector corresponding to the modified text;
[0045] A first generating subunit, configured to generate at least one first image that conforms to the description of the prompt text based on the first text vector;
[0046] The second generating subunit is configured to generate at least one second image that does not conform to the description of the prompt text based on the second text vector.
[0047] In some embodiments, the subunit is modified to:
[0048] Acquire multiple candidate word segments constituting the prompt text;
[0049] Determine the segmentation type corresponding to each candidate segmentation;
[0050] Determine a candidate participle whose participle type is a preset participle type as a target participle;
[0051] At least one of the target segmentations in the prompt text is changed to a segmentation of the same segmentation type to obtain a modified text.
[0052] In some embodiments, the first determining subunit is configured to:
[0053] Performing word segmentation processing on the prompt text to obtain multiple first word segmentations;
[0054] Encode each of the first participles to obtain a corresponding first participle vector;
[0055] Combining a plurality of the first word segmentation vectors into a first text vector;
[0056] The second determining subunit is configured to:
[0057] Performing word segmentation processing on the modified text to obtain a plurality of second word segmentations;
[0058] Encode each of the second participles to obtain a corresponding second participle vector;
[0059] Combine multiple of the second word segmentation vectors into a second text vector.
[0060] In some embodiments, the first determining unit is configured to:
[0061] When the target image is the first image, and the target number of the target image is the same as the first number of the first image, it is determined that the verification is passed.
[0062] To achieve the above-mentioned purpose, a fourth aspect of an embodiment of the present application proposes an access verification device, including:
[0063] A second sending unit is used to send a randomly generated prompt text to the server in response to the access instruction, so that the server feeds back at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text;
[0064] A display unit, configured to receive the first image and the second image sent by the server, and display a verification control, wherein a first area within the verification control displays the prompt text, and a second area within the verification control displays each of the first image and each of the second images;
[0065] A second determining unit, configured to determine a target image selected by the image selection operation in response to the image selection operation on the second area;
[0066] The third sending unit is used to send the target image to the server, so that the server determines a verification result according to the target image and the first image.
[0067] To achieve the above-mentioned purpose, the fifth aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.
[0068] To achieve the above-mentioned purpose, the sixth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0069] The access verification method, device, electronic device and storage medium proposed in the present application receive a prompt text randomly generated and sent by an access device, generate at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text; send the first image and the second image to the access device so that the prompt text is displayed in the first area of the verification control of the access device, and each of the first image and each of the second image is displayed in the second area of the verification control; receive the target image sent by the access device, the target image is the image determined by the access device according to the image selection operation for the second area; determine the verification result based on the first image and the target image. In this way, during the verification process, a first image and a second image that have never appeared are generated according to the randomly generated prompt text, so that access verification is performed through the first image and the second image, so that the model of the cracking verification mechanism cannot learn the randomly generated image, avoid the image library leakage causing the image verification code to be cracked, and improve the verification security. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 is a flow chart of an access verification method provided by an embodiment of the present application;
[0071] Figure 2 It is a display schematic diagram of the verification control provided in the embodiment of the present application;
[0072] Figure 3 is an operation diagram of an image selection operation for a second area provided in an embodiment of the present application;
[0073] Figure 4 yes Figure 1 Flow chart of step S101 in FIG.
[0074] Figure 5 yes Figure 4 Flow chart of step S202 in FIG.
[0075] Figure 6 yes Figure 4 Flow chart of step S201 in FIG.
[0076] Figure 7 yes Figure 1 Flow chart of step S104 in FIG.
[0077] Figure 8 is another flow chart of the access verification method provided by the embodiment of the present application;
[0078] Fig. 9 is a schematic diagram of the structure of an access verification device provided in an embodiment of the present application;
[0079] Fig.10 is another structural diagram of the access verification device provided in an embodiment of the present application;
[0080] Fig.11 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0081] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0082] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0083] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0084] First, some nouns involved in this application are analyzed:
[0085] Artificial Intelligence Generated Content (AIGC): Mainly based on artificial intelligence technology, especially deep learning algorithms. Neural networks in deep learning, such as generative adversarial networks (GAN), variational autoencoders (VAE), diffusion models, etc., provide strong technical support for AIGC. These models can learn patterns and features in large amounts of data, so that they can generate new content that is similar to but not exactly the same as the training data. It can be used for image generation to generate images based on text descriptions or specific requirements. For example, if you input "a red butterfly flying among flowers", the AIGC model can generate a vivid image showing a scene of a red butterfly among flowers. In addition, style transfer can be performed to apply the style of one image to another to create a unique artistic effect.
[0086] AIGC can quickly generate a large amount of content, greatly improving the efficiency of creation. For some repetitive creative tasks, such as templated writing of news reports and batch generation of images, AIGC can save a lot of time and labor costs. It provides creators with new sources of inspiration and creativity. The content generated by AIGC often has a unique style and perspective, which can inspire the imagination of creators and prompt them to explore new creative directions. It is personalized according to user needs and preferences. For example, it generates exclusive music playlists, image wallpapers or story content for users to meet the personalized needs of different users. AIGC has broad application prospects in multiple industries, such as media, advertising, entertainment, education, etc. It can bring new business models and development opportunities to these industries and promote innovation and upgrading of the industry.
[0087] Based on this, the embodiments of the present application provide an access verification method, device, electronic device and storage medium, which aim to prevent the image verification code from being cracked by the model of the verification mechanism and improve the verification security.
[0088] The access verification method, device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the access verification method in the embodiments of the present application is described.
[0089] The access verification method provided in the embodiment of the present application relates to the field of business processing technology. The access verification method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the access verification method, etc., but is not limited to the above forms.
[0090] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0091] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0092] Figure 1 is an optional flowchart of the access verification method provided in the embodiment of the present application. Figure 1 The method is applied to a server and may include but is not limited to steps S101 to S105.
[0093] Step S101, receiving a prompt text randomly generated and sent by an access device, and generating at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text.
[0094] Among them, the prompt text is text randomly generated by an access device controlled by a user when the user requests to visit a website or logs in to a personal web page. The text is used to describe a scene picture. The access device will send the randomly generated prompt text to the server, so that the server can generate at least one first image that conforms to the scene picture described in the prompt text and at least one second image that does not conform to the scene picture described in the prompt text based on the prompt text.
[0095] For example, the prompt text is "A Corgi by the window". After receiving the prompt text, the server generates two images with Corgis by the window, one image with Corgis by the door, and one image with Ragdoll cats by the window. Since the two images with Corgis by the window are consistent with the description of the prompt text "A Corgi by the window", these two images are the first images. Since the image with the Corgi by the door and the image with the Ragdoll cat by the window are inconsistent with the description of the prompt text "A Corgi by the window", these two images are the second images.
[0096] Step S102: sending the first image and the second image to the access device, so that the prompt text is displayed in a first area within the verification control of the access device, and each of the first image and each of the second image is displayed in a second area within the verification control.
[0097] Among them, after the server generates the first image and the second image according to the prompt text, since the user verification is performed in the access device, the user is required to filter out the image that is consistent with the prompt text description from the first image and the second image. Therefore, the server needs to send the generated first image and second image to the access device to display the prompt text in the first area within the verification control of the access device, and display each of the first image and each of the second images in the second area within the verification control.
[0098] For details, please refer to Figure 2 , Figure 2 A display diagram of the verification control provided in an embodiment of the present application. Figure 2 The verification control 10 is displayed in the display screen of the access device, and the verification control 10 includes a first area 11 and a second area 12. A prompt text is displayed in the first area 11, and each first image and each second image received by the access device from the server are displayed in the second area 12. The user selects an image consistent with the description in the prompt text from multiple first images and multiple second images displayed in the second area 12 through the description in the prompt text.
[0099] Among them, building the validation control framework will use front-end technologies such as HTML, CSS, JavaScript, and related front-end frameworks (such as Vue.js) to enable it to adapt and display correctly on various devices and screen sizes.
[0100] Step S103: receiving a target image sent by the access device, wherein the target image is an image determined by the access device according to an image selection operation for the second area.
[0101] When the access device determines the target image selected by the user according to the image selection operation of the user for the second area, the target image is sent to the server so that the server can verify whether the target image is consistent with the generated first image.
[0102] For details, please refer to Figure 3 , Figure 3 The operation diagram of the image selection operation for the second area provided in the embodiment of the present application. Taking the access device with a touch screen as an example, the image selection operation can be a click operation for the image in the second area, and the user clicks the area where the image is located on the touch screen with a finger, so that the access device determines the display image corresponding to the clicked area, and determines the display image as the target image; taking the access device without a touch screen as an example, the image selection operation can determine the display image selected by the external device through an external device (keyboard, mouse, etc.), and determine the display image as the target image.
[0103] Step S104: determining a verification result based on the first image and the target image.
[0104] In step S103, after receiving the target image sent by the access device, the server will match the target image with the first image generated previously, so as to determine whether the user access is authenticated and obtain a authentication result.
[0105] Specifically, if the target image matches the first image generated previously, the verification result of this user access is determined to be passed, and the user is allowed to access; if the target image does not match the first image generated previously, the verification result of this user access is determined to be failed, and the user is not allowed to access.
[0106] Steps S101 to S105 shown in the embodiments of the present application receive a prompt text randomly generated and sent by an access device, generate at least one first image that conforms to the description of the prompt text and at least one second image that does not conform to the description of the prompt text according to the prompt text; send the first image and the second image to the access device, so that the prompt text is displayed in a first area within a verification control of the access device, and each of the first images and each of the second images are displayed in a second area within the verification control; receive a target image sent by the access device, where the target image is an image determined by the access device according to an image selection operation for the second area; and determine a verification result based on the first image and the target image. In this way, during the verification process, a first image and a second image that have never appeared are generated according to a randomly generated prompt text, and access verification is performed through the first image and the second image, so that a model that cracks the verification mechanism cannot learn the randomly generated images, avoiding the cracking of image verification codes due to the leakage of the image library and improving verification security.
[0107] Please refer to Figure 4 , in some embodiments, step S101 may include but is not limited to steps S201 to S205:
[0108] Step S201, determine a first text vector corresponding to the prompt text.
[0109] Among them, when the server generates the first image and the second image according to the prompt text, an AIGC model is used for generation. For the generation of the first image, the AIGC model encodes the prompt text to obtain a first text vector corresponding to the prompt text, so as to subsequently generate a first image consistent with the description of the prompt text according to the first text vector.
[0110] Step S202, change the target participles in the prompt text that meet the change conditions to obtain a modified text.
[0111] Among them, since the images generated by the trained AIGC model are highly consistent with the text description, in order to generate a second image that is inconsistent with the description of the prompt text, it is necessary to perform participle modification on the original prompt text to form a modified text with a description inconsistent with the original prompt text.
[0112] Specifically, since the modification of conjunctions such as "de" and "di" does not affect the description, it is necessary to screen out the target participles in the prompt text that meet the change conditions to change the target participles to obtain a modified text. The change condition is the condition that the description is inconsistent with the description of the original prompt text after the participle is changed.
[0113] Step S203: determining a second text vector corresponding to the modified text.
[0114] After obtaining the modified text in step S202, the AIGC model encodes the modified text to obtain a second text vector corresponding to the modified text, so as to subsequently generate a second image that is inconsistent with the description of the prompt text according to the second text vector.
[0115] Step S204: generating at least one first image that conforms to the description of the prompt text based on the first text vector.
[0116] Among them, for the generation of the first image, the AIGC model will perform semantic understanding on the encoded first text vector. It extracts key feature information in the text based on the language knowledge and semantic relationships learned during pre-training. The AIGC model usually maps text features to a latent space. This latent space is a mathematical space pre-defined by the model, in which each point represents a possible combination of image features. In this space, text features related to "a corgi by the window" are mapped to a specific area, and the vectors in this area represent feature combinations that can generate images that meet the description. For example, in this latent space, the feature vector of the corgi and the feature vector of the window scene are combined in a specific way.
[0117] Based on the mapping results in the latent space, the AIGC model starts to generate images. It uses technologies such as Generative Adversarial Network (GAN) or Diffusion Model to generate images.
[0118] In the diffusion model, the model starts with a random noise image, gradually removes the noise and adds image features that correspond to the text description. For example, the general outline of the corgi is first determined, and then its body features and fur color are gradually refined, and scene elements such as the window are added, and finally an image that matches the text description is generated.
[0119] Step S205: generating at least one second image that does not conform to the description of the prompt text based on the second text vector.
[0120] Among them, for the generation of the second image, the AIGC model will perform semantic understanding on the encoded second text vector. It extracts key feature information in the text based on the language knowledge and semantic relationships learned during pre-training. The AIGC model usually maps text features to a latent space. This latent space is a mathematical space pre-defined by the model, in which each point represents a possible combination of image features. In this space, text features related to "a corgi by the window" are mapped to a specific area, and the vectors in this area represent feature combinations that can generate images that meet the description. For example, in this latent space, the feature vector of the corgi and the feature vector of the window scene are combined in a specific way.
[0121] Based on the mapping results in the latent space, the AIGC model starts to generate images. It uses technologies such as Generative Adversarial Network (GAN) or Diffusion Model to generate images.
[0122] In GAN, the generator network generates images based on the feature vectors obtained from the latent space, and then the discriminator network distinguishes the generated images from real ones. The generator continuously adjusts its parameters to generate more realistic images that are more consistent with the text description, and the discriminator also continuously improves its discrimination ability. In this confrontation process, the quality of the generated images continues to improve until the generated images meet the requirements (such as the image of a corgi by the window).
[0123] In this way, by generating a first image that meets the description of the prompt text based on the first text vector, and generating a second image that does not meet the description of the prompt text based on the second text vector, the complexity and diversity of the verification code are increased. This makes it difficult for malicious programs to predict and crack the verification code, thereby improving the security of the system. In addition, because traditional verification codes are easily recognized by machines, the images generated by this method using the AIGC model have higher randomness and complexity, especially the combination of different text vectors and advanced generation techniques (such as generative adversarial networks and diffusion models), making automated attacks more difficult.
[0124] See also Figure 5 In some embodiments, step S202 may include but is not limited to steps S301 to S304:
[0125] Step S301, obtaining a plurality of candidate word segments constituting the prompt text.
[0126] Among them, when a prompt text is given, it is necessary to use the word segmentation technology in natural language processing to split it into independent words, and these words are candidate word segmentations.
[0127] For example, if the prompt text is "A cute cat in the garden", the text must first be segmented. The segmentation tool in natural language processing can be used to split the sentence into independent words and obtain multiple candidate segmentations, namely "a", "cute", "of", "cat", "in", "garden", and "in".
[0128] Step S302: determine the word segmentation type corresponding to each candidate word segmentation.
[0129] Among them, different words have different functions in grammar and semantics and can be divided into different types. Common participle types include nouns, verbs, adjectives, adverbs, prepositions, auxiliary words, etc.
[0130] For example, the prompt text is "a cute cat in the garden", "a" can be determined as a quantifier type; "cute" is an adjective type; "of" is a particle type; "cat" is a noun type; "in" is a preposition type; "garden" is a noun type; "in" is a directional word type.
[0131] Step S303: Determine a candidate participle whose participle type is a preset participle type as a target participle.
[0132] The preset word segmentation type is a pre-set word segmentation type that can form a text description that is inconsistent with the original text after modification.
[0133] For example, if the preset segmentation types are set to nouns and adjectives, then in the prompt text "A cute cat in the garden", "cute" (adjective type), "cat" (noun type), and "garden" (noun type) will be determined as target segmentations.
[0134] Step S304: Change at least one of the target segmentations in the prompt text to a segmentation of the same segmentation type to obtain a modified text.
[0135] After the target segmentation is determined in step S303, at least one of the target segmentations in the prompt text is changed to a segmentation of the same segmentation type to obtain a modified text.
[0136] For example, if the target participle in the prompt text is "a cute cat in the garden", then we change the target participle "cat". Since "cat" is a noun type, we can choose a word from the same participle type (noun) to replace it, such as "puppy". Then the modified text becomes "a cute puppy in the garden". In this way, we get a modified text that is inconsistent with the original prompt text description.
[0137] In this way, by segmenting the prompt text and determining the target segmentation to change, a large number of different modified texts can be generated, thereby increasing the diversity and randomness of the verification code image. It is difficult for malicious programs to predict and crack this dynamically changing verification code, which improves the security of the system. Compared with traditional verification codes that are easily recognized by automated programs, this method based on natural language processing and flexible segmentation changes makes the verification code more complex. Different segmentation types and changeable target segmentations make it difficult for automated attacks to find fixed patterns for cracking.
[0138] See also Figure 6 In some embodiments, step S201 may include but is not limited to steps S401 to S403, and step S203 may include but is not limited to steps S404 to S406:
[0139] Step S401, performing word segmentation processing on the prompt text to obtain a plurality of first word segments.
[0140] Since the prompt text is composed of multiple words, the prompt text is segmented to obtain multiple first segmented words constituting the prompt text.
[0141] Specifically, the word segmentation processing method can be a word segmentation method based on a dictionary, which is as follows: starting from the left side of the text to be segmented, a character string of a specific length (such as seven characters) is taken as a matching field, and the word is searched in the dictionary to see if it exists. If it exists, the field is segmented as a word; if it does not exist, the last character of the matching field is removed, and the search in the dictionary continues until it is found in the dictionary or only one character is left.
[0142] For example, for the text "I like to eat apples", suppose there are words such as "I", "like", "eat", and "apple" in the dictionary. First, take "I like to eat apples" as the matching field. If this word is not found in the dictionary, then remove the last word to become "I like to eat apples". If it is still not found, remove another word to become "I like to eat", and so on, until the word "I" is found and segmented. Then continue to process the remaining text "I like to eat apples" and finally get the segmented words "I", "like", "eat", and "apple".
[0143] Step S402: Encode each of the first word segments to obtain a corresponding first word segmentation vector.
[0144] Among them, a pre-trained word embedding model (such as variants of Word2Vec or BERT and other related technologies) can be used, and each word will be mapped to a vector in a high-dimensional vector space.
[0145] For example, for the text "a Corgi by the window", words such as "Corgi" and "by the window" will be converted into corresponding vectors, and these vectors contain the semantic information of the words.
[0146] Step S403: Combine multiple said first token vectors into a first text vector.
[0147] Among them, after determining the first token vector corresponding to each first token in step S402, the token vectors of each token can be concatenated in sequence according to the order in which they appear in the text to form a long vector as the text vector.
[0148] For example, for the text "a cute cat in the garden", after word vector representation, the vector of "a" is [0.1], the vector of "cute" is [0.4], the vector of "the" is [0.7], the vector of "cat" is [1.0], the vector of "in" is [1.3], the vector of "garden" is [1.6], and the vector of "the" is [1.9]. Concatenate these vectors in sequence, and the obtained text vector is [0.1, 0.4, 0.7, 1.0, 1.3, 1.6, 1.9].
[0149] Alternatively, by performing weighted summation on each first token, a first text vector is obtained. Specifically: Determine its weight in the text vector according to the importance of each token. For example, the term frequency-inverse document frequency (TF-IDF) can be used to measure the importance of each token. The higher the TF-IDF value of a token, the higher its weight in the text vector can be set accordingly. In addition, the attention mechanism in deep learning can also be used to automatically learn the weight of each token. The attention mechanism can dynamically adjust the importance of each token according to the current task and context information. Multiply the token vector of each token by its corresponding weight and then sum them to obtain the text vector.
[0150] For example, assume that the vector of "a" is [0.1, 0.2, 0.3], and the weight is 0.2; the vector of "cute" is [0.4, 0.5, 0.6], and the weight is 0.3; the vector of "the" is [0.7, 0.8, 0.9], and the weight is 0.1; the vector of "cat" is [1.0, 1.1, 1.2], and the weight is 0.4; the vector of "in" is [1.3, 1.4, 1.5], and the weight is 0.1; the vector of "garden" is [1.6, 1.7, 1.8], and the weight is 0.3; the vector of "the" is [1.9, 2.0, 2.1], and the weight is 0.1.
[0151] Then the text vector = 0.2*[0.1, 0.2, 0.3]+0.3*[0.4, 0.5, 0.6]+0.1*[0.7, 0.8, 0.9]+0.4*[1.0, 1.1, 1.2]+0.1*[1.3, 1.4, 1.5]+0.3*[1.6, 1.7, 1.8]+0.1*[1.9, 2.0, 2.1].
[0152] The text vector is calculated as a three-dimensional vector, and its specific value depends on the value of each word segmentation vector and weight. This method takes into account the importance of each word segmentation, can more effectively combine word segmentation vectors, and can adapt to different tasks and data sets through different weight determination methods.
[0153] Step S404: performing word segmentation processing on the modified text to obtain a plurality of second word segments.
[0154] Among them, for the modified text, the modified text is also subjected to word segmentation processing to obtain a plurality of second word segmentations constituting the modified text.
[0155] Specifically, the word segmentation processing method can also be: using the N-gram language model for word segmentation. N-gram is a word segmentation method based on a statistical language model, which considers the probability of occurrence of N consecutive characters or words in a text. Usually, N can be 2 (bi-gram model), 3 (tri-gram model), etc.
[0156] For example, for the text "The weather is very good today", if a bigram model is used, the probability of two adjacent words such as "today", "weather", and "very good" appearing will be counted. When segmenting words, the best segmentation position is determined based on these probabilities. If the probability of "today" and "weather" appearing together is high, and the probability of "weather" and "very good" appearing together is also high, then the sentence can be divided into three words: "today", "weather", and "very good".
[0157] Step S405: encode each of the second word segments to obtain a corresponding second word segmentation vector.
[0158] The method of encoding each second participle is the same as the method of encoding each first participle, which will not be described in detail here.
[0159] Step S406: combine multiple second word segmentation vectors into a second text vector.
[0160] The method of combining multiple second word segmentation vectors into a second text vector is the same as the method of combining multiple first word segmentation vectors into a first text vector, which will not be described in detail here.
[0161] In this way, the first text vector and the second text vector obtained through the above steps can accurately reflect the semantic information of the prompt text and the modified text. When these text vectors are passed as input to an image generation model (such as an AIGC model), they can provide clearer guidance for image generation, so that the generated image is more consistent with the text description. For example, for the prompt text of "a corgi by the window", the processed text vector can guide the image generation model to generate an image with corgi features and a window scene; and for the modified text, such as "a husky by the door", the corresponding text vector can prompt the model to generate different image content.
[0162] See also Figure 7 In some embodiments, step S104 may include but is not limited to step S501:
[0163] Step S501 : when the target image is the first image and the target number of the target image is the same as the first number of the first image, it is determined that the verification is passed.
[0164] When the server receives the target image sent by the access device, it will match it with the first image generated in advance. If the target images are all first images, and the target number of the target images is the same as the first number of the first images, it means that the user has selected all the first images according to the description of the prompt text, and the verification is determined to be successful.
[0165] In this way, by requiring the target image to be exactly the same as the first image and the same number, it is ensured that the user's selection accurately matches the description of the prompt text. This strict matching method can effectively prevent users from misselecting or randomly selecting images, and improve the accuracy of verification. For example, when the prompt text is "three red apples in a basket", only when the user accurately selects all three apple images that meet the description will the verification be considered passed, avoiding misjudgment caused by ambiguous or wrong selections.
[0166] Figure 8 is an optional flowchart of the access verification method provided in the embodiment of the present application. Figure 8 The method is applied to access the device, and may include but is not limited to steps S601 to S604:
[0167] Step S601, in response to an access instruction, sending a randomly generated prompt text to a server, so that the server feeds back at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text.
[0168] Among them, the access instruction is the login operation of the user when visiting a certain website. When the access device receives the login operation, it is equivalent to responding to the user's access instruction, and then generates a randomly generated prompt text, and sends the prompt text to the server, so as to trigger the server to feedback at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text.
[0169] Step S602, receiving the first image and the second image sent by the server, and displaying a verification control, wherein the first area within the verification control displays the prompt text, and the second area within the verification control displays each of the first image and each of the second image.
[0170] The access device displays a prompt text in a first area of the verification control of the display screen, and displays each first image and each second image received from the server in a second area.
[0171] Step S603: In response to the image selection operation on the second area, determine the target image selected by the image selection operation.
[0172] The user selects a target image that matches the description of the prompt text from multiple images displayed in the second area according to the prompt text displayed in the first area of the verification control, so that the verification control determines the target image selected by the user through the image selection operation.
[0173] Step S604: sending the target image to the server, so that the server determines a verification result according to the target image and the first image.
[0174] The access device sends the determined target image to the server to trigger the server to determine the verification result according to the target image and the first image.
[0175] In this way, by randomly generating prompt text, the image content is different in each verification process, which increases the difficulty for malicious programs to predict and crack. It is difficult for automated attack programs to prepare cracking strategies for specific prompt texts in advance, thereby improving the security of the system. For example, hackers cannot know in advance what prompt text and image combination will appear, greatly reducing the risk of being attacked.
[0176] See also Fig. 9 The embodiment of the present application also provides an access verification device, which is applied to a server and can implement the above-mentioned access verification method. The device includes:
[0177] A generating unit, configured to receive a prompt text randomly generated and sent by an access device, and generate at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text;
[0178] A first sending unit, configured to send the first image and the second image to the access device, so that the prompt text is displayed in a first area within the verification control of the access device, and each of the first image and each of the second image is displayed in a second area within the verification control;
[0179] A receiving unit, configured to receive a target image sent by the access device, wherein the target image is an image determined by the access device according to an image selection operation for the second area;
[0180] The first determining unit is used to determine a verification result based on the first image and the target image.
[0181] In some embodiments, a generating unit comprises:
[0182] A first determining subunit, used to determine a first text vector corresponding to the prompt text;
[0183] A modification subunit, used for modifying a target word segmentation in the prompt text that meets a modification condition to obtain a modified text;
[0184] A second determining subunit, used to determine a second text vector corresponding to the modified text;
[0185] A first generating subunit, configured to generate at least one first image that conforms to the description of the prompt text based on the first text vector;
[0186] The second generating subunit is configured to generate at least one second image that does not conform to the description of the prompt text based on the second text vector.
[0187] In some embodiments, the subunit is modified to:
[0188] Acquire multiple candidate word segments constituting the prompt text;
[0189] Determine the segmentation type corresponding to each candidate segmentation;
[0190] Determine a candidate participle whose participle type is a preset participle type as a target participle;
[0191] At least one of the target segmentations in the prompt text is changed to a segmentation of the same segmentation type to obtain a modified text.
[0192] In some embodiments, the first determining subunit is configured to:
[0193] Performing word segmentation processing on the prompt text to obtain multiple first word segmentations;
[0194] Encode each of the first participles to obtain a corresponding first participle vector;
[0195] Combining a plurality of the first word segmentation vectors into a first text vector;
[0196] The second determining subunit is configured to:
[0197] Performing word segmentation processing on the modified text to obtain a plurality of second word segmentations;
[0198] Encode each of the second participles to obtain a corresponding second participle vector;
[0199] Combine multiple of the second word segmentation vectors into a second text vector.
[0200] In some embodiments, the first determining unit is configured to:
[0201] When the target image is the first image, and the target number of the target image is the same as the first number of the first image, it is determined that the verification is passed.
[0202] See also Fig.10 The embodiment of the present application also provides an access verification device, which is applied to an access device and can implement the above-mentioned access verification method. The device includes:
[0203] A second sending unit is used to send a randomly generated prompt text to the server in response to the access instruction, so that the server feeds back at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text;
[0204] A display unit, configured to receive the first image and the second image sent by the server, and display a verification control, wherein a first area within the verification control displays the prompt text, and a second area within the verification control displays each of the first image and each of the second images;
[0205] A second determining unit, configured to determine a target image selected by the image selection operation in response to the image selection operation on the second area;
[0206] The third sending unit is used to send the target image to the server, so that the server determines a verification result according to the target image and the first image.
[0207] The access verification device provided by the embodiment of the present application receives the prompt text randomly generated and sent by the access device through the generating unit, generates at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text; the first sending unit sends the first image and the second image to the access device, so that the prompt text is displayed in the first area of the verification control of the access device, and each of the first image and each of the second image are displayed in the second area of the verification control; the receiving unit receives the target image sent by the access device, and the target image is the image determined by the access device according to the image selection operation for the second area; the first determining unit determines the verification result based on the first image and the target image. In this way, during the verification process, the first image and the second image that have never appeared are generated according to the randomly generated prompt text, so as to perform access verification through the first image and the second image, so that the model of the cracking verification mechanism cannot learn the randomly generated image, avoid the leakage of the image library and cause the image verification code to be cracked, and improve the verification security. By generating the first image that meets the description of the prompt text based on the first text vector and the second image that does not meet the description of the prompt text based on the second text vector, the complexity and diversity of the verification code are increased. This makes it difficult for malicious programs to predict and crack the verification code, and improves the security of the system. And because traditional verification codes are easily recognized by machines automatically, the images generated by this method using the AIGC model have higher randomness and complexity, especially the combination of different text vectors and advanced generation techniques (such as generative adversarial networks and diffusion models), making automated attacks more difficult. By segmenting the prompt text and determining the target segmentation to change, a large number of different modified texts can be generated, thereby increasing the diversity and randomness of the verification code image. It is difficult for malicious programs to predict and crack such dynamically changing verification codes, thereby improving the security of the system. Compared with traditional verification codes that are easily recognized by automated programs, this method based on natural language processing and flexible segmentation changes makes the verification code more complex. Different segmentation types and changeable target segmentations make it difficult for automated attacks to find fixed patterns for cracking. The first text vector and the second text vector obtained by the above steps can accurately reflect the semantic information of the prompt text and the modified text. When these text vectors are passed as input to an image generation model (such as an AIGC model), they can provide clearer guidance for image generation, so that the generated image is more consistent with the text description. For example, for the prompt text "A Corgi by the window", the processed text vector can guide the image generation model to generate images with Corgi features and window scenes; and for the modified text, such as "A Husky by the door", the corresponding text vector can prompt the model to generate different image content.By requiring the target image to be exactly the same as the first image and the same number, it ensures that the user's selection accurately matches the description of the prompt text. This strict matching method can effectively prevent users from misselecting or randomly selecting images, thereby improving the accuracy of verification. For example, when the prompt text is "three red apples in a basket", only when the user accurately selects all three apple images that meet the description will the verification be considered passed, avoiding misjudgment caused by ambiguous selection or wrong selection. By randomly generating prompt text, the image content in each verification process is different, which increases the difficulty of malicious programs to predict and crack. It is difficult for automated attack programs to prepare cracking strategies for specific prompt texts in advance, thereby improving the security of the system. For example, hackers cannot know in advance what kind of prompt text and image combination will appear, greatly reducing the risk of being attacked.
[0208] The specific implementation of the access verification device is substantially the same as the specific implementation of the access verification method described above, and will not be described in detail herein.
[0209] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above access verification method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0210] See also Fig.11 , Fig.11 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0211] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0212] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the access verification method of the embodiment of this application;
[0213] Input / output interface 903, used to implement information input and output;
[0214] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0215] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0216] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0217] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned access verification method is implemented.
[0218] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0219] The access verification method, access verification device, electronic device and storage medium provided by the embodiment of the present application receive the prompt text randomly generated and sent by the access device, generate at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text; send the first image and the second image to the access device so that the prompt text is displayed in the first area within the verification control of the access device, and each first image and each second image are displayed in the second area within the verification control; receive the target image sent by the access device, the target image is the image determined by the access device according to the image selection operation for the second area; determine the verification result based on the first image and the target image. In this way, during the verification process, the first image and the second image that have never appeared are generated according to the randomly generated prompt text, so as to perform access verification through the first image and the second image, so that the model of the cracking verification mechanism cannot learn the randomly generated image, avoid the image library leakage causing the image verification code to be cracked, and improve the verification security.
[0220] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0221] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0222] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0223] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0224] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0225] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0226] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0227] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0228] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0229] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0230] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. An access verification method, characterized in that: include: Receiving a prompt text randomly generated and sent by an access device, and generating at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text; Sending the first image and the second image to the access device, so that the prompt text is displayed in a first area within the verification control of the access device, and each of the first image and each of the second image is displayed in a second area within the verification control; receiving a target image sent by the access device, wherein the target image is an image determined by the access device according to an image selection operation for the second area; A verification result is determined based on the first image and the target image.
2. The access verification method according to claim 1, characterized in that: The step of generating at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text includes: Determine a first text vector corresponding to the prompt text; Modify the target word segmentation that meets the modification conditions in the prompt text to obtain a modified text; Determine a second text vector corresponding to the modified text; Generate at least one first image that matches the description of the prompt text based on the first text vector; At least one second image that does not conform to the description of the prompt text is generated based on the second text vector.
3. The access verification method according to claim 2, characterized in that: The step of changing the target word segmentation in the prompt text that meets the change condition to obtain the modified text includes: Acquire multiple candidate word segments constituting the prompt text; Determine the segmentation type corresponding to each candidate segmentation; Determine a candidate participle whose participle type is a preset participle type as a target participle; At least one of the target segmentations in the prompt text is changed to a segmentation of the same segmentation type to obtain a modified text.
4. The access verification method according to claim 2, characterized in that: The determining the first text vector corresponding to the prompt text includes: Performing word segmentation processing on the prompt text to obtain multiple first word segmentations; Encode each of the first participles to obtain a corresponding first participle vector; Combining a plurality of the first word segmentation vectors into a first text vector; The determining a second text vector corresponding to the modified text includes: Performing word segmentation processing on the modified text to obtain a plurality of second word segmentations; Encode each of the second participles to obtain a corresponding second participle vector; Combine multiple of the second word segmentation vectors into a second text vector.
5. The access verification method according to claim 1, characterized in that: The determining a verification result based on the first image and the target image includes: When the target image is the first image, and the target number of the target image is the same as the first number of the first image, it is determined that the verification is passed.
6. An access verification method, characterized in that: include: In response to the access instruction, sending a randomly generated prompt text to the server, so that the server feeds back at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text; receiving the first image and the second image sent by the server, and displaying a verification control, wherein a first area within the verification control displays the prompt text, and a second area within the verification control displays each of the first image and each of the second images; In response to an image selection operation on the second area, determining a target image selected by the image selection operation; The target image is sent to the server, so that the server determines a verification result according to the target image and the first image.
7. An access verification device, characterized in that: include: A generating unit, configured to receive a prompt text randomly generated and sent by an access device, and generate at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text; A first sending unit, configured to send the first image and the second image to the access device, so that the prompt text is displayed in a first area within the verification control of the access device, and each of the first image and each of the second image is displayed in a second area within the verification control; A receiving unit, configured to receive a target image sent by the access device, wherein the target image is an image determined by the access device according to an image selection operation for the second area; The first determining unit is used to determine a verification result based on the first image and the target image.
8. An access verification device, characterized in that: include: A second sending unit is used to send a randomly generated prompt text to the server in response to the access instruction, so that the server feeds back at least one first image that meets the description of the prompt text and at least one second image that does not meet the description of the prompt text according to the prompt text; A display unit, configured to receive the first image and the second image sent by the server, and display a verification control, wherein a first area within the verification control displays the prompt text, and a second area within the verification control displays each of the first image and each of the second images; A second determining unit, configured to determine a target image selected by the image selection operation in response to the image selection operation on the second area; The third sending unit is used to send the target image to the server, so that the server determines a verification result according to the target image and the first image.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the access verification method according to any one of claims 1 to 5, or the access verification method according to claim 6 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the access verification method according to any one of claims 1 to 5 or the access verification method according to claim 6 is implemented.
Citation Information
Patent Citations
User identity double verification method and device
CN105681043A
Character verification method and device, computer equipment and storage medium
CN110351094A
Verification method and device, electronic equipment, storage medium and computer program product
CN118312944A
Prompt modification for automated image generation
US20240295953A1
Generating image from text based on prompts
WO2024049600A1