[go: up one dir, main page]

CN111967871A - Secure payment method, device and storage medium - Google Patents

Secure payment method, device and storage medium Download PDF

Info

Publication number
CN111967871A
CN111967871A CN202010841973.3A CN202010841973A CN111967871A CN 111967871 A CN111967871 A CN 111967871A CN 202010841973 A CN202010841973 A CN 202010841973A CN 111967871 A CN111967871 A CN 111967871A
Authority
CN
China
Prior art keywords
payment code
terminal device
scanning
original
distance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010841973.3A
Other languages
Chinese (zh)
Other versions
CN111967871B (en
Inventor
周能
易敏
赵娟宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Microphone Holdings Co Ltd
Original Assignee
Shenzhen Microphone Holdings Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Microphone Holdings Co Ltd filed Critical Shenzhen Microphone Holdings Co Ltd
Priority to CN202010841973.3A priority Critical patent/CN111967871B/en
Publication of CN111967871A publication Critical patent/CN111967871A/en
Application granted granted Critical
Publication of CN111967871B publication Critical patent/CN111967871B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • G06Q20/3274Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being displayed on the M-device
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application provides a secure payment method, a device and a storage medium. The method comprises the following steps: receiving a payment code display request and generating an original payment code; and when the terminal equipment is detected to be scanned, if the distance between the scanning equipment and the terminal equipment is less than or equal to a first preset value, displaying the original payment code. The method improves payment security.

Description

安全支付方法、设备及存储介质Secure payment method, equipment and storage medium

技术领域technical field

本申请实施例涉及移动支付技术,尤其涉及一种安全支付方法、设备及存储介质。The embodiments of the present application relate to mobile payment technologies, and in particular, to a secure payment method, device, and storage medium.

背景技术Background technique

随着移动支付技术的发展,越来越多用户逐渐使用终端设备进行日常的消费付款来替代传统的现金支付或刷卡支付。With the development of mobile payment technology, more and more users gradually use terminal devices for daily consumption payment instead of traditional cash payment or credit card payment.

使用终端设备进行付款时,通常是用户在终端设备上直接打开自己的付款码界面,收款方使用扫描设备扫描用户的付款码即可直接进行扣款。然而,这种支付方式存在的一个问题是,用户在准备付款时,常常会提前打开付款码界面,例如用户可能在排队等待时就提前打开了付款码,这时可能就会有不法分子复制或扫描到用户的付款码,使用户财产受到损失。因此,亟需一种更为安全的支付方法。When using a terminal device to make payment, usually the user directly opens his own payment code interface on the terminal device, and the payee scans the user's payment code with the scanning device to directly deduct the payment. However, a problem with this payment method is that users often open the payment code interface in advance when preparing to pay. For example, the user may open the payment code in advance while waiting in line. At this time, criminals may copy or The user's payment code is scanned and the user's property is damaged. Therefore, a more secure payment method is urgently needed.

前面的叙述在于提供一般的背景信息,并不一定构成现有技术。The preceding statements are intended to provide general background information and may not constitute prior art.

发明内容SUMMARY OF THE INVENTION

本申请提供一种安全支付方法、设备及存储介质,以提高移动支付的安全性。The present application provides a secure payment method, device and storage medium to improve the security of mobile payment.

第一方面,本申请提供一种安全支付方法,应用于终端设备,包括:In a first aspect, the present application provides a secure payment method, which is applied to a terminal device, including:

接收付款码显示请求,并生成原始付款码;Receive payment code display request, and generate original payment code;

在检测到所述终端设备被扫描时,若扫描设备与所述终端设备之间的距离小于或等于第一预设值,则显示所述原始付款码。When it is detected that the terminal device is scanned, if the distance between the scanning device and the terminal device is less than or equal to a first preset value, the original payment code is displayed.

可选地,在所述显示所述原始付款码之前,还包括:进行用户鉴权,若通过才显示所述原始付款码;和/或,若不通过,则不显示所述原始付款码和/或输出提示信息。Optionally, before the displaying of the original payment code, the method further includes: performing user authentication, and displaying the original payment code only if passed; and/or, if not passing, not displaying the original payment code and / or output prompt information.

可选地,所述生成原始付款码之后,所述方法还包括:Optionally, after generating the original payment code, the method further includes:

对所述原始付款码的图像进行处理后得到安全付款码,可选地,安全付款码为无法被正确识别的付款码或图案;After processing the image of the original payment code, a security payment code is obtained, optionally, the security payment code is a payment code or pattern that cannot be correctly identified;

显示所述安全付款码;displaying said secure payment code;

可选地,所述显示所述原始付款码,包括:Optionally, the displaying the original payment code includes:

将所述安全付款码切换为所述原始付款码。Switch the secure payment code to the original payment code.

可选地,所述检测到所述终端设备被扫描,包括:Optionally, the detecting that the terminal device is scanned includes:

若所述终端设备接收到扫描设备的扫描光信号,则确定所述终端设备被扫描;所述方法还包括:确定所述扫描设备与所述终端设备之间的距离。If the terminal device receives the scanning light signal of the scanning device, it is determined that the terminal device is scanned; the method further includes: determining the distance between the scanning device and the terminal device.

可选地,所述终端设备接收到扫描设备的扫描光信号,包括:Optionally, the terminal device receives the scanning optical signal of the scanning device, including:

若所述终端设备接收到的光信号的强度变化大于或等于第二预设值,则确定所述终端设备接收到扫描设备的扫描光信号。If the intensity change of the optical signal received by the terminal device is greater than or equal to the second preset value, it is determined that the terminal device has received the scanning optical signal of the scanning device.

可选地,所述确定所述扫描设备与所述终端设备之间的距离,包括:Optionally, the determining the distance between the scanning device and the terminal device includes:

确定与所述终端设备距离最近的障碍物;determine the closest obstacle to the terminal device;

将所述距离最近的障碍物与所述终端设备之间的距离确定为所述扫描设备与所述终端设备之间的距离。The distance between the closest obstacle and the terminal device is determined as the distance between the scanning device and the terminal device.

可选地,所述确定所述扫描设备与所述终端设备之间的距离,包括:Optionally, the determining the distance between the scanning device and the terminal device includes:

拍摄所述扫描光信号方向的图像;photographing an image in the direction of the scanning light signal;

根据所述扫描光信号方向的图像确定所述扫描设备与所述终端设备之间的距离。The distance between the scanning device and the terminal device is determined according to the image of the direction of the scanning light signal.

可选地,所述对所述原始付款码的图像进行处理后得到安全付款码之前,所述方法还包括:Optionally, before obtaining a secure payment code after processing the image of the original payment code, the method further includes:

确定所述终端设备的付款码安全保护模式已开启。It is determined that the payment code security protection mode of the terminal device is enabled.

可选地,所述方法还包括:Optionally, the method further includes:

若所述距离大于第一预设值,则输出提示信息,所述提示信息用于提示用户付款码被非法扫描。If the distance is greater than the first preset value, prompt information is output, where the prompt information is used to prompt the user that the payment code is illegally scanned.

可选地,所述提示信息为文字信息、语音信息和灯光信息中的至少一种。Optionally, the prompt information is at least one of text information, voice information and lighting information.

可选地,所述对所述原始付款码进行处理得到安全付款码,包括以下至少一种:Optionally, the processing of the original payment code to obtain a secure payment code includes at least one of the following:

对所述原始付款码的全部或部分图像进行虚化图像处理得到清晰度低于所述原始付款码的安全付款码;Perform virtual image processing on all or part of the image of the original payment code to obtain a secure payment code with a lower definition than the original payment code;

对所述原始付款码的图像进行加密处理,得到为所述安全付款码;Encrypting the image of the original payment code to obtain the secure payment code;

对所述原始付款码的全部或部分图像进行遮盖处理,得到所述安全付款码;Covering all or part of the image of the original payment code to obtain the secure payment code;

对所述原始付款码的全部或部分图像进行图像拉伸变形处理,得到所述安全付款码。Perform image stretching and deformation processing on all or part of the original payment code to obtain the secure payment code.

可选地,所述付款码为条形码或二维码。Optionally, the payment code is a barcode or a two-dimensional code.

第二方面,本申请提供一种安全支付装置,包括:In a second aspect, the present application provides a secure payment device, including:

生成模块,用于接收付款码显示请求,并生成原始付款码;The generation module is used to receive the payment code display request and generate the original payment code;

显示模块,用于在检测到所述终端设备被扫描时,若扫描设备与所述终端设备之间的距离小于或等于第一预设值,则显示所述原始付款码。The display module is configured to display the original payment code if the distance between the scanning device and the terminal device is less than or equal to a first preset value when it is detected that the terminal device is scanned.

第三方面,本申请提供一种终端设备,包括:存储器和处理器;In a third aspect, the present application provides a terminal device, including: a memory and a processor;

所述存储器用于存储计算机程序;the memory is used to store computer programs;

所述处理器用于执行所述计算机程序时,实现如第一方面中所述的方法。When the processor is configured to execute the computer program, the method as described in the first aspect is implemented.

第四方面,本申请提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现如第一方面中所述的方法。In a fourth aspect, the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the method described in the first aspect.

本申请提供一种安全支付方法、设备及存储介质,在接收到付款码显示请求后,仅生成原始付款码但并不直接显示,在检测到终端设备被扫描,且扫描设备与终端设备之间的距离小于或等于第一预设值,才显示原始付款码,从而保证了付款码是在用户将终端设备靠近扫描设备的情况下显示,避免了由于提前显示付款码而导致付款码被恶意扫描或被复制,提高了支付安全性。并且该安全支付方法不会增加用户的操作复杂度,用户体验较好。The present application provides a secure payment method, device and storage medium. After receiving a payment code display request, only the original payment code is generated but not displayed directly. The original payment code is displayed only when the distance is less than or equal to the first preset value, which ensures that the payment code is displayed when the user brings the terminal device close to the scanning device, and avoids malicious scanning of the payment code due to the payment code being displayed in advance. Or be copied, which improves payment security. In addition, the secure payment method does not increase the operational complexity of the user, and the user experience is better.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description serve to explain the principles of the application.

图1为实现本申请各个实施例的一种移动终端的硬件结构示意图;1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present application;

图2为本申请实施例提供的一种通信网络系统架构图;FIG. 2 is an architecture diagram of a communication network system provided by an embodiment of the present application;

图3为本申请提供的一种安全支付方法应用场景图;3 is an application scenario diagram of a secure payment method provided by the present application;

图4为本申请提供的一种安全支付方法的流程示意图一;FIG. 4 is a schematic flow chart 1 of a secure payment method provided by the present application;

图5为本申请提供的一种终端设备的用户界面图一;FIG. 5 is a user interface diagram 1 of a terminal device provided by the present application;

图6为本申请提供的一种安全支付方法的流程示意图二;FIG. 6 is a second schematic flowchart of a safe payment method provided by the present application;

图7为本申请提供的一种终端设备的用户界面图二;FIG. 7 is a user interface diagram 2 of a terminal device provided by the present application;

图8为本申请提供的一种终端设备的用户界面图三;FIG. 8 is a user interface diagram 3 of a terminal device provided by the present application;

图9为本申请提供的一种安全支付方法的结构示意图;9 is a schematic structural diagram of a secure payment method provided by the present application;

图10为本申请提供的一种终端设备的结构示意图。FIG. 10 is a schematic structural diagram of a terminal device provided by this application.

通过上述附图,已示出本申请明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本申请构思的范围,而是通过参考特定实施例为本领域技术人员说明本申请的概念。Specific embodiments of the present application have been shown by the above-mentioned drawings, and will be described in more detail hereinafter. These drawings and written descriptions are not intended to limit the scope of the concepts of the present application in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as recited in the appended claims.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

应当理解,尽管在本文可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本文范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语"如果"可以被解释成为"在……时"或"当……时"或"响应于确定"。再者,如同在本文中所使用的,单数形式“一”、“一个”和“该”旨在也包括复数形式,除非上下文中有相反的指示。应当进一步理解,术语“包含”、“包括”表明存在所述的特征、步骤、操作、元件、组件、项目、种类、和/或组,但不排除一个或多个其他特征、步骤、操作、元件、组件、项目、种类、和/或组的存在、出现或添加。此处使用的术语“或”和“和/或”被解释为包括性的,或意味着任一个或任何组合。因此,“A、B或C”或者“A、B和/或C”意味着“以下任一个:A;B;C;A和B;A和C;B和C;A、B和C”。仅当元件、功能、步骤或操作的组合在某些方式下内在地互相排斥时,才会出现该定义的例外。It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited by these terms. These terms are only used to distinguish the same type of information from each other. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of this document. The word "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determining", depending on the context. Also, as used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context dictates otherwise. It should be further understood that the terms "comprising", "comprising" indicate the presence of stated features, steps, operations, elements, components, items, kinds, and/or groups, but do not exclude one or more other features, steps, operations, The existence, appearance or addition of elements, assemblies, items, categories, and/or groups. The terms "or" and "and/or" as used herein are to be construed to be inclusive or to mean any one or any combination. Thus, "A, B or C" or "A, B and/or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C" . Exceptions to this definition arise only when combinations of elements, functions, steps, or operations are inherently mutually exclusive in some way.

应该理解的是,虽然上述实施例中的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the steps in the flow charts in the above embodiments are sequentially displayed according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order and may be performed in other orders. Moreover, at least a part of the steps in the figure may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and the execution order is not necessarily sequential. Instead, it may be performed in turn or alternately with other steps or at least a portion of sub-steps or stages of other steps.

需要说明的是,在本文中,采用了诸如S201、S202等步骤代号,其目的是为了更清楚简要地表述相应内容,不构成顺序上的实质性限制,本领域技术人员在具体实施时,可能会先执行S202后执行S201等,但这些均应在本申请的保护范围之内。It should be noted that, in this article, step codes such as S201 and S202 are used, the purpose of which is to express the corresponding content more clearly and briefly, and does not constitute a substantial restriction on the sequence. Those skilled in the art may S202 will be executed first and then S201, etc., but these should all fall within the protection scope of this application.

应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.

在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本申请的说明,其本身没有特定的意义。因此,“模块”、“部件”或“单元”可以混合地使用。In the following description, suffixes such as 'module', 'component' or 'unit' used to represent elements are used only to facilitate the description of the present application, and have no specific meaning per se. Thus, "module", "component" or "unit" may be used interchangeably.

设备可以以各种形式来实施。例如,本申请中描述的设备可以包括诸如手机、平板电脑、笔记本电脑、掌上电脑、个人数字助理(Personal Digital Assistant,PDA)、便捷式媒体播放器(Portable Media Player,PMP)、导航装置、可穿戴设备、智能手环、计步器等移动终端,以及诸如数字TV、台式计算机等固定终端。The apparatus may be implemented in various forms. For example, the devices described in this application may include devices such as cell phones, tablets, laptops, palmtops, Personal Digital Assistants (PDAs), Portable Media Players (PMPs), navigation devices, Mobile terminals such as wearable devices, smart bracelets, and pedometers, as well as stationary terminals such as digital TVs and desktop computers.

后续描述中将以移动终端为例进行说明,本领域技术人员将理解的是,除了特别用于移动目的的元件之外,根据本申请的实施方式的构造也能够应用于固定类型的终端。In the following description, a mobile terminal will be used as an example, and those skilled in the art will understand that, in addition to elements specially used for mobile purposes, the configurations according to the embodiments of the present application can also be applied to stationary type terminals.

请参阅图1,其为实现本申请各个实施例的一种移动终端的硬件结构示意图,该移动终端100可以包括:RF(Radio Frequency,射频)单元101、WiFi模块102、音频输出单元103、A/V(音频/视频)输入单元104、传感器105、显示单元106、用户输入单元107、接口单元108、存储器109、处理器110、以及电源111等部件。本领域技术人员可以理解,图1中示出的移动终端结构并不构成对移动终端的限定,移动终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Please refer to FIG. 1 , which is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of the present application. The mobile terminal 100 may include: an RF (Radio Frequency, radio frequency) unit 101 , a WiFi module 102 , an audio output unit 103 , A /V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111 and other components. Those skilled in the art can understand that the structure of the mobile terminal shown in FIG. 1 does not constitute a limitation on the mobile terminal, and the mobile terminal may include more or less components than the one shown, or combine some components, or different components layout.

下面结合图1对移动终端的各个部件进行具体的介绍:Below in conjunction with Fig. 1, each component of the mobile terminal is introduced in detail:

射频单元101可用于收发信息或通话过程中,信号的接收和发送,具体的,将基站的下行信息接收后,给处理器110处理;另外,将上行的数据发送给基站。通常,射频单元101包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元101还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于GSM(Global System of Mobile communication,全球移动通讯系统)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA2000(CodeDivision Multiple Access 2000,码分多址2000)、WCDMA(Wideband Code DivisionMultiple Access,宽带码分多址)、TD-SCDMA(Time Division-Synchronous CodeDivision Multiple Access,时分同步码分多址)、FDD-LTE(Frequency DivisionDuplexing-Long Term Evolution,频分双工长期演进)和TDD-LTE(Time DivisionDuplexing-Long TermEvolution,分时双工长期演进)等。The radio frequency unit 101 can be used for receiving and sending signals during transmission and reception of information or during a call. Specifically, after receiving the downlink information of the base station, it is processed by the processor 110; in addition, the uplink data is sent to the base station. Generally, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, Global System for Mobile Communications), GPRS (General Packet Radio Service, General Packet Radio Service), CDMA2000 (CodeDivision Multiple Access 2000, Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access, Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, Time Division Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term) Evolution, frequency division duplexing long term evolution) and TDD-LTE (Time Division Duplexing-Long TermEvolution, time division duplexing long term evolution) and so on.

