Data verification method, device, computer equipment and storage medium
By standardizing the processing of data to be verified and pre-stored data, and using a preset matching verification model for batch matching, the problem of low information verification efficiency in the existing technology is solved, the verification steps are simplified and the efficiency is improved.
Patent Information
- Application Number
- CN201910567211.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-27
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2039-06-27
AI Technical Summary
When verifying user input information, the existing technology needs to load and match user information in multiple storage locations one by one, resulting in high code duplication, complex verification steps, and low efficiency, especially when the information is complex and distributed in multiple storage locations. position.
By receiving the data verification request sent by the terminal, extract the string to be verified and the business node identifier, standardize them according to the verification type to generate the string to be matched and the target string array, and perform the process through the preset matching verification model. Batch matching verification simplifies verification steps.
The efficiency of information verification is improved, the step-by-step search and comparison of multiple pre-stored target data is reduced, and the data verification process is simplified.
Smart Images

Figure CN110442756B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data verification method, device, computer equipment and storage medium. Background Art
[0002] With the rapid development of computer technology, people are exposed to more and more online platforms or applications in their daily lives. In many online scenarios, such as logging into email, logging into social accounts, and mobile payments, it is necessary to verify information such as user names and payment passwords to ensure user security.
[0003] However, when verifying the information input by the user, it is generally necessary to compare and match it with the stored user information. The stored user information may be distributed in different storage locations in the form of multiple sets. At present, the stored information distributed in each storage location can only be loaded one by one, and then matched with the information input by the user respectively. This method requires separate verification code for each stored information, especially when the verified information is more complex. For example, if there are multiple user information to be verified, step-by-step verification is required, and the data distribution of the stored information corresponding to each user information is relatively large, this method results in high code duplication, complex verification steps, and low verification efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide a data verification method, device, computer equipment and storage medium to improve the efficiency of information verification in response to the above technical problems.
[0005] A data verification method, the method comprising:
[0006] A data verification request sent by a receiving terminal;
[0007] Extracting the character string to be verified and the service node identifier from the data verification request;
[0008] Find the pre-stored character string and verification type corresponding to the service node identifier;
[0009] Performing standardization processing on the to-be-checked string according to the verification type to generate a to-be-matched string, and performing standardization processing on the pre-stored string according to the verification type to generate a target string array;
[0010] Inputting the to-be-matched character string and the target character string array into a preset matching verification model to obtain a data verification result;
[0011] The data verification result is returned to the terminal.
[0012] In one embodiment, the step of performing standardization processing on the string to be verified according to the verification type to generate a string to be matched, and performing standardization processing on the pre-stored string according to the verification type to generate a target string array includes:
[0013] When the verification type is an independent verification type, the character string to be verified is standardized to obtain a character string to be matched;
[0014] The pre-stored character strings are combined to obtain a target character string array.
[0015] In one embodiment, the step of performing standardization processing on the string to be verified according to the verification type to generate a string to be matched, and performing standardization processing on the pre-stored string according to the verification type to generate a target string array includes:
[0016] When the verification type is a combined verification type, extracting an element string from the string to be verified, and generating a string to be matched according to the element string;
[0017] A string set corresponding to each of the element strings is extracted from the pre-stored strings, and a target string array is generated according to the string set.
[0018] In one embodiment, generating a string to be matched according to the element string includes:
[0019] When the combination check type is an AND operation subclass, obtaining a preset connector;
[0020] The element character strings are connected through the preset connector to generate a character string to be matched.
[0021] In one embodiment, generating a target string array according to the string set includes:
[0022] Obtaining the concatenation order of each of the element strings in the string to be matched;
[0023] Sorting each of the character string sets according to the concatenation order;
[0024] Connecting the substrings at corresponding positions in each of the sorted string sets through the preset connector to generate a concatenated string;
[0025] Generate a target string array according to the concatenated strings.
[0026] In one embodiment, the step of inputting the to-be-matched character string and the target character string array into a preset matching verification model to obtain a data verification result includes:
[0027] When the combination check type is an OR operation subclass, an element check group is generated according to each of the element strings and the corresponding string set, and the element check groups are input into the preset matching check model one by one;
[0028] When the model output result of the first element verification group is a matching failure, the next element verification group continues to be input into the preset matching verification model until a matching successful model output result is obtained, the data verification is ended, and a data verification result of successful data verification is generated.
[0029] In one embodiment, the step of inputting the to-be-matched character string and the target character string array into a preset matching verification model to obtain a data verification result includes:
[0030] When the combination check type is an AND operation subclass, an element check group is generated according to each of the element strings and the corresponding string set, and the element check groups are input into the preset matching check model one by one;
[0031] When the model output results of all the element verification groups are successful matches, a data verification result indicating successful data verification is generated.
[0032] A data verification device, comprising:
[0033] A request receiving module, used for receiving a data verification request sent by a terminal;
[0034] A target data extraction module, used to extract the character string to be verified and the business node identifier from the data verification request;
[0035] A pre-stored data search module, used to search for a pre-stored character string and a verification type corresponding to the service node identifier;
[0036] A target data processing module, used for performing standardization processing on the to-be-checked string according to the verification type to generate a to-be-matched string, and performing standardization processing on the pre-stored string according to the verification type to generate a target string array;
[0037] A verification module, used for inputting the to-be-matched character string and the target character string array into a preset matching verification model to obtain a data verification result;
[0038] The result feedback module is used to return the data verification result to the terminal.
[0039] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0040] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.
[0041] The above-mentioned data verification method, device, computer equipment and storage medium, when receiving a data verification request, determine the verification type of the data according to the business node corresponding to the data to be verified, and process the data to be verified and the corresponding pre-stored data according to the verification type, so that the data to be verified and the pre-stored data both form matching data to be verified in a unified standardized format. Data processing according to the verification type makes the data processing process more in line with the characteristics of the business node data and more targeted, and directly loads the string array, and batch matches and verifies the data to be verified with all the data contained in the target string array through a preset matching verification model, so as to realize unified verification of the data to be verified and all pre-stored target data, and there is no need to search and compare multiple pre-stored target data in steps, thereby simplifying the data verification steps and effectively improving the efficiency of information verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 An application scenario diagram of a data verification method in an embodiment;
[0043] Figure 2 A schematic diagram of a flow chart of a data verification method in an embodiment;
[0044] Figure 3 is a flowchart of target data processing steps in one embodiment;
[0045] Figure 4 is a flowchart of target data processing steps in another embodiment;
[0046] Figure 5 is a structural block diagram of a data verification device in an embodiment;
[0047] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] The data verification method provided in this application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The terminal 102 sends a data verification request carrying the information to be verified to the server 104. After receiving the data verification request, the server 104 extracts the string to be verified and the business node identifier from the data verification request; searches for the pre-stored string and verification type corresponding to the business node identifier; performs standardization processing on the string to be verified according to the verification type to generate a string to be matched, and performs standardization processing on the pre-stored string according to the verification type to generate a target string array; inputs the string to be matched and the target string array into a preset matching verification model to obtain a data verification result; the server 104 returns the obtained data verification result to the terminal 102.
[0050] The terminal 102 may be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0051] In one embodiment, Figure 2 As shown, a data verification method is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the method includes the following steps:
[0052] Step 210: receiving a data verification request sent by a terminal.
[0053] When the operation performed by the user on the terminal requires data verification, the terminal obtains the business node identifier of the business node currently operated by the user, and obtains the data to be verified input, entered or selected by the user, and the terminal generates a data verification request carrying the business node identifier and the data to be verified, and sends the generated data verification request to the server. The server receives the data verification request sent by the terminal.
[0054] Step 220: extract the character string to be verified and the service node identifier from the data verification request.
[0055] The server extracts the string to be verified and the business node identifier from the received data verification request. The string to be verified is the required or optional information entered or selected by the user in the current operation business node. The business node identifier is used to uniquely identify the business node. The string to be verified may include numbers, English characters, Chinese characters, special symbols, etc.
[0056] Step 230: Look up the pre-stored character string and verification type corresponding to the service node identifier.
[0057] The pre-stored string is the pre-stored business information corresponding to the business node. There are multiple pre-stored strings. For example, when the business node is a user registration node, the user name needs to be verified to verify whether the user is a registered user. The string to be verified is the user name string entered by the user, and the corresponding pre-stored string is all registered user name strings stored on the server.
[0058] The verification type is set according to the data type that the business node needs to verify. For example, it can be an independent data verification type, and the data that needs to be verified is a separate string, such as verifying the user name alone; it can also be a combined data verification type. For example, when the business node is a user login node, both the user name and password information need to be verified, and the verification type can also be other verification types. Different verification types correspond to different data processing and verification rules.
[0059] The mapping relationship between the service node identifier and the pre-stored string and the verification information of the verification type is stored in the server in advance. In one embodiment, the verification information mapping relationship can be maintained through a verification information table, and the mapping relationship between the service node identifier and the verification type, and the mapping relationship between the service node identifier and the data set identifier to which the pre-stored string belongs are all stored in the verification information table. The server can obtain the pre-stored verification information table, search the verification type and the data set identifier that have a mapping relationship with the service node identifier from the verification information table, and obtain the pre-stored string in the data set corresponding to the data set identifier.
[0060] Step 240 , standardize the string to be checked according to the check type to generate a string to be matched, and standardize the pre-stored string according to the check type to generate a target string array.
[0061] The server obtains the data processing logic corresponding to the verification type, processes the verification string according to the data processing rules, and generates the string to be matched after processing. For example, when the verification type is single data verification, the server obtains the data processing logic of single data verification, which may include format standardization processing, removing spaces and garbled characters from the verification string, and other processing steps; when the verification type is multiple data verification, that is, when the number of strings to be verified is multiple, the server obtains the data processing logic of multiple data verification, which may include processing steps such as combining or splitting them. The server uses the pre-stored string as an array element, or generates an array element based on the pre-stored string, and combines the array elements to generate the target string array. Different verification types may correspond to different array element processing methods, element arrangements, combination methods, etc.
[0062] Step 250: input the character string to be matched and the target character string array into a preset matching verification model to obtain a data verification result.
[0063] The preset matching verification model is a loop verification program, which can be written by loop code such as a for loop. The verification logic is set in the preset matching verification model. Different verification types correspond to different verification logics. The server obtains the preset matching verification model that matches the verification type. The server inputs the to-be-matched string and the target string array into the preset matching verification model, automatically compares the string in the to-be-matched string with the string in the target string array, and obtains the data verification result according to the verification logic. For example, some verification logics are that the verification is successful if one of the to-be-matched strings successfully matches a string in the target string array, and some verification logics are that the verification is successful if all the to-be-matched strings successfully match the strings in the target string array.
[0064] Step 260, returning the data verification result to the terminal.
[0065] The server returns the generated data verification result to the terminal, so that the terminal can determine whether to continue processing the next service node according to the data verification result.
[0066] In the above method, when the server receives a data verification request, it determines the verification type of the data according to the business node corresponding to the data to be verified, and processes the data to be verified and the corresponding pre-stored data according to the verification type, so that the data to be verified and the pre-stored data both form matching data to be verified in a unified standardized format. Data processing according to the verification type makes the data processing process more in line with the characteristics of the business node data and more targeted, and directly loads the string array, and batch matches and verifies the data to be verified with all the data contained in the target string array through a preset matching verification model, so as to realize unified verification of the data to be verified and all pre-stored target data, and there is no need to search and compare multiple pre-stored target data in steps, thereby simplifying the data verification steps and effectively improving the efficiency of information verification.
[0067] In one embodiment, Figure 3 As shown, the target data processing step of performing standardization processing on the string to be checked according to the verification type to generate a string to be matched, and performing standardization processing on the pre-stored string according to the verification type to generate a target string array may include:
[0068] Step 241: When the verification type is an independent verification type, the character string to be verified is standardized to obtain a character string to be matched.
[0069] The independent verification type is the case where the information to be verified contained in the string to be verified is single. When the server determines that the verification type of the current operation node is the independent verification type, the server performs standardization processing on the string to be verified, such as data format processing on the string to be verified, such as space removal processing, garbled code removal processing, etc.
[0070] Furthermore, before the server performs standardization processing on the string to be verified, it determines whether the string to be verified is a format check, such as whether the number of the string to be verified is one, whether the string to be verified is empty, etc. If the format check fails, a prompt indicating that the input information is incorrect is generated and returned to the terminal; if the format check succeeds, the step of performing standardization processing on the string to be verified is continued.
[0071] Step 243, combining the pre-stored character strings to obtain a target character string array.
[0072] The pre-stored string found by the server can be one or more string sets. When there are multiple string sets, the multiple string sets are combined to generate an array. The arrangement positions of the multiple string sets in the target string array can be set randomly or according to the arrangement order of the sets.
[0073] For example, the current business node verifies whether the employee number entered by the user belongs to department A, and the employee number data of department A is divided according to the groups in the department, so the pre-stored strings found by the server can be the employee number set of group A1, the employee number set of group A2, and the employee number set of group A3. The server combines these three sets to generate the target string array.
[0074] In one embodiment, Figure 4 As shown, the target data processing step of performing standardization processing on the string to be checked according to the verification type to generate a string to be matched, and performing standardization processing on the pre-stored string according to the verification type to generate a target string array may include:
[0075] Step 242: When the verification type is a combined verification type, an element string is extracted from the string to be verified, and a string to be matched is generated according to the element string.
[0076] The combined verification type is when the string to be verified contains multiple pieces of information to be verified. For example, in a user login business node, both the user name and login password need to be verified. In this case, the verification type corresponding to the business node is the combined verification type.
[0077] When the terminal obtains multiple verification information, the multiple information is usually separated by a separator. When the server determines that the verification type of the current operation node is a combined verification type, the server can divide the string to be verified according to the separator in the string to be verified, and extract the strings before and after the separation as element strings. Furthermore, before extracting the element string, the server can first perform standardization processing on the string to be verified.
[0078] The server processes the extracted element string. The specific processing method is determined according to the verification logic in the preset matching verification model. For example, if some verification logic matches each verification information separately, there is no need to process the element string separately, and the element string is the string to be matched. If some verification logic combines and matches all verification information, all element strings are concatenated to generate the string to be matched. Other methods can also be used to process the element string to obtain the string to be matched.
[0079] Step 244, extracting a string set corresponding to each element string from the pre-stored strings, and generating a target string array according to the string set.
[0080] The server extracts the string set corresponding to each element string from the pre-stored string, and the number of string sets corresponding to each element string can be one or more. The server processes the string set in the same way as the element characters, that is, it is determined according to the verification logic in the preset matching verification model. For example, some do not require special processing, and the string sets corresponding to each element string can be arranged and combined, while some may need to splice and merge the elements in the corresponding positions of the string sets corresponding to multiple element strings.
[0081] In one embodiment, the step of generating a to-be-matched string according to an element string may include: when the combination check type is an AND operation subclass, obtaining a preset connector; and connecting the element strings through the preset connector to generate a to-be-matched string.
[0082] Since the combined verification type needs to verify multiple pieces of information, some of which can be substituted for each other, while others cannot, the verification rules for information are different in different situations. Therefore, the combined verification type can be divided into multiple subtypes. The AND operation subtype in the combined verification type means that all information needs to be verified, and the verification result is successful only when all information is successfully verified.
[0083] When the server determines that the subtype of the combined verification type corresponding to the business node identifier is the AND operation subtype, the server obtains a preset connector, which is a character or symbol that will not appear in the string to be verified after standardization. The number of characters of the preset connector can be one or more, for example, the preset connector can be &, *, ^ or Greek letters, etc. The server connects all the extracted element strings through the preset connector to generate a string to be matched, thereby processing multiple element strings into a string to be matched containing multiple verification information.
[0084] In one embodiment, generating a target string array based on a string set may include: obtaining a concatenation order of each element string in a string to be matched; sorting each string set according to the concatenation order; connecting substrings at corresponding positions in each sorted string set through a preset connector to generate a concatenated string; and generating a target string array based on the concatenated string.
[0085] The server obtains the concatenation order of each element string in the generated string to be matched, and sorts the string set corresponding to the element string according to the obtained concatenation order. The arrangement positions of each substring in the string set correspond to each other. For example, the positions of the user name and the corresponding password in their respective string sets are consistent. The server connects the substrings at corresponding positions in all string sets into a concatenated string through a preset connector, and combines all the concatenated strings into a target string array.
[0086] When the to-be-matched string and the target string array are input into the preset matching verification model for data matching, the server searches the target string array for whether there is a concatenated string that is completely consistent with the to-be-matched string. If a completely consistent concatenated string is found, the match is successful, otherwise the match fails. In this way, the verification problem of multiple verification information can be solved through only one matching process, which can effectively improve the efficiency of data verification.
[0087] For example, the received string to be verified is username; password, and the strings to be matched after processing are username and password. The preset connector in the server is &, and the concatenated string to be matched is username&password; the target string array formed by concatenating the substrings at corresponding positions in the pre-stored string set is [wang&304;li&890;user&pass;uname&pword].
[0088] In one embodiment, the step of inputting the to-be-matched string and the target string array into a preset matching verification model to obtain a data verification result may include: when the combination verification type is an OR operation subclass, generating an element verification group according to each element string and the corresponding string set, and inputting the element verification groups into the preset matching verification model one by one; when the model output result of the first element verification group is a matching failure, continuing to input the next element verification group into the preset matching verification model until a model output result of a successful match is obtained, ending the data verification, and generating a data verification result of a successful data verification.
[0089] The OR operation subclass in the combined verification type means that it is not necessary to verify all the information successfully. As long as one of the information is verified successfully, the data verification is successful. When the server determines that the subtype of the combined verification type corresponding to the business node identifier is an OR operation subclass, the server generates an element verification group with each element string and its corresponding string set, and inputs each element verification group into the preset matching verification model one by one for data verification. When there is a string set consistent with the element string in the string set, the verification of the element verification group is successful. Otherwise, the verification of the element verification group fails.
[0090] When the server verifies the first element verification group with a match failure, the server will continue to input the second element verification group into the preset matching verification model. If the second element verification group verifies the second element verification group with a match failure, the server will continue to input the next element verification group into the preset matching verification model until a matching model output result is obtained. The data verification is terminated and a data verification result of successful data verification is generated. If the output results of all element verification groups are match failures, a data verification result of failed data verification is generated.
[0091] For example, if a user enters both his ID number and password at the same time, but only one of them can be verified to proceed to the next business node. In this case, there is no need to verify all the element strings, and they can be input pair by pair and verified. As long as one of them passes the verification, the verification is terminated, thus saving resources and time.
[0092] In one embodiment, the step of inputting the to-be-matched string and the target string array into a preset matching verification model to obtain a data verification result may include: when the combination verification type is an AND operation subclass, generating an element verification group according to each element string and the corresponding string set, and inputting the element verification group into the preset matching verification model one by one; when the model output results of all element verification groups are successful matches, a data verification result indicating successful data verification is generated.
[0093] When the server determines that the subtype of the combined verification type corresponding to the business node identifier is an AND operation subclass, the server generates an element verification group for each element string and its corresponding string set, and inputs each element verification group one by one into the preset matching verification model for data verification. When there is a string set in the string set that is consistent with the element string, the verification of the element verification group is successful; otherwise, the verification of the element verification group fails.
[0094] The server inputs the element verification groups into the preset matching verification model one by one. When the element verification group has a model output result that fails to match, the data verification process ends and a data verification result of data verification failure is generated. When the model output results of all element verification groups are matched successfully, a data verification result of data verification failure is generated.
[0095] Furthermore, the checksum in the AND operation check subclass can be set with a priority level, which is set in advance and stored in a mapping with the business node identifier. The server inputs the element check group corresponding to each information into the preset matching check model in the order of high to low priority, and the element check groups of the same level can be randomly arranged. Therefore, when the higher-level information check fails, the check can be terminated immediately, and there is no need to check the lower-level information, which can effectively save the check time.
[0096] For example, the information to be matched is the department name and the names of the team members therein. It is necessary to first verify the department name to determine whether it exists, and then verify the team member names.
[0097] It should be understood that although Figure 2-4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0098] In one embodiment, Figure 5 As shown, a data verification device is provided, including: a request receiving module 510, a target data extraction module 520, a pre-stored data search module 530, a target data processing module 540, a verification module 550 and a result feedback module 560, wherein:
[0099] The request receiving module 510 is used to receive a data verification request sent by a terminal.
[0100] The target data extraction module 520 is used to extract the character string to be verified and the service node identifier from the data verification request.
[0101] A pre-stored data search module 530 is used to search for a pre-stored character string and a verification type corresponding to a service node identifier;
[0102] The target data processing module 540 is used to perform standardization processing on the string to be checked according to the verification type to generate a string to be matched, and to perform standardization processing on the pre-stored string according to the verification type to generate a target string array.
[0103] The verification module 550 is used to input the character string to be matched and the target character string array into a preset matching verification model to obtain a data verification result.
[0104] The result feedback module 560 is used to return the data verification result to the terminal.
[0105] In one embodiment, the target data processing module 540 may include:
[0106] The standard processing unit is used to perform standardization processing on the string to be checked to obtain the string to be matched when the verification type is an independent verification type.
[0107] The first array generation unit is used to combine the pre-stored character strings to obtain a target character string array.
[0108] In one embodiment, the target data processing module 540 may include:
[0109] The element processing unit is used to extract the element string from the string to be checked and generate the string to be matched according to the element string when the check type is a combined check type.
[0110] The second array generation unit is used to extract a string set corresponding to each element string from the pre-stored string, and generate a target string array according to the string set.
[0111] In one embodiment, the element processing unit may include:
[0112] The connector acquisition subunit is used to obtain a preset connector when the combination check type is an AND operation subclass.
[0113] The connection subunit is used to connect the element strings through a preset connector to generate a string to be matched.
[0114] In one embodiment, the second array generation unit may include:
[0115] The sequential acquisition subunit is used to obtain the concatenation order of each element string in the string to be matched.
[0116] The sorting subunit is used to sort each string set according to the concatenation order.
[0117] The concatenation subunit is used to connect the substrings at corresponding positions in each sorted string set through a preset connector to generate a concatenated string.
[0118] The generation processing subunit is used to generate a target string array according to the concatenated strings.
[0119] In one embodiment, the verification module 550 may include:
[0120] The verification group generating unit is used to generate an element verification group according to each element string and the corresponding string set when the combination verification type is an OR operation subclass, and input the element verification group into a preset matching verification model one by one.
[0121] The first matching unit is used to continue inputting the next element verification group into the preset matching verification model when the model output result of the first element verification group is a matching failure, until a model output result of a successful match is obtained, thereby ending data verification and generating a data verification result of successful data verification.
[0122] In one embodiment, the verification module 550 may include:
[0123] The verification group generating unit is used to generate an element verification group according to each element string and the corresponding string set when the combination verification type is an AND operation subclass, and input the element verification group into a preset matching verification model one by one.
[0124] The second matching unit is used to generate a data verification result indicating successful data verification when the model output results of all element verification groups are successful matches.
[0125] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to data verification. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data verification method is implemented.
[0126] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0127] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program: receiving a data verification request sent by a terminal; extracting a character string to be verified and a service node identifier from the data verification request; searching for a pre-stored character string and a verification type corresponding to the service node identifier; performing standardization processing on the character string to be verified according to the verification type to generate a character string to be matched, and performing standardization processing on the pre-stored character string according to the verification type to generate a target character string array; inputting the character string to be matched and the target character string array into a preset matching verification model to obtain a data verification result; and returning the data verification result to the terminal.
[0128] In one embodiment, when the processor executes the computer program, it implements the steps of standardizing the string to be checked according to the verification type to generate a string to be matched, and standardizing the pre-stored string according to the verification type to generate a target string array, and is also used to: when the verification type is an independent verification type, standardize the string to be checked to obtain the string to be matched; and combine the pre-stored strings to obtain a target string array.
[0129] In one embodiment, when the processor executes the computer program, it implements the steps of performing standardization processing on the string to be checked according to the verification type to generate a string to be matched, and performing standardization processing on the pre-stored string according to the verification type to generate a target string array, and is also used to: when the verification type is a combined verification type, extract element strings from the string to be checked, and generate a string to be matched according to the element strings; extract a string set corresponding to each element string from the pre-stored string, and generate a target string array according to the string set.
[0130] In one embodiment, when the processor executes the computer program to implement the step of generating a string to be matched based on an element string, it is also used to: when the combination check type is an AND operation subclass, obtain a preset connector; and connect the element strings through the preset connector to generate a string to be matched.
[0131] In one embodiment, when the processor executes the computer program to implement the step of generating a target string array based on a string set, it is also used to: obtain the concatenation order of each element string in the string to be matched; sort each string set according to the concatenation order; connect the substrings at corresponding positions in each sorted string set through a preset connector to generate a concatenated string; and generate a target string array based on the concatenated string.
[0132] In one embodiment, when the processor executes the computer program, the step of inputting the to-be-matched string and the target string array into a preset matching verification model to obtain a data verification result is also used to: when the combination verification type is an OR operation subclass, generate an element verification group according to each element string and the corresponding string set, and input the element verification group into the preset matching verification model one by one; when the model output result of the first element verification group is a matching failure, continue to input the next element verification group into the preset matching verification model until a model output result of a successful match is obtained, end the data verification, and generate a data verification result of a successful data verification.
[0133] In one embodiment, when the processor executes a computer program to implement the step of inputting the to-be-matched string and the target string array into a preset matching verification model to obtain a data verification result, it is also used to: when the combination verification type is an AND operation subclass, generate an element verification group according to each element string and the corresponding string set, and input the element verification group one by one into the preset matching verification model; when the model output results of all element verification groups are successful matches, a data verification result of successful data verification is generated.
[0134] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: receiving a data verification request sent by a terminal; extracting a character string to be verified and a service node identifier from the data verification request; searching for a pre-stored character string and a verification type corresponding to the service node identifier; performing standardization processing on the character string to be verified according to the verification type to generate a character string to be matched, and performing standardization processing on the pre-stored character string according to the verification type to generate a target character string array; inputting the character string to be matched and the target character string array into a preset matching verification model to obtain a data verification result; and returning the data verification result to the terminal.
[0135] In one embodiment, when the computer program is executed by a processor, the steps of standardizing a string to be checked according to a check type to generate a string to be matched, and standardizing a pre-stored string according to the check type to generate a target string array are implemented, and the computer program is also used to: when the check type is an independent check type, standardize the string to be checked to obtain a string to be matched; and combine the pre-stored strings to obtain a target string array.
[0136] In one embodiment, when the computer program is executed by a processor, it implements the steps of standardizing a string to be checked according to a check type to generate a string to be matched, and standardizing a pre-stored string according to the check type to generate a target string array, and is also used to: when the check type is a combined check type, extract element strings from the string to be checked, and generate a string to be matched according to the element strings; extract a string set corresponding to each element string from the pre-stored strings, and generate a target string array according to the string set.
[0137] In one embodiment, when the computer program is executed by a processor to implement the step of generating a string to be matched based on an element string, it is also used to: when the combination check type is an AND operation subclass, obtain a preset connector; and connect the element strings through the preset connector to generate a string to be matched.
[0138] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when implementing the step of generating a target string array based on a string set, it is also used to: obtain the concatenation order of each element string in the string to be matched; sort each string set according to the concatenation order; connect the substrings at corresponding positions in each sorted string set through a preset connector to generate a concatenated string; and generate a target string array based on the concatenated string.
[0139] In one embodiment, when the computer program is executed by a processor, the step of inputting the to-be-matched string and the target string array into a preset matching verification model to obtain a data verification result is also used to: when the combination verification type is an OR operation subclass, generate an element verification group according to each element string and the corresponding string set, and input the element verification group into the preset matching verification model one by one; when the model output result of the first element verification group is a matching failure, continue to input the next element verification group into the preset matching verification model until a model output result of a successful match is obtained, end the data verification, and generate a data verification result of a successful data verification.
[0140] In one embodiment, when the computer program is executed by a processor, the step of inputting the to-be-matched string and the target string array into a preset matching verification model to obtain a data verification result is also used for: when the combination verification type is an AND operation subclass, generating an element verification group according to each element string and the corresponding string set, and inputting the element verification group into the preset matching verification model one by one; when the model output results of all element verification groups are successful matches, a data verification result of successful data verification is generated.
[0141] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0142] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A data verification method, the method comprising: A data verification request sent by a receiving terminal; Extracting the character string to be verified and the service node identifier from the data verification request; Searching for a pre-stored string and a verification type corresponding to the service node identifier, including: searching for a verification type and a data set identifier having a mapping relationship with the service node identifier, and obtaining a pre-stored string in a data set corresponding to the data set identifier; Performing standardization processing on the to-be-checked string according to the verification type to generate a to-be-matched string, and performing standardization processing on the pre-stored string according to the verification type to generate a target string array; Inputting the to-be-matched character string and the target character string array into a preset matching verification model to obtain a data verification result; The data verification result is returned to the terminal.
2. The method according to claim 1, characterized in that The step of performing standardization processing on the to-be-checked string according to the check type to generate a to-be-matched string, and performing standardization processing on the pre-stored string according to the check type to generate a target string array, includes: When the verification type is an independent verification type, the character string to be verified is standardized to obtain a character string to be matched; The pre-stored character strings are combined to obtain a target character string array.
3. The method according to claim 1, characterized in that The step of performing standardization processing on the to-be-checked string according to the check type to generate a to-be-matched string, and performing standardization processing on the pre-stored string according to the check type to generate a target string array, includes: When the verification type is a combined verification type, extracting an element string from the string to be verified, and generating a string to be matched according to the element string; A string set corresponding to each of the element strings is extracted from the pre-stored strings, and a target string array is generated according to the string set.
4. The method according to claim 3, characterized in that The step of generating a to-be-matched string according to the element string includes: When the combination check type is an AND operation subclass, obtaining a preset connector; The element character strings are connected through the preset connector to generate a character string to be matched.
5. The method according to claim 4, characterized in that The step of generating a target string array according to the string set includes: Obtaining the concatenation order of each of the element strings in the string to be matched; Sorting each of the character string sets according to the concatenation order; Connecting the substrings at corresponding positions in each of the sorted string sets through the preset connector to generate a concatenated string; Generate a target string array according to the concatenated strings.
6. The method according to claim 3, characterized in that: The step of inputting the to-be-matched character string and the target character string array into a preset matching verification model to obtain a data verification result includes: When the combination check type is an OR operation subclass, an element check group is generated according to each of the element strings and the corresponding string set, and the element check groups are input into the preset matching check model one by one; When the model output result of the first element verification group is a matching failure, the next element verification group continues to be input into the preset matching verification model until a matching successful model output result is obtained, the data verification is ended, and a data verification result of successful data verification is generated.
7. The method according to claim 3, characterized in that The step of inputting the to-be-matched character string and the target character string array into a preset matching verification model to obtain a data verification result includes: When the combination check type is an AND operation subclass, an element check group is generated according to each of the element strings and the corresponding string set, and the element check groups are input into the preset matching check model one by one; When the model output results of the element verification group are all matched successfully, a data verification result indicating successful data verification is generated.
8. A data verification device, characterized in that: The device comprises: A request receiving module, used for receiving a data verification request sent by a terminal; A target data extraction module, used to extract the character string to be verified and the business node identifier from the data verification request; A pre-stored data search module is used to search for a pre-stored string and a verification type corresponding to the service node identifier, including: searching for a verification type and a data set identifier that have a mapping relationship with the service node identifier, and obtaining a pre-stored string in a data set corresponding to the data set identifier; A target data processing module, used for performing standardization processing on the to-be-checked string according to the verification type to generate a to-be-matched string, and performing standardization processing on the pre-stored string according to the verification type to generate a target string array; A verification module, used for inputting the to-be-matched character string and the target character string array into a preset matching verification model to obtain a data verification result; The result feedback module is used to return the data verification result to the terminal.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Anti-fraud payment verification method and system
CN106557925A
Password-free authentication method of wearable device
CN107395634A
Data checking method and apparatus, computer device, and storage medium
CN109543942A
Authority verification method of cluster data, gateway and system
CN109635550A
