Disclosure of Invention
In view of the foregoing, embodiments of the present invention are provided to provide a two-dimensional code-based recharging method, apparatus, and electronic device that overcome or at least partially solve the foregoing problems.
In a first aspect, an embodiment of the present invention provides a recharging method based on a two-dimensional code, which is applied to a terminal device, and the method includes:
 Scanning a target two-dimensional code and displaying a recharging page, wherein the target two-dimensional code comprises a target code and a page address of the recharging page;
 Acquiring local user information of the terminal equipment;
 Sending a first verification request carrying the user information and the target code to a server so that the server returns first verification result information based on the user information and target credential information, wherein the server is provided with a target virtual rechargeable card for the target code, and the target credential information is information reserved for the server to purchase the target virtual rechargeable card for a user stored by the target code;
 Receiving a first input of a user on the recharging page under the condition that the first verification result information is received and the first verification result information represents that verification is passed;
 And responding to the first input, and sending a first recharging request carrying first recharging information and the target code to the server so that the server can execute the operation of recharging the first target recharging number based on the first recharging information, wherein the first recharging information comprises the first target recharging number.
Optionally, the target credential information includes a telephone number,
In the case that the first verification result information is received and the first verification result information characterizes verification passing, the method further includes:
 and displaying the telephone number in a first control of the recharging page, wherein the first control is used for filling the telephone number to be recharged in the recharging page.
Optionally, the first input includes a first sub-input and a second sub-input; the receiving a first input of a user on the recharging page comprises:
 Receiving the first sub-input of a first control in the recharging page by a user, wherein the first control is used for filling a telephone number to be recharged in the recharging page;
 receiving the second sub-input of a second control in the recharging page by a user, wherein the second control is a control used for triggering a recharging request in the recharging page;
 the responding to the first input, sending a first recharging request carrying first recharging information and the target code to the server, and the method comprises the following steps:
 Responding to the first sub-input, and displaying the telephone number to be recharged, which is input by a user through the first sub-input, in the first control;
 And responding to the second sub-input, determining the telephone number to be recharged displayed in the first control as the first target recharging number, and sending a first recharging request carrying the first target recharging number and the target code to the server.
Optionally, after sending the first authentication request carrying the user information and the target code to a server, the method further comprises:
 displaying a verification page under the condition that the first verification result information is received and the first verification result information characterizes that verification is not passed;
 receiving first information to be verified which is input by a user on the verification page;
 sending a second verification request carrying the first information to be verified and the target code to the server so that the server returns second verification result information based on the first information to be verified and the target credential information;
And displaying the recharging page under the condition that the second verification result information is received and the second verification result information represents that verification is passed.
Optionally, the recharging page is displayed with a third control for filling the second information to be verified;
 After sending the first authentication request carrying the user information and the target code to a server, the method further comprises:
 receiving a second input of a user to the third control under the condition that the first verification result information is received and the first verification result information represents that verification is not passed;
 responding to the second input, and displaying the second information to be verified, which is input by a user through the second input, in the third control;
 receiving a third input of a user on the recharging page;
 And responding to the third input, sending a second recharging request carrying the second information to be verified, second recharging information and the target code to the server, so that the server generates third verification result information based on the second information to be verified and the target credential information, and executing the recharging operation of a second target recharging number based on the second recharging information under the condition that the third verification result information characterizes verification passing, wherein the second recharging information comprises the second target recharging number.
Optionally, the server stores, for the target code, first state information indicating that the target virtual rechargeable card cannot be used or second state information indicating that the target virtual rechargeable card is available;
 After sending the first authentication request carrying the user information and the target code to a server, the method further comprises:
 displaying a verification page under the condition that locking information is received; the locking information is information sent to the terminal equipment by the server under the condition that the first state information is stored for the target code;
 Receiving third information to be verified which is input by a user on the verification page;
 And sending a third verification request carrying the third information to be verified and the target code to the server, so that the server generates fourth verification result information based on the third information to be verified and the target credential information, and updates the first state information stored for the target code to the second state information under the condition that the fourth verification result information characterizes verification.
Optionally, the recharging page is displayed with a fourth control for triggering the display of the modification page,
In the case that the first verification result information is received and the first verification result information characterizes verification passing, the method further includes:
 Receiving a fourth input of a user to the fourth control;
 Displaying the modified page in response to the fourth input;
 receiving modification information input by a user on the modification page;
 And sending a modification request carrying the modification information and the target code to the server so that the server updates the target credential information based on the modification information.
Optionally, the first recharging information further includes: and the target recharging amount is smaller than or equal to the current remaining storage amount of the target virtual recharging card.
In a second aspect, an embodiment of the present invention further provides a recharging method based on a two-dimensional code, which is applied to a server, where the method includes:
 Generating a target two-dimensional code, wherein the target two-dimensional code comprises a target code and a page address of a recharging page;
 Receiving a first verification request sent by terminal equipment after scanning the target two-dimensional code, wherein the first verification request carries local user information of the terminal equipment and the target code;
 Generating first verification result information based on target credential information and the user information in the first verification request, wherein a target virtual rechargeable card is arranged for the target code by the server, and the target credential information is information reserved for purchasing the target virtual rechargeable card for a user stored for the target code;
 transmitting the first verification result information to the terminal equipment;
 under the condition that a first recharging request carrying first recharging information and the target code sent by the terminal equipment is received, the operation of recharging the first target recharging number is executed based on the first recharging information,
The first recharging information comprises the first target recharging number, and the first recharging request is a recharging request sent to the server by responding to a first input of a user on the recharging page under the condition that the terminal equipment receives the first verification result information and the first verification result information represents that verification passes.
Optionally, after sending the first verification result information to the terminal device, the method further includes:
 Generating second verification result information based on the first information to be verified and the target credential information under the condition that a second verification request carrying the first information to be verified and the target code sent by the terminal equipment is received;
 And sending the second verification result information to the terminal equipment.
Optionally, after sending the first verification result information to the terminal device, the method further includes:
 Generating third verification result information based on the second information to be verified and the target credential information under the condition that a second recharging request carrying the second information to be verified, the second recharging information and the target encoding is received, wherein the second recharging information comprises a second target recharging number;
 And executing the operation of recharging the second target recharging number based on the second recharging information under the condition that the third verification result information represents that verification passes.
Optionally, the server stores, for the target code, first state information indicating that the target virtual rechargeable card cannot be used or second state information indicating that the target virtual rechargeable card is available;
 After receiving a first verification request sent after the terminal equipment scans the target two-dimensional code, the method further comprises the following steps:
 transmitting locking information to the terminal device if it is determined that the server stores the first state information for the target code;
 generating fourth verification result information based on the third information to be verified and the target credential information under the condition that a third verification request carrying the third information to be verified and the target code sent by the terminal equipment is received;
 and updating the first state information stored for the target code to the second state information in the case that the fourth verification result information characterizes verification passing.
Optionally, after sending the first verification result information to the terminal device, the method further includes:
 receiving a modification request sent by the terminal equipment, wherein the modification request carries modification information and the target code;
 Updating the target credential information based on the modification information.
Optionally, the first recharging information further includes: the server records the current remaining storage amount of the target virtual rechargeable card aiming at the target code;
 the operation of recharging the first target recharging number based on the first recharging information comprises the following steps:
 determining the current remaining storage amount of the target virtual rechargeable card based on the target code;
 And under the condition that the target recharging amount is smaller than or equal to the current remaining storage amount of the target virtual recharging card, recharging the first target recharging number by the target recharging amount, and updating the storage amount after recharging to be the target amount, wherein the target amount is equal to the difference value between the storage amount before recharging and the target recharging amount.