WiFi属于短距离无线传输技术,移动终端通过WiFi模块102可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图1示出了WiFi模块102,但是可以理解的是,其并不属于移动终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology, and the mobile terminal can help users to send and receive emails, browse web pages, access streaming media, etc. through the WiFi module 102, which provides users with wireless broadband Internet access. Although FIG. 1 shows the WiFi module 102, it can be understood that it is not a necessary component of the mobile terminal, and can be completely omitted as required within the scope of not changing the essence of the invention.

音频输出单元103可以在移动终端100处于呼叫信号接收模式、通话模式、记录模式、语音识别模式、广播接收模式等等模式下时,将射频单元101或WiFi模块102接收的或者在存储器109中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元103还可以提供与移动终端100执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元103可以包括扬声器、蜂鸣器等等。When the mobile terminal 100 is in a call signal receiving mode, a talking mode, a recording mode, a voice recognition mode, a broadcast receiving mode, etc., the audio output unit 103 can store the data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109. The audio data is converted into audio signal and output as sound. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (eg, call signal reception sound, message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.

A/V输入单元104用于接收音频或视频信号。A/V输入单元104可以包括图形处理器(Graphics Processing Unit,GPU)1041和麦克风1042,图形处理器1041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元106上。经图形处理器1041处理后的图像帧可以存储在存储器109(或其它存储介质)中或者经由射频单元101或WiFi模块102进行发送。麦克风1042可以在电话通话模式、记录模式、语音识别模式等等运行模式中经由麦克风1042接收声音(音频数据),并且能够将这样的声音处理为音频数据。处理后的音频(语音)数据可以在电话通话模式的情况下转换为可经由射频单元101发送到移动通信基站的格式输出。麦克风1042可以实施各种类型的噪声消除(或抑制)算法以消除(或抑制)在接收和发送音频信号的过程中产生的噪声或者干扰。The A/V input unit 104 is used to receive audio or video signals. The A/V input unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the graphics processor 1041 can respond to still pictures or images obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The image data of the video is processed. The processed image frames may be displayed on the display unit 106 . The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102 . The microphone 1042 can receive sound (audio data) via the microphone 1042 in a telephone call mode, a recording mode, a voice recognition mode, etc. operating modes, and can process such sound into audio data. The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 for output in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to remove (or suppress) noise or interference generated in the process of receiving and transmitting audio signals.

移动终端100还包括至少一种传感器105,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1061的亮度,接近传感器可在移动终端100移动到耳边时,关闭显示面板1061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can close the display panel 1061 and the display panel 1061 when the mobile terminal 100 is moved to the ear. / or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes), and can detect the magnitude and direction of gravity when it is stationary. games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, etc. Other sensors such as thermometers, infrared sensors, etc. will not be repeated here.

