CN111428230A - Information verification method, device, server and storage medium - Google Patents

Information verification method, device, server and storage medium Download PDF

Info

Publication number
CN111428230A
CN111428230A CN202010224172.2A CN202010224172A CN111428230A CN 111428230 A CN111428230 A CN 111428230A CN 202010224172 A CN202010224172 A CN 202010224172A CN 111428230 A CN111428230 A CN 111428230A
Authority
CN
China
Prior art keywords
text
picture
word
information
verification
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
CN202010224172.2A
Other languages
Chinese (zh)
Inventor
严月强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202010224172.2A priority Critical patent/CN111428230A/en
Publication of CN111428230A publication Critical patent/CN111428230A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/36User authentication by graphic or iconic representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides an information verification method, an information verification device, a server and a storage medium, wherein the method comprises the following steps: determining a target text set from a text library in response to a verification information acquisition request sent by a terminal; the target text set is used for obtaining verification information; randomly selecting a first text from the target text set, and determining a second text associated with the first text; drawing a first picture comprising the first text through an image processing library; randomly selecting a preset number of words from a word bank; combining the second text with the preset number of words to obtain a third text; randomly selecting a second picture from the image library, and drawing each word in the third text into the second picture at a random position through the image processing library; and obtaining verification information according to the first picture and the second picture, and returning the verification information to the terminal so that the terminal executes verification operation according to the verification information. By the adoption of the method and the device, the safety of the verification process can be improved.

Description