In a third aspect, an embodiment of the present invention further provides a recharging device based on a two-dimensional code, which is applied to a terminal device, where the device includes:
 the scanning module is used for scanning the target two-dimensional code and displaying a recharging page, wherein the target two-dimensional code comprises a target code and a page address of the recharging page;
 The acquisition module is used for acquiring the local user information of the terminal equipment;
 The first sending module is used for sending a first verification request carrying the user information and the target code to a server so that the server returns first verification result information based on the user information and target credential information, wherein the server is provided with a target virtual rechargeable card aiming at the target code, and the target credential information is information reserved for the server to purchase the target virtual rechargeable card for a user stored by aiming at the target code;
 The first receiving module is used for receiving a first input of a user on the recharging page under the condition that the first verification result information is received and the first verification result information represents that verification is passed;
 The second sending module is used for responding to the first input and sending a first recharging request carrying first recharging information and the target code to the server so that the server can execute the operation of recharging the first target recharging number based on the first recharging information, wherein the first recharging information comprises the first target recharging number.
In a fourth aspect, an embodiment of the present invention further provides a recharging device based on a two-dimensional code, which is applied to a server, where the device includes:
 The first generation module is used for generating a target two-dimensional code, wherein the target two-dimensional code comprises a target code and a page address of a recharging page;
 The second receiving module is used for receiving a first verification request sent by the terminal equipment after scanning the target two-dimensional code, wherein the first verification request carries user information local to the terminal equipment and the target code;
 The second generation module is used for generating first verification result information based on target credential information and the user information in the first verification request, wherein a target virtual rechargeable card is arranged on the server aiming at the target code, and the target credential information is information reserved for purchasing the target virtual rechargeable card by a user stored aiming at the target code;
 The third sending module is used for sending the first verification result information to the terminal equipment;
 a recharging module, configured to perform a recharging operation for the first target recharging number based on the first recharging information when receiving a first recharging request carrying the first recharging information and the target code sent by the terminal device,
The first recharging information comprises the first target recharging number, and the first recharging request is a recharging request sent to the server by responding to a first input of a user on the recharging page under the condition that the terminal equipment receives the first verification result information and the first verification result information represents that verification passes.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, including: the device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the processor is used for realizing the two-dimensional code-based recharging method according to the first aspect or the two-dimensional code-based recharging method according to the second aspect when executing the program.
In a sixth aspect, an embodiment of the present invention further provides a readable storage medium, where instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the two-dimensional code-based recharging method or the two-dimensional code-based recharging method described in any one of the above.
In the embodiment of the invention, the recharging page can be displayed by scanning the target two-dimensional code comprising the page address of the recharging page in the recharging process, so as to start the recharging flow. Because the two-dimensional code is used instead of the entity rechargeable card in the recharging process, the manufacturing cost of the entity rechargeable card is saved; and then acquiring user information local to the terminal equipment, and sending a first verification request carrying the user information and a target code in the target two-dimensional code to the server so that the server returns first verification result information based on the user information and the target credential information, wherein the target credential information is information reserved by the server for purchasing a target virtual rechargeable card for a user stored by the target code. And adding a verification process in the recharging process, and verifying whether the first user who is currently recharged is a second user who purchases the target virtual rechargeable card or a third user authorized by the second user through the target credential information and the user information of the local terminal equipment. And under the condition that the first verification result information is received and the first verification result information represents that verification is passed, based on the first input of the user on the recharging page, sending a first recharging request carrying first recharging information and target codes to the server, so that the server executes the recharging operation of the first target recharging number based on the first recharging information. Because the recharging request is initiated to realize recharging under the condition that the verification is passed, the direct recharging under the condition that the verification is not passed or the verification process is not passed can be avoided, and therefore the recharging safety of a user is improved.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a recharging method based on two-dimensional codes, which is applied to a terminal device, and the method includes:
 step 101: and scanning a target two-dimensional code and displaying a recharging page, wherein the target two-dimensional code comprises a target code and a page address of the recharging page.
It should be noted that, the terminal device is an electronic device with a scanning function, and when the user charges through the terminal device, the terminal device will start the scanning function to scan the target two-dimensional code. When the terminal equipment starts the scanning function, the target two-dimensional code and the page address of the recharging page carried in the target two-dimensional code can be obtained by scanning the target two-dimensional code. And then according to the acquired page address, page data of the recharging page can be acquired from the server, and the acquired page data of the recharging page is rendered into a display interface of the terminal equipment, namely the recharging page is displayed. Here, the source of the target two-dimensional code may be a two-dimensional code downloaded to the terminal device locally, or may be a two-dimensional code on another terminal device, which is not limited herein.
It should be noted that, the recharging page may be a web page, or may be a page in an application program installed on the terminal device, where both pages display the same page content. Taking a mobile phone as an example, after a mobile phone scans a target two-dimensional code to obtain a page address of a recharging page, automatically detecting whether a client of a recharging system is installed on the mobile phone, if so, starting the client to open the recharging page through the page address to load corresponding contents. If not, loading the recharging page in the form of a webpage through the page address.
Step 102: and acquiring user information local to the terminal equipment.
It should be noted that the user information local to the terminal device is information associated with the terminal device or the user stored locally to the terminal device. When the terminal device is a mobile phone, the local user information of the terminal device can be a local number of the mobile phone, account information of a target application currently logged in an account installed in the mobile phone, and the like, wherein the target application is an application to which a recharging page belongs, and the account information comprises but is not limited to an account nickname, a real name and an identity card number which are input by a user when registering the account.
Step 103: and sending a first verification request carrying the user information and the target code to the server so that the server returns first verification result information based on the user information and the target credential information.
It should be noted that the server is provided with a target virtual rechargeable card aiming at the target code, and the target credential information is information reserved for the server to purchase the target virtual rechargeable card aiming at the user stored in the target code. That is, in the case that the user purchases the target virtual rechargeable card, the user reserves some data indicating the user's identity as the target credential information. The user is a user who uses the target virtual rechargeable card, and the user can be the user who purchases the target virtual rechargeable card or other users. And the server stores the target credential information corresponding to the target virtual rechargeable card. Thus, the target credential information may also be regarded as user information of the user using the target virtual rechargeable card stored on the server side. The user information local to the terminal device carried in the first verification request may be regarded as user information of the user using the target virtual rechargeable card at the terminal device side. Therefore, by the target credential information and the user information in the first verification request, it is possible to verify whether the user information of the user using the target virtual rechargeable card at both the terminal device side and the server side is identical, and it is possible to generate the first verification result information. If the user information of the two user information is consistent, the verification is passed, otherwise, the verification is not passed.
It is understood that the target virtual rechargeable card is not an entity card, but a piece of data recorded in the server, and the target code may be understood as a card number of the target virtual rechargeable card. Under the condition that a plurality of virtual rechargeable cards are arranged in the server, a code is stored corresponding to each virtual rechargeable card, and the codes are different from each other, so that different virtual rechargeable cards can be distinguished through the codes. The target code is used to determine which virtual rechargeable card the user uses, thereby finding the target credential information.
Step 104: and under the condition that the first verification result information is received and the first verification result information characterizes that verification is passed, receiving a first input of a user on the recharging page.
It should be noted that, in the case of receiving the first verification result information indicating that the verification is passed, it is explained that the user information of the users who use the target virtual rechargeable card at both the terminal device side and the server side are identical, and the terminal device side will be allowed to continue to use the target virtual rechargeable card for recharging. At this time, by receiving the first input of the user on the recharging page, the relevant information required for recharging can be obtained.
Step 105: and responding to the first input, and sending a first recharging request carrying first recharging information and a target code to the server so that the server performs the operation of recharging the first target recharging number based on the first recharging information.
It should be noted that, the first recharging information includes relevant information required for recharging, and specifically, the first recharging information includes: the first target recharging number may be a phone number displayed in the recharging page. The terminal device informs the server of the user's recharging request by sending the first recharging request, informs the server of the user's recharging request by the target code in the first recharging request, informs the server of the virtual recharging card used by the user's recharging, and informs the server of the telephone number targeted by the user's recharging by the first recharging information in the first recharging request, so that the server can finally recharge the first target recharging number by using the target virtual recharging card according to the first recharging request.
In the embodiment of the invention, the recharging page can be displayed by scanning the target two-dimensional code comprising the page address of the recharging page in the recharging process, so as to start the recharging flow. Because the two-dimensional code is used instead of the entity rechargeable card in the recharging process, the manufacturing cost of the entity rechargeable card is saved; and then acquiring user information local to the terminal equipment, and sending a first verification request carrying the user information and a target code in the target two-dimensional code to the server so that the server returns first verification result information based on the user information and the target credential information, wherein the target credential information is information reserved by the server for purchasing a target virtual rechargeable card for a user stored by the target code, a verification process is added in a recharging process, and whether the first user who is currently recharged is a second user who purchases the target virtual rechargeable card or a third user authorized by the second user can be verified through the target credential information and the user information local to the terminal equipment. And under the condition that the first verification result information is received and the first verification result information represents that verification is passed, based on the first input of the user on the recharging page, sending a first recharging request carrying first recharging information and target codes to the server, so that the server executes the recharging operation of the first target recharging number based on the first recharging information. Because the recharging request is initiated to realize recharging under the condition that the verification is passed, the direct recharging under the condition that the verification is not passed or the verification process is not passed can be avoided, and therefore the recharging safety of a user is improved.
Optionally, the target credential information includes a telephone number,
In the case that the first verification result information is received and the first verification result information characterizes that verification is passed, the method further includes:
 And displaying the telephone number in a first control of the recharging page, wherein the first control is used for filling the telephone number to be recharged in the recharging page.