显示单元106用于显示由用户输入的信息或提供给用户的信息。显示单元106可包括显示面板1061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1061。The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

用户输入单元107可用于接收输入的数字或字符信息,以及产生与移动终端的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元107可包括触控面板1071以及其他输入设备1072。触控面板1071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1071上或在触控面板1071附近的操作),并根据预先设定的程式驱动相应的连接装置。触控面板1071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器110,并能接收处理器110发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1071。除了触控面板1071,用户输入单元107还可以包括其他输入设备1072。具体地,其他输入设备1072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种,具体此处不做限定。The user input unit 107 may be used to receive input numerical or character information, and generate key signal input related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072 . The touch panel 1071, also referred to as a touch screen, can collect the user's touch operations on or near it (such as the user's finger, stylus, etc., any suitable object or attachment on or near the touch panel 1071). operation), and drive the corresponding connection device according to the preset program. The touch panel 1071 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 110, and can receive the command sent by the processor 110 and execute it. In addition, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1071 , the user input unit 107 may also include other input devices 1072 . Specifically, other input devices 1072 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, etc., which are not specifically limited here. .

进一步的,触控面板1071可覆盖显示面板1061,当触控面板1071检测到在其上或附近的触摸操作后,传送给处理器110以确定触摸事件的类型,随后处理器110根据触摸事件的类型在显示面板1061上提供相应的视觉输出。虽然在图1中,触控面板1071与显示面板1061是作为两个独立的部件来实现移动终端的输入和输出功能,但是在某些实施例中,可以将触控面板1071与显示面板1061集成而实现移动终端的输入和输出功能,具体此处不做限定。Further, the touch panel 1071 can cover the display panel 1061, and when the touch panel 1071 detects a touch operation on or near it, it transmits it to the processor 110 to determine the type of the touch event, and then the processor 110 determines the type of the touch event according to the touch event. Type provides corresponding visual output on display panel 1061 . Although in FIG. 1 , the touch panel 1071 and the display panel 1061 are used as two independent components to realize the input and output functions of the mobile terminal, but in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated The input and output functions of the mobile terminal are implemented, which is not specifically limited here.

接口单元108用作至少一个外部装置与移动终端100连接可以通过的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元108可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端100内的一个或多个元件或者可以用于在移动终端100和外部装置之间传输数据。The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100 . For example, external devices may include wired or wireless headset ports, external power (or battery charger) ports, wired or wireless data ports, memory card ports, ports for connecting devices with identification modules, audio input/output (I/O) ports, video I/O ports, headphone ports, and more. The interface unit 108 may be used to receive input (eg, data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used between the mobile terminal 100 and the external Transfer data between devices.

存储器109可用于存储软件程序以及各种数据。存储器109可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器109可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, etc.; Data created by the use of the mobile phone (such as audio data, phone book, etc.), etc. Additionally, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

处理器110是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器109内的软件程序和/或模块,以及调用存储在存储器109内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。处理器110可包括一个或多个处理单元;优选的,处理器110可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。The processor 110 is the control center of the mobile terminal, uses various interfaces and lines to connect various parts of the entire mobile terminal, runs or executes the software programs and/or modules stored in the memory 109, and calls the data stored in the memory 109. , perform various functions of the mobile terminal and process data, so as to monitor the mobile terminal as a whole. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem The processor mainly handles wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 110 .

移动终端100还可以包括给各个部件供电的电源111(比如电池),优选的,电源111可以通过电源管理系统与处理器110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system and other functions.

尽管图1未示出,移动终端100还可以包括蓝牙模块等,在此不再赘述。Although not shown in FIG. 1 , the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described herein again.

为了便于理解本申请实施例,下面对本申请的移动终端所基于的通信网络系统进行描述。To facilitate understanding of the embodiments of the present application, a communication network system on which the mobile terminal of the present application is based is described below.

请参阅图2,图2为本申请实施例提供的一种通信网络系统架构图,该通信网络系统为通用移动通信技术的LTE系统,该LTE系统包括依次通讯连接的UE(User Equipment,用户设备)201,E-UTRAN(Evolved UMTSTerrestrial Radio Access Network,演进式UMTS陆地无线接入网)202,EPC(Evolved Packet Core,演进式分组核心网)203和运营商的IP业务204。Please refer to FIG. 2. FIG. 2 is an architecture diagram of a communication network system provided by an embodiment of the application. The communication network system is an LTE system of universal mobile communication technology. ) 201 , E-UTRAN (Evolved UMTSTerrestrial Radio Access Network, Evolved UMTS Terrestrial Radio Access Network) 202 , EPC (Evolved Packet Core, Evolved Packet Core) 203 and operator's IP service 204 .

具体地,UE201可以是上述终端100,此处不再赘述。Specifically, the UE 201 may be the above-mentioned terminal 100, which will not be repeated here.

E-UTRAN202包括eNodeB2021和其它eNodeB2022等。其中,eNodeB2021可以通过回程(backhaul)(例如X2接口)与其它eNodeB2022连接,eNodeB2021连接到EPC203,eNodeB2021可以提供UE201到EPC203的接入。E-UTRAN 202 includes eNodeB 2021 and other eNodeB 2022 and the like. The eNodeB 2021 may be connected to other eNodeBs 2022 through a backhaul (eg, X2 interface), the eNodeB 2021 is connected to the EPC 203 , and the eNodeB 2021 may provide access from the UE 201 to the EPC 203 .

EPC203可以包括MME(Mobility Management Entity,移动性管理实体)2031,HSS(Home Subscriber Server,归属用户服务器)2032,其它MME2033,SGW(Serving Gate Way,服务网关)2034,PGW(PDN Gate Way,分组数据网络网关)2035和PCRF(Policy andCharging Rules Function,政策和资费功能实体)2036等。其中,MME2031是处理UE201和EPC203之间信令的控制节点,提供承载和连接管理。HSS2032用于提供一些寄存器来管理诸如归属位置寄存器(图中未示)之类的功能,并且保存有一些有关服务特征、数据速率等用户专用的信息。所有用户数据都可以通过SGW2034进行发送,PGW2035可以提供UE 201的IP地址分配以及其它功能,PCRF2036是业务数据流和IP承载资源的策略与计费控制策略决策点,它为策略与计费执行功能单元(图中未示)选择及提供可用的策略和计费控制决策。EPC 203 may include MME (Mobility Management Entity, Mobility Management Entity) 2031, HSS (Home Subscriber Server, Home Subscriber Server) 2032, other MME 2033, SGW (Serving Gate Way, Serving Gateway) 2034, PGW (PDN Gate Way, packet data) network gateway) 2035 and PCRF (Policy and Charging Rules Function, policy and charging function entity) 2036 and so on. Among them, MME2031 is a control node that processes signaling between UE201 and EPC203, and provides bearer and connection management. The HSS2032 is used to provide some registers to manage functions such as the home location register (not shown in the figure), and to store some user-specific information about service characteristics, data rates, etc. All user data can be sent through SGW2034, PGW2035 can provide IP address allocation and other functions of UE 201, PCRF2036 is the policy and charging control policy decision point of service data flow and IP bearer resources, it is the policy and charging execution function A unit (not shown) selects and provides available policy and charging control decisions.

