CN111737548A - Click verification code identification method and device, computer equipment and storage medium - Google Patents

Click verification code identification method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111737548A
CN111737548A CN202010374481.8A CN202010374481A CN111737548A CN 111737548 A CN111737548 A CN 111737548A CN 202010374481 A CN202010374481 A CN 202010374481A CN 111737548 A CN111737548 A CN 111737548A
Authority
CN
China
Prior art keywords
character
verification code
model
characters
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010374481.8A
Other languages
Chinese (zh)
Inventor
褚哲
王元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suning Financial Technology Nanjing Co Ltd
Original Assignee
Suning Financial Technology Nanjing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suning Financial Technology Nanjing Co Ltd filed Critical Suning Financial Technology Nanjing Co Ltd
Priority to CN202010374481.8A priority Critical patent/CN111737548A/en
Publication of CN111737548A publication Critical patent/CN111737548A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/36User authentication by graphic or iconic representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Character Discrimination (AREA)

Abstract

The application relates to a click verification code identification method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring a verification code picture; performing character recognition on the verification code picture through a character recognition model to obtain a plurality of target characters; determining a plurality of word ranks of the plurality of target words according to the plurality of target words; carrying out probability statistics on the character sequencing according to a preset language statistical model to obtain a probability value of each character sequencing; and screening out the character sequence with the maximum probability value from the character sequences, and taking the screened character sequence as the semantic recognition result of the verification code picture. By adopting the method, the detection of the multi-class target characters can be realized, the probability value of the character sequencing combination in a short time is calculated, and the character detection and identification of the verification code are fast and efficient.

Description