It should be noted that the terminal device may be a mobile phone, and the phone number to be recharged is the recharging object. Therefore, the phone number displayed in the first control is the current recharging object. The user can quickly acquire the current recharging object by looking up the first control. And the user modifies the current recharging object, namely, modifies the telephone number displayed in the first control, and the terminal equipment displays the modified telephone number in the first control of the recharging page after receiving the modification operation of the user.
It will be appreciated that it is typically determined which number is desired to be recharged using the target virtual rechargeable card when the user purchases the target virtual rechargeable card. At this time, the user typically reserves the telephone number, that is, in the case where the target credential information includes the telephone number, the telephone number is a recharging object predetermined by the user. At this time, if the terminal device receives the first verification result information that the characterization verification passes, the step of manually inputting the phone number in the first control by the user is omitted by directly displaying the phone number (the recharging object predetermined by the user) in the target credential information in the first control. The phone number in the target credential information may be carried in the first verification result information and sent to the terminal device, but is not limited thereto. For example, the user information local to the terminal device may include a local number. And when the local number is the same as the telephone number in the target credential information, the characterization verification is passed. At this time, the local number may be obtained directly from the terminal device locally and displayed.
In the embodiment of the invention, under the condition that the target credential information comprises the telephone number and the first verification result information which represents that verification is passed is received, the telephone number to be recharged can be automatically displayed in the first control of the recharging page, so that a user can conveniently and intuitively check a recharging object. Meanwhile, under the condition that the recharging object displayed at present meets the requirement of a user, the process of manually inputting the telephone number to be recharged by the user can be omitted, and therefore recharging operation is simplified.
Optionally, the first input comprises a first sub-input and a second sub-input;
 receiving a first input of a user on a recharge page, comprising:
 Receiving a first sub-input of a user to a first control in a recharging page, wherein the first control is used for filling a telephone number to be recharged in the recharging page;
 Receiving a second sub-input of a second control in the recharging page by a user, wherein the second control is used for triggering a recharging request in the recharging page;
 in response to the first input, sending a first recharge request carrying first recharge information and a target code to a server, comprising:
 responding to the first sub-input, and displaying the telephone number to be recharged, which is input by the user through the first sub-input, in a first control;
 And responding to the second sub-input, determining the telephone number to be recharged displayed in the first control as a first target recharging number, and sending a first recharging request carrying the first target recharging number and a target code to the server.
It should be noted that the first input of the user on the recharging page includes a first sub-input through which the relevant information required for recharging can be obtained and a second sub-input through which the recharging request can be triggered. Here, the first control and the second control are used to receive corresponding inputs, for example, the first control may be an input box, and the second control may be a submit button, but is not limited thereto.
In the embodiment of the invention, the user can freely determine the recharging object, namely the telephone number to be recharged, through the first sub-input; the recharging time can be freely determined through the second sub-input, so that the whole recharging process has better flexibility, and more choices can be provided for users.
Optionally, after sending the first authentication request carrying the user information and the target code to the server, the method further comprises:
 displaying a verification page under the condition that the first verification result information is received and the first verification result information characterizes that verification fails;
 receiving first information to be verified, which is input by a user on a verification page;
 Sending a second verification request carrying the first information to be verified and the target code to the server so that the server returns second verification result information based on the first information to be verified and the target credential information;
 and displaying a recharging page under the condition that the second verification result information is received and the second verification result information represents that verification is passed.
It should be noted that, in the case of receiving the first verification result information that the characterization verification is not passed, it is explained that the user information of the users who use the target virtual rechargeable card at both the terminal device side and the server side is inconsistent, and the terminal device side will not be allowed to continue to use the target virtual rechargeable card for recharging. If the terminal device side wants to continue to use the target virtual rechargeable card for recharging, the terminal device needs to perform secondary verification, that is, the terminal device sends a second verification request to the server, so that the server performs secondary verification based on data carried in the second verification request. Here, the user is prompted to input data required for the secondary verification, namely, the first information to be verified by displaying the verification page, and after the first information to be verified input by the user is received, the first information to be verified is carried into the second verification request and is sent to the server. Compared with the primary verification based on the user information and the target credential information, the secondary verification utilizes the first information to be verified and the target credential information, and the process of the secondary verification is similar and is not repeated here.
It can be understood that, in the case that the user has already known the target credential information, the first information to be verified that the user inputs on the verification page may be the target credential information, so as to ensure that the second verification may pass. Here, the user who uses the target virtual rechargeable card for recharging may be the user who purchases the target virtual rechargeable card or another user who is authorized for the user. Wherein the other users authorized by the user are users informed of the target credential information by the user. Two users are illustrated herein, such as user a purchasing a target virtual rechargeable card and user a allowing user B to use the target virtual rechargeable card, i.e., other users for whom user B is authorized. After the user B scans the target two-dimensional code by using the terminal device B, since the used terminal device B is not the terminal device a of the user a, the local user information of the terminal device B is inconsistent with the target credential information, and the terminal device B displays the verification page. Because the user B is informed of the target credential information in advance, the user B only needs to input the target credential information in the verification page for secondary verification, and after the secondary verification is passed, the terminal equipment B displays a recharging page for the user B to recharge by using the target virtual rechargeable card.
After the recharging page is displayed, the user can directly receive the input of the recharging page without verification, so as to finish the recharging operation of the recharging object. The specific process may refer to the first input of the receiving user in the recharge page in step 104 and step 105, which are not described herein.
It should be noted that the verification page may be displayed in various manners, for example, but not limited to, a web link to which the verification page is attached in the returned first verification result information indicating that the verification is failed, and the verification page is displayed through the web link.
In the embodiment of the invention, under the condition that the first verification result information representing that verification fails is received, the terminal equipment initiates secondary verification, namely, sends a second verification request to the server. And after the secondary verification is passed, displaying a recharging page so as to allow the user to continuously use the target virtual recharging card for recharging through the terminal equipment. Through the secondary verification mode, the recharging safety of the user is further improved, and meanwhile opportunities are provided for other people to use the target virtual rechargeable card.
Optionally, the recharging page is displayed with a third control for filling the second information to be verified;
 after sending the first authentication request carrying the user information and the target code to the server, the method further comprises:
 receiving second input of a user to a third control under the condition that the first verification result information is received and the first verification result information represents that verification is not passed;
 responding to the second input, and displaying second information to be verified, which is input by a user through the second input, in a third control;
 receiving a third input of a user on the recharging page;
 Responding to a third input, sending a second recharging request carrying second information to be verified, second recharging information and target codes to the server, enabling the server to generate third verification result information based on the second information to be verified and the target credential information, and executing recharging operation on the second target recharging number based on the second recharging information under the condition that the third verification result information characterizes verification to pass, wherein the second recharging information comprises the second target recharging number.