IP业务204可以包括因特网、内联网、IMS(IP Multimedia Subsystem,IP多媒体子系统)或其它IP业务等。The IP service 204 may include Internet, intranet, IMS (IP Multimedia Subsystem, IP Multimedia Subsystem) or other IP services.

虽然上述以LTE系统为例进行了介绍,但本领域技术人员应当知晓,本申请不仅仅适用于LTE系统,也可以适用于其他无线通信系统,例如GSM、CDMA2000、WCDMA、TD-SCDMA以及未来新的网络系统等,此处不做限定。Although the above takes the LTE system as an example, those skilled in the art should know that this application is not only applicable to the LTE system, but also applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA and future new The network system, etc., is not limited here.

基于上述移动终端硬件结构以及通信网络系统,提出本申请各个实施例。Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the present application are proposed.

本申请实施例提供的安全支付方法应用于移动支付场景中。示例的,如图3中所示,用户手持终端设备10向接收方付款,接收方通过扫描设备20扫描用户终端设备10上的付款码来完成支付。用户终端设备10可以为手机、可穿戴智能设备、平板电脑等;扫描设备20可以为扫码器、扫描枪、智能收银设备、车载终端等,本申请对此不作限定。The secure payment method provided by the embodiment of the present application is applied in a mobile payment scenario. Exemplarily, as shown in FIG. 3 , the user holds the terminal device 10 to pay the recipient, and the recipient completes the payment by scanning the payment code on the user terminal device 10 with the scanning device 20 . The user terminal device 10 may be a mobile phone, a wearable smart device, a tablet computer, etc.; the scanning device 20 may be a code scanner, a scanner gun, an intelligent cash register device, a vehicle-mounted terminal, etc., which are not limited in this application.

用户使用终端设备进行付款时,通常的流程是用户在终端设备上直接打开自己的付款码界面,收款方使用扫描设备扫描用户的付款码即可直接进行扣款。而在实际使用时,用户常常会提前打开付款码界面等待商家扫描,例如,用户可能在排队等待时就提前打开了付款码,这样就可能导致用户付款码被不法分子扫描扣款或被复制后使用,使用户财产受到损失。When a user makes a payment using a terminal device, the usual process is that the user directly opens his own payment code interface on the terminal device, and the payee scans the user's payment code with a scanning device to directly deduct the payment. In actual use, the user often opens the payment code interface in advance and waits for the merchant to scan it. For example, the user may open the payment code in advance while waiting in line, which may cause the user's payment code to be scanned and deducted by criminals or copied. use, causing damage to the user's property.

为了提高付款码安全性,相关技术中提出,终端设备在出示付款码之前输出验证界面,在验证界面接收到用户输出的验证信息后与预存信息进行匹配,匹配成功后才出示付款码。或者,终端设备在付款码被扫描后,输出验证界面,在验证界面接收到用户输出的验证信息后与预存信息进行匹配,匹配成功后才触发扣款。上述两种方案,均是通过增加验证过程,在一定程度上提高了付款码的安全性。然而,这种方案增加了用户的操作流程,使得支付过程变得复杂,耗时较长,不便于在人流量大的场所使用。In order to improve the security of the payment code, it is proposed in the related art that the terminal device outputs a verification interface before showing the payment code, and matches the pre-stored information after receiving the verification information output by the user on the verification interface, and displays the payment code only after the matching is successful. Alternatively, after the payment code is scanned, the terminal device outputs a verification interface, receives the verification information output by the user on the verification interface and matches the pre-stored information, and triggers the deduction only after the matching is successful. The above two schemes both improve the security of the payment code to a certain extent by increasing the verification process. However, this solution increases the user's operation process, complicates the payment process, takes a long time, and is inconvenient to use in places with large traffic.

为了解决上述问题,本申请提出一种安全支付方法,用户使用终端设备进行付款时,为了保证付款扫描操作是在用户可知的情况下进行的,当用户设备与扫描设备之间的距离小于预设值时显示付款码,保证了付款操作安全可控。In order to solve the above problems, the present application proposes a secure payment method. When a user makes a payment using a terminal device, in order to ensure that the payment scanning operation is performed under the condition that the user is aware of it, when the distance between the user device and the scanning device is less than a preset value The payment code is displayed at the time of value, which ensures the safe and controllable payment operation.

下面以具体地实施例对本申请实施例的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本申请实施例的实施例进行描述。The technical solutions of the embodiments of the present application and how the technical solutions of the present application solve the above-mentioned technical problems will be described in detail below with specific examples. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the embodiments of the present application will be described below with reference to the accompanying drawings.

图4为本申请提供的一种安全支付方法的流程示意图一。该方法的执行主体为终端设备。如图4所示,该方法包括:FIG. 4 is a schematic flow chart 1 of a secure payment method provided by the present application. The execution body of the method is a terminal device. As shown in Figure 4, the method includes:

S201、接收付款码显示请求,并生成原始付款码。S201. Receive a payment code display request, and generate an original payment code.

本实施例中的付款码显示请求可以是由用户操作触发的,示例的,如图5中所示,用户在终端设备的应用程序的操作界面,点击付款控件触发付款码显示请求。The payment code display request in this embodiment may be triggered by user operation. For example, as shown in FIG. 5 , the user clicks the payment control on the operation interface of the application program of the terminal device to trigger the payment code display request.

需要说明的是,本步骤中终端设备接收付款码显示请求后,生成原始付款码,但此时终端设备暂不显示该原始付款码。It should be noted that in this step, after receiving the payment code display request, the terminal device generates an original payment code, but at this time, the terminal device does not display the original payment code for the time being.

本申请实施例中的付款码可以为条形码、二维码或其他未来可能使用的编码方式的付款码,本申请对此不作限定。The payment code in this embodiment of the application may be a barcode, a two-dimensional code, or a payment code in other encoding methods that may be used in the future, which is not limited in this application.

S202、在检测到终端设备被扫描时,若扫描设备与终端设备之间的距离小于或等于第一预设值,则显示原始付款码。S202. When it is detected that the terminal device is scanned, if the distance between the scanning device and the terminal device is less than or equal to a first preset value, display the original payment code.

终端设备可以通过传感器和/或摄像头检测是否被扫描,示例的,终端设备通过光线感应器接收到扫描设备的扫描光信号,则确定终端设备被扫描。在检测到被扫描时,终端设备进一步根据扫描设备与终端设备之间的距离来确定是否显示原始付款码。The terminal device may detect whether it is scanned through a sensor and/or a camera. For example, if the terminal device receives a scanning light signal of the scanning device through a light sensor, it is determined that the terminal device is scanned. Upon detection of being scanned, the terminal device further determines whether to display the original payment code according to the distance between the scanning device and the terminal device.

终端设备被扫描时,若扫描设备与终端设备之间的距离小于或等于第一预设值时,则显示原始付款码;和/或,若扫描设备与终端设备之间的距离大于第一预设值,则输出提示信息,以提示用户付款码被非法扫描。When the terminal device is scanned, if the distance between the scanning device and the terminal device is less than or equal to the first preset value, the original payment code is displayed; and/or, if the distance between the scanning device and the terminal device is greater than the first preset value. If the value is set, a prompt message will be output to remind the user that the payment code is illegally scanned.

可选地,在显示原始付款码之前,还包括:进行用户鉴权,具体可通过用户指纹、或人脸、或虹膜、或语音、或密码(如图形或文字等)等进行鉴别,若通过才显示原始付款码;和/或,若不通过,则不显示原始付款码和/或输出提示信息。通过这种方式,可以进一步提高安全性。Optionally, before displaying the original payment code, it also includes: performing user authentication, which can be specifically identified by user fingerprints, or face, or iris, or voice, or password (such as graphics or text, etc.), etc. display the original payment code; and/or, if not approved, do not display the original payment code and/or output a prompt message. In this way, security can be further improved.

第一预设值的大小可以根据实际需要进行设置,示例的,第一预设值为10cm、20cm等。通常情况下,用户使用付款码付款时,会手持终端设备并将其移动至靠近扫描设备的位置进行扫码,因此,第一预设值的设置是为了保证扫描设备与终端设备的距离较小时,即在用户将终端设备移动至靠近扫描设备的情况下才显示付款码,从而保证扫描付款码的操作是用户可见可知的,进而提高了支付安全性。The size of the first preset value can be set according to actual needs. For example, the first preset value is 10 cm, 20 cm, and the like. Usually, when a user pays with a payment code, he will hold the terminal device and move it to a position close to the scanning device to scan the code. Therefore, the first preset value is set to ensure that the distance between the scanning device and the terminal device is small when the distance between the scanning device and the terminal device is small. , that is, the payment code is displayed only when the user moves the terminal device close to the scanning device, thereby ensuring that the operation of scanning the payment code is visible to the user, thereby improving payment security.