Click verification code identification method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of image recognition technologies, and in particular, to a method and an apparatus for identifying a click verification code, a computer device, and a storage medium.
Background
With the development of big data and artificial intelligence, more and more enterprises need big data to support business development of the enterprises. The existence of data barriers makes the acquisition of big data become a bottleneck for the further development of many small and medium-sized enterprises. Currently, one of the main sources of big data is relying on web crawlers for data collection. In the acquisition process of the web crawler, a data source website is frequently subjected to back-crawling in a verification code mode, so that the data acquisition efficiency is greatly limited. The picture verification code is commonly found in a web search or login interface, and is classified according to the operation mode of a user, and mainly includes an input type verification code, a drag type verification code, and a click type (or touch type) verification code. Compared with the traditional verification code, the verification code is clicked and relatively difficult to be identified by an automation tool, and the method has the characteristic of high safety. In addition, due to the simple operation and the good user experience, clicking the verification code has gradually become the first choice of many websites. For data collection personnel, data sources adopting click verification codes are inevitably encountered in data crawling, and an accurate and efficient verification code identification algorithm becomes an essential tool for data collection work.
However, the conventional target recognition method cannot quickly complete multi-class target detection, and in the aspect of word semantic sorting, the conventional method generally performs query matching through a short text library, and a huge short text corpus needs to be maintained, which causes inconvenience.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a click verification code identification method, apparatus, computer device and storage medium capable of quickly implementing character detection identification and sorting.
A click verification code identification method, the method comprising:
acquiring a verification code picture;
performing character recognition on the verification code picture through a character recognition model to obtain a plurality of target characters;
determining a plurality of character sequences of the plurality of target characters according to the plurality of target characters;
carrying out probability statistics on the character sequencing according to a preset language statistical model to obtain the probability value of each character sequencing;
and screening out the character sequence with the maximum probability value from the character sequences, and taking the screened character sequence as a semantic recognition result of the verification code picture.
In one embodiment, further comprising:
performing frequency statistics on each character in the corpus and performing frequency statistics on every two continuously appearing characters in the corpus to obtain a first frequency statistical result;
and obtaining a language statistical model according to the first frequency statistical result.
In one embodiment, further comprising:
performing frequency statistics on every two continuously appearing characters in the corpus and performing frequency statistics on every three continuously appearing characters in the corpus to obtain a second frequency statistical result;
and obtaining a language statistical model according to the second frequency statistical result.
In one embodiment, the performing probability statistics on the word ranks according to the preset language statistical model to obtain the probability value of each word rank includes:
performing word segmentation processing on each character sequence to obtain word segmentation phrases of each character sequence;
determining the conditional probability value of the word segmentation word group ordered by each character according to the word segmentation word group and the language statistical model;
and respectively solving the conditional probability value product of the word segmentation word group of each character sequence to obtain the probability value of the character sequence.
In one embodiment, the above-mentioned performing word segmentation processing on each character sequence to obtain a word segmentation phrase of each character sequence includes:
if the language statistical model is obtained according to the first frequency statistical result, taking every two continuous characters in each character sequence as a participle phrase to obtain the participle phrase of each character sequence;
and if the language statistical model is obtained according to the second frequency statistical result, taking every three continuous characters in each character sequence as a participle phrase to obtain the participle phrase of each character sequence.
In one embodiment, the method further comprises the following steps:
carrying out character position recognition on the verification code picture through a character recognition model to obtain position information of a plurality of target characters;
and taking the semantic recognition result of the verification code picture and the position information of the plurality of target characters as the verification code recognition result of the verification code picture.
In one embodiment, the method further comprises the following steps:
pre-training the initial YOLO model through a simulation sample to obtain a pre-training model;
and carrying out fine tuning training on the pre-training model through the real sample to obtain a character recognition model.
In one embodiment, before the pre-training the initial YOLO model through the simulation samples to obtain the pre-trained model, the method further includes:
obtaining a character library;
an initial YOLO model is obtained from the corpus.
In one embodiment, the method further comprises:
acquiring a background picture;
selecting sample characters from a character library;
and attaching the sample characters to the background picture to obtain a simulation sample.
In one embodiment, the method further comprises the following steps:
selecting an adjusting mode of the sample character, wherein the adjusting mode comprises one or more of setting a font, reducing the character, amplifying the character, rotating the character and blurring the character edge;
adjusting the sample character according to the selected adjusting mode;
attaching sample characters to the background picture to obtain a simulated sample, comprising: and attaching the adjusted sample characters to the background picture to obtain a simulation sample.
A click verification code identification apparatus, the apparatus comprising:
the acquisition module is used for acquiring a verification code picture;
the character recognition module is used for carrying out character recognition on the verification code picture through the character recognition model to obtain a plurality of target characters;
the sequencing module is used for determining the sequencing of a plurality of characters of the target characters according to the target characters;
the probability statistics module is used for carrying out probability statistics on the character sequencing according to a preset language statistics model to obtain the probability value of each character sequencing;
and the screening module is used for screening out the character sequence with the maximum probability value from all the character sequences, and taking the screened character sequence as the semantic recognition result of the verification code picture.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a verification code picture;
performing character recognition on the verification code picture through a character recognition model to obtain a plurality of target characters;
determining a plurality of character sequences of the plurality of target characters according to the plurality of target characters;
carrying out probability statistics on the character sequencing according to a preset language statistical model to obtain the probability value of each character sequencing;
and screening out the character sequence with the maximum probability value from the character sequences, and taking the screened character sequence as a semantic recognition result of the verification code picture.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a verification code picture;
performing character recognition on the verification code picture through a character recognition model to obtain a plurality of target characters;
determining a plurality of character sequences of the plurality of target characters according to the plurality of target characters;
carrying out probability statistics on the character sequencing according to a preset language statistical model to obtain the probability value of each character sequencing;
and screening out the character sequence with the maximum probability value from the character sequences, and taking the screened character sequence as a semantic recognition result of the verification code picture.
According to the click verification code identification method, the click verification code identification device, the computer equipment and the storage medium, the verification code picture is subjected to character identification through the preset character identification model to obtain a plurality of target characters, and multi-category target detection is realized; the probability statistics is carried out on the word sequencing through the preset language statistical model, the word sequencing with the maximum probability value is selected as a semantic recognition result, the traditional scheme of inquiring and matching through a short text library is abandoned, the difficulty of maintaining a huge short text corpus is avoided, the overall probability value calculation of the fast word sequencing is realized, the identifying efficiency of the identifying code can be improved, and the click identifying code identifying method is applied to the collecting process of the web crawler, so that the collecting efficiency of data can be improved.
Drawings
FIG. 1 is a diagram of an exemplary implementation of a click verification code identification method;
FIG. 2 is a flow diagram illustrating a method for identifying a click verification code in one embodiment;
FIG. 3 is a schematic flow chart illustrating the probability statistics step for text sorting in one embodiment;
FIG. 4 is a partial flow diagram of a method for identifying a click verification code in accordance with another embodiment;
FIG. 5 is a partial flow diagram of a method for identifying a click verification code in accordance with another embodiment;
FIG. 6 is a partial flow diagram of a method for identifying a click validation code in accordance with another embodiment;
FIG. 7 is a block diagram of an embodiment of a device for identifying a click verification code;
FIG. 8 is a block diagram illustrating a detailed structure of the probability statistics module in one embodiment;
FIG. 9 is a block diagram showing a part of the structure of a click verification code recognition apparatus in another embodiment;
FIG. 10 is a block diagram showing a part of the structure of a click verification code recognition apparatus in another embodiment;
FIG. 11 is a block diagram showing a part of the structure of a click verification code recognition apparatus in another embodiment;
FIG. 12 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The click verification code identification method provided by the invention can be applied to the terminal shown in figure 1. The terminal comprises a processor, a nonvolatile storage medium, a network interface, an internal memory and an input device which are connected through a system bus. The non-volatile storage medium of the terminal stores an operating system and further comprises a click verification code identification device, and the click verification code identification device of the terminal is used for realizing a click verification code identification method. The processor is used for providing calculation and control capability and supporting the operation of the whole terminal. The internal memory in the terminal provides an environment for the operation of the touch operation control device in the nonvolatile storage medium, and the network interface is used for communicating with the server or other terminals, for example, when the terminal responds to a click operation, a control command can be generated and sent to the server or other terminals. Specifically, a click verification code recognition device of the terminal performs character recognition on a verification code picture through a character recognition model to obtain target characters; determining character sequencing according to the target characters; and obtaining the probability value of each character sequence through a language statistical model, and screening out the character sequence with the maximum probability value as a semantic recognition result of the verification code picture. Among them, the terminal may not be limited to various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. It should be noted that fig. 1 is only an application example of the click verification code identification method of the present invention. The click verification code identification method can also be applied to a server. The server may be implemented as a stand-alone server or as a server cluster of multiple servers.
In an embodiment, as shown in fig. 2, a method for identifying a click verification code is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
step 202, obtaining a verification code picture.
The verification code picture in the method is a click-type verification code picture.
And 204, performing character recognition on the verification code picture through a character recognition model to obtain a plurality of target characters.
The character recognition model is a preset model.
Specifically, the terminal inputs the obtained verification code picture into the character recognition model, and the character recognition model performs character recognition on the verification code picture and outputs a plurality of target characters.
Step 206, determining a plurality of character sequences of the plurality of target characters according to the plurality of target characters.
Specifically, the terminal sorts a plurality of target characters output by the character recognition model to obtain all possible character sorts. For example, for the case of 4 target words of different classes, there may be
Figure BDA0002479421200000061
And (5) sorting the characters.
And 208, carrying out probability statistics on the character sequencing according to a preset language statistical model to obtain the probability value of each character sequencing.
Specifically, the terminal inputs the obtained character sequence into a preset language statistical model, and the model calculates and outputs a probability value of the character sequence.
And step 210, screening out the character sequence with the maximum probability value from the character sequences, and taking the screened character sequence as a semantic recognition result of the verification code picture.
Specifically, the terminal screens out the character sequence with the maximum probability value according to the probability value result output by the language statistical model, and the character sequence is used as the semantic recognition result of the verification code picture.
In the click verification code identification method, the terminal performs character identification on the verification code picture through a preset character identification model to obtain a plurality of target characters, so that multi-category target detection is realized; probability statistics is carried out on the word sequencing through a preset language statistical model, and the word sequencing with the maximum probability value is screened out to serve as a semantic recognition result, so that the traditional scheme of inquiring and matching through a short text library is avoided, the speed of identifying the verification code is increased, and the efficiency of identifying the verification code is improved.
In one embodiment, the method further comprises: performing frequency statistics on each character in the corpus and performing frequency statistics on every two continuously appearing characters in the corpus to obtain a first frequency statistical result; and obtaining a language statistical model according to the first frequency statistical result.
The corpus is preset, and in one embodiment, a larger-scale corpus can be selected, for example, a news corpus or an encyclopedia corpus can be selected.
Specifically, the terminal performs word frequency statistics on the selected corpus, may store the word frequency statistics result in local data, and obtains a language statistics model according to the word frequency statistics result. For example, in one embodiment, the frequency statistics may be stored as a local dictionary.
In one embodiment, the method further comprises: performing frequency statistics on every two continuously appearing characters in the corpus and performing frequency statistics on every three continuously appearing characters in the corpus to obtain a second frequency statistical result; and obtaining a language statistical model according to the second frequency statistical result.
In the scheme of the embodiment, the frequency statistical result is directly used when the language statistical model runs, so that the model running time is reduced, and the identifying efficiency of the identifying code is improved.
In an embodiment, the performing probability statistics on the word ranks according to the preset language statistical model to obtain the probability value of each word rank may include the following steps, as shown in fig. 3:
step 302, performing word segmentation processing on each character sequence to obtain word segmentation phrases of each character sequence.
Specifically, the terminal takes a plurality of continuous characters in the character sequence as a word segmentation phrase according to the sequence of the continuous characters in the character sequence. In one embodiment, the terminal may select two characters consecutively arranged in the character sequence, and keep their arrangement order unchanged, and use them as a word segmentation phrase, for example, if the character sequence is "perfect sense", the terminal may use "perfect", "beautiful" and "ambiguous" as a word segmentation phrase. In another embodiment, the terminal may use every three consecutive characters in each character sequence as a word segmentation phrase to obtain the word segmentation phrase of each character sequence, for example, if the character sequence is "perfect sense", the terminal may use "perfect main" or "aesthetic sense" as the word segmentation phrase.
And step 304, determining the conditional probability value of the word segmentation phrase of each character sequence according to the word segmentation phrase and the language statistical model.
Specifically, the conditional probability value of the word segmentation phrase is determined according to a language statistical model, especially according to the frequency statistical result. In one embodiment, the terminal may determine the conditional probability value of the word segmentation phrase according to the number of times that the word segmentation phrase appears in the corpus and the number of times that other characters except the last character appear in the corpus according to the arrangement sequence of the other characters in the word segmentation phrase. For example, if the word order is "perfect sense" and "perfect master" is a word segmentation phrase, the terminal may obtain the number of times that "perfect master" appears in the corpus and the number of times that "perfect" appears in the corpus according to the language statistical model, or may calculate the number of times that "perfect master" appears in the corpus divided by the number of times that "perfect" appears in the corpus, and use the obtained calculated value as the conditional probability value of the word segmentation phrase "perfect master".
Step 306, respectively obtaining the conditional probability value product of the word segmentation word group of each character sequence to obtain the probability value of the character sequence.
Specifically, the terminal obtains the conditional probability values of all the word-segmentation word groups determined in step 302 in step 304, and multiplies the conditional probability values by each other to obtain a probability value of the text ordering. For example, in one embodiment, if the word rank is "perfect sense", all the participle phrases of the word rank are determined as "perfect", "beauty", and "meaning" in step 302, the conditional probability value of each participle phrase is obtained in step 304, and the terminal may multiply the conditional probability values of "perfect", "beauty", and "meaning" to obtain the probability value of "perfect sense" of the word rank.
In the scheme of the embodiment, word segmentation processing is performed on the target word sequence, and then the probability value of the target word sequence is obtained according to the word frequency statistical result based on the corpus, so that the traditional scheme of querying and matching through a short text library is abandoned, and the difficulty in maintaining a huge short text corpus is also avoided.
In one embodiment, the method further comprises: carrying out character position recognition on the verification code picture through a character recognition model to obtain position information of a plurality of target characters; and taking the semantic recognition result of the verification code picture and the position information of the plurality of target characters as the verification code recognition result of the verification code picture.
Specifically, the character recognition model performs position recognition on characters in the verification code picture, and outputs information about the positions of the characters, wherein the character position information and the verification code semantic recognition result are used as the verification code recognition result of the verification code picture.
In the scheme of this embodiment, the target text and the position information thereof are output, i.e., a complete method path is provided for breaking the click verification code.
In one embodiment, as shown in fig. 4, the method further comprises:
step 402: and pre-training the initial YOLO model through a simulation sample to obtain a pre-training model.
The simulation sample is obtained in advance, and the initial YOLO model is a preset target detection model.
Step 404: and carrying out fine tuning training on the pre-training model through the real sample to obtain a character recognition model.
Wherein, the real sample is obtained in advance.
In one embodiment, before the pre-training the initial YOLO model through the simulation samples to obtain the pre-trained model, the method further includes: obtaining a character library; an initial YOLO model is obtained from the corpus.
Wherein, the character library comprises different character types.
Specifically, the terminal determines different classes of characters in the character library as one class, and obtains an initial YOLO model according to the classes. In one embodiment, 3500 common Chinese characters in the first-level character table of the general standard Chinese character table can be used as a character library, and the initial YOLO model can be determined according to the 3500 common Chinese characters.
In the scheme of the embodiment, the YOLO target detection model is adopted, so that not only is high-precision target detection ensured, but also the detection and identification speed is greatly increased compared with the traditional two-stage target detection algorithm. In addition, model training is carried out by adopting a simulation sample and a real sample, and the Chinese character detection and identification at one stage from end to end in a higher category number are realized.
In one embodiment, as shown in fig. 5, the method further comprises:
step 502: and acquiring a background picture.
The background picture can be randomly selected by the terminal, can be pictures with various styles and styles, and does not contain character information.
Step 504: sample characters are selected from a corpus of characters.
Step 506: and attaching the sample characters to the background picture to obtain a simulation sample.
In the scheme of the embodiment, the terminal generates the simulation sample based on the algorithm for the initial YOLO model to pre-train, so that the labor cost is saved compared with the traditional method for manually marking data, a large number of samples can be generated for model pre-training, the training efficiency is improved, and the training result is optimized.
In one embodiment, as shown in fig. 6, the method further comprises:
step 602: and acquiring a background picture.
Step 604: sample characters are selected from a corpus of characters.
Step 606: selecting an adjusting mode of the sample character, wherein the adjusting mode comprises one or more of setting a font, reducing the character, amplifying the character, rotating the character and blurring the character edge.
Step 608: and adjusting the sample character according to the selected adjusting mode.
Step 610: and attaching the adjusted sample characters to the background picture to obtain a simulation sample.
Specifically, after the terminal selects the sample character, the sample character can be adjusted in the above various ways, so that various analog samples can be obtained.
It should be understood that although the various steps in the flow charts of fig. 2-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 7, there is provided a click verification code recognition apparatus including: a first obtaining module 702, a word recognition module 704, a ranking module 706, a probability statistics module 708, and a screening module 710, wherein:
a first obtaining module 702, configured to obtain a verification code picture;
the character recognition module 704 is used for performing character recognition on the verification code picture through a character recognition model to obtain a plurality of target characters;
a sorting module 706, configured to determine, according to the multiple target words, a multiple word sorting of the multiple target words;
a probability statistics module 708, configured to perform probability statistics on the word ranks according to a preset language statistics model to obtain probability values of the word ranks;
and the screening module 710 is configured to screen out a text sequence with the highest probability value from the text sequences, and use the screened text sequence as a semantic identification result of the verification code picture.
In one embodiment, the apparatus further comprises:
a first frequency statistics module (not shown in the figure) for performing frequency statistics on each character in the corpus and performing frequency statistics on each two characters continuously appearing in the corpus to obtain a first frequency statistics result;
and the first building module (not shown in the figure) is used for obtaining the language statistical model according to the first frequency statistical result.
In one embodiment, the apparatus further comprises:
a second frequency statistics module (not shown in the figure) for performing frequency statistics on every two continuous characters in the corpus and performing frequency statistics on every three continuous characters in the corpus to obtain a second frequency statistics result;
and a second building module (not shown in the figure) for obtaining the language statistical model according to the second frequency statistical result.
In one embodiment, as shown in FIG. 8, the probability statistics module 708 may include:
a first word segmentation unit 802, configured to perform word segmentation processing on each character sequence to obtain a word segmentation phrase of each character sequence;
a first determining unit 804, configured to determine a conditional probability value of a word segmentation phrase of each text sequence according to the word segmentation phrase and the language statistical model;
the calculating unit 806 is configured to separately obtain conditional probability value products of the word-segmentation phrases sorted by each character to obtain probability values of the character sorting.
In one embodiment, the first segmentation unit 802 may include:
and a second word segmentation unit (not shown in the figure) for taking every two continuous characters in each character sequence as a word segmentation phrase to obtain the word segmentation phrase of each character sequence under the condition that the language statistical model is obtained according to the first frequency statistical result.
In one embodiment, the first segmentation unit 802 may include:
and a third word segmentation unit (not shown in the figure) for taking every three consecutive characters in each character sequence as a word segmentation phrase to obtain the word segmentation phrase of each character sequence under the condition that the language statistical model is obtained according to the second frequency statistical result.
In one embodiment, the apparatus further comprises:
a position identification module (not shown in the figure) for performing character position identification on the verification code picture through a character identification model to obtain position information of a plurality of target characters;
and an output module (not shown in the figure) for taking the semantic recognition result of the verification code picture and the position information of the plurality of target characters as the verification code recognition result of the verification code picture.
In one embodiment, as shown in fig. 9, the apparatus further comprises:
a pre-training module 902, configured to pre-train the initial YOLO model through a simulation sample to obtain a pre-training model;
and the fine tuning training module 904 is configured to perform fine tuning training on the pre-training model through the real sample to obtain a character recognition model.
In one embodiment, the apparatus further comprises:
a second obtaining module (not shown in the figure) for obtaining the character library;
and a third building module (not shown in the figure) for obtaining an initial YOLO model according to the text library.
In one embodiment, as shown in fig. 10, the apparatus further comprises:
a third obtaining module 1002, configured to obtain a background picture;
a first selection module 1004 for selecting sample characters from the corpus;
and a simulation sample module 1006, configured to attach a sample character to the background picture to obtain a simulation sample.
In one embodiment, as shown in fig. 11, the apparatus further comprises:
a fourth obtaining module 1102, configured to obtain a background picture;
a second selection module 1104 for selecting sample characters from the text library;
a third selecting module 1106, configured to select an adjustment manner of the sample character, where the adjustment manner includes one or more of setting a font, reducing a character, enlarging a character, rotating a character, and blurring a character edge;
an adjusting module 1108, configured to adjust the sample character according to the selected adjusting manner;
and a second determining module 1110, configured to attach the adjusted sample character to the background picture to obtain a simulated sample.
For the specific limitation of the click verification code identification device, reference may be made to the above limitation on the click verification code identification method, which is not described herein again. The modules in the above-mentioned verification code identification device can be wholly or partially implemented by software, hardware and their combination. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 12. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a click verification code identification method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 12 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a verification code picture;
performing character recognition on the verification code picture through a character recognition model to obtain a plurality of target characters;
determining a plurality of character sequences of the plurality of target characters according to the plurality of target characters;
carrying out probability statistics on the character sequencing according to a preset language statistical model to obtain the probability value of each character sequencing;
and screening out the character sequence with the maximum probability value from the character sequences, and taking the screened character sequence as a semantic recognition result of the verification code picture.
In one embodiment, the processor, when executing the computer program, further performs the steps of: performing frequency statistics on each character in the corpus and performing frequency statistics on every two continuously appearing characters in the corpus to obtain a first frequency statistical result; and obtaining a language statistical model according to the first frequency statistical result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: performing frequency statistics on every two continuously appearing characters in the corpus and performing frequency statistics on every three continuously appearing characters in the corpus to obtain a second frequency statistical result; and obtaining a language statistical model according to the second frequency statistical result.
In an embodiment, the following steps are further specifically implemented when the processor executes the computer program to implement the probability statistics on the word ranks according to the preset language statistical model to obtain the probability values of the word ranks: performing word segmentation processing on each character sequence to obtain word segmentation phrases of each character sequence; determining the conditional probability value of the word segmentation word group ordered by each character according to the word segmentation word group and the language statistical model; and respectively solving the conditional probability value product of the word segmentation word group of each character sequence to obtain the probability value of the character sequence.
In one embodiment, the processor executes the computer program to implement the above-mentioned word segmentation processing on each character sequence, and further specifically implements the following steps when obtaining a word segmentation phrase of each character sequence: if the language statistical model is obtained according to the first frequency statistical result, taking every two continuous characters in each character sequence as a participle phrase to obtain the participle phrase of each character sequence; and if the language statistical model is obtained according to the second frequency statistical result, taking every three continuous characters in each character sequence as a participle phrase to obtain the participle phrase of each character sequence.
In one embodiment, the processor, when executing the computer program, further performs the steps of: carrying out character position recognition on the verification code picture through a character recognition model to obtain position information of a plurality of target characters; and taking the semantic recognition result of the verification code picture and the position information of the plurality of target characters as the verification code recognition result of the verification code picture.
In one embodiment, the processor, when executing the computer program, further performs the steps of: pre-training the initial YOLO model through a simulation sample to obtain a pre-training model; and carrying out fine tuning training on the pre-training model through the real sample to obtain a character recognition model.
In one embodiment, the processor, when executing the computer program, further performs the steps of: obtaining a character library; an initial YOLO model is obtained from the corpus.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a background picture; selecting sample characters from a character library; and attaching the sample characters to the background picture to obtain a simulation sample.
In one embodiment, the processor, when executing the computer program, further performs the steps of: selecting an adjusting mode of the sample character, wherein the adjusting mode comprises one or more of setting a font, reducing the character, amplifying the character, rotating the character and blurring the character edge; and adjusting the sample character according to the selected adjusting mode.
In one embodiment, the processor executes the computer program to implement the above attaching the sample characters to the background picture, and further implements the following steps when obtaining the simulated sample: and attaching the adjusted sample characters to the background picture to obtain a simulation sample.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a verification code picture;
performing character recognition on the verification code picture through a character recognition model to obtain a plurality of target characters;
determining a plurality of character sequences of the plurality of target characters according to the plurality of target characters;
carrying out probability statistics on the character sequencing according to a preset language statistical model to obtain the probability value of each character sequencing;
and screening out the character sequence with the maximum probability value from the character sequences, and taking the screened character sequence as a semantic recognition result of the verification code picture.
In one embodiment, the computer program when executed by the processor further performs the steps of: performing frequency statistics on each character in the corpus and performing frequency statistics on every two continuously appearing characters in the corpus to obtain a first frequency statistical result; and obtaining a language statistical model according to the first frequency statistical result.
In one embodiment, the computer program when executed by the processor further performs the steps of: performing frequency statistics on every two continuously appearing characters in the corpus and performing frequency statistics on every three continuously appearing characters in the corpus to obtain a second frequency statistical result; and obtaining a language statistical model according to the second frequency statistical result.
In one embodiment, when the computer program is executed by the processor to perform the above step of performing probability statistics on the word ranks according to the preset language statistical model to obtain the probability values of the word ranks, the following steps are further specifically implemented: performing word segmentation processing on each character sequence to obtain word segmentation phrases of each character sequence; determining the conditional probability value of the word segmentation word group ordered by each character according to the word segmentation word group and the language statistical model; and respectively solving the conditional probability value product of the word segmentation word group of each character sequence to obtain the probability value of the character sequence.
In one embodiment, when the computer program is executed by the processor to perform the step of performing the word segmentation processing on each character sequence to obtain the word segmentation phrases of each character sequence, the following steps are further specifically implemented: if the language statistical model is obtained according to the first frequency statistical result, taking every two continuous characters in each character sequence as a participle phrase to obtain the participle phrase of each character sequence; and if the language statistical model is obtained according to the second frequency statistical result, taking every three continuous characters in each character sequence as a participle phrase to obtain the participle phrase of each character sequence.
In one embodiment, the computer program when executed by the processor further performs the steps of: carrying out character position recognition on the verification code picture through a character recognition model to obtain position information of a plurality of target characters; and taking the semantic recognition result of the verification code picture and the position information of the plurality of target characters as the verification code recognition result of the verification code picture.
In one embodiment, the computer program when executed by the processor further performs the steps of: pre-training the initial YOLO model through a simulation sample to obtain a pre-training model; and carrying out fine tuning training on the pre-training model through the real sample to obtain a character recognition model.
In one embodiment, the computer program when executed by the processor further performs the steps of: obtaining a character library; an initial YOLO model is obtained from the corpus.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a background picture; selecting sample characters from a character library; and attaching the sample characters to the background picture to obtain a simulation sample.
In one embodiment, the computer program when executed by the processor further performs the steps of: selecting an adjusting mode of the sample character, wherein the adjusting mode comprises one or more of setting a font, reducing the character, amplifying the character, rotating the character and blurring the character edge; and adjusting the sample character according to the selected adjusting mode.
In one embodiment, when the computer program is executed by the processor to perform the step of attaching the sample characters to the background picture to obtain the simulated sample, the following steps are further specifically implemented: and attaching the adjusted sample characters to the background picture to obtain a simulation sample.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A click verification code identification method is characterized by comprising the following steps:
acquiring a verification code picture;
performing character recognition on the verification code picture through a character recognition model to obtain a plurality of target characters;
determining a plurality of word ranks of the plurality of target words according to the plurality of target words;
carrying out probability statistics on the character sequencing according to a preset language statistical model to obtain a probability value of each character sequencing;
and screening out the character sequence with the maximum probability value from the character sequences, and taking the screened character sequence as the semantic recognition result of the verification code picture.
2. The method of claim 1, further comprising:
performing frequency statistics on each character in the corpus and performing frequency statistics on every two continuously appearing characters in the corpus to obtain a first frequency statistical result; obtaining the language statistical model according to the first frequency statistical result, preferably, storing the first frequency statistical result into local data to obtain the language statistical model,
alternatively, the first and second electrodes may be,
performing frequency statistics on every two continuously appearing characters in the corpus and performing frequency statistics on every three continuously appearing characters in the corpus to obtain a second frequency statistical result; and obtaining the language statistical model according to the second frequency statistical result, preferably, storing the second frequency statistical result in local data to obtain the language statistical model.
3. The method of claim 2, wherein performing probability statistics on the word ranks according to a preset language statistical model to obtain probability values of the word ranks comprises:
performing word segmentation processing on each character sequence to obtain word segmentation phrases of each character sequence;
determining the conditional probability value of the word segmentation word group of each character sequence according to the word segmentation word group and the language statistical model;
respectively obtaining the conditional probability value product of the word segmentation word group of each character sequence to obtain the probability value of the character sequence,
preferably, the word segmentation processing is performed on each character sequence to obtain a word segmentation phrase of each character sequence, and the word segmentation phrase includes:
if the language statistical model is obtained according to the first frequency statistical result, taking every two continuous characters in each character sequence as a word segmentation phrase to obtain the word segmentation phrase of each character sequence;
and if the language statistical model is obtained according to the second frequency statistical result, taking every three continuous characters in each character sequence as a word segmentation phrase to obtain the word segmentation phrase of each character sequence.
4. The method of claim 1, further comprising:
carrying out character position recognition on the verification code picture through the character recognition model to obtain position information of the plurality of target characters;
and taking the semantic recognition result of the verification code picture and the position information of the target characters as the verification code recognition result of the verification code picture.
5. The method according to any one of claims 1-4, further comprising:
pre-training the initial YOLO model through a simulation sample to obtain a pre-training model;
carrying out fine tuning training on the pre-training model through a real sample to obtain the character recognition model,
preferably, before the pre-training the initial YOLO model through the simulation sample to obtain a pre-trained model, the method further includes:
obtaining a character library;
and obtaining the initial YOLO model according to the character library.
6. The method of claim 5, further comprising:
acquiring a background picture;
selecting sample characters from the character library;
and attaching the sample characters to the background picture to obtain the simulation sample.
7. The method of claim 6, further comprising:
selecting an adjusting mode of the sample character, wherein the adjusting mode comprises one or more of setting a font, reducing the character, amplifying the character, rotating the character and blurring the character edge;
adjusting the sample character according to the selected adjusting mode;
attaching the sample character to the background picture to obtain the simulated sample, including: and attaching the adjusted sample characters to the background picture to obtain the simulation sample.
8. A click verification code recognition apparatus, comprising:
the acquisition module is used for acquiring a verification code picture;
the character recognition module is used for carrying out character recognition on the verification code picture through a character recognition model to obtain a plurality of target characters;
the sequencing module is used for determining a plurality of character sequences of the plurality of target characters according to the plurality of target characters;
the probability statistics module is used for carrying out probability statistics on the character sequencing according to a preset language statistics model to obtain the probability value of each character sequencing;
and the screening module is used for screening out the character sorting with the maximum probability value from the character sorting and taking the screened character sorting as the semantic recognition result of the verification code picture.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010374481.8A 2020-05-06 2020-05-06 Click verification code identification method and device, computer equipment and storage medium Pending CN111737548A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010374481.8A CN111737548A (en) 2020-05-06 2020-05-06 Click verification code identification method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010374481.8A CN111737548A (en) 2020-05-06 2020-05-06 Click verification code identification method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111737548A true CN111737548A (en) 2020-10-02