It should be noted that, in the case of receiving the first verification result information that the characterization verification is not passed, it is explained that the user information of the users who use the target virtual rechargeable card at both the terminal device side and the server side is inconsistent, and the terminal device side will not be allowed to continue to use the target virtual rechargeable card for recharging. At this time, if the terminal device side wants to successfully use the target virtual rechargeable card to complete recharging, it is necessary to perform secondary verification before performing recharging operation, and pass the secondary verification. Here, data required for the secondary authentication is transmitted to the server together with the second recharging information, so that the server directly performs the recharging operation after determining that the secondary authentication passes. Specifically, the third control in the recharging page prompts the user to input data required by secondary verification, namely second information to be verified, and after the second information to be verified and the second recharging information input by the user in the recharging page are received, the second information to be verified and the second recharging information are carried into a second recharging request and sent to the server. Compared with the primary verification based on the user information and the target credential information, the secondary verification utilizes the second information to be verified and the target credential information, and the process of the secondary verification is similar and is not repeated here. Compared with the recharging operation of the first target recharging number based on the first recharging information, the recharging operation of the second target recharging number utilizes the second recharging information, and the recharging process of the second recharging is similar and will not be repeated here.
It can be understood that, in the case that the user has already known the target credential information, the second information to be verified that is input by the user in the third control may be the target credential information, so as to ensure that the second verification may pass. Here, the user who uses the target virtual rechargeable card for recharging may be the user who purchases the target virtual rechargeable card or another user who is authorized for the user. Wherein the other users authorized by the user are users informed of the target credential information by the user.
In the embodiment of the invention, under the condition that the first verification result information of which the characterization verification fails is received, the terminal equipment combines the secondary verification and recharging together, namely, sends a second recharging request carrying the second information to be verified and the second recharging information to the server. After the secondary verification is passed, the recharging operation is directly carried out. The recharging safety of the user is further improved through the secondary verification mode, and meanwhile, the secondary verification process and the recharging process are combined together, so that recharging operation is simplified, and recharging time of the user is saved.
Optionally, the server stores first state information representing that the target virtual rechargeable card cannot be used or second state information representing that the target virtual rechargeable card is available for target encoding;
 after sending the first authentication request carrying the user information and the target code to the server, the method further comprises:
 displaying a verification page under the condition that locking information is received; the locking information is information sent to the terminal equipment by the server under the condition that the first state information is stored aiming at the target code;
 Receiving third information to be verified, which is input by a user on a verification page;
 And sending a third verification request carrying the third information to be verified and the target code to the server so that the server generates fourth verification result information based on the third information to be verified and the target credential information, and updating the first state information stored for the target code to the second state information under the condition that the fourth verification result information characterizes verification passing.
It should be noted that the target two-dimensional code should be used by the user who purchases the target virtual rechargeable card or by the user authorized by the user. If the target two-dimensional code is revealed to other users, the other users pass the continuous trial verification, and the target virtual two-dimensional code can be stolen. Here, in order to avoid the target virtual two-dimensional code from being stolen, the state of the target virtual rechargeable card is set, the target virtual rechargeable card can be used for recharging in a normal state, and the target virtual rechargeable card cannot be used for recharging in a locked state. Specifically, in the recharging process of the terminal device by using the target virtual rechargeable card, if the locking information is received, the terminal device indicates that the target virtual rechargeable card cannot be used for recharging continuously. At this time, if the target virtual rechargeable card is to be restored to use, the locked state of the target virtual rechargeable card needs to be released. Meanwhile, in order to ensure that the user currently using the target virtual rechargeable card is the user who purchases the target virtual rechargeable card or the user authorized by the user, the user needs to perform verification again, namely, a third verification request is sent to the server, and the locking state of the target virtual rechargeable card is released under the condition that the verification passes. It can be appreciated that, compared with one-time verification based on the user information and the target credential information, the present verification uses the third information to be verified and the target credential information, and the two-time verification processes are similar, which is not repeated here.
In the embodiment of the invention, under the condition of preventing the target virtual rechargeable card from being stolen, the terminal equipment receives the locking information, if the terminal equipment side wants the target virtual rechargeable card to release the locking state, the target virtual rechargeable card is used for recharging, and verification is needed again, namely a third verification request is sent to the server, so that the server generates fourth verification result information based on the third information to be verified and the target credential information, and under the condition that the fourth verification result information characterizes that verification passes, the locking state of the target virtual rechargeable card is released. By means of re-verification, the locking state of the target virtual rechargeable card can be released under the condition of ensuring safety, and the terminal equipment side can continue to use the target virtual rechargeable card for recharging.
Optionally, the top-up page is displayed with a fourth control for triggering the display of the modification page,
In the case that the first verification result information is received and the first verification result information characterizes that verification is passed, the method further includes:
 receiving a fourth input of a user to a fourth control;
 In response to the fourth input, displaying a modified page;
 receiving modification information input by a user on a modification page;
 and sending a modification request carrying the modification information and the target code to the server so that the server updates the target credential information based on the modification information.
It should be noted that the target credential information is not invariable as data indicating the identity of the user and may be modified. For example, in the case where the user does not modify the target credential information for a long period of time, the target virtual rechargeable card is lost, etc., in order to prevent the target credential information from being revealed, thereby threatening the property security of the user, the user may modify the target credential information into another set of data. For example, when the target credential information is a set of recharging passwords, the modification information may be another set of recharging passwords, and the two sets of recharging passwords are different, so that after the target credential information is updated, the updated target credential information is a new recharging password, and at this time, if the user wants to use the target virtual recharging card again, the user needs to input the new recharging password in the verification link to pass the verification.
In the embodiment of the invention, when the user has the requirement of modifying the target credential information, under the condition that the first verification result information which characterizes verification is received, the terminal equipment sends a modification request to the server, wherein the modification request comprises modification information so that the server updates the target credential information based on the modification information. By modifying the target credential information, the property safety of the user can be further ensured.
Optionally, the first recharging information further includes: and the target recharging amount is smaller than or equal to the current remaining storage amount of the target virtual recharging card.
It should be noted that the target recharge amount is the amount that the user wants to recharge the first target recharge number, but cannot exceed the currently remaining stored amount of the target virtual recharge card. It will be appreciated that the amount of storage for the target virtual rechargeable card purchased by the user is fixed, e.g., 50 yuan, 100 yuan, etc. But the user may use only a portion of the amount of money in the recharging process. For example, the user a purchases a virtual rechargeable card with a storage amount of 100 yuan, the first time the user a charges 50 yuan for the phone number 1, the virtual rechargeable card has a current remaining storage amount of 50 yuan, and the second time the user a charges 30 yuan for any phone number, and the virtual rechargeable card has a current remaining storage amount of 20 yuan.
In the embodiment of the invention, one target virtual rechargeable card can be used for multiple times, and a user can freely select the amount to be recharged each time according to the current remaining storage amount of the target virtual rechargeable card, so that the use of the user is greatly facilitated, and more recharging demands of the user can be met.
Referring to fig. 2, the embodiment of the invention further provides a recharging method based on the two-dimension code, which is applied to a server and comprises the following steps:
 Step 201: and generating a target two-dimensional code, wherein the target two-dimensional code comprises a target code and a page address of a recharging page.