Information verification method, device, server and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information verification method, an information verification apparatus, a server, and a storage medium.
Background
The verification code is used as a public full-automatic program for distinguishing whether a user is a computer or a person, and bad behaviors such as malicious password cracking can be effectively prevented. A common authentication code is generally composed of 4 characters, which may be letters or numbers. Accordingly, the user may enter these 4 characters to complete the authentication process. Or, the verification code may also be a picture in which a vacant area exists. Accordingly, the user may drag the slider to the free area of the picture to fill the picture to complete the verification process. However, the authentication method based on the two authentication codes is easier to break, resulting in lower security of the authentication process.
Disclosure of Invention
The embodiment of the application provides an information verification method, an information verification device, a server and a storage medium, and safety of a verification process can be improved.
In a first aspect, an embodiment of the present application provides an information verification method, including:
determining a target text set from a text library in response to a verification information acquisition request sent by a terminal; the target text set is used for obtaining verification information;
randomly selecting a first text from the target text set, and determining a second text associated with the first text;
drawing a first picture comprising the first text through an image processing library;
randomly selecting a preset number of words from a word bank, wherein each word in the preset number of words comprises one or more characters;
combining the second text with the preset number of words to obtain a third text;
randomly selecting a second picture from the image library, and drawing each word in the third text into the second picture at a random position through an image processing library;
and obtaining verification information according to the first picture and the second picture, and returning the verification information to the terminal so that the terminal can execute verification operation according to the verification information.
Optionally, after the returning the verification information to the terminal, the method further includes:
receiving verification result information returned by the terminal according to the verification information, wherein the verification result information is obtained after the terminal obtains the first picture and the second picture according to the verification information, and the verification result information comprises position information of each word selected on the second picture according to the first picture;
respectively calculating position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word;
and if the position deviation data is within a preset range, returning prompt information that the verification is passed to the terminal.
Optionally, the separately calculating position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word includes:
calculating position deviation data between a first word in each word in the second text and a second word in each selected word, wherein the arrangement sequence of the first word is the same as the selection sequence of the second word, and the first word is any word in each word in the second text; or the like, or, alternatively,
and if each word in the second text is matched with each selected word, calculating position deviation data between a third word in the second text and a fourth word in each selected word, wherein the third word is the same as the fourth word, and the third word is any word in each word in the second text.
Optionally, the obtaining verification information according to the first picture and the second picture includes:
generating a random character string;
coding the first picture to obtain coded data of the first picture, and coding the second picture to obtain coded data of the second picture;
and generating verification information comprising the random character string, the coded data of the first picture and the coded data of the second picture.
Optionally, after obtaining the verification information according to the first picture and the second picture, the method further includes:
storing the random character strings and the position information of each word in the second text in the second picture in a cache database in a correlated manner;
after the returning of the verification information to the terminal, the method further includes:
receiving verification result information returned by the terminal according to the verification information, wherein the verification result information is obtained after the terminal obtains the first picture and the second picture according to the verification information, and the verification result information comprises the random character string and position information of each word selected on the second picture according to the first picture;
when the position information of each word in the second text corresponding to the random character string in the second picture is inquired in a cache database, respectively calculating the position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word;
and if the position deviation data is within a preset range, returning prompt information that the verification is passed to the terminal.
Optionally, the determining a second text associated with the first text includes:
if the first text is determined to have a next sentence of text in the target text set, determining the next sentence of text as a second text associated with the first text; or the like, or, alternatively,
and if the first text is determined to have the previous sentence of text in the target text set, determining the previous sentence of text as a second text associated with the first text.
Optionally, the combining the second text with the preset number of words to obtain a third text includes:
splicing the second text with the preset number of words to obtain a spliced text;
and sequentially adjusting each word in the spliced text in a random sampling mode or through a random function to obtain the sequentially adjusted spliced text serving as a third text.
In a second aspect, an embodiment of the present application provides an information verification apparatus, including:
the determining module is used for responding to a verification information acquisition request sent by the terminal and determining a target text set from a text library; the target text set is used for obtaining verification information;
the selection module is used for randomly selecting a first text from the target text set;
the determining module is further used for determining a second text associated with the first text through the determining module;
the drawing module is used for drawing a first picture comprising the first text through an image processing library;
the selecting module is further used for randomly selecting a preset number of words from the word bank, wherein each word in the preset number of words comprises one or more characters;
the processing module is used for combining the second text with the preset number of words to obtain a third text;
the selection module is also used for randomly selecting a second picture from the gallery;
the drawing module is further used for drawing each word in the third text into a second picture at a random position through an image processing library;
the processing module is further used for obtaining verification information according to the first picture and the second picture;
and the communication module is used for returning the verification information to the terminal so that the terminal can execute verification operation according to the verification information.
In a third aspect, an embodiment of the present application provides a server, including a processor, an output device, and a memory, where the processor, the output device, and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, where the computer program is executed by a processor to implement the method according to the first aspect.
In summary, the server may determine the target text set from the text library in response to the verification information acquisition request sent by the terminal; the server can randomly select a first text from the target text set and determine a second text associated with the first text; the server can draw a first picture comprising the first text through the image processing library; the server can randomly select a preset number of words from the word bank, and combine the second text with the preset number of words to obtain a third text; the server can randomly select a second picture from the gallery, and draw each word in the third text to the second picture at a random position through the image processing gallery, so that verification information is obtained according to the first picture and the second picture, and the verification information is returned to the terminal, so that the terminal can execute verification operation according to the verification information, the cracking difficulty of the verification mode is increased, and the safety of the verification process is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1a is a schematic flowchart of an information verification method provided in an embodiment of the present application;
fig. 1b is a schematic diagram of a first picture provided in an embodiment of the present application;
fig. 1c is a schematic diagram of a second picture provided in this application;
fig. 1d is a schematic diagram of a first picture and a second picture provided in the present application;
FIG. 2 is a schematic flow chart diagram illustrating another information verification method provided in an embodiment of the present application;
fig. 3 is a schematic network architecture diagram of an information verification system according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an information verification apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Please refer to fig. 1a, which is a flowchart illustrating an information verification method according to an embodiment of the present disclosure. The method can be applied to a server which can be a service device or a cluster formed by a plurality of service devices. Specifically, the method may comprise the steps of:
s101, in response to a verification information acquisition request sent by a terminal, determining a target text set from a text library.
In the embodiment of the application, the terminal can send the verification information acquisition request to the server, and the server can determine the target text set from the text library in response to the verification information acquisition request sent by the terminal. The terminal includes, but is not limited to, an intelligent terminal such as a smart phone, a tablet computer, a notebook computer, and a desktop computer. The authentication information acquisition request refers to a request that can be used to acquire authentication information, such as a page access request. The library of text may include a plurality of collections of text, such as lyrics, poems, or articles for each of a plurality of songs. The target set of text may be used to obtain verification information, the target set of text being any one of a plurality of sets of text.
In one embodiment, the server determines the target text set from the text library in such a manner that the server randomly selects one text set from the text library as the target text set. For example, the server may generate a random number within a preset value range, and determine a text set corresponding to the text ranked as the random number from the text set as a target text set.
S102, randomly selecting a first text from the target text set, and determining a second text associated with the first text.
Wherein the second text may be determined from the target text set and/or obtained by a search of a specified search engine.
In one embodiment, the server may determine a second text associated with the first text from the set of target texts. Wherein the second text may be any one of: the text of the next sentence of the first text, the text of the previous sentence of the first text, and other texts in the target text set except the first text, wherein the other texts are not the text of the next sentence of the first text and not the text of the previous sentence of the first text.
In one embodiment, the process of the server determining the second text associated with the first text from the target text set may be: if it is determined that the first text has a next sentence of text in the target text set, the server may determine the next sentence of text as a second text associated with the first text. In one embodiment, if it is determined that the first text does not have a next sentence text in the target text set, the server may determine a previous sentence text of the first text as the second text associated with the first text.
For example, the target text set is poem of quiet night thinking. The server may randomly select a first text from the poem, such as "please look for tomorrow at first", and may determine that the first text has a next sentence text "lower hometown", and thus the server may determine "lower hometown" as the second text associated with the first text.
Or, the process of the server determining the second text associated with the first text from the target text set may further be: if it is determined that the first text has a previous sentence of text in the target text set, the server may determine the previous sentence of text as a second text associated with the first text. In one embodiment, if it is determined that the first text does not have a previous sentence of text in the target text set, the server may determine a next sentence of text of the first text as the second text associated with the first text.
In one embodiment, the server may also search out the second text associated with the first text by specifying a search engine. In one embodiment, the server may search out information associated with the first text or information associated with the set of target texts as the second text associated with the first text by specifying a search engine. Wherein the associated information includes, but is not limited to, at least one of: identification information of an author of the target text set, a type of the target text set, and keywords of thought emotion expressed by the target text set.
For example, assume that the target text set is poem of thought at quiet night, and the first text is "look ahead and look bright moon". The server may search for identification information of an author of the poem of the quiet night thought by specifying a search engine, such as information of an era to which the author belongs, a name of the author, and/or a place of birth of the author, as the second text associated with the first text.
S103, drawing a first picture comprising the first text through an image processing library.
In this embodiment, the server may draw, through the image processing library, each word (a word includes one or more words) included in the first text in order in the first picture, so as to obtain the first picture including the first text. The first picture obtained in step S103 may be used as a common image verification code. For example, referring to fig. 1b, if the first text is "open-top-view moon", the content displayed on the common graphic verification code is "open-top-view moon". The image processing library may refer to a software library with a drawing function, such as a class library. In one embodiment, the image processing library may be a graphics class library (or may be a geometry library). As for the Java language, there may be Graphics2D class libraries.
In an embodiment, the server may further perform preprocessing on each word included in the first text to obtain preprocessed words, and sequentially draw the preprocessed words in the first picture. Wherein the pre-treatment process includes, but is not limited to, any of the following; adjusting the font, adjusting the font gradient and adjusting the font model.
In one embodiment, the server may also randomly add noise to the first picture to increase the difficulty of image recognition of the first picture. In one embodiment, the server may randomly add noise to the first picture according to a preset noise parameter. Wherein the noise parameter may include at least one of: noise distribution, noise number, noise shape.
S104, randomly selecting a preset number of words from a word bank, wherein each word in the preset number of words comprises one or more words.
The word stock may include a plurality of words, each of which may include one or more characters, including but not limited to strings of numbers, english words, or chinese characters. For example, the word stock is a Chinese word stock, the Chinese word stock includes a plurality of words, each of the plurality of words may include a Chinese character, and the server may randomly select 5 Chinese characters from the Chinese word stock, such as 5 primary Chinese characters "you", "o", "wood", "middle" and "money".
And S105, combining the second text with the preset number of words to obtain a third text.
The server combines the second text with the preset number of words to obtain the third text, which may be splicing the second text with the preset number of words by the server to obtain a spliced text serving as the third text. For example, the second text is "lower thinking of the country of the home country", and the preset number of words are "you", "o", "wood", "middle", "money". After the server splices the second texts with the preset number, a text "lower the head of the people in the hometown you joss money" after splicing processing can be obtained and used as a third text.
In an embodiment, the server may perform order adjustment on each word in the text after the concatenation processing by using a random sampling method or a random function, and obtain the text after the concatenation processing after the order adjustment as a third text. By adopting the method, the complexity of the third text can be improved. For example, the text after the splicing process is "lower the head of your hometown you middle money". After the server sequentially adjusts the text after the splicing processing by adopting the above method, the text after the splicing processing after the sequential adjustment, namely the text "you think low, middle town cash head and dead man", can be obtained as a third text.
In an embodiment, the random sampling mode may be a random playback-free sampling mode, that is, the server may perform sampling processing on each word in the text after the splicing processing in a random sampling playback-free mode to obtain a plurality of sampling results; and the server assembles the plurality of sampling results to obtain an assembly result which is used as the spliced text after the sequence adjustment. In one embodiment, the server assembling the plurality of sampling results may assemble the plurality of sampling results for the server in a sampling order. In one embodiment, the server may further call a random function to generate a corresponding random number for each word in the text after the concatenation processing; the server can sequence each word according to the sequence of the random numbers from large to small or the sequence from small to small, and can take the text formed by each word after the sequencing as the text after the splicing processing after the sequence adjustment.
And S106, randomly selecting a second picture from the image library, and drawing each word in the third text into the second picture at a random position through the image processing library.
The server may randomly select a second picture from the gallery, and draw each word in the third text to the second picture at a random position through the image processing gallery, thereby obtaining the second picture including each word in the third text. The second picture obtained in step S106 may be used as a click verification code. Wherein, the gallery may include a plurality of pictures. In one embodiment, the gallery may be a background gallery, which may include a plurality of background pictures.
For example, the third text is "you think of low, middle and rural maiden tree", referring to fig. 1c, the server may randomly select a picture shown in the left diagram of fig. 1c from the gallery. The server may draw each word in the third text at a random position in the picture shown in the left diagram of fig. 1c, so as to obtain the picture shown in the right diagram of fig. 1c, where the picture shown in the right diagram of fig. 1c includes "you", "xi", "e", "low", "middle", "home", "money", "head", "so", "wood".
In an embodiment, the server may further perform preprocessing on each word included in the third text to obtain preprocessed words, and sequentially draw the preprocessed words in the second picture. Wherein the pre-treatment process includes, but is not limited to, any of the following; adjusting the font, adjusting the font gradient and adjusting the font model.
In one embodiment, the server may also randomly add noise to the second picture to increase the difficulty of image recognition of the second picture. In one embodiment, the server may randomly add noise to the second picture using a preset noise parameter. Wherein the noise parameter may include at least one of: noise distribution, noise number, noise shape.
S107, obtaining verification information according to the first picture and the second picture, and returning the verification information to the terminal so that the terminal can execute verification operation according to the verification information.
In the embodiment of the application, the server may obtain the verification information according to the first picture and the second picture, and may return the verification information to the terminal, and the terminal may perform the verification operation according to the verification information. In one embodiment, the process of the terminal performing the verification operation according to the verification information may be that the terminal obtains the first picture and the second picture according to the verification information, and performs the verification operation according to the first picture and the second picture.
In one embodiment, the process of the server returning the authentication information to the terminal may be as follows: the server generates a target page including the verification information and a link address for accessing the target page, and returns the link address of the target page to the terminal. The terminal can send an access request for the target page to the server according to the link address of the target page. The server may return the target page to the terminal when receiving an access request to the link address of the target page by the terminal.
In one embodiment, the process of the server obtaining the authentication information according to the first picture and the second picture may generate the authentication information including the first picture and the second picture for the server. In one embodiment, the server may also count the text length of the second text and generate verification information including the text length of the second text, the first picture and the second picture.
In one embodiment, the server may receive verification result information returned by the terminal according to the verification information, where the verification result information is obtained after the terminal obtains the first picture and the second picture according to the verification information, and the verification result information includes position information of each word selected on the second picture according to the first picture; the server respectively calculates position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word; and if the position deviation data is within the preset range, the server returns prompt information that the verification is passed to the terminal. The position information may be position coordinates. In one embodiment, if the position deviation data is within a preset range, the server may determine that the verification result information is verified. In one embodiment, the server may return a prompt message that the verification is passed to the terminal or perform the next service processing operation after determining that the verification result message is passed. In one embodiment, the server may store the position information of each word in the second text in the second picture or store the position information of each word in the second text in the second picture in a cache database.
For example, the first text is "look ahead at tomorrow", and the second text is "look ahead and hometown home town". Referring to fig. 1d, the terminal may obtain the picture shown in fig. 1b and the picture shown in the right diagram of fig. 1c according to the authentication information. The user may select a plurality of words from the picture shown in the right hand diagram of fig. 1c, according to the picture shown in fig. 1 b. The terminal can respond to the selection operation of the plurality of words and return verification result information to the server, wherein the verification result signal comprises the position information of each selected word. Or, when the verification information includes a text length of "low-heading hometown", which is 5 here, the terminal may count the number of the selected multiple words in response to the selection operation on the multiple words, and if the number reaches 5, may return verification result information to the server. The server can receive the verification result information and respectively calculate position deviation data of each word in the low-heading hometown image between the position information of the picture shown in the right picture of fig. 1c and the position information of each selected word; if the positional deviation data is within a preset range, it can be determined that the verification result information is verified. In one embodiment, the server may return a prompt to the terminal that the authentication is passed. In one embodiment, the server may perform the next business process operation.
In one embodiment, the server may also generate a random string. The server may generate authentication information including the random character string, the first picture, and the second picture, or generate authentication information including the random character string, a text length of the second text, the first picture, and the second picture. The server may store the random character string and the position information of each word in the second text in the second picture in association, for example, in a local or cache database. For example, the position coordinates of each word in the second text in the second picture are [ x ] in sequence1,y1],[x2,y2],…,[xn,yn]. The server may generate a random string, such as a Universally Unique Identifier (UUID). The random string may be a 32-bit random string, and accordingly, the UUID may also be a 32-bit UUID. Can be used forAnd taking the UUID as a key, and the position coordinates of each word in the second text in the second picture as a value, and storing the value into a cache database, such as a redis cache database, in a correlated manner. In one embodiment, a buffer duration, such as 5 minutes, may be set for the random string.
In an embodiment, when the verification information includes the random character string, the verification result information may carry the random character string, and the server may perform the step of calculating the position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word when the server queries the position information of each word in the second text in the second picture corresponding to the random character string in a local or cache database.
In one embodiment, the server may calculate, by means of ordered matching, position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word, respectively, for the position information. Specifically, the process of the server calculating the position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word may be that the server calculates the position deviation data between a first word in each word in the second text and a second word in each selected word, and an arrangement order of the first word is the same as a selection order of the second word. The first word is any one of the words in the second text. Correspondingly, the second word is the word with the same sequence as the first word in the selected words. For example, the first word is a word arranged in the 5 th order in the second text, and correspondingly, the second word is a word selected from the selected words and arranged in the 5 th order, that is, the second word is the selected 5 th word.
In one embodiment, the server may calculate, by using an unordered matching method for the position information, position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word respectively. Specifically, the process of the server calculating the position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word may be that if each word in the second text matches each selected word, the server calculates the position deviation data between a third word in the second text and a fourth word in each selected word, where the third word is the same as the fourth word. The third word is any one of the words in the second text. Correspondingly, the fourth word is the same word as the third word in the selected words. Compared with the former method, the latter method is more complex, but the situation that the user selects words according to different sequences is considered, so that the later method is adopted to find corresponding words to calculate the position deviation data, and the verification success rate can be improved.
In one embodiment, the server may further return a prompt message to the terminal, where the prompt message may be used to prompt the user to select a second text associated with the first text included in the first picture from the second picture. For example, the prompt message may be: please select the next poem of "lifting the head and looking at the moon".
As can be seen, in the embodiment shown in fig. 1a, the server may determine the target text set from the text library in response to the verification information obtaining request sent by the terminal; the server can randomly select a first text from the target text set, determine a second text associated with the first text, and draw a first picture comprising the first text through an image processing library; the server can randomly select a preset number of words from a word bank, and combine the second text with the preset number of words to obtain a third text, so that each word in the third text is drawn into a second picture at a random position; the server can obtain the verification information according to the first picture and the second picture and return the verification information to the terminal, so that the terminal can execute verification operation according to the verification information, and the safety of the verification process is improved.
Please refer to fig. 2, which is a flowchart illustrating another information verification method according to an embodiment of the present disclosure. The method can be applied to a server which can be a service device or a cluster formed by a plurality of service devices. Specifically, the method may comprise the steps of:
s201, in response to a verification information acquisition request sent by a terminal, determining a target text set from a text library.
S202, randomly selecting a first text from the target text set, and determining a second text associated with the first text.
S203, drawing a first picture comprising the first text through an image processing library.
S204, randomly selecting a preset number of words from a word bank, wherein each word in the preset number of words comprises one or more words.
S205, combining the second text with the preset number of words to obtain a third text.
S206, randomly selecting a second picture from the gallery, and drawing each word in the third text into the second picture at a random position through the image processing gallery.
Steps S201 to S206 can refer to steps S101 to S106 in the embodiment of fig. 1a, which is not described herein again in this embodiment of the present application.
And S207, generating a random character string.
And S208, coding the first picture to obtain coded data of the first picture, and coding the second picture to obtain coded data of the second picture.
S209, generating verification information comprising the random character string, the coded data of the first picture and the coded data of the second picture, and returning the verification information to the terminal so that the terminal can execute verification operation according to the verification information.
In steps S207-S209, the server may generate a random string. The server may perform encoding processing on the first picture, such as base64 encoding, to obtain encoded data of the first picture, such as base64 encoded data. The server may further perform encoding processing on the second picture, such as base64 encoding, to obtain encoded data of the second picture, such as base64 encoded data. The server may generate authentication information including the random character string, the encoded data of the first picture, and the encoded data of the second picture, and return the authentication information to the terminal so that the terminal performs an authentication operation according to the authentication information. In one embodiment, the process of the terminal performing the verification operation according to the verification information may be that the terminal decodes the encoded data of the first picture and the encoded data of the second picture to obtain the first picture and the second picture, and then the terminal may perform the verification operation according to the first picture and the second picture.
In one embodiment, the server may also count the text length of the second text and generate the verification information including the text length of the second text, the random character string, the encoded data of the first picture, and the encoded data of the second picture.
In one embodiment, the server may store the random character string in association with the position information of each word in the second text in the second picture, for example, in a local or cache database.
In one embodiment, the terminal may return authentication result information to the server. The server can receive verification result information returned by the terminal according to the verification information, wherein the verification result information is obtained after the terminal obtains the first picture and the second picture according to the verification information, and the verification result information comprises the random character string and position information of each word selected on the second picture according to the first picture; when the server inquires the position information of each word in the second text corresponding to the random character string in the second picture in a local or cache database, respectively calculating the position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word; and if the position deviation data is within the preset range, the server returns prompt information that the verification is passed to the terminal. In one embodiment, if the position deviation data is within a preset range, the server may determine that the verification result information is verified. In one embodiment, the server may return a prompt message that the verification is passed to the terminal or perform the next service processing operation after determining that the verification result message is passed. In an embodiment, the server may respectively calculate the position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word in the second text by using the ordered matching method for the position information or the unordered matching method for the position information mentioned in the embodiment of fig. 1a, which is not described herein again in this embodiment of the present application.
In an embodiment, if the location information of each word in the second text corresponding to the random character string in the second picture is not queried in a local or cache database, the server may return a prompt message indicating that the verification is overtime or the verification information is outdated to the terminal.
In one embodiment, if the position deviation data is not within the preset range, a prompt message of verification failure is returned to the terminal. In one embodiment, if the number of times of the verification failure is less than or equal to the preset number of times, the server may empty the position information of each selected word, and the receiving terminal returns the verification result information according to the verification information again. If the verification fails more than the preset times, the server can obtain new verification information and return the new verification information to the terminal, so that the terminal can execute verification operation according to the new verification information.
It can be seen that, in the embodiment shown in fig. 2, the server may generate a random character string, encode the first picture to obtain encoded data of the first picture, encode the second picture to obtain encoded data of the second picture, thereby generate verification information including the random character string, the encoded data of the first picture, and the encoded data of the second picture, and return the verification information to the terminal, so that the terminal performs a verification operation according to the verification information, and further improves security of a verification process.
Please refer to fig. 3, which is a flowchart illustrating an information verification system according to an embodiment of the present disclosure. The information authentication system may include a terminal 10 and a server 20. Communication is possible between the terminal 10 and the server 20. Wherein:
the terminal 10 may transmit an authentication information acquisition request to the server 20, and the server 20 may obtain authentication information by performing steps S101 to S107 and return the authentication information to the terminal 10 so that the terminal 10 may perform an authentication operation according to the authentication information. By adopting the process, the safety of the verification process can be improved.
Please refer to fig. 4, which is a schematic structural diagram of an information verification apparatus according to an embodiment of the present disclosure. The apparatus may be applied to a server. Specifically, the information verification apparatus may include:
a determining module 401, configured to determine a target text set from a text library in response to a verification information obtaining request sent by a terminal; the target text set is used to obtain verification information.
A selecting module 402, configured to randomly select a first text from the target text set.
The determining module 401 is further configured to determine a second text associated with the first text.
A drawing module 403, configured to draw, through the image processing library, a first picture including the first text.
The selecting module 402 is further configured to randomly select a preset number of words from the word bank, where each word in the preset number of words includes one or more words.
A processing module 404, configured to combine the second text with the preset number of words to obtain a third text.
The selecting module 402 is further configured to randomly select a second picture from the gallery.
And the drawing module 403 is further configured to draw each word in the third text into the second picture at a random position through the image processing library.
The processing module 404 is further configured to obtain verification information according to the first picture and the second picture.
A communication module 405, configured to return the verification information to the terminal, so that the terminal performs a verification operation according to the verification information.
In an optional implementation manner, the processing module 404 is further configured to receive, through the communication module 405, verification result information returned by the terminal according to the verification information after the communication module 405 returns the verification information to the terminal, where the verification result information is obtained after the terminal obtains the first picture and the second picture according to the verification information, and the verification result information includes position information of each word selected on the second picture according to the first picture; respectively calculating position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word; if the position deviation data is within the preset range, the communication module 405 returns a prompt message that the verification is passed to the terminal.
In an optional implementation manner, the processing module 404 calculates position deviation data between position information of each word in the second text in the second picture and position information of each selected word, specifically calculates position deviation data between a first word in each word in the second text and a second word in each selected word, an arrangement order of the first word is the same as a selection order of the second word, and the first word is any one of the words in the second text; or, if each word in the second text is matched with each selected word, calculating position deviation data between a third word in the second text and a fourth word in each selected word, wherein the third word is the same as the fourth word, and the third word is any word in each word in the second text.
In an optional implementation manner, the processing module 404 obtains the verification information according to the first picture and the second picture, specifically, generates a random character string; coding the first picture to obtain coded data of the first picture, and coding the second picture to obtain coded data of the second picture; and generating verification information comprising the random character string, the coded data of the first picture and the coded data of the second picture.
In an optional implementation manner, the processing module 404 is further configured to, after obtaining verification information according to the first picture and the second picture, store the random character string in a cache database in association with position information of each word in the second text in the second picture.
In an optional implementation manner, the processing module 404 is further configured to receive, through the communication module 405, verification result information returned by the terminal according to the verification information after the terminal obtains the first picture and the second picture according to the verification information after the verification information is returned to the terminal through the communication module 405, where the verification result information includes the random character string and position information of each word selected on the second picture according to the first picture; when the position information of each word in the second text corresponding to the random character string in the second picture is inquired in a cache database, respectively calculating the position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word; if the position deviation data is within the preset range, the communication module 405 returns the prompt information that the verification is passed to the terminal.
In an optional implementation manner, the determining module 401 determines the second text associated with the first text, specifically, if it is determined that the first text has a next sentence text in the target text set, determine the next sentence text as the second text associated with the first text; or if the first text is determined to have the previous sentence of text in the target text set, determining the previous sentence of text as a second text associated with the first text.
In an optional implementation manner, the processing module 404 combines the second text with the preset number of words to obtain a third text, specifically, splices the second text with the preset number of words to obtain a spliced text; and sequentially adjusting each word in the spliced text in a random sampling mode or through a random function to obtain the sequentially adjusted spliced text serving as a third text.
It can be seen that, in the embodiment shown in fig. 4, the information verification apparatus may determine the target text set from the text library in response to the verification information acquisition request sent by the terminal; the information verification device can randomly select a first text from the target text set, determine a second text associated with the first text, and draw a first picture comprising the first text through an image processing library; the information verification device can randomly select a preset number of words from a word bank, and combine the second text with the preset number of words to obtain a third text, so that each word in the third text is drawn into a second picture at a random position; the information verification device can obtain verification information according to the first picture and the second picture and return the verification information to the terminal, so that the terminal can execute verification operation according to the verification information, and the safety of a verification process is improved.
Please refer to fig. 5, which is a schematic structural diagram of a server according to an embodiment of the present disclosure. The server described in this embodiment may include: a processor 1000, an input device 2000, an output device 3000, and a memory 4000. The processor 1000, the input device 2000, the output device 3000, and the memory 4000 may be connected by a bus or other means. In one embodiment, the input device 2000 is an optional device. In one embodiment, input device 2000 and output device 3000 may be standard wired or wireless communication interfaces.
The Processor 1000 may be a Central Processing Unit (CPU), and may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 4000 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 4000 is used to store a set of program codes, and the processor 1000, the input device 2000 and the output device 3000 may call the program codes stored in the memory 4000. Specifically, the method comprises the following steps:
the processor 1000 is configured to determine a target text set from a text library in response to a verification information acquisition request sent by a terminal; the target text set is used for obtaining verification information; randomly selecting a first text from the target text set, and determining a second text associated with the first text; drawing a first picture comprising the first text through an image processing library; randomly selecting a preset number of words from a word bank, wherein each word in the preset number of words comprises one or more characters; combining the second text with the preset number of words to obtain a third text; randomly selecting a second picture from the image library, and drawing each word in the third text into the second picture at a random position through an image processing library; and obtaining verification information according to the first picture and the second picture, and returning the verification information to the terminal through an output device 3000, so that the terminal executes verification operation according to the verification information.
In an embodiment, the processor 1000 is further configured to receive, through the input device 2000, verification result information returned by the terminal according to the verification information after the output device 3000 returns the verification information to the terminal, where the verification result information is obtained after the terminal obtains the first picture and the second picture according to the verification information, and the verification result information includes position information of each word selected on the second picture according to the first picture; respectively calculating position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word; and if the position deviation data is within a preset range, returning prompt information that the verification is passed to the terminal.
In an embodiment, the processor 1000 calculates position deviation data between position information of each word in the second text in the second picture and position information of each selected word, specifically, calculates position deviation data between a first word in each word in the second text and a second word in each selected word, an arrangement order of the first word is the same as a selection order of the second word, and the first word is any one of the words in the second text; or, if each word in the second text is matched with each selected word, calculating position deviation data between a third word in the second text and a fourth word in each selected word, wherein the third word is the same as the fourth word, and the third word is any word in each word in the second text.
In one embodiment, the processor 1000 obtains the verification information according to the first picture and the second picture, specifically, generates a random character string; coding the first picture to obtain coded data of the first picture, and coding the second picture to obtain coded data of the second picture; and generating verification information comprising the random character string, the coded data of the first picture and the coded data of the second picture.
In an embodiment, the processor 1000 is further configured to, after obtaining verification information according to the first picture and the second picture, store the random character string and position information of each word in the second text in the second picture in a cache database in an associated manner.
In an embodiment, the processor 1000 is further configured to receive, through the input device 2000, verification result information returned by the terminal according to the verification information after the verification information is returned to the terminal through the output device 3000, where the verification result information is obtained after the terminal obtains the first picture and the second picture according to the verification information, and the verification result information includes the random character string and position information of each word selected on the second picture according to the first picture; when the position information of each word in the second text corresponding to the random character string in the second picture is inquired in a cache database, respectively calculating the position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word; and if the position deviation data is in a preset range, returning prompt information of passing verification to the terminal through the output equipment 3000.
In one embodiment, the processor 1000 determines the second text associated with the first text, specifically, if it is determined that the first text has a next sentence of text in the target text set, determines the next sentence of text as the second text associated with the first text; or if the first text is determined to have the previous sentence of text in the target text set, determining the previous sentence of text as a second text associated with the first text.
In an embodiment, the processor 1000 combines the second text with the preset number of words to obtain a third text, specifically, splices the second text with the preset number of words to obtain a spliced text; and sequentially adjusting each word in the spliced text in a random sampling mode or through a random function to obtain the sequentially adjusted spliced text serving as a third text.
In a specific implementation, the processor 1000, the input device 2000, and the output device 3000 described in this embodiment of the present application may execute the implementation described in the embodiment of fig. 1a and fig. 2, or may execute the implementation described in this embodiment of the present application, and are not described herein again.
The functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of sampling hardware, and can also be realized in a form of sampling software functional units.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the above embodiments of the methods. The computer readable storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An information verification method, comprising:
determining a target text set from a text library in response to a verification information acquisition request sent by a terminal; the target text set is used for obtaining verification information;
randomly selecting a first text from the target text set, and determining a second text associated with the first text;
drawing a first picture comprising the first text through an image processing library;
randomly selecting a preset number of words from a word bank, wherein each word in the preset number of words comprises one or more characters;
combining the second text with the preset number of words to obtain a third text;
randomly selecting a second picture from the image library, and drawing each word in the third text into the second picture at a random position through an image processing library;
and obtaining verification information according to the first picture and the second picture, and returning the verification information to the terminal so that the terminal can execute verification operation according to the verification information.
2. The method of claim 1, wherein after returning the authentication information to the terminal, the method further comprises:
receiving verification result information returned by the terminal according to the verification information, wherein the verification result information is obtained after the terminal obtains the first picture and the second picture according to the verification information, and the verification result information comprises position information of each word selected on the second picture according to the first picture;
respectively calculating position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word;
and if the position deviation data is within a preset range, returning prompt information that the verification is passed to the terminal.
3. The method according to claim 2, wherein the separately calculating positional deviation data between the positional information of each word in the second text in the second picture and the positional information of each selected word comprises:
calculating position deviation data between a first word in each word in the second text and a second word in each selected word, wherein the arrangement sequence of the first word is the same as the selection sequence of the second word, and the first word is any word in each word in the second text; or the like, or, alternatively,
and if each word in the second text is matched with each selected word, calculating position deviation data between a third word in the second text and a fourth word in each selected word, wherein the third word is the same as the fourth word, and the third word is any word in each word in the second text.
4. The method of claim 1, wherein obtaining authentication information from the first picture and the second picture comprises:
generating a random character string;
coding the first picture to obtain coded data of the first picture, and coding the second picture to obtain coded data of the second picture;
and generating verification information comprising the random character string, the coded data of the first picture and the coded data of the second picture.
5. The method of claim 4, wherein after obtaining authentication information from the first picture and the second picture, the method further comprises:
storing the random character strings and the position information of each word in the second text in the second picture in a cache database in a correlated manner;
after the returning of the verification information to the terminal, the method further includes:
receiving verification result information returned by the terminal according to the verification information, wherein the verification result information is obtained after the terminal obtains the first picture and the second picture according to the verification information, and the verification result information comprises the random character string and position information of each word selected on the second picture according to the first picture;
when the position information of each word in the second text corresponding to the random character string in the second picture is inquired in a cache database, respectively calculating the position deviation data between the position information of each word in the second text in the second picture and the position information of each selected word;
and if the position deviation data is within a preset range, returning prompt information that the verification is passed to the terminal.
6. The method of any of claims 1-5, wherein determining the second text associated with the first text comprises:
if the first text is determined to have a next sentence of text in the target text set, determining the next sentence of text as a second text associated with the first text; or the like, or, alternatively,
and if the first text is determined to have the previous sentence of text in the target text set, determining the previous sentence of text as a second text associated with the first text.
7. The method according to any one of claims 1-5, wherein said combining the second text with the preset number of words to obtain a third text comprises:
splicing the second text with the preset number of words to obtain a spliced text;
and sequentially adjusting each word in the spliced text in a random sampling mode or through a random function to obtain the sequentially adjusted spliced text serving as a third text.
8. An information authentication apparatus, comprising:
the determining module is used for responding to a verification information acquisition request sent by the terminal and determining a target text set from a text library; the target text set is used for obtaining verification information;
the selection module is used for randomly selecting a first text from the target text set;
the determining module is further used for determining a second text associated with the first text through the determining module;
the drawing module is used for drawing a first picture comprising the first text through an image processing library;
the selecting module is further used for randomly selecting a preset number of words from the word bank, wherein each word in the preset number of words comprises one or more characters;
the processing module is used for combining the second text with the preset number of words to obtain a third text;
the selection module is also used for randomly selecting a second picture from the gallery;
the drawing module is further used for drawing each word in the third text into a second picture at a random position through an image processing library;
the processing module is further used for obtaining verification information according to the first picture and the second picture;
and the communication module is used for returning the verification information to the terminal so that the terminal can execute verification operation according to the verification information.
9. A server, comprising a processor, an output device, and a memory, the processor, the output device, and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method according to any one of claims 1-7.
CN202010224172.2A 2020-03-26 2020-03-26 Information verification method, device, server and storage medium Pending CN111428230A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010224172.2A CN111428230A (en) 2020-03-26 2020-03-26 Information verification method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010224172.2A CN111428230A (en) 2020-03-26 2020-03-26 Information verification method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN111428230A true CN111428230A (en) 2020-07-17

