Resource binding method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a resource binding method and apparatus.
Background
With the rapid development of internet technology, the implementation process of information interaction has evolved towards more and more convenience. In the related art, the resource or the resource identifier to be interacted with may be encoded into a graphic code, such as: two-dimensional codes, bar codes, etc., scanning the graphic code to obtain the corresponding resource. However, in such an implementation manner, the coupling degree between the resource to be interacted and the graphic code is high, which is not beneficial to the offline popularization of the graphic code, and greatly affects the use experience of the user.
Disclosure of Invention
In view of the above, the present application provides a resource binding method and apparatus.
Specifically, the method is realized through the following technical scheme:
a method of resource binding, the method comprising:
generating a plurality of non-repeated resource identifiers;
for each resource identifier, coding the resource identifier to generate a graphic code comprising the resource identifier, wherein the graphic code is distributed to a user holding a code scanning terminal;
receiving a resource identifier sent by a code scanning terminal, wherein the resource identifier is obtained by analyzing a scanned graph code by the code scanning terminal;
searching whether the resource identifier is bound with any resource;
and when any resource is not bound to the resource identifier, returning a resource binding guide instruction to the code scanning terminal, wherein the resource binding guide instruction enables the code scanning terminal to show a resource binding guide page to a user.
Optionally, the method further includes:
receiving a resource binding request sent by the code scanning terminal, wherein the resource binding request comprises the resource identifier and a resource input by a user based on a guide page of the resource binding;
and binding the resource identification with the resource.
Optionally, the method further includes:
and when the resource identifier is bound with the resource, returning the resource bound by the resource identifier to the code scanning terminal.
Optionally, the graphic code is a two-dimensional code.
Optionally, the resource is a payment account.
An apparatus for resource binding, the apparatus comprising:
the identification generation unit generates a plurality of non-repeated resource identifications;
the code generation unit is used for coding the resource identifier for each resource identifier to generate a graphic code comprising the resource identifier, and the graphic code is distributed to a user with a code-scanning terminal;
the identification receiving unit is used for receiving a resource identification sent by the code scanning terminal, and the resource identification is obtained by analyzing the code scanning terminal after the code scanning terminal scans the graphic codes;
the binding searching unit is used for searching whether the resource identifier is bound with any resource;
and the binding guide unit returns a resource binding guide instruction to the code scanning terminal when any resource is not bound by the resource identifier, and the resource binding guide instruction enables the code scanning terminal to show a resource binding guide page to a user.
Optionally, the apparatus further comprises:
the request receiving unit is used for receiving a resource binding request sent by the code scanning terminal, wherein the resource binding request comprises the resource identifier and a resource input by a user based on a guide page bound by the resource;
and the resource binding unit is used for binding the resource identifier with the resource.
Optionally, the apparatus further comprises:
and the resource returning unit is used for returning the resource bound by the resource identifier to the code scanning terminal when the resource identifier is bound with the resource.
Optionally, the graphic code is a two-dimensional code.
Optionally, the resource is a payment account.
As can be seen from the above description, the server side of the present application may generate a plurality of non-repetitive resource identifiers in advance, and encode the resource identifiers to generate the graphic codes for offline promotion, and the server side may also return a resource binding guidance page to the code scanning terminal when it is determined that any resource is not bound to the resource identifier obtained by scanning the graphic codes by the code scanning terminal, so as to guide the user to bind the relevant resource with the scanned graphic codes. According to the method and the device, the coupling degree of the resources and the graphic codes is reduced, so that popularization of the graphic codes in offline distribution is facilitated for popularization personnel, the subsequent binding process is easy to realize, and the use experience of users is improved.
Drawings
Fig. 1 is a flowchart illustrating a resource binding method according to an exemplary embodiment of the present application.
Fig. 2 is a flowchart illustrating another resource binding method according to an exemplary embodiment of the present application.
FIG. 3 is a schematic diagram of a user interface shown in an exemplary embodiment of the present application.
Fig. 4 is a schematic structural diagram for a resource binding apparatus according to an exemplary embodiment of the present application.
Fig. 5 is a block diagram illustrating a structure of a resource binding apparatus according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the related art, taking a payment scenario as an example, more and more merchants support a code-scanning payment mode, and a consumer may scan a graphic code displayed by a merchant, such as: and the two-dimension code is used for acquiring the electronic account number of the merchant and paying the merchant based on the electronic account number. Currently, a service provider (e.g., a paypal company) generates a unique account identifier for each electronic account, and codes the account identifier into a graphical code of a merchant for the merchant to display. However, in such an implementation, the service provider encodes the account id of the electronic account into the graphic code in advance, and when performing offline promotion of code scanning payment, a promoter needs to distribute the printed graphic code to a corresponding merchant. The graphic codes corresponding to different account id can not visually identify the merchant corresponding to each graphic code, so if each printed graphic code is to be sent to the corresponding merchant, the popularizing personnel needs to record the name of the merchant on the printed paper after calling out the graphic code of the merchant account and printing the graphic code, so as to send the image code to the corresponding merchant. The complexity of the whole implementation process is high, offline popularization of graphic coding is not facilitated, meanwhile, mistakes are easy to make, and the use experience of a user is greatly influenced.
In view of the foregoing problems, the present application provides a resource binding scheme, and fig. 1 is a flowchart illustrating a resource binding method according to an exemplary embodiment of the present application.
Referring to fig. 1, the resource binding method can be applied to a server, and includes the following steps:
step 101, generating a plurality of non-repetitive resource identifiers.
In this embodiment, the resource identifier is usually presented in a form of a character string, such as: the server can randomly generate a plurality of non-repeated character strings as the resource identifier. The Resource identifier may be an identifier of an electronic account, an identifier of a URL (Uniform Resource Locator), an identifier of an APP (Application), and the like, which is not limited in this Application.
102, coding the resource identifier for each resource identifier to generate a graphic code comprising the resource identifier, wherein the graphic code is distributed to a user holding a code-scanning terminal.
In this embodiment, the graphic encoding includes: bar codes, two-dimensional codes, etc. After the server generates the resource identifier, for each resource identifier, the server may encode the resource identifier to generate a graphic code including the resource identifier. The popularizing personnel can print each graphic code and distribute the graphic codes to the target users of the popularization.
And 103, receiving a resource identifier sent by the code scanning terminal, wherein the resource identifier is obtained by analyzing the code scanning terminal after the code scanning terminal scans the graphic code.
In this embodiment, after scanning the graphic code, the scanning terminal may analyze the resource identifier carried by the graphic code from the graphic code. Wherein, the code scanning terminal may be: terminal equipment with a code scanning function, such as a smart phone, a tablet personal computer and a code scanning gun.
And 104, searching whether the resource identifier is bound with any resource.
Based on the foregoing step 103, after receiving the resource identifier, the server may find whether any resource has been bound by the resource identifier, and if the resource has been bound, may return the resource bound by the server to the scanning terminal. If any resources are not bound, step 105 may be performed. Wherein the resource corresponds to a resource identifier, which may include: account information, URL, APP, etc. of the electronic account, which is not particularly limited in this application.
And 105, when any resource is not bound to the resource identifier, returning a resource binding guide instruction to the code scanning terminal, wherein the resource binding guide instruction enables the code scanning terminal to display a resource binding guide page for a user.
Based on the search result in the foregoing step 104, when the resource identifier is not bound to any resource, the server may return a resource binding guidance instruction to the code scanning terminal, and the code scanning terminal may further display a guidance page for resource binding to the user, and the user holding the code scanning terminal may input the resource to be bound based on the guidance page.
As can be seen from the above description, the server side of the present application may generate a plurality of non-repetitive resource identifiers in advance, and encode the resource identifiers to generate the graphic codes for offline promotion, and the server side may also return a resource binding guidance page to the code scanning terminal when it is determined that any resource is not bound to the resource identifier obtained by scanning the graphic codes by the code scanning terminal, so as to guide the user to bind the relevant resource with the scanned graphic codes. According to the method and the device, the coupling degree of the resources and the graphic codes is reduced, so that popularization of the graphic codes in offline distribution is facilitated for popularization personnel, the subsequent binding process is easy to realize, and the use experience of users is improved.
Fig. 2 is a flowchart illustrating another resource binding method according to an exemplary embodiment of the present application.
Referring to fig. 2, taking the resource as the electronic account information, the resource identifier as the electronic account identifier, and the graphic code as the two-dimensional code as an example, the resource binding method may be applied to a server, and includes the following steps:
step 201, several non-repetitive electronic account id are generated.
In this embodiment, the server may generate several unrepeated electronic account id in advance, such as: the server can randomly generate several non-repeated character strings in advance to serve as the electronic account identification.
Step 202, aiming at each electronic account identifier, encoding the electronic account identifier to generate a two-dimensional code comprising the electronic account identifier, wherein the two-dimensional code is distributed to a merchant holding a code scanning terminal.
In this embodiment, after the server generates the electronic account id, the server may generate a two-dimensional code including the electronic account id, for example: and coding the electronic account identification to generate the two-dimensional code. The popularization personnel can print the two-dimension code generated by the server and randomly distribute the two-dimension code to merchants which do not support code scanning payment when popularization is carried out on line.
Step 203, receiving an electronic account identifier sent by a code scanning terminal, wherein the electronic account identifier is obtained by analyzing the two-dimensional code scanned by the code scanning terminal.
In this embodiment, after receiving a two-dimensional code distributed by a promoter, a merchant that does not support code scanning payment may use a code scanning terminal to scan the two-dimensional code, and taking the code scanning terminal as a mobile phone as an example, after scanning the two-dimensional code, the mobile phone may parse the two-dimensional code to obtain an electronic account identifier therefrom, and send the electronic account identifier to a server.
In step 204, it is checked whether the electronic account id is bound to any electronic account, and if the electronic account id is not bound to any electronic account, step 205 may be executed. If the electronic account number identifies a bound electronic account number, step 208 may be performed.
In this embodiment, after receiving an electronic account identifier sent by a mobile phone after scanning a two-dimensional code, a server may find whether the electronic account identifier is bound to any electronic account, for example: and (4) paying the account number. Optionally, the server may search, in the stored binding relationship between the electronic account id and the electronic account, whether the electronic account id is bound to the electronic account, and if the electronic account id is not bound to any electronic account, step 205 may be executed. If the electronic account number identifies a bound electronic account number, step 208 may be performed.
Step 205, returning an electronic account binding guiding instruction to the code scanning terminal, where the electronic account binding guiding instruction enables the code scanning terminal to display an electronic account binding guiding page for a user.
Based on the search result in the step 204, when the electronic account id is not bound to any electronic account, it indicates that the two-dimensional code scanned by the mobile phone is not bound to any electronic account, and at this time, an electronic account binding guidance instruction may be returned to the code scanning terminal. And the code scanning terminal can output a guide page for binding the electronic account when receiving the electronic account binding guide instruction.
In this embodiment, referring to the schematic user interface diagram shown in fig. 3, after the server returns the electronic account binding guidance instruction, the mobile phone may output the user interface shown in fig. 3, and the merchant operator may fill in the login name and the login password of the electronic account of the merchant in the interface, and then click the determination button, and the mobile phone may further send the electronic account identifier, the electronic account login name and the login password filled by the operator to the server in the binding request.
Step 206, receiving an electronic account binding request sent by the code scanning terminal, where the electronic account binding request includes the electronic account identifier and electronic account information input by a user based on a guidance page bound by the electronic account.
And step 207, binding the electronic account identification with the electronic account.
In this embodiment, after receiving an electronic account binding request sent by a mobile phone, a server may extract carried electronic account information from the electronic account binding request, and bind the electronic account identifier with the electronic account, so as to realize binding of a two-dimensional code and the electronic account.
Still taking the case shown in fig. 3 as an example, the server may extract the login name and the login password of the electronic account from the electronic account binding request, and then may verify whether the login password is correct, and if the login password is correct, may bind the electronic account identifier and the electronic account, and if the login password is incorrect, may return an incorrect prompt message to the mobile phone, and the operator of the merchant may re-input the login name and the login password of the electronic account.
It should be noted that, in practical applications, the server may not verify the login password of the electronic account, and the application does not specially limit this.
And step 208, returning the electronic account bound with the electronic account identifier to the code scanning terminal.
Based on the search result in the foregoing step 204, when the electronic account id is already bound to the electronic account, the electronic account id bound to the electronic account id may be obtained, and the obtained electronic account id is returned to the code scanning terminal.
For example, after a consumer consumes the electronic account, the consumer may scan a two-dimensional code displayed by a merchant using a mobile phone of the consumer, after the mobile phone obtains an electronic account identifier included in the two-dimensional code by parsing, the electronic account identifier may be sent to the server, the server determines that the electronic account identifier is bound to the electronic account of the merchant by searching, and then returns the electronic account of the merchant to the consumer's mobile phone, and after receiving the electronic account, the consumer's mobile phone may jump to a payment page facing the electronic account, that is, jump to a payment page facing the merchant, so as to allow the consumer to pay.
As can be seen from the above description, the server side of the present application may generate a plurality of unrepeated electronic account id in advance, and encode the electronic account id to generate the two-dimensional code for offline promotion, and the server side may return an electronic account binding guidance page to the code scanning terminal when it is determined that the electronic account id obtained by scanning the two-dimensional code by the code scanning terminal is not bound to any electronic account, so as to guide the merchant to bind the relevant electronic account with the scanned two-dimensional code, so as to allow the subsequent consumer to pay for use. According to the method and the device, the coupling degree of the electronic account and the two-dimensional code is reduced, so that convenience is brought to popularization personnel to carry out offline popularization work of two-dimensional code payment, the process of binding subsequent merchants is easy to realize, and the use experience of the merchants is improved.
In another example of the present application, the resource is APP, and the resource identifier is APP identifier. The service end of the application store can generate a plurality of non-repeated APP identifications in advance, and the APP identifications can be coded for each APP identification so as to generate a two-dimensional code comprising the APP identifications. The popularization personnel who scans the code and download the APP function can distribute the generated two-dimensional code to the service provider of each APP, and APP service provider can use the cell-phone to scan after getting the two-dimensional code, and the cell-phone sends the APP sign that contains in this two-dimensional code for the server of application store, and the server is in the inquiry and confirms when arbitrary APP is not bound to the APP sign, can return the guide instruction that the APP bound to the cell-phone, and the cell-phone then can jump to the guide page that the APP bound, and APP service provider can pass through the guide page will the two-dimensional code is bound rather than the APP. For example, the APP service provider may fill in an address link of its APP in the guide page, and the service end of the APP store may bind the APP identity to the address link after receiving the binding request. In addition, the APP service provider may also fill in the APP name in the guide page, and after receiving the binding request, the service end of the APP store may search for the address link of the APP according to the APP name, and then bind the APP identifier with the searched address link, which is not particularly limited in the present application.
Subsequently, the APP service provider can promote and display the two-dimensional code bound with the APP. After the user uses the mobile phone to scan the two-dimensional code, the user mobile phone sends the APP identification included in the two-dimensional code to the server, the server can return the APP download address to the user mobile phone after finding the APP download address bound by the APP identification, the user mobile phone can then jump to the download page of the APP, and when the user selects downloading, the user mobile phone can download the APP based on the APP download address. Certainly, in another example, after finding the APP download address bound to the APP identifier, the server may also obtain the installation package of the APP based on the APP download address, and return the installation package to the mobile phone of the user. For the user, the user can automatically download the corresponding APP after scanning the two-dimensional code by using a mobile phone, and the operation is very convenient.
It can be seen from the above description that the resource binding scheme provided by the application can also be applied to the offline popularization of code scanning downloading APP, the operation is simple, for small and medium-sized APP service providers, the two-dimensional code provided by the application store can be adopted to realize product popularization, and the product popularization cost is greatly reduced.
Corresponding to the embodiment of the resource binding method, the application also provides an embodiment of a resource binding device.
The embodiment of the resource binding device can be applied to a server. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a device in a logical sense, a processor of a service end reads corresponding computer program instructions in a nonvolatile memory into a memory for operation. From a hardware aspect, as shown in fig. 4, the hardware structure diagram of the service end where the resource binding apparatus of the present application is located is shown, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 4, the service end where the apparatus is located in the embodiment may also include other hardware according to the actual function of the service end, which is not described again.
Fig. 5 is a block diagram illustrating a structure of a resource binding apparatus according to an exemplary embodiment of the present application.
Referring to fig. 5, the resource binding apparatus 400 can be applied to the server shown in fig. 4, and includes: an identification receiving unit 401, a binding lookup unit 402, a binding guidance unit 403, a request receiving unit 404, a resource binding unit 405, an identification generating unit 406, a code generating unit 407, and a resource returning unit 408.
The identifier generating unit 406 generates a plurality of non-repetitive resource identifiers;
the code generating unit 407 encodes the resource identifier for each resource identifier to generate a graphic code including the resource identifier, and the graphic code is distributed to a user holding a code-scanning terminal.
The identifier receiving unit 401 receives a resource identifier sent by a code scanning terminal, where the resource identifier is obtained by analyzing the code scanning terminal after scanning a graphic code;
the binding searching unit 402, configured to search whether the resource identifier is bound to any resource;
the binding guidance unit 403, when the resource identifier is not bound to any resource, returns a resource binding guidance instruction to the code scanning terminal, where the resource binding guidance instruction enables the code scanning terminal to display a resource binding guidance page for a user.
The request receiving unit 404 is configured to receive a resource binding request sent by the code scanning terminal, where the resource binding request includes the resource identifier and a resource input by a user based on a guidance page of the resource binding;
the resource binding unit 405 binds the resource identifier with the resource.
The resource returning unit 408, when the resource identifier has been bound with a resource, returns the resource bound with the resource identifier to the code scanning terminal.
Optionally, the graphic code is a two-dimensional code.
Optionally, the resource is a payment account.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.