Step 202: and receiving a first verification request sent by the terminal equipment after scanning the target two-dimensional code, wherein the first verification request carries user information and target codes of the terminal equipment.
It should be noted that, by receiving the first authentication request sent by the terminal device, user information local to the terminal device may be obtained. Specific user information is associated with step 102 in the embodiment shown in fig. 1: the user information in the user information local to the terminal device is similar, and in order to avoid repetition, details are not described here.
Step 203: first verification result information is generated based on the target credential information and the user information in the first verification request.
It should be noted that the server is provided with a target virtual rechargeable card for the target code, and the target credential information is information reserved for purchasing the target virtual rechargeable card for the user stored in the target code. That is, in the case that the user purchases the target virtual rechargeable card, the user reserves some data indicating the user's identity as the target credential information. The user is a user who uses the target virtual rechargeable card, and the user can be the person who purchases the target virtual rechargeable card or other persons. Thus, the target credential information may also be regarded as user information of the user using the target virtual rechargeable card stored on the server side. The user information local to the terminal device carried in the first verification request in step 202 may be regarded as user information of the user using the target virtual rechargeable card at the terminal device side. Therefore, the server verifies whether the user information of the user using the target virtual rechargeable card at both the terminal device side and the server side is identical based on the target credential information and the user information, and can generate the first verification result information. If the user information of the two user information is consistent, the verification is passed, otherwise, the verification is not passed. Here, the user information of the two is consistent, which can be understood as corresponding information in the user information, for example, when the target credential information is a group of mobile phone numbers, if the user information sent by the terminal device side is an identity number, at this time, the mobile phone number and the number of digits of the identity number are different, which indicates that the mobile phone number is not corresponding information, and the comparison verification cannot be performed, so that the verification fails; if the user information sent by the terminal device side is another group of mobile phone numbers, at this time, the digits of the two groups of mobile phone numbers are the same, and the two groups of mobile phone numbers are indicated as the same type of information, so that comparison verification can be performed, and then when the two groups of mobile phone numbers are the same after comparison, the two groups of mobile phone numbers are indicated to be identical, that is, the user information of the two groups of mobile phone numbers is identical, so that verification is passed, but the method is not limited to the method.
Step 204: and sending the first verification result information to the terminal equipment.
Step 205: and under the condition that a first recharging request carrying first recharging information and a target code sent by the terminal equipment is received, carrying out the operation of recharging the first target recharging number based on the first recharging information.
It should be noted that the first recharging information includes a first target recharging number, and the first recharging request is a recharging request sent to the server by responding to a first input of a user on a recharging page when the terminal device receives first verification result information and the first verification result information indicates that verification is passed.
In the embodiment of the invention, a target two-dimensional code is firstly generated, wherein the target two-dimensional code comprises a target code and a page address of a recharging page; then receiving a first verification request sent by the terminal equipment after scanning the target two-dimensional code, wherein the first verification request carries local user information of the terminal equipment and the target code; generating first verification result information based on the target credential information and the user information in the first verification request, and then transmitting the first verification result information to the terminal equipment; then receiving a first recharging request sent to a server by the terminal equipment under the condition that the first verification result information is received and the first verification result information represents that verification is passed; and finally, under the condition that a first recharging request carrying first recharging information and a target code sent by the terminal equipment is received, carrying out the operation of recharging the first target recharging number based on the first recharging information. Because the recharging request is initiated to realize recharging under the condition that the verification is passed, the direct recharging under the condition that the verification is not passed or the verification process is not passed can be avoided, and therefore the recharging safety of a user is improved.
Optionally, after the first verification result information is sent to the terminal device, the method further includes:
 Under the condition that a second verification request carrying first information to be verified and target codes sent by terminal equipment is received, generating second verification result information based on the first information to be verified and the target credential information;
 and sending the second verification result information to the terminal equipment.
It should be noted that, after the first verification result information that the characterization verification is not passed is sent to the terminal device, it is explained that the user information of the users who use the target virtual rechargeable card at both the terminal device side and the server side are inconsistent, and at this time, the server side will not allow the terminal device side to continue to use the target virtual rechargeable card for recharging. If the server side is required to allow the terminal equipment side to continue to use the target virtual rechargeable card for recharging, secondary verification is needed, namely the server receives a second verification request sent by the terminal equipment, performs secondary verification based on the target credential information and first to-be-verified information in the second verification request, and generates second verification result information. Compared with the primary verification based on the target credential information and the user information in the first verification request, the secondary verification utilizes the first information to be verified and the target credential information, and the process of the two verifications is similar and is not repeated here.
In the embodiment of the invention, under the condition that the first verification result information characterizes that verification is not passed, a second verification request sent by the terminal equipment is received, and second verification result information is generated based on the target credential information and the first information to be verified in the second verification request. Through the secondary verification mode, opportunities are provided for the server side to allow the terminal equipment side to continuously use the target virtual rechargeable card for recharging.
Optionally, after the first verification result information is sent to the terminal device, the method further includes:
 Generating third verification result information based on the second information to be verified and the target credential information under the condition that a second recharging request carrying the second information to be verified, the second recharging information and the target code, which is sent by the terminal equipment, is received, wherein the second recharging information comprises a second target recharging number;
 And under the condition that the third verification result information represents that verification passes, performing recharging operation on the second target recharging number based on the second recharging information.
It should be noted that, after the first verification result information that the characterization verification is not passed is sent to the terminal device, it is explained that the user information of the users who use the target virtual rechargeable card at both the terminal device side and the server side are inconsistent, and at this time, the server side will not allow the terminal device side to continue to use the target virtual rechargeable card for recharging. If the server side is required to allow the terminal equipment side to successfully use the target virtual recharging card to finish recharging, the server side needs to perform secondary verification before recharging operation is performed, and the server receives a second recharging request sent by the terminal equipment through the secondary verification, performs secondary verification based on target credential information and second information to be verified in the second recharging request, and performs recharging operation on a second target recharging number in the second recharging information based on the second recharging information in the second recharging request under the condition that the secondary verification passes. Compared with the primary verification based on the user information and the target credential information, the secondary verification utilizes the second information to be verified and the target credential information, and the process of the secondary verification is similar and is not repeated here. Compared with the recharging operation of the first target recharging number based on the first recharging information, the recharging operation of the second target recharging number utilizes the second recharging information, and the recharging process of the second recharging is similar and will not be repeated here.
Of course, if the secondary verification fails, it indicates that the second information to be verified is inconsistent with the target credential information, so that the server side does not allow the terminal device side to continue to use the target virtual rechargeable card for recharging, at this time, the server side may return third verification result information indicating that the verification fails or send recharging result information indicating that the recharging is unsuccessful to the terminal device, which is not limited herein.
In the embodiment of the invention, when the first verification result information characterizes verification and fails, a second recharging request sent by the terminal equipment is received, third verification result information is generated based on the target credential information and second information to be verified in the second recharging request, and when the third verification result information characterizes verification and fails, recharging operation of a second target recharging number in the second recharging information is executed based on the second recharging information in the second recharging request. The recharging safety of the user is further improved through the secondary verification mode, meanwhile, the secondary verification operation and the recharging operation are combined together, so that the server can complete the verification operation and the recharging operation only by processing a request once, and recharging time of the user is saved.
Optionally, the server stores first state information representing that the target virtual rechargeable card cannot be used or second state information representing that the target virtual rechargeable card is available for target encoding;
 after receiving the first verification request sent after the terminal equipment scans the target two-dimensional code, the method further comprises the following steps:
 under the condition that the server stores first state information representing the target code, sending locking information to the terminal equipment;
 Under the condition that a third verification request carrying third information to be verified and target codes sent by terminal equipment is received, fourth verification result information is generated based on the third information to be verified and the target credential information;
 And updating the first state information stored for the target code to the second state information under the condition that the fourth verification result information characterizes verification passing.