Family

ID=71548818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010224172.2A Pending CN111428230A (en) 2020-03-26 2020-03-26 Information verification method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111428230A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199350A (en) * 2020-09-29 2021-01-08 中国平安人寿保险股份有限公司 Function verification method and device based on data screening, computer equipment and medium
WO2023226126A1 (en) * 2022-05-26 2023-11-30 中国电子信息产业集团有限公司第六研究所 Programmable logic controller security authentication method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199350A (en) * 2020-09-29 2021-01-08 中国平安人寿保险股份有限公司 Function verification method and device based on data screening, computer equipment and medium
CN112199350B (en) * 2020-09-29 2023-10-24 中国平安人寿保险股份有限公司 Function verification method and device based on data screening, computer equipment and medium
WO2023226126A1 (en) * 2022-05-26 2023-11-30 中国电子信息产业集团有限公司第六研究所 Programmable logic controller security authentication method

Similar Documents

Publication Publication Date Title
US11934394B2 (en) Data query method supporting natural language, open platform, and user terminal
CN110728455B (en) Service processing method, service processing device, storage medium and electronic equipment
CN112650854B (en) Intelligent reply method and device based on multiple knowledge graphs and computer equipment
WO2020177592A1 (en) Painting question answering method and device, painting question answering system, and readable storage medium
CN112287069A (en) Information retrieval method and device based on voice semantics and computer equipment
CN111428230A (en) Information verification method, device, server and storage medium
CN112925898A (en) Question-answering method, device, server and storage medium based on artificial intelligence
CN111475700A (en) Data extraction method and related equipment
CN112836521A (en) Question-answer matching method and device, computer equipment and storage medium
CN112069304A (en) Question answering method, device, server and storage medium for insurance business
CN111933133A (en) Intelligent customer service response method and device, electronic equipment and storage medium
US20180293508A1 (en) Training question dataset generation from query data
CN113935334A (en) Text information processing method, device, equipment and medium
CN113609833A (en) Dynamic generation method and device of file, computer equipment and storage medium
CN111753548A (en) Information acquisition method and device, computer storage medium and electronic equipment
AU2022204665B2 (en) Automated search and presentation computing system
CN114650436B (en) Remote control method, device, equipment and medium based on background service
KR100309219B1 (en) Network-based speaker learning and verification method and system thereof
US20210109960A1 (en) Electronic apparatus and controlling method thereof
US10721068B2 (en) Secure data transmission using natural language
US20230004989A1 (en) Customer recognition system
CN117492752A (en) Page dynamic configuration method and device, computer equipment and storage medium
CN116467428A (en) Information retrieval method, information retrieval device, computer equipment and storage medium
CN116166858A (en) Information recommendation method, device, equipment and storage medium based on artificial intelligence
CN115840816A (en) Method and device for generating abstract text

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