Business information query method and related equipment based on SMS verification
By performing double verification on the mobile phone number and task number during the business information query process verified by SMS, and using the task number as a token, the problem of user data leakage caused by malicious queries in the existing technology is solved, and the system security and processing efficiency are improved.
Patent Information
- Application Number
- CN202411084260.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-08-08
AI Technical Summary
In the existing SMS-based business information query process, the server only verifies the generated security parameters, making it difficult to screen out malicious query requests, resulting in user data leakage and low system security.
When receiving an information query request, the server performs a double verification of the mobile phone number and the task number through SMS verification. After the user identity verification is passed, the server specifies the task number as a token for token verification to ensure the legitimacy of the request.
Through multiple verifications of mobile phone numbers, task numbers, and tokens, malicious requests are avoided, the security of the business system is improved, the interaction between the client and the server is reduced, processing efficiency is improved, and the cost of security transformation is reduced.
Smart Images

Figure CN118940243B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of identity authentication technology, and in particular to a business information query method based on SMS verification and related equipment. Background Art
[0002] In many business scenarios at banks and other institutions, SMS verification is one of the primary authentication methods for users accessing business systems. Inquiring business information is a common transaction in many business scenarios, such as checking the progress of an account opening appointment. Inquiring business information through SMS verification requires users to log in to the business system via SMS verification and query business information based on their verified user account.
[0003] In scenarios involving SMS-based service information queries, when a user queries service information after having passed SMS verification, the server typically needs to verify the query request to determine whether to respond. In the current query process, the server typically verifies the authentication parameters carried in the query request, specifically the security parameters generated during the SMS verification process. If the query request passes verification, the server queries the corresponding service information and responds to the query request.
[0004] After research, the inventor found that in the existing business information query process, the server only verifies the security parameters such as the task number generated during the user's SMS verification process. If the business system is attacked maliciously, malicious users can steal the security parameters generated during the SMS verification process to initiate a query request, causing user data leakage, making the business system less secure, and causing adverse effects on business services. Summary of the Invention
[0005] In view of this, an embodiment of the present invention provides a business information query method based on SMS verification to solve the problem that the existing business information query process only verifies the corresponding parameters generated during the SMS verification process, which makes it difficult to screen malicious query requests and easily causes user data leakage, resulting in poor system security.
[0006] The embodiment of the present invention also provides a service information query device based on SMS verification to ensure the actual implementation and application of the above method.
[0007] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0008] A method for querying business information based on SMS verification, the method being applied to a server and comprising:
[0009] When receiving an identity authentication request sent by a client, determining a target user, a first mobile phone number, and a first task number corresponding to the identity authentication request;
[0010] Authenticate the target user through SMS verification to obtain the target user's identity verification result;
[0011] If the identity authentication result of the target user indicates that the identity authentication is passed, a token application is performed based on the first task number, and the first task number is used as a first token corresponding to the target user;
[0012] When receiving an information query request corresponding to the target user, determining a second mobile phone number and a second task number corresponding to the information query request;
[0013] Based on the second mobile phone number, perform mobile phone number verification on the information query request to obtain a mobile phone number verification result;
[0014] Based on the second task number, performing task number verification on the information query request to obtain a task number verification result;
[0015] If the mobile phone number verification result indicates that the mobile phone number verification is passed, and the task number verification result indicates that the task number verification is passed, token verification is performed on the information query request based on the second task number to obtain a token verification result;
[0016] If the token verification result indicates that the token verification is passed, information query processing is performed based on the information query request, business information corresponding to the information query request is obtained, and the business information is sent to the client.
[0017] Optionally, in the above method, performing mobile phone number verification on the information query request based on the second mobile phone number to obtain a mobile phone number verification result includes:
[0018] comparing the second mobile phone number with the first mobile phone number;
[0019] If the second mobile phone number is the same as the first mobile phone number, the first preset verification conclusion is used as the mobile phone number verification result; the first preset verification conclusion indicates that the mobile phone number verification has passed;
[0020] If the second mobile phone number is different from the first mobile phone number, a second preset verification conclusion is used as the mobile phone number verification result; the second preset verification conclusion indicates that the mobile phone number verification has failed.
[0021] Optionally, in the above method, performing task number verification on the information query request based on the second task number to obtain a task number verification result includes:
[0022] Determining whether the second task number is a verified task number;
[0023] If the second task number is not a verified task number, comparing the second task number with the first task number, and if the second task number is the same as the first task number, determining the identity verification result corresponding to the second task number;
[0024] If the identity authentication result corresponding to the second task number indicates that the identity authentication is passed, the third preset verification conclusion is used as the task number verification result, and the second task number is marked as a verified task number; the third preset verification conclusion indicates that the task number verification is passed;
[0025] If the identity authentication result corresponding to the second task number indicates that the identity authentication has failed, the fourth preset verification conclusion is used as the task number verification result; the fourth preset verification conclusion indicates that the task number verification has failed.
[0026] The above method may optionally further include:
[0027] If the second task number is a verified task number, the third preset verification conclusion is used as the task number verification result.
[0028] Optionally, in the above method, performing token verification on the information query request based on the second task number to obtain a token verification result includes:
[0029] Using the second task number as a second token corresponding to the target user;
[0030] determining an applicant identifier corresponding to the first token;
[0031] Determining a verifier identifier corresponding to the second token;
[0032] Comparing the applicant identification with the verifier identification;
[0033] If the applicant identifier is the same as the verifier identifier, determining the first transaction type corresponding to the second token;
[0034] determining a second transaction type corresponding to the information query request;
[0035] determining whether the first transaction type matches the second transaction type;
[0036] If the first transaction type matches the second transaction type, performing a validity check on the second token to obtain a validity check result;
[0037] If the validity check result indicates that the second token is valid, the fifth preset verification conclusion is used as the token verification result; the fifth preset verification conclusion indicates that the token verification is passed.
[0038] The above method may optionally further include:
[0039] If the mobile phone number verification result indicates that the mobile phone number verification has failed, or the task number verification result indicates that the task number verification has failed, the information query request is rejected.
[0040] The above method may optionally further include:
[0041] If the token verification result indicates that the token verification has failed, the information query request is rejected.
[0042] A service information query device based on SMS verification, the device is applied to a server, and the device includes:
[0043] A first determining unit is configured to, upon receiving an identity authentication request sent by a client, determine a target user, a first mobile phone number, and a first task number corresponding to the identity authentication request;
[0044] An SMS verification unit is used to authenticate the target user through SMS verification and obtain the target user's identity verification result;
[0045] a token application unit, configured to apply for a token based on the first task number if the identity authentication result of the target user indicates that the identity authentication is passed, and use the first task number as a first token corresponding to the target user;
[0046] a second determining unit, configured to, upon receiving an information query request corresponding to the target user, determine a second mobile phone number and a second task number corresponding to the information query request;
[0047] a mobile phone number verification unit, configured to perform mobile phone number verification on the information query request based on the second mobile phone number, and obtain a mobile phone number verification result;
[0048] a task number verification unit, configured to perform task number verification on the information query request based on the second task number, and obtain a task number verification result;
[0049] a token verification unit configured to perform token verification on the information query request based on the second task number to obtain a token verification result if the mobile phone number verification result indicates that the mobile phone number verification has passed and the task number verification result indicates that the task number verification has passed;
[0050] The information query unit is configured to perform information query processing based on the information query request if the token verification result indicates that the token verification is passed, obtain business information corresponding to the information query request, and send the business information to the client.
[0051] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned service information query method based on SMS verification.
[0052] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors as the above-mentioned business information query method based on SMS verification.
[0053] A business information query method based on SMS verification provided based on the above-mentioned embodiment of the present invention includes: when receiving an identity authentication request sent by a client, determining the target user, a first mobile phone number and a first task number corresponding to the identity authentication request; authenticating the target user through SMS verification to obtain an identity authentication result of the target user; if the identity authentication result of the target user indicates that the identity authentication is passed, applying for a token based on the first task number, and using the first task number as the first token corresponding to the target user; when receiving an information query request corresponding to the target user, determining the second mobile phone number and second task number corresponding to the information query request; based on the second mobile phone number, performing mobile phone number verification on the information query request to obtain a mobile phone number verification result; based on the second task number, performing task number verification on the information query request to obtain a task number verification result; if the mobile phone number verification result indicates that the mobile phone number verification is passed, and the task number verification result indicates that the task number verification is passed, performing token verification on the information query request based on the second task number to obtain a token verification result; if the token verification result indicates that the token verification is passed, performing information query processing based on the information query request to obtain business information corresponding to the information query request, and sending the business information to the client. By applying the method provided by the embodiment of the present invention, in the process of business information query based on SMS verification, the server needs to verify the mobile phone number associated with the current information query request while verifying the task number and token corresponding to the information query request, and can verify the identity of the user again to ensure that the user who currently initiates the request is an authenticated user, avoid responding to malicious information query requests, and help avoid user data leakage and improve the security of the business system. Secondly, when the user passes the identity authentication, the server specifies the task number as the token and completes the token application. The client does not need to apply for the token by itself, which can reduce the interaction between the client and the server and improve business processing efficiency. In addition, specifying the task number as the token is equivalent to binding the task number to the token, and the task number can be reused, reducing the number of security parameters for internal interactions, which is conducive to reducing the cost of security service transformation. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0055] Figure 1 A method flow chart of a service information query method based on SMS verification provided by an embodiment of the present invention;
[0056] Figure 2Another method flow chart of a service information query method based on SMS verification provided by an embodiment of the present invention;
[0057] Figure 3 A signaling diagram of a service information query process based on SMS verification provided by an embodiment of the present invention;
[0058] Figure 4 A schematic diagram of the structure of a service information query device based on SMS verification provided by an embodiment of the present invention;
[0059] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0060] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0061] In this application, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0062] The embodiment of the present invention provides a method for querying business information based on SMS verification. The method can be applied to the server of various business systems, and its execution subject can be the server of the system. The method flow chart of the method is as follows: Figure 1 Shown, including:
[0063] S101: When receiving an identity authentication request sent by a client, determining a target user, a first mobile phone number, and a first task number corresponding to the identity authentication request;
[0064] The method provided in the embodiments of the present invention can be specifically applied to various business information query scenarios, such as inquiring about the progress of account opening appointments. When a user needs to query business information through a client (for example, by accessing a page for querying business information), the client must first authenticate the user. In the embodiments of the present invention, user authentication is performed through SMS verification. Therefore, the client prompts the user to enter user information such as a mobile phone number, which in turn sends the user's authentication request to the server.
[0065] In the method provided by an embodiment of the present invention, when a server receives an identity authentication request sent by a client, it can parse the identity authentication request to obtain data such as a mobile phone number carried in the identity authentication request. The user corresponding to the identity authentication request can be used as the target user. The target user can be represented by the mobile phone number carried in the identity authentication request, and the mobile phone number carried in the identity authentication request can be used as the first mobile phone number. At the same time, the server generates a task number (taskid) for the identity authentication request and uses this task number as the first task number corresponding to the identity authentication request.
[0066] S102: authenticating the target user through SMS verification to obtain an authentication result of the target user;
[0067] In the method provided by the embodiment of the present invention, the server will authenticate the target user in accordance with the SMS verification method, thereby obtaining the target user's identity authentication result, and the target user's identity authentication result represents whether the target user's identity authentication is passed. Specifically, the client can prompt the user to send a verification SMS to the designated service number using the first mobile phone number according to the predetermined SMS template to receive the SMS verification code. When the server receives the verification SMS sent by the first mobile phone number, it can generate an SMS verification code, send the SMS verification code to the first mobile phone number in the form of an SMS, and prompt the user to enter the SMS verification code in the client. At the same time, the server can return the first task number to the client. After the user enters the SMS verification code in the client, the client can send the task number received from the server and the SMS verification code entered by the user to the server, requesting the server to verify the task number and SMS verification code respectively. If the task number sent by the client is the same as the first task number generated by the server, and the SMS verification code sent by the client is the same as the SMS verification code sent by the server, then the SMS verification can be considered successful, that is, the identity verification of the target user has passed. If the task number sent by the client is different from the first task number, or the SMS verification code sent is different from the SMS verification code sent by the server, then the SMS verification can be considered failed, that is, the identity verification of the target user has not passed.
[0068] After obtaining the target user's authentication result, the server can return the corresponding authentication result to the client. If the target user's authentication result indicates that the authentication is successful, the client can prompt the user that the authentication is successful and allow the target user to perform business operations. If the target user's authentication result indicates that the authentication is not successful, the client can prompt the user that the authentication has failed and needs to be re-authenticated, and the user is not allowed to perform business operations for the time being.
[0069] S103: If the identity authentication result of the target user indicates that the identity authentication is passed, a token application is performed based on the first task number, and the first task number is used as a first token corresponding to the target user;
[0070] In the method provided by an embodiment of the present invention, if the identity authentication result of the target user indicates that the identity authentication is passed, the server applies for a token corresponding to the target user from the authentication service according to a predetermined token application method. During the token application process, the first task number is specified as the token corresponding to the target user (the so-called first token).
[0071] If the target user's identity authentication result indicates that the identity authentication has failed, the current processing process is terminated.
[0072] S104: When receiving an information query request corresponding to the target user, determining a second mobile phone number and a second task number corresponding to the information query request;
[0073] In the method provided by an embodiment of the present invention, when the target user performs an information query operation in the client, the client responds to the user operation and can send an information query request corresponding to the target user to the server based on the target user's currently used mobile phone number and the task number received from the server during the target user's identity authentication process.
[0074] When the server receives the information query request corresponding to the target user, it can parse the information query request to obtain the mobile phone number and task number associated with the information query request, use the mobile phone number as the second mobile phone number, and use the task number as the second task number.
[0075] S105: Performing mobile phone number verification on the information query request based on the second mobile phone number to obtain a mobile phone number verification result;
[0076] In the method provided by an embodiment of the present invention, the server uses a second mobile phone number to perform mobile phone number verification on the information query request. Specifically, the server verifies whether the mobile phone number associated with the information query request is consistent with the mobile phone number of the target user that has been verified during SMS verification. If the two are consistent, the verification is considered successful, thereby obtaining a mobile phone number verification result. The mobile phone number verification result indicates whether the mobile phone number verification has been successful.
[0077] In the method provided by the embodiment of the present invention, the fields related to mobile phone numbers involved in the SMS verification process, the mobile phone number verification process, and various service interfaces all use a unified identifier, for example, the fields related to mobile phone numbers are all configured as mobile.
[0078] S106: Based on the second task number, perform task number verification on the information query request to obtain a task number verification result;
[0079] In the method provided in an embodiment of the present invention, the server can use the second task number to perform task number verification on the information query request to identify whether the task number associated with the information query request is consistent with the task number verified by the target user during the SMS verification process, thereby obtaining the task number verification result, which indicates whether the task number verification is passed.
[0080] S107: If the mobile phone number verification result indicates that the mobile phone number verification is passed, and the task number verification result indicates that the task number verification is passed, token verification is performed on the information query request based on the second task number to obtain a token verification result;
[0081] In the method provided by an embodiment of the present invention, if the mobile phone number verification result of the information query request indicates that the mobile phone number verification has passed, and the task number verification result indicates that the task number verification has passed, the server uses the second task number as a token applied to the information query request and performs token verification on the information query request, thereby obtaining a token verification result for the information query request. The token verification result indicates whether the token verification has passed.
[0082] S108: If the token verification result indicates that the token verification is successful, information query processing is performed based on the information query request, business information corresponding to the information query request is obtained, and the business information is sent to the client.
[0083] In the method provided by an embodiment of the present invention, if the token verification result of the information query request indicates that the token verification has passed, the server performs an information query based on the information query request and forwards the information query request to the corresponding business service for request processing to obtain the business information corresponding to the information query request, that is, the business information that the target user needs to query. The business information is then sent to the client, completing the business information query process.
[0084] Based on the method provided in an embodiment of the present invention, when the server receives an identity authentication request sent by the client, it determines the target user, the first mobile phone number and the first task number corresponding to the identity authentication request; authenticates the target user through SMS verification to obtain the identity authentication result of the target user; if the identity authentication result of the target user indicates that the identity authentication is passed, a token application is made based on the first task number, and the first task number is used as the first token corresponding to the target user; when an information query request corresponding to the target user is received, the second mobile phone number and the second task number corresponding to the information query request are determined; based on the second mobile phone number, the information query request is verified by mobile phone number to obtain a mobile phone number verification result; based on the second task number, the information query request is verified by task number to obtain a task number verification result; if the mobile phone number verification result indicates that the mobile phone number verification is passed, and the task number verification result indicates that the task number verification is passed, the information query request is token verified based on the second task number to obtain a token verification result; if the token verification result indicates that the token verification is passed, information query processing is performed based on the information query request to obtain business information corresponding to the information query request, and the business information is sent to the client. By applying the method provided by the embodiment of the present invention, in the process of business information query based on SMS verification, the server needs to verify the mobile phone number associated with the current information query request while verifying the task number and token corresponding to the information query request, and can verify the identity of the user again to ensure that the user who currently initiates the request is an authenticated user, avoid responding to malicious information query requests, and help avoid user data leakage and improve the security of the business system. Secondly, when the user passes the identity authentication, the server specifies the task number as the token and completes the token application. The client does not need to apply for the token by itself, which can reduce the interaction between the client and the server and improve business processing efficiency. In addition, specifying the task number as the token is equivalent to binding the task number to the token, and the task number can be reused, reducing the number of security parameters for internal interactions, which is conducive to reducing the cost of security service transformation.
[0085] exist Figure 1 On the basis of the method shown, in the method provided by the embodiment of the present invention, the process of performing mobile phone number verification on the information query request based on the second mobile phone number and obtaining the mobile phone number verification result mentioned in step S105 includes:
[0086] comparing the second mobile phone number with the first mobile phone number;
[0087] If the second mobile phone number is the same as the first mobile phone number, the first preset verification conclusion is used as the mobile phone number verification result; the first preset verification conclusion indicates that the mobile phone number verification has passed;
[0088] If the second mobile phone number is different from the first mobile phone number, a second preset verification conclusion is used as the mobile phone number verification result; the second preset verification conclusion indicates that the mobile phone number verification has failed.
[0089] In the method provided by an embodiment of the present invention, during the mobile phone number verification process, the server compares the mobile phone number associated with the target user's information query request (i.e., the second mobile phone number) with the mobile phone number that passed the verification during the SMS verification process (i.e., the first mobile phone number). If the two mobile phone numbers are the same, the mobile phone number verification result of passing is used as the mobile phone number verification result of the information query request; if the two mobile phone numbers are different, the mobile phone number verification result of failing is used as the mobile phone number verification result of the information query request.
[0090] exist Figure 1 On the basis of the method shown in FIG. 1 , in the method provided in an embodiment of the present invention, the process of performing task number verification on the information query request based on the second task number and obtaining the task number verification result mentioned in step S106 includes:
[0091] Determining whether the second task number is a verified task number;
[0092] In the method provided by the embodiment of the present invention, when the server initiates an information query request for the first time after the user passes identity authentication, if the information query request initiated for the first time passes the task number verification, the associated task number will be marked as a verified task number.
[0093] During the task number verification process, the server may first determine whether the second task number is marked as a verified task number.
[0094] If the second task number is not a verified task number, comparing the second task number with the first task number, and if the second task number is the same as the first task number, determining the identity verification result corresponding to the second task number;
[0095] In the method provided by the embodiment of the present invention, if the second task number is not a verified task number, that is, the current information query request is an information query request triggered by the target user's first business information query after passing the identity authentication, the server can compare the second task number with the first task number to determine whether the second task number is the task number generated during the target user's identity authentication process. If the second task number is the same as the first task number, the identity authentication result associated with the second task number is queried by matching the task numbers. The identity authentication result corresponding to the second task number is the identity authentication result obtained in the identity authentication process that generated the second task number (that is, the identity authentication process that generated the first task number).
[0096] In the method provided by the embodiment of the present invention, if the second task number is different from the first task number, failure of the task number verification is taken as the task number verification result.
[0097] If the identity authentication result corresponding to the second task number indicates that the identity authentication is passed, the third preset verification conclusion is used as the task number verification result, and the second task number is marked as a verified task number; the third preset verification conclusion indicates that the task number verification is passed;
[0098] In the method provided by the embodiment of the present invention, if the identity authentication result corresponding to the second task number indicates that the identity authentication is passed, the server determines that the task number verification result is task number verification passed and marks the second task number as a verified task number.
[0099] If the identity authentication result corresponding to the second task number indicates that the identity authentication has failed, the fourth preset verification conclusion is used as the task number verification result; the fourth preset verification conclusion indicates that the task number verification has failed.
[0100] In the method provided by the embodiment of the present invention, if the identity authentication result corresponding to the second task number indicates that the identity authentication has failed, the task number authentication failure is used as the task number authentication result.
[0101] On the basis of the method provided in the above embodiment, the method provided in the embodiment of the present invention further includes:
[0102] If the second task number is a verified task number, the third preset verification conclusion is used as the task number verification result.
[0103] In the method provided by the embodiment of the present invention, if the second task number has been marked as a verified task number, the server can skip the task number verification operation and take the task number verification passed as the task number verification result.
[0104] Based on the method provided by the embodiment of the present invention, in the scenario of business information query, if the user repeatedly performs query operations, the server can only verify the task number once, without the need to repeatedly verify the task number, which is conducive to improving processing efficiency.
[0105] exist Figure 1 Based on the method shown in reference Figure 2 As shown in the flowchart, in the method provided by the embodiment of the present invention, the process of performing token verification on the information query request based on the second task number and obtaining the token verification result mentioned in step S107 includes:
[0106] S201: Using the second task number as a second token corresponding to the target user;
[0107] In the method provided by the embodiment of the present invention, the server uses the second task number as the second token of the target user, that is, the token applied for the information query request, and initiates a verification request for the second token based on the second task number.
[0108] It can be understood that, under normal circumstances, the second token corresponding to the target user and the first token corresponding to the target user are the same token.
[0109] S202: Determine the applicant identifier corresponding to the first token;
[0110] In the method provided by the embodiment of the present invention, the authentication service of the server can obtain the corresponding applicant identifier, that is, the identifier of the applicant who applied for the first token, from the application request information of the first token.
[0111] S203: Determine the verifier identifier corresponding to the second token;
[0112] In the method provided by the embodiment of the present invention, the authentication service of the server can obtain the corresponding verifier identifier from the verification request information of the second token, that is, the identifier of the verifier who requests verification of the second token.
[0113] In the method provided by the embodiment of the present invention, the application and verification of the token can be initiated by the security service of the server. Therefore, under normal circumstances, the applicant identifier of the first token and the verifier identifier of the second token are both identifiers representing the security service.
[0114] S204: Compare the applicant identification with the verifier identification;
[0115] In the method provided by the embodiment of the present invention, the authentication service of the server side may compare the applicant identification with the verifier identification to determine whether the applicant of the first token and the verifier of the second token are consistent.
[0116] S205: If the applicant identifier is the same as the verifier identifier, determining the first transaction type corresponding to the second token;
[0117] In the method provided by an embodiment of the present invention, if the applicant identifier is the same as the verifier identifier, the authentication service on the server side determines the transaction type corresponding to the second token (i.e., the first transaction type), that is, the type of transaction scenario for requesting the generation of the token. For example, if the second token is generated in response to an identity authentication request in a scenario in which the user queries the progress of an appointment account opening, then the transaction type corresponding to the second token is querying the progress of an appointment account opening.
[0118] In the method provided by the embodiment of the present invention, if the applicant identifier is different from the verifier identifier, the server may take the token verification failure as the token verification result.
[0119] S206: Determine a second transaction type corresponding to the information query request;
[0120] In the method provided in this embodiment of the present invention, the authentication service on the server side can parse the information query request to obtain the transaction type corresponding to the information query request, i.e., the second transaction type. For example, if the current information query request is a request to inquire about the progress of an account opening appointment, the corresponding transaction type is "inquiry about the progress of an account opening appointment."
[0121] S207: Determine whether the first transaction type matches the second transaction type;
[0122] In the method provided by the embodiment of the present invention, the server may compare the first transaction type with the second transaction type to determine whether the two match.
[0123] S208: If the first transaction type matches the second transaction type, performing a validity check on the second token to obtain a validity check result;
[0124] In the method provided by the embodiment of the present invention, if the first transaction type matches the second transaction type, that is, the business transaction scenario associated with the second token matches the business transaction scenario of the current information query request, the authentication service on the server side further performs a validity check on the second token to determine whether the second token is valid. Specifically, the validity period and the number of permitted uses corresponding to the second token can be obtained, and the cumulative number of uses of the second token can be determined based on the token verification situation. If the current second token is still within the validity period and the cumulative number of uses is less than the permitted number of uses, then the second token is considered valid. If the second token is not within the validity period, or the cumulative number of uses has reached the permitted number of uses, then the second token is considered invalid, thereby obtaining the validity check result.
[0125] S209: If the validity check result indicates that the second token is valid, the fifth preset verification conclusion is used as the token verification result; the fifth preset verification conclusion indicates that the token verification is passed.
[0126] In the method provided by the embodiment of the present invention, if the validity check result of the second token indicates that the second token is valid, the authentication service on the server side takes the token verification passed as the token verification result.
[0127] exist Figure 1 On the basis of the method shown, the method provided in the embodiment of the present invention further includes:
[0128] If the mobile phone number verification result indicates that the mobile phone number verification has failed, or the task number verification result indicates that the task number verification has failed, the information query request is rejected.
[0129] In the method provided by an embodiment of the present invention, if at least one of the mobile phone number verification result and the task number verification result of the information query request fails, that is, the mobile phone number verification result indicates that the mobile phone number verification fails, or the task number verification result indicates that the task number verification fails, or the mobile phone number verification result indicates that the mobile phone number verification fails, and the task number verification result indicates that the task number verification fails, the server will determine the information query request as an abnormal request and refuse to respond to the information query request.
[0130] exist Figure 1 On the basis of the method shown, the method provided in the embodiment of the present invention further includes:
[0131] If the token verification result indicates that the token verification has failed, the information query request is rejected.
[0132] In the method provided by the embodiment of the present invention, if the token verification result indicates that the token verification has failed, the server determines that the information query request is an abnormal request and refuses to respond to the information query request.
[0133] In order to better illustrate the method provided by the embodiment of the present invention, based on the methods provided by the above embodiments and in combination with actual application scenarios, the embodiment of the present invention provides another method for querying business information based on SMS verification. The method provided by the embodiment of the present invention is applied to the progress query scenario of mobile banking appointment account opening. The method can be applied to the service end of the business support system, such as Figure 3 As shown, the service side of the business support system in this embodiment of the present invention is deployed with service modules such as gateway service, security service, and authentication (auth) service. It also deploys back-end services for implementing business processing. The gateway service is mainly used for process orchestration and interface forwarding. The security service is mainly used to implement functions such as SMS verification and process checking. The authentication service is mainly used to manage tokens and provide token count and validity period verification.
[0134] In the method provided by the embodiment of the present invention, the fields related to mobile phone numbers in the SMS verification process, business information query process, service interface and other parameter interaction processes are unified as mobile, or can also be configured as other designated fields.
[0135] like Figure 3 As shown, the service information query method provided by the embodiment of the present invention mainly includes:
[0136] When a user needs to query business information through the mobile client, they first need to enter their mobile phone number in the client to request identity verification. The client can prompt the user to send a verification SMS according to a pre-defined SMS template to obtain an SMS verification code.
[0137] When the user sends a verification SMS to the server's gateway service through mobile phone number A, the gateway service can forward the verification SMS to the security service. The security service can generate an SMS verification code and send it to mobile phone number A. At the same time, it generates a task number for the identity authentication process and feeds the task number back to the mobile client.
[0138] After a user enters a verification code via SMS text message through the mobile client, the mobile client can request SMS verification from the server based on the code entered and the received task number. When the gateway service receives the verification code and task number, it forwards them to the security service for verification. If the SMS verification is successful, the security service requests a token from the authentication service, using the keyword signature representing the security service as the applicant and specifying the generated task number as the token. If the token application is successful, the authentication service initializes the token, setting its cumulative usage count to 0 and specifying its validity period. Upon receiving the successful token application, the security service sends a successful SMS verification message back to the mobile client via the gateway service. The mobile client can then allow the user to perform business operations to query business information.
[0139] In response to the user's first query operation, the mobile client can initiate an information query request based on the task number and mobile phone number A. When the gateway service receives the information query request, it can request the security service to verify the task number and mobile phone number. If both the task number and mobile phone number are verified, the security service will request the authentication service to perform token verification based on the task number. If the token verification is successful, the authentication service will increase the cumulative number of uses of the token by one, and return the message that the token verification is successful to the security service. The security service can return the verification success message to the gateway service and mark the task number as a verified task number. When the gateway service receives the verification success message, it will forward the information query request to the back-end service to trigger the data query process, that is, trigger the back-end service to perform the corresponding business information query process, and return the obtained business information to the gateway service as response data. The gateway service can return the obtained data to the mobile client.
[0140] If the user queries the business information again, the mobile client will initiate an information query request based on the task number and mobile phone number A again. The gateway service will also request the security service to verify the task number and mobile phone number. When the security service receives the verification request for the task number and mobile phone number, it can first determine whether the task number has been verified. If it has been verified, it will skip the verification of the task number and verify the mobile phone number. When the verification is successful, it will request the authentication service to perform token verification based on the task number. When the token verification is successful, it will feedback the gateway service verification success message to complete this query process.
[0141] In the method provided by the embodiment of the present invention, during the service query process, the mobile phone number can be further verified to ensure that the mobile phone number that initiates the information query request is the same as the mobile phone number verified by SMS. In the embodiment of the present invention, the mobile phone number fields in scenarios such as SMS sending, SMS verification, and service interfaces are unified as mobile or other unified designated fields, so that a unified parameter name can be applied to mobile phone numbers in the entire process of the business. The signature keyword is used as the applicant and the task number is specified as Token. Making the task number and the token Token the same value is equivalent to binding. After escaping, it is equivalent to the same task number, which is only used 60 times at most. Reusing task numbers can reduce internal interaction parameters, thereby reducing the cost of security service modification. In the embodiment of the present invention, the token is not handed over to the caller for application and use, which reduces the interaction between the mobile phone client and the system server, and is more conducive to focusing on the functional interface without paying attention to too many security parameters.
[0142] and Figure 1 Corresponding to the service information query method based on SMS verification shown in FIG, the embodiment of the present invention also provides a service information query device based on SMS verification, which is used to query the service information of Figure 1 The specific implementation of the method shown in the FIG, the device is applied to the server, the structural diagram of the device is as follows Figure 4 As shown, including:
[0143] The first determining unit 301 is configured to, upon receiving an identity authentication request sent by a client, determine a target user, a first mobile phone number, and a first task number corresponding to the identity authentication request;
[0144] The SMS verification unit 302 is used to authenticate the target user through SMS verification and obtain the target user's authentication result;
[0145] A token application unit 303 is configured to apply for a token based on the first task number if the identity authentication result of the target user indicates that the identity authentication is passed, and use the first task number as a first token corresponding to the target user;
[0146] The second determining unit 304 is configured to, upon receiving an information query request corresponding to the target user, determine a second mobile phone number and a second task number corresponding to the information query request;
[0147] A mobile phone number verification unit 305 is configured to perform mobile phone number verification on the information query request based on the second mobile phone number and obtain a mobile phone number verification result;
[0148] A task number verification unit 306 is configured to perform task number verification on the information query request based on the second task number to obtain a task number verification result;
[0149] The token verification unit 307 is configured to perform token verification on the information query request based on the second task number to obtain a token verification result if the mobile phone number verification result indicates that the mobile phone number verification has passed and the task number verification result indicates that the task number verification has passed;
[0150] The information query unit 308 is configured to perform information query processing based on the information query request if the token verification result indicates that the token verification is passed, obtain business information corresponding to the information query request, and send the business information to the client.
[0151] By using the device provided by the embodiment of the present invention, in the process of business information query based on SMS verification, the server needs to verify the mobile phone number associated with the current information query request while verifying the task number and token corresponding to the information query request, and can verify the identity of the user again to ensure that the user who currently initiates the request is an authenticated user, avoid responding to malicious information query requests, and help avoid user data leakage and improve the security of the business system. Secondly, when the user passes the identity authentication, the server specifies the task number as the token and completes the token application. The client does not need to apply for the token on its own, which can reduce the interaction between the client and the server and improve business processing efficiency. In addition, specifying the task number as the token is equivalent to binding the task number to the token, and the task number can be reused, reducing the number of security parameters for internal interactions, which is conducive to reducing the cost of security service transformation.
[0152] exist Figure 4 Based on the device shown, the device provided by the embodiment of the present invention can be further expanded into multiple units. The functions of each unit can be found in the description of the various embodiments provided in the previous text for the business information query method based on SMS verification, and no further examples will be given here.
[0153] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned service information query method based on SMS verification.
[0154] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 5 As shown, the system specifically includes a memory 401 and one or more instructions 402, wherein the one or more instructions 402 are stored in the memory 401 and are configured to be executed by one or more processors 403 to perform the following operations:
[0155] When receiving an identity authentication request sent by a client, determining a target user, a first mobile phone number, and a first task number corresponding to the identity authentication request;
[0156] Authenticate the target user through SMS verification to obtain the target user's identity verification result;
[0157] If the identity authentication result of the target user indicates that the identity authentication is passed, a token application is performed based on the first task number, and the first task number is used as a first token corresponding to the target user;
[0158] When receiving an information query request corresponding to the target user, determining a second mobile phone number and a second task number corresponding to the information query request;
[0159] Based on the second mobile phone number, perform mobile phone number verification on the information query request to obtain a mobile phone number verification result;
[0160] Based on the second task number, performing task number verification on the information query request to obtain a task number verification result;
[0161] If the mobile phone number verification result indicates that the mobile phone number verification is passed, and the task number verification result indicates that the task number verification is passed, token verification is performed on the information query request based on the second task number to obtain a token verification result;
[0162] If the token verification result indicates that the token verification is passed, information query processing is performed based on the information query request, business information corresponding to the information query request is obtained, and the business information is sent to the client.
[0163] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0164] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0165] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A business information query method based on SMS verification, characterized in that: The method is applied to the server, and includes: When receiving an identity authentication request sent by a client, determining a target user, a first mobile phone number, and a first task number corresponding to the identity authentication request; Authenticate the target user through SMS verification to obtain the target user's identity verification result; If the identity authentication result of the target user indicates that the identity authentication is passed, a token application is performed based on the first task number, and the first task number is used as a first token corresponding to the target user; When receiving an information query request corresponding to the target user, determining a second mobile phone number and a second task number corresponding to the information query request; Based on the second mobile phone number, perform mobile phone number verification on the information query request to obtain a mobile phone number verification result; Based on the second task number, performing task number verification on the information query request to obtain a task number verification result; If the mobile phone number verification result indicates that the mobile phone number verification is passed, and the task number verification result indicates that the task number verification is passed, token verification is performed on the information query request based on the second task number to obtain a token verification result; If the token verification result indicates that the token verification is passed, performing information query processing based on the information query request, obtaining business information corresponding to the information query request, and sending the business information to the client; The performing token verification on the information query request based on the second task number to obtain a token verification result includes: Using the second task number as a second token corresponding to the target user; determining an applicant identifier corresponding to the first token; Determining a verifier identifier corresponding to the second token; Comparing the applicant identification with the verifier identification; If the applicant identifier is the same as the verifier identifier, determining a first transaction type corresponding to the second token; the first transaction type is the type of the transaction scenario for requesting the generation of the second token; determining a second transaction type corresponding to the information query request; determining whether the first transaction type matches the second transaction type; If the first transaction type matches the second transaction type, performing a validity check on the second token to obtain a validity check result; If the validity check result indicates that the second token is valid, the fifth preset verification conclusion is used as the token verification result; the fifth preset verification conclusion indicates that the token verification is passed.
2. The method for querying business information based on SMS verification according to claim 1, characterized in that: The performing mobile phone number verification on the information query request based on the second mobile phone number to obtain a mobile phone number verification result includes: comparing the second mobile phone number with the first mobile phone number; If the second mobile phone number is the same as the first mobile phone number, the first preset verification conclusion is used as the mobile phone number verification result; the first preset verification conclusion indicates that the mobile phone number verification has passed; If the second mobile phone number is different from the first mobile phone number, a second preset verification conclusion is used as the mobile phone number verification result; the second preset verification conclusion indicates that the mobile phone number verification has failed.
3. The method for querying business information based on SMS verification according to claim 1, characterized in that: The performing task number verification on the information query request based on the second task number to obtain a task number verification result includes: Determining whether the second task number is a verified task number; If the second task number is not a verified task number, comparing the second task number with the first task number; if the second task number is the same as the first task number, determining the identity verification result corresponding to the second task number; the identity verification result corresponding to the second task number is the identity verification result obtained during the identity verification process for generating the second task number; If the identity authentication result corresponding to the second task number indicates that the identity authentication is passed, the third preset verification conclusion is used as the task number verification result, and the second task number is marked as a verified task number; the third preset verification conclusion indicates that the task number verification is passed; If the identity authentication result corresponding to the second task number indicates that the identity authentication has failed, the fourth preset verification conclusion is used as the task number verification result; the fourth preset verification conclusion indicates that the task number verification has failed.
4. The method for querying business information based on SMS verification according to claim 3, characterized in that: Also includes: If the second task number is a verified task number, the third preset verification conclusion is used as the task number verification result.
5. The method for querying business information based on SMS verification according to claim 1, characterized in that: Also includes: If the mobile phone number verification result indicates that the mobile phone number verification has failed, or the task number verification result indicates that the task number verification has failed, the information query request is rejected.
6. The method for querying business information based on SMS verification according to claim 1, characterized in that: Also includes: If the token verification result indicates that the token verification has failed, the information query request is rejected.
7. A business information query device based on SMS verification, characterized in that: The device is applied to a server, and includes: A first determining unit is configured to, upon receiving an identity authentication request sent by a client, determine a target user, a first mobile phone number, and a first task number corresponding to the identity authentication request; The SMS verification unit is used to authenticate the target user through SMS verification and obtain the target user's identity authentication result; a token application unit, configured to apply for a token based on the first task number if the identity authentication result of the target user indicates that the identity authentication is passed, and use the first task number as a first token corresponding to the target user; a second determining unit, configured to, upon receiving an information query request corresponding to the target user, determine a second mobile phone number and a second task number corresponding to the information query request; a mobile phone number verification unit, configured to perform mobile phone number verification on the information query request based on the second mobile phone number, and obtain a mobile phone number verification result; a task number verification unit, configured to perform task number verification on the information query request based on the second task number, and obtain a task number verification result; a token verification unit configured to perform token verification on the information query request based on the second task number to obtain a token verification result if the mobile phone number verification result indicates that the mobile phone number verification has passed and the task number verification result indicates that the task number verification has passed; An information query unit, configured to, if the token verification result indicates that the token verification is passed, perform information query processing based on the information query request, obtain business information corresponding to the information query request, and send the business information to the client; The performing token verification on the information query request based on the second task number to obtain a token verification result includes: Using the second task number as a second token corresponding to the target user; determining an applicant identifier corresponding to the first token; Determining a verifier identifier corresponding to the second token; Comparing the applicant identification with the verifier identification; If the applicant identifier is the same as the verifier identifier, determining a first transaction type corresponding to the second token; the first transaction type is the type of the transaction scenario for requesting the generation of the second token; determining a second transaction type corresponding to the information query request; determining whether the first transaction type matches the second transaction type; If the first transaction type matches the second transaction type, performing a validity check on the second token to obtain a validity check result; If the validity check result indicates that the second token is valid, the fifth preset verification conclusion is used as the token verification result; the fifth preset verification conclusion indicates that the token verification is passed.
8. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the service information query method based on SMS verification according to any one of claims 1 to 6.
9. An electronic device, characterized in that: It includes a memory and one or more instructions, wherein one or more instructions are stored in the memory and are configured to be executed by one or more processors as described in any one of claims 1 to 6 as a service information query method based on SMS verification.
Citation Information
Patent Citations
Mobile phone number verification method and system
CN110149625A
Information authentication method and system, authentication module and user terminal
CN111010363A