It should be noted that the target two-dimensional code should be used by the user who purchases the target virtual rechargeable card or by the user authorized by the user. If the target two-dimensional code is revealed to other users, the other users pass the continuous trial verification, and the target virtual two-dimensional code can be stolen. In order to avoid the target virtual two-dimensional code from being stolen, the server side sets a state of the target virtual rechargeable card, allows the terminal equipment side to use the target virtual rechargeable card to recharge in a normal state, and does not allow the terminal equipment side to use the target virtual rechargeable card to recharge in a locked state. Specifically, when the server stores the first state information for the target code, it is explained that the target virtual rechargeable card is in a locked state, that is, the server side does not allow the terminal device side to use the target virtual rechargeable card for recharging. For example, when the server receives multiple verification requests and the verification result information is that verification fails, the target virtual rechargeable card may be set to a locked state; the user carelessly loses the target two-dimensional code, so that the target two-dimensional code is prevented from being stolen, and the server is requested to set the target virtual rechargeable card to a locked state and the like, but the method is not limited to the method. If the server side is wanted to release the locking state of the target virtual rechargeable card, so that the server side allows the terminal equipment side to use the target virtual rechargeable card for recharging, the server needs to perform re-verification, namely, the third verification request sent by the terminal equipment is received and verified, and the locking state of the target virtual rechargeable card is released under the condition that the verification passes. It can be appreciated that, compared with one-time verification based on the user information and the target credential information, the present verification uses the third information to be verified and the target credential information, and the two-time verification processes are similar, which is not repeated here.
In the embodiment of the invention, the server sends the locking information to the terminal equipment under the condition of preventing the target virtual rechargeable card from being stolen. If the server side is wanted to release the locking state of the target virtual rechargeable card, so that the server side allows the terminal equipment side to use the target virtual rechargeable card for recharging, the server needs to perform re-verification, namely the server receives a third verification request sent by the terminal equipment, fourth verification result information is generated based on the target credential information and the third information to be verified in the third verification request, and the locking state of the target virtual rechargeable card is released under the condition that the fourth verification result information represents verification pass. By means of re-verification, the locking state of the target virtual rechargeable card can be released under the condition of ensuring safety, so that the server side allows the terminal equipment side to continue to use the target virtual rechargeable card for recharging.
Optionally, after the first verification result information is sent to the terminal device, the method further includes:
 Receiving a modification request sent by terminal equipment, wherein the modification request carries modification information and a target code;
 the target credential information is updated based on the modification information.
It should be noted that the data reserved by the user indicating the identity of the user is not a member of the group, but can be modified. For example, in the case where the user does not modify the target credential information for a long period of time, the target virtual rechargeable card is lost, etc., in order to prevent the target credential information from being revealed, thereby threatening the property security of the user, the user may modify the target credential information into another set of data. For example, when the target credential information is a group of mobile phone numbers, the modification information may be another group of mobile phone numbers, and the two groups of mobile phone numbers are different, so that after the target credential information is updated, the updated target credential information is a new mobile phone number, and at this time, if the user wants to use the target virtual rechargeable card, the user needs to input the new mobile phone number in the verification link to pass the verification.
In the embodiment of the invention, under the condition that the modification request sent by the terminal equipment is received, the user is explained to have the requirement of modifying the target credential, and the target credential information is updated based on the modification information. By modifying the target credential information, the property safety of the user can be further ensured.
Optionally, the first recharging information further includes: the server records the current remaining storage amount of the target virtual rechargeable card aiming at the target code;
 Performing an operation of recharging the first target recharge number based on the first recharge information, including:
 determining the current remaining storage amount of the target virtual rechargeable card based on the target code;
 And under the condition that the target recharging amount is smaller than or equal to the current remaining storage amount of the target virtual recharging card, recharging the first target recharging number by the target recharging amount, and updating the storage amount after recharging to the target amount, wherein the target amount is equal to the difference value between the storage amount before recharging and the target recharging amount.
It should be noted that the target recharge amount is the amount that the user wants to recharge the first target recharge number, but cannot exceed the currently remaining stored amount of the target virtual recharge card. That is, after each recharge, the currently remaining stored amount of the target virtual recharge card needs to be modified. For example, if the user a uses the virtual rechargeable card a to recharge the phone number 1 by 30 yuan, and at this time, 50-30=20 yuan remains in the virtual rechargeable card a; if the user a uses the virtual rechargeable card a to recharge the phone number 1 by 60 yuan, the target recharge amount 60 yuan is greater than the currently remaining storage amount 50 yuan of the virtual rechargeable card a, so that the user cannot recharge, and the user can be presented with insufficient balance, but the method is not limited thereto.
In the embodiment of the invention, under the condition that the operation of recharging the first target recharging number is executed based on the first recharging information, the target amount of the target virtual recharging card is updated in time, the accuracy of the current remaining storage amount of the target virtual recharging card is ensured, and the situation that the recharging is wrong due to incorrect storage amount is avoided. Meanwhile, the target virtual rechargeable card can be used for multiple times, so that the use of a user is greatly facilitated, and more recharging demands of the user can be met.
It will be appreciated that the server may be configured to store a large number of databases of two-dimensional codes, each of which includes a unique code and the page address of the same top-up page. After the user purchases the target virtual rechargeable card, the server will select a two-dimensional code from the database as the target two-dimensional code, that is, the target two-dimensional code in step 201, and store the information reserved by the user, that is, the target credential information, corresponding to the unique code (target code) in the target two-dimensional code. Therefore, the user can use the target virtual rechargeable card to recharge through the target two-dimensional code without purchasing the entity rechargeable card, so that the manufacturing cost of the entity rechargeable card is saved.
Referring to fig. 3, the embodiment of the invention further provides a practical application flowchart of the recharging method based on the two-dimension code, and the flowchart comprises the following steps:
 step 301: and the user purchases the two-dimensional code virtual card, and selects to reserve a recharging password, verify the mobile phone number or identity information.
