Equipment binding method and system, terminal equipment and storage medium
By automatically binding QR code payment devices and printing devices through the generation and verification of authorization codes, the problem of complex operation and easy error in existing technologies is solved, and efficient device binding and high success rate are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2026-03-10
AI Technical Summary
When existing QR code payment devices are bound to client user accounts or cloud printers, the operation is complicated and prone to errors, resulting in a poor user experience.
By generating an authorization code and verifying the decoded information, the system automatically binds the QR code transaction device and the printing device. This process includes generating a first authorization code that is displayed on the client side, the QR code transaction device scanning and sending the decoded information to the server, the server verifying the information and binding it to the user account, and generating a second authorization code that is printed and displayed by the printing device. The QR code transaction device scanning and sending the decoded information to the server for verification and then binding it to the printing device.
It improves the efficiency and success rate of device binding, simplifies the operation process, and enhances the user experience.
Smart Images

Figure CN121639205A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of computers, and particularly relates to a device binding method and system, a terminal device and a storage medium. BACKGROUND
[0002] The code scanning transaction device is widely used in many fields such as retail, catering, e-commerce, public transportation, public services and financial services. At present, when the code scanning transaction device is bound to a user account or a cloud printer of a client, it is mostly achieved by manual binding, which is complicated and prone to errors, resulting in poor user experience. SUMMARY
[0003] Therefore, the present application provides a device binding method and system, a terminal device and a storage medium to improve the binding efficiency and success rate between devices.
[0004] The first aspect of the present application provides a device binding method applied to a server, which comprises:
[0005] In response to a device binding request sent by a client, a first authorization code is generated and sent to the client;
[0006] First decoding information is received, wherein the first decoding information is obtained by a code scanning transaction device scanning a barcode form of the first authorization code and sent to the server, and the barcode form of the first authorization code is displayed by the client;
[0007] The first decoding information is verified, and after verification, the code scanning transaction device is bound to a user account;
[0008] According to the serial number of a printing device sent by the code scanning transaction device, a printing instruction of a second authorization code is generated and sent to the printing device;
[0009] Second decoding information is received, wherein the second decoding information is obtained by the code scanning transaction device scanning a barcode form of the second authorization code and sent to the server, and the barcode form of the second authorization code is printed and displayed by the printing device according to the printing instruction;
[0010] The second decoding information is verified, and after verification, the printing device is bound to the user account, and the printing device and the code scanning transaction device are bound.
[0011] The second aspect of the present application provides a device binding method applied to a code scanning transaction device, which comprises:
[0012] obtain first decoding information in a bar code form of a first authorization code;
[0013] send the first decoding information to a server, so that the server binds the code scanning transaction device to a user account after passing verification of the first decoding information;
[0014] wherein the bar code form of the first authorization code is displayed by a client, and the first authorization code is generated by the server in response to a device binding request sent by the client;
[0015] obtain second decoding information in a bar code form of a second authorization code;
[0016] send the second decoding information to a server, so that the server binds a printing device to the user account and binds the printing device to the code scanning transaction device after passing verification of the second decoding information;
[0017] wherein the bar code form of the second authorization code is printed and displayed by the printing device according to a printing instruction, and the printing instruction is generated by the server according to a serial number of the printing device sent by the code scanning transaction device.
[0018] A third aspect of the embodiment of the application provides a device binding system, which comprises a client, a code scanning transaction device, a server and a printing device;
[0019] The client is configured to log in to a user account and send a device binding request to the server through the user account.
[0020] The server is configured to generate a first authorization code and send the first authorization code to the client in response to the device binding request sent by the client, so that the client displays a bar code form of the first authorization code.
[0021] The code scanning transaction device is configured to scan the bar code form of the first authorization code displayed by the client, generate first decoding information, and send the first decoding information to the server, so that the server verifies the first decoding information and binds the code scanning transaction device to the user account after passing verification.
[0022] The device binding system further comprises a printing device.
[0023] The code scanning transaction device is further configured to obtain a serial number of the printing device and send the serial number to the server.
[0024] The server is further configured to generate a printing instruction of a second authorization code according to the serial number of the printing device sent by the code scanning transaction device, and send the printing instruction to the printing device.
[0025] The printing device is configured to print a bar code form of the second authorization code according to the printing instruction, so that the code scanning transaction device obtains second decoding information by scanning the bar code form of the second authorization code, and sends the second decoding information to the server.
[0026] The server is further configured to check the second decoding information sent by the code scanning transaction device, and bind the printing device to a user account and bind the printing device and the code scanning transaction device after the checking is passed.
[0027] A fourth aspect of the embodiments of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, when the terminal device is a server, the processor implements the steps of the device binding method according to the first aspect of the embodiments of the present application when executing the computer program.
[0028] When the terminal device is a code scanning transaction device, the processor implements the steps of the device binding method according to the second aspect of the embodiments of the present application when executing the computer program.
[0029] A fifth aspect of the embodiments of the present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the device binding method according to the first aspect or the second aspect of the embodiments of the present application.
[0030] The device binding method provided by the first aspect of the embodiments of the present application is applied to a server, and the server generates a first authorization code and sends the first authorization code to a client in response to a device binding request sent by the client; receives first decoding information; the first decoding information is obtained by a code scanning transaction device scanning a bar code form of the first authorization code and sent to the server, and the bar code form of the first authorization code is displayed by the client; the first decoding information is verified, and after the verification is passed, the code scanning transaction device is bound to a user account; a second authorization code printing instruction is generated according to a serial number of a printing device sent by the code scanning transaction device, and the printing instruction is sent to the printing device; second decoding information is received; the second decoding information is obtained by the code scanning transaction device scanning a bar code form of the second authorization code and sent to the server, and the bar code form of the second authorization code is printed and displayed by the printing device according to the printing instruction; finally, the second decoding information is verified, and after the verification is passed, the printing device is bound to the user account, and the printing device and the code scanning transaction device are bound, so that the efficiency and success rate of device binding can be effectively improved.
[0031] The device binding method provided by the second aspect of the embodiments of the present application is applied to a code scanning transaction device, and the code scanning transaction device obtains first decoding information of a bar code form of a first authorization code; the first decoding information is sent to a server, so that the server binds the code scanning transaction device to a user account after the verification of the first decoding information is passed; the bar code form of the first authorization code is displayed by a client, and the first authorization code is generated by the server in response to a device binding request sent by the client; second decoding information of a bar code form of a second authorization code is obtained; the second decoding information is sent to the server, so that the server binds a printing device to the user account and binds the printing device and the code scanning transaction device after the verification of the second decoding information is passed; the bar code form of the second authorization code is printed and displayed by the printing device according to a printing instruction, and the printing instruction is generated by the server according to a serial number of the printing device sent by the code scanning transaction device, so that the efficiency and success rate of device binding can be effectively improved.
[0032] It can be understood that the beneficial effects of the third aspect to the fifth aspect described above can be referred to the related description in the first aspect or the second aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creating laborious work.
[0034] Figure 1This is a schematic flowchart of the first device binding method provided in the embodiments of this application;
[0035] Figure 2 This is a second flowchart illustrating the first device binding method provided in the embodiments of this application;
[0036] Figure 3 This is a schematic diagram of the first step of the second device binding method provided in the embodiments of this application;
[0037] Figure 4 This is a schematic diagram of the second process of the second device binding method provided in the embodiments of this application;
[0038] Figure 5 This is a schematic diagram of a device binding system provided in an embodiment of this application;
[0039] Figure 6 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. Detailed Implementation
[0040] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0041] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0042] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0043] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. "A plurality of" means "two" or "more than two."
[0044] QR code payment devices are widely used in many fields such as retail, catering, e-commerce, public transportation, public services and financial services. Currently, when QR code payment devices are bound to user accounts or cloud printers on the client side, most of them need to be bound manually, which is complicated and prone to errors, resulting in a poor user experience.
[0045] This application provides a device binding method applied to a server. In response to a device binding request sent by a client, the method generates a first authorization code and sends it to the client; receives first decoding information, wherein the first decoding information is obtained by a barcode scanning device scanning the barcode of the first authorization code and sent to the server, and the barcode of the first authorization code is displayed by the client; verifies the first decoding information, and after successful verification, binds the barcode scanning device to the user account; generates a printing instruction for a second authorization code based on the serial number of the printing device sent by the barcode scanning device, and sends the printing instruction to the printing device; receives second decoding information, wherein the second decoding information is obtained by the barcode scanning device scanning the barcode of the second authorization code and sent to the server, and the barcode of the second authorization code is printed and displayed by the printing device according to the printing instruction; finally, verifies the second decoding information, and after successful verification, binds the printing device to the user account and binds the printing device to the barcode scanning device. This effectively improves the efficiency and success rate of device binding.
[0046] Example 1
[0047] like Figure 1 As shown, the device binding method provided in this application embodiment is applied to a server and includes the following steps S1 to S6:
[0048] Step S1: In response to the device binding request sent by the client, generate a first authorization code and send the first authorization code to the client, then proceed to step S2.
[0049] In the application, after logging into the corresponding user account through the client's operation interface, the user performs the corresponding request generation operation to generate the corresponding device binding request, and sends the device binding request to the server so that the server can perform the corresponding operation.
[0050] In the application, the client can be a mobile phone, tablet, wearable device, augmented reality (AR) / virtual reality (VR) device, laptop, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA) and other devices.
[0051] In the application, after receiving a device binding request from the client, the server generates a first authorization code based on the request and sends the first authorization code to the client, allowing the client to perform corresponding operations using the first authorization code within a first validity period. The first validity period can be set according to actual needs and is not limited here.
[0052] In the application, the device binding request includes, but is not limited to, the client's MAC address, IP address, current location information, timestamp, and serial number of the QR code transaction device.
[0053] Step S2: Receive the first decoded information and proceed to step S3.
[0054] In one embodiment, the first decoding information is obtained by the scanning transaction device by scanning the barcode of the first authorization code and sent to the server, and the barcode of the first authorization code is displayed by the client.
[0055] In the application, after receiving the first authorization code sent by the server, the client can generate and display a corresponding barcode based on the first authorization code. This barcode can be in the form of a one-dimensional barcode or a two-dimensional barcode; there is no limitation on this. It should be noted that the barcode format of the first authorization code can be generated by the client or by the server; there is no limitation on this either.
[0056] In the application, the QR code transaction device can obtain the corresponding first decoding information by scanning the barcode of the first authorization code displayed by the client. Then, the first decoding information is sent to the server so that the server can perform subsequent verification.
[0057] Step S3: Verify the first decoded information, and after the verification is successful, bind the QR code transaction device to the user account, and proceed to step S4.
[0058] In the application, after receiving the first decoding information sent by the QR code transaction device, the server compares the first decoding information with the first authorization code generated in step S1 and determines whether the first authorization code is within the first validity period to determine whether the first decoding information passes the verification. This determines whether to bind the QR code transaction device to the user account. That is, if the first decoding information is inconsistent with the first authorization code and / or the first authorization code is not within the first validity period, it is determined that the first decoding information has failed the verification, and the binding of the QR code transaction device to the user account is refused. If the first decoding information is consistent with the first authorization code and the first authorization code is within the first validity period, it is determined that the first decoding information has passed the verification, and the QR code transaction device is bound to the user account.
[0059] In practice, the first validity period can be set according to actual needs, and is not limited here.
[0060] In the application, after a QR code transaction device is bound to a user's account, the server can also return a binding success message to the client or the QR code transaction device so that the user can know the current status of the device in a timely manner. Conversely, if the server refuses to bind the QR code transaction device to the user's account, the server can also return a binding failure message (including the reason for the binding failure) to the client or the QR code transaction device so that the user can bind it again.
[0061] Step S4: Generate a printing instruction for the second authorization code based on the serial number of the printing device sent by the QR code transaction device, and send the printing instruction to the printing device, then proceed to step S5.
[0062] In the application, the printing device is a cloud printer. After the printing device is bound to the QR code transaction device, the corresponding transaction slip can be printed when the transaction is successful.
[0063] In applications, the serial number is a unique credential used to identify the printing device. It can be obtained by scanning the label on the outside or inside of the printing device, by consulting the packaging box or the corresponding user manual, or by the control panel or software management system of the printing device. This is just an example and is not a limitation.
[0064] In the application, after the scanning transaction device sends the serial number of the printing device to the server, the server generates a second authorization code based on the serial number, and then generates a corresponding printing instruction based on the second authorization code. The printing instruction includes the second authorization code. Finally, the printing instruction is sent to the printing device so that the printing device can print and display the corresponding second authorization code in barcode form according to the printing instruction.
[0065] In application, the second authorization code can be generated based on the serial number of the printing device or it can be generated randomly; there is no limitation here.
[0066] It should be noted that the QR code payment device can send the serial number of only one printing device to the server, or it can send the serial numbers of multiple printing devices to the server; there is no limitation here.
[0067] In one embodiment, prior to step S4, the following is included:
[0068] In response to the client's first permission acquisition request, a first permission code is generated and sent to the client; wherein, the first permission includes printing device binding permission;
[0069] Receive third decoding information; wherein the third decoding information is obtained by the scanning transaction device by scanning the barcode form of the first authorization code and sent to the server, and the barcode form of the first authorization code is displayed by the client;
[0070] The third decoded information is verified. If the verification is successful, step S4 and subsequent steps are executed.
[0071] In the application, before binding the printing device, the QR code transaction device can first obtain binding permission. Specifically, this includes performing the corresponding permission request generation operation through the client to generate the corresponding first permission acquisition request and sending the first permission acquisition request to the server.
[0072] In the application, after receiving the first permission acquisition request sent by the client, the server generates a first permission code based on the request and sends the first permission code to the client so that the client can perform corresponding operations on the first permission code within the validity period of the first permission; the validity period of the first permission can be set according to actual needs and is not limited here.
[0073] In the application, after the client receives the first permission code sent by the server, it can generate a corresponding barcode based on the first permission code and display it. The barcode of the first permission code can be in the form of a one-dimensional barcode or a two-dimensional barcode, which is not limited here.
[0074] In the application, the QR code transaction device can obtain the corresponding third decoding information by scanning the barcode of the first authorization code displayed by the client. Then, the third decoding information is sent to the server for subsequent verification.
[0075] In the application, after receiving the third decoding information sent by the QR code transaction device, the server compares the third decoding information with the first authorization code to determine whether the third decoding information passes the verification and whether the first authorization code is within the validity period of the first authorization. This determines whether to continue executing step S4 and subsequent steps. That is, if the third decoding information does not match the first authorization code and / or the first authorization code is not within the validity period of the first authorization, the third decoding information is determined to have failed the verification, and the execution of step S4 and subsequent steps is stopped. If the third decoding information matches the first authorization code and the first authorization code is within the validity period of the first authorization, the third decoding information is determined to have passed the verification, and the execution of step S4 and subsequent steps continues.
[0076] Step S5: Receive the second decoding information and proceed to step S6.
[0077] In one embodiment, the second decoding information is obtained by the scanning transaction device by scanning the barcode of the second authorization code and sent to the server, and the barcode of the second authorization code is printed and displayed by the printing device according to the printing instruction.
[0078] In the application, after receiving the print instruction sent by the server, the printing device prints and displays the corresponding second authorization code in barcode form according to the print instruction. The barcode form of the second authorization code can be either a one-dimensional barcode or a two-dimensional barcode, which is not limited here.
[0079] In the application, the barcode scanning transaction device can obtain the corresponding second decoding information by scanning the barcode form of the second authorization code printed by the printing device. Then, the second decoding information is sent to the server so that the server can perform subsequent verification.
[0080] Step S6: Verify the second decoding information, and after the verification is successful, bind the printing device to the user account and bind the printing device to the QR code transaction device.
[0081] In the application, after receiving the second decoding information sent by the QR code transaction device, the server compares the second decoding information with the second authorization code generated in step S4, and determines whether the second authorization code is within the second validity period. This determines whether the second decoding information passes verification, and consequently, whether to bind the printing device to the user account and to the QR code transaction device. Specifically, if the second decoding information does not match the second authorization code and / or the second authorization code is not within the second validity period, the second decoding information fails verification. In this case, binding the printing device to the user account and to the QR code transaction device is refused. If the second decoding information matches the second authorization code and the second authorization code is within the second validity period, the second decoding information passes verification. In this case, the printing device is bound to the user account and to the QR code transaction device.
[0082] In practice, the second validity period can be set according to actual needs, and there are no restrictions here.
[0083] In the application, after the printing device is bound to the user's account, the server can also return the corresponding binding success information to the client, the QR code transaction device, or the printing device so that the user can know the current status of the device in a timely manner. Conversely, if the server refuses to bind the printing device to the user's account or refuses to bind the printing device to the QR code transaction device, the server can also return binding failure information (including the reason for the binding failure) to the client, the QR code transaction device, or the printing device so that the user can bind the printing device again.
[0084] like Figure 2 As shown, the device binding method provided in this application embodiment may further include the following steps S7 to S8:
[0085] Step S7: Receive the target serial number of the target QR code transaction device sent by the QR code transaction device, and proceed to step S8.
[0086] In one embodiment, the target QR code transaction device is a device that is not bound to the user account.
[0087] In the application, if multiple target QR code transaction devices need to be bound to the user account, the already bound QR code transaction devices can be used. The operation is simple, efficient, and less prone to errors.
[0088] In the application, the target QR code transaction device can be one or more QR code transaction devices that are not bound to the user account, and there is no limitation here.
[0089] In the application, the QR code transaction device can obtain the target serial number of only one target QR code transaction device and send it to the server, or it can obtain the target serial numbers of multiple target QR code transaction devices at the same time and send them to the server. There is no limitation here.
[0090] In one embodiment, prior to step S7, the following is included:
[0091] In response to the client's request for second permission, a second permission code is generated and sent to the client; wherein, the second permission includes the permission to bind a QR code transaction device;
[0092] Receive fourth decoding information; wherein the fourth decoding information is obtained by the scanning transaction device by scanning the barcode form of the second authorization code and sent to the server, and the barcode form of the second authorization code is displayed by the client;
[0093] The fourth decoded information is verified. If the verification is successful, the step "receive the target serial number of the target QR code transaction device sent by the QR code transaction device" and subsequent steps are executed.
[0094] In the application, before attempting to bind one or more target QR code transaction devices, the QR code transaction device can first obtain the corresponding device binding permissions. Specifically, this includes performing a corresponding permission request generation operation through the client to generate a corresponding second permission acquisition request and sending the second permission acquisition request to the server.
[0095] In the application, after receiving a second permission request from the client, the server generates a second permission code based on the request and sends the second permission code to the client, so that the client can perform corresponding operations on the second permission code within the validity period of the second permission; the validity period of the second permission can be set according to actual needs and is not limited here.
[0096] In the application, after the client receives the second permission code sent by the server, it can generate a corresponding barcode for the second permission code and display it. The barcode for the second permission code can be in the form of a one-dimensional barcode or a two-dimensional barcode, which is not limited here.
[0097] In the application, the QR code transaction device can obtain the corresponding fourth decoding information by scanning the barcode of the second authorization code displayed by the client. Then, the fourth decoding information is sent to the server for subsequent verification.
[0098] In the application, after receiving the fourth decoding information sent by the QR code transaction device, the server compares the fourth decoding information with the second authorization code to determine whether the fourth decoding information passes the verification, and whether the second authorization code is within the validity period of the second authorization. This determines whether to continue executing step S7 and subsequent steps. That is, if the fourth decoding information does not match the second authorization code and / or the second authorization code is not within the validity period of the second authorization, it is determined that the fourth decoding information has failed the verification, and at this time, the execution of step S7 and subsequent steps is stopped; if the fourth decoding information matches the second authorization code and the second authorization code is within the validity period of the second authorization, it is determined that the fourth decoding information has passed the verification, and at this time, the execution of step S7 and subsequent steps continues.
[0099] Step S8: Configure the attributes of the QR code transaction device to the target QR code transaction device according to the target serial number.
[0100] In the application, after receiving the target serial number of one or more target QR code transaction devices from the QR code transaction device, the server can configure all the attributes currently possessed by the QR code transaction device to these target QR code transaction devices. For example, when the QR code transaction device is used for electronic coupon redemption, it can also be bound to a corresponding store and set to announce the redemption status (e.g., after successful coupon redemption, the QR code transaction device announces the platform name and electronic coupon name). The server can configure the currently bound store and the set redemption status announcement attributes of the QR code transaction device to these target QR code transaction devices, so that these target QR code transaction devices are simultaneously bound to the corresponding store and have attributes such as redemption status announcement. When binding a store to the QR code transaction device, the corresponding store information can be entered according to the platform's requirements. After completing the store authorization, the store is added to the user account, and the store is set to be bound to the QR code transaction device.
[0101] In one embodiment, step S8 includes:
[0102] Based on the target serial number, the target QR code transaction device is bound to the user account, and the target QR code transaction device is bound to the printing device.
[0103] In the application, after receiving the target serial number of one or more target QR code transaction devices sent by the QR code transaction device, the server can bind these one or more target QR code transaction devices to the user account, and also bind these one or more target QR code transaction devices to the printing device.
[0104] In the application, after binding one or more target QR code transaction devices to a user's account, the server can also return corresponding binding success information to the client or the target QR code transaction device or printing device so that the user can understand the current status of the device in a timely manner. Conversely, if one or more target QR code transaction devices fail to bind, the server can also return binding failure information (including the reason for the binding failure) to the client or the target QR code transaction device or printing device so that the user can bind the printing device again.
[0105] Optionally, one or more target QR code payment devices can scan the serial number of the QR code payment device and send it to the server to complete the binding. Correspondingly, before scanning the serial number of the QR code payment device, one or more target QR code payment devices can also obtain secondary permissions by scanning the secondary permission code displayed by the client.
[0106] The device binding method provided in this application embodiment can quickly achieve binding between (multiple) QR code transaction devices and (multiple) printing devices, with a high binding success rate and a good user experience.
[0107] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0108] Example 2
[0109] like Figure 3 As shown, the device binding method provided in this application embodiment is applied to a QR code transaction device and includes the following steps S9 to S12:
[0110] Step S9: Obtain the first decoding information in barcode form of the first authorization code, and proceed to step S10.
[0111] In one embodiment, the first authorization code is displayed in barcode form by the client, and the first authorization code is generated by the server in response to a device binding request sent by the client.
[0112] In the application, after logging into their user account through the client interface, users perform a request generation operation to generate a device binding request. This request is then sent to the server. The server generates a first authorization code based on the request and sends it to the client. Within a first validity period, the client generates and displays a barcode of the first authorization code. The scanning transaction device then obtains the corresponding first decoding information by scanning the barcode displayed on the client. The barcode of the first authorization code can be either a one-dimensional barcode or a two-dimensional barcode; this is not limited to either.
[0113] Step S10: Send the first decoding information to the server so that after the server verifies the first decoding information, it binds the QR code transaction device to the user account, and proceeds to step S11.
[0114] In the application, after obtaining the first decoded information, the QR code transaction device sends the first decoded information to the server. Upon receiving the first decoded information from the QR code transaction device, the server compares the first decoded information with the first authorization code and determines whether the first authorization code is within the first validity period to determine whether the first decoded information has passed verification. This determines whether to bind the QR code transaction device to the user account. Specifically, if the first decoded information does not match the first authorization code and / or the first authorization code is not within the first validity period, the first decoded information is determined to have failed verification, and the binding of the QR code transaction device to the user account is refused. If the first decoded information matches the first authorization code and the first authorization code is within the first validity period, the first decoded information is determined to have passed verification, and the QR code transaction device is bound to the user account.
[0115] In practice, the first validity period can be set according to actual needs, and is not limited here.
[0116] In the application, after the server binds the QR code transaction device to the user's account, it can also return a binding success message to the client or the QR code transaction device so that the user can know the current status of the device in a timely manner. Conversely, if the server refuses to bind the QR code transaction device to the user's account, it can also return a binding failure message (including the reason for the binding failure) to the client or the QR code transaction device so that the user can bind it again.
[0117] Step S11: Obtain the second decoding information in barcode form of the second authorization code, and proceed to step S12.
[0118] In one embodiment, the barcode form of the second authorization code is printed and displayed by the printing device according to a printing instruction, which is generated by the server based on the serial number of the printing device sent by the barcode transaction device.
[0119] In the application, after the scanning transaction device sends the obtained serial number of the printing device to the server, the server generates a second authorization code based on the serial number, and then generates a corresponding printing instruction based on the second authorization code. The printing instruction includes the second authorization code, and finally sends the printing instruction to the printing device. After receiving the printing instruction sent by the server, the printing device prints and displays the corresponding second authorization code in barcode form according to the printing instruction. The barcode form of the second authorization code can be either a one-dimensional barcode or a two-dimensional barcode, which is not limited here.
[0120] In application, the second authorization code can be generated based on the serial number of the printing device or it can be generated randomly; there is no limitation here.
[0121] In the application, the QR code transaction device can obtain the corresponding second decoding information by scanning the barcode of the second authorization code displayed by the printing device. Then, the second decoding information is sent to the server for subsequent verification.
[0122] Step S12: Send the second decoding information to the server so that after the server verifies the second decoding information, it binds the printing device to the user account and binds the printing device to the QR code transaction device.
[0123] In the application, after the QR code payment device obtains the second decoded information, it sends the second decoded information to the server. Upon receiving the second decoded information, the server compares it with the second authorization code and determines whether the second authorization code is within the second validity period. This verifies whether the second decoded information passes verification, and thus determines whether to bind the printing device to the user account and to the QR code payment device. Specifically, if the second decoded information does not match the second authorization code and / or the second authorization code is not within the second validity period, the second decoded information fails verification. In this case, binding the printing device to the user account and to the QR code payment device is refused. If the second decoded information matches the second authorization code and the second authorization code is within the second validity period, the second decoded information passes verification. In this case, the printing device is bound to the user account and to the QR code payment device.
[0124] In practice, the second validity period can be set according to actual needs, and there are no restrictions here.
[0125] like Figure 4 As shown, the device binding method provided in this application embodiment may further include the following steps S13 to S14:
[0126] Step S13: Obtain the target serial number of the target QR code transaction device, and proceed to step S14.
[0127] In one embodiment, the target QR code transaction device is a device that is not bound to the user account.
[0128] In the application, the target QR code transaction device can be one or more QR code transaction devices that are not bound to the user account, and there is no limitation here.
[0129] In application, a QR code transaction device can obtain the target serial number of only one target QR code transaction device, or it can obtain the target serial numbers of multiple target QR code transaction devices at the same time; there is no limitation here.
[0130] In the application, before step S13, the QR code transaction device can also obtain a second permission. The process for obtaining the permission is detailed in Example 1 and will not be repeated here.
[0131] Step S14: Send the target serial number of the target QR code transaction device to the server, so that the server configures the attributes of the QR code transaction device to the target QR code transaction device according to the target serial number.
[0132] In the application, after the QR code transaction device sends the target serial number of one or more target QR code transaction devices to the server, the server can bind these one or more target QR code transaction devices to the user account, and also bind these one or more target QR code transaction devices to the printing device.
[0133] It should be noted that for the parts not described in detail in this embodiment, please refer to the relevant description in Embodiment 1, which will not be repeated here.
[0134] The device binding method provided in this application embodiment can quickly achieve binding between (one or more) QR code transaction devices and (one or more) printing devices, with a high binding success rate and a good user experience.
[0135] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0136] Example 3
[0137] This application also provides a device binding system for executing the method steps described in the above-described device binding method embodiments.
[0138] like Figure 5 As shown, the device binding system 100 provided in this application embodiment includes a client 1, a QR code transaction device 2, a server 3, and a printing device 4.
[0139] The client 1 is used to log in to the user account and send a device binding request to the server 3 through the user account;
[0140] The server 3 is configured to respond to the device binding request sent by the client 1, generate a first authorization code, and send the first authorization code to the client 1 so that the client 1 displays the first authorization code in barcode form;
[0141] The QR code transaction device 2 is used to scan the barcode of the first authorization code displayed by the client 1, generate first decoding information, and send the first decoding information to the server 3 so that the server 3 can verify the first decoding information and bind the QR code transaction device to the user account after the verification is successful.
[0142] The QR code transaction device 2 is also used to obtain the serial number of the printing device 4 and send the serial number to the server 3;
[0143] The server 3 is also configured to generate a printing instruction for the second authorization code based on the serial number of the printing device 4 sent by the scanning transaction device 2, and send the printing instruction to the printing device 4;
[0144] The printing device 4 is used to print and display the second authorization code in barcode form according to the printing instruction, so that the barcode scanning transaction device 2 can obtain the second decoding information by scanning the barcode form of the second authorization code, and send the second decoding information to the server 3;
[0145] The server 3 is also used to verify the second decoding information sent by the QR code transaction device, and after the verification is successful, to bind the printing device 4 to the user account and to bind the printing device 4 to the QR code transaction device 2.
[0146] In one embodiment, server 3 is further used for:
[0147] In response to the first permission acquisition request from the client 1, a first permission code is generated and sent to the client 1; wherein, the first permission includes printing device binding permission;
[0148] In one embodiment, the QR code transaction device 2 is further used for:
[0149] Scan the barcode of the first authorization code displayed by the client 1, generate third decoding information, and send the third decoding information to the server 3 so that the server 3 can verify the third decoding information;
[0150] In one embodiment, server 3 is further used for:
[0151] Receive the third decoding information sent by the QR code transaction device 2;
[0152] The third decoding information is verified. If the verification is successful, the following steps are executed: "generating a printing instruction for the second authorization code based on the serial number of the printing device sent by the scanning transaction device, and sending the printing instruction to the printing device" and subsequent steps.
[0153] In one embodiment, server 3 is further used for:
[0154] Receive the target serial number of the target QR code transaction device sent by the QR code transaction device 2;
[0155] Based on the target serial number, configure the attributes of the QR code transaction device to the target QR code transaction device;
[0156] The target QR code transaction device is a device that is not bound to the user account.
[0157] In one embodiment, server 3 is further used for:
[0158] In response to the second permission acquisition request from client 1, a second permission code is generated and sent to client 1; wherein, the second permission includes the permission to bind the QR code transaction device;
[0159] In one embodiment, the QR code transaction device 2 is further used for:
[0160] The barcode is used to scan the second authorization code displayed by the client 1 to generate fourth decoding information, and the fourth decoding information is sent to the server 3 so that the server 3 can verify the fourth decoding information;
[0161] In one embodiment, server 3 is further used for:
[0162] Receive the fourth decoding information sent by the QR code transaction device 2;
[0163] The fourth decoded information is verified. If the verification is successful, the step "receive the target serial number of the target QR code transaction device sent by the QR code transaction device" and subsequent steps are executed.
[0164] In one embodiment, server 3 is further used for:
[0165] Based on the target serial number, the target QR code transaction device is bound to the user account, and the target QR code transaction device is bound to the printing device 4.
[0166] In applications, each unit in the above-mentioned device can be a software program module, or it can be implemented by different logic circuits integrated in the processor or by independent physical components connected to the processor, or it can be implemented by multiple distributed processors.
[0167] Example 4
[0168] like Figure 6 As shown, this application embodiment also provides a terminal device 200, including: at least one processor 201 ( Figure 6 The diagram shows only one processor), memory 202, and computer program 203 stored in memory 202 and capable of running on at least one processor 201. When the terminal device is a server, the processor 201 executes the computer program 203 to implement the method steps in the above embodiment 1.
[0169] When the terminal device is a QR code transaction device, the processor 201 executes the computer program 203 to implement the method steps in the above embodiment 2.
[0170] In applications, terminal devices include, but are not limited to, processors and memory. Figure 6 This is merely an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, human-computer interaction devices, input / output devices, network access devices, etc. The network access device may include a communication module for communication between the terminal device and the user terminal.
[0171] In applications, the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. For example, the processor can be a timing controller (TCON). A general-purpose processor can be a microprocessor or any conventional processor.
[0172] In applications, the memory may be an internal storage unit of the terminal device in some embodiments, such as a hard drive or RAM. In other embodiments, the memory may be an external storage device of the terminal device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. The memory may also include both internal and external storage units of the terminal device. The memory is used to store the operating system, applications, boot loader, data, and other programs, such as program code for computer programs. The memory can also be used to temporarily store data that has been output or will be output.
[0173] In applications, the communication module can be configured as any device capable of long-distance wired or wireless communication directly or indirectly with user terminals, depending on actual needs. For example, the communication module can provide solutions for communication applications on network devices, including Wireless Local Area Networks (WLANs) (such as Wi-Fi networks), Bluetooth, Zigbee, mobile communication networks, Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR) technologies. The communication module can include an antenna, which can have a single element or be an antenna array with multiple elements. The communication module can receive electromagnetic waves through the antenna, frequency modulate and filter the electromagnetic wave signal, and send the processed signal to the processor. The communication module can also receive signals to be transmitted from the processor, frequency modulate and amplify them, and then convert them into electromagnetic waves for radiation via the antenna.
[0174] It should be noted that the information interaction and execution process between the above-mentioned devices / modules are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0175] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional modules is merely an example. In practical applications, the functions described above can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The functional modules in the embodiments can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules can be implemented in hardware or as software functional modules. Furthermore, the specific names of the functional modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0176] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.
[0177] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.
[0178] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, such as a USB flash drive, a portable hard drive, a magnetic disk, or an optical disk.
[0179] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0180] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0181] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0182] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0183] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A device binding method, comprising: The device binding method applied to a server comprises: In response to a device binding request sent by a client, generating a first authorization code and sending the first authorization code to the client; Receiving first decoding information; wherein the first decoding information is obtained by a code scanning transaction device scanning a barcode form of the first authorization code and sent to the server, and the barcode form of the first authorization code is displayed by the client; Verifying the first decoding information, and after verification, binding the code scanning transaction device to a user account; According to the serial number of the printing device sent by the code scanning transaction device, generating a printing instruction of a second authorization code, and sending the printing instruction to the printing device; Receiving second decoding information; wherein the second decoding information is obtained by the code scanning transaction device scanning a barcode form of the second authorization code and sent to the server, and the barcode form of the second authorization code is printed and displayed by the printing device according to the printing instruction; Verifying the second decoding information, and after verification, binding the printing device to the user account and binding the printing device with the code scanning transaction device.
2. The device binding method of claim 1, wherein, Before the step of "according to the serial number of the printing device sent by the code scanning transaction device, generating a printing instruction of a second authorization code, and sending the printing instruction to the printing device", the method further comprises: In response to a first permission acquisition request of the client, generating a first permission code and sending the first permission code to the client; wherein the first permission comprises a printing device binding permission; Receiving third decoding information; wherein the third decoding information is obtained by the code scanning transaction device scanning a barcode form of the first permission code and sent to the server, and the barcode form of the first permission code is displayed by the client; Verifying the third decoding information, and if the verification is successful, executing the step "according to the serial number of the printing device sent by the code scanning transaction device, generating a printing instruction of a second authorization code, and sending the printing instruction to the printing device" and subsequent steps.
3. The device binding method of claim 1, wherein, The device binding method further comprises: Receiving a target serial number of a target code scanning transaction device sent by the code scanning transaction device; According to the target serial number, configuring the attribute of the code scanning transaction device to the target code scanning transaction device; Wherein, the target code scanning transaction device is a device not bound to the user account.
4. The device binding method of claim 3, wherein, Before the step of "receiving a target serial number of a target code scanning transaction device sent by the code scanning transaction device", the method further comprises: In response to a second permission acquisition request of the client, generating a second permission code and sending the second permission code to the client; wherein the second permission comprises a code scanning transaction device binding permission; Receiving fourth decoding information; wherein the fourth decoding information is obtained by the code scanning transaction device scanning a barcode form of the second permission code and sent to the server, and the barcode form of the second permission code is displayed by the client; Verifying the fourth decoding information, and if the verification is successful, executing the step "receiving a target serial number of a target code scanning transaction device sent by the code scanning transaction device" and subsequent steps.
5. The device binding method of claim 3, wherein, The attribute of the code scanning transaction device is configured to the target code scanning transaction device according to the target serial number. The target code scanning transaction device is bound to the user account and the target code scanning transaction device is bound to the printing device according to the target serial number.
6. A device binding method, comprising: The device binding method is applied to a code scanning transaction device. First decoding information in the form of a barcode of a first authorization code is obtained. The first decoding information is sent to a server, so that the server binds the code scanning transaction device to a user account after passing verification of the first decoding information. The barcode form of the first authorization code is displayed by a client, and the first authorization code is generated by the server in response to a device binding request sent by the client. Second decoding information in the form of a barcode of a second authorization code is obtained. The second decoding information is sent to a server, so that the server binds the printing device to the user account and binds the printing device to the code scanning transaction device after passing verification of the second decoding information. The barcode form of the second authorization code is printed and displayed by the printing device according to a printing instruction, and the printing instruction is generated by the server according to a serial number of the printing device sent by the code scanning transaction device.
7. The device binding method of claim 6, wherein, The device binding method further includes: A target serial number of a target code scanning transaction device is obtained. The target serial number of the target code scanning transaction device is sent to a server, so that the server configures the attribute of the code scanning transaction device to the target code scanning transaction device according to the target serial number. The target code scanning transaction device is a device that is not bound to the user account.
8. A device binding system, characterized by The device binding system includes a client, a code scanning transaction device, a server, and a printing device. The client is used to log in to a user account and send a device binding request to the server through the user account. The server is used to generate a first authorization code and send the first authorization code to the client in response to the device binding request sent by the client, so that the client displays the barcode form of the first authorization code. The code scanning transaction device is used to scan the barcode form of the first authorization code displayed by the client, generate first decoding information, and send the first decoding information to the server, so that the server verifies the first decoding information and binds the code scanning transaction device to the user account after passing verification. The device binding system further includes a printing device. The code scanning transaction device is further used to obtain a serial number of the printing device and send the serial number to the server. The server is further used to generate a printing instruction of a second authorization code according to the serial number of the printing device sent by the code scanning transaction device and send the printing instruction to the printing device. The printing device is configured to print a barcode form showing a second authorization code according to the printing instruction, so that the code scanning transaction device obtains second decoding information by scanning the barcode form of the second authorization code, and sends the second decoding information to the server; The server is further configured to check the second decoding information sent by the code scanning transaction device, and bind the printing device to a user account and bind the printing device and the code scanning transaction device after the check passes.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the terminal device is a server, the processor implements the steps of the device binding method of any one of claims 1 to 5 when executing the computer program. When the terminal device is a code scanning transaction device, the processor implements the steps of the device binding method of any one of claims 6 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the steps of the device binding method of any one of claims 1 to 5 or 6 to 7.