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

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

Info

Publication number
CN113254897A
CN113254897A CN202110522282.1A CN202110522282A CN113254897A CN 113254897 A CN113254897 A CN 113254897A CN 202110522282 A CN202110522282 A CN 202110522282A CN 113254897 A CN113254897 A CN 113254897A
Authority
CN
China
Prior art keywords
information
verification
character string
verified
target
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.)
Granted
Application number
CN202110522282.1A
Other languages
Chinese (zh)
Other versions
CN113254897B (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

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
    • 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

Landscapes

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

Abstract

The present disclosure relates to an information verification method, apparatus, server, and storage medium, the 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 identifier; 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 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 purpose of supporting identification; information input habits of different languages are comprehensively considered, the recognition capability of information of multiple 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 communication technologies, and in particular, to an information verification method, an information verification apparatus, a server, a storage medium, and a computer program product.
Background
With the continuous development of electronic technology, various application programs are generated; in order to ensure the use safety of the application program, when a user operates the application program, operation verification generally needs to be performed according to the importance of an operation scene.
At present, a digital verification code is generally sent to a terminal device bound by a user in a short message manner; 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 the local language, so that the verification fails once, and a user can perform the verification again after waiting for a certain interval to obtain the verification code again.
Therefore, the existing verification method cannot be adapted to the information input form of the small language region, and the efficiency of verifying the multi-language information is low.
Disclosure of Invention
The present disclosure provides an information verification method, apparatus, server, storage medium, and computer program product, to at least solve the problem in the related art that the efficiency of verification operation by a user in an overseas area is low. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments 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 identifier;
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 a preset character string, confirming that the information verification request passes verification; and the preset character string is matched with the verification scene identification and the terminal identification of the terminal.
In an exemplary embodiment, before confirming that the information verification request is verified to be valid 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 identification from a plurality of matching relations; a plurality of matching relations constructed by the identification and the character string are stored in the preset database;
and acquiring a character string matched with the target identifier from the target matching relationship to serve 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 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 identification and the character string according to the target identification 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:
carrying out encryption processing on the verification information;
generating a character string corresponding to the verification information according to the encrypted verification information and the verification scene identification;
generating a target character string according to the converted information to be verified and the verification scene identifier, wherein the generating of the target character string comprises the following steps:
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 identification.
In an exemplary embodiment, the performing language conversion on the information to be verified to obtain the converted information to be verified includes:
acquiring an area 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 target information matched with a plurality of information;
querying the language mapping table to obtain target information matched with each piece of information in the to-be-verified information;
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 time length between the target identification and the character string according to the time difference value between 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 a preset effective duration.
In an exemplary embodiment, after confirming that the information verification request is verified if the target character string is the same as a preset character string, the method further includes:
and returning verification success information to the terminal, and deleting the target matching relationship from the preset database.
According to a second aspect of the embodiments of the present disclosure, there is provided an information verification apparatus including:
a request receiving unit configured to perform an information verification request transmitted by 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 identifier;
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 generate a target character string according to the converted information to be verified and the verification scene identifier;
a request verification unit configured to confirm that the information verification request is verified if the target character string is the same as a preset character string; and 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 is further configured to perform generating a target identifier corresponding to the to-be-verified information according to a terminal identifier of the terminal and the verification scene identifier; inquiring a preset database, and obtaining a target matching relation corresponding to the target identification from a plurality of matching relations; a plurality of matching relations constructed by the identification and the character string are stored in the preset database; and acquiring a character string matched with the target identifier from the target matching relationship to serve as the preset character string.
In an exemplary embodiment, the information verification apparatus further includes a matching relationship construction unit configured to perform generating verification information corresponding to an information acquisition request sent by the terminal in response 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 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 identification and the character string according to the target identification corresponding to the verification information and the character string corresponding to the verification information.
In an exemplary embodiment, the matching relation constructing unit is further configured to perform an encryption process on the verification information; generating a character string corresponding to the verification information according to the encrypted verification information and the verification scene identification; the character string generation 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 identification.
In an exemplary embodiment, the language conversion unit is further configured to perform obtaining an area identifier matching the verification scenario 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 target information matched with a plurality of information; querying the language mapping table to obtain target information matched with each piece of information in the to-be-verified information; 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 verifying apparatus further includes a time information accumulating unit configured to perform acquiring the construction time information of the target matching relationship; determining the accumulated matching time length between the target identification and the character string according to the time difference value between 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 a 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 delete the target matching relationship from the preset database.
According to a third aspect of the embodiments of the present disclosure, there is provided a server, including: 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 the at least one processor of a device reads and executes the computer program, causing the device to perform the information verification method described in any one of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
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 identifier; 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 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 a verification scene identifier, and correspondingly converting to obtain converted information to be verified; after a target character string is generated by combining the verification scene identification, the target character string is compared with a preset character string to confirm whether a verification request passes or not, so that the information to be verified in different languages is converted to achieve the aim of facilitating identification; information input habits of different languages are comprehensively considered, the recognition capability of information of multiple 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 present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a diagram illustrating an application environment of a method of information verification according to an example embodiment.
FIG. 2 is a flow chart illustrating a method of information verification according to an example embodiment.
Fig. 3 is a flowchart illustrating steps of acquiring a character string matching a target identifier as a preset character string according to an exemplary embodiment.
FIG. 4 is a flowchart illustrating steps for building a target matching relationship in accordance with an exemplary embodiment.
FIG. 5 is a flowchart illustrating steps for obtaining converted information to be authenticated according to an example embodiment.
Fig. 6 is a block diagram illustrating an information authentication device according to an example embodiment.
FIG. 7 is a block diagram illustrating a server in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in 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 above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The information verification method provided by the present disclosure may be applied to an application environment as shown in fig. 1. Wherein the terminal 110 interacts with the server 120 through the network. Referring to fig. 1, the server 120 receives an information authentication request transmitted by the terminal 110; 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 identifier; 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 identifier; if the server 120 detects that the target character string is the same as the preset character string, the information verification request is confirmed to pass verification; the preset character string matches both the verification scene identifier and the terminal identifier of the terminal 110.
The terminal 110 may be, but is not limited to, various smart phones, tablet computers, notebook computers, or the like, and the server 120 may be implemented by an independent 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, where, as shown in fig. 2, the information verification method is used in the server 120 shown in fig. 1, and includes the following steps:
in step S210, an information verification request sent by the 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 identifier.
The terminal refers to terminal equipment needing information verification; the information verification request refers to that the terminal acquires 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 identification refers to the scene under which the to-be-verified request and the to-be-verified information are triggered by operation. For example, when an operation of filling in an authentication code is required when an account is logged in, the authentication scene identifier may be "logged in"; and for example, when the operation of modifying the password is triggered, the verification scene identifier may be 'password modification', and the verification scene identifier can be used to distinguish the information to be verified and the information verification request, so as to avoid confusion when a plurality of information verification requests exist simultaneously.
The language is language information used by the information to be verified, for example, the language may include english, chinese, french, russian, spanish, arabic, bangladesh, indian, and the like; the way in which the same thing is expressed in different languages, e.g. Arabic numeral 1, in Arabic, Han
Figure BDA0003064438740000071
In Hindi is
Figure BDA0003064438740000072
In Bengal is
Figure BDA0003064438740000073
The verification scene marks the language information associated with the 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 on the login interface, for example, 123456 is input, and meanwhile, the login interface is displayed in english, and then 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 that the information to be verified is '123456', the verification scene identifier is 'login' and the language associated with the verification scene identifier is 'English' through the information verification request.
In the step, the server receives the information verification request sent by the terminal, and simultaneously acquires a plurality of information required for verifying the information to be verified, so that whether the information needs to be converted in language or not and the initial language and the target language for converting the language of the information to be verified are determined, and the efficiency of information verification operation of users in overseas areas is improved.
In step S220, language conversion is performed on the information to be verified to obtain the 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 identifier are determined, the server can perform language conversion on the information to be verified one by one or simultaneously according to the determined languages; the information to be authenticated is, for example, Arabic
Figure BDA0003064438740000074
After the server finishes mapping, the obtained information in the Arabic numeral form is '11111', and meanwhile, the information in the Arabic numeral form is also called the 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.
The verification code has the characteristic of high concurrency, so that the data to be verified and the verified data are stored by adopting a key-value distributed storage database; a key-value distributed storage database, wherein key refers to a keyword, and value refers to a value corresponding to the keyword; therefore, when the information to be verified is verified, a value corresponding to the information to be verified is actually searched in the database. Meanwhile, in order to ensure the security and the data performance 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 identification, so that the consistency of the verification scene can be ensured during verification. The efficiency and the accuracy rate of verification are improved.
In step S240, if the target character string is the same as the preset character string, the information 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 is an identifier of a terminal device that sends the information verification request, such as a Mobile phone number, an IMEI (International Mobile Equipment Identity), and the like.
Specifically, the preset character string is matched with both the verification scene identifier and the terminal identifier of the terminal, so that the consistency of the verification scene can be ensured, and the target character string of the verification scene A and the preset character string of the verification scene B are prevented from being matched and verified by mistake; in addition, the consistency of the terminals verified before and after can be ensured, the efficiency of searching the corresponding preset character string in the preset database can be reduced by the terminal identification matching, and the accuracy of information verification is improved.
In the information verification method, an information verification request sent by a receiving 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 identifier; 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 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 a verification scene identifier, and correspondingly converting to obtain converted information to be verified; after a target character string is generated by combining the verification scene identification, the target character string is compared with a preset character string to confirm whether a verification request passes or not, so that the information to be verified in different languages is converted to achieve the aim of facilitating identification; information input habits of different languages are comprehensively considered, the recognition capability of information of multiple languages is enhanced, and the information verification efficiency is improved.
In an exemplary embodiment, as shown in fig. 3, in step S240, before the confirming the information verification request is verified to be passed if the target character string is the same as the preset character string, the method further includes:
step S310, generating a target identification corresponding to the information to be verified according to the terminal identification and the verification scene identification of the terminal;
step S320, inquiring a preset database, and obtaining a target matching relation corresponding to the target identifier from the plurality of matching relations; a plurality of matching relations constructed by the identification and the character string are stored in the preset database;
step S330, acquiring a 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 identifications and character strings; the preset database may be a redis database (a key-value storage system); the matching relations between the target identifications and the character strings are key-value pairs stored in the database. The preset character string is a character string which is stored in a redis database in advance and used for verifying the target character string. The target matching relationship is the matching relationship which is searched from the matching relationships and contains the target identification, and the target matching relationship is the object searched at this time.
In a redis database, a target identifier of information to be verified is equivalent to a key in a key-value, and a matching relation between the target identifier and a character string can be obtained from a preset database according to the key, so that an association relation between the key and the corresponding value is obtained; the character string corresponds to a value corresponding to a key in the key-value database.
Specifically, for example, if the terminal uses the mobile phone number "+ 86123456" as the terminal identifier and the authentication context information is AAA, the target identifier of the information to be authenticated is generated according to the terminal identifier and the authentication context identifier of the terminal, which may be "AAA _ + 86123456". And the redis database stores key-value pairs with key of "AAA _ + 86123456" and value of "123456" in advance, the target matching relationship of "AAA _ +86123456 and 123456" can be found through the target identifier of "AAA _ + 86123456", and the value corresponding to "AAA _ + 86123456" is further identified as "123456" from the target matching relationship, and is used as the preset character string for matching.
In the embodiment, the server queries the target matching relationship 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 relationship to serve as the preset character string; the matching relation can accurately find the character string for verification, and 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, responding to an information acquisition request sent by a terminal, and generating verification information corresponding to the information acquisition request; 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 identification corresponding to the verification information according to the verification scene identification and the terminal identification;
step S440, according to the target identification corresponding to the verification information and the character string corresponding to the verification information, a target matching relationship between the target identification and the character string is established.
The information acquisition request refers to a request sent by a terminal needing to be verified in a certain verification scene, and after receiving the information acquisition request, the server generates unique verification information and returns the verification information to the terminal, wherein the unique verification information can be regarded as a form of a verification code issued by the server. For example, the server generates and returns the verification code "954785" after receiving the information acquisition request.
The character string corresponding to the verification information is a new character string generated together according to the verification information and the verification scene identification. And in the constructed target matching relationship, the target identifier is regarded as a key, the character string corresponding to the verification information is regarded as a value, and the key value pair key-value constructed by the target identifier and the character string corresponding to the verification information is regarded as the target matching relationship between the target identifier and the character string.
Specifically, generating unique verification information corresponding to the information acquisition request as a verification code and sending the verification code to the terminal, constructing a structural body, writing the verification information and the verification scene identification into the structural body, and converting the written structural body into a json character string to obtain a character string corresponding to the verification information; and storing the obtained character string as value in a redis database. As can be seen, the character string corresponding to the verification information is obtained by converting a structure including the verification scene information, the verification information corresponding to the information acquisition request, and the like into a json character string, and the character string is also a preset character string previously stored in the redis database and used for subsequent 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 by constructing the target matching relation 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 a target character string according to the converted to-be-verified information 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 may 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 structural body, and then the json character string is converted on the structural body, so as to obtain the target character string.
According to the embodiment, the converted information to be verified is encrypted, so that the outside cannot directly acquire the information to be verified, and the safety of the information to be verified is improved.
In an exemplary embodiment, in step S430, generating a character string corresponding to the verification information according to the verification information and the verification scene identifier 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 identification after the encryption processing.
Specifically, when generating the character string corresponding to the verification information, the verification information may be encrypted, and the character string corresponding to the verification information is generated by using the verification information and the verification scene identifier after the encryption processing, so as to obtain the character string corresponding to the verification information after the encryption processing.
According to the embodiment, the corresponding character string is obtained after the encryption processing is carried out on the verification information, so that the external world cannot directly obtain the information to be verified, and the safety of the information to be verified is improved.
In an exemplary embodiment, as shown in fig. 5, in step S220, performing language conversion on the information to be verified to obtain the converted information to be verified includes:
step S510, obtaining an area identifier matched with the verification scene identifier;
step S520, 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 target information matched with a plurality of information;
step S530, querying the language mapping table to obtain target information matched with each piece of information in the information to be verified;
and 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 area identification is an identification capable of determining a geographic area; for example, the terminal is used in the arabic region, the region identification may be "the arabic region" so that the server recognizes the usage region of the terminal.
The language mapping table is a mapping table containing at least two languages and a corresponding relation between character information of the two languages; the correspondence between the digits in Arabic and the partial information of Arabic numerals is, for example
Figure BDA0003064438740000111
Figure BDA0003064438740000112
The mapping table containing the corresponding relationship is the language mapping table matched with the region identifier of the Arabic region.
Wherein the content of the first and second substances,
Figure BDA0003064438740000113
in the table, 0 is the character information in the information to be verified
Figure BDA0003064438740000114
And matching target character information.
Specifically, the server can obtain and query the language mapping table to obtain the information to be verified, such as arabic language
Figure BDA0003064438740000115
Replacing each character information in the Chinese character information with '012345'; i.e. the information to be verified before conversion is
Figure BDA0003064438740000116
The information to be verified after conversion is "012345". It should be noted that the representation form of the information is not limited to one type of character information, but may be other forms of information types that can be used for conversion.
In the above embodiment, the server can correspondingly obtain the language mapping table matched with the verification scene identifier through the area identifier matched with the verification scene identifier; and further converting each character information in the information to be verified according to the mapping table to obtain information consistent with the language used by the server after conversion. Therefore, the support for different information verification forms of a plurality of language regions is realized, and the efficiency of information verification operation of users in overseas regions 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: acquiring 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 between the current time information and the construction time information; and when the accumulated matching duration reaches the preset effective duration, deleting the target matching relationship from the preset database.
The construction time information refers to time information corresponding to the target matching relationship generation time; the difference between the current time information and the generated time information is the accumulated matching time length between the target identifier and the character string, that is, the time length of the key-value pair formed by the key and the value, that is, 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 valid any more; this corresponds to a time limit on the availability of the authentication code, which is set by a predetermined validity period, and the authentication code is invalidated after the time limit is exceeded.
For example, at 12: when 00, the target identification and the character string construct a target matching relationship, and then the time information is constructed to include 12: 00 information of this time node; if the current time is 12: 10, the current time information includes 12: 10 information of this time node; the accumulated matching duration between the target identification and the character string is 12: 10 and 12: a difference of 00, i.e. 10 minutes; if the preset effective duration is set to be 15 minutes, the accumulated matching duration does not reach 15 minutes of the preset effective duration; after 6 minutes, the time node in the current time information becomes 12: and 16, when the accumulated matching time reaches 16 minutes and exceeds 15 minutes of the preset effective time, the target matching relation is invalid, and the target matching relation is deleted by the server immediately.
In the embodiment, the accumulated matching time length is compared with the preset effective time length by setting the threshold of the preset effective time length, and whether the matching relation is invalid or not is judged according to the comparison result; if the terminal fails, returning information of verification failure to the terminal, prompting that the verification is not passed due to overtime, 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 continuously through the target identification, and the safety of the verification information is protected.
In an exemplary embodiment, in step S240, after the validation of the confirmation information verification request is verified if the target character string is the same as the preset character string, the method further includes: and returning verification success information to the terminal, and deleting the target matching relation from the preset database.
The verification success information is reminding information for reminding that the information verification request of the terminal passes.
Specifically, in order to reduce the 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 pair in the redis database is deleted.
In the embodiment, the terminal personnel is reminded to know the information verification result by sending the verification success information to the terminal; meanwhile, the target matching relation containing the verification information is deleted, and the safety of verification information storage is guaranteed.
In an exemplary embodiment, a verification code verification method using the information verification method is further provided, which specifically includes:
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. Transmitting verification code information to the terminal, including: 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 keyword information key according to the scene and the mobile phone number, for example, if the scene information is AAA and the mobile phone number is +86123456, the formed keyword key may be AAA _ + 86123456; generating random numbers with 4 bits, 6 bits or higher bits as verification codes sent to the terminal according to the verification difficulty of the verification scene; constructing to obtain a structural body; writing scene information, a result obtained after the encryption of the verification code, a time stamp and other parameters into a structural body, and converting the written structural body into a json character string as a value (preset character string) corresponding to the keyword information key; and storing the key information key and the corresponding value as a key value pair key-value into a redis database, and setting an expiration date, for example, 15 minutes.
Verifying the verification code backfilled by the terminal, comprising: receiving backfill identifying code information of a certain terminal, taking a mobile phone number of the terminal corresponding to the backfill identifying code information as a terminal identifier, taking carried scene information as an identifying scene identifier, and generating key word information key, wherein the scene information is AAA and the mobile phone number is +86123456, the key information key can be AAA _ + 86123456; finding a corresponding value (preset character string) from a redis database according to the keyword information key, and marking the value as value 1; obtaining verification information of backfill from backfill verification code information
Figure BDA0003064438740000131
If the verification scene identification determines that the associated language is Arabic, correspondingly converting verification information of the Arabic into a digital form; in Arabic language mapping table records
Figure BDA0003064438740000132
Then the information is verified
Figure BDA0003064438740000133
Converted to "1234"; constructing a structural body, writing parameters such as scene information, an encrypted result of a verification code, a timestamp and the like into the structural body, converting the written structural body into a json character string, and marking the json character string as a value (target character string) corresponding to the keyword information key as value 2; comparing the value1 with the value2, if the value1 is the same as the value2, the verification is confirmed to be passed, and if the value1 is not the same as the value2 or the validity period exceeds the preset time limit, the verification is confirmed to be not passed.
According to the embodiment, the language mapping table is used for performing language conversion on the Chinese verification information during verification, so that the verification codes in the Chinese area can be successfully matched, a user does not need to repeatedly modify and backfill the verification information for many times, the user experience is enhanced, and the verification efficiency is improved. Meanwhile, the expansibility of different language verification functions in different regions is improved, so that the verification functions can be deployed globally.
It should be understood that although the various steps in the flow charts of fig. 2-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
Fig. 6 is a block diagram illustrating an information authentication device according to an example embodiment. Referring to fig. 6, the apparatus includes a request receiving unit 610, a language conversion unit 620, a character string generation unit 630, and a request authentication unit 640.
The request receiving unit 610 is configured to perform an information verification request transmitted by the 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 identifier;
a language conversion unit 620 configured to perform language conversion on the information to be verified to obtain converted information to be verified;
a character string generating unit 630 configured to generate a target character string according to the converted information to be verified and the verification scene identifier;
a request verification unit 640 configured to perform confirmation that the information verification request is verified if the target character string is the same as 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 and the verification scene identifier of the terminal; inquiring a preset database, and obtaining a target matching relation corresponding to the target identification from a plurality of matching relations; a plurality of matching relations constructed by the identification and the character string are stored in the preset database; and acquiring a character string matched with the target identifier from the target matching relation as a preset character string.
In an exemplary embodiment, the information verification apparatus further includes a matching relationship construction unit configured to perform generating 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 relation between the target identification and the character string according to the target identification 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 an encryption process on the verification information; generating a character string corresponding to the verification information according to the verification information and the verification scene identification after the encryption processing; a character string generating unit 630, 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 an area identifier matching the verification scenario 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 target information matched with a plurality of information; querying 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 acquiring the 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 between the current time information and the construction time information; and when the accumulated matching duration reaches the preset effective duration, deleting the target matching relationship from the preset database.
In an exemplary embodiment, the information verification apparatus further includes a matching relationship deletion unit configured to perform returning verification success information to the terminal and delete the target matching relationship from the preset database.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram illustrating an apparatus 700 for performing the above-described information verification method according to an example embodiment. For example, device 700 may be a server. Referring to fig. 7, device 700 includes a processing component 720 that further includes one or more processors, and memory resources, represented by memory 722, for storing instructions, such as applications, that are executable by processing component 720. The application programs 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 above-described method of information verification.
The device 700 may also include a power component 724 configured to perform power management for 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. Device 700 may operate based on an operating system stored in memory 722, such as Window 77 over, Mac O7X, Unix, Linux, FreeB7D, or the like.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as memory 722 comprising instructions, executable by a processor of device 700 to perform the above-described method is also provided. The storage medium may be a computer-readable storage medium, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided a computer program product including a computer program stored in a computer-readable storage medium, from which at least one processor of a device reads and executes the computer program, causing the device to perform the information verification method in any one of the embodiments of the present 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 variations, uses, or adaptations of the disclosure following, in general, the 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 will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

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 identifier;
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 a preset character string, confirming that the information verification request passes verification; and the preset character string is matched with the verification scene identification and the terminal identification of the terminal.
2. The information verification method according to claim 1, wherein before confirming that the information verification request is verified if the target character string is the same as a preset character string, the method further comprises:
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 identification from a plurality of matching relations; a plurality of matching relations constructed by the identification and the character string are stored in the preset database;
and acquiring a character string matched with the target identifier from the target matching relationship to serve 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 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 identification and the character string according to the target identification 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 identifier includes:
carrying out encryption processing on the verification information;
generating a character string corresponding to the verification information according to the encrypted verification information and the verification scene identification;
generating a target character string according to the converted information to be verified and the verification scene identifier, wherein the generating of the target character string comprises the following steps:
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 identification.
5. The information verification method 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 an area 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 target information matched with a plurality of information;
querying the language mapping table to obtain target information matched with each piece of information in the to-be-verified information;
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 the target matching relationship between the target identifier and the character string:
acquiring construction time information of the target matching relationship;
determining the accumulated matching time length between the target identification and the character string according to the time difference value between 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 a preset effective duration.
7. An information authentication apparatus, comprising:
a request receiving unit configured to perform an information verification request transmitted by 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 identifier;
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 generate a target character string according to the converted information to be verified and the verification scene identifier;
a request verification unit configured to confirm that the information verification request is verified if the target character string is the same as a preset character string; and the preset character string is matched with the verification scene identification and the terminal identification of the terminal.
8. 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 6.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of a server, enable the server to perform the information verification method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the information verification method of any one of claims 1 to 6 when executed by a processor.
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 true CN113254897A (en) 2021-08-13
CN113254897B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705167A (en) * 2021-08-31 2021-11-26 平安普惠企业管理有限公司 Character checking method, device, equipment and storage medium
CN113726576A (en) * 2021-08-31 2021-11-30 平安医疗健康管理股份有限公司 Method, device and equipment for constructing network adaptation framework and storage medium

Citations (5)

* 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
US20200175495A1 (en) * 2018-11-30 2020-06-04 Square, Inc. Offline onboarding of trackable transaction instrument with associated profile
CN111327570A (en) * 2018-12-14 2020-06-23 北京京东尚科信息技术有限公司 Authentication method, apparatus and computer-readable storage medium

Patent Citations (5)

* 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
US20200175495A1 (en) * 2018-11-30 2020-06-04 Square, Inc. Offline onboarding of trackable transaction instrument with associated profile
CN111327570A (en) * 2018-12-14 2020-06-23 北京京东尚科信息技术有限公司 Authentication method, apparatus and computer-readable storage medium

Cited By (4)

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

Also Published As

Publication number Publication date
CN113254897B (en) 2024-01-05

Similar Documents

Publication Publication Date Title
US10073916B2 (en) Method and system for facilitating terminal identifiers
KR102242766B1 (en) Identity registration method and device
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
CN107040518B (en) Private cloud server login method and system
CN113254897B (en) Information verification method, device, server and storage medium
CN112367164B (en) Service request processing method and device, computer equipment and storage medium
CN108287823B (en) Message data processing method and device, computer equipment and storage medium
CN110516471B (en) Product promotion method based on information security and related equipment
US20180262491A1 (en) Method, apparatus, and client terminal device for implementing website fingerprint login
US20110264767A1 (en) Interactive processing method and apparatus between content-id management servers
KR102055897B1 (en) Authentication Method and System for Service Connection of Internet Site using Phone Number
CN115795538A (en) Desensitization document anti-desensitization method, apparatus, computer device and storage medium
EP3734484A1 (en) System for providing query processing service on basis of personal information protection
CN110930193B (en) Advertisement conversion rate evaluation method, advertisement conversion rate evaluation device, computer equipment and storage medium
CN106933615B (en) APP awakening method and device
CN111488546A (en) Page generation method and device 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
CN106941496B (en) login verification method and device
CN110598426B (en) Data communication method, device, equipment and storage medium based on information security
CN110768925B (en) Verification method and device for verification code short message
CN107370603B (en) Identity authentication method, server and computer readable storage medium
KR101381979B1 (en) System and method for maintaining user contact number by user authentication information
CN112069488B (en) Application login method in communication program and related device thereof

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