It should be noted that, the user purchases the two-dimensional code virtual card, which is equivalent to selecting a group of virtual card numbers from the system, the system binds the information stored by the user with the group of virtual card numbers, and then generates a group of two-dimensional codes based on the group of virtual card numbers and the recharging address provided by the system to send to the client. The two-dimensional code generated here may be generated by a dedicated two-dimensional code generator, but is not limited thereto. That is, the user purchases the two-dimensional code virtual card, the business hall gives the user a set of two-dimensional codes instead of the physical rechargeable card, the set of two-dimensional codes can be sent to the mailbox of the user or printed out for the user, even the user can collect the two-dimensional code pictures by himself, and the like, and the two-dimensional code virtual card is not limited herein. The stored recharge password, verification mobile phone number or identity information can be regarded as data indicating the identity of the user, and is equivalent to the target credential information in the embodiment shown in fig. 1, the two-dimensional code virtual card is equivalent to the target virtual recharge card in the embodiment shown in fig. 1, the virtual card number is equivalent to the target code in the embodiment shown in fig. 1, and the two-dimensional code provided to the user is equivalent to the target two-dimensional code in the embodiment shown in fig. 1, which is not repeated here.
Step 302: and the user scans the two-dimensional code to open the recharging page.
It should be noted that, after the user scans the two-dimensional code, the user jumps to the recharging page. During the jump process, the system automatically determines the identity of the operator (not shown in the figure, only the determination result and the recharging method corresponding to the determination result are shown). The system can automatically judge the identity of the operator, and can judge through the mobile phone number or the verification technology given by the third party platform during automatic login, but is not limited to the method.
Step 303: the system judges whether to verify the mobile phone number or the user himself or herself, and directly fills the mobile phone number of the user into the input box of the recharged mobile phone number.
It should be noted that the purpose of the system judgment is to verify whether the operator has the right to use the two-dimensional code virtual card, wherein the person having the right to use the two-dimensional code virtual card includes a card purchasing user who purchases the two-dimensional code virtual card and a second user who is authorized by the card purchasing user. Specifically, the system judges that the mobile phone number is verified, and the user can input the mobile phone number of the user, and the user mobile phone number is found to be consistent with the verification mobile phone number through comparison verification, so that the user mobile phone number is directly filled into a recharged mobile phone number input frame, but the mobile phone number is not limited to the recharged mobile phone number input frame; the system judges that the user operates by himself, and the user can scan facial features through an AI recognition technology to find identity information consistent with the selection and reserve, and the user operates by himself, so that the user mobile phone number is obtained from the local terminal equipment currently used by the user, and the user mobile phone number is directly filled into a rechargeable mobile phone number input box, but the system is not limited to the above.
Step 304: the user directly clicks the recharging or modifies the recharged phone number to click the recharging.
It should be noted that, if the user selects to recharge the mobile phone number of the user, the user only needs to click the recharge after step 303; if the user selects to recharge for other mobile phone numbers, the user mobile phone numbers that have been filled into the recharged mobile phone number input box are cleared after step 303, and other mobile phone numbers are filled into the recharged mobile phone number input box, and finally the recharging is clicked.
Step 305: if the system can not judge the identity of the operator, the user selects to input a password or a short message verification code or identity verification.
It should be noted that the system cannot determine the identity of the operator, and the system cannot determine whether the operator has the right to use the two-dimensional code virtual card. For example, since the card purchasing person is a relative or a friend purchasing person, the operator is not a card purchasing person, and the system cannot determine whether the operator has the right to use the two-dimensional code virtual card, but is not limited thereto. Therefore, if the operator wants to use the two-dimensional code virtual card for recharging, authentication is required, that is, the user transmits authentication request information to the system. Here, since the information that the user selects to stay when buying the two-dimensional code virtual card is different, the authentication method is also different. It will be appreciated that when the user needs to perform authentication, the system displays an authentication page to the user or displays an authentication area for the user in the recharge page for receiving authentication information entered by the user. Taking the verification page as an example, if the user selects the reserved information as a group of recharging passwords, the user inputs the passwords in a recharging password area in the verification page, and the passwords are sent to the system so as to verify; if the user selects the reserved information as a mobile phone number, the user inputs the mobile phone number in a mobile phone number area in the verification page, and after receiving the mobile phone number, the system sends a piece of short message verification information to the mobile phone number, wherein the short message verification information comprises a short message verification code, and the user inputs the short message verification code in a short message verification area in the verification page and sends the short message verification code to the system so as to verify; if the user selects the reserved information as the identity information, the user inputs an identity card number in an identity information area in the verification page, or the identity information area comprises a selection control for scanning the identity card, and the identity information is sent to the system, so that verification is performed.
Step 306: after the system verification is passed, the user inputs the number of the recharged mobile phone, and then the user clicks the recharging to recharge.
In the embodiment of the invention, firstly, a user purchases a two-dimensional code virtual card, and selects to reserve a recharging password, and verifies the mobile phone number or identity information; when a user scans the two-dimensional code to open the recharging page, the system judges the identity of an operator, and if the system judges that the mobile phone number is verified or the user operates himself, the mobile phone number of the user is directly filled into a recharged mobile phone number input box; if the system cannot judge the identity of the operator, the user selects to input a password or a short message verification code or identity verification; after the system verification is passed, the user inputs the number of the recharged mobile phone, and then the user clicks the recharging to recharge. Because recharging can be realized only when verification is passed, direct recharging under the condition that verification is not passed or no verification flow is avoided, and therefore the recharging safety of a user is improved.
Referring to fig. 4, the embodiment of the invention further provides a recharging device based on the two-dimensional code, which is applied to a terminal device, and the device comprises:
 the scanning module 41 is used for scanning a target two-dimensional code and displaying a recharging page, wherein the target two-dimensional code comprises a target code and a page address of the recharging page;
 An obtaining module 42, configured to obtain user information local to the terminal device;
 A first sending module 43, configured to send a first verification request carrying user information and a target code to a server, so that the server returns first verification result information based on the user information and the target credential information, where the server sets a target virtual rechargeable card for the target code, and the target credential information is information reserved by the server for purchasing the target virtual rechargeable card for a user stored by the target code;
 the first receiving module 44 is configured to receive a first input of the user on the recharging page when the first verification result information is received and the first verification result information indicates that verification is passed;
 The second sending module 45 is configured to send, in response to the first input, a first recharging request carrying first recharging information and a target code to the server, so that the server performs an operation of recharging the first target recharging number based on the first recharging information, where the first recharging information includes the first target recharging number.
In the embodiment of the invention, the recharging page can be displayed by scanning the target two-dimensional code comprising the page address of the recharging page in the recharging process, so as to start the recharging flow. Because the two-dimensional code is used instead of the entity rechargeable card in the recharging process, the manufacturing cost of the entity rechargeable card is saved; and then acquiring user information local to the terminal equipment, and sending a first verification request carrying the user information and a target code in the target two-dimensional code to the server so that the server returns first verification result information based on the user information and the target credential information, wherein the target credential information is information reserved by the server for purchasing a target virtual rechargeable card for a user stored by the target code, a verification process is added in a recharging process, and whether the first user who is currently recharged is a second user who purchases the target virtual rechargeable card or a third user authorized by the second user can be verified through the target credential information and the user information local to the terminal equipment. And under the condition that the first verification result information is received and the first verification result information represents that verification is passed, based on the first input of the user on the recharging page, sending a first recharging request carrying first recharging information and target codes to the server, so that the server executes the recharging operation of the first target recharging number based on the first recharging information. Because the recharging request is initiated to realize recharging under the condition that the verification is passed, the direct recharging under the condition that the verification is not passed or the verification process is not passed can be avoided, and therefore the recharging safety of a user is improved.
Optionally, the target credential information includes a telephone number,
The apparatus further comprises:
 the first display module is used for displaying the telephone number in a first control of the recharging page, wherein the first control is used for filling the telephone number to be recharged in the recharging page.