Family

ID=72646959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010374481.8A Pending CN111737548A (en) 2020-05-06 2020-05-06 Click verification code identification method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111737548A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487394A (en) * 2020-11-30 2021-03-12 携程旅游网络技术(上海)有限公司 Method, system, device and medium for identifying graph reasoning verification code
CN113627395A (en) * 2021-09-17 2021-11-09 平安银行股份有限公司 Text recognition method, text recognition device, text recognition medium and electronic equipment
CN118035975A (en) * 2023-12-21 2024-05-14 广东优识科技股份有限公司 Semantic verification code generation method, device, equipment and medium based on artistic style
CN118072324A (en) * 2024-04-23 2024-05-24 浙江保融科技股份有限公司 Verification code identification method based on semantic point character

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108182437A (en) * 2017-12-29 2018-06-19 北京金堤科技有限公司 One kind clicks method for recognizing verification code, device and user terminal
CN108614810A (en) * 2016-12-09 2018-10-02 中国移动通信集团山西有限公司 Complain hot spot automatic identifying method and device
CN109033798A (en) * 2018-09-14 2018-12-18 北京金堤科技有限公司 One kind is semantic-based to click method for recognizing verification code and its device
CN109993057A (en) * 2019-02-25 2019-07-09 平安科技(深圳)有限公司 Method for recognizing semantics, device, equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108614810A (en) * 2016-12-09 2018-10-02 中国移动通信集团山西有限公司 Complain hot spot automatic identifying method and device
CN108182437A (en) * 2017-12-29 2018-06-19 北京金堤科技有限公司 One kind clicks method for recognizing verification code, device and user terminal
CN109033798A (en) * 2018-09-14 2018-12-18 北京金堤科技有限公司 One kind is semantic-based to click method for recognizing verification code and its device
CN109993057A (en) * 2019-02-25 2019-07-09 平安科技(深圳)有限公司 Method for recognizing semantics, device, equipment and computer readable storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487394A (en) * 2020-11-30 2021-03-12 携程旅游网络技术(上海)有限公司 Method, system, device and medium for identifying graph reasoning verification code
CN113627395A (en) * 2021-09-17 2021-11-09 平安银行股份有限公司 Text recognition method, text recognition device, text recognition medium and electronic equipment
CN113627395B (en) * 2021-09-17 2023-11-17 平安银行股份有限公司 Text recognition method, device, medium and electronic equipment
CN118035975A (en) * 2023-12-21 2024-05-14 广东优识科技股份有限公司 Semantic verification code generation method, device, equipment and medium based on artistic style
CN118072324A (en) * 2024-04-23 2024-05-24 浙江保融科技股份有限公司 Verification code identification method based on semantic point character

