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

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

Info

Publication number
CN113254897B
CN113254897B CN202110522282.1A CN202110522282A CN113254897B CN 113254897 B CN113254897 B CN 113254897B CN 202110522282 A CN202110522282 A CN 202110522282A CN 113254897 B CN113254897 B CN 113254897B
Authority
CN
China
Prior art keywords
information
verification
target
character string
identifier
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.)
Active
Application number
CN202110522282.1A
Other languages
Chinese (zh)
Other versions
CN113254897A (en
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110522282.1A priority Critical patent/CN113254897B/en
Publication of CN113254897A publication Critical patent/CN113254897A/en
Application granted granted Critical
Publication of CN113254897B publication Critical patent/CN113254897B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2133Verifying human interaction, e.g., Captcha

Abstract

The disclosure relates to an information verification method, device, server and storage medium, wherein the method comprises the following steps: receiving an information verification request sent by a terminal; the information verification request carries a verification scene identifier and information to be verified; the languages of the information to be verified are the same as the languages associated with the verification scene identification; performing language conversion on the information to be verified to obtain converted information to be verified; generating a target character string according to the converted information to be verified and the verification scene identification; if the target character string is the same as the preset character string, confirming that the information verification request passes the verification; the preset character string is matched with the verification scene identification and the terminal identification of the terminal. The method and the device can convert the information to be verified in different languages so as to achieve the aim of supporting identification; the information input habits of different languages are comprehensively considered, the recognition capability of information of a plurality of languages is enhanced, and the information verification efficiency is improved.

Description

Information verification method, device, server and storage medium
Technical Field
The present disclosure relates to the field of network communications technologies, and in particular, to an information verification method, an apparatus, a server, a storage medium, and a computer program product.
Background
With the continuous development of electronic technology, various application programs have been developed; in order to ensure the use safety of the application program, a user generally needs to perform operation verification according to the importance of an operation scene when operating the application program.
At present, a digital verification code is usually sent to terminal equipment bound by a user in a short message mode; however, some overseas regions have different digital input habits, and after receiving the verification code, the verification code is habitually backfilled in a digital expression form in a local language, so that single verification fails, and a user needs to wait for a certain interval of time to acquire the verification code again before re-verification.
Therefore, the existing verification method cannot be suitable for the information input form of the small language area, and the efficiency of verifying the multilingual information is low.
Disclosure of Invention
The disclosure provides an information verification method, an information verification device, a server, a storage medium and a computer program product, which are used for at least solving the problem that verification code verification operation efficiency of users in offshore areas is low in the related art. The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided an information verification method, including:
Receiving an information verification request sent by a terminal; the information verification request carries a verification scene identifier and information to be verified; the language of the information to be verified is the same as the language associated with the verification scene identification;
performing language conversion on the information to be verified to obtain converted information to be verified;
generating a target character string according to the converted information to be verified and the verification scene identifier;
if the target character string is the same as the preset character string, confirming that the information verification request passes verification; and the preset character string is matched with the verification scene identifier and the terminal identifier of the terminal.
In an exemplary embodiment, before confirming that the information verification request passes the verification if the target character string is the same as a preset character string, the method further includes:
generating a target identifier corresponding to the information to be verified according to the terminal identifier of the terminal and the verification scene identifier;
inquiring a preset database, and obtaining a target matching relation corresponding to the target identifier from a plurality of matching relations; the preset database stores a plurality of matching relations constructed by the identification and the character strings;
And acquiring a character string matched with the target identifier from the target matching relation as the preset character string.
In an exemplary embodiment, the target matching relationship is obtained by:
responding to an information acquisition request sent by the terminal, and generating verification information corresponding to the information acquisition request; the information acquisition request carries the verification scene identifier and the terminal identifier;
generating a character string corresponding to the verification information according to the verification information and the verification scene identifier;
generating a target identifier corresponding to the verification information according to the verification scene identifier and the terminal identifier;
and constructing a target matching relationship between the target identifier and the character string according to the target identifier corresponding to the verification information and the character string corresponding to the verification information.
In an exemplary embodiment, the generating a character string corresponding to the verification information according to the verification information and the verification scene identifier includes:
encrypting the verification information;
generating a character string corresponding to the verification information according to the verification information after encryption processing and the verification scene identification;
Generating a target character string according to the converted information to be verified and the verification scene identifier, including:
encrypting the converted information to be verified; the encryption processing mode of the converted information to be verified is the same as the encryption processing mode of the verification information;
and generating the target character string according to the encrypted information to be verified and the verification scene identifier.
In an exemplary embodiment, the performing language conversion on the information to be verified to obtain converted information to be verified includes:
acquiring a region identifier matched with the verification scene identifier;
acquiring a language mapping table matched with the area identifier as a language mapping table matched with the verification scene identifier; the language mapping table comprises a plurality of target information matched with the information;
inquiring the language mapping table to obtain target information matched with each piece of information in the information to be verified;
and replacing each piece of information in the information to be verified with the matched target information to obtain the converted information to be verified.
In an exemplary embodiment, after constructing the target matching relationship between the target identifier and the character string, the method further includes:
Acquiring construction time information of the target matching relationship;
determining the accumulated matching duration between the target identifier and the character string according to the time difference value of the current time information and the construction time information;
and deleting the target matching relation from the preset database when the accumulated matching duration reaches the preset effective duration.
In an exemplary embodiment, after confirming that the information verification request passes the verification if the target string is the same as a preset string, the method further includes:
and returning verification success information to the terminal, and deleting the target matching relation from the preset database.
According to a second aspect of the embodiments of the present disclosure, there is provided an information authentication apparatus including:
a request receiving unit configured to perform an information authentication request transmitted from a receiving terminal; the information verification request carries a verification scene identifier and information to be verified; the language of the information to be verified is the same as the language associated with the verification scene identification;
the language conversion unit is configured to perform language conversion on the information to be verified to obtain converted information to be verified;
a character string generating unit configured to perform generation of a target character string according to the converted information to be verified and the verification scene identifier;
A request verification unit configured to perform verification of the information verification request if the target character string is identical to a preset character string; and the preset character string is matched with the verification scene identifier and the terminal identifier of the terminal.
In an exemplary embodiment, the character string generating unit is further configured to generate a target identifier corresponding to the information to be verified according to the terminal identifier of the terminal and the verification scene identifier; inquiring a preset database, and obtaining a target matching relation corresponding to the target identifier from a plurality of matching relations; the preset database stores a plurality of matching relations constructed by the identification and the character strings; and acquiring a character string matched with the target identifier from the target matching relation as the preset character string.
In an exemplary embodiment, the information verification apparatus further includes a matching relationship construction unit configured to perform generation of verification information corresponding to an information acquisition request transmitted in response to the terminal; the information acquisition request carries the verification scene identifier and the terminal identifier; generating a character string corresponding to the verification information according to the verification information and the verification scene identifier; generating a target identifier corresponding to the verification information according to the verification scene identifier and the terminal identifier; and constructing a target matching relationship between the target identifier and the character string according to the target identifier corresponding to the verification information and the character string corresponding to the verification information.
In an exemplary embodiment, the matching relation construction unit is further configured to perform encryption processing on the authentication information; generating a character string corresponding to the verification information according to the verification information after encryption processing and the verification scene identification; the character string generating unit is further configured to perform encryption processing on the converted information to be verified; the encryption processing mode of the converted information to be verified is the same as the encryption processing mode of the verification information; and generating the target character string according to the encrypted information to be verified and the verification scene identifier.
In an exemplary embodiment, the language conversion unit is further configured to perform obtaining a region identifier matching the verification scene identifier; acquiring a language mapping table matched with the area identifier as a language mapping table matched with the verification scene identifier; the language mapping table comprises a plurality of target information matched with the information; inquiring the language mapping table to obtain target information matched with each piece of information in the information to be verified; and replacing each piece of information in the information to be verified with the matched target information to obtain the converted information to be verified.
In an exemplary embodiment, the information verification apparatus further includes a time information accumulation unit configured to perform obtaining construction time information of the target matching relationship; determining the accumulated matching duration between the target identifier and the character string according to the time difference value of the current time information and the construction time information; and deleting the target matching relation from the preset database when the accumulated matching duration reaches the preset effective duration.
In an exemplary embodiment, the information verification apparatus further includes a matching relationship deleting unit configured to perform returning verification success information to the terminal and deleting the target matching relationship from the preset database.
According to a third aspect of embodiments of the present disclosure, there is provided a server comprising: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the information verification method as described in any embodiment of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium comprising: the instructions in the computer-readable storage medium, when executed by a processor of a server, enable the server to perform the information verification method described in any one of the embodiments of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program stored in a computer readable storage medium, from which computer readable storage medium at least one processor of a device reads and executes the computer program, causing the device to perform the information verification method as described in any one of the embodiments of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the information verification request sent by the terminal is received; the information verification request carries a verification scene identifier and information to be verified; the languages of the information to be verified are the same as the languages associated with the verification scene identification; performing language conversion on the information to be verified to obtain converted information to be verified; generating a target character string according to the converted information to be verified and the verification scene identification; if the target character string is the same as the preset character string, confirming that the information verification request passes the verification; the preset character string is matched with the verification scene identification and the terminal identification of the terminal. The method comprises the steps of determining a conversion target of information to be verified through verification scene identification, and correspondingly converting to obtain converted information to be verified; after the target character string is generated by combining the verification scene identification, comparing the target character string with a preset character string, and confirming whether the verification request passes or not, so that the conversion of information to be verified in different languages is realized, and the aim of facilitating identification is fulfilled; the information input habits of different languages are comprehensively considered, the recognition capability of information of a plurality of languages is enhanced, and the information verification efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
Fig. 1 is an application environment diagram illustrating an information verification method according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a method of information verification according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating steps of obtaining a string matching a target identifier as a preset string, according to an exemplary embodiment.
FIG. 4 is a flowchart illustrating steps for constructing a target match relationship, according to an exemplary embodiment.
Fig. 5 is a flowchart illustrating steps of obtaining converted information to be verified, according to an example embodiment.
Fig. 6 is a block diagram illustrating an information authentication apparatus according to an exemplary embodiment.
Fig. 7 is a block diagram of a server, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The information verification method provided by the disclosure can be applied to an application environment as shown in fig. 1. Wherein the terminal 110 interacts with the server 120 through a network. Referring to fig. 1, a server 120 receives an information authentication request transmitted from a terminal 110; the information verification request carries a verification scene identifier and information to be verified; the languages of the information to be verified are the same as the languages associated with the verification scene identification; the server 120 performs language conversion on the information to be verified to obtain converted information to be verified; the server 120 generates a target character string according to the converted information to be verified and the verification scene identification; if the server 120 detects that the target character string is the same as the preset character string, confirming that the information verification request passes the verification; the preset string is matched with both the authentication scene identification and the terminal identification of the terminal 110.
The terminal 110 may be, but not limited to, various smartphones, tablet computers, notebook computers, etc., and the server 120 may be implemented by a stand-alone server or a server cluster formed by a plurality of servers.
Fig. 2 is a flowchart illustrating an information verification method according to an exemplary embodiment, as shown in fig. 2, for use in the server 120 shown in fig. 1, comprising the steps of:
in step S210, an information verification request sent by a terminal is received; the information verification request carries a verification scene identifier and information to be verified; the language of the information to be verified is the same as the language associated with the verification scene identification.
The terminal is terminal equipment which needs to carry out information verification; the information verification request refers to that the terminal has acquired information to be verified as input, backfills the information to be verified to a preset page for generating the information verification request, and sends the information verification request containing the information to be verified to the server after being triggered.
The information to be verified refers to character information data input by the terminal equipment; the scene identifier refers to the scene under which the request to be verified and the information to be verified are triggered by operation. For example, when logging in an account, the operation of filling in the verification code is needed, and the verification scene identifier can be "login"; for example, when the operation of modifying the password is performed, the operation of the verification code is triggered, the verification scene identifier can be "password modification", the verification scene identifier can be used for distinguishing the information to be verified and the information verification request, and the effect of avoiding confusion is achieved when a plurality of information verification requests exist at the same time.
The languages refer to language information used by the information to be verified, and for example, the languages can comprise English, chinese, french, russian, spanish, arabic, bengali, hindi and the like; the same thing is expressed in different languages, such as Arabic number 1, which is expressed in ArabicIn Hindi is +.>In Bengalia is +.>The verification scene identifier is associated with language information of information to be verified, and the server can determine the language adopted by information conversion by inquiring the association relation.
Specifically, the terminal backfills the received verification code after the login interface, for example, inputs 123456, and meanwhile, the login interface is displayed in english, so that the terminal generates and sends an information verification request carrying the information to be verified as "123456" and the verification scene identifier as "login" to the server. The server extracts the information to be verified as '123456' through the information verification request, the verification scene identifier as 'login', and the language associated with the verification scene identifier as 'English'.
The server in the step obtains a plurality of information required for verifying the information to be verified through receiving the information verification request sent by the terminal, and confirms whether the information needs to be subjected to language conversion, and the initial language and the target language of the information to be verified are subjected to language conversion, so that the efficiency of information verification operation of users in overseas regions is improved.
In step S220, language conversion is performed on the information to be verified, so as to obtain converted information to be verified.
Specifically, the information to be verified is composed of a plurality of characters, and when the language of the information to be verified and the language associated with the verification scene identification are determined, the server can perform language conversion on the information to be verified one by one or simultaneously according to the determined language; the information to be verified, such as Arabic, isAfter the mapping is completed, the server obtains the Arabic number form information which is 11111, and meanwhile, the Arabic number form information is also called converted information to be verified.
In step S230, a target character string is generated according to the converted information to be verified and the verification scene identifier.
Because of the high concurrency of the verification code, a key-value distributed storage database is generally adopted to store the data to be verified and the verified data; key-value distributed storage database, key refers to key word, value refers to value corresponding to key word; therefore, when the information to be verified is verified, a value corresponding to the information to be verified is actually found in the database. Meanwhile, in order to ensure the security and the data property in the data transmission process, the information to be verified is usually processed when the information to be verified is input, for example, the information to be verified and the verification scene identifier are fused to obtain the target character string.
In the step, the target character string simultaneously carries the verification scene identifier, so that the consistency of the verification scene can be ensured during verification. The verification efficiency and accuracy are improved.
In step S240, if the target character string is the same as the preset character string, the verification request is confirmed to pass the verification; the preset character string is matched with the verification scene identification and the terminal identification of the terminal.
The preset character string is character string information which is generated in advance and used for judging whether the target character string is correct or not; the terminal identifier refers to an identifier of a terminal device that sends an information authentication request, such as a mobile phone number, IMEI (International Mobile Equipment Identity, international mobile equipment identification code), and the like.
Specifically, the preset character string is matched with the verification scene identifier and the terminal identifier of the terminal, so that the consistency of the verification scene can be ensured, and the situation that the target character string of the verification scene A is matched with the preset character string of the verification scene B in error is avoided; in addition, the consistency of the front and back verified terminals can be ensured, the efficiency of searching the corresponding preset character strings in the preset database can be reduced by terminal identification matching, and the accuracy of information verification is improved.
In the information verification method, an information verification request sent by a terminal is received; the information verification request carries a verification scene identifier and information to be verified; the languages of the information to be verified are the same as the languages associated with the verification scene identification; performing language conversion on the information to be verified to obtain converted information to be verified; generating a target character string according to the converted information to be verified and the verification scene identification; if the target character string is the same as the preset character string, confirming that the information verification request passes the verification; the preset character string is matched with the verification scene identification and the terminal identification of the terminal. The method comprises the steps of determining a conversion target of information to be verified through verification scene identification, and correspondingly converting to obtain converted information to be verified; after the target character string is generated by combining the verification scene identification, comparing the target character string with a preset character string, and confirming whether the verification request passes or not, so that the conversion of information to be verified in different languages is realized, and the aim of facilitating identification is fulfilled; the information input habits of different languages are comprehensively considered, the recognition capability of information of a plurality of languages is enhanced, and the information verification efficiency is improved.
In an exemplary embodiment, as shown in fig. 3, in step S240, before the validation information verification request passes if the target string is the same as the preset string, the method further includes:
step S310, generating a target identifier corresponding to the information to be verified according to the terminal identifier of the terminal and the verification scene identifier;
step S320, inquiring a preset database, and obtaining a target matching relation corresponding to the target identifier from a plurality of matching relations; a plurality of matching relations constructed by the identification and the character strings are stored in a preset database;
step S330, obtaining the character string matched with the target identifier from the target matching relationship as a preset character string.
The preset database is used for storing matching relations between a plurality of target identifiers and character strings; the preset database may be a redis database (a key-value storage system); the matching relationship between the target identifiers and the character strings is a plurality of key-value key value pairs stored in the database. The preset character string refers to a character string which is stored in the redis database in advance and is used for verifying the target character string. The target matching relationship is a matching relationship which is searched from a plurality of matching relationships and contains a target identifier, and is the object searched at the time.
In the redis database, the target identifier of the information to be verified is equivalent to a key in a key-value, and the matching relationship between the target identifier and the character string can be obtained from a preset database according to the key, namely, the association relationship between the key and the corresponding value is obtained; the character string corresponds to a value corresponding to the key in the key-value database.
Specifically, for example, the terminal uses the mobile phone number "+86123456" as the terminal identifier, and the authentication scene information is AAA, and then the target identifier of the information to be authenticated is generated according to the terminal identifier of the terminal and the authentication scene identifier, which may be "aaa_ +86123456". And the redis database is pre-stored with a key value pair with key of 'AAA_ + 86123456' and value of '123456', the target matching relation 'AAA_ + 86123456-123456' can be searched through the target mark 'AAA_ + 86123456', and the value corresponding to 'AAA_ + 86123456' is further identified from the target matching relation as '123456', so as to be used as a preset character string for matching.
According to the embodiment, the server inquires the target matching relation corresponding to the target identifier from the preset database through the target identifier, and further obtains the character string matched with the target identifier from the target matching relation to serve as the preset character string; the matching relation can accurately find the character string used for verification, so that the searching efficiency and accuracy are improved.
In an exemplary embodiment, as shown in fig. 4, in step S210, the target matching relationship is obtained by:
step S410, generating verification information corresponding to the information acquisition request in response to the information acquisition request sent by the terminal; the information acquisition request carries a verification scene identifier and a terminal identifier;
step S420, generating a character string corresponding to the verification information according to the verification information and the verification scene identification;
step S430, generating a target identifier corresponding to the verification information according to the verification scene identifier and the terminal identifier;
step S440, constructing a target matching relation between the target identifier and the character string according to the target identifier corresponding to the verification information and the character string corresponding to the verification information.
The information acquisition request refers to a request sent by a terminal for verification under a certain verification scene, after receiving the information acquisition request, the server generates unique verification information and returns the unique verification information to the terminal, wherein the unique verification information can be regarded as a form of verification code issued by the server. For example, after receiving the information acquisition request, the server generates and returns an authentication code "954785".
The character string corresponding to the verification information refers to a new character string generated according to the verification information and the verification scene identifier. In the constructed target matching relationship, the target identifier is regarded as a key, and the character string corresponding to the verification information is regarded as a value, so that a key-value pair constructed by the target identifier and the character string corresponding to the verification information is used as the target matching relationship between the target identifier and the character string.
Specifically, generating unique verification information corresponding to the information acquisition request, sending the unique verification information as a verification code to a terminal, constructing a structural body, writing the verification information and a verification scene identifier into the structural body, and converting the written structural body into a json character string to obtain the character string corresponding to the verification information; the obtained character string is stored as a value in a redis database. It can be seen that the character string corresponding to the verification information is a character string obtained by converting a structure body containing verification scene information, verification information corresponding to an information acquisition request, and the like into a json character string, and the character string is also a preset character string pre-stored in the redis database for verification with the target character string.
According to the embodiment, the safety in the verification process is ensured through the verification information corresponding to the information acquisition request, and the corresponding character string can be quickly and accurately found during verification through constructing the target matching relationship between the target identifier and the character string, so that the efficiency of information verification is improved.
In an exemplary embodiment, in step S230, generating the target character string according to the converted information to be verified and the verification scene identifier specifically includes: encrypting the converted information to be verified; the encryption processing mode of the converted information to be verified is the same as the encryption processing mode of the verification information; and generating a target character string according to the encrypted information to be verified and the verification scene identifier.
Specifically, when the target character string is generated, encryption processing can be performed on the converted information to be verified, the encrypted information to be verified and the verification scene identifier are stored in a pre-constructed structure body, and then the json character string is converted to obtain the target character string.
According to the embodiment, the converted information to be verified is encrypted, so that the information to be verified cannot be directly obtained by the outside, and the safety of the information to be verified is improved.
In an exemplary embodiment, in step S430, a character string corresponding to the verification information is generated according to the verification information and the verification scene identifier, and specifically includes: encrypting the verification information; and generating a character string corresponding to the verification information according to the verification information and the verification scene identifier after encryption processing.
Specifically, when generating the character string corresponding to the verification information, the verification information may be encrypted first, and the character string corresponding to the verification information is generated by using the encrypted verification information and the verification scene identifier, so as to obtain the character string corresponding to the verification information after the encryption process.
According to the embodiment, the corresponding character string is obtained after the encryption processing is carried out on the verification information, so that the information to be verified cannot be directly obtained by the outside, and the safety of the information to be verified is improved.
In an exemplary embodiment, as shown in fig. 5, in step S220, language conversion is performed on information to be verified, so as to obtain converted information to be verified, including:
step S510, obtaining an area identifier matched with the verification scene identifier;
step S520, obtaining a language mapping table matched with the area identifier as a language mapping table matched with the verification scene identifier; the language mapping table comprises a plurality of target information matched with the information;
step S530, inquiring a language mapping table to obtain target information matched with each piece of information in the information to be verified;
step S540, each piece of information in the information to be verified is replaced by the matched target information, and the converted information to be verified is obtained.
The regional identifier is an identifier capable of determining the geographical region; for example, the terminal is used in an ara region, the region identifier may be "ara region", so that the server identifies the use region of the terminal.
The language mapping table is a mapping table containing at least two languages and the corresponding relation between the character information of the two languages; for example, the correspondence between the digits in Arabic and the partial information of the Arabic digits is The mapping table containing the corresponding relation is the language mapping table matched with the region identifier of the Arabic region.
Wherein,in 0 is +.>Matching target character information.
Specifically, the server can obtain and query the language mapping table to verify the information to be verified, such as arabicThe character information of each character is replaced by '012345'; i.e. the information to be verified before conversion is +.>After conversion to be testedThe syndrome information is "012345". It should be noted that the expression form of the information is not limited to one type of character information, but may be other types of information that can be used for conversion.
According to the embodiment, the server can correspondingly obtain the language mapping table matched with the verification scene identifier through the region identifier matched with the verification scene identifier; according to the mapping table, each character information in the information to be verified can be further converted, and information consistent with languages used by the server is obtained after conversion. The support of different information verification modes in a plurality of language areas is realized, and the efficiency of information verification operation of overseas area users is improved.
In an exemplary embodiment, in step S440, after constructing the target matching relationship between the target identifier and the character string, the method further includes: obtaining construction time information of a target matching relationship; determining the accumulated matching duration between the target identifier and the character string according to the time difference value of the current time information and the construction time information; and deleting the target matching relation from a preset database when the accumulated matching time length reaches the preset effective time length.
The time information is time information corresponding to the generation moment of the target matching relation; the difference between the current time information and the generated time information is the accumulated matching duration between the target identifier and the character string, namely the duration of key and value forming a key value pair, namely the construction time of the key value pair. The preset effective duration refers to the limit time for keeping the matching relationship between the target identifier and the character string, and when the accumulated matching duration exceeds the preset effective duration, the target matching relationship between the target identifier and the character string is not effective any more; the method is equivalent to making a time limit on the availability of the verification code by presetting the effective duration, and the verification code is invalid after exceeding the time limit.
For example, at 12:00, if the target matching relationship between the target identifier and the character string is constructed, the construction time information is 12:00 information of this time node; if the current time is 12:10, namely the current time information is that the current time information comprises 12:10 information of the time node; the cumulative matching duration between the target identifier and the string is 12:10 and 12: a difference of 00, i.e. 10 minutes; if the preset effective duration is set to 15 minutes, accumulating 15 minutes when the matched duration does not reach the preset effective duration; after 6 minutes, i.e. the time node in the current time information becomes 12:16, the accumulated matching time reaches 16 minutes, and 15 minutes longer than the preset effective time, the target matching relation is invalid at the moment, and then the target matching relation is deleted by the server.
In the above embodiment, by setting the threshold value of the preset effective duration, the accumulated matching duration is compared with the preset effective duration, and whether the matching relationship fails is judged according to the comparison result; if the verification fails, returning information of verification failure to the terminal, prompting that the verification timeout is not passed, and waiting for the terminal to initiate a verification request again; in addition, after the matching relation is deleted, the corresponding character string cannot be found out through the target identifier, so that the safety of verification information is protected.
In an exemplary embodiment, in step S240, after the verification request passes if the target string is the same as the preset string, the method further includes: and returning verification success information to the terminal, and deleting the target matching relation from a preset database.
The verification success information is reminding information used for prompting that the information verification request of the terminal passes.
Specifically, in order to reduce security risk, after the information verification request passes verification, the target matching relationship stored in the preset database is deleted, that is, the key-value key value pair in the redis database is deleted.
According to the embodiment, the verification success information is sent to the terminal, so that terminal personnel are reminded of knowing the result of information verification; meanwhile, the target matching relation containing the verification information is deleted, and the security of verification information storage is ensured.
In an exemplary embodiment, there is also provided a verification code verification method to which the information verification method is applied, including:
the verification method of the verification code is divided into two steps, taking a server as an example, and respectively sending verification code information to the terminal and verifying the verification code backfilled by the terminal. Sending verification code information to a terminal, comprising: taking a mobile phone number corresponding to the terminal equipment as a terminal identifier, and taking a scene in which verification occurs as a verification scene identifier; generating a key word information key according to the scene and the mobile phone number, for example, the scene information is AAA, the mobile phone number is +86123456, and the key word key formed can be AAA_ +86123456; generating a random number with 4 bits, 6 bits or higher bits as a verification code sent to the terminal according to the verification difficulty of the verification scene; constructing to obtain a structural body; writing parameters such as scene information, an encrypted result of the verification code, a time stamp and the like into a structure body, and converting the written structure body into a json character string serving as a value (preset character string) corresponding to the key of the key information; the key information key and the corresponding value are stored as a key-value pair in the redis database, and the validity period is set, for example, 15 minutes.
Verifying the verification code of terminal backfill, comprising: receiving backfill verification code information of a certain terminal, taking a mobile phone number of the terminal corresponding to the backfill verification code information as a terminal identifier, taking carried scene information as a verification scene identifier, and generating a key word information key, wherein for example, the scene information is AAA, the mobile phone number is +86123456, and the key word information key formed by the steps can be AAA_ +86123456; searching a corresponding value (preset character string) from a redis database according to the key information key, and marking the value as value1; acquiring backfilled verification information from backfilled verification code informationThe verification scene identification determines that the associated language is Arabic, and correspondingly converts the verification information of the Arabic into a digital form; the Arabic language mapping table records +.>Verification information->Conversion to "1234"; constructing a structure body, and encrypting the scene information and the verification codeWriting parameters such as a result and a timestamp into the structure, converting the written structure into a json character string, and marking the json character string as a value (target character string) corresponding to the key of the key information as value2; and comparing the value1 with the value2, if the value1 is the same as the value2, confirming that the verification is passed, and if the value1 is different from the value2 or the validity period exceeds a preset time limit, confirming that the verification is not passed.
According to the embodiment, the language mapping table is utilized to carry out language conversion on the verification information of the small languages during verification, so that verification codes in the small language areas can be successfully matched, the user does not need to repeatedly modify backfill verification information for many times, the user experience is enhanced, and the verification efficiency is accelerated. And simultaneously, the expansibility of verification functions of different languages in different areas is improved, so that the verification functions can be globally deployed.
It should be understood that, although the steps in the flowcharts of fig. 2-5 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-5 may include multiple steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the steps or stages in other steps or other steps.
Fig. 6 is a block diagram illustrating an information authentication apparatus according to an exemplary embodiment. Referring to fig. 6, the apparatus includes a request receiving unit 610, a language converting unit 620, a character string generating unit 630, and a request verifying unit 640.
The request receiving unit 610 is configured to perform an information authentication request transmitted by a receiving terminal; the information verification request carries a verification scene identifier and information to be verified; the languages of the information to be verified are the same as the languages associated with the verification scene identification;
the language conversion unit 620 is configured to perform language conversion on the information to be verified, so as to obtain converted information to be verified;
a character string generation unit 630 configured to perform generation of a target character string according to the converted information to be verified and the verification scene identification;
a request verification unit 640 configured to perform verification of the confirmation information verification request if the target character string is identical to the preset character string; the preset character string is matched with the verification scene identification and the terminal identification of the terminal.
In an exemplary embodiment, the character string generating unit 630 is further configured to perform generating a target identifier corresponding to the information to be verified according to the terminal identifier of the terminal and the verification scene identifier; inquiring a preset database, and obtaining a target matching relation corresponding to the target identifier from a plurality of matching relations; a plurality of matching relations constructed by the identification and the character strings are stored in a preset database; and acquiring a character string matched with the target identifier from the target matching relationship as a preset character string.
In an exemplary embodiment, the information verification apparatus further includes a matching relationship construction unit configured to perform generation of verification information corresponding to an information acquisition request in response to the information acquisition request transmitted by the terminal; the information acquisition request carries a verification scene identifier and a terminal identifier; generating a character string corresponding to the verification information according to the verification information and the verification scene identification; generating a target identifier corresponding to the verification information according to the verification scene identifier and the terminal identifier; and constructing a target matching relationship between the target identifier and the character string according to the target identifier corresponding to the verification information and the character string corresponding to the verification information.
In an exemplary embodiment, the matching relation construction unit is further configured to perform encryption processing on the authentication information; generating a character string corresponding to the verification information according to the verification information and the verification scene identifier after encryption processing; the character string generating unit 630 is further configured to perform encryption processing on the converted information to be verified; the encryption processing mode of the converted information to be verified is the same as the encryption processing mode of the verification information; and generating a target character string according to the encrypted information to be verified and the verification scene identifier.
In an exemplary embodiment, the language conversion unit 620 is further configured to perform obtaining a region identifier matching the verification scene identifier; acquiring a language mapping table matched with the area identifier as a language mapping table matched with the verification scene identifier; the language mapping table comprises a plurality of target information matched with the information; inquiring a language mapping table to obtain target information matched with each piece of information in the information to be verified; and replacing each piece of information in the information to be verified with the matched target information to obtain the converted information to be verified.
In an exemplary embodiment, the information verification apparatus further includes a time information accumulation unit configured to perform acquisition of construction time information of the acquisition target matching relationship; determining the accumulated matching duration between the target identifier and the character string according to the time difference value of the current time information and the construction time information; and deleting the target matching relation from a preset database when the accumulated matching time length reaches the preset effective time length.
In an exemplary embodiment, the information verification apparatus further includes a matching relationship deleting unit configured to perform returning verification success information to the terminal and deleting the target matching relationship from the preset database.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 7 is a block diagram illustrating an apparatus 700 for performing the above-described information authentication method according to an exemplary embodiment. For example, device 700 may be a server. Referring to fig. 7, the device 700 includes a processing component 720 that further includes one or more processors, and memory resources represented by a memory 722 for storing instructions, such as applications, executable by the processing component 720. The application program stored in memory 722 may include one or more modules that each correspond to a set of instructions. Further, the processing component 720 is configured to execute instructions to perform the method of information verification described above.
The device 700 may also include a power component 724 configured to perform power management of the device 700, a wired or wireless network interface 726 configured to connect the device 700 to a network, and an input output (I/O) interface 728. The device 700 may operate based on an operating system stored in memory 722, such as Window7 7erver,Mac O7 X,Unix,Linux,FreeB7D or the like.
In an exemplary embodiment, a computer-readable storage medium is also provided, such as memory 722, including instructions executable by a processor of device 700 to perform the above-described method. The storage medium may be a computer readable storage medium, for example, a ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program stored in a computer readable storage medium, from which at least one processor of the device reads and executes the computer program, causing the device to perform the information verification method in any one of the embodiments of the disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. An information verification method, comprising:
receiving an information verification request sent by a terminal; the information verification request carries a verification scene identifier and information to be verified; the language of the information to be verified is the same as the language associated with the verification scene identification;
performing language conversion on the information to be verified to obtain converted information to be verified;
generating a target character string according to the converted information to be verified and the verification scene identifier;
if the target character string is the same as the preset character string, confirming that the information verification request passes verification; and the preset character string is matched with the verification scene identifier and the terminal identifier of the terminal.
2. The information authentication method according to claim 1, further comprising, before confirming that the information authentication request authentication passes if the target character string is identical to a preset character string:
Generating a target identifier corresponding to the information to be verified according to the terminal identifier of the terminal and the verification scene identifier;
inquiring a preset database, and obtaining a target matching relation corresponding to the target identifier from a plurality of matching relations; the preset database stores a plurality of matching relations constructed by the identification and the character strings;
and acquiring a character string matched with the target identifier from the target matching relation as the preset character string.
3. The information verification method according to claim 2, wherein the target matching relationship is obtained by:
responding to an information acquisition request sent by the terminal, and generating verification information corresponding to the information acquisition request; the information acquisition request carries the verification scene identifier and the terminal identifier;
generating a character string corresponding to the verification information according to the verification information and the verification scene identifier;
generating a target identifier corresponding to the verification information according to the verification scene identifier and the terminal identifier;
and constructing a target matching relationship between the target identifier and the character string according to the target identifier corresponding to the verification information and the character string corresponding to the verification information.
4. The information verification method according to claim 3, wherein the generating a character string corresponding to the verification information according to the verification information and the verification scene identification includes:
encrypting the verification information;
generating a character string corresponding to the verification information according to the verification information after encryption processing and the verification scene identification;
generating a target character string according to the converted information to be verified and the verification scene identifier, including:
encrypting the converted information to be verified; the encryption processing mode of the converted information to be verified is the same as the encryption processing mode of the verification information;
and generating the target character string according to the encrypted information to be verified and the verification scene identifier.
5. The method for verifying information according to claim 1, wherein the performing language conversion on the information to be verified to obtain the converted information to be verified includes:
acquiring a region identifier matched with the verification scene identifier;
acquiring a language mapping table matched with the area identifier as a language mapping table matched with the verification scene identifier; the language mapping table comprises a plurality of target information matched with the information;
Inquiring the language mapping table to obtain target information matched with each piece of information in the information to be verified;
and replacing each piece of information in the information to be verified with the matched target information to obtain the converted information to be verified.
6. The information verification method according to claim 3, further comprising, after constructing a target matching relationship between the target identifier and the character string:
acquiring construction time information of the target matching relationship;
determining the accumulated matching duration between the target identifier and the character string according to the time difference value of the current time information and the construction time information;
and deleting the target matching relation from the preset database when the accumulated matching duration reaches the preset effective duration.
7. The information authentication method according to claim 2, further comprising, after confirming that the information authentication request authentication passes if the target character string is identical to a preset character string:
and returning verification success information to the terminal, and deleting the target matching relation from the preset database.
8. An information authentication apparatus, comprising:
A request receiving unit configured to perform an information authentication request transmitted from a receiving terminal; the information verification request carries a verification scene identifier and information to be verified; the language of the information to be verified is the same as the language associated with the verification scene identification;
the language conversion unit is configured to perform language conversion on the information to be verified to obtain converted information to be verified;
a character string generating unit configured to perform generation of a target character string according to the converted information to be verified and the verification scene identifier;
a request verification unit configured to perform verification of the information verification request if the target character string is identical to a preset character string; and the preset character string is matched with the verification scene identifier and the terminal identifier of the terminal.
9. The information authentication apparatus according to claim 8, wherein the character string generation unit is further configured to perform generation of a target identifier corresponding to the information to be authenticated based on a terminal identifier of the terminal and the authentication scene identifier; inquiring a preset database, and obtaining a target matching relation corresponding to the target identifier from a plurality of matching relations; the preset database stores a plurality of matching relations constructed by the identification and the character strings; and acquiring a character string matched with the target identifier from the target matching relation as the preset character string.
10. The apparatus according to claim 9, further comprising a matching relationship construction unit configured to execute generation of authentication information corresponding to an information acquisition request transmitted in response to the terminal; the information acquisition request carries the verification scene identifier and the terminal identifier; generating a character string corresponding to the verification information according to the verification information and the verification scene identifier; generating a target identifier corresponding to the verification information according to the verification scene identifier and the terminal identifier; and constructing a target matching relationship between the target identifier and the character string according to the target identifier corresponding to the verification information and the character string corresponding to the verification information.
11. The information authentication apparatus according to claim 10, wherein the matching relationship construction unit is further configured to perform encryption processing of the authentication information; generating a character string corresponding to the verification information according to the verification information after encryption processing and the verification scene identification; the character string generating unit is further configured to perform encryption processing on the converted information to be verified; the encryption processing mode of the converted information to be verified is the same as the encryption processing mode of the verification information; and generating the target character string according to the encrypted information to be verified and the verification scene identifier.
12. The information authentication apparatus according to claim 8, wherein the language conversion unit is further configured to perform acquisition of an area identification matching the authentication scene identification; acquiring a language mapping table matched with the area identifier as a language mapping table matched with the verification scene identifier; the language mapping table comprises a plurality of target information matched with the information; inquiring the language mapping table to obtain target information matched with each piece of information in the information to be verified; and replacing each piece of information in the information to be verified with the matched target information to obtain the converted information to be verified.
13. The information verification apparatus according to claim 10, wherein the apparatus further comprises a time information accumulation unit configured to perform acquisition of construction time information of the target matching relationship; determining the accumulated matching duration between the target identifier and the character string according to the time difference value of the current time information and the construction time information; and deleting the target matching relation from the preset database when the accumulated matching duration reaches the preset effective duration.
14. The information authentication apparatus according to claim 9, further comprising a matching relationship deletion unit configured to perform returning authentication success information to the terminal and deleting the target matching relationship from the preset database.
15. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the information verification method of any one of claims 1 to 7.
16. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of a server, enable the server to perform the information authentication method according to any one of claims 1 to 7.
CN202110522282.1A 2021-05-13 2021-05-13 Information verification method, device, server and storage medium Active CN113254897B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110522282.1A CN113254897B (en) 2021-05-13 2021-05-13 Information verification method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110522282.1A CN113254897B (en) 2021-05-13 2021-05-13 Information verification method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN113254897A CN113254897A (en) 2021-08-13
CN113254897B true CN113254897B (en) 2024-01-05

Family

ID=77181625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110522282.1A Active CN113254897B (en) 2021-05-13 2021-05-13 Information verification method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN113254897B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705167B (en) * 2021-08-31 2024-04-19 中科软科技股份有限公司 Character verification method, device, equipment and storage medium
CN113726576B (en) * 2021-08-31 2023-07-25 平安医疗健康管理股份有限公司 Method, device, equipment and storage medium for constructing network adaptation framework

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101008864A (en) * 2006-01-28 2007-08-01 北京优耐数码科技有限公司 Multifunctional and multilingual input system for numeric keyboard and method thereof
CN108182437A (en) * 2017-12-29 2018-06-19 北京金堤科技有限公司 One kind clicks method for recognizing verification code, device and user terminal
CN108305633A (en) * 2018-01-16 2018-07-20 平安科技(深圳)有限公司 Speech verification method, apparatus, computer equipment and computer readable storage medium
CN111327570A (en) * 2018-12-14 2020-06-23 北京京东尚科信息技术有限公司 Authentication method, apparatus and computer-readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10748135B2 (en) * 2018-11-30 2020-08-18 Square, Inc. Offline onboarding of trackable transaction instrument with associated profile

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101008864A (en) * 2006-01-28 2007-08-01 北京优耐数码科技有限公司 Multifunctional and multilingual input system for numeric keyboard and method thereof
CN108182437A (en) * 2017-12-29 2018-06-19 北京金堤科技有限公司 One kind clicks method for recognizing verification code, device and user terminal
CN108305633A (en) * 2018-01-16 2018-07-20 平安科技(深圳)有限公司 Speech verification method, apparatus, computer equipment and computer readable storage medium
CN111327570A (en) * 2018-12-14 2020-06-23 北京京东尚科信息技术有限公司 Authentication method, apparatus and computer-readable storage medium

Also Published As

Publication number Publication date
CN113254897A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN109587133B (en) Single sign-on system and method
US10073916B2 (en) Method and system for facilitating terminal identifiers
CN113254897B (en) Information verification method, device, server and storage medium
CN108259502B (en) Authentication method for obtaining interface access authority, server and storage medium
CN110610196B (en) Desensitization method, system, computer device and computer readable storage medium
CN110365483B (en) Cloud platform authentication method, client, middleware and system
CN109033857B (en) Method, device and equipment for accessing data and readable storage medium
CN112367164B (en) Service request processing method and device, computer equipment and storage medium
KR102080156B1 (en) Auto Recharge System, Method and Server
CN113271296B (en) Login authority management method and device
CN110912689A (en) Method and system for generating and verifying unique value
CN105072608B (en) A kind of method and device of administrative authentication token
CN106202440B (en) Data processing method, device and equipment
CN113111669B (en) Increment-based front-end multi-language internationalized translation method and device
US20150180851A1 (en) Method, device, and system for registering terminal application
CN107437996B (en) Identity authentication method, device and terminal
CN113067802A (en) User identification method, device, equipment and computer readable storage medium
CN108881320B (en) Authentication processing method for user login, server and client
CN111327680A (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN114422586B (en) Event notification method, event notification device, computer equipment and storage medium
CN114338130B (en) Information processing method, device, server and storage medium
CN115640471A (en) Short link generation method and device, computer equipment and storage medium
CN110460585B (en) Equipment identity identification method and device, computer equipment and storage medium
CN111988781A (en) Verification method and system for safe access of Internet of things equipment
CN115002079B (en) Short address generation method, device, 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
GR01 Patent grant
GR01 Patent grant