相反,若终端设备被扫描时,扫描设备与终端设备之间的距离大于第一预设值,则表示用户并未将终端设备移动至靠近扫描设备的位置,从而该扫描操作可能是其他人员从远处恶意扫描用户的终端设备,因此,这种情况下,终端设备并不显示原始付款码,并且终端设备可以通过输出提示信息来提示用户。提示信息可以为文字信息、语音信息和灯光信息中的至少一种。示例的,如图5所示,终端设备的用户界面上显示“检测到非法扫描,请确认”,或者通过扬声器播放语音“检测到非法扫描,请确认”,又或者,通过屏幕闪烁、闪光灯闪烁、呼吸灯闪烁等方式进行提示。On the contrary, if the distance between the scanning device and the terminal device is greater than the first preset value when the terminal device is scanned, it means that the user did not move the terminal device to a position close to the scanning device, so the scanning operation may be caused by other personnel from The terminal device of the user is maliciously scanned from a distance. Therefore, in this case, the terminal device does not display the original payment code, and the terminal device can prompt the user by outputting prompt information. The prompt information may be at least one of text information, voice information and light information. For example, as shown in Figure 5, the user interface of the terminal device displays "Illegal scan detected, please confirm", or the speaker plays a voice "Illegal scan detected, please confirm", or the screen flashes and the flashlight flashes. , the breathing light flashes, etc.

本实施例提供的安全支付方法,在接收到付款码显示请求后,仅生成原始付款码但并不直接显示,在检测到终端设备被扫描,且扫描设备与终端设备之间的距离小于或等于第一预设值,才显示原始付款码,从而保证了付款码是在用户将终端设备靠近扫描设备的情况下显示,避免了由于提前显示付款码而导致付款码被恶意扫描或被复制,提高了支付安全性。并且该安全支付方法不会增加用户的操作复杂度,用户体验较好。In the secure payment method provided by this embodiment, after receiving the payment code display request, only the original payment code is generated but not displayed directly, when it is detected that the terminal device is scanned, and the distance between the scanning device and the terminal device is less than or equal to The original payment code is displayed only after the first preset value, which ensures that the payment code is displayed when the user puts the terminal device close to the scanning device, and avoids malicious scanning or copying of the payment code due to the payment code being displayed in advance. payment security. In addition, the secure payment method does not increase the operational complexity of the user, and the user experience is better.

在上述实施例的基础上,本申请还提供一种安全支付方法,在保证安全支付的基础上,进一步提高用户体验。图6为本申请提供的一种安全支付方法的流程示意图二。如图6所示,该方法包括:On the basis of the above embodiments, the present application also provides a secure payment method, which further improves user experience on the basis of ensuring secure payment. FIG. 6 is a second schematic flowchart of a secure payment method provided by the present application. As shown in Figure 6, the method includes:

S401、接收付款码显示请求,并生成原始付款码。S401. Receive a payment code display request, and generate an original payment code.

本步骤与上述实施例中的S201类似,此处不再赘述。This step is similar to S201 in the foregoing embodiment, and will not be repeated here.

S402、对原始付款码的图像进行处理后得到安全付款码,并显示安全付款码。S402. After processing the image of the original payment code, a security payment code is obtained, and the security payment code is displayed.

可选地,安全付款码为无法被正确识别的付款码或图案。Optionally, the secure payment code is a payment code or pattern that cannot be correctly identified.

由于在上个步骤中,用户触发付款码显示请求后,终端设备生成原始付款码,但是出于提高安全性的目的,终端设备在生成原始付款码后并不直接显示原始付款码,因此,对于用户来说,用户触发付款码显示请求后,并不能立刻看到付款码显示在终端设备的用户界面上,用户体验可能较差。In the previous step, after the user triggers the payment code display request, the terminal device generates the original payment code, but for the purpose of improving security, the terminal device does not directly display the original payment code after generating the original payment code. Therefore, for For the user, after the user triggers the payment code display request, the user cannot immediately see the payment code displayed on the user interface of the terminal device, and the user experience may be poor.

因此,本步骤中,在生成原始付款码后,终端设备对原始付款码的图像进行处理后得到一个无法被正确识别的安全付款码,并显示该安全付款码。从而从用户体验的角度,用户触发付款码显示请求后,可以看到终端设备上显示了付款码,且用户可以知道该付款码是出于安全需求而显示的安全付款码,用户体验较好。Therefore, in this step, after generating the original payment code, the terminal device processes the image of the original payment code to obtain a secure payment code that cannot be correctly identified, and displays the secure payment code. Therefore, from the perspective of user experience, after the user triggers the payment code display request, the user can see the payment code displayed on the terminal device, and the user can know that the payment code is a security payment code displayed for security requirements, and the user experience is better.

终端设备可以采用一种或多种方式对原始付款码的图像进行处理,以得到无法被正确识别的安全付款码。The terminal device can process the image of the original payment code in one or more ways to obtain a secure payment code that cannot be correctly identified.

例如,在一种方式中,终端设备对原始付款码的全部或部分图像进行虚化图像处理得到清晰度低于原始付款码的安全付款码。在另一种方式中,终端设备对原始付款码的图像进行加密处理,得到安全付款码,例如,采用特定的加密编码方式生成加密后的二维码图形作为安全付款码。在再一种方式中,终端设备对原始付款码的全部或部分图像进行遮盖处理,得到安全付款码。在又一种方式中,终端设备对原始付款码的全部或部分图像进行图像拉伸变形处理,得到安全付款码。For example, in one manner, the terminal device performs blurred image processing on all or part of the image of the original payment code to obtain a secure payment code with a lower definition than the original payment code. In another method, the terminal device encrypts the image of the original payment code to obtain the secure payment code. For example, a specific encryption encoding method is used to generate an encrypted two-dimensional code image as the secure payment code. In another way, the terminal device covers all or part of the original payment code to obtain the secure payment code. In yet another method, the terminal device performs image stretching and deformation processing on all or part of the original payment code to obtain the secure payment code.

可以理解的是,终端设备在对原始付款码进行处理时,可以同时采用上述方式中的一种或多种。示例的终端设备可以先对原始付款码进行虚化处理,再进一步进行遮盖处理,以得到安全付款码,本实施例对此不作限定。同时需要说明的是,上述几种方式仅为示例说明,本申请实施例对生成安全付款码的方式不作限定,只要通过原始付款码得到的安全付款码无法被正确识别即可。It can be understood that, when the terminal device processes the original payment code, one or more of the above methods can be used at the same time. The exemplary terminal device may first perform blurring processing on the original payment code, and then further perform masking processing to obtain a secure payment code, which is not limited in this embodiment. At the same time, it should be noted that the above several methods are only illustrative, and the embodiments of the present application do not limit the method of generating the secure payment code, as long as the secure payment code obtained through the original payment code cannot be correctly identified.

可选的,终端设备显示安全付款码时,还可以在终端设备上显示信息以提示用户当前显示的是安全付款码。示例的,如图7中所示,终端设备显示虚化的安全付款码,并显示信息“当前显示的是安全付款码,将终端设备靠近扫描设备后将自动切换为原始付款码”,从而在用户触发付款码显示请求并看到安全付款码后,用户可以知道直接将安全付款码靠近扫描设备。Optionally, when the terminal device displays the security payment code, information may also be displayed on the terminal device to prompt the user that the security payment code is currently displayed. For example, as shown in Figure 7, the terminal device displays the virtualized security payment code, and displays the message "The security payment code is currently displayed, and the terminal device will be automatically switched to the original payment code after the terminal device is brought close to the scanning device." After the user triggers the payment code display request and sees the security payment code, the user can know to directly place the security payment code close to the scanning device.

S403、在检测到终端设备被扫描时,若扫描设备与终端设备之间的距离小于或等于第一预设值,则将安全付款码切换为原始付款码。S403. When it is detected that the terminal device is scanned, if the distance between the scanning device and the terminal device is less than or equal to the first preset value, switch the secure payment code to the original payment code.

与S202中类似的,终端设备在检测到被扫描时,若扫描设备与终端设备之间的距离小于或等于第一预设值,则表示用户将终端设备移动至靠近扫描设备,从而保证扫描操作是用户可见可知的,此时将安全付款码切换为原始付款码以便进行支付,示例的如图8中所示。Similar to S202, when the terminal device detects being scanned, if the distance between the scanning device and the terminal device is less than or equal to the first preset value, it means that the user moves the terminal device close to the scanning device, thereby ensuring the scanning operation. It is visible to the user, and at this time, the secure payment code is switched to the original payment code for payment, as shown in Figure 8 for an example.

