Multi-mode payment terminal control method, device, equipment, medium and program product
By switching between NFC payment mode and QR code payment mode in the payment terminal, and using the coarse scanning function of the QR code device to determine the presence of the QR code, the interference problem between QR code payment and NFC card payment is solved, improving the payment success rate and user experience, and saving energy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-04-07
AI Technical Summary
Existing integrated payment terminals that combine QR code payment and NFC card payment experience mutual interference when the user's mobile phone is near them, resulting in a reduced payment success rate and a poor user experience. Existing solutions that weaken the magnetic field strength of the NFC induction coil have failed to completely solve the problem and have also affected the card swiping sensitivity.
By disabling NFC payment mode, the device uses a coarse scan function to first determine if a QR code exists. If it does, the scanning payment process continues; otherwise, NFC payment mode is enabled to complete the NFC payment process. Switching payment modes ensures payment success rate and saves energy.
It improves the payment success rate, enhances user payment efficiency and experience, while reducing the energy consumption of scanning devices and avoiding interference between different modes.
Smart Images

Figure CN121810286A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of payment terminal control technology, specifically to a multi-mode payment terminal control method, device, equipment, medium, and program product. Background Technology
[0002] Currently, there is an integrated payment terminal on the market that combines QR code payment and NFC card payment functions, such as... Figure 1 The NFC scanning box shown integrates NFC card payment functionality into a scanning box with QR code payment capabilities. The NFC induction coil and the scanning window overlap. A common problem with this type of integrated payment terminal is that when a user scans a QR code to pay with their mobile phone, and the phone is close to the scanning box, the NFC card payment module directly activates the phone's NFC payment application. This causes interference between QR code payment and NFC card payment, reducing the user's payment success rate and impacting the payment experience.
[0003] To address the aforementioned issues, the current solution is to weaken the magnetic field strength of the NFC induction coil. This ensures that the NFC payment application is only activated when the user's phone is very close to the scanning window, thus reducing the probability of accidental activation. While this solution reduces the likelihood of accidental activation, it doesn't fundamentally solve the problem of interference between QR code payments and NFC card payments. Furthermore, weakening the NFC induction coil's magnetic field reduces card-swiping sensitivity during NFC card payments, negatively impacting the user's payment experience. Summary of the Invention
[0004] This disclosure provides a multi-mode payment terminal control method, apparatus, device, medium, and program product.
[0005] Firstly, this disclosure provides a multi-mode payment terminal control method.
[0006] Specifically, the multi-mode payment terminal control method includes:
[0007] Turn off NFC payment mode and turn on QR code payment mode;
[0008] In response to receiving a payment initiation command, the first mode of the scanning device is activated to perform a coarse scan of the QR code to determine whether a QR code exists within a first preset distance;
[0009] When the scanning device determines that a QR code exists, it activates the second mode of the scanning device to perform a detailed scan of the QR code and enters the QR code payment process.
[0010] When the scanning device determines that there is no QR code, it activates the NFC payment mode and enters the NFC payment process.
[0011] Secondly, this disclosure provides a multi-mode payment terminal control device.
[0012] Specifically, the multi-mode payment terminal control device includes:
[0013] The first control module is configured to disable NFC payment mode and enable QR code payment mode.
[0014] The second control module is configured to, in response to receiving a payment initiation command, start the first mode of the scanning device to perform a coarse scan of the QR code and determine whether a QR code exists within a first preset distance.
[0015] The third control module is configured to activate the second mode of the scanning device to perform a detailed scan of the QR code and enter the QR code payment process when the scanning device determines that a QR code exists.
[0016] The fourth control module is configured to enable NFC payment mode and enter the NFC payment process when the scanning device determines that there is no QR code.
[0017] Thirdly, embodiments of this disclosure provide an electronic device, including a memory and a processor. The memory stores one or more computer instructions that support a multi-mode payment terminal control device in executing the aforementioned multi-mode payment terminal control method. The processor is configured to execute the computer instructions stored in the memory. The multi-mode payment terminal control device may further include a communication interface for communication between the multi-mode payment terminal control device and other devices or communication networks.
[0018] Fourthly, embodiments of this disclosure provide a computer-readable storage medium for storing computer instructions used by a multi-mode payment terminal control device, which includes computer instructions for executing the aforementioned multi-mode payment terminal control method for the multi-mode payment terminal control device.
[0019] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the multi-mode payment terminal control method described above.
[0020] The technical solutions provided in this disclosure may have the following beneficial effects:
[0021] The aforementioned technical solution first disables the NFC payment mode and uses the coarse scanning function of the scanning device to determine if a QR code exists. If it does, the scanning payment process continues; otherwise, the NFC payment mode is enabled, and the NFC payment process begins. This technical solution ensures a higher payment success rate, improves payment efficiency, and enhances the user's payment experience by switching between the NFC payment mode and the QR code payment mode. Simultaneously, the switching between the first and second modes of the scanning device conserves its energy.
[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the embodiments of this disclosure. Attached Figure Description
[0023] Other features, objects, and advantages of embodiments of this disclosure will become more apparent from the following detailed description of non-limiting implementations, taken in conjunction with the accompanying drawings. In the drawings:
[0024] Figure 1 This illustrates an NFC barcode scanner box in the prior art;
[0025] Figure 2 A flowchart illustrating a multi-mode payment terminal control method according to an embodiment of the present disclosure is shown;
[0026] Figure 3 A flowchart of a multi-mode payment terminal control method according to an embodiment of the present disclosure is shown.
[0027] Figure 4 A structural block diagram of a multi-mode payment terminal control device according to an embodiment of the present disclosure is shown;
[0028] Figure 5 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown;
[0029] Figure 6 This is a schematic diagram of the structure of a computer system suitable for implementing a multi-mode payment terminal control method according to an embodiment of the present disclosure. Detailed Implementation
[0030] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to enable those skilled in the art to readily implement them. Furthermore, for clarity, portions unrelated to the description of the exemplary embodiments have been omitted from the drawings.
[0031] In embodiments disclosed herein, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, numbers, steps, behaviors, components, portions or combinations thereof disclosed herein, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, portions or combinations thereof are present or added.
[0032] It should also be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings and examples.
[0033] As mentioned above, there is currently an integrated payment terminal on the market that combines QR code payment and NFC card payment functions, such as... Figure 1 The NFC scanning box shown integrates NFC card payment functionality into a scanning box with QR code payment capabilities. The NFC induction coil and the scanning window overlap. A common problem with this type of integrated payment terminal is that when a user scans a QR code to pay with their mobile phone, the NFC card payment module directly wakes up the phone's NFC payment application when the phone is close to the scanning box. This causes interference between QR code payment and NFC card payment, reducing the success rate of payments and impacting the user's payment experience. Current solutions to this problem involve weakening the magnetic field strength of the NFC induction coil. This ensures that the NFC payment application is only activated when the user's phone is very close to the scanning window, thus reducing the probability of accidental activation. While this solution reduces the probability of accidental activation, it doesn't fundamentally solve the problem of interference between QR code payment and NFC card payment. Furthermore, weakening the magnetic field strength of the NFC induction coil reduces the card-swiping sensitivity during NFC card payments, further affecting the user's payment experience.
[0034] Based on the above, and to address the problems existing in the prior art, this disclosure proposes a multi-mode payment terminal control method. This method first disables the NFC payment mode and uses the coarse scanning function of the scanning device to determine if a QR code exists. If a QR code exists, the scanning payment process continues; otherwise, the NFC payment mode is enabled, and the NFC payment process begins. This technical solution ensures a higher payment success rate, improves payment efficiency, and enhances the user's payment experience by switching between NFC and QR code payment modes. Simultaneously, the switching between the first and second modes of the scanning device saves energy.
[0035] Figure 2 A flowchart of a multi-mode payment terminal control method according to an embodiment of the present disclosure is shown, such as... Figure 2As shown, the multi-mode payment terminal control method includes the following steps S201-S204:
[0036] In step S201, the NFC payment mode is turned off and the QR code payment mode is turned on;
[0037] In step S202, in response to receiving the payment initiation command, the first mode of the scanning device is started to perform a coarse scan of the QR code to determine whether a QR code exists within a first preset distance;
[0038] In step S203, when the scanning device determines that a QR code exists, it starts the second mode of the scanning device to perform a detailed scan of the QR code and enters the QR code payment process.
[0039] In step S204, when the scanning device determines that there is no QR code, it activates the NFC payment mode and enters the NFC payment process.
[0040] In one embodiment of this disclosure, the multi-mode payment terminal control method can be applied to terminal computers, computing devices, electronic devices, servers, service clusters, etc., that can perform multi-mode payment terminal control.
[0041] In one embodiment of this disclosure, the multi-mode payment terminal supports at least a QR code payment mode and an NFC payment mode. The QR code payment mode refers to a payment mode in which a QR code is scanned using a scanning device to obtain the corresponding payment information, and the payment process is completed based on the obtained payment information. The NFC payment mode refers to a payment mode in which a card swipe payment is realized using near-field communication technology.
[0042] In one embodiment of this disclosure, the control of enabling or disabling the NFC payment mode can be achieved by controlling the magnetic field of the NFC induction coil. For example, if you want to disable the NFC payment mode, you can disable the magnetic field of the NFC induction coil; if you want to enable the NFC payment mode, you can enable the magnetic field of the NFC induction coil.
[0043] In one embodiment of this disclosure, the control of enabling or disabling the QR code payment mode can be achieved by controlling the QR code scanning device and its image recognition function. For example, if you want to disable the QR code payment mode, you can disable the QR code scanning device and its image recognition function; if you want to enable the QR code payment mode, you can enable the QR code scanning device and its image recognition function. The QR code scanning device can be, for example, an electronic device that supports QR code scanning, such as a QR code scanning camera.
[0044] In one embodiment of this disclosure, the payment initiation command refers to a command to begin the payment process.
[0045] In one embodiment of this disclosure, the first mode of the scanning device refers to a mode that supports coarse scanning of QR codes. In this embodiment, activating the first mode of the scanning device is used to determine whether a QR code exists at a position within a first preset distance from the scanning device. The first mode of the scanning device can also be called a low-precision scanning mode. In this mode, since the scanning device only needs to perform a coarse scan within the first preset distance and roughly focus on the QR code without precise focusing or recognizing the information carried by the QR code, the scanning device is in a low-power state in the first mode.
[0046] The first preset distance refers to the distance used only to determine whether a QR code exists within a preset range of the scanning device. The first preset distance can be set according to the parameters of the scanning device and the needs of actual application.
[0047] In one embodiment of this disclosure, the second mode of the scanning device refers to a mode that supports the scanning device to perform fine scanning of QR codes for QR code payment, which can also be called a high-precision scanning mode. In this mode, the scanning device needs to accurately focus on the QR code, judge the clarity of the QR code, and identify the information carried by the QR code, etc., to provide data support for QR code payment and ensure the success rate of QR code payment. Therefore, in the second mode, the scanning device is in a high-energy-consumption state.
[0048] In the above embodiments, a multi-mode payment terminal control method is proposed. This method, when the multi-mode payment terminal is activated, first disables the NFC payment mode, enabling only the QR code payment mode to avoid interference between the NFC payment mode and the QR code payment mode. Then, upon receiving a payment initiation command, the method first uses the coarse scanning function of the QR code scanner to determine if a QR code exists within a first preset distance. If it exists, the method initiates the fine scanning function to continue the QR code payment process. If not, the NFC payment mode is then activated, and the NFC payment process begins. After the NFC payment process is completed, the NFC payment mode is disabled to ensure that the NFC payment mode is disabled and the QR code payment mode is enabled for the next payment attempt. This technical solution ensures a higher payment success rate, improves payment efficiency, and enhances the user's payment experience by switching between the NFC payment mode and the QR code payment mode. Simultaneously, the switching between the first and second modes of the QR code scanner saves energy consumption.
[0049] In one embodiment of this disclosure, the step S202, which involves activating the first mode of the scanning device to perform a coarse scan of the QR code and determining whether a QR code exists within a first preset distance, may include the following steps:
[0050] The first mode of the scanning device is activated to perform a coarse scan of the QR code and determine whether QR code features exist within a first preset distance.
[0051] When it is determined that there are QR code features within a first preset distance, it is determined that there are QR codes within the first preset distance.
[0052] In this embodiment, the presence of a QR code within a first preset distance is determined by judging whether QR code features exist within that first preset distance. That is, when a payment initiation command is received, the first mode of the scanning device is first activated to perform a coarse scan of the QR code within the first preset distance to determine whether QR code features exist within the first preset distance. If QR code features exist within the first preset distance, then it can be determined that a QR code exists within the first preset distance.
[0053] In one embodiment of this disclosure, the QR code feature can be a QR code positioning feature. There can be multiple QR code positioning features, each with a preset size and located at a preset position, such as a positioning mark in the QR code. When the QR code positioning feature is a QR code positioning mark, the QR code positioning feature consists of three positioning squares with a preset size, located at the upper left, lower left, and upper right corners of the QR code, respectively.
[0054] In this embodiment, the step of determining whether there are QR code features within the first preset distance may include the following steps:
[0055] Determine whether there are a preset number of QR code positioning features of a preset size within a first preset distance;
[0056] When it is determined that there are a preset number of QR code positioning features with a preset size within a first preset distance, it is determined whether the relative positions between the QR code positioning features meet the preset requirements.
[0057] When it is determined that the relative positions between the QR code positioning features meet the preset requirements, it is determined that there are QR code features within the first preset distance.
[0058] Taking the QR code feature as a positioning marker as an example, in this embodiment, when determining whether a QR code feature exists within a first preset distance, it is first determined whether there are three positioning blocks of a preset size within the first preset distance. If so, it is then determined whether these three positioning blocks satisfy the relative positional relationship of the upper left, lower left, and upper right corners. If so, it indicates that a QR code feature exists within the first preset distance. How to determine whether the three positioning blocks satisfy the relative positional relationship of the upper left, lower left, and upper right corners is a technique that should be mastered by those skilled in the art, and this disclosure will not describe it in detail.
[0059] Furthermore, in one embodiment of this disclosure, if no QR code feature is detected within a preset time period, it can be determined that there is no QR code within the first preset distance.
[0060] In one embodiment of this disclosure, step S203, that is, before starting the second mode of the scanning device to perform fine scanning of the QR code, may further include the following steps:
[0061] Detect the distance between the scanning device and the QR code;
[0062] When the distance between the scanning device and the QR code is less than or equal to the second preset distance, the second mode of the scanning device is activated to perform fine scanning of the QR code.
[0063] In this embodiment, in order to reduce the energy consumption of the scanning device and improve the recognition efficiency and accuracy of the QR code, before starting the second mode of the scanning device to perform fine scanning of the QR code, the distance between the scanning device and the QR code is first detected. Only when the distance between the scanning device and the QR code is less than or equal to a second preset distance will the second mode of the scanning device be started to perform fine scanning of the QR code.
[0064] The second preset distance is less than the first preset distance. Similar to the first preset distance, the second preset distance can also be set according to the parameters of the scanning device and the needs of actual application.
[0065] In one embodiment of this disclosure, step S203, namely, activating the second mode of the scanning device to perform fine scanning of the QR code, may include the following steps:
[0066] Start the second mode of the scanning device to scan the QR code and obtain the QR code image;
[0067] Detect the image clarity of the QR code image;
[0068] When the image clarity of the QR code image meets the preset clarity requirements, the QR code image is scanned in detail to obtain the information carried by the QR code.
[0069] In this embodiment, in order to further reduce the energy consumption of the scanning device and improve the recognition efficiency and accuracy of the QR code, when the second mode of the scanning device is activated for fine scanning of the QR code, the second mode of the scanning device is first used to scan the QR code to obtain a QR code image. Then, the image clarity of the QR code image is detected. When the image clarity of the QR code image meets the preset clarity requirements, the QR code image is then finely scanned to identify the payment information and other information carried by the QR code.
[0070] The preset clarity requirement can be set according to payment requirements and the needs of actual applications.
[0071] Figure 3 This diagram illustrates the overall flowchart of a multi-mode payment terminal control method according to an embodiment of the present disclosure, as follows: Figure 3 As shown, when the multi-mode payment terminal is turned on, the NFC payment mode is turned off and the QR code payment mode is turned on. Upon receiving a payment initiation command, the first mode of the scanning device is activated to perform a coarse scan of the QR code to determine whether QR code features exist within a first preset distance. If they exist, the existence of the QR code is confirmed. When the distance between the scanning device and the QR code is less than or equal to a second preset distance, the second mode of the scanning device is activated to perform a fine scan of the QR code, identify the information carried by the QR code, and enter the QR code payment process. If no QR code features are detected within a preset time period, it is confirmed that no QR code exists, the NFC payment mode is activated, and the NFC payment process is entered. After the NFC payment process is completed, the NFC payment mode is turned off to ensure that the NFC payment mode is turned off and the QR code payment mode is turned on for the next payment.
[0072] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein.
[0073] Figure 4 This diagram illustrates a structural block diagram of a multi-mode payment terminal control device according to an embodiment of the present disclosure. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 4 As shown, the multi-mode payment terminal control device includes:
[0074] The first control module 401 is configured to disable NFC payment mode and enable QR code payment mode.
[0075] The second control module 402 is configured to, in response to receiving a payment initiation command, start the first mode of the scanning device to perform a coarse scan of the QR code and determine whether a QR code exists within a first preset distance.
[0076] The third control module 403 is configured to start the second mode of the scanning device to perform a fine scan of the QR code and enter the QR code payment process when the scanning device determines that a QR code exists.
[0077] The fourth control module 404 is configured to enable NFC payment mode and enter the NFC payment process when the scanning device determines that there is no QR code.
[0078] In one embodiment of this disclosure, the multi-mode payment terminal control device can be implemented as a terminal computer, computing device, electronic device, server, service cluster, etc., capable of performing multi-mode payment terminal control.
[0079] In one embodiment of this disclosure, the multi-mode payment terminal supports at least a QR code payment mode and an NFC payment mode. The QR code payment mode refers to a payment mode in which a QR code is scanned using a scanning device to obtain the corresponding payment information, and the payment process is completed based on the obtained payment information. The NFC payment mode refers to a payment mode in which a card swipe payment is realized using near-field communication technology.
[0080] In one embodiment of this disclosure, the control of enabling or disabling the NFC payment mode can be achieved by controlling the magnetic field of the NFC induction coil. For example, if you want to disable the NFC payment mode, you can disable the magnetic field of the NFC induction coil; if you want to enable the NFC payment mode, you can enable the magnetic field of the NFC induction coil.
[0081] In one embodiment of this disclosure, the control of enabling or disabling the QR code payment mode can be achieved by controlling the QR code scanning device and its image recognition function. For example, if you want to disable the QR code payment mode, you can disable the QR code scanning device and its image recognition function; if you want to enable the QR code payment mode, you can enable the QR code scanning device and its image recognition function. The QR code scanning device can be, for example, an electronic device that supports QR code scanning, such as a QR code scanning camera.
[0082] In one embodiment of this disclosure, the payment initiation command refers to a command to begin the payment process.
[0083] In one embodiment of this disclosure, the first mode of the scanning device refers to a mode that supports coarse scanning of QR codes. In this embodiment, activating the first mode of the scanning device is used to determine whether a QR code exists at a position within a first preset distance from the scanning device. The first mode of the scanning device can also be called a low-precision scanning mode. In this mode, since the scanning device only needs to perform a coarse scan within the first preset distance and roughly focus on the QR code without precise focusing or recognizing the information carried by the QR code, the scanning device is in a low-power state in the first mode.
[0084] The first preset distance refers to the distance used only to determine whether a QR code exists within a preset range of the scanning device. The first preset distance can be set according to the parameters of the scanning device and the needs of actual application.
[0085] In one embodiment of this disclosure, the second mode of the scanning device refers to a mode that supports the scanning device to perform fine scanning of QR codes for QR code payment, which can also be called a high-precision scanning mode. In this mode, the scanning device needs to accurately focus on the QR code, judge the clarity of the QR code, and identify the information carried by the QR code, etc., to provide data support for QR code payment and ensure the success rate of QR code payment. Therefore, in the second mode, the scanning device is in a high-energy-consumption state.
[0086] In the above embodiments, a multi-mode payment terminal control device is proposed. When the multi-mode payment terminal is activated, this device can first disable the NFC payment mode and only enable the QR code payment mode to avoid interference between the NFC payment mode and the QR code payment mode. Then, upon receiving a payment initiation command, the device first uses the coarse scanning function of the QR code scanner to determine whether a QR code exists within a first preset distance. If it exists, the device initiates the fine scanning function to continue the QR code payment process. If it does not exist, the NFC payment mode is then activated, and the NFC payment process begins. After the NFC payment process is completed, the NFC payment mode is disabled to ensure that the NFC payment mode is disabled and the QR code payment mode is enabled for the next payment attempt. This technical solution ensures a higher payment success rate, improves payment efficiency, and enhances the user's payment experience by switching between the NFC payment mode and the QR code payment mode. Simultaneously, the switching between the first and second modes of the QR code scanner saves energy consumption.
[0087] In one embodiment of this disclosure, the first mode of activating the scanning device in the second control module to perform a coarse scan of the QR code and determine whether there is a portion of the QR code within a first preset distance can be configured as follows:
[0088] The first mode of the scanning device is activated to perform a coarse scan of the QR code and determine whether QR code features exist within a first preset distance.
[0089] When it is determined that there are QR code features within a first preset distance, it is determined that there are QR codes within the first preset distance.
[0090] In this embodiment, the presence of a QR code within a first preset distance is determined by judging whether QR code features exist within that first preset distance. That is, when a payment initiation command is received, the first mode of the scanning device is first activated to perform a coarse scan of the QR code within the first preset distance to determine whether QR code features exist within the first preset distance. If QR code features exist within the first preset distance, then it can be determined that a QR code exists within the first preset distance.
[0091] In one embodiment of this disclosure, the QR code feature can be a QR code positioning feature. There can be multiple QR code positioning features, each with a preset size and located at a preset position, such as a positioning mark in the QR code. When the QR code positioning feature is a QR code positioning mark, the QR code positioning feature consists of three positioning squares with a preset size, located at the upper left, lower left, and upper right corners of the QR code, respectively.
[0092] In this embodiment, the part that determines whether there are QR code features within the first preset distance can be configured as follows:
[0093] Determine whether there are a preset number of QR code positioning features of a preset size within a first preset distance;
[0094] When it is determined that there are a preset number of QR code positioning features with a preset size within a first preset distance, it is determined whether the relative positions between the QR code positioning features meet the preset requirements.
[0095] When it is determined that the relative positions between the QR code positioning features meet the preset requirements, it is determined that there are QR code features within the first preset distance.
[0096] Taking the QR code feature as a positioning marker as an example, in this embodiment, when determining whether a QR code feature exists within a first preset distance, it is first determined whether there are three positioning blocks of a preset size within the first preset distance. If so, it is then determined whether these three positioning blocks satisfy the relative positional relationship of the upper left, lower left, and upper right corners. If so, it indicates that a QR code feature exists within the first preset distance. How to determine whether the three positioning blocks satisfy the relative positional relationship of the upper left, lower left, and upper right corners is a technique that should be mastered by those skilled in the art, and this disclosure will not describe it in detail.
[0097] Furthermore, in one embodiment of this disclosure, if no QR code feature is detected within a preset time period, it can be determined that there is no QR code within the first preset distance.
[0098] In one embodiment of this disclosure, before the third control module, the device may further include:
[0099] The detection module is configured to detect the distance between the scanning device and the QR code; when the distance between the scanning device and the QR code is less than or equal to a second preset distance, the second mode of the scanning device is activated to perform fine scanning of the QR code.
[0100] In this embodiment, in order to reduce the energy consumption of the scanning device and improve the recognition efficiency and accuracy of the QR code, before starting the second mode of the scanning device to perform fine scanning of the QR code, the distance between the scanning device and the QR code is first detected. Only when the distance between the scanning device and the QR code is less than or equal to a second preset distance will the second mode of the scanning device be started to perform fine scanning of the QR code.
[0101] The second preset distance is less than the first preset distance. Similar to the first preset distance, the second preset distance can also be set according to the parameters of the scanning device and the needs of actual application.
[0102] In one embodiment of this disclosure, the part of the third control module that initiates the second mode of the scanning device for fine scanning of the QR code can be configured as follows:
[0103] Start the second mode of the scanning device to scan the QR code and obtain the QR code image;
[0104] Detect the image clarity of the QR code image;
[0105] When the image clarity of the QR code image meets the preset clarity requirements, the QR code image is scanned in detail to obtain the information carried by the QR code.
[0106] In this embodiment, in order to further reduce the energy consumption of the scanning device and improve the recognition efficiency and accuracy of the QR code, when the second mode of the scanning device is activated for fine scanning of the QR code, the second mode of the scanning device is first used to scan the QR code to obtain a QR code image. Then, the image clarity of the QR code image is detected. When the image clarity of the QR code image meets the preset clarity requirements, the QR code image is then finely scanned to identify the payment information and other information carried by the QR code.
[0107] The preset clarity requirement can be set according to payment requirements and the needs of actual applications.
[0108] This disclosure also discloses an electronic device, Figure 5 This diagram illustrates a structural block diagram of an electronic device according to an embodiment of the present disclosure, such as... Figure 5 As shown, the electronic device 500 includes a memory 501 and a processor 502; wherein,
[0109] The memory 501 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 502 to implement the above method steps.
[0110] Figure 6 This is a schematic diagram of the structure of a computer system suitable for implementing a multi-mode payment terminal control method according to an embodiment of the present disclosure.
[0111] like Figure 6 As shown, the computer system 600 includes a processing unit 601, which can execute various processes described above based on a program stored in a read-only memory (ROM) 602 or a program loaded from a storage section 608 into a random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of the computer system 600. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0112] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed. The processing unit 601 can be implemented as a CPU, GPU, TPU, FPGA, NPU, etc.
[0113] In particular, according to embodiments of this disclosure, the methods described above can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program tangibly embodied on a readable medium thereof, the computer program containing program code for performing the methods. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611.
[0114] This disclosure also discloses a computer program product, which includes a computer program / instructions that, when executed by a processor, implement any of the above-described method steps.
[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0116] The units or modules described in the embodiments of this disclosure can be implemented in software or hardware. The described units or modules can also be located in a processor, and the names of these units or modules do not necessarily constitute a limitation on the unit or module itself.
[0117] In another aspect, embodiments of this disclosure also provide a computer-readable storage medium, which may be a computer-readable storage medium included in the apparatus described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores one or more programs, which are used by one or more processors to perform the methods described in embodiments of this disclosure.
[0118] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A multi-mode payment terminal control method, wherein, The multi-mode payment terminal supports both QR code payment and NFC payment modes, and the method includes: Turn off NFC payment mode and turn on QR code payment mode; In response to receiving a payment initiation command, the first mode of the scanning device is activated to perform a coarse scan of the QR code to determine whether a QR code exists within a first preset distance; When the scanning device determines that a QR code exists, it activates the second mode of the scanning device to perform a detailed scan of the QR code and enters the QR code payment process. When the scanning device determines that there is no QR code, it activates the NFC payment mode and enters the NFC payment process.
2. The method according to claim 1, wherein, The first mode of the scanning device is a low-precision scanning mode, and the second mode of the scanning device is a high-precision scanning mode.
3. The method according to claim 1, wherein, The first mode of activating the scanning device performs a coarse scan of the QR code to determine whether a QR code exists within a first preset distance, including: The first mode of the scanning device is activated to perform a coarse scan of the QR code and determine whether QR code features exist within a first preset distance. When it is determined that there are QR code features within a first preset distance, it is determined that there are QR codes within the first preset distance.
4. The method according to claim 3, wherein, Determining whether a QR code feature exists within the first preset distance includes: Determine whether a preset number of QR code positioning features exist within a first preset distance; When it is determined that there are a preset number of QR code positioning features within a first preset distance, it is determined whether the relative positions between the QR code positioning features meet preset requirements; When it is determined that the relative positions between the QR code positioning features meet the preset requirements, it is determined that there are QR code features within the first preset distance.
5. The method according to claim 3, wherein, The first mode of activating the scanning device to perform a coarse scan of the QR code to determine whether a QR code exists within a first preset distance also includes: If no QR code feature is detected within a preset time period, it is determined that there is no QR code within the first preset distance.
6. The method according to claim 1, further comprising, before activating the second mode of the scanning device for detailed QR code scanning: Detect the distance between the scanning device and the QR code; When the distance between the scanning device and the QR code is less than or equal to the second preset distance, the second mode of the scanning device is activated to perform fine scanning of the QR code.
7. The method according to claim 1, wherein, The second mode of activating the scanning device for detailed QR code scanning includes: Start the second mode of the scanning device to scan the QR code and obtain the QR code image; Detect the image clarity of the QR code image; When the image clarity of the QR code image meets the preset clarity requirements, the QR code image is scanned in detail to obtain the information carried by the QR code.
8. The method according to claim 1, wherein, The NFC payment mode is turned off by turning off the NFC coil magnetic field; the NFC payment mode is turned on by turning on the NFC coil magnetic field.
9. A multi-mode payment terminal control device, wherein, The multi-mode payment terminal supports both QR code payment and NFC payment modes. The device includes: The first control module is configured to disable NFC payment mode and enable QR code payment mode. The second control module is configured to, in response to receiving a payment initiation command, start the first mode of the scanning device to perform a coarse scan of the QR code and determine whether a QR code exists within a first preset distance. The third control module is configured to activate the second mode of the scanning device to perform a detailed scan of the QR code and enter the QR code payment process when the scanning device determines that a QR code exists. The fourth control module is configured to enable NFC payment mode and enter the NFC payment process when the scanning device determines that there is no QR code.
10. The apparatus according to claim 9, wherein, The first mode of the scanning device is a low-precision scanning mode, and the second mode of the scanning device is a high-precision scanning mode.