Similar Documents

Publication Publication Date Title
EP3855324A1 (en) Associative recommendation method and apparatus, computer device, and storage medium
US11093854B2 (en) Emoji recommendation method and device thereof
CN108874992B (en) Public opinion analysis method, system, computer equipment and storage medium
CN111737548A (en) Click verification code identification method and device, computer equipment and storage medium
CN109815333B (en) Information acquisition method and device, computer equipment and storage medium
CN111666401B (en) Document recommendation method, device, computer equipment and medium based on graph structure
CN109753653B (en) Entity name recognition method, entity name recognition device, computer equipment and storage medium
CN109447958B (en) Image processing method, image processing device, storage medium and computer equipment
CN113569135B (en) Recommendation method, device, computer equipment and storage medium based on user portrait
CN108469975B (en) Control display method and device, computer equipment and storage medium
CN112395385B (en) Text generation method and device based on artificial intelligence, computer equipment and medium
CN107943792B (en) Statement analysis method and device, terminal device and storage medium
CN112651236B (en) Method and device for extracting text information, computer equipment and storage medium
CN111984792A (en) Website classification method and device, computer equipment and storage medium
CN110321437B (en) Corpus data processing method and device, electronic equipment and medium
CN112685475A (en) Report query method and device, computer equipment and storage medium
CN112183296A (en) Simulated bill image generation and bill image recognition method and device
CN113343108A (en) Recommendation information processing method, device, equipment and storage medium
CN114399396A (en) Insurance product recommendation method and device, computer equipment and storage medium
CN110597951A (en) Text parsing method and device, computer equipment and storage medium
CN112417875B (en) Configuration information updating method and device, computer equipment and medium
CN114253990A (en) Database query method and device, computer equipment and storage medium
CN114222000A (en) Information pushing method and device, computer equipment and storage medium
CN112734307A (en) Online real-time enterprise portrait generation method, device, equipment and storage medium
CN110688516A (en) Image retrieval method, image retrieval device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201002