相反,若终端设备被扫描时,扫描设备与终端设备之间的距离大于第一预设值,则表示用户并未将终端设备移动至靠近扫描设备的位置,从而该扫描操作可能是其他人员从远处恶意扫描用户的终端设备,因此,这种情况下,终端设备仍然显示的是安全付款码,由于安全付款码不能被正确识别,从而提高了支付安全性。On the contrary, if the distance between the scanning device and the terminal device is greater than the first preset value when the terminal device is scanned, it means that the user did not move the terminal device to a position close to the scanning device, so the scanning operation may be caused by other personnel from The terminal device of the user is maliciously scanned from a distance. Therefore, in this case, the terminal device still displays the security payment code. Since the security payment code cannot be correctly identified, payment security is improved.

可选地,在显示原始付款码之前,还包括:进行用户鉴权,具体可通过用户指纹、或人脸、或虹膜、或语音、或密码(如图形或文字等)等进行鉴别,若通过才显示原始付款码;和/或,若不通过,则不显示原始付款码和/或输出提示信息。通过这种方式,可以进一步提高安全性。Optionally, before displaying the original payment code, it also includes: performing user authentication, which can be specifically identified by user fingerprints, or face, or iris, or voice, or password (such as graphics or text, etc.), etc. display the original payment code; and/or, if not approved, do not display the original payment code and/or output a prompt message. In this way, security can be further improved.

本实施例中,终端设备在接收到付款码显示请求后,生成原始付款码,并将其转化为安全付款码进行显示,在检测到终端设备被扫描时,且扫描设备与终端设备之间的距离小于或等于第一预设值时,将安全付款码切换为原始付款码,不仅保证了支付安全性,并且该安全支付方法不会增加用户的操作复杂度,还可通过显示安全付款码对用户进行提示,提高了用户体验。In this embodiment, after receiving the payment code display request, the terminal device generates the original payment code and converts it into a secure payment code for display. When the distance is less than or equal to the first preset value, switching the security payment code to the original payment code not only ensures the security of payment, but also the security payment method will not increase the operational complexity of the user, and can also display the security payment code pair. The user is prompted to improve the user experience.

为了使用户可以选择使用或者不使用上述实施例中的显示安全付款码的付款方式,终端设备可以提供付款码安全保护模式的开关供用户选择,若用户选择开启付款码安全保护模式,则终端设备在显示付款码时按照图6所示实施例的方法显示安全付款码。若用户关闭付款码安全保护模式,则不显示安全付款码。In order to enable the user to choose to use or not to use the payment method of displaying the security payment code in the above embodiment, the terminal device can provide a switch for the payment code security protection mode for the user to choose. If the user chooses to turn on the payment code security protection mode, the terminal device When displaying the payment code, the secure payment code is displayed according to the method of the embodiment shown in FIG. 6 . If the user turns off the payment code security protection mode, the security payment code will not be displayed.

在图4和图6所示实施例的基础上,对终端设备如何检测到被扫描,以及如何确定扫描设备与终端设备之间的距离进行说明。Based on the embodiments shown in FIG. 4 and FIG. 6 , how the terminal device detects being scanned and how to determine the distance between the scanning device and the terminal device is described.

在一种可行的实现方式中,若终端设备接收到的光信号的强度变化大于或等于第二预设值,则确定终端设备接收到扫描设备的扫描光信号,从而确定终端设备被扫描。In a feasible implementation manner, if the intensity change of the optical signal received by the terminal device is greater than or equal to the second preset value, it is determined that the terminal device has received the scanning optical signal of the scanning device, thereby determining that the terminal device is scanned.

终端设备的使用环境中通常会存在较为固定的光信号,例如,终端设备在室内使用时,室内照明灯处于打开状态,终端设备会持续接收到照明灯的光信号,或者,终端设备在室外使用时,终端设备会持续接收到太阳光信号。扫描设备扫描终端设备时,扫描设备同样会发出扫描光信号,从而,终端设备在被扫描时所接收到的光信号的强度会产生突然的变化。There are usually relatively fixed optical signals in the use environment of the terminal device. For example, when the terminal device is used indoors, the indoor lighting is turned on, and the terminal device will continue to receive the optical signal of the lighting lamp, or the terminal device is used outdoors. , the terminal device will continue to receive sunlight signals. When the scanning device scans the terminal device, the scanning device also sends out a scanning optical signal, so that the intensity of the optical signal received by the terminal device when being scanned will change suddenly.

终端设备可以通过传感器确定接收到的光信号的强度变化,同时,为了将终端设备接收到的光信号的强度变化与正常环境中光线的微小波动区分开来,本申请中设置第二预设值,当终端设备接收到的光信号的强度变化大于或等于第二预设值,则确定终端设备接收到扫描设备的扫描光信号。第二预设值的大小可以根据实际情况设置,例如可以根据扫描设备的扫描光信号的强度来设置第二预设值。The terminal device can determine the intensity change of the received optical signal through the sensor. At the same time, in order to distinguish the intensity change of the optical signal received by the terminal device from the slight fluctuation of light in the normal environment, a second preset value is set in this application. , when the intensity change of the optical signal received by the terminal device is greater than or equal to the second preset value, it is determined that the terminal device has received the scanning optical signal of the scanning device. The size of the second preset value can be set according to the actual situation, for example, the second preset value can be set according to the intensity of the scanning light signal of the scanning device.

上述方法中,通过对终端设备接收到的光信号的强度变化进行检测,确定终端设备是否被扫描,从而才能够在终端设备被扫描的基础上,进一步根据扫描设备与终端设备之间的距离来确定是否显示原始付款码,提高了支付的安全性。以下在对终端设备如何确定扫描设备与终端设备之间的距离进行说明。In the above method, by detecting the intensity change of the optical signal received by the terminal device, it is determined whether the terminal device is scanned, so that on the basis of the terminal device being scanned, the distance between the scanning device and the terminal device can be further determined. Determines whether to display the original payment code, which improves the security of payment. The following describes how the terminal device determines the distance between the scanning device and the terminal device.

在一种可行的实现方式中,终端设备确定与终端设备距离最近的障碍物;并将距离最近的障碍物与终端设备之间的距离确定为扫描设备与终端设备之间的距离。In a feasible implementation manner, the terminal device determines the nearest obstacle to the terminal device; and determines the distance between the nearest obstacle and the terminal device as the distance between the scanning device and the terminal device.

在这种实现方式中,终端设备通过传感器来确定扫描设备与终端设备之间的距离。示例的,传感器可以是超声波测距传感器、红外测距传感器、激光测距传感器等,本申请对传感器类型不作具体限定。In this implementation manner, the terminal device determines the distance between the scanning device and the terminal device through the sensor. By way of example, the sensor may be an ultrasonic ranging sensor, an infrared ranging sensor, a laser ranging sensor, etc., and the type of the sensor is not specifically limited in this application.

由于在实际场景中,用户将终端设备移动至靠近扫描设备的位置时,终端设备与扫描设备之间基本不会存在其他遮挡物,因此,终端设备可以将检测到的距离最近的障碍物确定为扫描设备,从而将距离最近的障碍物与终端设备之间的距离确定为扫描设备与终端设备之间的距离。In the actual scene, when the user moves the terminal device to a position close to the scanning device, there are basically no other obstructions between the terminal device and the scanning device. Therefore, the terminal device can determine the detected obstacle with the closest distance as Scan the device to determine the distance between the nearest obstacle and the terminal device as the distance between the scanning device and the terminal device.

在另一种可行的实现方式中,终端设备拍摄扫描光信号方向的图像,并根据扫描光信号方向的图像确定扫描设备与终端设备之间的距离。In another feasible implementation manner, the terminal device captures an image in the direction of the scanning optical signal, and determines the distance between the scanning device and the terminal device according to the image in the direction of the scanning optical signal.

在这种实现方式中,终端设备在检测到扫描设备的扫描光信号确定被扫描时,通过摄像头拍摄扫描光信号方向的图像,从而该图像中必然包括了扫描设备,终端设备对拍摄到的图像进行识别,确定扫描设备与终端设备之间的距离。终端设备通过摄像头拍摄的图像进行测距的具体实现方式可以与现有技术中的单目摄像头测距或双目摄像头测距等方法相同。In this implementation, when the terminal device detects that the scanning optical signal of the scanning device is determined to be scanned, the terminal device captures an image in the direction of the scanning optical signal through the camera, so that the image must include the scanning device, and the terminal device has no effect on the captured image. Identify and determine the distance between the scanning device and the terminal device. The specific implementation of the ranging by the terminal device using the image captured by the camera may be the same as the method of ranging from a monocular camera or a binocular camera in the prior art.

上述方法中,通过对终端设备接收到的光信号的强度变化进行检测,确定终端设备被扫描后,采用传感器或摄像头拍摄的图像确定扫描设备与终端设备之间的距离,从而确定是否显示原始付款码,提高了支付的安全性。In the above method, by detecting the intensity change of the optical signal received by the terminal device, it is determined that after the terminal device is scanned, the image captured by the sensor or camera is used to determine the distance between the scanning device and the terminal device, so as to determine whether to display the original payment. code, which improves the security of payment.

图9为本申请提供的一种安全支付装置的结构示意图。如图9所示,安全支付装置70包括:FIG. 9 is a schematic structural diagram of a secure payment device provided by the present application. As shown in Figure 9, the secure payment device 70 includes:

生成模块701,用于接收付款码显示请求,并生成原始付款码;A generating module 701, configured to receive a payment code display request, and generate an original payment code;

显示模块702,用于在检测到终端设备被扫描时,若扫描设备与终端设备之间的距离小于或等于第一预设值,则显示原始付款码。The display module 702 is configured to display the original payment code if the distance between the scanning device and the terminal device is less than or equal to the first preset value when it is detected that the terminal device is scanned.

在一种可行的实现方式中,安全支付装置70还包括:In a feasible implementation manner, the secure payment device 70 further includes:

安全处理模块703,用于对原始付款码的图像进行处理后得到安全付款码,可选地,安全付款码为无法被正确识别的付款码或图案;The security processing module 703 is used to obtain the security payment code after processing the image of the original payment code. Optionally, the security payment code is a payment code or pattern that cannot be correctly identified;

显示模块702还用于,显示安全付款码;The display module 702 is further configured to display the security payment code;

显示模块702还用于,将安全付款码切换为原始付款码。The display module 702 is further configured to switch the secure payment code to the original payment code.

在一种可行的实现方式中,显示模块702用于,在终端设备接收到扫描设备的扫描光信号,确定终端设备被扫描,以及,确定扫描设备与终端设备之间的距离。In a feasible implementation manner, the display module 702 is configured to, when the terminal device receives the scanning light signal of the scanning device, determine that the terminal device is scanned, and determine the distance between the scanning device and the terminal device.

在一种可行的实现方式中,显示模块702用于,在终端设备接收到的光信号的强度变化大于或等于第二预设值,确定终端设备接收到扫描设备的扫描光信号。In a feasible implementation manner, the display module 702 is configured to determine that the terminal device receives the scanning optical signal of the scanning device when the intensity change of the optical signal received by the terminal device is greater than or equal to the second preset value.

在一种可行的实现方式中,显示模块702用于:In a feasible implementation manner, the display module 702 is used for:

确定与终端设备距离最近的障碍物;Determine the closest obstacle to the terminal equipment;

将距离最近的障碍物与终端设备之间的距离确定为扫描设备与终端设备之间的距离。The distance between the nearest obstacle and the terminal device is determined as the distance between the scanning device and the terminal device.

在一种可行的实现方式中,显示模块702用于:In a feasible implementation manner, the display module 702 is used for:

拍摄扫描光信号方向的图像;Take an image of the direction of the scanning light signal;

根据扫描光信号方向的图像确定扫描设备与终端设备之间的距离。The distance between the scanning device and the terminal device is determined according to the image of the scanning light signal direction.

在一种可行的实现方式中,安全处理模块703还用于:In a feasible implementation manner, the security processing module 703 is further configured to:

确定终端设备的付款码安全保护模式已开启。Make sure that the payment code security protection mode of the terminal device is turned on.

在一种可行的实现方式中,显示模块702用于:In a feasible implementation manner, the display module 702 is used for:

若距离大于第一预设值,则输出提示信息,提示信息用于提示用户付款码被非法扫描。If the distance is greater than the first preset value, prompt information is output, and the prompt information is used to prompt the user that the payment code is illegally scanned.

在一种可行的实现方式中,提示信息为文字信息、语音信息和灯光信息中的至少一种。In a feasible implementation manner, the prompt information is at least one of text information, voice information and lighting information.

在一种可行的实现方式中,安全处理模块703用于:In a feasible implementation manner, the security processing module 703 is used for:

对原始付款码的全部或部分图像进行虚化图像处理得到清晰度低于原始付款码的安全付款码图像;Perform virtual image processing on all or part of the original payment code to obtain a secure payment code image with a lower definition than the original payment code;

对原始付款码的图像进行加密处理,得到为安全付款码;Encrypt the image of the original payment code to obtain a secure payment code;

对原始付款码的全部或部分图像进行遮盖处理,得到安全付款码;Cover all or part of the original payment code to obtain a secure payment code;

对原始付款码的全部或部分图像进行图像拉伸变形处理,得到安全付款码。Perform image stretching and deformation processing on all or part of the original payment code to obtain a secure payment code.

在一种可行的实现方式中,付款码为条形码或二维码。In a feasible implementation manner, the payment code is a barcode or a two-dimensional code.

本实施例的装置,可以用于执行上述任一方法实施例的安全支付方法,其实现原理和技术效果类似,此处不再赘述。The device of this embodiment can be used to execute the secure payment method of any of the above method embodiments, and the implementation principle and technical effect thereof are similar, which will not be repeated here.

图10为本申请提供的一种终端设备的结构示意图。如图10所示,终端设备80包括:存储器801、处理器802及存储在存储器801上并可在处理器802上运行的计算机程序,计算机程序被处理器802执行时实现如上任一实施例的方法的步骤。存储器801和处理器802可以通过总线803连接。FIG. 10 is a schematic structural diagram of a terminal device provided by this application. As shown in FIG. 10 , the terminal device 80 includes: a memory 801 , a processor 802 and a computer program stored in the memory 801 and running on the processor 802 . When the computer program is executed by the processor 802 , any of the above embodiments can be implemented. steps of the method. The memory 801 and the processor 802 may be connected by a bus 803 .

本申请还提供一种设备,该设备包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,该计算机程序被处理器执行时实现如上的方法的步骤。The present application also provides a device comprising: a memory, a processor and a computer program stored in the memory and executable on the processor, the computer program implementing the steps of the above method when executed by the processor.

本申请还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上任一实施例的方法的步骤。The present application also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method in any of the above embodiments are implemented.

本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行如上各种可能的实施方式中的方法。The embodiments of the present application also provide a computer program product, the computer program product includes computer program code, when the computer program code is executed on a computer, the computer program code causes the computer to execute the above methods in various possible implementation manners.

本申请实施例还提供一种芯片,包括存储器和处理器,该存储器用于存储计算机程序,该处理器用于从存储器中调用并运行计算机程序,使得安装有该芯片的设备执行如上各种可能的实施方式中的方法。An embodiment of the present application also provides a chip, including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device installed with the chip can perform various possible operations as described above. method in an embodiment.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请的实施例旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求书指出。Other embodiments of the present application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. The examples of this application are intended to cover any variations, uses or adaptations of this application that follow the general principles of this application and include common knowledge or common knowledge in the technical field not disclosed in this application. conventional technical means. The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the application being indicated by the following claims.

应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求书来限制。It is to be understood that the present application is not limited to the precise structures described above and shown in the accompanying drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of this application is limited only by the appended claims.

Claims (11)