Optionally, the first input comprises a first sub-input and a second sub-input;
 The first receiving module 44 includes:
 The first receiving unit is used for receiving a first sub-input of a first control in the recharging page by a user, wherein the first control is used for filling a telephone number to be recharged in the recharging page;
 The second receiving unit is used for receiving a second sub-input of a second control in the recharging page by a user, wherein the second control is a control used for triggering a recharging request in the recharging page;
 The second transmitting module 45 includes:
 The first sending unit is used for responding to the first sub-input and displaying the telephone number to be recharged, which is input by the user through the first sub-input, in the first control;
 The second sending unit is used for responding to the second sub-input, determining the telephone number to be recharged displayed in the first control as a first target recharging number, and sending a first recharging request carrying the first target recharging number and a target code to the server.
Optionally, the apparatus further comprises:
 the second display module is used for displaying a verification page under the condition that the first verification result information is received and the first verification result information represents that verification is not passed;
 the third receiving module is used for receiving first information to be verified, which is input by a user on the verification page;
 the fourth sending module is used for sending a second verification request carrying the first information to be verified and the target code to the server so that the server returns second verification result information based on the first information to be verified and the target credential information;
 and the third display module is used for displaying the recharging page under the condition that the second verification result information is received and the second verification result information represents that verification is passed.
Optionally, the recharging page is displayed with a third control for filling the second information to be verified;
 The apparatus further comprises:
 the fourth receiving module is used for receiving a second input of the user to the third control when the first verification result information is received and the first verification result information represents that verification is not passed;
 The fourth display module is used for responding to the second input and displaying second information to be verified, which is input by a user through the second input, in the third control;
 the fifth receiving module is used for receiving a third input of the user on the recharging page;
 And the fifth sending module is used for responding to the third input, sending a second recharging request carrying second information to be verified, second recharging information and target codes to the server, so that the server generates third verification result information based on the second information to be verified and the target credential information, and executing the recharging operation of the second target recharging number based on the second recharging information under the condition that the third verification result information characterizes verification passing, wherein the second recharging information comprises the second target recharging number.
Optionally, the server stores first state information representing that the target virtual rechargeable card cannot be used or second state information representing that the target virtual rechargeable card is available for target encoding;
 The apparatus further comprises:
 The fifth display module is used for displaying the verification page under the condition of receiving the locking information; the locking information is information sent to the terminal equipment by the server under the condition that the first state information is stored aiming at the target code;
 the sixth receiving module is used for receiving third information to be verified, which is input by the user on the verification page;
 And the sixth sending module is used for sending a third verification request carrying third information to be verified and the target code to the server so that the server generates fourth verification result information based on the third information to be verified and the target credential information, and updates the first state information stored for the target code into the second state information under the condition that the fourth verification result information characterizes verification.
Optionally, the top-up page is displayed with a fourth control for triggering the display of the modification page,
The apparatus further comprises:
 The seventh receiving module is used for receiving a fourth input of a fourth control by a user;
 a sixth display module for displaying a modified page in response to the fourth input;
 the eighth receiving module is used for receiving modification information input by a user on the modification page;
 And the seventh sending module is used for sending the modification request carrying the modification information and the target code to the server so that the server updates the target credential information based on the modification information.
Optionally, the first recharging information further includes: and the target recharging amount is smaller than or equal to the current remaining storage amount of the target virtual recharging card.
Referring to fig. 5, the embodiment of the invention further provides a recharging device based on the two-dimensional code, which is applied to a server and comprises:
 the first generating module 51 is configured to generate a target two-dimensional code, where the target two-dimensional code includes a target code and a page address of a recharging page;
 The second receiving module 52 is configured to receive a first verification request sent by the terminal device after scanning the target two-dimensional code, where the first verification request carries user information and a target code local to the terminal device;
 The second generating module 53 is configured to generate first verification result information based on the target credential information and user information in the first verification request, where the server is configured with a target virtual rechargeable card for the target code, and the target credential information is information reserved for purchasing the target virtual rechargeable card for a user stored in the target code;
 a third sending module 54, configured to send the first verification result information to the terminal device;
 A first recharging module 55, configured to perform a recharging operation for the first target recharging number based on the first recharging information when receiving a first recharging request carrying the first recharging information and the target code sent by the terminal device,
The first recharging information comprises a first target recharging number, and the first recharging request is a recharging request sent to the server by responding to a first input of a user on a recharging page under the condition that the terminal equipment receives first verification result information and the first verification result information represents that verification passes.
Optionally, the apparatus further comprises:
 the third generation module is used for generating second verification result information based on the first information to be verified and the target credential information under the condition that a second verification request carrying the first information to be verified and the target code sent by the terminal equipment is received;
 and the eighth sending module is used for sending the second verification result information to the terminal equipment.
Optionally, the apparatus further comprises:
 the fourth generation module is used for generating third verification result information based on the second information to be verified and the target credential information under the condition that a second recharging request carrying the second information to be verified, the second recharging information and the target code, which is sent by the terminal equipment, is received, wherein the second recharging information comprises a second target recharging number;
 And the second recharging module is used for executing the recharging operation of the second target recharging number based on the second recharging information under the condition that the third verification result information represents that verification is passed.
Optionally, the server stores first state information representing that the target virtual rechargeable card cannot be used or second state information representing that the target virtual rechargeable card is available for target encoding;
 The apparatus further comprises:
 a ninth sending module, configured to send locking information to the terminal device when it is determined that the server stores the first state information for the target code;
 a fifth generation module, configured to generate fourth verification result information based on the third information to be verified and the target credential information when receiving a third verification request that is sent by the terminal device and carries the third information to be verified and the target code;
 And the first updating module is used for updating the first state information stored for the target code into the second state information under the condition that the fourth verification result information represents that verification is passed.
Optionally, the apparatus further comprises:
 an eighth receiving module, configured to receive a modification request sent by a terminal device, where the modification request carries modification information and a target code;
 and the second updating module is used for updating the target credential information based on the modification information.
Optionally, the first recharging information further includes: the server records the current remaining storage amount of the target virtual rechargeable card aiming at the target code;
 the first recharging module 55 includes:
 the determining unit is used for determining the current remaining storage amount of the target virtual rechargeable card based on the target code;
 And the recharging unit is used for recharging the first target recharging number by the target recharging amount and updating the recharged storage amount to the target amount under the condition that the target recharging amount is smaller than or equal to the current residual storage amount of the target virtual recharging card, wherein the target amount is equal to the difference value between the storage amount before recharging and the target recharging amount.
In the embodiment of the invention, a target two-dimensional code is firstly generated, wherein the target two-dimensional code comprises a target code and a page address of a recharging page; then receiving a first verification request sent by the terminal equipment after scanning the target two-dimensional code, wherein the first verification request carries local user information of the terminal equipment and the target code; generating first verification result information based on the target credential information and the user information in the first verification request, and then transmitting the first verification result information to the terminal equipment; then receiving a first recharging request sent to a server by the terminal equipment under the condition that the first verification result information is received and the first verification result information represents that verification is passed; and finally, under the condition that a first recharging request carrying first recharging information and a target code sent by the terminal equipment is received, carrying out the operation of recharging the first target recharging number based on the first recharging information. Because the recharging request is initiated to realize recharging under the condition that the verification is passed, the direct recharging under the condition that the verification is not passed or the verification process is not passed can be avoided, and therefore the recharging safety of a user is improved.
On the other hand, the embodiment of the invention also provides electronic equipment, which comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the recharging method based on the two-dimension codes provided by the embodiments of the invention is realized when the processor executes the program.
In still another aspect, an embodiment of the present invention further provides a readable storage medium, where when instructions in the readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the two-dimensional code-based recharging method provided in the above embodiments of the present invention.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.