WO2021000407A1 - Character verification method and apparatus, and computer device and storage medium - Google Patents

Character verification method and apparatus, and computer device and storage medium Download PDF

Info

Publication number
WO2021000407A1
WO2021000407A1 PCT/CN2019/103061 CN2019103061W WO2021000407A1 WO 2021000407 A1 WO2021000407 A1 WO 2021000407A1 CN 2019103061 W CN2019103061 W CN 2019103061W WO 2021000407 A1 WO2021000407 A1 WO 2021000407A1
Authority
WO
WIPO (PCT)
Prior art keywords
verification
character
sentence
semantic
target terminal
Prior art date
Application number
PCT/CN2019/103061
Other languages
French (fr)
Chinese (zh)
Inventor
李敏
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021000407A1 publication Critical patent/WO2021000407A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3271Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using challenge-response

Definitions

  • the embodiments of the present application relate to the field of data security, in particular, a character verification method, device, computer equipment, and storage medium.
  • verification codes are usually used for verification.
  • the server first obtains the verification code from the server, and then receives the verification information input by the user according to the verification code.
  • the client sends the collected user information to the server, and the server determines whether the verification is passed by comparing whether the verification code is consistent with the text in the verification information.
  • the inventor of this application found in research that the verification code technology in the prior art simply sets the verification code on the background image for display, and the verification code can be identified without obstacles through the image recognition technology, and then the verification code is directly identified The verification code is sent to the server for verification without manual input. Therefore, the verification code in the prior art is easy to be identified, the verification security level is low, and it is impossible to truly protect network resources from being used safely.
  • the embodiment of the application provides a verification method that prompts the verification result through a verification sentence during verification. Only when the user understands the meaning of the verification sentence, can the user select the correct verification result character verification method, device, computer equipment and storage medium.
  • a technical solution adopted in the embodiment created by this application is to provide a character verification method, including:
  • an embodiment of the present application also provides a character verification device, including:
  • the acquisition module is used to receive the verification request sent by the target terminal
  • a processing module configured to randomly extract verification sentences from a preset sentence database according to the verification request, wherein the verification sentences are used for verification prompts;
  • a recognition module for recognizing the semantics of the verification sentence and generating verification characters according to the verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode;
  • the execution module is configured to send the verification sentence and the verification character to the target terminal.
  • an embodiment of the present application further provides a computer device including a memory and a processor.
  • the memory stores computer-readable instructions.
  • the processor executes the steps of the character verification method, wherein the steps of the character verification method include:
  • the embodiments of the present application also provide a non-volatile storage medium storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, one or more processing
  • the device executes the steps of the character verification method described above, wherein the steps of the character verification method include:
  • the server side simultaneously sends the verification sentence and verification character to the target terminal during verification. Only after the user correctly understands the semantic prompt of the verification sentence, can the user select the correct character from the verification character to complete the verification. Therefore, the image recognition technology can only select and verify the verification characters after understanding the semantics of the verification sentence, avoiding the vulnerability of the direct input verification method that is easy to be cracked by the image recognition technology, improving the security of verification, and protecting the network. Resources can be used safely.
  • Figure 1 is a schematic diagram of the basic flow of a character verification method according to an embodiment of this application.
  • FIG. 2 is a schematic diagram of the process of generating verification characters according to semantic recognition according to an embodiment of the application
  • FIG. 3 is a schematic diagram of the process of deforming verification characters according to verification sentences according to an embodiment of the application.
  • FIG. 4 is a schematic diagram of a process of generating a verification image through image conversion according to an embodiment of the application
  • FIG. 5 is a schematic diagram of a flow chart of performing display verification on a repeatedly verified target terminal according to an embodiment of the application
  • FIG. 6 is a schematic diagram of the process of judging the verification result through target characters and semantic characters according to an embodiment of the application
  • FIG. 7 is a schematic diagram of a process for judging whether a target character is consistent with a semantic character according to an embodiment of the application
  • FIG. 8 is a schematic diagram of the basic structure of a character verification device according to an embodiment of the application.
  • Fig. 9 is a block diagram of the basic structure of a computer device according to an embodiment of the application.
  • FIG. 1 is a schematic diagram of the basic flow of the character verification method in this embodiment.
  • a character verification method includes:
  • the user instruction When the user operates the target terminal to enter the application program or starts a certain functional module of the application program, the user instruction will trigger the corresponding verification function. For example, user actions such as application login, online purchase of various tickets, or e-commerce platform submission of orders, will trigger the user verification function.
  • the target terminal After the verification function is triggered, the target terminal sends a verification request to the corresponding server, requesting to obtain verification data for verification.
  • the information sent by the server to the target terminal for verification includes a background image, a verification sentence and a verification character, wherein the verification sentence and the verification character are set on the background image.
  • a sentence database is set on the server side, and multiple verification sentences are preset in the sentence database.
  • the verification sentences are extracted from the sentence database by random extraction or sequential extraction.
  • the verification sentence is a text field that prompts the user to select the correct characters for verification.
  • the verification sentence is (not limited to): Please select the text next to the word " ⁇ " in the following text, please select the font size of the following text is larger than normal For the font size, please select the text with a distorted font in the following text or the words that express "joy emotion" in the following text and other prompt sentences.
  • the function of the verification sentence is to prompt the user to select the correct character for verification. Only after the user understands the verification sentence, can the user select the correct character in the verification character for verification. Therefore, as long as there is a suggestive meaning and verification When the characters have a mapping relationship with the suggestive meaning, the text field can be used as a verification sentence.
  • the recognition method is to train a neural network model that can recognize semantics according to deep learning, and then use the neural network model to recognize the semantics of the verification sentence.
  • the verification method of the verification sentence representation can be divided into: selecting characters based on pronunciation, selecting characters based on structure, selecting characters based on glyph shape, or selecting characters based on meaning.
  • the verification method of the verification sentence characterization of "select the character whose initials are y in the following characters” is to select the character according to the pronunciation;
  • the verification method of the verification sentence characterization of the verification sentence characterization of "select the following characters with the word " ⁇ " is the basis Structure selection character;
  • the verification method of the verification sentence characterization of "please select the distortion in the following text” is to select the character according to the shape of the character; .
  • the corresponding verification character is extracted from the preset character database, and at least one character in the extracted verification character is mapped to the verification sentence.
  • the verification sentence is: "Select the text next to the word " ⁇ ” in the following text", and the verification characters are: " ⁇ ", " ⁇ ", "rate”, and " ⁇ ".
  • the verification character is a text field composed of multiple text characters that carries the correct character. Each text character can be independent of each other and does not form a specific word, but the composition method of the verification character is not limited to this. According to different application scenarios, some In an embodiment, the verification character consists of multiple words.
  • the verification characters include regular characters and characters that have a mapping relationship with the verification sentence. Among them, the characters that have a mapping relationship with the verification sentence are correct characters, and the user can complete the character verification by selecting the above-mentioned characters; otherwise, the character verification cannot be completed.
  • the generated verification sentence and verification characters are sent to the target terminal, so that the target terminal performs character verification.
  • the verification data sent by the server to the target terminal further includes: a background image, the verification characters and the verification sentence are set on the background image, the verification picture is synthesized, and then the verification picture is sent to the target terminal for verification.
  • the server sends the verification sentence and the verification character to the target terminal at the same time during verification, and the user can select the correct character from the verification character to complete the verification only after correctly understanding the semantic prompt of the verification sentence. Therefore, the image recognition technology can only select and verify the verification characters after understanding the semantics of the verification sentence, avoiding the vulnerability of the direct input verification method that is easy to be cracked by the image recognition technology, improving the security of verification, and protecting the network. Resources can be used safely.
  • step S1300 shown in FIG. 1 includes:
  • the verification sentence is a text field with specific semantics composed of characters, and the text field of the verification sentence is first read when performing character verification on the verification sentence.
  • the text field After reading the text field, the text field is converted into an array matrix through the matlab software application software. Among them, each word or word constituting the text field is mapped and replaced with an element of the array matrix, and the arrangement order of the elements is consistent with the arrangement order of the text field.
  • the semantics of the verification sentence is detected through the semantic recognition model.
  • the semantic recognition model is a neural network model trained to a convergent state for classifying the semantics expressed by the verification sentence. Specifically, through matlab software, the verification sentence to be detected is converted into an array matrix that can be recognized by the neural network model, and then the array matrix is input into the semantic recognition model to obtain the semantics of the expression verification sentence output by the model The classification results.
  • the semantic recognition model in this embodiment can be a convolutional neural network model (CNN) that has been trained to a convergent state, but is not limited to this, the semantic recognition model can also be: deep neural network model (DNN), recurrent neural network model (RNN) or a deformed model of the above three network models.
  • CNN convolutional neural network model
  • RNN recurrent neural network model
  • the initial neural network model When training the initial neural network model as a semantic recognition model, it collects a large number of converted array matrices of verification sentences as training samples. After manually reading the original verification sentences of the training samples, each training sample is calibrated (calibration refers to The semantics actually expressed by the training samples). Then input the training sample into the initial neural network model, and obtain the classification result of the model output (the classification result is the semantic classification of the training sample obtained by the model), and calculate the difference between the classification result and the calibration result through the loss function of the neural network model Compare the calculated result with the set distance threshold (for example, Euclidean distance, Mahalanobis distance, or cosine distance, etc.). If the calculated result is less than or equal to the distance threshold (for example, 0.05), pass the verification and continue.
  • the set distance threshold for example, Euclidean distance, Mahalanobis distance, or cosine distance, etc.
  • the neural network model obtained by training has a semantic judgment accuracy rate greater than a certain value, for example, 97%, and the neural network model is trained to a convergent state.
  • the neural network trained to convergence is the semantic recognition model.
  • the semantic recognition model trained to the convergent state can accurately extract the semantics represented by the array matrix.
  • the verification character of the first character length is extracted from the character database.
  • the verification sentence is: Please select the fourth and sixth characters in the following text.
  • the semantic classification result output by the semantic recognition model is: "Verify according to the character number, and the largest character needs to be the sixth digit”. Then, the verification characters that are greater than or equal to six characters are extracted from the verification character library.
  • the semantic classification result output by the semantic recognition model is: "Verify according to the radical, verify that the radical is female". Then at least one character is extracted from the character database as a verification character next to the female character.
  • the semantic classification result output by the semantic recognition model is: "Verify according to the font shape, and the verification font is bold".
  • Semantic recognition of the verification sentence through the neural network model enables the terminal to generate verification characters corresponding to the semantic recognition results, which improves the efficiency and accuracy of verification character generation, thereby increasing the efficiency of verification.
  • the verification method of the verification sentence characterization is to perform verification according to the shape of the font. Therefore, when the verification character is generated, some characters need to be deformed according to the semantics of the verification sentence.
  • step S1314 shown in FIG. 2 the method further includes:
  • the verification mode represented by the verification sentence is to perform verification by selecting characters from the font
  • at least one deformed character is selected from the verification characters.
  • the number of characters selected as deformed characters in the verification character is not limited to one. According to different application scenarios, in some embodiments, the number of deformed characters can be greater until all characters in the verification character are equal. It is a deformed character.
  • At least one deformed character is deformed by the represented deformation type to generate a semantic character.
  • the deformation types in this embodiment include (not limited to): enlarging, reducing, bolding, slanting, rotating, twisting, or changing colors of characters.
  • Characters generated after deformation processing are defined as semantic characters, and there is a mapping relationship between semantic characters and verification sentences, that is, phonetic characters are the standard answers for character verification.
  • the deformed character in the verification character is replaced with the generated semantic character, that is, the correct answer of the verification is written into the verification character, and the deformation processing of the verification character is completed.
  • the semantic characters are stored, and the semantic characters are used as the correct answer of the verification sentence for verification and comparison.
  • the result of character verification can be made more prominent, which is conducive to the user's choice.
  • the character shape change is not easily recognized by the image recognition technology, which improves the security of character verification.
  • the verification characters and verification sentences need to be displayed in a picture format. Therefore, it is necessary to image the verification characters and verification sentences.
  • step S1400 shown in FIG. 1 includes:
  • the server is provided with an image database, and various pictures are pre-stored in the image database, and the pictures stored in the image database can be used for character verification.
  • a picture is selected as a background image through random screening in the image database.
  • the screening method is not limited to this.
  • the degree of fusion between characters and background images makes it difficult for image recognition technology to recognize and verify characters, which increases the difficulty of machine recognition.
  • the verification image is sent to the target terminal so that the target terminal can use the verification image for character verification.
  • Setting the verification character and the verification sentence in the background image can increase the degree of confusion between the verification sentence and the verification character and the background, and increase the difficulty of recognition.
  • the verification system in order to prevent the same terminal from passing virtual verification, the verification system is quickly swiped.
  • the server records the verification records of each target terminal, and verifies the virtual swiping behavior based on the verification records. Please refer to FIG. 5.
  • FIG. 5 is a schematic diagram of the display verification process of the repeatedly verified target terminal in this embodiment.
  • step S1413 shown in FIG. 4 the method further includes:
  • the record of each target terminal's verification on the server side is recorded in the history verification list, and the recording method is: recording the identity information of the target terminal, for example, the IP address or Mac address of the target terminal. Then, each verification request of the target terminal is recorded under the identity information of the corresponding target terminal in the history verification list. Therefore, as long as the identity information of the target terminal in the verification request is obtained, the corresponding verification record can be found in the historical verification list.
  • the verification record records the verification frequency of the target terminal within a set time period, for example, the target terminal is verified 100 times in one hour.
  • the length of the time period for statistical verification frequency in the verification record can be adjusted according to different specific application scenarios.
  • the first verification condition refers to the value of the verification frequency in the set time period.
  • the number of verifications performed by the target terminal shall not exceed 10 times, but the set frequency value of the first verification condition is not limited to this, and it can be adapted according to the specific application scenarios. Increase or decrease in sex.
  • the server sends a call request to the target terminal, and calls the target terminal to display a screenshot of the verification image on the verification page. Identify whether the user uses virtual authentication to verify.
  • the target terminal When the target terminal displays the verification image, it needs to store the verification page including the verification image in the frame buffer memory, that is, the frame buffer memory is a direct image of the screen displayed on the screen, which is also called a bit map. That is, the data is displayed.
  • the frame buffer memory is a direct image of the screen displayed on the screen, which is also called a bit map. That is, the data is displayed.
  • the verification image Since the verification image has a set area in the bitmap, according to the information of the set area, the data area representing the content of the verification area is extracted from the bitmap to generate a local bitmap, that is, the target data that represents the display content of the verification image .
  • the target data is converted into a conventional picture format, such as (not limited to) JPG, PNG, or TIF, etc., to generate a verification image.
  • a conventional picture format such as (not limited to) JPG, PNG, or TIF, etc.
  • the verification image when the verification image cannot be obtained in the frame buffer memory, it indicates that the verification method is virtual verification.
  • the screenshot and the verification image are input into a preset verification judgment model, where the verification judgment model is a neural network model that is pre-trained to a convergence state for judging image similarity.
  • the verification judgment model can be a convolutional neural network model (CNN) that has been trained to a convergent state, but is not limited to this.
  • the verification judgment model can also be: deep neural network model (DNN), recurrent neural network model (RNN) or a deformed model of the above three network models.
  • DNN deep neural network model
  • RNN recurrent neural network model
  • the verification judgment model is a neural network model with a convergent shape, so it can accurately and quickly determine whether the verification images are the same or different.
  • the judgment result output by the verification judgment model contains a judgment conclusion that the verification judgment model judges whether the screenshot screen and the verification image are the same.
  • the verification of the target terminal is confirmed to be non-virtual verification; otherwise, it is determined that the target terminal performs virtual verification, and it is forbidden to respond to the request of the target terminal to access the server.
  • the server side judges whether the verification image and the screenshot are the same, which can prevent the virtual verifier from writing image data to the frame buffer memory by deception to avoid detection, which improves the accuracy of verification and further ensures the security of network data Sex.
  • the server obtains the target character selected by the user for verification uploaded by the target terminal, and judges the result of the verification based on whether the target character is consistent with the semantic character.
  • the method further includes:
  • the server After sending the verification sentence and the verification characters to the target terminal, the server waits to receive the verification information uploaded by the target terminal, where the verification information includes the target characters.
  • the target character is a character selected in the verification character according to the user's click instruction.
  • the characters in the target character may have a mapping relationship with the verification sentence; there may be only individual characters or no characters that have a mapping relationship with the verification sentence.
  • the verification passes; otherwise, the verification fails.
  • the server compares the target character with the semantic character, and the comparison method is to calculate the Hamming distance or the Hamming distance between the target character and the semantic character.
  • the Hamming distance or Hamming distance between the target character and the semantic character is zero, the target character is consistent with the semantic character; otherwise, the target character is inconsistent with the semantic character.
  • the server confirms that the target terminal character verification has passed; otherwise, it confirms that the target terminal verification fails.
  • the Hamming distance or Hamming distance between the target character and the semantic character is calculated to determine whether the target character is consistent with the phonetic character.
  • step S1432 shown in FIG. 6 includes:
  • the Hamming distance is the different number of bits corresponding to two fields (same length). For example, the Hamming distance between "toned” and "roses” is 3.
  • the target character When the Hamming distance between the target character and the semantic character is zero, the target character is consistent with the semantic character; otherwise, the target character is inconsistent with the semantic character.
  • the target character and the semantic character can be quickly compared, which improves the efficiency of the comparison and further improves the verification efficiency on the server side.
  • an embodiment of the present application also provides a character verification device.
  • FIG. 8 is a schematic diagram of the basic structure of the character verification device in this embodiment.
  • a character verification device includes: an acquisition module 2100, a processing module 2200, an identification module 2300, and an execution module 2400.
  • the acquisition module 2100 is used to receive a verification request sent by the target terminal;
  • the processing module 2200 is used to extract verification sentences from a preset sentence database according to the verification request, wherein the verification sentences are used for verification prompts;
  • the identification module 2300 is used to identify verification The sentence and the verification character are generated according to the verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode;
  • the execution module 2400 is used to send the verification sentence and the verification character to the target terminal.
  • the character verification device simultaneously sends the verification sentence and verification character to the target terminal during verification, and the user can select the correct character from the verification character to complete verification only after correctly understanding the semantic prompt of the verification sentence. Therefore, the image recognition technology can only select and verify the verification characters after understanding the semantics of the verification sentence, avoiding the vulnerability of the direct input verification method that is easy to be cracked by the image recognition technology, improving the security of verification, and protecting the network. Resources can be used safely.
  • the character verification apparatus further includes: a first acquisition submodule, a first processing submodule, a first recognition submodule, and a first execution submodule.
  • the first obtaining submodule is used to obtain the text field of the verification sentence;
  • the first processing submodule is used to convert the text field into an array matrix according to a preset conversion method;
  • the first recognition submodule is used to input the data matrix into the preset
  • the semantic recognition model is a neural network model that is pre-trained to a convergent state for semantic recognition of text;
  • the first execution sub-module is used to represent the verification method based on the semantic classification result output by the semantic recognition model , Extract verification characters from the preset character database.
  • the verification method is font verification
  • the character verification device further includes: a first screening submodule, a second processing submodule, and a second execution submodule.
  • the first screening submodule is used for screening at least one deformed character in the verification character
  • the second processing submodule is used for deforming at least one deformed character according to the deformation type represented by the verification mode to generate semantic characters, wherein the semantic characters
  • the verification statement has a mapping relationship
  • the second execution sub-module is used to replace deformed characters in the verification characters with semantic characters.
  • the character verification device further includes: a second screening submodule, a third processing submodule, and a third execution submodule.
  • the second screening sub-module is used to screen the background image in the preset image database
  • the third processing sub-module is used to overwrite the verification sentence and the verification characters on the background image to generate a verification image, wherein the verification characters include semantic characters
  • the third execution submodule is used to send the verification image to the target terminal.
  • the character verification device further includes: a first search submodule, a fourth processing submodule, a first input submodule, and a fourth execution submodule.
  • the first search submodule is used to search the verification record of the target terminal in the historical verification list
  • the fourth processing submodule is used to call the verification image to the target terminal when the verification record of the target terminal meets the preset first verification condition
  • the screenshot screen in the verification page
  • the first input sub-module is used to input the screenshot screen and the verification image into the preset verification judgment model, where the verification judgment model is pre-trained to the convergence state, and is used to judge image similarity Neural network model
  • the fourth execution sub-module is used to confirm whether the target terminal is a virtual verification according to the judgment result output by the verification judgment model.
  • the character verification device further includes: a second acquisition submodule, a fifth processing submodule, and a fifth execution submodule.
  • the second obtaining submodule is used to obtain the verification information uploaded by the target terminal, where the verification information includes the target characters for verification selected by the user according to the verification sentence among the verification characters;
  • the fifth processing submodule is used to transfer the target characters It is compared with semantic characters to determine whether the target character is consistent with the semantic character;
  • the fifth execution submodule is used to confirm that the target terminal passes the verification when the target character is consistent with the semantic character.
  • the character verification device further includes: a first calculation submodule and a sixth execution submodule.
  • the first calculation submodule is used to calculate the Hamming distance between the target character and the semantic character;
  • the sixth execution submodule is used to confirm that the target character is consistent with the semantic character when the Hamming distance is zero; otherwise, confirm the target Characters are inconsistent with semantic characters.
  • FIG. 9 is a block diagram of the basic structure of the computer device in this embodiment.
  • the computer device includes a processor, a nonvolatile storage medium, a memory, and a network interface connected through a system bus.
  • the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions.
  • the database may store control information sequences.
  • the processor can realize a A method of character verification.
  • the processor of the computer equipment is used to provide calculation and control capabilities, and supports the operation of the entire computer equipment.
  • a computer readable instruction may be stored in the memory of the computer device, and when the computer readable instruction is executed by the processor, the processor may execute a character verification method.
  • the network interface of the computer device is used to connect and communicate with the terminal.
  • FIG. 9 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the specific computer equipment may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • the processor is used to execute the specific functions of the acquisition module 2100, processing module 2200, identification module 2300, and execution module 2400 in FIG. 8, and the memory stores program codes and various data required to execute the above modules.
  • the network interface is used for data transmission between user terminals or servers.
  • the memory in this embodiment stores the program codes and data required to execute all the sub-modules in the human face image key point detection device, and the server can call the program codes and data of the server to execute the functions of all the sub-modules.
  • the computer device simultaneously sends the verification sentence and the verification character to the target terminal at the same time during verification, and the user can select the correct character from the verification character to complete the verification only after correctly understanding the semantic prompt of the verification sentence. Therefore, the image recognition technology can only select and verify the verification characters after understanding the semantics of the verification sentence, avoiding the vulnerability of the direct input verification method that is easy to be cracked by the image recognition technology, improving the security of verification, and protecting the network. Resources can be used safely.
  • the present application also provides a storage medium storing non-volatile computer-readable instructions.
  • the computer-readable instructions When executed by one or more processors, the one or more processors execute the character verification method in any of the above embodiments. A step of.
  • the computer program can be stored in a computer readable storage medium. When executed, it may include the processes of the above-mentioned method embodiments.
  • the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Biophysics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Signal Processing (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Hardware Design (AREA)
  • Character Discrimination (AREA)
  • Document Processing Apparatus (AREA)

Abstract

A character verification method and apparatus, and a computer device and a storage medium. The method comprises: receiving a verification request sent by a target terminal (S1100); randomly extracting, according to the verification request, a verification statement from a pre-set statement database, wherein the verification statement is used for verifying a prompt (S1200); identifying the meaning of the verification statement, and generating verification characters according to a verification mode represented by the meaning of the verification statement, wherein at least one character in the verification characters has a mapping relationship with the verification mode (S1300); and sending the verification statement and the verification characters to the target terminal (S1400). A server end sends a verification statement and verification characters to a target terminal at the same time during verification, and a user can select a correct character from the verification characters to complete verification only after correctly understanding a semantic prompt of the verification statement. Therefore, only after the meaning of the verification statement is understood, can selective verification be performed on the verification characters by means of image recognition technology, and the vulnerability of a direct-input-type verification mode being easily cracked by means of the image recognition technology is avoided, such that verification security is improved, and network resources can be securely used.

Description

字符验证方法、装置、计算机设备及存储介质Character verification method, device, computer equipment and storage medium
本申请要求于2019年7月3日提交中国专利局、申请号为201910601303.1,发明名称为“字符验证方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 3, 2019, the application number is 201910601303.1, and the invention title is "character verification method, device, computer equipment and storage medium", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请实施例涉及数据安全领域,尤其是一种字符验证方法、装置、计算机设备及存储介质。The embodiments of the present application relate to the field of data security, in particular, a character verification method, device, computer equipment, and storage medium.
背景技术Background technique
伴随着科学技术的发展,信息化时代的来临为我们带来了很多的便利,同时,也为人们的生活带来诸多的困扰。例如,通过互联网进行网络购票时,常常有不法商贩通过开发应用程序快速的进行刷票,然后高价进行转卖获得暴利,而真正需要购买的用户却无法通过互联网接口进行购买,且现实生活中,类似的互联网资源抢夺发生在各个领域,通过应用程序快速刷票和领取佣金的行为难以被杜绝。为了限制上述行为的发生,信息验证应用而生。With the development of science and technology, the advent of the information age has brought us a lot of convenience, and at the same time, it has also brought a lot of trouble to people's lives. For example, when buying tickets online through the Internet, illegal vendors often use the development of applications to quickly swipe the tickets, and then resell them at high prices to obtain huge profits, but users who really need to buy cannot purchase through the Internet interface, and in real life, similar The snatching of Internet resources occurs in various fields, and it is difficult to stop the behavior of quickly swiping tickets and receiving commissions through the application. In order to limit the occurrence of the above behaviors, information verification applications were born.
本申请人意识到现有技术中,通常使用验证码进行验证,服务器端在进行验证操作时,首先向服务器端获取验证码,然后,接收用户根据该验证码输入的验证信息,最终,由服务器端将采集的用户信息发送至服务器端,服务器端通过比对验证码与验证信息中的文字是否一致,确定验证是否通过。The applicant realizes that in the prior art, verification codes are usually used for verification. When performing a verification operation, the server first obtains the verification code from the server, and then receives the verification information input by the user according to the verification code. The client sends the collected user information to the server, and the server determines whether the verification is passed by comparing whether the verification code is consistent with the text in the verification information.
本申请创造的发明人在研究中发现,现有技术中验证码技术简单的将验证码设置在背景图像上进行显示,通过图像识别技术能够无障碍的识别出验证码,然后,直接将识别出的验证码发送至服务器端进行验证,无需人工进行输入。因此,现有技术中验证码容易被识别,验证安全级别较低,无法真正保护网络资源被安全使用。The inventor of this application found in research that the verification code technology in the prior art simply sets the verification code on the background image for display, and the verification code can be identified without obstacles through the image recognition technology, and then the verification code is directly identified The verification code is sent to the server for verification without manual input. Therefore, the verification code in the prior art is easy to be identified, the verification security level is low, and it is impossible to truly protect network resources from being used safely.
发明内容Summary of the invention
本申请实施例提供一种验证时通过验证语句对验证结果进行提示的验证方法,用户只有在理解验证语句意的技术上,才能够选择正确的验证结果的字符验证方法、装置、计算机设备及存储介质。The embodiment of the application provides a verification method that prompts the verification result through a verification sentence during verification. Only when the user understands the meaning of the verification sentence, can the user select the correct verification result character verification method, device, computer equipment and storage medium.
为解决上述技术问题,本申请创造的实施例采用的一个技术方案是:提供一种字符验证方法,包括:In order to solve the above technical problems, a technical solution adopted in the embodiment created by this application is to provide a character verification method, including:
接收目标终端发送的验证请求;Receive a verification request sent by the target terminal;
根据所述验证请求在预设的语句数据库中随机抽取验证语句,其中,所述验证语句用于验证提示;Randomly extract verification sentences from a preset sentence database according to the verification request, wherein the verification sentences are used for verification prompts;
识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符,其中,所述验证字符中至少有一个字符与所述验证方式具有映射关系;Identifying the semantics of the verification sentence and generating verification characters according to a verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode;
将所述验证语句与所述验证字符发送至所述目标终端。Sending the verification sentence and the verification character to the target terminal.
为解决上述技术问题,本申请实施例还提供一种字符验证装置,包括:To solve the above technical problems, an embodiment of the present application also provides a character verification device, including:
获取模块,用于接收目标终端发送的验证请求;The acquisition module is used to receive the verification request sent by the target terminal;
处理模块,用于根据所述验证请求在预设的语句数据库中随机抽取验证语句,其中,所述验证语句用于验证提示;A processing module, configured to randomly extract verification sentences from a preset sentence database according to the verification request, wherein the verification sentences are used for verification prompts;
识别模块,用于识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符,其中,所述验证字符中至少有一个字符与所述验证方式具有映射关系;A recognition module for recognizing the semantics of the verification sentence and generating verification characters according to the verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode;
执行模块,用于将所述验证语句与所述验证字符发送至所述目标终端。The execution module is configured to send the verification sentence and the verification character to the target terminal.
为解决上述技术问题,本申请实施例还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行上述所述字符验证方法的步骤,其中,所述字符验证方法的步骤包括:In order to solve the above technical problems, an embodiment of the present application further provides a computer device including a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the The processor executes the steps of the character verification method, wherein the steps of the character verification method include:
接收目标终端发送的验证请求;Receive a verification request sent by the target terminal;
根据所述验证请求在预设的语句数据库中随机抽取验证语句,其中,所述验证语句用于验证提示;Randomly extract verification sentences from a preset sentence database according to the verification request, wherein the verification sentences are used for verification prompts;
识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符,其中,所述验证字符中至少有一个字符与所述验证方式具有映射关系;Identifying the semantics of the verification sentence and generating verification characters according to a verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode;
将所述验证语句与所述验证字符发送至所述目标终端。Sending the verification sentence and the verification character to the target terminal.
为解决上述技术问题,本申请实施例还提供一种非易失性存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述所述字符验证方法的步骤,其中,所述字符验证方法的步骤包括:In order to solve the above technical problems, the embodiments of the present application also provide a non-volatile storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, one or more processing The device executes the steps of the character verification method described above, wherein the steps of the character verification method include:
接收目标终端发送的验证请求;Receive a verification request sent by the target terminal;
根据所述验证请求在预设的语句数据库中随机抽取验证语句,其中,所述验证语句用于验证提示;Randomly extract verification sentences from a preset sentence database according to the verification request, wherein the verification sentences are used for verification prompts;
识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符,其中,所述验证字符中至少有一个字符与所述验证方式具有映射关系;Identifying the semantics of the verification sentence and generating verification characters according to a verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode;
将所述验证语句与所述验证字符发送至所述目标终端。Sending the verification sentence and the verification character to the target terminal.
本申请中服务器端在验证时同时向目标终端同时发送验证语句与验证字符,用户只有在正确的理解验证语句的语义提示后,才能够在验证字符中选择正确的字符完成验证。因此,图像识别技术也只有在理解了验证语句的语义后才能够在验证字符中进行选择验证,避免直接输入式的验证方式容易被图像识别技术破解的漏洞,提高了验证的安全性,保护网络资源能够被安全的使用。In this application, the server side simultaneously sends the verification sentence and verification character to the target terminal during verification. Only after the user correctly understands the semantic prompt of the verification sentence, can the user select the correct character from the verification character to complete the verification. Therefore, the image recognition technology can only select and verify the verification characters after understanding the semantics of the verification sentence, avoiding the vulnerability of the direct input verification method that is easy to be cracked by the image recognition technology, improving the security of verification, and protecting the network. Resources can be used safely.
附图说明Description of the drawings
图1为本申请实施例字符验证方法的基本流程示意图;Figure 1 is a schematic diagram of the basic flow of a character verification method according to an embodiment of this application;
图2为本申请实施例根据语义识别生成验证字符的流程示意图;FIG. 2 is a schematic diagram of the process of generating verification characters according to semantic recognition according to an embodiment of the application;
图3为本申请实施例根据验证语句对验证字符进行变形的流程示意图;FIG. 3 is a schematic diagram of the process of deforming verification characters according to verification sentences according to an embodiment of the application; FIG.
图4为本申请实施例通过图像转换生成验证图像的流程示意图;FIG. 4 is a schematic diagram of a process of generating a verification image through image conversion according to an embodiment of the application;
图5为本申请实施例对反复验证的目标终端进行显示验证的流程示意图;FIG. 5 is a schematic diagram of a flow chart of performing display verification on a repeatedly verified target terminal according to an embodiment of the application;
图6为本申请实施例通过目标字符与语义字符判断验证结果的流程示意图;FIG. 6 is a schematic diagram of the process of judging the verification result through target characters and semantic characters according to an embodiment of the application;
图7为本申请实施例判断目标字符与语义字符是否一致的流程示意图;FIG. 7 is a schematic diagram of a process for judging whether a target character is consistent with a semantic character according to an embodiment of the application;
图8为本申请实施例字符验证装置基本结构示意图;FIG. 8 is a schematic diagram of the basic structure of a character verification device according to an embodiment of the application;
图9为本申请实施例计算机设备基本结构框图。Fig. 9 is a block diagram of the basic structure of a computer device according to an embodiment of the application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
具体请参阅图1,图1为本实施例字符验证方法的基本流程示意图。Please refer to FIG. 1 for details. FIG. 1 is a schematic diagram of the basic flow of the character verification method in this embodiment.
如图1所示,一种字符验证方法,包括:As shown in Figure 1, a character verification method includes:
S1100、接收目标终端发送的验证请求;S1100. Receive a verification request sent by the target terminal.
用户操作目标终端进入应用程序时或者启动应用程序的某个功能模块时,该用户指令会触发对应验证功能。例如,应用程序登录、网上购买各类车票或者电商平台提交订单等用户行为,均会触发用户验证功能。When the user operates the target terminal to enter the application program or starts a certain functional module of the application program, the user instruction will trigger the corresponding verification function. For example, user actions such as application login, online purchase of various tickets, or e-commerce platform submission of orders, will trigger the user verification function.
验证功能被触发后,目标终端向对应的服务器端发送验证请求,请求获取用于验证的验证数据。After the verification function is triggered, the target terminal sends a verification request to the corresponding server, requesting to obtain verification data for verification.
S1200、根据所述验证请求在预设的语句数据库中随机抽取验证语句,其中,所述验证语句用于验证提示;S1200. Randomly extract verification sentences from a preset sentence database according to the verification request, where the verification sentences are used for verification prompts;
本实施方式中,服务器端发送至目标终端的用于进行验证的信息包括背景图像、验证语句和验证字符,其中,验证语句和验证字符设置在背景图像上。In this embodiment, the information sent by the server to the target terminal for verification includes a background image, a verification sentence and a verification character, wherein the verification sentence and the verification character are set on the background image.
服务器端设置有语句数据库,语句数据库中预设有多个验证语句。通过随机抽取或者次序抽取的方式从语句数据库中抽取验证语句。A sentence database is set on the server side, and multiple verification sentences are preset in the sentence database. The verification sentences are extracted from the sentence database by random extraction or sequential extraction.
验证语句为提示用户选择正确的用于验证的字符的文字字段,例如,验证语句为(不限于):请选择下列文字中带有“女”字旁的文字、请选择下列文字中字号大于常规字号的文字、请选择下列文字中字形扭曲的文字或者请选择下列文字中表达“喜悦情感”的词语等等提示语句。验证语句的作用在于,提示用户选择正确的字符用于验证,用户只有在理解了验证语句后,才能够在验证字符中挑选正确的字符进行验证,因此,只要具有提示性的意思表示,且验证字符中具有与该提示性意思表示具有映射关系的字符时,该文字字段就能够作为验证语句。The verification sentence is a text field that prompts the user to select the correct characters for verification. For example, the verification sentence is (not limited to): Please select the text next to the word "女" in the following text, please select the font size of the following text is larger than normal For the font size, please select the text with a distorted font in the following text or the words that express "joy emotion" in the following text and other prompt sentences. The function of the verification sentence is to prompt the user to select the correct character for verification. Only after the user understands the verification sentence, can the user select the correct character in the verification character for verification. Therefore, as long as there is a suggestive meaning and verification When the characters have a mapping relationship with the suggestive meaning, the text field can be used as a verification sentence.
S1300、识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符,其中,所述验证字符中至少有一个字符与所述验证方式具有映射关系;S1300. Identify the semantics of the verification sentence and generate verification characters according to the verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode;
通过随机抽取得到验证语句后,对该验证语句记载的文字字段所表征的验证方式进行识别。识别的方式为根据深度学习训练能够识别语义的神经网络模型,然后采用神经网络模型对验证语句的语义进行识别。After the verification sentence is obtained by random extraction, the verification mode represented by the text field recorded in the verification sentence is identified. The recognition method is to train a neural network model that can recognize semantics according to deep learning, and then use the neural network model to recognize the semantics of the verification sentence.
本实施方式中,验证语句表征的验证方式能够划分为:根据发音选择字符、根据结构选择字符、根据字形形态选择字符或根据字义选择字符等方式。例如,“选择下列字符中声母为y的字符”的验证语 句表征的验证方式为根据发音选择字符;“选择下列文字中带有“女”字旁的文字”的验证语句表征的验证方式为根据结构选择字符;“请选择下列文字中字形扭曲”的验证语句表征的验证方式为根据字形形态选择字符;“请选择下列文字中表达喜悦情感的词语”的验证语句表征的验证方式根据字义选择文字。In this embodiment, the verification method of the verification sentence representation can be divided into: selecting characters based on pronunciation, selecting characters based on structure, selecting characters based on glyph shape, or selecting characters based on meaning. For example, the verification method of the verification sentence characterization of "select the character whose initials are y in the following characters" is to select the character according to the pronunciation; the verification method of the verification sentence characterization of the verification sentence characterization of "select the following characters with the word "女" is the basis Structure selection character; the verification method of the verification sentence characterization of "please select the distortion in the following text" is to select the character according to the shape of the character; .
根据验证语句表征的验证方式,在预设的字符数据库中提取对应的验证字符,提取的验证字符中至少有一个字符与验证语句映射。例如,验证语句为:“选择下列文字中带有“女”字旁的文字”,验证字符分别为:“妇”“高”“率”“祯”。According to the verification mode represented by the verification sentence, the corresponding verification character is extracted from the preset character database, and at least one character in the extracted verification character is mapped to the verification sentence. For example, the verification sentence is: "Select the text next to the word "女" in the following text", and the verification characters are: "女", "高", "rate", and "祯".
验证字符为多个文字字符组成的承载正确的字符的文字字段,各个文字字符之间能够相互独立不组成特定词语,但是验证字符的组成方式不局限于此,根据具体应用场景的不同,在一些实施方式中,验证字符由多个词语组成。验证字符中包括常规字符以及与验证语句具有映射关系的字符。其中,与验证语句具有映射关系的字符及为正确的字符,用户选择上述字符就能够完成字符验证,否则,则无法完成字符验证。The verification character is a text field composed of multiple text characters that carries the correct character. Each text character can be independent of each other and does not form a specific word, but the composition method of the verification character is not limited to this. According to different application scenarios, some In an embodiment, the verification character consists of multiple words. The verification characters include regular characters and characters that have a mapping relationship with the verification sentence. Among them, the characters that have a mapping relationship with the verification sentence are correct characters, and the user can complete the character verification by selecting the above-mentioned characters; otherwise, the character verification cannot be completed.
S1400、将所述验证语句与所述验证字符发送至所述目标终端。S1400. Send the verification sentence and the verification character to the target terminal.
将生成的验证语句与验证字符发送至目标终端,以使该目标终端进行字符验证。The generated verification sentence and verification characters are sent to the target terminal, so that the target terminal performs character verification.
在一些实施方式中,服务器端发送至目标终端的验证数据中还包括:背景图像,将验证字符与验证语句设置在背景图像上,合成验证图片,然后将验证图片发送至目标终端进行验证。In some embodiments, the verification data sent by the server to the target terminal further includes: a background image, the verification characters and the verification sentence are set on the background image, the verification picture is synthesized, and then the verification picture is sent to the target terminal for verification.
上述实施方式,服务器端在验证时同时向目标终端同时发送验证语句与验证字符,用户只有在正确的理解验证语句的语义提示后,才能够在验证字符中选择正确的字符完成验证。因此,图像识别技术也只有在理解了验证语句的语义后才能够在验证字符中进行选择验证,避免直接输入式的验证方式容易被图像识别技术破解的漏洞,提高了验证的安全性,保护网络资源能够被安全的使用。In the foregoing embodiment, the server sends the verification sentence and the verification character to the target terminal at the same time during verification, and the user can select the correct character from the verification character to complete the verification only after correctly understanding the semantic prompt of the verification sentence. Therefore, the image recognition technology can only select and verify the verification characters after understanding the semantics of the verification sentence, avoiding the vulnerability of the direct input verification method that is easy to be cracked by the image recognition technology, improving the security of verification, and protecting the network. Resources can be used safely.
进一步地,请参阅图2,在一可选实施方式中,图1所示的S1300步骤包括:Further, referring to FIG. 2, in an optional implementation manner, the step S1300 shown in FIG. 1 includes:
S1311、调用所述验证语句并读取所述验证语句中的文字字段;S1311: Call the verification sentence and read the text field in the verification sentence;
验证语句是由字符组成的具有特定语义的文字字段,对验证语句进行字符验证时首先读取验证语句的文字字段。The verification sentence is a text field with specific semantics composed of characters, and the text field of the verification sentence is first read when performing character verification on the verification sentence.
S1312、根据预设的转换方式将所述文字字段转换为数组矩阵;S1312. Convert the text field into an array matrix according to a preset conversion method.
在读取了文字字段后,将文字字段通过matlab软件应用软件转换为数组矩阵。其中,构成文字字段的每一个字或者单词,均被映射替换为数组矩阵的一个元素,且元素的排列次序与文字字段的排列次序一致。After reading the text field, the text field is converted into an array matrix through the matlab software application software. Among them, each word or word constituting the text field is mapped and replaced with an element of the array matrix, and the arrangement order of the elements is consistent with the arrangement order of the text field.
S1313、将所述数据矩阵输入至预设的语义识别模型中,其中,所述语义识别模型为预先训练至收敛状态用于对文字进行语义识别的神经网络模型;S1313. Input the data matrix into a preset semantic recognition model, where the semantic recognition model is a neural network model pre-trained to a convergent state for semantic recognition of text;
检测验证语句的语义通过语义识别模型进行。语义识别模型为训练至收敛状态的用于对验证语句表达的语义进行分类的神经网络模型。具体地,将需要检测的验证语句通过matlab软件,将待检测的验证语句转换为能够被神经网络模型识别的数组矩阵,然后将数组矩阵输入到语义识别模型中,得到模型输出的表达验证语句语义的分类结果。The semantics of the verification sentence is detected through the semantic recognition model. The semantic recognition model is a neural network model trained to a convergent state for classifying the semantics expressed by the verification sentence. Specifically, through matlab software, the verification sentence to be detected is converted into an array matrix that can be recognized by the neural network model, and then the array matrix is input into the semantic recognition model to obtain the semantics of the expression verification sentence output by the model The classification results.
本实施方式中语义识别模型能够为已经训练至收敛状态的卷积神经网络模型(CNN),但是,不局限于此,语义识别模型还能够是:深度神经网络模型(DNN)、循环神经网络模型(RNN)或者上述三种网络模型的变形模型。The semantic recognition model in this embodiment can be a convolutional neural network model (CNN) that has been trained to a convergent state, but is not limited to this, the semantic recognition model can also be: deep neural network model (DNN), recurrent neural network model (RNN) or a deformed model of the above three network models.
作为语义识别模型的初始神经网络模型在训练时,通过收集大量的验证语句转换后的数组矩阵作为训练样本,通过人工在阅读了训练样本的原验证语句后对各个训练样本进行标定(标定是指训练样本真实表达的语义)。然后将训练样本输入到初始的神经网络模型中,并获取模型输出的分类结果(分类结果为模型得到的训练样本的语义分类),并通过神经网络模型的损失函数计算该分类结果与标定结果之间的距离(例如:欧氏距离、马氏距离或余弦距离等),将计算结果与设定的距离阈值进行比对,若计算结果小于等于距离阈值(例如,0.05)则通过验证,继续进行下一个训练样本的训练,若计算结果大于距离阈值则通过损失函数计算二者之间的差值,并通过反向传播校正神经网络模型内的权值,使神经网络模型能够提高训练样本中能够准确表达文本语义的词语对应的元素的权重,以此,增大判断的准确率。通过循环执行上述方案和大量的训练样本训练后,训练得到的神经网络模型对数组矩阵表征的语义判断准确率大于一定数值的,例如,97%,则该神经网络模型训练至收敛状态,则该训练至收敛的神经网络即为语义识别模型。When training the initial neural network model as a semantic recognition model, it collects a large number of converted array matrices of verification sentences as training samples. After manually reading the original verification sentences of the training samples, each training sample is calibrated (calibration refers to The semantics actually expressed by the training samples). Then input the training sample into the initial neural network model, and obtain the classification result of the model output (the classification result is the semantic classification of the training sample obtained by the model), and calculate the difference between the classification result and the calibration result through the loss function of the neural network model Compare the calculated result with the set distance threshold (for example, Euclidean distance, Mahalanobis distance, or cosine distance, etc.). If the calculated result is less than or equal to the distance threshold (for example, 0.05), pass the verification and continue. For the training of the next training sample, if the calculation result is greater than the distance threshold, the difference between the two is calculated through the loss function, and the weights in the neural network model are corrected through back propagation, so that the neural network model can improve the training sample The weight of elements corresponding to words that accurately express the semantics of the text can be used to increase the accuracy of judgment. After cyclically executing the above scheme and training with a large number of training samples, the neural network model obtained by training has a semantic judgment accuracy rate greater than a certain value, for example, 97%, and the neural network model is trained to a convergent state. The neural network trained to convergence is the semantic recognition model.
训练至收敛状态的语义识别模型能够准确的提取数组矩阵表征 的语义。The semantic recognition model trained to the convergent state can accurately extract the semantics represented by the array matrix.
S1314、根据所述语义识别模型输出的语义分类结果表征的验证方式,在预设的字符数据库中抽取所述验证字符。S1314. Extract the verification character from a preset character database according to the verification mode represented by the semantic classification result output by the semantic recognition model.
根据语义识别模型输出的语义分类结果,在字符数据库中抽取第一字符长度的验证字符。According to the semantic classification result output by the semantic recognition model, the verification character of the first character length is extracted from the character database.
例如,当验证语句为:请选择下列文字中排列序号为第四位和第六位的字符。此时,语义识别模型输出的语义分类结果为:“根据字符序号进行验证,最大字符需要为第六位”。则在验证字库中抽取大于等于六个字符的验证字符。For example, when the verification sentence is: Please select the fourth and sixth characters in the following text. At this time, the semantic classification result output by the semantic recognition model is: "Verify according to the character number, and the largest character needs to be the sixth digit". Then, the verification characters that are greater than or equal to six characters are extracted from the verification character library.
当验证语句为:请选择下列文字中具有“女”字旁的字符时,语义识别模型输出的语义分类结果为:“根据偏旁进行验证,验证偏旁为女”。则在字符数据库中抽取至少有个一字符为女字旁的验证字符。When the verification sentence is: Please select the characters next to the word "女" in the following text, the semantic classification result output by the semantic recognition model is: "Verify according to the radical, verify that the radical is female". Then at least one character is extracted from the character database as a verification character next to the female character.
当验证语句为:请选择下列文字中字体加粗处理后的字符等语句时,语义识别模型输出的语义分类结果为:“根据字形进行验证,验证字形为加粗”。When the verification sentence is: Please select the sentence of characters with bold font in the following text, the semantic classification result output by the semantic recognition model is: "Verify according to the font shape, and the verification font is bold".
通过神经网络模型对验证语句进行语义识别,能够使终端根据语义识别结果对应生成验证字符,提高了验证字符生成的效率和准确度,进而提高了验证的效率。Semantic recognition of the verification sentence through the neural network model enables the terminal to generate verification characters corresponding to the semantic recognition results, which improves the efficiency and accuracy of verification character generation, thereby increasing the efficiency of verification.
在一些实施方式中,验证语句表征的验证方式为:根据字体的形态的进行验证,因此,在生成验证字符时,需要针对验证语句的语义对部分字符进行变形。In some embodiments, the verification method of the verification sentence characterization is to perform verification according to the shape of the font. Therefore, when the verification character is generated, some characters need to be deformed according to the semantics of the verification sentence.
进一步地,请参阅图3,在一可选实施方式中,图2所示的S1314步骤之后,还包括:Further, referring to FIG. 3, in an optional implementation manner, after step S1314 shown in FIG. 2, the method further includes:
S1321、在所述验证字符中筛选至少一个形变字符;S1321, filter at least one deformed character among the verification characters;
当验证语句所表征的验证方式为通过字形选取字符进行验证时,在获取了组成验证字符的字符后,在验证字符中选取至少一个形变字符。本实施方式中,验证字符中选取作为形变字符的字符数量不局限于1个,根据具体应用场景的不同,在一些实施方式中,形变字符的数量能够更多,直至验证字符中的所有字符均为形变字符。When the verification mode represented by the verification sentence is to perform verification by selecting characters from the font, after the characters constituting the verification characters are obtained, at least one deformed character is selected from the verification characters. In this embodiment, the number of characters selected as deformed characters in the verification character is not limited to one. According to different application scenarios, in some embodiments, the number of deformed characters can be greater until all characters in the verification character are equal. It is a deformed character.
S1322、根据所述验证方式表征的形变类型对所述至少一个形变字符进行形变处理以生成语义字符,其中,所述语义字符与所述验证语句具有映射关系;S1322, performing deformation processing on the at least one deformed character according to the deformation type represented by the verification mode to generate semantic characters, wherein the semantic characters have a mapping relationship with the verification sentence;
根据语义识别模型判断得到的语义分类结果,所表征的形变类型对至少一个形变字符进行形变处理生成语义字符。According to the semantic classification result determined by the semantic recognition model, at least one deformed character is deformed by the represented deformation type to generate a semantic character.
本实施方式中形变类型包括(不限于):对字符进行放大、缩小、加粗、倾斜、旋转、扭曲或者变色。The deformation types in this embodiment include (not limited to): enlarging, reducing, bolding, slanting, rotating, twisting, or changing colors of characters.
形变处理后生成的字符定义为语义字符,语义字符与验证语句之间具有映射关系,即语音字符为字符验证的标准答案。Characters generated after deformation processing are defined as semantic characters, and there is a mapping relationship between semantic characters and verification sentences, that is, phonetic characters are the standard answers for character verification.
S1323、将所述验证字符中的形变字符替换为所述语义字符。S1323. Replace the deformed character in the verification character with the semantic character.
将验证字符中的形变字符替换为生成的语义字符,即将验证的正确答案写入验证字符中,完成验证字符的形变处理。同时,将语义字符进行存储,语义字符作为验证语句的正确答案,用于验证比对。The deformed character in the verification character is replaced with the generated semantic character, that is, the correct answer of the verification is written into the verification character, and the deformation processing of the verification character is completed. At the same time, the semantic characters are stored, and the semantic characters are used as the correct answer of the verification sentence for verification and comparison.
通过使用字符形变处理,能够使字符验证的结果更加的突出,有利于用户进行选择,同时,字形变化不容易被图像识别技术辨识,提高了字符验证的安全性。By using character deformation processing, the result of character verification can be made more prominent, which is conducive to the user's choice. At the same time, the character shape change is not easily recognized by the image recognition technology, which improves the security of character verification.
在一些实施方式中,验证字符与验证语句需要通过图片的格式进行显示。因此,需要将验证字符与验证语句进行图像化处理。In some embodiments, the verification characters and verification sentences need to be displayed in a picture format. Therefore, it is necessary to image the verification characters and verification sentences.
进一步地,请参阅图4,在一可选实施方式中,图1所示的S1400步骤包括:Further, referring to FIG. 4, in an optional implementation manner, the step S1400 shown in FIG. 1 includes:
S1411、在预设的图像数据库中筛选背景图像;S1411, filter background images in a preset image database;
本实施方式中,服务器端设有图像数据库,图像数据库中预存储有各类的图片,存储在图像数据库中的图片能够被用于字符验证。In this embodiment, the server is provided with an image database, and various pictures are pre-stored in the image database, and the pictures stored in the image database can be used for character verification.
当语义字符替换形变字符后,在图像数据库中通过随机筛选的方式,抽取一张图片作为背景图像。但是筛选的方式不局限于此,根据具体应用场景的不同,在一些实施方式中,筛选背景图像时,需要筛选与验证字符字体颜色之间色差值等于2或者3的背景图像,以增加验证字符与背景图像之间的融合度,使图像识别技术难以识别验证字符,提高了机器辨识的难度。After the semantic character replaces the deformed character, a picture is selected as a background image through random screening in the image database. However, the screening method is not limited to this. According to different application scenarios, in some embodiments, when screening background images, it is necessary to screen background images with a color difference equal to 2 or 3 between the font colors of the verification characters to increase verification. The degree of fusion between characters and background images makes it difficult for image recognition technology to recognize and verify characters, which increases the difficulty of machine recognition.
S1412、将所述验证语句与所述验证字符覆盖在所述背景图像上生成验证图像,其中,所述验证字符中包括所述语义字符;S1412, overlaying the verification sentence and the verification character on the background image to generate a verification image, wherein the verification character includes the semantic character;
将验证语句与验证字符设置在背景图像上,设置图像层级时验证语句与验证字符均置顶设置,以使验证语句与验证字符覆盖在背景图像上。,设置完成后生成携带验证语句与验证字符的验证图像。Set the verification sentence and the verification character on the background image, and set the verification sentence and the verification character on the top when setting the image level, so that the verification sentence and the verification character are overlaid on the background image. After the setting is completed, a verification image with verification sentences and verification characters is generated.
S1413、将所述验证图像发送至所述目标终端。S1413. Send the verification image to the target terminal.
生成验证图像后将验证图像发送至目标终端,以使目标终端能够将验证图像用于字符验证。After the verification image is generated, the verification image is sent to the target terminal so that the target terminal can use the verification image for character verification.
将验证字符与验证语句设置在背景图像中,能够增加验证语句与验证字符的与背景之间混淆度,增大识别难度。Setting the verification character and the verification sentence in the background image can increase the degree of confusion between the verification sentence and the verification character and the background, and increase the difficulty of recognition.
在一些实施方式中,为防止同一个终端通过虚拟验证的方式,快速的对验证系统进行刷单,服务器端记录各个目标终端的验证记录,并根据验证记录对虚拟刷单的行为进行核查。请参阅图5,图5为本实施例对反复验证的目标终端进行显示验证的流程示意图。In some embodiments, in order to prevent the same terminal from passing virtual verification, the verification system is quickly swiped. The server records the verification records of each target terminal, and verifies the virtual swiping behavior based on the verification records. Please refer to FIG. 5. FIG. 5 is a schematic diagram of the display verification process of the repeatedly verified target terminal in this embodiment.
进一步地,请参阅图5,在一可选实施方式中,图4所示的S1413步骤之后,还包括:Further, referring to FIG. 5, in an optional implementation manner, after step S1413 shown in FIG. 4, the method further includes:
S1421、在历史验证列表中查找所述目标终端的验证记录;S1421, search for the verification record of the target terminal in the historical verification list;
本实施方式中,每个目标终端在服务器端进行验证的记录,均记录在历史验证列表中,记录的方式为:记录目标终端的身份信息,例如,目标终端的IP地址或Mac地址。然后将目标终端的每一次验证请求均记录在历史验证列表中对应目标终端的身份信息下方。因此,只要得到验证请求中目标终端的身份信息,就能够在历史验证列表中查找到对应的验证记录。In this embodiment, the record of each target terminal's verification on the server side is recorded in the history verification list, and the recording method is: recording the identity information of the target terminal, for example, the IP address or Mac address of the target terminal. Then, each verification request of the target terminal is recorded under the identity information of the corresponding target terminal in the history verification list. Therefore, as long as the identity information of the target terminal in the verification request is obtained, the corresponding verification record can be found in the historical verification list.
S1422、当所述目标终端的验证记录符合预设的第一验证条件时,向所述目标终端调用所述验证图像在验证页面中的截图画面;S1422, when the verification record of the target terminal meets the preset first verification condition, call the screenshot screen of the verification image in the verification page to the target terminal;
验证记录中记载有目标终端在设定的时间段内的验证频次,例如,在一个小时内目标终端验证了100次。验证记录中统计验证频次的时间段的长度能够根据具体应用场景的不同加以调整。The verification record records the verification frequency of the target terminal within a set time period, for example, the target terminal is verified 100 times in one hour. The length of the time period for statistical verification frequency in the verification record can be adjusted according to different specific application scenarios.
当检测到目标终端在设定的时间段内的频次是否符合设定的第一验证条件,其中,第一验证条件是指在设定时间段内验证频次的数值。例如,在设定的1小时内,目标终端进行验证的次数不得超过10次,但是第一验证条件的设定的频次数值不局限于此,根据具体应用场景的不同,能够根据场景需要进行适应性的增大或者减小。When it is detected whether the frequency of the target terminal in the set time period meets the set first verification condition, where the first verification condition refers to the value of the verification frequency in the set time period. For example, within a set hour, the number of verifications performed by the target terminal shall not exceed 10 times, but the set frequency value of the first verification condition is not limited to this, and it can be adapted according to the specific application scenarios. Increase or decrease in sex.
当目标终端在设定时间段内的验证频次大于等于第一验证条件设定的验证频次时,服务器端向目标终端发送调用请求,调取目标终端在验证页面中显示验证图像的截图画面,以辨识用户是否使用虚拟验证的方式进行验证。When the verification frequency of the target terminal in the set period of time is greater than or equal to the verification frequency set by the first verification condition, the server sends a call request to the target terminal, and calls the target terminal to display a screenshot of the verification image on the verification page. Identify whether the user uses virtual authentication to verify.
目标终端对验证图像进行显示时,需要将包括验证图像的验页面存储在帧缓冲存储器内,即帧缓冲存储器内是屏幕所显示画面的一个直接映像,又称为位映射图(Bit Map),也即显示数据。When the target terminal displays the verification image, it needs to store the verification page including the verification image in the frame buffer memory, that is, the frame buffer memory is a direct image of the screen displayed on the screen, which is also called a bit map. That is, the data is displayed.
由于,验证图像在位映射图中的具有设定的区域,根据设定区域的信息,在位映射图提取表征验证区域内容的数据区域生成局部位映射图,即表征验证图像显示内容的目标数据。Since the verification image has a set area in the bitmap, according to the information of the set area, the data area representing the content of the verification area is extracted from the bitmap to generate a local bitmap, that is, the target data that represents the display content of the verification image .
最后将目标数据转换为常规的图片格式,例如(不限于)JPG、 PNG或者TIF等格式,生成验证图像。Finally, the target data is converted into a conventional picture format, such as (not limited to) JPG, PNG, or TIF, etc., to generate a verification image.
在一些实施方式中,在帧缓冲存储器内无法获取到验证图像时,则表明该验证方式为虚拟验证。In some embodiments, when the verification image cannot be obtained in the frame buffer memory, it indicates that the verification method is virtual verification.
当目标终端在设定时间段内的验证频次小于第一验证条件设定的验证频次时,则无需向目标终端调用截图画面。When the verification frequency of the target terminal within the set time period is less than the verification frequency set by the first verification condition, there is no need to call the screenshot screen to the target terminal.
S1423、将所述截图画面与所述验证图像输入至预设的验证判断模型中,其中,所述验证判断模型为预先训练至收敛状态,用于判断图像相似度的神经网络模型;S1423. Input the screenshot and the verification image into a preset verification judgment model, where the verification judgment model is a neural network model that is pre-trained to a convergence state and is used to judge image similarity;
将截图画面与验证图像输入至预设的验证判断模型中,其中,验证判断模型为预先训练至收敛状态用于判断图像相似度的神经网络模型。The screenshot and the verification image are input into a preset verification judgment model, where the verification judgment model is a neural network model that is pre-trained to a convergence state for judging image similarity.
本实施方式中验证判断模型能够为已经训练至收敛状态的卷积神经网络模型(CNN),但是,不局限于此,验证判断模型还能够是:深度神经网络模型(DNN)、循环神经网络模型(RNN)或者上述三种网络模型的变形模型。In this embodiment, the verification judgment model can be a convolutional neural network model (CNN) that has been trained to a convergent state, but is not limited to this. The verification judgment model can also be: deep neural network model (DNN), recurrent neural network model (RNN) or a deformed model of the above three network models.
验证判断模型为收敛形态的神经网络模型,因此,能够准确快速地判断出验证图像是否相同或者不相同。The verification judgment model is a neural network model with a convergent shape, so it can accurately and quickly determine whether the verification images are the same or different.
S1424、根据所述验证判断模型输出的判断结果确认所述目标终端是否为虚拟验证。S1424: Confirm whether the target terminal is a virtual verification according to the judgment result output by the verification judgment model.
验证判断模型输出的判断结果中,记载有验证判断模型判断截图画面与验证图像是否相同的判断结论。当截图画面与验证图像相同时,则确认目标终端的验证为非虚拟验证;否则,则判断目标终端进行虚拟验证,禁止响应目标终端访问服务器端的请求。The judgment result output by the verification judgment model contains a judgment conclusion that the verification judgment model judges whether the screenshot screen and the verification image are the same. When the screenshot is the same as the verification image, the verification of the target terminal is confirmed to be non-virtual verification; otherwise, it is determined that the target terminal performs virtual verification, and it is forbidden to respond to the request of the target terminal to access the server.
服务器端对验证图像和截图画面是否相同进行判断,能够避免虚拟验证者通过欺骗手段往帧缓冲存储器随意写入图像数据避免检测的手段,提高了验证的准确率,进一步地保证了网络数据的安全性。The server side judges whether the verification image and the screenshot are the same, which can prevent the virtual verifier from writing image data to the frame buffer memory by deception to avoid detection, which improves the accuracy of verification and further ensures the security of network data Sex.
在一些实施方式中,服务器端获取目标终端上传的用户选择的用于验证的目标字符,并通过目标字符与语义字符是否一致,判断验证的结果。In some embodiments, the server obtains the target character selected by the user for verification uploaded by the target terminal, and judges the result of the verification based on whether the target character is consistent with the semantic character.
进一步地,请参阅图6,在一可选实施方式中,图1所示的S1400步骤之后,还包括:Further, referring to FIG. 6, in an optional implementation manner, after the step S1400 shown in FIG. 1, the method further includes:
S1431、获取所述目标终端上传的验证信息,其中,所述验证信息中包括用户根据所述验证语句在所述验证字符中筛选的用于验证的目标字符;S1431. Acquire verification information uploaded by the target terminal, where the verification information includes target characters for verification that the user screens among the verification characters according to the verification sentence;
将验证语句与验证字符发送至目标终端后,服务器端等待接收目标终端上传的验证信息,其中,验证信息中包括目标字符。After sending the verification sentence and the verification characters to the target terminal, the server waits to receive the verification information uploaded by the target terminal, where the verification information includes the target characters.
目标字符是根据用户的点选指令,在验证字符中选择的字符,其中,目标字符中的字符有可能均与验证语句具有映射关系;有可能只有个别字符或者没有字符与验证语句具有映射关系。当目标字符中的字符均与验证语句具有映射关系时,验证通过;否则,则验证失败。The target character is a character selected in the verification character according to the user's click instruction. Among them, the characters in the target character may have a mapping relationship with the verification sentence; there may be only individual characters or no characters that have a mapping relationship with the verification sentence. When the characters in the target character all have a mapping relationship with the verification sentence, the verification passes; otherwise, the verification fails.
S1432、将目标字符与所述语义字符进行比对,以判断所述目标字符与所述语义字符是否一致;S1432. Compare the target character with the semantic character to determine whether the target character is consistent with the semantic character.
服务器端将目标字符与语义字符进行比对,比对的方式为计算目标字符与语义字符之间的汉明距离或者海明距离。当目标字符与语义字符之间的汉明距离或者海明距离为零时,目标字符与语义字符一致;否则,目标字符与语义字符不一致。The server compares the target character with the semantic character, and the comparison method is to calculate the Hamming distance or the Hamming distance between the target character and the semantic character. When the Hamming distance or Hamming distance between the target character and the semantic character is zero, the target character is consistent with the semantic character; otherwise, the target character is inconsistent with the semantic character.
S1433、当所述目标字符与所述语义字符一致时,确认所述目标终端通过验证。S1433: When the target character is consistent with the semantic character, confirm that the target terminal passes the verification.
当目标字符与语义字符一致时,服务器端确认目标终端字符验证通过;否则,则确认目标终端验证失败。When the target character is consistent with the semantic character, the server confirms that the target terminal character verification has passed; otherwise, it confirms that the target terminal verification fails.
在一些实施方式中,通过计算目标字符与语义字符之间的汉明距离或者海明距离确定目标字符与语音字符是否一致。In some embodiments, the Hamming distance or Hamming distance between the target character and the semantic character is calculated to determine whether the target character is consistent with the phonetic character.
进一步地,请参阅图7,在一可选实施方式中,图6所示的S1432步骤包括:Further, referring to FIG. 7, in an optional implementation manner, the step S1432 shown in FIG. 6 includes:
S1441、计算所述目标字符与所述语义字符之间的汉明距离;S1441, calculate the Hamming distance between the target character and the semantic character;
计算目标字符与语义字符之间的汉明距离,汉明距离为两个字段(相同长度)对应位不同的数量,例如,"toned"与"roses"之间的汉明距离是3。Calculate the Hamming distance between the target character and the semantic character. The Hamming distance is the different number of bits corresponding to two fields (same length). For example, the Hamming distance between "toned" and "roses" is 3.
S1442、当所述汉明距离为零时,确认所述目标字符与所述语义字符一致;否则,则确认所述目标字符与所述语义字符不一致。S1442. When the Hamming distance is zero, confirm that the target character is consistent with the semantic character; otherwise, confirm that the target character is inconsistent with the semantic character.
当目标字符与语义字符之间的汉明距离为零时,目标字符与语义字符一致;否则,目标字符与语义字符不一致。When the Hamming distance between the target character and the semantic character is zero, the target character is consistent with the semantic character; otherwise, the target character is inconsistent with the semantic character.
通过汉明距离能够快速的对目标字符和语义字符进行比对,提高了比对的效率,进而提高了服务器端的验证效率。Through the Hamming distance, the target character and the semantic character can be quickly compared, which improves the efficiency of the comparison and further improves the verification efficiency on the server side.
为解决上述技术问题,本申请实施例还提供一种字符验证装置。In order to solve the above technical problems, an embodiment of the present application also provides a character verification device.
具体请参阅图8,图8为本实施例字符验证装置基本结构示意图。Please refer to FIG. 8 for details. FIG. 8 is a schematic diagram of the basic structure of the character verification device in this embodiment.
如图8所示,一种字符验证装置,包括:获取模块2100、处理模块2200、识别模块2300和执行模块2400。其中,获取模块2100 用于接收目标终端发送的验证请求;处理模块2200用于根据验证请求在预设的语句数据库中抽取验证语句,其中,验证语句用于验证提示;识别模块2300用于识别验证语句并根据验证语句的语义所表征的验证方式生成验证字符,其中,验证字符中至少有一个字符与验证方式具有映射关系;执行模块2400用于将验证语句与验证字符发送至目标终端。As shown in FIG. 8, a character verification device includes: an acquisition module 2100, a processing module 2200, an identification module 2300, and an execution module 2400. Among them, the acquisition module 2100 is used to receive a verification request sent by the target terminal; the processing module 2200 is used to extract verification sentences from a preset sentence database according to the verification request, wherein the verification sentences are used for verification prompts; the identification module 2300 is used to identify verification The sentence and the verification character are generated according to the verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode; the execution module 2400 is used to send the verification sentence and the verification character to the target terminal.
字符验证装置在验证时同时向目标终端同时发送验证语句与验证字符,用户只有在正确的理解验证语句的语义提示后,才能够在验证字符中选择正确的字符完成验证。因此,图像识别技术也只有在理解了验证语句的语义后才能够在验证字符中进行选择验证,避免直接输入式的验证方式容易被图像识别技术破解的漏洞,提高了验证的安全性,保护网络资源能够被安全的使用。The character verification device simultaneously sends the verification sentence and verification character to the target terminal during verification, and the user can select the correct character from the verification character to complete verification only after correctly understanding the semantic prompt of the verification sentence. Therefore, the image recognition technology can only select and verify the verification characters after understanding the semantics of the verification sentence, avoiding the vulnerability of the direct input verification method that is easy to be cracked by the image recognition technology, improving the security of verification, and protecting the network. Resources can be used safely.
在一些实施方式中,字符验证装置还包括:第一获取子模块、第一处理子模块、第一识别子模块和第一执行子模块。其中,第一获取子模块用于获取验证语句的文字字段;第一处理子模块用于根据预设的转换方式将文字字段转换为数组矩阵;第一识别子模块用于将数据矩阵输入至预设的语义识别模型中,其中,语义识别模型为预先训练至收敛状态用于对文字进行语义识别的神经网络模型;第一执行子模块用于根据语义识别模型输出的语义分类结果表征的验证方式,在预设的字符数据库中抽取验证字符。In some embodiments, the character verification apparatus further includes: a first acquisition submodule, a first processing submodule, a first recognition submodule, and a first execution submodule. Among them, the first obtaining submodule is used to obtain the text field of the verification sentence; the first processing submodule is used to convert the text field into an array matrix according to a preset conversion method; the first recognition submodule is used to input the data matrix into the preset In the semantic recognition model set, the semantic recognition model is a neural network model that is pre-trained to a convergent state for semantic recognition of text; the first execution sub-module is used to represent the verification method based on the semantic classification result output by the semantic recognition model , Extract verification characters from the preset character database.
在一些实施方式中,验证方式为字形验证,字符验证装置还包括:第一筛选子模块、第二处理子模块和第二执行子模块。其中,第一筛选子模块用于在验证字符中筛选至少一个形变字符;第二处理子模块用于根据验证方式表征的形变类型对至少一个形变字符进行形变处理生成语义字符,其中,语义字符与验证语句具有映射关系;第二执行子模块用于将验证字符中的形变字符替换为语义字符。In some embodiments, the verification method is font verification, and the character verification device further includes: a first screening submodule, a second processing submodule, and a second execution submodule. Wherein, the first screening submodule is used for screening at least one deformed character in the verification character; the second processing submodule is used for deforming at least one deformed character according to the deformation type represented by the verification mode to generate semantic characters, wherein the semantic characters The verification statement has a mapping relationship; the second execution sub-module is used to replace deformed characters in the verification characters with semantic characters.
在一些实施方式中,字符验证装置还包括:第二筛选子模块、第三处理子模块和第三执行子模块。其中,第二筛选子模块用于在预设的图像数据库中筛选背景图像;第三处理子模块用于将验证语句与验证字符覆盖在背景图像上生成验证图像,其中,验证字符中包括语义字符;第三执行子模块用于将验证图像发送至目标终端。In some embodiments, the character verification device further includes: a second screening submodule, a third processing submodule, and a third execution submodule. Among them, the second screening sub-module is used to screen the background image in the preset image database; the third processing sub-module is used to overwrite the verification sentence and the verification characters on the background image to generate a verification image, wherein the verification characters include semantic characters ; The third execution submodule is used to send the verification image to the target terminal.
在一些实施方式中,字符验证装置还包括:第一查找子模块、第四处理子模块、第一输入子模块和第四执行子模块。其中,第一查找子模块用于在历史验证列表中查找目标终端的验证记录;第四处理子 模块用于当目标终端的验证记录符合预设的第一验证条件时,向目标终端调用验证图像在验证页面中的截图画面;第一输入子模块用于将截图画面与验证图像输入至预设的验证判断模型中,其中,验证判断模型为预先训练至收敛状态,用于判断图像相似度的神经网络模型;第四执行子模块用于根据验证判断模型输出的判断结果确认目标终端是否为虚拟验证。In some embodiments, the character verification device further includes: a first search submodule, a fourth processing submodule, a first input submodule, and a fourth execution submodule. Among them, the first search submodule is used to search the verification record of the target terminal in the historical verification list; the fourth processing submodule is used to call the verification image to the target terminal when the verification record of the target terminal meets the preset first verification condition The screenshot screen in the verification page; the first input sub-module is used to input the screenshot screen and the verification image into the preset verification judgment model, where the verification judgment model is pre-trained to the convergence state, and is used to judge image similarity Neural network model; the fourth execution sub-module is used to confirm whether the target terminal is a virtual verification according to the judgment result output by the verification judgment model.
在一些实施方式中,字符验证装置还包括:第二获取子模块、第五处理子模块和第五执行子模块。其中,第二获取子模块用于获取目标终端上传的验证信息,其中,验证信息中包括用户根据验证语句在验证字符中筛选的用于验证的目标字符;第五处理子模块用于将目标字符与语义字符进行比对,以判断目标字符与语义字符是否一致;第五执行子模块用于当目标字符与语义字符一致时,确认目标终端通过验证。In some embodiments, the character verification device further includes: a second acquisition submodule, a fifth processing submodule, and a fifth execution submodule. Wherein, the second obtaining submodule is used to obtain the verification information uploaded by the target terminal, where the verification information includes the target characters for verification selected by the user according to the verification sentence among the verification characters; the fifth processing submodule is used to transfer the target characters It is compared with semantic characters to determine whether the target character is consistent with the semantic character; the fifth execution submodule is used to confirm that the target terminal passes the verification when the target character is consistent with the semantic character.
在一些实施方式中,字符验证装置还包括:第一计算子模块和第六执行子模块。其中,第一计算子模块用于计算目标字符与语义字符之间的汉明距离;第六执行子模块用于当汉明距离为零时,确认目标字符与语义字符一致;否则,则确认目标字符与语义字符不一致。In some embodiments, the character verification device further includes: a first calculation submodule and a sixth execution submodule. Among them, the first calculation submodule is used to calculate the Hamming distance between the target character and the semantic character; the sixth execution submodule is used to confirm that the target character is consistent with the semantic character when the Hamming distance is zero; otherwise, confirm the target Characters are inconsistent with semantic characters.
为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图9,图9为本实施例计算机设备基本结构框图。In order to solve the above technical problems, the embodiments of the present application also provide computer equipment. Please refer to FIG. 9 for details. FIG. 9 is a block diagram of the basic structure of the computer device in this embodiment.
如图9所示,计算机设备的内部结构示意图。该计算机设备包括通过系统总线连接的处理器、非易失性存储介质、存储器和网络接口。其中,该计算机设备的非易失性存储介质存储有操作系统、数据库和计算机可读指令,数据库中可存储有控件信息序列,该计算机可读指令被处理器执行时,可使得处理器实现一种字符验证方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该计算机设备的存储器中可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种字符验证方法。该计算机设备的网络接口用于与终端连接通信。本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。As shown in Figure 9, a schematic diagram of the internal structure of the computer equipment. The computer device includes a processor, a nonvolatile storage medium, a memory, and a network interface connected through a system bus. Wherein, the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store control information sequences. When the computer-readable instructions are executed by the processor, the processor can realize a A method of character verification. The processor of the computer equipment is used to provide calculation and control capabilities, and supports the operation of the entire computer equipment. A computer readable instruction may be stored in the memory of the computer device, and when the computer readable instruction is executed by the processor, the processor may execute a character verification method. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art can understand that the structure shown in FIG. 9 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. The specific computer equipment may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
本实施方式中处理器用于执行图8中获取模块2100、处理模块2200、识别模块2300和执行模块2400的具体功能,存储器存储有执 行上述模块所需的程序代码和各类数据。网络接口用于向用户终端或服务器之间的数据传输。本实施方式中的存储器存储有人脸图像关键点检测装置中执行所有子模块所需的程序代码及数据,服务器能够调用服务器的程序代码及数据执行所有子模块的功能。In this embodiment, the processor is used to execute the specific functions of the acquisition module 2100, processing module 2200, identification module 2300, and execution module 2400 in FIG. 8, and the memory stores program codes and various data required to execute the above modules. The network interface is used for data transmission between user terminals or servers. The memory in this embodiment stores the program codes and data required to execute all the sub-modules in the human face image key point detection device, and the server can call the program codes and data of the server to execute the functions of all the sub-modules.
计算机设备在验证时同时向目标终端同时发送验证语句与验证字符,用户只有在正确的理解验证语句的语义提示后,才能够在验证字符中选择正确的字符完成验证。因此,图像识别技术也只有在理解了验证语句的语义后才能够在验证字符中进行选择验证,避免直接输入式的验证方式容易被图像识别技术破解的漏洞,提高了验证的安全性,保护网络资源能够被安全的使用。The computer device simultaneously sends the verification sentence and the verification character to the target terminal at the same time during verification, and the user can select the correct character from the verification character to complete the verification only after correctly understanding the semantic prompt of the verification sentence. Therefore, the image recognition technology can only select and verify the verification characters after understanding the semantics of the verification sentence, avoiding the vulnerability of the direct input verification method that is easy to be cracked by the image recognition technology, improving the security of verification, and protecting the network. Resources can be used safely.
本申请还提供一种存储有非易失性计算机可读指令的存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述任一实施例字符验证方法的步骤。The present application also provides a storage medium storing non-volatile computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the character verification method in any of the above embodiments. A step of.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a computer readable storage medium. When executed, it may include the processes of the above-mentioned method embodiments. Among them, the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowchart of the drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless explicitly stated in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least part of the steps in the flowchart of the drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the order of execution is also It is not necessarily performed sequentially, but may be performed alternately or alternately with other steps or at least a part of sub-steps or stages of other steps.

Claims (20)

  1. 一种字符验证方法,包括:A character verification method, including:
    接收目标终端发送的验证请求;Receive a verification request sent by the target terminal;
    根据所述验证请求在预设的语句数据库中随机抽取验证语句,其中,所述验证语句用于验证提示;Randomly extract verification sentences from a preset sentence database according to the verification request, wherein the verification sentences are used for verification prompts;
    识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符,其中,所述验证字符中至少有一个字符与所述验证方式具有映射关系;Identifying the semantics of the verification sentence and generating verification characters according to a verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode;
    将所述验证语句与所述验证字符发送至所述目标终端。Sending the verification sentence and the verification character to the target terminal.
  2. 根据权利要求1所述的字符验证方法,所述识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符包括:The character verification method according to claim 1, wherein the recognizing the semantics of the verification sentence and generating verification characters according to the verification mode represented by the semantics of the verification sentence comprises:
    调用所述验证语句并读取所述验证语句中的文字字段;Call the verification sentence and read the text field in the verification sentence;
    根据预设的转换方式将所述文字字段转换为数组矩阵;Converting the text field into an array matrix according to a preset conversion method;
    将所述数据矩阵输入至预设的语义识别模型中,其中,所述语义识别模型为预先训练至收敛状态用于对文字进行语义识别的神经网络模型;Inputting the data matrix into a preset semantic recognition model, where the semantic recognition model is a neural network model pre-trained to a convergent state for semantic recognition of text;
    根据所述语义识别模型输出的语义分类结果表征的验证方式,在预设的字符数据库中抽取所述验证字符。According to the verification mode represented by the semantic classification result output by the semantic recognition model, the verification character is extracted from a preset character database.
  3. 根据权利要求2所述的字符验证方法,所述验证方式为字形验证,所述根据所述语义识别模型输出的语义分类结果表征的验证方式,在预设的字符数据库中抽取所述验证字符之后,所述方法还包括:The character verification method according to claim 2, wherein the verification method is font verification, and the verification method characterized by the semantic classification result output by the semantic recognition model is extracted from a preset character database after the verification character , The method further includes:
    在所述验证字符中筛选至少一个形变字符;Screening at least one deformed character among the verification characters;
    根据所述验证方式表征的形变类型对所述至少一个形变字符进行形变处理以生成语义字符,其中,所述语义字符与所述验证语句具有映射关系;Performing a deformation process on the at least one deformed character according to the deformation type represented by the verification mode to generate a semantic character, wherein the semantic character has a mapping relationship with the verification sentence;
    将所述验证字符中的形变字符替换为所述语义字符。Replace the deformed character in the verification character with the semantic character.
  4. 根据权利要求3所述的字符验证方法,所述将所述验证语句与所述验证字符发送至所述目标终端包括:The character verification method according to claim 3, wherein the sending the verification sentence and the verification character to the target terminal comprises:
    在预设的图像数据库中筛选背景图像;Filter background images in a preset image database;
    将所述验证语句与所述验证字符覆盖在所述背景图像上生成验证图像,其中,所述验证字符中包括所述语义字符;Overlaying the verification sentence and the verification character on the background image to generate a verification image, wherein the verification character includes the semantic character;
    将所述验证图像发送至所述目标终端。Sending the verification image to the target terminal.
  5. 根据权利要求4所述的字符验证方法,所述将所述验证图像发 送至所述目标终端之后,所述方法还包括:The character verification method according to claim 4, after the sending the verification image to the target terminal, the method further comprises:
    在历史验证列表中查找所述目标终端的验证记录;Search for the verification record of the target terminal in the historical verification list;
    当所述目标终端的验证记录符合预设的第一验证条件时,向所述目标终端调用所述验证图像在验证页面中的截图画面;When the verification record of the target terminal meets the preset first verification condition, calling the target terminal a screenshot of the verification image in the verification page;
    将所述截图画面与所述验证图像输入至预设的验证判断模型中,其中,所述验证判断模型为预先训练至收敛状态,用于判断图像相似度的神经网络模型;Inputting the screenshot and the verification image into a preset verification judgment model, where the verification judgment model is a neural network model that is pre-trained to a convergent state and used to judge image similarity;
    根据所述验证判断模型输出的判断结果确认所述目标终端是否为虚拟验证。According to the judgment result output by the verification judgment model, it is confirmed whether the target terminal is a virtual verification.
  6. 根据权利要求3所述的字符验证方法,所述将所述验证语句与所述验证字符发送至所述目标终端之后,所述方法还包括:The character verification method according to claim 3, after the verification sentence and the verification character are sent to the target terminal, the method further comprises:
    获取所述目标终端上传的验证信息,其中,所述验证信息中包括用户根据所述验证语句在所述验证字符中筛选的用于验证的目标字符;Acquiring verification information uploaded by the target terminal, where the verification information includes target characters for verification that the user screened among the verification characters according to the verification sentence;
    将目标字符与所述语义字符进行比对,以判断所述目标字符与所述语义字符是否一致;Comparing the target character with the semantic character to determine whether the target character is consistent with the semantic character;
    当所述目标字符与所述语义字符一致时,确认所述目标终端通过验证。When the target character is consistent with the semantic character, it is confirmed that the target terminal passes the verification.
  7. 根据权利要求6所述的字符验证方法,所述将目标字符与所述语义字符进行比对,以判断所述目标字符与所述语义字符是否一致包括:The character verification method according to claim 6, wherein the comparing the target character with the semantic character to determine whether the target character is consistent with the semantic character comprises:
    计算所述目标字符与所述语义字符之间的汉明距离;Calculating the Hamming distance between the target character and the semantic character;
    当所述汉明距离为零时,确认所述目标字符与所述语义字符一致;否则,则确认所述目标字符与所述语义字符不一致。When the Hamming distance is zero, it is confirmed that the target character is consistent with the semantic character; otherwise, it is confirmed that the target character is inconsistent with the semantic character.
  8. 一种字符验证装置,包括:A character verification device includes:
    获取模块,用于接收目标终端发送的验证请求;The acquisition module is used to receive the verification request sent by the target terminal;
    处理模块,用于根据所述验证请求在预设的语句数据库中随机抽取验证语句,其中,所述验证语句用于验证提示;A processing module, configured to randomly extract verification sentences from a preset sentence database according to the verification request, wherein the verification sentences are used for verification prompts;
    识别模块,用于识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符,其中,所述验证字符中至少有一个字符与所述验证方式具有映射关系;A recognition module for recognizing the semantics of the verification sentence and generating verification characters according to the verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode;
    执行模块,用于将所述验证语句与所述验证字符发送至所述目标终端。The execution module is configured to send the verification sentence and the verification character to the target terminal.
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有 计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行上述所述字符验证方法的步骤,其中,所述字符验证方法的步骤包括:A computer device, comprising a memory and a processor, the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the processor executes the steps of the character verification method described above , Wherein the steps of the character verification method include:
    接收目标终端发送的验证请求;Receive a verification request sent by the target terminal;
    根据所述验证请求在预设的语句数据库中随机抽取验证语句,其中,所述验证语句用于验证提示;Randomly extract verification sentences from a preset sentence database according to the verification request, wherein the verification sentences are used for verification prompts;
    识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符,其中,所述验证字符中至少有一个字符与所述验证方式具有映射关系;Identifying the semantics of the verification sentence and generating verification characters according to a verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode;
    将所述验证语句与所述验证字符发送至所述目标终端。Sending the verification sentence and the verification character to the target terminal.
  10. 根据权利要求9所述的计算机设备,所述识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符包括:8. The computer device according to claim 9, wherein the recognizing the semantics of the verification sentence and generating verification characters according to a verification method characterized by the semantics of the verification sentence comprises:
    调用所述验证语句并读取所述验证语句中的文字字段;Call the verification sentence and read the text field in the verification sentence;
    根据预设的转换方式将所述文字字段转换为数组矩阵;Converting the text field into an array matrix according to a preset conversion method;
    将所述数据矩阵输入至预设的语义识别模型中,其中,所述语义识别模型为预先训练至收敛状态用于对文字进行语义识别的神经网络模型;Inputting the data matrix into a preset semantic recognition model, where the semantic recognition model is a neural network model pre-trained to a convergent state for semantic recognition of text;
    根据所述语义识别模型输出的语义分类结果表征的验证方式,在预设的字符数据库中抽取所述验证字符。According to the verification mode represented by the semantic classification result output by the semantic recognition model, the verification character is extracted from a preset character database.
  11. 根据权利要求10所述的计算机设备,所述验证方式为字形验证,所述根据所述语义识别模型输出的语义分类结果表征的验证方式,在预设的字符数据库中抽取所述验证字符之后,所述方法还包括:The computer device according to claim 10, wherein the verification method is character shape verification, and the verification method characterized by the semantic classification result output by the semantic recognition model is extracted from a preset character database after the verification character is extracted, The method also includes:
    在所述验证字符中筛选至少一个形变字符;Screening at least one deformed character among the verification characters;
    根据所述验证方式表征的形变类型对所述至少一个形变字符进行形变处理以生成语义字符,其中,所述语义字符与所述验证语句具有映射关系;Performing a deformation process on the at least one deformed character according to the deformation type represented by the verification mode to generate a semantic character, wherein the semantic character has a mapping relationship with the verification sentence;
    将所述验证字符中的形变字符替换为所述语义字符。Replace the deformed character in the verification character with the semantic character.
  12. 根据权利要求11所述的计算机设备,所述将所述验证语句与所述验证字符发送至所述目标终端包括:The computer device according to claim 11, wherein the sending the verification sentence and the verification character to the target terminal comprises:
    在预设的图像数据库中筛选背景图像;Filter background images in a preset image database;
    将所述验证语句与所述验证字符覆盖在所述背景图像上生成验证图像,其中,所述验证字符中包括所述语义字符;Overlaying the verification sentence and the verification character on the background image to generate a verification image, wherein the verification character includes the semantic character;
    将所述验证图像发送至所述目标终端。Sending the verification image to the target terminal.
  13. 根据权利要求12所述的计算机设备,所述将所述验证图像发送至所述目标终端之后,所述方法还包括:The computer device according to claim 12, after the sending the verification image to the target terminal, the method further comprises:
    在历史验证列表中查找所述目标终端的验证记录;Search for the verification record of the target terminal in the historical verification list;
    当所述目标终端的验证记录符合预设的第一验证条件时,向所述目标终端调用所述验证图像在验证页面中的截图画面;When the verification record of the target terminal meets the preset first verification condition, calling the target terminal a screenshot of the verification image in the verification page;
    将所述截图画面与所述验证图像输入至预设的验证判断模型中,其中,所述验证判断模型为预先训练至收敛状态,用于判断图像相似度的神经网络模型;Inputting the screenshot and the verification image into a preset verification judgment model, where the verification judgment model is a neural network model that is pre-trained to a convergent state and used to judge image similarity;
    根据所述验证判断模型输出的判断结果确认所述目标终端是否为虚拟验证。According to the judgment result output by the verification judgment model, it is confirmed whether the target terminal is a virtual verification.
  14. 根据权利要求11所述的计算机设备,所述将所述验证语句与所述验证字符发送至所述目标终端之后,所述方法还包括:The computer device according to claim 11, after the sending the verification sentence and the verification character to the target terminal, the method further comprises:
    获取所述目标终端上传的验证信息,其中,所述验证信息中包括用户根据所述验证语句在所述验证字符中筛选的用于验证的目标字符;Acquiring verification information uploaded by the target terminal, where the verification information includes target characters for verification that the user screened among the verification characters according to the verification sentence;
    将目标字符与所述语义字符进行比对,以判断所述目标字符与所述语义字符是否一致;Comparing the target character with the semantic character to determine whether the target character is consistent with the semantic character;
    当所述目标字符与所述语义字符一致时,确认所述目标终端通过验证。When the target character is consistent with the semantic character, it is confirmed that the target terminal passes the verification.
  15. 一种存储有非易失性计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如上述所述字符验证方法的步骤,其中,所述字符验证方法的步骤包括:A storage medium storing non-volatile computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the character verification method described above, Wherein, the steps of the character verification method include:
    接收目标终端发送的验证请求;Receive a verification request sent by the target terminal;
    根据所述验证请求在预设的语句数据库中随机抽取验证语句,其中,所述验证语句用于验证提示;Randomly extract verification sentences from a preset sentence database according to the verification request, wherein the verification sentences are used for verification prompts;
    识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符,其中,所述验证字符中至少有一个字符与所述验证方式具有映射关系;Identifying the semantics of the verification sentence and generating verification characters according to a verification mode represented by the semantics of the verification sentence, wherein at least one character in the verification character has a mapping relationship with the verification mode;
    将所述验证语句与所述验证字符发送至所述目标终端。Sending the verification sentence and the verification character to the target terminal.
  16. 根据权利要求15所述的非易失性计算机可读指令的存储介质,所述识别所述验证语句的语义并根据所述验证语句的语义所表征的验证方式生成验证字符包括:The non-volatile computer-readable instruction storage medium according to claim 15, wherein the recognizing the semantics of the verification sentence and generating verification characters according to a verification method characterized by the semantics of the verification sentence comprises:
    调用所述验证语句并读取所述验证语句中的文字字段;Call the verification sentence and read the text field in the verification sentence;
    根据预设的转换方式将所述文字字段转换为数组矩阵;Converting the text field into an array matrix according to a preset conversion method;
    将所述数据矩阵输入至预设的语义识别模型中,其中,所述语义识别模型为预先训练至收敛状态用于对文字进行语义识别的神经网络模型;Inputting the data matrix into a preset semantic recognition model, where the semantic recognition model is a neural network model pre-trained to a convergent state for semantic recognition of text;
    根据所述语义识别模型输出的语义分类结果表征的验证方式,在预设的字符数据库中抽取所述验证字符。According to the verification mode represented by the semantic classification result output by the semantic recognition model, the verification character is extracted from a preset character database.
  17. 根据权利要求15所述的计算机设备,所述验证方式为字形验证,所述根据所述语义识别模型输出的语义分类结果表征的验证方式,在预设的字符数据库中抽取所述验证字符之后,所述方法还包括:The computer device according to claim 15, wherein the verification method is character shape verification, and the verification method characterized by the semantic classification result output by the semantic recognition model is extracted from a preset character database after the verification character is extracted, The method also includes:
    在所述验证字符中筛选至少一个形变字符;Screening at least one deformed character among the verification characters;
    根据所述验证方式表征的形变类型对所述至少一个形变字符进行形变处理以生成语义字符,其中,所述语义字符与所述验证语句具有映射关系;Performing a deformation process on the at least one deformed character according to the deformation type represented by the verification mode to generate a semantic character, wherein the semantic character has a mapping relationship with the verification sentence;
    将所述验证字符中的形变字符替换为所述语义字符。Replace the deformed character in the verification character with the semantic character.
  18. 根据权利要求17所述的计算机设备,所述将所述验证语句与所述验证字符发送至所述目标终端包括:The computer device according to claim 17, wherein the sending the verification sentence and the verification character to the target terminal comprises:
    在预设的图像数据库中筛选背景图像;Filter background images in a preset image database;
    将所述验证语句与所述验证字符覆盖在所述背景图像上生成验证图像,其中,所述验证字符中包括所述语义字符;Overlaying the verification sentence and the verification character on the background image to generate a verification image, wherein the verification character includes the semantic character;
    将所述验证图像发送至所述目标终端。Sending the verification image to the target terminal.
  19. 根据权利要求18所述的计算机设备,所述将所述验证图像发送至所述目标终端之后,所述方法还包括:The computer device according to claim 18, after the sending the verification image to the target terminal, the method further comprises:
    在历史验证列表中查找所述目标终端的验证记录;Search for the verification record of the target terminal in the historical verification list;
    当所述目标终端的验证记录符合预设的第一验证条件时,向所述目标终端调用所述验证图像在验证页面中的截图画面;When the verification record of the target terminal meets the preset first verification condition, calling the target terminal a screenshot of the verification image in the verification page;
    将所述截图画面与所述验证图像输入至预设的验证判断模型中,其中,所述验证判断模型为预先训练至收敛状态,用于判断图像相似度的神经网络模型;Inputting the screenshot and the verification image into a preset verification judgment model, where the verification judgment model is a neural network model that is pre-trained to a convergent state and used to judge image similarity;
    根据所述验证判断模型输出的判断结果确认所述目标终端是否为虚拟验证。According to the judgment result output by the verification judgment model, it is confirmed whether the target terminal is a virtual verification.
  20. 根据权利要求17所述的计算机设备,所述将所述验证语句与所述验证字符发送至所述目标终端之后,所述方法还包括:The computer device according to claim 17, after the sending the verification sentence and the verification character to the target terminal, the method further comprises:
    获取所述目标终端上传的验证信息,其中,所述验证信息中包括用户根据所述验证语句在所述验证字符中筛选的用于验证的目标字 符;Acquiring verification information uploaded by the target terminal, where the verification information includes target characters for verification that are selected by the user according to the verification sentence among the verification characters;
    将目标字符与所述语义字符进行比对,以判断所述目标字符与所述语义字符是否一致;Comparing the target character with the semantic character to determine whether the target character is consistent with the semantic character;
    当所述目标字符与所述语义字符一致时,确认所述目标终端通过验证。When the target character is consistent with the semantic character, it is confirmed that the target terminal passes the verification.
PCT/CN2019/103061 2019-07-03 2019-08-28 Character verification method and apparatus, and computer device and storage medium WO2021000407A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910601303.1 2019-07-03
CN201910601303.1A CN110351094B (en) 2019-07-03 2019-07-03 Character verification method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021000407A1 true WO2021000407A1 (en) 2021-01-07

Family

ID=68177523

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/103061 WO2021000407A1 (en) 2019-07-03 2019-08-28 Character verification method and apparatus, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN110351094B (en)
WO (1) WO2021000407A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114726595A (en) * 2022-03-24 2022-07-08 中科吉芯(昆山)信息科技有限公司 Method for authenticating man-machine identity by using space-time information
CN116561733A (en) * 2023-05-29 2023-08-08 北京百度网讯科技有限公司 Verification method and device based on picture verification code

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699348A (en) * 2020-12-25 2021-04-23 中国平安人寿保险股份有限公司 Method and device for verifying nuclear body information, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197678A (en) * 2007-12-27 2008-06-11 腾讯科技(深圳)有限公司 Picture identifying code generation method and generation device
US20150186662A1 (en) * 2013-12-13 2015-07-02 Baidu Online Network Technology (Beijing) Co., Ltd Method and apparatus for input verification
CN106330439A (en) * 2016-10-25 2017-01-11 先锋智道(北京)科技有限公司 Verification code generating method, generating device and generating system
CN108154148A (en) * 2018-01-22 2018-06-12 厦门美亚商鼎信息科技有限公司 The artificial synthesis of training sample and the method for recognizing verification code based on the sample
CN109033798A (en) * 2018-09-14 2018-12-18 北京金堤科技有限公司 One kind is semantic-based to click method for recognizing verification code and its device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102006163B (en) * 2009-09-01 2014-04-23 阿里巴巴集团控股有限公司 User authentication method, device and server
CN101923702B (en) * 2010-08-25 2012-02-01 郝红卫 Image valid code generating method
CN102710607A (en) * 2012-05-10 2012-10-03 北京像素软件科技股份有限公司 Security verification method based on graphic marker
CN104852885B (en) * 2014-02-14 2021-10-29 腾讯科技(深圳)有限公司 Method, device and system for verifying verification code
CN104915664B (en) * 2015-05-22 2021-02-09 腾讯科技(深圳)有限公司 Contact object identifier obtaining method and device
CN106572049B (en) * 2015-10-09 2019-08-27 腾讯科技(深圳)有限公司 A kind of auth method and device
CN107360137A (en) * 2017-06-15 2017-11-17 深圳市牛鼎丰科技有限公司 Construction method and device for the neural network model of identifying code identification
CN109284584B (en) * 2017-07-21 2021-03-02 北京京东尚科信息技术有限公司 Verification method and device
CN109272043B (en) * 2018-09-21 2021-03-30 京东数字科技控股有限公司 Training data generation method and system for optical character recognition and electronic equipment
CN109858542B (en) * 2019-01-25 2021-03-19 广州云测信息技术有限公司 Character recognition method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197678A (en) * 2007-12-27 2008-06-11 腾讯科技(深圳)有限公司 Picture identifying code generation method and generation device
US20150186662A1 (en) * 2013-12-13 2015-07-02 Baidu Online Network Technology (Beijing) Co., Ltd Method and apparatus for input verification
CN106330439A (en) * 2016-10-25 2017-01-11 先锋智道(北京)科技有限公司 Verification code generating method, generating device and generating system
CN108154148A (en) * 2018-01-22 2018-06-12 厦门美亚商鼎信息科技有限公司 The artificial synthesis of training sample and the method for recognizing verification code based on the sample
CN109033798A (en) * 2018-09-14 2018-12-18 北京金堤科技有限公司 One kind is semantic-based to click method for recognizing verification code and its device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114726595A (en) * 2022-03-24 2022-07-08 中科吉芯(昆山)信息科技有限公司 Method for authenticating man-machine identity by using space-time information
CN114726595B (en) * 2022-03-24 2023-09-29 中科吉芯(昆山)信息科技有限公司 Method for authenticating identity of man-machine by using space-time information
CN116561733A (en) * 2023-05-29 2023-08-08 北京百度网讯科技有限公司 Verification method and device based on picture verification code

Also Published As

Publication number Publication date
CN110351094B (en) 2024-03-15
CN110351094A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
US10832069B2 (en) Living body detection method, electronic device and computer readable medium
WO2020258668A1 (en) Facial image generation method and apparatus based on adversarial network model, and nonvolatile readable storage medium and computer device
CN109409204B (en) Anti-counterfeiting detection method and device, electronic equipment and storage medium
EP3477519A1 (en) Identity authentication method, terminal device, and computer-readable storage medium
CN111241291B (en) Method and device for generating countermeasure sample by utilizing countermeasure generation network
CN112819686B (en) Image style processing method and device based on artificial intelligence and electronic equipment
WO2021000407A1 (en) Character verification method and apparatus, and computer device and storage medium
CN111767228B (en) Interface testing method, device, equipment and medium based on artificial intelligence
WO2016172872A1 (en) Method and device for verifying real human face, and computer program product
CN112395979B (en) Image-based health state identification method, device, equipment and storage medium
WO2023050650A1 (en) Animation video generation method and apparatus, and device and storage medium
CN107977665A (en) The recognition methods of key message and computing device in a kind of invoice
WO2022022493A1 (en) Image authenticity determination method and system
WO2022188697A1 (en) Biological feature extraction method and apparatus, device, medium, and program product
CN111428557A (en) Method and device for automatically checking handwritten signature based on neural network model
WO2021042505A1 (en) Note generation method and apparatus based on character recognition technology, and computer device
WO2020019591A1 (en) Method and device used for generating information
CN109389098B (en) Verification method and system based on lip language identification
CN109462603A (en) Voiceprint authentication method, equipment, storage medium and device based on blind Detecting
CN109271915A (en) False-proof detection method and device, electronic equipment, storage medium
WO2021007857A1 (en) Identity authentication method, terminal device, and storage medium
CN113762303B (en) Image classification method, device, electronic equipment and storage medium
WO2023173686A1 (en) Detection method and apparatus, electronic device, and storage medium
CN114616565A (en) Living body detection using audio-visual disparity
WO2022126917A1 (en) Deep learning-based face image evaluation method and apparatus, device, and medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19936375

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 24/02/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19936375

Country of ref document: EP

Kind code of ref document: A1