1.一种安全支付方法,应用于终端设备,其特征在于,包括:1. a safe payment method, applied to terminal equipment, is characterized in that, comprises: 接收付款码显示请求,并生成原始付款码;Receive payment code display request, and generate original payment code; 在检测到所述终端设备被扫描时,若扫描设备与所述终端设备之间的距离小于或等于第一预设值,则显示所述原始付款码。When it is detected that the terminal device is scanned, if the distance between the scanning device and the terminal device is less than or equal to a first preset value, the original payment code is displayed. 2.根据权利要求1所述的方法,其特征在于,所述生成原始付款码之后,所述方法还包括:2. The method according to claim 1, wherein after generating the original payment code, the method further comprises: 对所述原始付款码的图像进行处理后得到安全付款码;After processing the image of the original payment code, a secure payment code is obtained; 显示所述安全付款码。The secure payment code is displayed. 3.根据权利要求1或2所述的方法,其特征在于,所述检测到所述终端设备被扫描,包括:3. The method according to claim 1 or 2, wherein the detecting that the terminal device is scanned comprises: 若所述终端设备接收到扫描设备的扫描光信号,则确定所述终端设备被扫描;If the terminal device receives the scanning light signal of the scanning device, determine that the terminal device is scanned; 所述方法还包括:The method also includes: 确定所述扫描设备与所述终端设备之间的距离。Determine the distance between the scanning device and the terminal device. 4.根据权利要求3所述的方法,其特征在于,所述终端设备接收到扫描设备的扫描光信号,包括:4. The method according to claim 3, wherein the terminal device receives the scanning optical signal of the scanning device, comprising: 若所述终端设备接收到的光信号的强度变化大于或等于第二预设值,则确定所述终端设备接收到扫描设备的扫描光信号。If the intensity change of the optical signal received by the terminal device is greater than or equal to the second preset value, it is determined that the terminal device has received the scanning optical signal of the scanning device. 5.根据权利要求3所述的方法,其特征在于,所述确定所述扫描设备与所述终端设备之间的距离,包括:5. The method according to claim 3, wherein the determining the distance between the scanning device and the terminal device comprises: 确定与所述终端设备距离最近的障碍物;determine the closest obstacle to the terminal device; 将所述距离最近的障碍物与所述终端设备之间的距离确定为所述扫描设备与所述终端设备之间的距离。The distance between the closest obstacle and the terminal device is determined as the distance between the scanning device and the terminal device. 6.根据权利要求3所述的方法,其特征在于,所述确定所述扫描设备与所述终端设备之间的距离,包括:6. The method according to claim 3, wherein the determining the distance between the scanning device and the terminal device comprises: 拍摄所述扫描光信号方向的图像;photographing an image in the direction of the scanning light signal; 根据所述扫描光信号方向的图像确定所述扫描设备与所述终端设备之间的距离。The distance between the scanning device and the terminal device is determined according to the image of the direction of the scanning light signal. 7.根据权利要求2所述的方法,其特征在于,所述对所述原始付款码的图像进行处理后得到安全付款码之前,所述方法还包括:7. The method according to claim 2, characterized in that, before the secure payment code is obtained after the image of the original payment code is processed, the method further comprises: 确定所述终端设备的付款码安全保护模式已开启。It is determined that the payment code security protection mode of the terminal device is enabled. 8.根据权利要求1或2所述的方法,其特征在于,所述方法还包括:8. The method according to claim 1 or 2, wherein the method further comprises: 若所述距离大于第一预设值,则输出提示信息,所述提示信息用于提示用户付款码被非法扫描。If the distance is greater than the first preset value, prompt information is output, where the prompt information is used to prompt the user that the payment code is illegally scanned. 9.根据权利要求2所述的方法,其特征在于,所述对所述原始付款码进行处理得到安全付款码,包括以下至少一种:9. The method according to claim 2, wherein the processing of the original payment code to obtain a secure payment code comprises at least one of the following: 对所述原始付款码的全部或部分图像进行虚化图像处理得到清晰度低于所述原始付款码的安全付款码;Perform virtual image processing on all or part of the image of the original payment code to obtain a secure payment code with a lower definition than the original payment code; 对所述原始付款码的图像进行加密处理,得到为所述安全付款码;Encrypting the image of the original payment code to obtain the secure payment code; 对所述原始付款码的全部或部分图像进行遮盖处理,得到所述安全付款码;Covering all or part of the image of the original payment code to obtain the secure payment code; 对所述原始付款码的全部或部分图像进行图像拉伸变形处理,得到所述安全付款码。Perform image stretching and deformation processing on all or part of the original payment code to obtain the secure payment code. 10.一种终端设备,其特征在于,包括:存储器和处理器;所述存储器用于存储计算机程序;所述处理器用于执行所述计算机程序时,实现如权利要求1至9中任一项所述的方法。10. A terminal device, comprising: a memory and a processor; the memory is used for storing a computer program; when the processor is used for executing the computer program, it implements any one of claims 1 to 9 the method described. 11.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,实现如权利要求1至9中任一项所述的方法。11. A computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
CN202010841973.3A 2020-08-20 2020-08-20 Secure payment method, device and storage medium Active CN111967871B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010841973.3A CN111967871B (en) 2020-08-20 2020-08-20 Secure payment method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010841973.3A CN111967871B (en) 2020-08-20 2020-08-20 Secure payment method, device and storage medium

Publications (2)

Publication Number Publication Date
CN111967871A true CN111967871A (en) 2020-11-20
CN111967871B CN111967871B (en) 2025-02-18

Family

ID=73388651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010841973.3A Active CN111967871B (en) 2020-08-20 2020-08-20 Secure payment method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111967871B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114282561A (en) * 2021-12-23 2022-04-05 珠海格力电器股份有限公司 A code identification display method, device, electronic device and storage medium
CN114548975A (en) * 2022-02-11 2022-05-27 中国银联股份有限公司 Code scanning payment method, user terminal, service equipment, system and medium
CN115994376A (en) * 2021-10-18 2023-04-21 花瓣云科技有限公司 Display method and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180240123A1 (en) * 2017-02-22 2018-08-23 Alibaba Group Holding Limited Payment Processing Method and Apparatus, and Transaction Method and Mobile Device
CN109102280A (en) * 2018-08-01 2018-12-28 福州市晋安区绿奇鑫环保科技有限公司 A kind of the safety verification method and server of barcode scanning payment environment
CN109214810A (en) * 2018-07-25 2019-01-15 努比亚技术有限公司 A kind of two-dimensional code display method, mobile terminal and computer readable storage medium
CN109544139A (en) * 2018-11-26 2019-03-29 努比亚技术有限公司 A kind of method of payment, terminal and readable storage medium storing program for executing
CN110517035A (en) * 2018-05-22 2019-11-29 维沃移动通信有限公司 A kind of information display method and mobile terminal
CN110889692A (en) * 2019-11-29 2020-03-17 维沃移动通信有限公司 Mobile payment method and electronic equipment
CN111008833A (en) * 2019-11-29 2020-04-14 维沃移动通信有限公司 Payment transaction method, payment terminal, and computer-readable storage medium
CN112837057A (en) * 2019-11-22 2021-05-25 华为技术有限公司 Payment code anti-swiping method, terminal device and computer-readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180240123A1 (en) * 2017-02-22 2018-08-23 Alibaba Group Holding Limited Payment Processing Method and Apparatus, and Transaction Method and Mobile Device
CN110517035A (en) * 2018-05-22 2019-11-29 维沃移动通信有限公司 A kind of information display method and mobile terminal
CN109214810A (en) * 2018-07-25 2019-01-15 努比亚技术有限公司 A kind of two-dimensional code display method, mobile terminal and computer readable storage medium
CN109102280A (en) * 2018-08-01 2018-12-28 福州市晋安区绿奇鑫环保科技有限公司 A kind of the safety verification method and server of barcode scanning payment environment
CN109544139A (en) * 2018-11-26 2019-03-29 努比亚技术有限公司 A kind of method of payment, terminal and readable storage medium storing program for executing
CN112837057A (en) * 2019-11-22 2021-05-25 华为技术有限公司 Payment code anti-swiping method, terminal device and computer-readable storage medium
CN110889692A (en) * 2019-11-29 2020-03-17 维沃移动通信有限公司 Mobile payment method and electronic equipment
CN111008833A (en) * 2019-11-29 2020-04-14 维沃移动通信有限公司 Payment transaction method, payment terminal, and computer-readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZHOU Z等: "Beware of your screen: Anonymous fingerprinting of device screens for off-line payment protection", PROCEEDINGS OF THE 34TH ANNUAL COMPUTER SECURITY APPLICATIONS CONFERENCE, 31 December 2018 (2018-12-31), pages 77 - 88 *
朱万山等: "城市公共交通中非接触支付技术研究进展", 电子测量技术, vol. 43, no. 9, 8 May 2020 (2020-05-08), pages 121 - 126 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115994376A (en) * 2021-10-18 2023-04-21 花瓣云科技有限公司 Display method and electronic equipment
CN114282561A (en) * 2021-12-23 2022-04-05 珠海格力电器股份有限公司 A code identification display method, device, electronic device and storage medium
CN114548975A (en) * 2022-02-11 2022-05-27 中国银联股份有限公司 Code scanning payment method, user terminal, service equipment, system and medium
WO2023151246A1 (en) * 2022-02-11 2023-08-17 中国银联股份有限公司 Code-scanning payment method, user terminal, service device, system, and medium
TWI839876B (en) * 2022-02-11 2024-04-21 大陸商中國銀聯股份有限公司 QR code payment method, user terminal, business equipment, system and medium
CN114548975B (en) * 2022-02-11 2025-12-19 中国银联股份有限公司 Code scanning payment method, user terminal, service equipment, system and medium

Also Published As

Publication number Publication date
CN111967871B (en) 2025-02-18

Similar Documents

Publication Publication Date Title
WO2021120793A1 (en) Face image transmission method and apparatus, numerical value transfer method and apparatus, and electronic device
CN109146463B (en) Mobile payment method, mobile terminal and computer-readable storage medium
CN109800602B (en) Privacy protection method, mobile terminal and computer readable storage medium
CN109963204B (en) Watermark adding method and device, mobile terminal and readable storage medium
CN108075899B (en) An authentication method, mobile terminal and computer-readable storage medium
CN108833690B (en) Authority control method, terminal and computer readable storage medium
CN107240157B (en) Near field communication security control method, mobile terminal and computer readable storage medium
CN107276991B (en) Method and device for loading Web page and computer readable storage medium
CN111967871A (en) Secure payment method, device and storage medium
CN108196774B (en) Message lookup method, flexible screen terminal and computer readable storage medium
US20220215680A1 (en) Note information display method, note information sending method, and electronic device
CN107563158B (en) Method, device and computer readable storage medium for displaying hidden application icon
CN108601062B (en) WiFi connection sharing method, terminal and computer storage medium
CN107135498B (en) A file sharing method and device
CN107194217A (en) User data access control method, equipment and computer-readable recording medium
CN114900613A (en) Control method, intelligent terminal and storage medium
CN107885987B (en) Unlocking method, terminal and computer readable storage medium
CN112351139A (en) Control method of mobile terminal, mobile terminal and storage medium
CN107395363B (en) Fingerprint sharing method and mobile terminal
CN108810262A (en) A kind of configuration method of application, terminal and computer readable storage medium
CN113515254A (en) Interface display method, terminal and storage medium
CN111931155A (en) Verification code input method, verification code input equipment and storage medium
CN108566476B (en) An information processing method, terminal and computer-readable storage medium
CN115617293A (en) Data processing method, source end screen projection device and storage medium
CN116301380A (en) Display method, foldable device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant