WO2023065783A1 - Display method and electronic device - Google Patents

Display method and electronic device Download PDF

Info

Publication number
WO2023065783A1
WO2023065783A1 PCT/CN2022/111238 CN2022111238W WO2023065783A1 WO 2023065783 A1 WO2023065783 A1 WO 2023065783A1 CN 2022111238 W CN2022111238 W CN 2022111238W WO 2023065783 A1 WO2023065783 A1 WO 2023065783A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
code
condition
payment
preset
Prior art date
Application number
PCT/CN2022/111238
Other languages
French (fr)
Chinese (zh)
Inventor
陈凯
Original Assignee
花瓣云科技有限公司
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 花瓣云科技有限公司 filed Critical 花瓣云科技有限公司
Publication of WO2023065783A1 publication Critical patent/WO2023065783A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/82Protecting input, output or interconnection devices
    • G06F21/84Protecting input, output or interconnection devices output devices, e.g. displays or monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Definitions

  • the present application relates to the technical field of electronic equipment, in particular to a display method and electronic equipment.
  • payment codes have become electronic information commonly used by consumers when making mobile payments.
  • the payment codes can be presented in the form of two-dimensional codes, barcodes, and the like.
  • the payee uses a code scanning device to scan the payment code on the electronic device held by the consumer to complete the payment.
  • the payment code if used properly, consumers can easily complete the transaction. Improper use may bring property damage and/or safety risks to consumers. For example, in real life, when consumers use payment codes for mobile payment, there may be potential risks in the payment environment. The payment code may be stolen by illegal elements, and/or stolen by illegal code scanning devices in the surrounding environment, causing property losses to consumers.
  • the present application provides a display method and an electronic device, which can improve the security of consumers using payment codes for payment.
  • the present application provides a display method, which is applied to an electronic device with a display screen, and the method includes: acquiring at least one preset parameter in response to a payment code activation operation. If there is at least one preset parameter that does not meet the corresponding preset condition, the payment code is masked, and an interface after the payment code is masked is displayed.
  • the preset parameters include the attitude of the electronic device, and the corresponding preset condition is the first condition.
  • the attitude of the electronic device includes a pitch angle of the electronic device; the first condition includes: the pitch angle of the electronic device satisfies a first angle range.
  • the attitude of the electronic device includes a flip angle of the electronic device; the first condition includes: the flip angle of the electronic device satisfies the second angle range.
  • the attitude of the electronic device includes a pitch angle and a flip angle of the electronic device; the first condition includes: the pitch angle of the electronic device satisfies a first angle range, and the flip angle of the electronic device satisfies a second angle range.
  • the pitch angle can prevent the payment code from being stolen by illegal elements. Swipe from the back of the user, and the flip angle can prevent the payment code from being stolen from the side of the user by illegal elements, which can further reduce the risk of the payment code being stolen, and improve the security of consumers when paying with the payment code.
  • the interface after the payment code is shielded includes prompt information, and the prompt information is used to prompt the user to make the electronic device display the payment code through operations.
  • the interface after shielding the payment code includes prompt information for prompting the user to make the electronic device display the payment code through operation, so that the user can operate according to the prompt information according to his own needs, so that the electronic device displays the payment code. It can bring users a more intuitive perception and an easy-to-use operating experience.
  • the preset parameters also include ambient light intensity around the electronic device
  • the corresponding preset condition is the third condition.
  • the third condition includes that the ambient light intensity around the electronic device changes, and the changed ambient light intensity around the electronic device satisfies the first preset light intensity range. Based on this design, it is also possible to identify the blank period for scanning the payment code based on the ambient light intensity around the electronic device. When the ambient light intensity around the electronic device does not meet the third condition, the payment code can be shielded, which can Reduce the risk of the payment code being stolen, and improve the security of consumers when using the payment code for payment.
  • the preset parameters further include: the image of the code scanning device, and the corresponding preset condition is the second condition; the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device.
  • the preset parameters also include: the distance between the code scanning device and the electronic device, and the corresponding preset condition is the fourth condition; the fourth condition includes that the distance between the code scanning device and the electronic device satisfies a preset distance range.
  • the preset parameters also include: the image of the code scanning device, the distance between the code scanning device and the electronic device; the preset condition corresponding to the image of the code scanning device is the second condition, the distance between the code scanning device and the electronic device The corresponding preset condition is the fourth condition.
  • the image of the scanning device can be used to determine whether the scanning device is legal.
  • the distance between the device and the electronic device can be used to determine whether the code scanning device is reasonable. If the code scanning device is illegal and/or reasonable, shielding the payment code can reduce the risk of the payment code being stolen , to improve the security of consumers when paying with payment codes.
  • the preset parameters also include the image of the code scanning device, and the corresponding preset condition is the second condition; when the image of the code scanning device does not meet the second condition, the payment code is shielded Before, the method further includes: determining that the light intensity of the code scanning device does not satisfy the second preset light intensity range.
  • the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device.
  • the code scanning device may be a legal code scanning device, but it does not belong to the preset code scanning device, that is, the code scanning device is not counted in the preset code scanning device, therefore, based on this design, in On the basis of determining that the code scanning device does not belong to the preset code scanning device, it is further possible to judge whether to shield the payment code through the light intensity of the code scanning device.
  • Comprehensive consideration of various special scenarios makes the shielding of payment codes more in line with actual needs, improving the fluency and comfort of users.
  • the method further includes: prompting the user to input verification information.
  • the payment code is displayed. Based on this design, the user can input the verification information according to the prompt, so that the payment code is displayed.
  • the shielding process of the payment code is more in line with the user's needs, and the smoothness and comfort of the user's use are improved.
  • the method further includes: displaying the payment code if at least one preset parameter satisfies a corresponding preset condition.
  • the electronic device includes one or more of a mobile phone, a tablet computer, and a wearable device.
  • the present application provides an electronic device, including: a processor, a memory, and a display screen, the memory, the display screen and the processor are coupled, the memory is used to store computer program codes, and the computer program codes include computer instructions.
  • the computer instruction is read from the memory, so that the electronic device executes the method described in the above first aspect and any one of the designs.
  • the present application provides an electronic device, which has a function of implementing the method described in the above first aspect and any one of the designs.
  • This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the present application provides a computer-readable storage medium, on which a computer program or instruction is stored, and when the computer program or instruction is run on the computer, the computer executes the above-mentioned first aspect and any one of them. Design the method described.
  • the present application provides a computer program product
  • the computer program product includes: a computer program or instruction, when the computer program or instruction is run on the computer, the computer executes the method described in the above first aspect and any one of the designs .
  • the present application provides a chip system, including at least one processor and at least one interface circuit, at least one interface circuit is used to perform the function of sending and receiving, and send instructions to at least one processor, when at least one processor executes the instruction , at least one processor executes the method described in the above first aspect and any one of the designs.
  • FIG. 1 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application
  • FIG. 2a is a schematic diagram of a related interface for shielding payment codes provided by the embodiment of the present application.
  • Fig. 2b is a schematic diagram of another related interface for shielding the payment code provided by the embodiment of the present application.
  • Fig. 2c is a schematic diagram of another related interface for shielding the payment code provided by the embodiment of the present application.
  • Fig. 3a is a schematic diagram of a pitch angle and a flip angle of an electronic device provided by an embodiment of the present application
  • Fig. 3b is a schematic diagram of pitch angle and flip angle of another electronic device provided by the embodiment of the present application.
  • Figure 4a is a schematic diagram of a payment code facing away from the user provided by the embodiment of the present application.
  • Fig. 4b is a schematic diagram of a payment code facing the user provided by the embodiment of the present application.
  • Fig. 5a is a schematic diagram of a scenario of payment using a payment code provided by an embodiment of the present application.
  • Fig. 5b is a schematic diagram of another scenario of payment by payment code provided by the embodiment of the present application.
  • Fig. 5c is a schematic diagram of another scenario of payment by payment code provided by the embodiment of the present application.
  • Fig. 6a is a schematic diagram of a related interface that utilizes verification information to display a payment code provided by an embodiment of the present application
  • Fig. 6b is a schematic diagram of a relevant interface for masking the payment code again after the payment code is displayed using the verification information provided by the embodiment of the present application;
  • FIG. 7 is a schematic diagram of a relative posture between an electronic device and a code scanning device provided in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a relevant interface for setting a payment strategy provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of another electronic device provided in the embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a chip system provided by an embodiment of the present application.
  • mobile payment has become a commonly used payment method for consumers.
  • consumers can open the payment code in the electronic device, and then show the payment code to the payee to complete the payment.
  • the open payment code may be stolen by illegal elements and/or other illegal devices, causing property losses to users.
  • the embodiment of the present application provides a display method, in the process of using the payment code to pay, and/or, after the payment code is used to complete the payment, and the payment code page is not closed, according to
  • the preset judgment conditions determine whether to shield the payment code, which can improve the safety of consumers when using the payment code for payment and ensure the safety of consumers' property.
  • the display method provided by the embodiment of the present application may be applied to the electronic device 100 , or to a system including the electronic device 100 .
  • the electronic device 100 may be a cell phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, as well as a cellular phone, a personal digital assistant (personal digital assistant) digital assistant, PDA), augmented reality (augmented reality, AR) equipment, virtual reality (virtual reality, VR) equipment, artificial intelligence (artificial intelligence, AI) equipment, wearable
  • PDA personal digital assistant
  • augmented reality augmented reality, AR
  • VR virtual reality
  • AI artificial intelligence
  • wearable wearable
  • the specific type of electronic equipment is not particularly limited.
  • FIG. 1 shows a structural diagram of an electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195 wait.
  • SIM subscriber identification module
  • the sensor module 180 may include a gyroscope sensor 180A, an acceleration sensor 180B, a fingerprint sensor 180C, a touch sensor 180D, an ambient light sensor 180E, an orientation sensor 180F, a magnetic sensor 180G, a distance sensor 180H and the like.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • WLAN wireless local area networks
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the display screen 194 is used to display payment codes.
  • the display screen 194 is also used to display the shielded payment code.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193.
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard (red green blue, RGB), YUV and other image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • the camera 193 can be used to capture the image of the code scanning device.
  • the processor 110 can determine the distance between the code scanning device and the electronic device according to the image of the code scanning device captured by the camera 193. For the specific principle of camera distance measurement, please refer to the prior art. The application will not be repeated.
  • the camera 193 is also used to assist in identifying the relative posture of the electronic device and the code scanning device.
  • the processor 110 determines the position of the electronic device and the code scanning device according to the image of the code scanning device captured by the camera 193.
  • the relative posture between them that is, the relative position between the electronic device and the code scanning device.
  • the camera 193 may also be used to capture user verification information, such as face information and the like.
  • the camera 193 may be a front camera or a rear camera, which is not limited in this application.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can determine whether the image captured by the camera 193 is the image of the code scanning device, and/or determine whether the user is looking at the screen of the electronic device.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • an external memory card such as a Micro SD card
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash memory (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 may implement audio functions through the audio module 170 and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • the gyro sensor 180A can be used to determine the motion posture of the electronic device 100 .
  • the angular velocity of the electronic device 100 about three axes may be determined by the gyro sensor 180A.
  • the gyro sensor 180A can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180A detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyroscope sensor 180A can also be used for navigation and somatosensory game scenes.
  • the gyro sensor 180A is also used to identify the attitude of the electronic device, for example, the pitch angle, roll angle, etc. of the electronic device.
  • the acceleration sensor 180B can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. In some embodiments of the present application, the acceleration sensor 180B may also be used to identify the motion posture of the electronic device, thereby assisting in determining the posture of the electronic device.
  • the fingerprint sensor 180C is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
  • the fingerprint sensor 180C is also used to receive authentication information input by the user, such as fingerprint information.
  • the touch sensor 180D is also called “touch device”.
  • the touch sensor 180D can be disposed on the display screen 194, and the touch sensor 180D and the display screen 194 form a touch screen, also called “touch screen”.
  • the touch sensor 180D is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180D may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the ambient light sensor 180E is used for sensing ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180E can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180E can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
  • the ambient light sensor 180E may be used to assist in identifying the code-scanning device, for example, assisting in identifying the code-scanning device by sensing the bright light emitted by the code-scanning device.
  • the ambient light sensor 180E can also be used to assist in identifying the posture of the electronic device.
  • the ambient light perceived by the electronic device through the ambient light sensor 180E may be strong; when the display screen of the electronic device faces downward, the ambient light sensed by the electronic device through the ambient light sensor 180E may be weak.
  • the ambient light sensor 180E can be used to assist in recognizing the gesture of the electronic device.
  • the direction sensor 180F is also called "attitude sensor”.
  • the orientation sensor 180F can be used to determine the angular velocity of the electronic device 100 around three axes (namely, the x, y and z axes), sense the change of the orientation of the electronic device 100, and then determine the orientation of the electronic device 100 , such as: upright, upside down, left sideways, right sideways, upright, down, etc.
  • the orientation sensor 180F may be used to identify the geographic coordinates of the electronic device, determine the orientation of the display screen of the electronic device, and then determine the posture of the electronic device.
  • the magnetic sensor 180G includes a Hall sensor.
  • the electronic device 100 may use the magnetic sensor 180G to detect the opening and closing of the flip leather case.
  • the electronic device 100 when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the magnetic sensor 180G may also be used to assist in judging the orientation of the display screen of the electronic device, thereby determining the posture of the electronic device.
  • the distance sensor 180H is used to measure the distance.
  • the electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180H for distance measurement to achieve fast focusing.
  • the distance sensor 180H can also be used to measure the distance between the electronic device and the code scanning device, and/or, the distance between the user's face and the screen of the electronic device.
  • the sensor module 180 may also include a pressure sensor, an air pressure sensor, a proximity light sensor, a temperature sensor, a bone conduction sensor, and the like.
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the electronic device detects a payment code opening instruction (that is, a payment code opening operation), responds to the payment code opening instruction, first displays the payment code, and then obtains preset parameters, if the preset parameters meet the corresponding If the judgment condition is not met, the payment code will not be shielded. If the preset parameters do not meet the corresponding judgment condition, the payment code will be shielded.
  • a payment code opening instruction that is, a payment code opening operation
  • the electronic device detects the payment code opening instruction, for example: detects the user's click operation on option 201 in the interface 200 (interface 200 may be a related interface for opening the payment code), in response to the instruction,
  • the electronic device displays the payment code, for example, the electronic device can jump to the interface 210, and the payment code 202 is displayed on the interface 210.
  • the electronic device acquires the preset parameters, and determines whether the payment code needs to be shielded according to whether the preset parameters meet the corresponding judgment conditions. The preset parameters and judgment conditions will not be introduced here, and will be explained in detail later. If it is determined that the payment code needs to be shielded, the electronic device will shield the payment code, and then the electronic device can jump to interface 220. In the interface 220, the shielded payment code is displayed. If it is determined that the payment code does not need to be shielded, the electronic device continues to present the interface 210 .
  • interface 210 it is possible to jump from interface 210 to interface 220, and the two are different interface containers.
  • the interface 210 and the interface 220 are the same interface container, but the display content in the interface container is changed, for example, the content in the interface 210 is changed to the content in the interface 220 .
  • the electronic device can display the payment code (that is, the shielded payment code) in the form of fuzzy textures such as frosted glass, mosaic images, sticker images, partial display (missing display), etc.
  • the payment code presented in this way The code will not be recognized by the scanning device.
  • the payment code is displayed after being covered with a sticker image.
  • the electronic device displays a blank page or prompt text, such as "The payment code has been blocked", "It is detected that the current payment code page is facing up, please turn the payment code down to resume display, or align the scanning code Device to restore the display, or tap the fingerprint to restore the display” and other prompts related to the safe use of payment codes and privacy protection.
  • the prompt information may instruct the user to make the electronic device display the payment code through an operation.
  • the operation may be the operation indicated by the prompt information, or other operations.
  • prompt information related to safe use of the payment code and privacy protection is displayed. It should be noted that this application does not limit the specific content of the prompt information. In practical applications, the content of the prompt information can be determined by preset parameters and corresponding judgment conditions. The content can also be different.
  • the preset parameters include the posture of the electronic device, and the corresponding preset condition is the first condition
  • the content of the prompt message may be "It is detected that the current payment code page is facing up, please turn the payment code down to restore the display", At this time, the user can face down the display screen of the electronic device so that the electronic device displays the payment code.
  • the preset parameters include the distance between the electronic device and the code scanning device
  • the corresponding preset condition is that the distance between the electronic device and the code scanning device satisfies the preset distance range.
  • meeting the preset distance range can be specifically implemented is less than or equal to a certain value in the preset distance range
  • the content of the prompt message can be "It is detected that the current distance from the code scanning device is too far away, please bring the payment code close to the code scanning device to restore the display", at this time, the user can put the electronic
  • the device display is positioned adjacent to the payment code such that the electronic device displays the payment code.
  • a fingerprint button may also be displayed on the display interface after the payment code is shielded, as shown by the fingerprint button 203 in the interface 230 shown in FIG.
  • the display mode of the display interface after shielding the payment code may be the system default, or the user may select the display mode of the display interface after shielding the payment code according to his or her own needs.
  • the electronic device displays the payment code in response to the payment code opening instruction, it may be blocked immediately after the payment code is displayed.
  • the payment code is displayed for a short time, but the payment code still has the risk of being illegally scanned.
  • the embodiment of the present application also provides another possible example.
  • the electronic device detects a payment code activation instruction, and in response to the payment code activation instruction, directly obtains preset parameters, and if the preset parameters meet the corresponding judgment conditions, the payment code is not shielded. If the preset parameters do not meet the corresponding judgment conditions, the payment code is shielded.
  • the electronic device detects the command to open the payment code, it does not open the display of the payment code first, but directly obtains the preset parameters to determine whether to shield the payment code.
  • the electronic device detects the payment code activation instruction input by the user, for example: detecting the user's click operation on the option 201 in the interface 200, in response to the instruction, the electronic device obtains the preset parameters, and according to the preset Whether the parameter meets the judgment condition determines whether the payment code needs to be shielded currently. If it is determined that the payment code needs to be shielded, the electronic device may directly jump to the interface 220 . In the interface 220, the shielded payment code is displayed. If it is determined that the payment code does not need to be shielded, the electronic device may display an interface 210 on which the payment code 202 is displayed.
  • the preset parameter acquired by the electronic device is: the attitude of the electronic device, and the corresponding judgment condition is: whether the attitude of the electronic device satisfies the first condition. If the posture of the electronic device meets the first condition, the payment code is not shielded, that is, the payment code is displayed; if the posture of the electronic device does not meet the first condition, the payment code is shielded.
  • the posture of the electronic device may include an angle formed between the electronic device and the reference plane.
  • the angle includes one or more of a pitch angle and a flip angle of the electronic device.
  • the angle may also include other defined angles, or angles with other names, etc., which are not limited in the present application. Since the pitch angle and flip angle of electronic equipment are related to the selected coordinate system and reference plane, in practical application, the pitch angle and flip angle can be flexibly defined according to the selected coordinate system and reference plane.
  • the pitch angle of an electronic device refers to the angle between a vector parallel to the display screen of the electronic device and pointing to the head of the electronic device and the horizontal ground
  • the flip angle refers to when the electronic device is flipped to the left and right sides
  • the included angle between the side plane of the electronic device and the reference plane is different in different scenarios.
  • the reference plane may be the horizontal ground.
  • the reference surface can be the same as the current electronic device. Display parallel to the plane.
  • the reference plane may be a plane perpendicular to the horizontal ground.
  • FIG. 3 a it is a schematic diagram of a pitch angle and a roll angle of an electronic device provided by an embodiment of the present application.
  • the right side of the electronic device is the positive direction of the x-axis
  • the head of the electronic device is the positive direction of the y-axis
  • the side of the display screen of the electronic device is the positive direction of the z-axis.
  • a in FIG. 3 a is the pitch angle of the electronic device
  • B is the flip angle of the electronic device.
  • the pitch angle is 0°.
  • the pitch angle is positive.
  • the pitch angle is negative. value.
  • the flip angle is 0° with the parallel ground as the reference plane.
  • the flip angle is positive.
  • the flip angle is a negative value.
  • FIG. 3 b it is a schematic diagram of pitch angle and flip angle of another electronic device according to the embodiment of the present application.
  • the right side of the electronic device is the positive direction of the x-axis
  • the head of the electronic device is the positive direction of the y-axis
  • the rear camera side of the electronic device is the positive direction of the z-axis.
  • a in FIG. 3 b is the pitch angle of the electronic device
  • B is the flip angle of the electronic device.
  • the pitch angle when the screen of the electronic device faces down and is parallel to the ground, the pitch angle is 0°.
  • the pitch angle is positive.
  • the pitch angle is negative. value.
  • the flip angle When the screen of the electronic device faces down and is parallel to the ground, the flip angle is 0° with the parallel ground as the reference plane.
  • the flip angle When the right end of the electronic device (the positive direction of the x-axis shown in Figure 3b) is flipped upward, the flip angle is positive. Conversely, when the right end of the electronic device is turned downward, the flip angle is a negative value.
  • the electronic device can obtain the gravity sensing data of the electronic device through one or more of the gyroscope sensor, the direction sensor, and the acceleration sensor, and then calculate the pitch angle, flip angle, etc. of the electronic device based on the sensing data.
  • the electronic device may also determine the pitch angle, roll angle, etc. of the electronic device through other sensors and/or other methods, which is not limited in this application.
  • the attitude of the electronic device is the pitch angle of the electronic device
  • the attitude of the electronic device meeting the first condition specifically includes: the pitch angle of the electronic device satisfies the first angle range.
  • the first angle range may be greater than or equal to the first threshold and less than or equal to the second threshold, or greater than or equal to the first threshold, or less than or equal to the second threshold, and the second threshold is greater than the first threshold.
  • the first angle range can be flexibly set, which is not specifically limited in the present application.
  • the posture of the electronic device meeting the first condition specifically includes: the flip angle of the electronic device satisfies the second angle range, and the second angle range may be greater than or equal to the third threshold and be less than or equal to the fourth threshold, may also be greater than or equal to the third threshold, or may be less than or equal to the fourth threshold.
  • the second angle range can also be flexibly set, which is not specifically limited in the present application.
  • the attitude of the electronic device is the pitch angle and the flip angle of the electronic device
  • the attitude of the electronic device meeting the first condition specifically includes: the pitch angle of the electronic device satisfies the first angle range, and the flip angle of the electronic device satisfies the first condition.
  • the first angle range and the second angle range may be the same or different.
  • the settings of the first threshold and the second threshold are related to the orientation of the display screen of the electronic device, and are also related to the reference coordinate system.
  • the pitch angle of the electronic device in the embodiment of the present application includes the pitch angle when the screen of the electronic device faces up and the pitch angle when the screen of the electronic device faces down.
  • a setting method of the first threshold, the second threshold, the third threshold, and the fourth threshold is given below.
  • the environment facing the user is within the user's field of vision, and the user can see or observe whether there is an illegal scanning device in the current field of vision.
  • the payment code faces the environment facing the user ( For example: when the payment code is facing away from the user), the risk of the payment code being stolen is low.
  • Fig. 4a it is a schematic diagram of the payment code facing away from the user.
  • Fig. 4b it is a schematic diagram of the payment code facing the user. Therefore, in the embodiment of the present application, when setting the first threshold, the second threshold, the third threshold, and the fourth threshold, the possible sizes of the pitch angle and flip angle of the electronic device in this scenario are considered.
  • the code scanning device is a code scanning gun
  • the relationship between the code scanning gun and the payment code is usually front and back
  • the user may turn the display screen of the electronic device upwards in order to complete the code scanning operation .
  • the pitch angle of the electronic device is greater than or equal to -90° and less than or equal to 45°
  • the payment on the electronic device The orientation of the code is within the user's field of vision and may not be easily stolen. Therefore, in the embodiment of the present application, when the pitch angle of the electronic device is within the range, the payment code does not need to be shielded.
  • the pitch angle A in Fig. 5a is greater than 0°.
  • the user may turn the display screen of the electronic device toward the ground in order to complete the code scanning operation, that is, the payment code may face the ground.
  • the coordinate system shown in Figure 3b considering the habit of the user holding the electronic device, for example: when the angle between the electronic device and the ground is greater than or equal to 0° and less than or equal to 90°, the payment code on the electronic device The orientation is within the user's field of vision and may not be easily stolen. Therefore, in the embodiment of the present application, when the pitch angle of the electronic device is within the range, the payment code does not need to be shielded.
  • the display screen of the electronic device is vertical to the ground.
  • the payment code on the electronic device may not be easily stolen.
  • the payment code may not be easily swiped due to the user's body shielding.
  • there may be a risk of being stolen For example: when the display screen of the electronic device faces the back of the user, or when the display screen of the electronic device faces away from the side of the user, there may be a risk of being stolen. At this time, whether to shield the payment code can be judged by the size of the flip angle.
  • the plane where the electronic device is located is the reference plane, for example: when the flip angle of the electronic device is greater than or equal to - When the angle is 90° and less than or equal to 45°, the payment code on the electronic device is within the user's field of vision, or is blocked by the user's body, and the risk of the payment code being stolen is low. Therefore, in the embodiment of the application, when the flip angle of the electronic device is within this range, there is no need to perform shielding processing on the payment code.
  • the first threshold may be -45°
  • the second threshold may be 45°
  • the third threshold may be -45°
  • the fourth threshold may be 45°.
  • This application does not specifically limit the values of the first threshold, the second threshold, the third threshold, and the fourth threshold. Developers can set them according to actual needs, and of course they can flexibly adjust the corresponding thresholds according to users' usage habits. It should be noted that, for different reference coordinate systems, the pitch angle and flip angle of the electronic device in a certain coordinate system can be correspondingly converted into the pitch angle and flip angle in another coordinate system.
  • the electronic device may also assist in identifying the posture of the electronic device through the intensity of ambient light around the electronic device.
  • the ambient light sensor is set on one side of the display screen of the electronic device, when the display screen of the electronic device is facing up (that is, facing away from the ground), the environment that the display screen of the electronic device can perceive may be due to light or other reasons.
  • the display screen of the electronic device faces downward, that is, when it faces the ground, the ambient light that the display screen of the electronic device can perceive is weak. Therefore, in the embodiment of the present application, the gesture recognition of the electronic device is assisted by the ambient light intensity sensed by the display screen of the electronic device.
  • the preset parameter acquired by the electronic device is: attribute information of the code scanning device
  • the corresponding judgment condition is: whether the attribute information of the code scanning device satisfies the second condition. If the attribute information of the code scanning device does not meet the second condition, the payment code is shielded; otherwise, the payment code is not shielded, that is, the payment code is displayed.
  • the attribute information of the code scanning device includes one or more of the following: an image of the code scanning device, and a distance between the code scanning device and the electronic device.
  • Method 1 The attribute information of the code scanning device includes an image of the code scanning device.
  • the attribute information of the code scanning device meeting the second condition specifically includes: the image of the code scanning device belongs to the image of the preset code scanning device.
  • the image of the preset code scanning device may be a commonly used or common code scanning device in daily life, for example: a code scanning gun, a code scanning box, and the like.
  • the attribute information of the code-scanning device does not meet the second condition specifically includes: the image of the code-scanning device does not belong to the image of the preset code-scanning device, such as counterfeiting a code-scanning device or a mobile phone with a code-scanning function, after being maliciously tampered with Scanning equipment, etc.
  • images of commonly used code scanning devices can be obtained by training models (such as image feature extraction and feature recognition, etc.), and the images of these code scanning devices can be determined as preset code scanning devices Image.
  • training models such as image feature extraction and feature recognition, etc.
  • the attribute information of the code scanning device includes the distance between the code scanning device and the electronic device.
  • the attribute information of the code scanning device satisfies the second condition, which specifically includes: the distance between the code scanning device and the electronic device meets a preset distance range.
  • meeting the preset distance range may be specifically implemented as being less than or equal to a certain value in the preset distance range; it may also be specifically implemented as being within the preset distance range.
  • the attribute information of the code scanning device does not meet the second condition, specifically including: the distance between the code scanning device and the electronic device does not meet the preset distance range.
  • failing to meet the preset distance range may be specifically implemented as being greater than a certain value in the preset distance range; it may also be specifically implemented as being outside the preset distance range.
  • the preset distance range can be determined according to the distance between the code scanning device and the electronic device that can complete the payment operation, and the developer can set the preset distance range according to actual needs, which is not limited in this application.
  • the attribute information of the code scanning device includes the image of the code scanning device and the distance between the code scanning device and the electronic device.
  • the attribute information of the code scanning device meeting the second condition specifically includes: the image of the code scanning device belongs to the image of the preset code scanning device, and the distance between the code scanning device and the electronic device satisfies a preset distance range.
  • the attribute information of the code scanning device does not meet the second condition specifically includes: the image of the code scanning device does not belong to the image of the preset code scanning device, and/or the distance between the code scanning device and the electronic device does not meet the preset distance scope.
  • the preset parameter acquired by the electronic device is: ambient light intensity around the electronic device
  • the corresponding judgment condition is: whether the ambient light intensity around the electronic device satisfies the third condition. If the ambient light intensity around the electronic device does not meet the third condition, the payment code is shielded, otherwise, the payment code is not shielded.
  • whether there is a code scanning device around the electronic device, and/or the distance between the electronic device and the code scanning device can be explained laterally by measuring the ambient light intensity. For example: assuming that the ambient light intensity around the electronic device changes from weak to strong, it means that the electronic device may be approaching the code scanning device. Another example: assuming that the ambient light intensity around the electronic device changes from strong to weak, it means that the electronic device may be moving away from the code scanning device. Therefore, it may be determined based on the ambient light intensity around the electronic device whether to shield the payment code.
  • the third condition is that the ambient light intensity around the electronic device changes, and the ambient light intensity around the electronic device satisfies the first preset light intensity range.
  • the third condition is that the ambient light intensity around the electronic device satisfies the first light intensity range.
  • satisfying the first preset light intensity range may be specifically implemented as being greater than or equal to a certain value in the first preset light intensity range.
  • the light intensity emitted by various types of code scanning devices can be counted, and the first preset light intensity range can be determined according to the statistical light intensity.
  • a certain value in the first preset light intensity range can be The minimum value of each brightness intensity.
  • meeting the first preset light intensity range may also be specifically implemented as belonging to the first preset light intensity range.
  • the first preset light intensity range may be an interval, that is, the intensity of light emitted by various types of code scanning devices is located within this interval.
  • the electronic device may also obtain a plurality of preset parameters, and combine the plurality of preset parameters to determine whether a corresponding judgment condition is satisfied. It should be understood that the above-mentioned multiple preset parameters can be combined arbitrarily, and the combinations shown below are only examples and do not constitute a limitation on the combination of preset parameters.
  • the preset parameters acquired by the electronic device include: the posture of the electronic device and the ambient light intensity around the electronic device, and it can be determined based on the posture of the electronic device and the ambient light intensity around the electronic device whether to check the payment code. Shield processing. First obtain the posture of the electronic device, if the posture of the electronic device does not meet the first condition, then shield the payment code; if the posture of the electronic device meets the first condition, then further obtain the ambient light intensity around the electronic device, if the electronic device If the surrounding ambient light intensity does not meet the third condition, the payment code is shielded, otherwise, the payment code is not shielded.
  • the ambient light intensity around the electronic device can also be obtained, and if the ambient light intensity around the electronic device does not meet the third condition, the payment code is shielded; if the ambient light intensity around the electronic device meets the third condition, then further The posture of the electronic device is obtained, and if the posture of the electronic device does not meet the first condition, the payment code is shielded; otherwise, the payment code is not shielded.
  • the posture of the electronic device and the ambient light intensity around the electronic device can also be obtained at the same time. If the posture of the electronic device does not meet the first condition and/or the ambient light intensity around the electronic device does not meet the third condition, then the payment code is processed. Shield processing.
  • the preset parameters acquired by the electronic device include: attribute information of the code scanning device and ambient light intensity around the electronic device. Whether to shield the payment code can be determined based on the attribute information of the code scanning device and the ambient light intensity around the electronic device. For example: first obtain the image of the code scanning device, if the image of the code scanning device does not meet the second condition, then shield the payment code; if the image of the code scanning device meets the second condition, further obtain the ambient light around the electronic device Strong, if the ambient light intensity around the electronic device does not meet the third condition, the payment code is shielded, otherwise the payment code is not shielded.
  • the ambient light intensity around the electronic device first, and if the ambient light intensity around the electronic device does not meet the third condition, then shield the payment code; if the ambient light intensity around the electronic device meets the third condition, then further obtain
  • the image of the code scanning device if the image of the code scanning device does not meet the second condition, the payment code is shielded, otherwise the payment code is not shielded.
  • the image of the code scanning device and the ambient light intensity around the electronic device can also be obtained at the same time. If the image of the code scanning device does not meet the second condition and/or the ambient light intensity around the electronic device does not meet the third condition, the payment code Perform masking.
  • the preset parameters acquired by the electronic device include: the posture of the electronic device and attribute information of the code scanning device. Whether to shield the payment code is determined based on the posture of the electronic device and the attribute information of the code scanning device.
  • the combination method specifically includes the following possible methods:
  • Method A first obtain the posture of the electronic device, and if the posture of the electronic device does not satisfy the first condition, then shield the payment code. If the posture of the electronic device satisfies the first condition, the image of the code scanning device is further acquired; if the image of the code scanning device does not meet the second condition, the payment code is masked; otherwise, the payment code is not masked. Alternatively, the image of the code scanning device is obtained first, and if the image of the code scanning device does not meet the second condition, the payment code is shielded. If the image of the code scanning device satisfies the second condition, the attitude of the electronic device is further obtained.
  • the payment code is shielded, otherwise, the payment code is not shielded.
  • the posture of the electronic device and the image of the code scanning device can be acquired at the same time, and if the posture of the electronic device does not meet the first condition and/or the image of the code scanning device does not meet the second condition, the payment code is masked.
  • Method B first acquire the posture of the electronic device, and if the posture of the electronic device does not satisfy the first condition, then shield the payment code. If the posture of the electronic device satisfies the first condition, the distance between the electronic device and the code scanning device is further determined, and if the distance does not meet the preset distance range, the payment code is shielded, otherwise, the payment code is not shielded. Alternatively, the distance between the electronic device and the code scanning device is obtained first, and if the distance does not meet the preset distance range, the payment code is shielded.
  • the posture of the electronic device is further obtained, and if the posture of the electronic device does not meet the first condition, the payment code is shielded, otherwise, the payment code is not shielded.
  • the posture of the electronic device and the distance between the electronic device and the code scanning device can also be obtained at the same time, if the posture of the electronic device does not meet the first condition and/or the distance between the electronic device and the code scanning device does not meet the preset distance range, the payment code will be masked.
  • Method C Obtain the posture of the electronic device, the image of the code scanning device, and determine the distance between the code scanning device and the electronic device. If the posture of the electronic device does not meet the first condition, and/or the image of the code scanning device does not meet the second condition conditions, and/or the distance between the code scanning device and the electronic device does not meet the preset distance range, the payment code will be shielded.
  • the aforementioned three preset parameters may be acquired (determined) successively or simultaneously.
  • the preset parameters acquired by the electronic device include: the posture of the electronic device, the attribute information of the code scanning device, and the ambient light intensity around the electronic device. Whether to shield the payment code is determined based on the posture of the electronic device, the attribute information of the code scanning device, and the ambient light intensity around the electronic device.
  • the combined methods specifically include the following methods:
  • Method a Obtain the posture of the electronic device, the image of the code scanning device, and the ambient light intensity around the electronic device, if the posture of the electronic device does not meet the first condition, and/or the image of the code scanning device does not meet the second condition, and/or Or if the ambient light intensity around the electronic device does not meet the third condition, the payment code is shielded.
  • the aforementioned three parameters may be acquired sequentially or simultaneously. In the case of sequential acquisition, please refer to the above method C for specific methods.
  • Method b Obtain the posture of the electronic device, the distance between the code scanning device and the electronic device, and the ambient light intensity around the electronic device. If the posture of the electronic device does not meet the first condition, and/or the distance between the code scanning device and the electronic device If the distance between them does not meet the preset distance range, and/or the ambient light intensity around the electronic device does not meet the third condition, the payment code is shielded.
  • the aforementioned three parameters may be acquired sequentially or simultaneously. In the case of sequential acquisition, please refer to the above method C for specific methods.
  • Method c Obtain the posture of the electronic device, the image of the code scanning device, the distance between the code scanning device and the electronic device, and the ambient light intensity around the electronic device. If the posture of the electronic device does not meet the first condition, and/or scan the code If the image of the device does not meet the second condition, and/or the distance between the code scanning device and the electronic device does not meet the preset distance range, and/or the ambient light intensity around the electronic device does not meet the third condition, the payment code will be checked Shield processing.
  • the aforementioned four parameters may be acquired sequentially, It can also be obtained at the same time.
  • sequential acquisition please refer to the above method C for specific methods.
  • the code scanning device may be a legal code scanning device, but it does not belong to the preset code scanning device, that is, the code scanning device is not counted in the preset code scanning device, for example: the new Scanning equipment.
  • This type of code scanning device may emit light, but for code scanning devices held by illegal elements, such as mobile phones counterfeited as code scanning devices, they may not emit light. Therefore, optionally, in the above implementation manner, in the case where the acquired preset parameters include the image of the code scanning device, if the image of the code scanning device does not meet the second condition, it is possible to further determine the light intensity of the code scanning device. Whether the light intensity (that is, the light intensity emitted by the code scanning device) meets the second preset light intensity range.
  • satisfying the second preset light intensity range may be specifically implemented as being greater than or equal to a certain value in the second preset light intensity range; it may also be specifically implemented as belonging to the second preset light intensity range. If the light intensity of the code scanning device does not meet the second preset light intensity range, the payment code is shielded; otherwise, the payment code is not shielded, that is, the payment code is displayed.
  • the second preset light intensity range may be the same as or different from the first preset light intensity range, and the second preset light intensity range may be determined based on empirical values, or set by developers according to actual needs.
  • the electronic device when the acquired preset parameters include the image of the code scanning device, if the image of the code scanning device does not belong to the preset image of the code scanning device, the electronic device performs shielding processing on the payment code.
  • the code scanning device is a legal code scanning device, but the image of the code scanning device is not included in the image of the preset code scanning device, and the user currently wants to display the payment code to complete the payment , but the electronic device has not displayed the payment code.
  • the electronic device can prompt the user to input verification information, which includes but is not limited to fingerprint information, face information and other information based on biometrics, password verification, gesture verification and other information based on authentication knowledge. Authentication and other information based on interactive operations, etc.
  • the verification method can be the default of the system, or the method of verifying information can be set by the user according to needs, such as fingerprint verification, face verification and so on.
  • the electronic device can prompt the user through the prompt information on the display interface after the payment code is shielded, such as the text prompt "restore the display by lightly pressing the fingerprint" in the interface 230 shown in Figure 2b; a new window can also pop up to prompt the user.
  • the electronic device may also prompt the user to input verification information so that the payment code is displayed.
  • the electronic device detects the verification information input by the user, and if the verification information is correct, the electronic device displays the payment code in response to the verification information.
  • the electronic device can also count the image of the code-scanning device into the image of the preset code-scanning device, that is, the image of the preset code-scanning device in the embodiment of the present application can be dynamically updated, so as to make the When using the aforementioned code scanning device, the payment code can be successfully displayed.
  • the interface 600 of the electronic device displays prompt information related to safe use of the payment code and privacy protection, and also includes a fingerprint button 601 . Then, the verification information input by the user is detected, for example: the user presses the fingerprint 601 lightly. If it is determined that the verification information input by the user is correct, the electronic device may display the payment code interface 210 in response to the fingerprint information input by the user. In the interface 210 The payment code 202 is displayed. Optionally, the electronic device may also add the image of the code scanning device to the preset image of the code scanning device.
  • the electronic device since the electronic device is close to the code scanning device when shielding the payment code, and then when the user inputs verification information, the electronic device may be far away from the code scanning device and close to the user. Therefore, in the time period before the payment code is scanned by the code scanning device, in order to prevent the displayed payment code from being stolen, the electronic device may again determine whether to shield the payment code based on the above implementation manner. Since the image of the code scanning device has been counted into the image of the preset code scanning device, when the user wants to use the payment code to complete the payment, the electronic device determines that the image of the code scanning device meets the judgment conditions, so it will automatically display the payment Code, so that users can complete the payment, this example will not affect the user's payment experience.
  • the interface 600 of the electronic device displays prompt information related to safe use of the payment code and privacy protection, and also includes a fingerprint button 601 .
  • detect the verification information input by the user for example: detect the user's operation of lightly pressing the fingerprint button 601 (that is, the operation of inputting fingerprint information), if it is determined that the verification information is correct, in response to the verification information, the electronic device can display the payment code interface 210 , the payment code 202 is displayed on the interface 210 . Then the electronic device counts the image of the code scanning device into the preset image of the code scanning device.
  • the electronic device can continue to determine whether to shield the payment code based on the above-mentioned implementation method. If it is determined to shield the payment code, the electronic device can jump to an interface such as The interface shown in 600. Finally, when the electronic device determines not to shield the payment code, the electronic device may display the payment code interface 210 to complete the payment.
  • the relative posture between the code scanning device and the electronic device can also be judged, and if the relative posture does not satisfy the preset condition, the payment code is shielded.
  • the relative posture is different from the posture of the electronic device described above, and the relative posture can be understood as the relative position between the electronic device and the code scanning device.
  • the relative posture can be used to judge whether the code scanning device can successfully scan the payment code on the electronic device. For example: After determining the posture of the code scanning device and the posture of the electronic device respectively, determine the difference between the two, that is, the relative posture of the two.
  • FIG. 7 it is a schematic diagram of the relative posture between the electronic device and the code scanning device provided in the embodiment of the present application.
  • relative posture 1 and relative posture 2 shown in FIG. 7 may be two boundary postures.
  • the boundary postures may include an angle between the payment code plane of the electronic device and the code scanning plane of the code scanning device.
  • the operation of scanning the payment code can be completed; otherwise, the operation of scanning the payment code cannot be completed.
  • the setting of the boundary posture can be set by the developer according to the actual needs, for example: when the payment code on the electronic device can be successfully scanned by different types of code scanning devices, the relative posture between the two is counted, and then set Corresponding boundary pose. For example, different boundary postures may be adopted for different types of code scanning devices, and the electronic device may select a corresponding boundary posture according to the acquired image of the code scanning device.
  • the payment code it is also possible to further determine whether the user is watching the screen of the electronic device. If it is determined that the user is watching the screen of the electronic device and the user belongs to a preset user, the payment code will not be blocked. Shielding processing, if it is determined that the user does not watch the screen of the electronic device, or it is determined that the user watching the screen of the electronic device does not belong to the preset user, then shielding processing is performed on the payment code.
  • the electronic device may acquire the user's face image, and if it is determined according to the face image that the user belongs to a preset user, and the user is looking at the screen of the electronic device, the electronic device does not block the payment code, that is, displays payment code. Otherwise, if it is determined according to the face image that the user does not belong to the preset user, and/or the user does not look at the screen of the electronic device, the electronic device will block the payment code.
  • the electronic device can also judge the distance between the user's face and the electronic device. If the distance between the user's face and the electronic device is less than or equal to the preset distance, the electronic device will not shield the payment code; otherwise, the payment code will be blocked. The code is masked. Alternatively, the electronic device can also determine whether the user's face is facing the screen of the electronic device. If the user's face is facing the screen of the electronic device, the electronic device does not shield the payment code, otherwise, shields the payment code. Alternatively, the electronic device can determine the distance between the user's face and the electronic device, and whether the user's face is facing the screen of the electronic device.
  • the payment code is not shielded, otherwise, if the distance between the user's face and the electronic device is greater than the preset distance, and/or the user's face is not facing the electronic device screen, the payment code is shielded deal with.
  • the preset distance may be set by developers according to actual needs, which is not limited in this application.
  • the relative posture between the electronic device and the code scanning device whether the user is looking at the screen of the electronic device, the distance between the user's face and the electronic device, whether the user's face is facing the screen of the electronic device, etc.
  • the preset parameters are used in combination to determine whether to shield the payment code.
  • the electronic device preliminarily determines that the payment code needs to be shielded or not shielded according to the above implementation method, after shielding the payment code or not Before the payment code is shielded, it is also possible to further determine whether to shield the payment code by detecting whether there is an abnormal trigger or risk interception in the system of the electronic device.
  • the electronic device can further detect whether there is an abnormal trigger in the system, and if there is no abnormal trigger, execute the preliminary judgment result. If there is an abnormal trigger, the electronic device may remind the user to input verification information, such verification information includes but not limited to fingerprint information, face information, password information and the like. If it is detected that the verification information input by the user is correct, the payment code is not shielded; otherwise, the payment code is shielded.
  • verification information includes but not limited to fingerprint information, face information, password information and the like.
  • abnormal triggering means that in the above-mentioned implementation methods, due to reasons such as misjudgment by the electronic device system, the obtained preset parameters meet the corresponding judgment conditions, but the judgment result of the electronic device is wrong, that is, the electronic device determines that payment needs to be made.
  • the code is masked. Therefore, the misjudgment can be corrected through human intervention (for example: inputting verification information).
  • the electronic device preliminarily determines not to shield the payment code according to the obtained preset parameters and corresponding judgment conditions, the electronic device further judges whether there is currently a risk interception in the system detecting the electronic device, and if it is determined that there is currently a risk interception in the electronic device system, The payment code is shielded; if it is determined that there is no risk interception in the system of the electronic device, the payment code is not shielded.
  • risk interception refers to the interception of unreasonable and/or illegal code scanning behaviors. Due to misjudgment by the electronic equipment system and other reasons, if the obtained parameters do not meet the corresponding judgment conditions, the final judgment result is that the payment code is not shielded, that is, the payment code is displayed directly, then after the payment code is displayed , the payment code may be scanned by a code scanning device. For example: suppose the posture of the electronic device does not meet the first condition, but at this time the electronic device detects that the code scanning behavior has occurred, the electronic device can determine that the code scanning behavior may be unreasonable, so the electronic device can intercept the behavior , to block the transaction.
  • Another example suppose the image of the code-scanning device does not meet the second condition, but the electronic device detects that a code-scanning behavior has occurred at this time, the electronic device can determine that the code-scanning behavior may be illegal, so the code-scanning device can also Intercept this behavior and prevent this transaction.
  • the electronic device may be in the bright screen state, the screen off state, or the unlocked state or Lock screen status. Therefore, in order to save power consumption of the electronic device in the embodiment of the present application, the electronic device may perform the above-mentioned relevant operations of judging whether to perform shielding processing on the payment code when the electronic device is in a certain state.
  • the state may be a screen-on state, a screen-on and unlocked state, and the like. Exemplarily, by defining a variable and identifying the value of the variable, it can be determined whether the mobile phone is in the on-screen state or the off-screen state.
  • variable value When the variable value is false, it is in the off-screen state. When the variable value is true, it is on. screen status. It is also possible to determine whether the mobile phone is in the locked screen state or the unlocked state by defining a variable and identifying the value of the variable. When the variable value is false, it is in the unlocked state, and when the variable value is true, it is in the locked screen state.
  • the operation of judging whether to shield the payment code can be performed in real time or periodically, which is not limited in the present application.
  • the embodiment of the present application can also count the number of times the user enters the verification information, each input Verify the results of information, the number of abnormal triggers, the reasons for abnormal triggers, etc., optimize the payment strategy of electronic devices, for example: update various preset thresholds, preset images of scanning code devices, etc.; will detect illegal Add the code scanning device to the blacklist, or prompt the user to mark the code scanning device to determine whether the code scanning device is a legitimate device; report various abnormal information to the cloud for aggregation processing, and/or statistical training, etc.
  • the display method provided by the embodiment of the present application can be applied to various types of electronic devices.
  • it can flexibly adjust the corresponding payment strategy according to its own needs.
  • multiple sets of payment strategies can be configured inside the electronic equipment system, which can be selected according to its own needs and power consumption requirements.
  • Corresponding payment strategies for example: for electronic devices (such as smart bracelets, smart watches, etc.) Judging whether to shield the payment code based on the attitude of the electronic device, of course, it can also be based on other conditions only; for electronic devices with low power consumption requirements, it can choose a payment strategy with high power consumption, such as based on the posture of the electronic device, the surrounding area of the electronic device, etc.
  • the ambient light intensity and the image of the electronic device determine whether to shield the payment code. It should be understood that, compared with the payment strategy with high power consumption, the determination accuracy of the payment strategy with high power consumption is higher.
  • the corresponding payment strategy can also be selected by the user according to requirements, for example, through setting application settings.
  • a setting application is installed in the electronic device.
  • the electronic device can jump to the interface 810, and the interface 810 , displaying Bluetooth options, desktop and wallpaper options, mobile network options, auxiliary function options, etc., the user can enter the payment mode setting interface through interface 810 .
  • the electronic device can jump to the interface 820, which includes one or more auxiliary functions, such as: one-handed mode, smart split screen, payment mode, etc.
  • the payment mode can be used to set the corresponding payment strategy. Assuming that the electronic device detects the user's click operation on the payment mode 803, the electronic device can jump to the interface 830, where multiple different payment modes are displayed on the interface 830, and the user can select the corresponding payment mode as required, and then set Determine the corresponding payment strategy.
  • the electronic device may determine whether to shield the payment code based on the posture of the electronic device in response to the setting of the user. Assuming that the user selects low power consumption (with a camera), the electronic device can determine whether to shield the payment code based on the attribute information of the code scanning device (for example: the image of the code scanning device) in response to the user's setting. Assuming that the user selects medium power consumption (no camera), the electronic device can determine whether to shield the payment code based on the posture of the electronic device and the ambient light intensity around the electronic device in response to the setting of the user.
  • the electronic device can determine whether to shield the payment code based on the posture of the electronic device, the ambient light intensity around the electronic device, and the attribute information of the code scanning device in response to the user's setting. .
  • each interface may include more or less content, or may include more or less interfaces.
  • the user before the successful payment, the user cannot know the payment amount, nor can he confirm whether the payment amount is correct. Only after the successful payment, the paid amount will be displayed on the electronic device.
  • the code-scanning device is embedded with illegal code-scanning software or micro-devices
  • the amount paid by the user may be greater than the actual amount of the product, causing property losses to the user.
  • the electronic device determines not to shield the payment code according to the above-mentioned implementation method, that is, after displaying the payment code, if the code scanning device scans the payment code on the electronic device, before the payment is successful, the electronic device The payment amount requested by the code scanning device can be obtained.
  • the amount of the payment code can be sent to the electronic device by the code scanning device, or it can be known by the electronic device through other means. For example: if the payment amount is displayed on the code scanning device, the electronic device can capture the payment on the code scanning The way to know the amount is not specifically limited in this application. It should be noted that this application does not limit the communication protocol and communication method between the electronic device and the code scanning device. Optionally, the electronic device can also determine whether the payment amount is correct.
  • the electronic device can display the payment amount, and the user confirms whether the payment amount is correct, and prompts the user to input verification information, which may be fingerprint information, face information, password information, and the like. If it is detected that the verification information entered by the user is correct, the transaction is completed; otherwise, the transaction is closed.
  • verification information may be fingerprint information, face information, password information, and the like.
  • the electronic device may determine whether the payment amount requested by the code scanning device is correct, and prompt the user to input verification information when the electronic device determines that the payment amount is incorrect. If it is detected that the verification information entered by the user is correct, the transaction is completed; otherwise, the transaction is closed.
  • the electronic device includes hardware structures and/or software modules corresponding to each function.
  • the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the technical solutions of the embodiments of the present application.
  • the embodiment of the present application may divide the electronic device into functional modules according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of units in the embodiment of the present application is schematic, and is only a logical function division, and there may be another division manner in actual implementation.
  • FIG. 9 it is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device 900 can be used to implement the methods described in the above method embodiments.
  • the electronic device 900 may specifically include: a processing unit 901 and a display unit 902.
  • the processing unit 901 is configured to acquire at least one preset parameter in response to the payment code opening operation; and is also configured to perform shielding processing on the payment code if there is at least one preset parameter that does not meet a corresponding preset condition.
  • the display unit 902 is configured to display the interface after the payment code is shielded.
  • the preset parameters include the attitude of the electronic device, and the corresponding preset condition is the first condition.
  • the attitude of the electronic device includes a pitch angle of the electronic device; the first condition includes: the pitch angle of the electronic device satisfies a first angle range.
  • the posture of the electronic device includes a flip angle of the electronic device; the first condition includes: the flip angle of the electronic device satisfies the second angle range; or, the posture of the electronic device includes a pitch angle and a flip angle of the electronic device.
  • the first condition includes: the pitch angle of the electronic device satisfies a first angle range, and the flip angle of the electronic device satisfies a second angle range.
  • the interface after the payment code is shielded includes prompt information, and the prompt information is used to prompt the user to make the electronic device display the payment code through operations.
  • the preset parameters also include ambient light intensity around the electronic device, and the corresponding preset condition is the third condition.
  • the third condition includes that the ambient light intensity around the electronic device changes, and the changed ambient light intensity around the electronic device satisfies the first preset light intensity range.
  • the preset parameters further include: the image of the code scanning device, and the corresponding preset condition is the second condition; the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device.
  • the preset parameters also include: the distance between the code scanning device and the electronic device, and the corresponding preset condition is the fourth condition.
  • the fourth condition includes that the distance between the code scanning device and the electronic device satisfies a preset distance range.
  • the preset parameters also include: the image of the code scanning device, the distance between the code scanning device and the electronic device; the preset condition corresponding to the image of the code scanning device is the second condition, the distance between the code scanning device and the electronic device The corresponding preset condition is the fourth condition.
  • the preset parameters also include the image of the code scanning device, and the corresponding preset condition is the second condition; when the image of the code scanning device does not meet the second condition, the payment code is shielded Before, the processing unit 901 is further configured to determine that the light intensity of the code scanning device does not meet the second preset light intensity range.
  • the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device.
  • the processing unit 901 is further configured to prompt the user to input verification information.
  • the display unit 902 is further configured to display the payment code in response to the verification information input by the user.
  • the display unit 902 is further configured to display the payment code if at least one preset parameter meets a corresponding preset condition.
  • the electronic device includes one or more of a mobile phone, a tablet computer, and a wearable device.
  • the electronic device 900 shown in FIG. 9 may also include a communication unit 903, which is used to support the electronic device 900 to perform the communication steps performed by the electronic device in the embodiment of the present application, for example: receiving a payment code opening instruction , receiving authentication information entered by the user, and so on.
  • a communication unit 903 which is used to support the electronic device 900 to perform the communication steps performed by the electronic device in the embodiment of the present application, for example: receiving a payment code opening instruction , receiving authentication information entered by the user, and so on.
  • the electronic device 900 shown in FIG. 9 may further include a storage unit (not shown in FIG. 9 ), where programs or instructions are stored in the storage unit.
  • a storage unit not shown in FIG. 9
  • programs or instructions are stored in the storage unit.
  • the processing unit 901 executes the program or instruction
  • the electronic device 900 shown in FIG. 9 can execute the display method described in the embodiment of the present application.
  • the processing unit 901 involved in the electronic device 900 shown in FIG. 9 may be implemented by a processor or processor-related circuit components, and may be a processor or a processing module.
  • the communication unit 903 may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module.
  • the display unit 902 may be implemented by components related to a display screen, and may include a display screen.
  • FIG. 10 it is a schematic structural diagram of another electronic device provided by the embodiment of the present application.
  • the electronic device 1000 can be used to implement the methods described in the above method embodiments.
  • the electronic device 1000 may specifically include: a parameter acquisition module 1001 and a payment code controllable display module 1002 .
  • the parameter acquisition module 1001 includes a posture detection and recognition module 1003 .
  • the parameter acquisition module 1001 is configured to acquire at least one preset parameter in response to the payment code opening operation.
  • the payment code controllable display module 1002 is used for shielding the payment code if there is at least one preset parameter that does not meet the corresponding preset condition.
  • the payment code controllable display module 1002 is also used to display the interface after the payment code is shielded.
  • the preset parameters include the posture of the electronic device acquired by the posture detection and recognition module 1003, and the corresponding preset condition is the first condition.
  • the attitude of the electronic device includes a pitch angle of the electronic device; the first condition includes: the pitch angle of the electronic device satisfies a first angle range.
  • the posture of the electronic device includes a flip angle of the electronic device; the first condition includes: the flip angle of the electronic device satisfies the second angle range; or, the posture of the electronic device includes a pitch angle and a flip angle of the electronic device.
  • the first condition includes: the pitch angle of the electronic device satisfies a first angle range, and the flip angle of the electronic device satisfies a second angle range.
  • the interface after the payment code is shielded includes prompt information, and the prompt information is used to prompt the user to make the electronic device display the payment code through operations.
  • the parameter acquisition module 1001 also includes an ambient light intensity detection and identification module 1004; the preset parameters also include the ambient light intensity around the electronic device acquired by the ambient light intensity detection and identification module 1004, and the corresponding preset conditions for the third condition.
  • the third condition includes that the ambient light intensity around the electronic device changes, and the changed ambient light intensity around the electronic device satisfies the first preset light intensity range.
  • the parameter acquisition module 1001 also includes a payment environment detection and identification module 1005;
  • the preset parameters also include: the image of the code scanning device acquired by the payment environment detection and identification module 1005, and the corresponding preset condition is the second Condition; the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device.
  • the preset parameters also include: the distance between the code scanning device and the electronic device acquired by the payment environment detection and identification module 1005, and the corresponding preset condition is the fourth condition.
  • the fourth condition includes that the distance between the code scanning device and the electronic device satisfies a preset distance range.
  • the preset parameters also include: the image of the code-scanning device acquired by the payment environment detection and identification module 1005 and the distance between the code-scanning device and the electronic device; the preset condition corresponding to the image of the code-scanning device is the second condition. The preset condition corresponding to the distance between the code device and the electronic device is the fourth condition.
  • the parameter acquisition module 1001 also includes a payment environment detection and identification module 1005;
  • the preset parameters also include: the image of the code scanning device acquired by the payment environment detection and identification module 1005, and the corresponding preset condition is the second Condition: when the image of the code scanning device does not meet the second condition, before shielding the payment code, the ambient light intensity detection and recognition module 1004 is also used to determine that the light intensity of the code scanning device does not meet the second preset light intensity range.
  • the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device.
  • the electronic device 1000 further includes a verification module 1006; after the interface with the payment code masked is displayed, the verification module 1006 is also configured to prompt the user to input verification information.
  • the payment code controllable display module 1002 is further configured to display the payment code in response to the verification information input by the user.
  • the payment code controllable display module 1002 is also used to display the payment code if at least one preset parameter meets a corresponding preset condition.
  • the electronic device includes one or more of a mobile phone, a tablet computer, and a wearable device.
  • the embodiment of the present application also provides a chip system, as shown in FIG. 11 , the chip system includes at least one processor 1101 and at least one interface circuit 1102 .
  • the processor 1101 and the interface circuit 1102 may be interconnected through wires.
  • interface circuitry 1102 may be used to receive signals from other devices.
  • the interface circuit 1102 may be used to send signals to other devices (such as the processor 1101).
  • the interface circuit 1102 can read instructions stored in the memory, and send the instructions to the processor 1101 .
  • the electronic device may be made to perform various steps performed by the electronic device in the foregoing embodiments.
  • the chip system may also include other discrete devices, which is not specifically limited in this embodiment of the present application.
  • processors in the chip system there may be one or more processors in the chip system.
  • the processor can be realized by hardware or by software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor implemented by reading software codes stored in a memory.
  • the memory can be integrated with the processor, or can be set separately from the processor, which is not limited in this application.
  • the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be respectively arranged on different chips.
  • the setting method of the processor is not specifically limited.
  • the chip system may be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC), It can also be a central processing unit (central processor unit, CPU), it can also be a network processor (network processor, NP), it can also be a digital signal processing circuit (digital signal processor, DSP), it can also be a microcontroller (micro controller unit, MCU), and can also be a programmable logic device (programmable logic device, PLD) or other integrated chips.
  • FPGA field programmable gate array
  • ASIC application specific integrated circuit
  • SoC system on chip
  • each step in the foregoing method embodiments may be implemented by an integrated logic circuit of hardware in a processor or instructions in the form of software.
  • the method steps disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
  • An embodiment of the present application provides a computer-readable storage medium, on which a computer program or instruction is stored, and when the computer program or instruction is run on a computer, the computer is made to execute the method described in the above method embodiment.
  • An embodiment of the present application provides a computer program product, and the computer program product includes: a computer program or an instruction.
  • the computer program product includes: a computer program or an instruction.
  • the embodiments of the present application also provide a device, which may specifically be a component or a module, and the device may include a connected processor and a memory; wherein, the memory is used to store computer-executable instructions, and when the device is running, the processor The computer-executable instructions stored in the memory can be executed, so that the device executes the methods in the foregoing method embodiments.
  • the electronic device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the above-mentioned provided The beneficial effects of the corresponding method will not be repeated here.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic disk or optical disk, and other various media that can store program instructions.

Abstract

The present application provides a display method and an electronic device, capable of improving the security of payment using a payment code for a consumer. The method is applied to an electronic device having a display screen, and the method comprises: acquiring at least one preset parameter in response to an operation starting a payment code; if at least one preset parameter does not meet a corresponding preset condition, shielding the payment code and displaying an interface of the display screen after the payment code is shielded. The preset parameter comprises a posture of the electronic device, and the corresponding preset condition is a first condition.

Description

显示方法及电子设备Display method and electronic device
本申请要求于2021年10月18日提交国家知识产权局、申请号为202111210854.9、发明名称为“显示方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office on October 18, 2021, with application number 202111210854.9, and the title of the invention is "Display Method and Electronic Device", the entire contents of which are incorporated in this application by reference.
技术领域technical field
本申请涉及电子设备技术领域,尤其涉及一种显示方法及电子设备。The present application relates to the technical field of electronic equipment, in particular to a display method and electronic equipment.
背景技术Background technique
目前,移动支付已成为消费者常用的支付方式,付款码已成为消费者进行移动支付时常用的电子信息,示例性的,付款码可以以二维码、条形码等形式呈现。通常情况下,收款方采用扫码设备扫描消费者持有的电子设备上的付款码即可完成付款。At present, mobile payment has become a commonly used payment method for consumers, and payment codes have become electronic information commonly used by consumers when making mobile payments. Exemplarily, the payment codes can be presented in the form of two-dimensional codes, barcodes, and the like. Usually, the payee uses a code scanning device to scan the payment code on the electronic device held by the consumer to complete the payment.
对于付款码,若使用得当可以让消费者便捷地完成买卖交易。若使用不当可能给消费者带来财产损失和/或安全风险,例如:实际生活中,消费者在采用付款码进行移动支付时,所处的支付环境中可能存在潜在的风险,处于打开状态的付款码,可能会被非法分子盗刷,和/或,被周围环境中存在的非法扫码设备盗刷,进而给消费者造成财产损失。For the payment code, if used properly, consumers can easily complete the transaction. Improper use may bring property damage and/or safety risks to consumers. For example, in real life, when consumers use payment codes for mobile payment, there may be potential risks in the payment environment. The payment code may be stolen by illegal elements, and/or stolen by illegal code scanning devices in the surrounding environment, causing property losses to consumers.
发明内容Contents of the invention
本申请提供一种显示方法及电子设备,能够提高消费者采用付款码进行支付的安全性。The present application provides a display method and an electronic device, which can improve the security of consumers using payment codes for payment.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above object, the application adopts the following technical solutions:
第一方面,本申请提供一种显示方法,应用于具有显示屏的电子设备,方法包括:响应于付款码开启操作,获取至少一个预设参数。若存在至少一个预设参数不满足对应的预设条件,对付款码进行屏蔽处理,显示屏蔽付款码后的界面。其中,预设参数包括电子设备的姿态,对应的预设条件为第一条件。In a first aspect, the present application provides a display method, which is applied to an electronic device with a display screen, and the method includes: acquiring at least one preset parameter in response to a payment code activation operation. If there is at least one preset parameter that does not meet the corresponding preset condition, the payment code is masked, and an interface after the payment code is masked is displayed. Wherein, the preset parameters include the attitude of the electronic device, and the corresponding preset condition is the first condition.
基于上述技术方案,可以基于电子设备的姿态识别出付款码的扫码空档期,在电子设备的姿态不满足第一条件的情况下,对付款码进行屏蔽处理,能够降低付款码被盗刷的风险,提高消费者采用付款码进行支付时的安全性。Based on the above technical solution, it is possible to identify the idle period for scanning the payment code based on the posture of the electronic device, and when the posture of the electronic device does not meet the first condition, the payment code is shielded, which can reduce the fraudulent use of the payment code risk, and improve the security of consumers when paying with payment codes.
一种可能的设计中,电子设备的姿态包括电子设备的俯仰角;第一条件包括:电子设备的俯仰角满足第一角度范围。或者,电子设备的姿态包括电子设备的翻转角;第一条件包括:电子设备的翻转角满足第二角度范围。或者,电子设备的姿态包括电子设备的俯仰角和翻转角;第一条件包括:电子设备的俯仰角满足第一角度范围,且电子设备的翻转角满足第二角度范围。由于付款码可能被非法分子从不同角度(例如:用户背后、侧方等)盗刷,因此基于该设计,考虑到电子设备的俯仰角和/或翻转角,俯仰角可以防止付款码被非法分子从用户背后盗刷,翻转角可以防止付款码被非法分子从用户侧方盗刷,能够进一步降低付款码被盗刷的风险,提高消费者采用付款码进行支付时的安全性。In a possible design, the attitude of the electronic device includes a pitch angle of the electronic device; the first condition includes: the pitch angle of the electronic device satisfies a first angle range. Alternatively, the attitude of the electronic device includes a flip angle of the electronic device; the first condition includes: the flip angle of the electronic device satisfies the second angle range. Alternatively, the attitude of the electronic device includes a pitch angle and a flip angle of the electronic device; the first condition includes: the pitch angle of the electronic device satisfies a first angle range, and the flip angle of the electronic device satisfies a second angle range. Since the payment code may be stolen by illegal elements from different angles (for example: user's back, side, etc.), based on this design, taking into account the pitch angle and/or flip angle of the electronic device, the pitch angle can prevent the payment code from being stolen by illegal elements. Swipe from the back of the user, and the flip angle can prevent the payment code from being stolen from the side of the user by illegal elements, which can further reduce the risk of the payment code being stolen, and improve the security of consumers when paying with the payment code.
一种可能的设计中,屏蔽付款码后的界面包括提示信息,提示信息用于提示用户通过操作以使得电子设备显示付款码。基于该设计,屏蔽付款码后的界面包括用于提 示用户通过操作使得电子设备显示付款码的提示信息,可以使得用户按照自己的需求根据提示信息操作,使得电子设备显示付款码。能够给用户带来更加直观的感知,且容易上手的操作体验。In a possible design, the interface after the payment code is shielded includes prompt information, and the prompt information is used to prompt the user to make the electronic device display the payment code through operations. Based on this design, the interface after shielding the payment code includes prompt information for prompting the user to make the electronic device display the payment code through operation, so that the user can operate according to the prompt information according to his own needs, so that the electronic device displays the payment code. It can bring users a more intuitive perception and an easy-to-use operating experience.
一种可能的设计中,预设参数还包括电子设备周围的环境光强,对应的预设条件为第三条件。第三条件包括电子设备周围的环境光强发生变化,且变化后的电子设备周围的环境光强满足第一预设光强范围。基于该设计,还可以基于电子设备周围的环境光强识别出付款码的扫码空档期,在电子设备周围的环境光强不满足第三条件的情况下,对付款码进行屏蔽处理,能够降低付款码被盗刷的风险,提高消费者采用付款码进行支付时的安全性。In a possible design, the preset parameters also include ambient light intensity around the electronic device, and the corresponding preset condition is the third condition. The third condition includes that the ambient light intensity around the electronic device changes, and the changed ambient light intensity around the electronic device satisfies the first preset light intensity range. Based on this design, it is also possible to identify the blank period for scanning the payment code based on the ambient light intensity around the electronic device. When the ambient light intensity around the electronic device does not meet the third condition, the payment code can be shielded, which can Reduce the risk of the payment code being stolen, and improve the security of consumers when using the payment code for payment.
一种可能的设计中,预设参数还包括:扫码设备的图像,对应的预设条件为第二条件;第二条件包括扫码设备的图像属于预设扫码设备的图像。或者,预设参数还包括:扫码设备与电子设备之间的距离,对应的预设条件为第四条件;第四条件包括扫码设备与电子设备之间的距离满足预设距离范围。或者,预设参数还包括:扫码设备的图像、扫码设备与电子设备之间的距离;扫码设备的图像对应的预设条件为第二条件,扫码设备与电子设备之间的距离对应的预设条件为第四条件。基于该设计,还可以基于扫描设备的图像和/或扫码设备与电子设备之间的距离判断是否对付款码进行屏蔽处理,扫码设备的图像可以用于确定扫码设备是否合法,扫码设备与电子设备之间的距离可以用于确定扫码设备是否合理,在扫码设备不合法性和/或合理性的情况下,对付款码进行屏蔽处理,能够降低付款码被盗刷的风险,提高消费者采用付款码进行支付时的安全性。In a possible design, the preset parameters further include: the image of the code scanning device, and the corresponding preset condition is the second condition; the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device. Alternatively, the preset parameters also include: the distance between the code scanning device and the electronic device, and the corresponding preset condition is the fourth condition; the fourth condition includes that the distance between the code scanning device and the electronic device satisfies a preset distance range. Alternatively, the preset parameters also include: the image of the code scanning device, the distance between the code scanning device and the electronic device; the preset condition corresponding to the image of the code scanning device is the second condition, the distance between the code scanning device and the electronic device The corresponding preset condition is the fourth condition. Based on this design, it is also possible to judge whether to shield the payment code based on the image of the scanning device and/or the distance between the scanning device and the electronic device. The image of the scanning device can be used to determine whether the scanning device is legal. The distance between the device and the electronic device can be used to determine whether the code scanning device is reasonable. If the code scanning device is illegal and/or reasonable, shielding the payment code can reduce the risk of the payment code being stolen , to improve the security of consumers when paying with payment codes.
一种可能的设计中,预设参数还包括,扫码设备的图像,对应的预设条件为第二条件;在扫码设备的图像不满足第二条件的情况下,对付款码进行屏蔽处理之前,方法还包括:确定扫码设备的光强不满足第二预设光强范围。其中,第二条件包括扫码设备的图像属于预设扫码设备的图像。在实际应用中,由于扫码设备可能是合法的扫码设备,但是不属于预设的扫码设备,也即预设扫码设备中未统计入该扫码设备,因此,基于该设计,在确定扫码设备不属于预设扫码设备的基础上,还可以进一步通过扫码设备的光强判断是否对付款码进行屏蔽处理。综合考虑到各种特殊的场景,使得对付款码的屏蔽处理更加符合实际需求,提高用户使用的流畅度以及舒适感。In a possible design, the preset parameters also include the image of the code scanning device, and the corresponding preset condition is the second condition; when the image of the code scanning device does not meet the second condition, the payment code is shielded Before, the method further includes: determining that the light intensity of the code scanning device does not satisfy the second preset light intensity range. Wherein, the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device. In practical applications, since the code scanning device may be a legal code scanning device, but it does not belong to the preset code scanning device, that is, the code scanning device is not counted in the preset code scanning device, therefore, based on this design, in On the basis of determining that the code scanning device does not belong to the preset code scanning device, it is further possible to judge whether to shield the payment code through the light intensity of the code scanning device. Comprehensive consideration of various special scenarios makes the shielding of payment codes more in line with actual needs, improving the fluency and comfort of users.
一种可能的设计中,显示屏蔽付款码后的界面之后,方法还包括:提示用户输入验证信息。响应于用户输入的验证信息,显示付款码。基于该设计,用户可以根据提示输入验证信息,使得付款码显示,通过人为干预的方式,使得付款码的屏蔽处理更加符合用户需求,提高用户使用的流畅度以及舒适感。In a possible design, after displaying the interface with the payment code shielded, the method further includes: prompting the user to input verification information. In response to the verification information entered by the user, the payment code is displayed. Based on this design, the user can input the verification information according to the prompt, so that the payment code is displayed. Through human intervention, the shielding process of the payment code is more in line with the user's needs, and the smoothness and comfort of the user's use are improved.
一种可能的设计中,方法还包括:若至少一个预设参数满足对应的预设条件,显示付款码。In a possible design, the method further includes: displaying the payment code if at least one preset parameter satisfies a corresponding preset condition.
一种可能的设计中,电子设备包括手机、平板电脑、可穿戴设备中的一种或多种。In a possible design, the electronic device includes one or more of a mobile phone, a tablet computer, and a wearable device.
第二方面,本申请提供一种电子设备,包括:处理器、存储器和显示屏,存储器、显示屏与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器从存储器中读取计算机指令,使得电子设备执行上述第一方面及其中任一设计所述的方法。In a second aspect, the present application provides an electronic device, including: a processor, a memory, and a display screen, the memory, the display screen and the processor are coupled, the memory is used to store computer program codes, and the computer program codes include computer instructions. The computer instruction is read from the memory, so that the electronic device executes the method described in the above first aspect and any one of the designs.
第三方面,本申请提供一种电子设备,该电子设备具有实现如上述第一方面及其中任一设计所述的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。In a third aspect, the present application provides an electronic device, which has a function of implementing the method described in the above first aspect and any one of the designs. This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware. The hardware or software includes one or more modules corresponding to the above functions.
第四方面,本申请提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序或指令,当计算机程序或指令在计算机上运行时,使得计算机执行上述第一方面及其中任一设计所述的方法。In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program or instruction is stored, and when the computer program or instruction is run on the computer, the computer executes the above-mentioned first aspect and any one of them. Design the method described.
第五方面,本申请提供一种计算机程序产品,计算机程序产品包括:计算机程序或指令,当计算机程序或指令在计算机上运行时,使得计算机执行上述第一方面及其中任一设计所述的方法。In the fifth aspect, the present application provides a computer program product, the computer program product includes: a computer program or instruction, when the computer program or instruction is run on the computer, the computer executes the method described in the above first aspect and any one of the designs .
第六方面,本申请提供一种芯片系统,包括至少一个处理器和至少一个接口电路,至少一个接口电路用于执行收发功能,并将指令发送给至少一个处理器,当至少一个处理器执行指令时,至少一个处理器执行如上述第一方面及其中任一设计所述的方法。In a sixth aspect, the present application provides a chip system, including at least one processor and at least one interface circuit, at least one interface circuit is used to perform the function of sending and receiving, and send instructions to at least one processor, when at least one processor executes the instruction , at least one processor executes the method described in the above first aspect and any one of the designs.
需要说明的是,上述第二方面至第六方面中任一设计所带来的技术效果可以参见第一方面中对应设计所带来的技术效果,此处不再赘述。It should be noted that, for the technical effects brought about by any design in the second aspect to the sixth aspect above, refer to the technical effects brought about by the corresponding design in the first aspect, which will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的一种电子设备的硬件结构示意图;FIG. 1 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application;
图2a为本申请实施例提供的一种对付款码进行屏蔽处理的相关界面示意图;FIG. 2a is a schematic diagram of a related interface for shielding payment codes provided by the embodiment of the present application;
图2b为本申请实施例提供的另一种对付款码进行屏蔽处理的相关界面示意图;Fig. 2b is a schematic diagram of another related interface for shielding the payment code provided by the embodiment of the present application;
图2c为本申请实施例提供的又一种对付款码进行屏蔽处理的相关界面示意图;Fig. 2c is a schematic diagram of another related interface for shielding the payment code provided by the embodiment of the present application;
图3a为本申请实施例提供的一种电子设备的俯仰角、翻转角的示意图;Fig. 3a is a schematic diagram of a pitch angle and a flip angle of an electronic device provided by an embodiment of the present application;
图3b为本申请实施例提供的又一种电子设备的俯仰角、翻转角的示意图;Fig. 3b is a schematic diagram of pitch angle and flip angle of another electronic device provided by the embodiment of the present application;
图4a为本申请实施例提供的一种付款码背向用户的示意图;Figure 4a is a schematic diagram of a payment code facing away from the user provided by the embodiment of the present application;
图4b为本申请实施例提供的一种付款码朝向用户的示意图;Fig. 4b is a schematic diagram of a payment code facing the user provided by the embodiment of the present application;
图5a为本申请实施例提供的一种利用付款码支付的场景示意图;Fig. 5a is a schematic diagram of a scenario of payment using a payment code provided by an embodiment of the present application;
图5b为本申请实施例提供的另一种利用付款码支付的场景示意图;Fig. 5b is a schematic diagram of another scenario of payment by payment code provided by the embodiment of the present application;
图5c为本申请实施例提供的又一种利用付款码支付的场景示意图;Fig. 5c is a schematic diagram of another scenario of payment by payment code provided by the embodiment of the present application;
图6a为本申请实施例提供的一种利用验证信息使得付款码显示的相关界面示意图;Fig. 6a is a schematic diagram of a related interface that utilizes verification information to display a payment code provided by an embodiment of the present application;
图6b为本申请实施例提供的一种利用验证信息使得付款码显示后,再次对付款码进行屏蔽处理的相关界面示意图;Fig. 6b is a schematic diagram of a relevant interface for masking the payment code again after the payment code is displayed using the verification information provided by the embodiment of the present application;
图7为本申请实施例提供的一种电子设备与扫码设备之间的相对姿态的示意图;FIG. 7 is a schematic diagram of a relative posture between an electronic device and a code scanning device provided in an embodiment of the present application;
图8为本申请实施例提供的一种设定支付策略的相关界面示意图;FIG. 8 is a schematic diagram of a relevant interface for setting a payment strategy provided by an embodiment of the present application;
图9为本申请实施例提供的一种电子设备的结构示意图;FIG. 9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
图10为本申请实施例提供的又一种电子设备的结构示意图;FIG. 10 is a schematic structural diagram of another electronic device provided in the embodiment of the present application;
图11为本申请实施例提供的一种芯片系统的结构示意图。FIG. 11 is a schematic structural diagram of a chip system provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图对本申请实施例提供的显示方法及电子设备进行详细的描述。The display method and the electronic device provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
本申请的描述中所提到的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设 备没有限定于已列出的步骤或单元,而是可选地还包括其他没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes other unlisted steps or units, or optionally also includes Other steps or elements inherent to the process, method, product or apparatus are included.
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.
在本申请的描述中,除非另有说明,“多个”的含义是指两个或两个以上。本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In the description of the present application, unless otherwise specified, the meaning of "plurality" refers to two or more. The "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist at the same time, and B exists alone These three situations. Words such as "first" and "second" do not limit the number and order of execution, and words such as "first" and "second" do not necessarily limit the difference.
目前,移动支付已成为消费者常用的支付方式,消费者在进行移动支付时,可以打开电子设备中的付款码,然后将该付款码展示给收款方以完成支付。在上述支付过程中,由于电子设备所处的支付环境可能存在潜在的风险,处于打开状态的付款码可能会被非法分子和/或其他非法设备盗刷,给用户造成财产损失。At present, mobile payment has become a commonly used payment method for consumers. When making mobile payment, consumers can open the payment code in the electronic device, and then show the payment code to the payee to complete the payment. During the above payment process, due to potential risks in the payment environment where the electronic device is located, the open payment code may be stolen by illegal elements and/or other illegal devices, causing property losses to users.
因此,为解决上述技术问题,本申请实施例提供一种显示方法,在使用付款码进行支付的过程中,和/或,在使用付款码完成支付之后,付款码页面未关闭的情况下,根据预设的判断条件确定是否对付款码进行屏蔽处理,能够提高消费者采用付款码进行支付时的安全性,保证消费者的财产安全。Therefore, in order to solve the above technical problems, the embodiment of the present application provides a display method, in the process of using the payment code to pay, and/or, after the payment code is used to complete the payment, and the payment code page is not closed, according to The preset judgment conditions determine whether to shield the payment code, which can improve the safety of consumers when using the payment code for payment and ensure the safety of consumers' property.
本申请实施例提供的显示方法可以应用于电子设备100中,或者应用于包含电子设备100的系统中。The display method provided by the embodiment of the present application may be applied to the electronic device 100 , or to a system including the electronic device 100 .
电子设备100可以是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备,本申请实施例对该电子设备的具体类型不作特殊限制。The electronic device 100 may be a cell phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, as well as a cellular phone, a personal digital assistant (personal digital assistant) digital assistant, PDA), augmented reality (augmented reality, AR) equipment, virtual reality (virtual reality, VR) equipment, artificial intelligence (artificial intelligence, AI) equipment, wearable The specific type of electronic equipment is not particularly limited.
示例性的,图1示出了电子设备100的一种结构图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括陀螺仪传感器180A,加速度传感器180B,指纹传感器180C,触摸传感器180D,环境光传感器180E、方向传感器180F、磁传感器180G、距离传感器180H等。Exemplarily, FIG. 1 shows a structural diagram of an electronic device 100 . The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195 wait. The sensor module 180 may include a gyroscope sensor 180A, an acceleration sensor 180B, a fingerprint sensor 180C, a touch sensor 180D, an ambient light sensor 180E, an orientation sensor 180F, a magnetic sensor 180G, a distance sensor 180H and the like.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器 (neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。The wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。在本申请的一些实施例中,显示屏194用于显示付款码。在本申请的又一些实施例中,显示屏194还用于显示屏蔽处理后的付款码。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1. In some embodiments of the present application, the display screen 194 is used to display payment codes. In some other embodiments of the present application, the display screen 194 is also used to display the shielded payment code.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可 以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的(red green blue,RGB),YUV等格式的图像信号。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard (red green blue, RGB), YUV and other image signals.
在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。在本申请的一些实施例中,摄像头193可以用于捕获扫码设备的图像。在本申请的另一些实施例中,处理器110可以根据摄像头193捕获的扫码设备的图像确定扫码设备和电子设备之间的距离,关于摄像头测距的具体原理请参考现有技术,本申请不再赘述。In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1. In some embodiments of the present application, the camera 193 can be used to capture the image of the code scanning device. In other embodiments of the present application, the processor 110 can determine the distance between the code scanning device and the electronic device according to the image of the code scanning device captured by the camera 193. For the specific principle of camera distance measurement, please refer to the prior art. The application will not be repeated.
在本申请的另一些实施例中,摄像头193还用于辅助识别电子设备与扫码设备的相对姿态,例如:处理器110根据摄像头193捕获的扫码设备的图像,确定电子设备与扫码设备之间的相对姿态,也即电子设备与扫码设备之间的相对位置。在本申请的另一些实施例中,摄像头193还可以用于捕获用户的验证信息,例如:人脸信息等。可选的,摄像头193可以是前置摄像头,也可以是后置摄像头,本申请对此不作限定。In other embodiments of the present application, the camera 193 is also used to assist in identifying the relative posture of the electronic device and the code scanning device. For example, the processor 110 determines the position of the electronic device and the code scanning device according to the image of the code scanning device captured by the camera 193. The relative posture between them, that is, the relative position between the electronic device and the code scanning device. In other embodiments of the present application, the camera 193 may also be used to capture user verification information, such as face information and the like. Optionally, the camera 193 may be a front camera or a rear camera, which is not limited in this application.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。在本申请的一些实施例中,NPU可以根据摄像头193捕获到的图像确定是否是扫码设备的图像,和/或确定用户是否正在注视电子设备屏幕。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like. In some embodiments of the present application, the NPU can determine whether the image captured by the camera 193 is the image of the code scanning device, and/or determine whether the user is looking at the screen of the electronic device.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。The internal memory 121 may be used to store computer-executable program codes including instructions. The internal memory 121 may include an area for storing programs and an area for storing data. The internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash memory (universal flash storage, UFS) and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
电子设备100可以通过音频模块170以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through the audio module 170 and the application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频 输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
陀螺仪传感器180A可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180A确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180A可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180A检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180A还可以用于导航,体感游戏场景。The gyro sensor 180A can be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 about three axes (ie, x, y and z axes) may be determined by the gyro sensor 180A. The gyro sensor 180A can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180A detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180A can also be used for navigation and somatosensory game scenes.
在本申请的一些实施例中,陀螺仪传感器180A还用于识别电子设备的姿态,例如:电子设备的俯仰角、翻转角等。In some embodiments of the present application, the gyro sensor 180A is also used to identify the attitude of the electronic device, for example, the pitch angle, roll angle, etc. of the electronic device.
加速度传感器180B可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。在本申请的一些实施例中,加速度传感器180B还可以用于识别电子设备的运动姿态,进而辅助确定电子设备的姿态。The acceleration sensor 180B can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. In some embodiments of the present application, the acceleration sensor 180B may also be used to identify the motion posture of the electronic device, thereby assisting in determining the posture of the electronic device.
指纹传感器180C用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。在本申请的一些实施例中,指纹传感器180C还用于接收用户输入的验证信息,例如:指纹信息。The fingerprint sensor 180C is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like. In some embodiments of the present application, the fingerprint sensor 180C is also used to receive authentication information input by the user, such as fingerprint information.
触摸传感器180D,也称“触控器件”。触摸传感器180D可以设置于显示屏194,由触摸传感器180D与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180D用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180D也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180D is also called "touch device". The touch sensor 180D can be disposed on the display screen 194, and the touch sensor 180D and the display screen 194 form a touch screen, also called “touch screen”. The touch sensor 180D is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180D may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
环境光传感器180E用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180E也可用于拍照时自动调节白平衡。环境光传感器180E还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180E is used for sensing ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180E can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180E can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
在本申请的一些实施例中,环境光传感器180E可以用于辅助识别扫码设备,例如:通过感知扫码设备发出的亮光,辅助识别扫码设备。In some embodiments of the present application, the ambient light sensor 180E may be used to assist in identifying the code-scanning device, for example, assisting in identifying the code-scanning device by sensing the bright light emitted by the code-scanning device.
在本申请的另一些实施例中,环境光传感器180E还可以用于辅助识别电子设备的姿态,例如:在环境光传感器180E设置于电子设备显示屏一侧时,考虑到光线的影响,在电子设备的显示屏朝向上方时,电子设备通过环境光传感器180E感知到的环境光可能较强,在电子设备的显示屏朝向下方时,电子设备通过环境光传感器180E感知到的环境光可能较弱,由此,环境光传感器180E可以用于辅助识别电子设备的姿态。In other embodiments of the present application, the ambient light sensor 180E can also be used to assist in identifying the posture of the electronic device. When the display screen of the device faces upward, the ambient light perceived by the electronic device through the ambient light sensor 180E may be strong; when the display screen of the electronic device faces downward, the ambient light sensed by the electronic device through the ambient light sensor 180E may be weak. Thus, the ambient light sensor 180E can be used to assist in recognizing the gesture of the electronic device.
方向传感器180F,也称为“姿态传感器”。在一些实施例中,可以通过方向传感器180F确定电子设备100围绕三个轴(即,x,y和z轴)的角速度,感应电子设备100方位的变化,进而确定出电子设备100所处的方位,例如:正竖、倒竖、左横、右横,仰、俯状态等。The direction sensor 180F is also called "attitude sensor". In some embodiments, the orientation sensor 180F can be used to determine the angular velocity of the electronic device 100 around three axes (namely, the x, y and z axes), sense the change of the orientation of the electronic device 100, and then determine the orientation of the electronic device 100 , such as: upright, upside down, left sideways, right sideways, upright, down, etc.
在本申请的一些实施例中,方向传感器180F可以用于识别电子设备的地理坐标, 确定电子设备显示屏的朝向,进而确定电子设备的姿态。In some embodiments of the present application, the orientation sensor 180F may be used to identify the geographic coordinates of the electronic device, determine the orientation of the display screen of the electronic device, and then determine the posture of the electronic device.
磁传感器180G包括霍尔传感器。电子设备100可以利用磁传感器180G检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180G includes a Hall sensor. The electronic device 100 may use the magnetic sensor 180G to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
在本申请的一些实施例中,磁传感器180G还可以用于辅助判断电子设备显示屏的朝向,进而确定电子设备的姿态。In some embodiments of the present application, the magnetic sensor 180G may also be used to assist in judging the orientation of the display screen of the electronic device, thereby determining the posture of the electronic device.
距离传感器180H,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180H测距以实现快速对焦。The distance sensor 180H is used to measure the distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180H for distance measurement to achieve fast focusing.
在本申请的一些实施例中,距离传感器180H还可用于测定电子设备与扫码设备之间的距离,和/或,用户人脸和电子设备屏幕之间的距离。In some embodiments of the present application, the distance sensor 180H can also be used to measure the distance between the electronic device and the code scanning device, and/or, the distance between the user's face and the screen of the electronic device.
可选的,传感器模块180还可以包括压力传感器,气压传感器,接近光传感器,温度传感器,骨传导传感器等。Optionally, the sensor module 180 may also include a pressure sensor, an air pressure sensor, a proximity light sensor, a temperature sensor, a bone conduction sensor, and the like.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。The SIM card interface 195 is used for connecting a SIM card. The SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
下面先结合附图,对本申请实施例提供的显示方法进行介绍。In the following, the display method provided by the embodiment of the present application will be introduced with reference to the accompanying drawings.
一种可能的示例中,电子设备检测到付款码开启指令(也即付款码开启操作),响应于该付款码开启指令,先显示付款码,然后获取预设参数,若预设参数满足对应的判断条件,则不对付款码进行屏蔽处理,若预设参数不满足对应的判断条件,则对付款码进行屏蔽处理。In a possible example, the electronic device detects a payment code opening instruction (that is, a payment code opening operation), responds to the payment code opening instruction, first displays the payment code, and then obtains preset parameters, if the preset parameters meet the corresponding If the judgment condition is not met, the payment code will not be shielded. If the preset parameters do not meet the corresponding judgment condition, the payment code will be shielded.
如图2a所示,电子设备检测到付款码开启指令,例如:检测到用户在界面200(界面200可以是用于打开付款码的相关界面)中对选项201的点击操作,响应于该指令,电子设备显示付款码,例如:电子设备可以跳转到界面210中,在界面210中显示有付款码202。然后电子设备获取预设参数,并根据预设参数是否满足对应的判断条件确定是否需要对付款码进行屏蔽处理。此处预设参数以及判断条件先不予介绍,后文将进行详尽的阐述。若确定需要对付款码进行屏蔽处理,则电子设备对付款码进行屏 蔽处理,之后,电子设备可以跳转到界面220。在界面220中,显示经过屏蔽处理的付款码。若确定不需要对付款码进行屏蔽处理,则电子设备继续呈现界面210。As shown in Figure 2a, the electronic device detects the payment code opening instruction, for example: detects the user's click operation on option 201 in the interface 200 (interface 200 may be a related interface for opening the payment code), in response to the instruction, The electronic device displays the payment code, for example, the electronic device can jump to the interface 210, and the payment code 202 is displayed on the interface 210. Then the electronic device acquires the preset parameters, and determines whether the payment code needs to be shielded according to whether the preset parameters meet the corresponding judgment conditions. The preset parameters and judgment conditions will not be introduced here, and will be explained in detail later. If it is determined that the payment code needs to be shielded, the electronic device will shield the payment code, and then the electronic device can jump to interface 220. In the interface 220, the shielded payment code is displayed. If it is determined that the payment code does not need to be shielded, the electronic device continues to present the interface 210 .
在一些可能的实现方式中,可以由界面210跳转到界面220,二者为不同的界面容器。在另一些可能的实现方式中,界面210与界面220为同一个界面容器,只不过该界面容器中的显示内容进行了更改,如由界面210中的内容更改为界面220中的内容。In some possible implementation manners, it is possible to jump from interface 210 to interface 220, and the two are different interface containers. In some other possible implementation manners, the interface 210 and the interface 220 are the same interface container, but the display content in the interface container is changed, for example, the content in the interface 210 is changed to the content in the interface 220 .
本申请实施例对屏蔽付款码后的显示界面的具体显示方式不作限定。在一些实现方式中,电子设备可以采用毛玻璃等模糊纹理的形式、马赛克图像、贴纸图像、部分显示(缺失显示)等方式显示付款码(即经过屏蔽处理后的付款码),该方式呈现的付款码不会被扫码设备识别出来。示例性的,如图2a中的界面220所示,以贴纸图像的方式遮盖付款码后显示。在另一些实现方式中,电子设备显示空白页面或提示文字,如“付款码已被屏蔽”、“检测到当前付款码页面朝上,请将付款码朝下以恢复显示,或对准扫码设备以恢复显示,或通过轻按指纹以恢复显示”等与付款码安全使用和隐私保护相关的提示信息。The embodiment of the present application does not limit the specific display manner of the display interface after the payment code is shielded. In some implementations, the electronic device can display the payment code (that is, the shielded payment code) in the form of fuzzy textures such as frosted glass, mosaic images, sticker images, partial display (missing display), etc. The payment code presented in this way The code will not be recognized by the scanning device. Exemplarily, as shown in the interface 220 in FIG. 2a, the payment code is displayed after being covered with a sticker image. In other implementations, the electronic device displays a blank page or prompt text, such as "The payment code has been blocked", "It is detected that the current payment code page is facing up, please turn the payment code down to resume display, or align the scanning code Device to restore the display, or tap the fingerprint to restore the display" and other prompts related to the safe use of payment codes and privacy protection.
可选的,该提示信息可以指示用户通过操作以使得电子设备显示付款码。可选的,该操作可以是提示信息指示的操作,也可以是其他操作。示例性的,如图2b中的界面230所示,显示有与付款码安全使用和隐私保护的提示信息。需要说明的是,本申请并不限定提示信息的具体内容,在实际应用中,提示信息的内容可以由预设参数以及对应的判断条件确定,根据预设参数以及判断条件的不同,提示信息的内容也可以不同。例如:假设预设参数包括电子设备的姿态,对应的预设条件为第一条件,则提示信息的内容可以为“检测到当前付款码页面朝上,请将付款码朝下以恢复显示”,此时用户可以将电子设备显示屏朝下以使得电子设备显示付款码。假设预设参数包括电子设备与扫码设备之间的距离,对应的预设条件为电子设备与扫码设备之间的距离满足预设距离范围,示例性的,满足预设距离范围可以具体实现为小于等于预设距离范围中的某个数值,则提示信息的内容可以为“检测到当前距离扫码设备过远,请将付款码靠近扫码设备以恢复显示”,此时用户可以将电子设备显示屏靠近付款码以使得电子设备显示付款码。Optionally, the prompt information may instruct the user to make the electronic device display the payment code through an operation. Optionally, the operation may be the operation indicated by the prompt information, or other operations. Exemplarily, as shown in the interface 230 in FIG. 2 b , prompt information related to safe use of the payment code and privacy protection is displayed. It should be noted that this application does not limit the specific content of the prompt information. In practical applications, the content of the prompt information can be determined by preset parameters and corresponding judgment conditions. The content can also be different. For example: assuming that the preset parameters include the posture of the electronic device, and the corresponding preset condition is the first condition, the content of the prompt message may be "It is detected that the current payment code page is facing up, please turn the payment code down to restore the display", At this time, the user can face down the display screen of the electronic device so that the electronic device displays the payment code. Assuming that the preset parameters include the distance between the electronic device and the code scanning device, the corresponding preset condition is that the distance between the electronic device and the code scanning device satisfies the preset distance range. Exemplarily, meeting the preset distance range can be specifically implemented is less than or equal to a certain value in the preset distance range, the content of the prompt message can be "It is detected that the current distance from the code scanning device is too far away, please bring the payment code close to the code scanning device to restore the display", at this time, the user can put the electronic The device display is positioned adjacent to the payment code such that the electronic device displays the payment code.
示例性的,在上述实现方式中,在屏蔽付款码后的显示界面中还可显示有指纹按钮,如图2b所示的界面230中指纹按钮203所示,便于用户后续输入验证信息。可选的,屏蔽付款码后的显示界面的显示方式可以是系统默认的,也可以由用户根据自身的需求选定屏蔽付款码后的显示界面的显示方式。Exemplarily, in the above implementation manner, a fingerprint button may also be displayed on the display interface after the payment code is shielded, as shown by the fingerprint button 203 in the interface 230 shown in FIG. Optionally, the display mode of the display interface after shielding the payment code may be the system default, or the user may select the display mode of the display interface after shielding the payment code according to his or her own needs.
上述示例中,响应于付款码开启指令,电子设备显示付款码之后,可能出现付款码显示后立即被屏蔽处理的情况,付款码显示的时间很短,但是付款码仍存在被非法扫描的风险。In the above example, after the electronic device displays the payment code in response to the payment code opening instruction, it may be blocked immediately after the payment code is displayed. The payment code is displayed for a short time, but the payment code still has the risk of being illegally scanned.
因此,为减少电子设备的工作流程,提高电子设备的工作效率,同时降低付款码被非法扫描的风险,本申请实施例还提供了另一种可能的示例。在另一种可能的示例中,电子设备检测到付款码开启指令,响应于该付款码开启指令,直接获取预设参数,若预设参数满足对应的判断条件,则不对付款码进行屏蔽处理,若预设参数不满足对应的判断条件,则对付款码进行屏蔽处理。在该示例中,电子设备检测到付款码开启 指令后,不再先打开付款码显示,而是直接获取预设参数进行是否对付款码屏蔽处理的判断过程。Therefore, in order to reduce the work flow of the electronic device, improve the work efficiency of the electronic device, and reduce the risk of the payment code being illegally scanned, the embodiment of the present application also provides another possible example. In another possible example, the electronic device detects a payment code activation instruction, and in response to the payment code activation instruction, directly obtains preset parameters, and if the preset parameters meet the corresponding judgment conditions, the payment code is not shielded. If the preset parameters do not meet the corresponding judgment conditions, the payment code is shielded. In this example, after the electronic device detects the command to open the payment code, it does not open the display of the payment code first, but directly obtains the preset parameters to determine whether to shield the payment code.
如图2c所示,电子设备检测到用户输入的付款码开启指令,例如:检测到用户在界面200中对选项201的点击操作,响应于该指令,电子设备获取预设参数,并根据预设参数是否满足判断条件确定当前是否需要对付款码进行屏蔽处理。若确定需要对付款码进行屏蔽处理,电子设备可以直接跳转到界面220。在界面220中,显示经过屏蔽处理的付款码。若确定不需要对付款码进行屏蔽处理,电子设备可以显示界面210,在界面210显示有付款码202。As shown in Figure 2c, the electronic device detects the payment code activation instruction input by the user, for example: detecting the user's click operation on the option 201 in the interface 200, in response to the instruction, the electronic device obtains the preset parameters, and according to the preset Whether the parameter meets the judgment condition determines whether the payment code needs to be shielded currently. If it is determined that the payment code needs to be shielded, the electronic device may directly jump to the interface 220 . In the interface 220, the shielded payment code is displayed. If it is determined that the payment code does not need to be shielded, the electronic device may display an interface 210 on which the payment code 202 is displayed.
下面结合具体的参数以及对应的判断条件,对本申请实施例提供的显示方法进行详细的介绍。The display method provided by the embodiment of the present application will be described in detail below in combination with specific parameters and corresponding judgment conditions.
一种可能的实现方式中,电子设备获取的预设参数为:电子设备的姿态,对应的判断条件为:电子设备的姿态是否满足第一条件。若电子设备的姿态满足第一条件,则不对付款码进行屏蔽处理,也即显示付款码;若电子设备的姿态不满足第一条件,则对付款码进行屏蔽处理。In a possible implementation manner, the preset parameter acquired by the electronic device is: the attitude of the electronic device, and the corresponding judgment condition is: whether the attitude of the electronic device satisfies the first condition. If the posture of the electronic device meets the first condition, the payment code is not shielded, that is, the payment code is displayed; if the posture of the electronic device does not meet the first condition, the payment code is shielded.
其中,电子设备的姿态可以包括电子设备与参考面之间所呈的角度。可选的,该角度包括电子设备的俯仰角、翻转角中的一种或多种。在其他可选的实现方式中,该角度还可以包括其他定义的角、或者其他名称的角等,本申请对此不作限定。由于电子设备的俯仰角、翻转角与选取的坐标系、参考面有关,因此在实际应用时,可以根据选取的坐标系、参考面灵活定义俯仰角、翻转角。在一种可能的定义中,电子设备的俯仰角指的是平行于电子设备显示屏并指向电子设备头部的向量与水平地面的夹角,翻转角指的是电子设备向左右侧面翻转时,电子设备的侧平面与参考面之间的夹角,在不同场景下,参考面有所不同。例如:在电子设备显示屏平行于水平地面时,参考面可以是水平地面。又例如:电子设备显示屏平行于水平地面,且电子设备未左右翻转的情况下,若电子设备的俯仰角发生变化(例如电子设备的头部向上抬起),参考面可以是与当前电子设备显示屏平行的平面。又例如:在电子设备显示屏垂直于水平地面时,参考面可以是与水平地面垂直的平面。Wherein, the posture of the electronic device may include an angle formed between the electronic device and the reference plane. Optionally, the angle includes one or more of a pitch angle and a flip angle of the electronic device. In other optional implementation manners, the angle may also include other defined angles, or angles with other names, etc., which are not limited in the present application. Since the pitch angle and flip angle of electronic equipment are related to the selected coordinate system and reference plane, in practical application, the pitch angle and flip angle can be flexibly defined according to the selected coordinate system and reference plane. In one possible definition, the pitch angle of an electronic device refers to the angle between a vector parallel to the display screen of the electronic device and pointing to the head of the electronic device and the horizontal ground, and the flip angle refers to when the electronic device is flipped to the left and right sides, The included angle between the side plane of the electronic device and the reference plane is different in different scenarios. For example: when the display screen of the electronic device is parallel to the horizontal ground, the reference plane may be the horizontal ground. Another example: when the display screen of the electronic device is parallel to the horizontal ground and the electronic device is not flipped left and right, if the pitch angle of the electronic device changes (for example, the head of the electronic device is lifted upwards), the reference surface can be the same as the current electronic device. Display parallel to the plane. Another example: when the display screen of the electronic device is perpendicular to the horizontal ground, the reference plane may be a plane perpendicular to the horizontal ground.
示例性的,如图3a所示,为本申请实施例提供的一种电子设备的俯仰角、翻转角的示意图。在该示例中,以电子设备右侧为x轴正方向,电子设备头部为y轴正方向,电子设备显示屏一侧为z轴正方向。图3a中的A为电子设备的俯仰角、B为电子设备的翻转角。其中,电子设备屏幕朝上,与地面平行时,俯仰角为0°,当电子设备头部向上抬起时,俯仰角为正值,反之,电子设备头部向下压时,俯仰角为负值。当电子设备屏幕朝上,与地面平行时,以平行地面为参考面,翻转角为0°,当电子设备右端(图3a所示的x轴正方向)向上翻转时,翻转角为正值,反之,电子设备右端向下翻转时,翻转角为负值。Exemplarily, as shown in FIG. 3 a , it is a schematic diagram of a pitch angle and a roll angle of an electronic device provided by an embodiment of the present application. In this example, the right side of the electronic device is the positive direction of the x-axis, the head of the electronic device is the positive direction of the y-axis, and the side of the display screen of the electronic device is the positive direction of the z-axis. A in FIG. 3 a is the pitch angle of the electronic device, and B is the flip angle of the electronic device. Among them, when the screen of the electronic device faces upward and is parallel to the ground, the pitch angle is 0°. When the head of the electronic device is lifted up, the pitch angle is positive. On the contrary, when the head of the electronic device is pressed down, the pitch angle is negative. value. When the screen of the electronic device is facing upwards and parallel to the ground, the flip angle is 0° with the parallel ground as the reference plane. When the right end of the electronic device (the positive direction of the x-axis shown in Figure 3a) is flipped upwards, the flip angle is positive. Conversely, when the right end of the electronic device is turned downward, the flip angle is a negative value.
如图3b所示,为本申请实施例提供又一种电子设备的俯仰角、翻转角的示意图。在该示例中,以电子设备右侧为x轴正方向,电子设备头部为y轴正方向,电子设备后置摄像头一侧为z轴正方向。图3b中的A为电子设备的俯仰角、B为电子设备的翻转角。其中,电子设备屏幕朝下,与地面平行时,俯仰角为0°,当电子设备头部向上抬起时,俯仰角为正值,反之,电子设备头部向下压时,俯仰角为负值。当电子设 备屏幕朝下,与地面平行时,以平行地面为参考面,翻转角为0°,当电子设备右端(图3b所示的x轴正方向)向上翻转时,翻转角为正值,反之,电子设备右端向下翻转时,翻转角为负值。As shown in FIG. 3 b , it is a schematic diagram of pitch angle and flip angle of another electronic device according to the embodiment of the present application. In this example, the right side of the electronic device is the positive direction of the x-axis, the head of the electronic device is the positive direction of the y-axis, and the rear camera side of the electronic device is the positive direction of the z-axis. A in FIG. 3 b is the pitch angle of the electronic device, and B is the flip angle of the electronic device. Among them, when the screen of the electronic device faces down and is parallel to the ground, the pitch angle is 0°. When the head of the electronic device is lifted up, the pitch angle is positive. Conversely, when the head of the electronic device is pressed down, the pitch angle is negative. value. When the screen of the electronic device faces down and is parallel to the ground, the flip angle is 0° with the parallel ground as the reference plane. When the right end of the electronic device (the positive direction of the x-axis shown in Figure 3b) is flipped upward, the flip angle is positive. Conversely, when the right end of the electronic device is turned downward, the flip angle is a negative value.
电子设备可以通过陀螺仪传感器、方向传感器、加速度传感器中的一种或多种获取电子设备的重力感应数据,进而根据该感应数据计算出电子设备的俯仰角、翻转角等。当然,电子设备也可以通过其他传感器和/或其他方式确定出电子设备的俯仰角、翻转角等,本申请对此不作限定。The electronic device can obtain the gravity sensing data of the electronic device through one or more of the gyroscope sensor, the direction sensor, and the acceleration sensor, and then calculate the pitch angle, flip angle, etc. of the electronic device based on the sensing data. Of course, the electronic device may also determine the pitch angle, roll angle, etc. of the electronic device through other sensors and/or other methods, which is not limited in this application.
在电子设备姿态为电子设备的俯仰角的情况下,所述电子设备的姿态满足第一条件具体包括:电子设备的俯仰角满足第一角度范围。示例性的,第一角度范围可以是大于等于第一阈值且小于等于第二阈值,也可以是大于等于第一阈值,还可以是小于等于第二阈值,第二阈值大于第一阈值。第一角度范围可以灵活设定,本申请对此不作具体限定。在电子设备的姿态为电子设备的翻转角的情况下,所述电子设备的姿态满足第一条件具体包括:电子设备的翻转角满足第二角度范围,第二角度范围可以是大于等于第三阈值且小于等于第四阈值,也可以是大于等于第三阈值,还可以是小于等于第四阈值。第二角度范围也可以灵活设定,本申请对此也不作具体限定。在电子设备的姿态为电子设备的俯仰角和翻转角的情况下,所述电子设备的姿态满足第一条件具体包括:电子设备的俯仰角满足第一角度范围,且电子设备的翻转角满足第二角度范围。可选的,第一角度范围与第二角度范围可以相同也可以不同。In the case that the attitude of the electronic device is the pitch angle of the electronic device, the attitude of the electronic device meeting the first condition specifically includes: the pitch angle of the electronic device satisfies the first angle range. Exemplarily, the first angle range may be greater than or equal to the first threshold and less than or equal to the second threshold, or greater than or equal to the first threshold, or less than or equal to the second threshold, and the second threshold is greater than the first threshold. The first angle range can be flexibly set, which is not specifically limited in the present application. In the case where the posture of the electronic device is the flip angle of the electronic device, the posture of the electronic device meeting the first condition specifically includes: the flip angle of the electronic device satisfies the second angle range, and the second angle range may be greater than or equal to the third threshold and be less than or equal to the fourth threshold, may also be greater than or equal to the third threshold, or may be less than or equal to the fourth threshold. The second angle range can also be flexibly set, which is not specifically limited in the present application. In the case where the attitude of the electronic device is the pitch angle and the flip angle of the electronic device, the attitude of the electronic device meeting the first condition specifically includes: the pitch angle of the electronic device satisfies the first angle range, and the flip angle of the electronic device satisfies the first condition. Two angle ranges. Optionally, the first angle range and the second angle range may be the same or different.
其中,第一阈值、第二阈值的设定与电子设备显示屏的朝向有关,也与参考的坐标系有关。本申请实施例中电子设备的俯仰角包括了电子设备屏幕朝上时的俯仰角以及电子设备屏幕朝下时的俯仰角。Wherein, the settings of the first threshold and the second threshold are related to the orientation of the display screen of the electronic device, and are also related to the reference coordinate system. The pitch angle of the electronic device in the embodiment of the present application includes the pitch angle when the screen of the electronic device faces up and the pitch angle when the screen of the electronic device faces down.
下文给出第一阈值、第二阈值、第三阈值、第四阈值的一种设定方式。A setting method of the first threshold, the second threshold, the third threshold, and the fourth threshold is given below.
在一些可能的使用场景中,用户所面向的环境处于用户的视野范围之内,用户可以看到或者观察到当前视野内是否存在非法扫码设备,当付款码面向用户所面对的环境时(例如:付款码背对用户时),付款码被盗刷的风险较低。示例性的,如图4a所示,为付款码背对用户的示意图。In some possible usage scenarios, the environment facing the user is within the user's field of vision, and the user can see or observe whether there is an illegal scanning device in the current field of vision. When the payment code faces the environment facing the user ( For example: when the payment code is facing away from the user), the risk of the payment code being stolen is low. Exemplarily, as shown in Fig. 4a, it is a schematic diagram of the payment code facing away from the user.
在另一些可能的使用场景中,当付款码朝向用户时,由于用户观察不到的地方(例如:后方、侧后方等)可能会存在非法分子和/或非法设备,因此付款码被盗刷的风险较高。示例性的,如图4b所示,为付款码朝向用户的示意图。因此,本申请实施例中,在设定上述第一阈值、第二阈值、第三阈值、第四阈值时考虑到该场景下电子设备的俯仰角、翻转角可能的大小。In other possible usage scenarios, when the payment code faces the user, there may be illegal elements and/or illegal equipment in places that the user cannot observe (for example: rear, side rear, etc.), so the payment code is stolen. The risk is higher. Exemplarily, as shown in Fig. 4b, it is a schematic diagram of the payment code facing the user. Therefore, in the embodiment of the present application, when setting the first threshold, the second threshold, the third threshold, and the fourth threshold, the possible sizes of the pitch angle and flip angle of the electronic device in this scenario are considered.
示例性的,如图5a所示,假设扫码设备为扫码枪,由于扫码枪与付款码通常为前后位置的关系,用户为完成扫码的操作,可能将电子设备的显示屏朝向上方。以图3a所示的坐标系为参考,在该示例下,考虑到用户手持电子设备的习惯,例如:当电子设备的俯仰角大于等于-90°且小于等于45°时,电子设备上的付款码的朝向位于用户的视野范围之内,可能不容易被盗刷。因此,在本申请实施例中,当电子设备的俯仰角位于该范围之内时,无需对付款码进行屏蔽处理。示例性的,图5a中的俯仰角A大于0°。Exemplarily, as shown in Figure 5a, assuming that the code scanning device is a code scanning gun, because the relationship between the code scanning gun and the payment code is usually front and back, the user may turn the display screen of the electronic device upwards in order to complete the code scanning operation . Taking the coordinate system shown in Figure 3a as a reference, in this example, considering the habit of the user holding the electronic device, for example: when the pitch angle of the electronic device is greater than or equal to -90° and less than or equal to 45°, the payment on the electronic device The orientation of the code is within the user's field of vision and may not be easily stolen. Therefore, in the embodiment of the present application, when the pitch angle of the electronic device is within the range, the payment code does not need to be shielded. Exemplarily, the pitch angle A in Fig. 5a is greater than 0°.
示例性的,如图5b所示,假设扫码设备为扫码盒子,用户为完成扫码的操作,可 能将电子设备的显示屏朝向地面,也即付款码可能是朝向地面的。以图3b所示的坐标系为参考,考虑到用户手持电子设备的习惯,例如:当电子设备与地面之间的夹角大于等于0°且小于等于90°时,电子设备上的付款码的朝向位于用户的视野范围之内,可能不容易被盗刷。因此,在本申请实施例中,当电子设备的俯仰角位于该范围之内时,无需对付款码进行屏蔽处理。Exemplarily, as shown in Figure 5b, assuming that the code scanning device is a code scanning box, the user may turn the display screen of the electronic device toward the ground in order to complete the code scanning operation, that is, the payment code may face the ground. Taking the coordinate system shown in Figure 3b as a reference, considering the habit of the user holding the electronic device, for example: when the angle between the electronic device and the ground is greater than or equal to 0° and less than or equal to 90°, the payment code on the electronic device The orientation is within the user's field of vision and may not be easily stolen. Therefore, in the embodiment of the present application, when the pitch angle of the electronic device is within the range, the payment code does not need to be shielded.
示例性,如图5c所示,在电子设备的显示屏朝下的情况下,用户手持电子设备时,用户手臂可能垂直于地面,此时电子设备上的付款码可能朝向用户背后,存在被盗刷的风险。还是以图3b所示的坐标系为参考,考虑到该示例下用户手持电子设备的习惯,例如:当电子设备的俯仰角大于等于-45°且小于等于90°时,付款码的朝向位于用户的视野范围之内,或者,付款码的朝向(例如:电子设备显示屏朝下,且平行于地面时)使得其不易被扫描,电子设备上的付款码不易被盗刷。因此,在申请实施例中,当电子设备的俯仰角位于该范围之内时,无需对付款码进行屏蔽处理。Exemplarily, as shown in Figure 5c, when the display screen of the electronic device is facing down, when the user holds the electronic device, the user's arm may be perpendicular to the ground, and the payment code on the electronic device may face the user's back at this time, which may be stolen. Risk of brushing. Still taking the coordinate system shown in Figure 3b as a reference, considering the habit of the user holding the electronic device in this example, for example: when the pitch angle of the electronic device is greater than or equal to -45° and less than or equal to 90°, the direction of the payment code is at the user's Or, the orientation of the payment code (for example, when the display screen of the electronic device is facing down and parallel to the ground) makes it difficult to be scanned, and the payment code on the electronic device is not easy to be stolen. Therefore, in the embodiment of the application, when the pitch angle of the electronic device is within the range, the payment code does not need to be shielded.
在图5c所示的示例中,还可能出现电子设备的显示屏垂直于地面的情况,在一些可能的场景下,电子设备上的付款码可能不容易被盗刷,例如:当电子设备的显示屏朝向用户一侧时,由于用户身体的遮挡,付款码可能不容易被盗刷。在另一些可能的场景下,可能存在被盗刷的风险。例如:当电子设备的显示屏朝向用户背后时,或者,当电子设备的显示屏背向用户一侧时,可能存在被盗刷的风险。此时,可以通过翻转角的大小来判断是否对付款码进行屏蔽处理。以图3a所示的坐标系为参考,以电子设备显示屏朝向用户,且与用户身体所呈的平面垂直时,电子设备所在的平面为参考面,例如:当电子设备的翻转角大于等于-90°且小于等于45°时,电子设备上的付款码处于用户的视野范围之内,或者被用户身体遮挡,付款码被盗刷风险较低。因此,在申请实施例中,当电子设备的翻转角位于该范围之内时无需对付款码进行屏蔽处理。In the example shown in Figure 5c, it is also possible that the display screen of the electronic device is vertical to the ground. In some possible scenarios, the payment code on the electronic device may not be easily stolen. When the screen is facing the user's side, the payment code may not be easily swiped due to the user's body shielding. In other possible scenarios, there may be a risk of being stolen. For example: when the display screen of the electronic device faces the back of the user, or when the display screen of the electronic device faces away from the side of the user, there may be a risk of being stolen. At this time, whether to shield the payment code can be judged by the size of the flip angle. Taking the coordinate system shown in Figure 3a as a reference, when the display screen of the electronic device faces the user and is perpendicular to the plane formed by the user's body, the plane where the electronic device is located is the reference plane, for example: when the flip angle of the electronic device is greater than or equal to - When the angle is 90° and less than or equal to 45°, the payment code on the electronic device is within the user's field of vision, or is blocked by the user's body, and the risk of the payment code being stolen is low. Therefore, in the embodiment of the application, when the flip angle of the electronic device is within this range, there is no need to perform shielding processing on the payment code.
示例性的,第一阈值可以为-45°,第二阈值可以为45°,第三阈值可以为-45°,第四阈值可以为45°。本申请对第一阈值、第二阈值、第三阈值、第四阈值的取值不作具体限定,开发人员可以根据实际需求进行设定,当然也可以根据用户的使用习惯灵活调整相应的阈值。需要说明的是,对于不同的参考坐标系来讲,电子设备在某一坐标系下的俯仰角、翻转角可以对应的换算为另一坐标系下的俯仰角、翻转角。Exemplarily, the first threshold may be -45°, the second threshold may be 45°, the third threshold may be -45°, and the fourth threshold may be 45°. This application does not specifically limit the values of the first threshold, the second threshold, the third threshold, and the fourth threshold. Developers can set them according to actual needs, and of course they can flexibly adjust the corresponding thresholds according to users' usage habits. It should be noted that, for different reference coordinate systems, the pitch angle and flip angle of the electronic device in a certain coordinate system can be correspondingly converted into the pitch angle and flip angle in another coordinate system.
可选的,电子设备还可以通过电子设备周围的环境光强,来辅助识别电子设备的姿态。通常情况而言,假设环境光传感器设置于电子设备显示屏一侧,当电子设备的显示屏朝上(也即背向地面)时,可能由于光线等原因,电子设备显示屏可以感知到的环境光较强,相反,当电子设备的显示屏朝下时,也即朝向地面时,电子设备显示屏可以感知到的环境光较弱。因此,本申请实施例中,通过电子设备显示屏感知到的环境光强来辅助识别电子设备的姿态。Optionally, the electronic device may also assist in identifying the posture of the electronic device through the intensity of ambient light around the electronic device. Generally speaking, assuming that the ambient light sensor is set on one side of the display screen of the electronic device, when the display screen of the electronic device is facing up (that is, facing away from the ground), the environment that the display screen of the electronic device can perceive may be due to light or other reasons. On the contrary, when the display screen of the electronic device faces downward, that is, when it faces the ground, the ambient light that the display screen of the electronic device can perceive is weak. Therefore, in the embodiment of the present application, the gesture recognition of the electronic device is assisted by the ambient light intensity sensed by the display screen of the electronic device.
另一种可能的实现方式中,电子设备获取的预设参数为:扫码设备的属性信息,对应的判断条件为:扫码设备的属性信息是否满足第二条件。若扫码设备的属性信息不满足第二条件,则对付款码进行屏蔽处理;否则,不对付款码进行屏蔽处理,也即显示该付款码。In another possible implementation manner, the preset parameter acquired by the electronic device is: attribute information of the code scanning device, and the corresponding judgment condition is: whether the attribute information of the code scanning device satisfies the second condition. If the attribute information of the code scanning device does not meet the second condition, the payment code is shielded; otherwise, the payment code is not shielded, that is, the payment code is displayed.
扫码设备的属性信息包括以下一种或多种:扫码设备的图像、扫码设备与电子设备之间的距离。The attribute information of the code scanning device includes one or more of the following: an image of the code scanning device, and a distance between the code scanning device and the electronic device.
可选的,在该实现方式下,具体包括以下可能的方式:Optionally, in this implementation mode, the following possible ways are specifically included:
方式1:扫码设备的属性信息包括扫码设备的图像。Method 1: The attribute information of the code scanning device includes an image of the code scanning device.
在该方式下,扫码设备的属性信息满足第二条件具体包括:扫码设备的图像属于预设扫码设备的图像。其中,预设扫码设备的图像可以是目前生活中常用或常见的扫码设备,例如:扫码枪、扫码盒子等等。相应的,扫码设备的属性信息不满足第二条件具体包括:扫码设备的图像不属于预设扫码设备的图像,如仿冒成扫码设备或具有扫码功能的手机、被恶意篡改后的扫码设备等。In this manner, the attribute information of the code scanning device meeting the second condition specifically includes: the image of the code scanning device belongs to the image of the preset code scanning device. Wherein, the image of the preset code scanning device may be a commonly used or common code scanning device in daily life, for example: a code scanning gun, a code scanning box, and the like. Correspondingly, the attribute information of the code-scanning device does not meet the second condition specifically includes: the image of the code-scanning device does not belong to the image of the preset code-scanning device, such as counterfeiting a code-scanning device or a mobile phone with a code-scanning function, after being maliciously tampered with Scanning equipment, etc.
示例性的,本申请实施例中可以通过训练模型(如做图像的特征提取和特征识别等)的方式得到常用扫码设备的图像,并将这些扫码设备的图像确定为预设扫码设备的图像。其中,具体的模型训练方法请参考现有技术,本文不再赘述。Exemplarily, in the embodiment of the present application, images of commonly used code scanning devices can be obtained by training models (such as image feature extraction and feature recognition, etc.), and the images of these code scanning devices can be determined as preset code scanning devices Image. For the specific model training method, please refer to the prior art, which will not be repeated here.
方式2:扫码设备的属性信息包括扫码设备与电子设备之间的距离。Mode 2: The attribute information of the code scanning device includes the distance between the code scanning device and the electronic device.
在该方式下,扫码设备的属性信息满足第二条件,具体包括:扫码设备与电子设备之间的距离满足预设距离范围。示例性的,满足预设距离范围可以具体实现为小于等于预设距离范围中的某个数值;还可以具体实现为处于预设距离范围之内。相应的,扫码设备的属性信息不满足第二条件,具体包括:扫码设备与电子设备之间的距离不满足预设距离范围。示例性的,不满足预设距离范围可以具体实现为大于预设距离范围中的某个数值;还可以具体实现为处于预设距离范围之外。其中,该预设距离范围可以根据扫码设备与电子设备之间能够完成付款操作的距离确定,开发人员可以根据实际需求设定该预设距离范围,本申请对此不作限定。In this manner, the attribute information of the code scanning device satisfies the second condition, which specifically includes: the distance between the code scanning device and the electronic device meets a preset distance range. Exemplarily, meeting the preset distance range may be specifically implemented as being less than or equal to a certain value in the preset distance range; it may also be specifically implemented as being within the preset distance range. Correspondingly, the attribute information of the code scanning device does not meet the second condition, specifically including: the distance between the code scanning device and the electronic device does not meet the preset distance range. Exemplarily, failing to meet the preset distance range may be specifically implemented as being greater than a certain value in the preset distance range; it may also be specifically implemented as being outside the preset distance range. Wherein, the preset distance range can be determined according to the distance between the code scanning device and the electronic device that can complete the payment operation, and the developer can set the preset distance range according to actual needs, which is not limited in this application.
方式3:扫码设备的属性信息包括扫码设备的图像以及扫码设备与电子设备之间的距离。Mode 3: The attribute information of the code scanning device includes the image of the code scanning device and the distance between the code scanning device and the electronic device.
在该方式下,扫码设备的属性信息满足第二条件具体包括:扫码设备的图像属于预设扫码设备的图像,且扫码设备与电子设备之间的距离满足预设距离范围。相应的,扫码设备的属性信息不满足第二条件具体包括:扫码设备的图像不属于预设扫码设备的图像,和/或扫码设备与电子设备之间的距离不满足预设距离范围。In this manner, the attribute information of the code scanning device meeting the second condition specifically includes: the image of the code scanning device belongs to the image of the preset code scanning device, and the distance between the code scanning device and the electronic device satisfies a preset distance range. Correspondingly, the attribute information of the code scanning device does not meet the second condition specifically includes: the image of the code scanning device does not belong to the image of the preset code scanning device, and/or the distance between the code scanning device and the electronic device does not meet the preset distance scope.
又一种可能的实现方式中,电子设备获取的预设参数为:电子设备周围的环境光强,对应的判断条件为:电子设备周围的环境光强是否满足第三条件。若电子设备周围的环境光强不满足第三条件,则对付款码进行屏蔽处理,否则,不对付款码进行屏蔽处理。In yet another possible implementation manner, the preset parameter acquired by the electronic device is: ambient light intensity around the electronic device, and the corresponding judgment condition is: whether the ambient light intensity around the electronic device satisfies the third condition. If the ambient light intensity around the electronic device does not meet the third condition, the payment code is shielded, otherwise, the payment code is not shielded.
在该实现方式中,通过测定环境光强可以侧面说明电子设备周围是否存在扫码设备,和/或电子设备与扫码设备之间的距离远近。例如:假设电子设备周围的环境光强由弱变强,则说明电子设备可能正在靠近扫码设备。又例如:假设电子设备周围的环境光强由强变弱,则说明电子设备可能正在远离扫码设备。因此,可以基于电子设备周围的环境光强确定是否对付款码进行屏蔽处理。In this implementation manner, whether there is a code scanning device around the electronic device, and/or the distance between the electronic device and the code scanning device can be explained laterally by measuring the ambient light intensity. For example: assuming that the ambient light intensity around the electronic device changes from weak to strong, it means that the electronic device may be approaching the code scanning device. Another example: assuming that the ambient light intensity around the electronic device changes from strong to weak, it means that the electronic device may be moving away from the code scanning device. Therefore, it may be determined based on the ambient light intensity around the electronic device whether to shield the payment code.
其中,第三条件为电子设备周围的环境光强发生变化,且电子设备周围的环境光强满足第一预设光强范围。或者,第三条件为电子设备周围的环境光强满足第一光强范围。示例性的,满足第一预设光强范围可以具体实现为大于等于第一预设光强范围中的某个数值。可选的,可以统计各种类型扫码设备所发出的亮光强度,并根据统计的亮光强度确定该第一预设光强范围,例如:第一预设光强范围中的某个数值可以为 各亮光强度中的最小值。示例性的,满足第一预设光强范围还可以具体实现为属于第一预设光强范围。该第一预设光强范围可以为一个区间,即各种类型的扫码设备所发出的亮光强度都位于该区间。Wherein, the third condition is that the ambient light intensity around the electronic device changes, and the ambient light intensity around the electronic device satisfies the first preset light intensity range. Alternatively, the third condition is that the ambient light intensity around the electronic device satisfies the first light intensity range. Exemplarily, satisfying the first preset light intensity range may be specifically implemented as being greater than or equal to a certain value in the first preset light intensity range. Optionally, the light intensity emitted by various types of code scanning devices can be counted, and the first preset light intensity range can be determined according to the statistical light intensity. For example, a certain value in the first preset light intensity range can be The minimum value of each brightness intensity. Exemplarily, meeting the first preset light intensity range may also be specifically implemented as belonging to the first preset light intensity range. The first preset light intensity range may be an interval, that is, the intensity of light emitted by various types of code scanning devices is located within this interval.
可选的,电子设备还可以获取多个预设参数,并结合多个预设参数确定是否满足对应的判断条件。应理解,上述多个预设参数可以任意组合,下文示出的组合方式仅仅是例举,并不构成对预设参数组合方式的限定。Optionally, the electronic device may also obtain a plurality of preset parameters, and combine the plurality of preset parameters to determine whether a corresponding judgment condition is satisfied. It should be understood that the above-mentioned multiple preset parameters can be combined arbitrarily, and the combinations shown below are only examples and do not constitute a limitation on the combination of preset parameters.
一种可能的组合方式中,电子设备获取的预设参数包括:电子设备的姿态以及电子设备周围的环境光强,可以基于电子设备的姿态以及电子设备周围的环境光强确定是否对付款码进行屏蔽处理。先获取电子设备的姿态,若电子设备的姿态不满足第一条件,则对付款码进行屏蔽处理;若电子设备的姿态满足第一条件,则进一步获取电子设备周围的环境光强,若电子设备周围的环境光强不满足第三条件,则对付款码进行屏蔽处理,否则,不对付款码进行屏蔽处理。或者,也可以获取电子设备周围的环境光强,若电子设备周围的环境光强不满足第三条件,则对付款码进行屏蔽处理;若电子设备周围的环境光强满足第三条件,则进一步获取电子设备的姿态,若电子设备的姿态不满足第一条件,则对付款码进行屏蔽处理,否则,不对付款码进行屏蔽处理。或者,也可以同时获取电子设备的姿态以及电子设备周围的环境光强,若电子设备的姿态不满足第一条件和/或电子设备周围的环境光强不满足第三条件,则对付款码进行屏蔽处理。In a possible combination, the preset parameters acquired by the electronic device include: the posture of the electronic device and the ambient light intensity around the electronic device, and it can be determined based on the posture of the electronic device and the ambient light intensity around the electronic device whether to check the payment code. Shield processing. First obtain the posture of the electronic device, if the posture of the electronic device does not meet the first condition, then shield the payment code; if the posture of the electronic device meets the first condition, then further obtain the ambient light intensity around the electronic device, if the electronic device If the surrounding ambient light intensity does not meet the third condition, the payment code is shielded, otherwise, the payment code is not shielded. Alternatively, the ambient light intensity around the electronic device can also be obtained, and if the ambient light intensity around the electronic device does not meet the third condition, the payment code is shielded; if the ambient light intensity around the electronic device meets the third condition, then further The posture of the electronic device is obtained, and if the posture of the electronic device does not meet the first condition, the payment code is shielded; otherwise, the payment code is not shielded. Alternatively, the posture of the electronic device and the ambient light intensity around the electronic device can also be obtained at the same time. If the posture of the electronic device does not meet the first condition and/or the ambient light intensity around the electronic device does not meet the third condition, then the payment code is processed. Shield processing.
另一种可能的组合方式中,电子设备获取的预设参数包括:扫码设备的属性信息以及电子设备周围的环境光强。可以基于扫码设备的属性信息以及电子设备周围的环境光强确定是否对付款码进行屏蔽处理。例如:先获取扫码设备的图像,若扫码设备的图像不满足第二条件,则对付款码进行屏蔽处理;若扫码设备的图像满足第二条件,则进一步获取电子设备周围的环境光强,若电子设备周围的环境光强不满足第三条件,则对付款码进行屏蔽处理,否则不对付款码进行屏蔽处理。或者,先获取电子设备周围的环境光强,若电子设备周围的环境光强不满足第三条件,则对付款码进行屏蔽处理;若电子设备周围的环境光强满足第三条件,则进一步获取扫码设备的图像,若扫码设备的图像不满足第二条件,则对付款码进行屏蔽处理,否则不对付款码进行屏蔽处理。或者,也可以同时获取扫码设备的图像以及电子设备周围的环境光强,若扫码设备的图像不满足第二条件和/或电子设备周围的环境光强不满足第三条件,对付款码进行屏蔽处理。In another possible combination, the preset parameters acquired by the electronic device include: attribute information of the code scanning device and ambient light intensity around the electronic device. Whether to shield the payment code can be determined based on the attribute information of the code scanning device and the ambient light intensity around the electronic device. For example: first obtain the image of the code scanning device, if the image of the code scanning device does not meet the second condition, then shield the payment code; if the image of the code scanning device meets the second condition, further obtain the ambient light around the electronic device Strong, if the ambient light intensity around the electronic device does not meet the third condition, the payment code is shielded, otherwise the payment code is not shielded. Alternatively, obtain the ambient light intensity around the electronic device first, and if the ambient light intensity around the electronic device does not meet the third condition, then shield the payment code; if the ambient light intensity around the electronic device meets the third condition, then further obtain For the image of the code scanning device, if the image of the code scanning device does not meet the second condition, the payment code is shielded, otherwise the payment code is not shielded. Alternatively, the image of the code scanning device and the ambient light intensity around the electronic device can also be obtained at the same time. If the image of the code scanning device does not meet the second condition and/or the ambient light intensity around the electronic device does not meet the third condition, the payment code Perform masking.
又一种可能的组合方式中,电子设备获取的预设参数包括:电子设备的姿态以及扫码设备的属性信息。基于电子设备的姿态以及扫码设备的属性信息确定是否对付款码进行屏蔽处理。In yet another possible combination, the preset parameters acquired by the electronic device include: the posture of the electronic device and attribute information of the code scanning device. Whether to shield the payment code is determined based on the posture of the electronic device and the attribute information of the code scanning device.
结合上文所述,在该组合方式中,具体包括以下可能的方式:In combination with the above, the combination method specifically includes the following possible methods:
方式A:先获取电子设备的姿态,若电子设备的姿态不满足第一条件,则对付款码进行屏蔽处理。若电子设备的姿态满足第一条件,则进一步获取扫码设备的图像,若扫码设备的图像不满足第二条件,则对付款码进行屏蔽处理,否则,不对付款码进行屏蔽处理。或者,先获取扫码设备的图像,若扫码设备的图像不满足第二条件,则对付款码进行屏蔽处理。若扫码设备的图像满足第二条件,则进一步获取电子设备的 姿态,若电子设备的姿态不满足第一条件,则对付款码进行屏蔽处理,否则,不对付款码进行屏蔽处理。或者,可以同时获取电子设备的姿态以及扫码设备的图像,若电子设备的姿态不满足第一条件和/或扫码设备的图像不满足第二条件,则对付款码进行屏蔽处理。Method A: first obtain the posture of the electronic device, and if the posture of the electronic device does not satisfy the first condition, then shield the payment code. If the posture of the electronic device satisfies the first condition, the image of the code scanning device is further acquired; if the image of the code scanning device does not meet the second condition, the payment code is masked; otherwise, the payment code is not masked. Alternatively, the image of the code scanning device is obtained first, and if the image of the code scanning device does not meet the second condition, the payment code is shielded. If the image of the code scanning device satisfies the second condition, the attitude of the electronic device is further obtained. If the attitude of the electronic device does not meet the first condition, the payment code is shielded, otherwise, the payment code is not shielded. Alternatively, the posture of the electronic device and the image of the code scanning device can be acquired at the same time, and if the posture of the electronic device does not meet the first condition and/or the image of the code scanning device does not meet the second condition, the payment code is masked.
方式B:先获取电子设备的姿态,若电子设备的姿态不满足第一条件,则对付款码进行屏蔽处理。若电子设备的姿态满足第一条件,进一步确定电子设备与扫码设备之间的距离,若该距离不满足预设距离范围,则对付款码进行屏蔽处理,否则,不对付款码进行屏蔽处理。或者,先获取电子设备与扫码设备之间的距离,若该距离不满足预设距离范围,则对付款码进行屏蔽处理。若该距离满足预设距离范围,则进一步获取电子设备的姿态,若电子设备的姿态不满足第一条件,则对付款码进行屏蔽处理,否则,不对付款码进行屏蔽处理。或者,也可以同时获取电子设备的姿态以及电子设备与扫码设备之间的距离,若电子设备的姿态不满足第一条件和/或电子设备与扫码设备之间的距离不满足预设距离范围,则对付款码进行屏蔽处理。Method B: first acquire the posture of the electronic device, and if the posture of the electronic device does not satisfy the first condition, then shield the payment code. If the posture of the electronic device satisfies the first condition, the distance between the electronic device and the code scanning device is further determined, and if the distance does not meet the preset distance range, the payment code is shielded, otherwise, the payment code is not shielded. Alternatively, the distance between the electronic device and the code scanning device is obtained first, and if the distance does not meet the preset distance range, the payment code is shielded. If the distance satisfies the preset distance range, the posture of the electronic device is further obtained, and if the posture of the electronic device does not meet the first condition, the payment code is shielded, otherwise, the payment code is not shielded. Alternatively, the posture of the electronic device and the distance between the electronic device and the code scanning device can also be obtained at the same time, if the posture of the electronic device does not meet the first condition and/or the distance between the electronic device and the code scanning device does not meet the preset distance range, the payment code will be masked.
方式C:获取电子设备的姿态、扫码设备的图像以及确定扫码设备与电子设备之间的距离,若电子设备的姿态不满足第一条件,和/或扫码设备的图像不满足第二条件,和/或扫码设备与电子设备之间的距离不满足预设距离范围,则对付款码进行屏蔽处理。可选的,前述三个预设参数(电子设备的姿态、扫码设备的图像、扫码设备与电子设备之间的距离)可以是先后获取(确定)的,也可以是同时获取的。在先后获取的情况下,若确定某个参数不符合条件,为节省电子设备的功耗,后续条件无需再获取,可直接对付款码进行屏蔽处理。后文获取多个参数情况与之类似。Method C: Obtain the posture of the electronic device, the image of the code scanning device, and determine the distance between the code scanning device and the electronic device. If the posture of the electronic device does not meet the first condition, and/or the image of the code scanning device does not meet the second condition conditions, and/or the distance between the code scanning device and the electronic device does not meet the preset distance range, the payment code will be shielded. Optionally, the aforementioned three preset parameters (the attitude of the electronic device, the image of the code scanning device, and the distance between the code scanning device and the electronic device) may be acquired (determined) successively or simultaneously. In the case of sequential acquisition, if it is determined that a certain parameter does not meet the conditions, in order to save the power consumption of the electronic device, the subsequent conditions do not need to be acquired again, and the payment code can be directly blocked. The situation of obtaining multiple parameters later is similar.
又一种可能的组合方式中,电子设备获取的预设参数包括:电子设备的姿态、扫码设备的属性信息以及电子设备周围的环境光强。基于电子设备的姿态、扫码设备的属性信息以及电子设备周围的环境光强确定是否对付款码进行屏蔽处理。In yet another possible combination, the preset parameters acquired by the electronic device include: the posture of the electronic device, the attribute information of the code scanning device, and the ambient light intensity around the electronic device. Whether to shield the payment code is determined based on the posture of the electronic device, the attribute information of the code scanning device, and the ambient light intensity around the electronic device.
结合上文所述,在该组合方式中,具体包括以下方式:In combination with the above, the combined methods specifically include the following methods:
方式a:获取电子设备的姿态、扫码设备的图像、电子设备周围的环境光强,若电子设备的姿态不满足第一条件,和/或扫码设备的图像不满足第二条件,和/或电子设备周围的环境光强不满足第三条件,则对付款码进行屏蔽处理。可选的,前述三个参数(电子设备的姿态、扫码设备的图像、电子设备周围的环境光强)可以是先后获取的,也可以是同时获取的。先后获取的情况下,具体方式请参考上述方式C所述。Method a: Obtain the posture of the electronic device, the image of the code scanning device, and the ambient light intensity around the electronic device, if the posture of the electronic device does not meet the first condition, and/or the image of the code scanning device does not meet the second condition, and/or Or if the ambient light intensity around the electronic device does not meet the third condition, the payment code is shielded. Optionally, the aforementioned three parameters (the attitude of the electronic device, the image of the code scanning device, and the ambient light intensity around the electronic device) may be acquired sequentially or simultaneously. In the case of sequential acquisition, please refer to the above method C for specific methods.
方式b:获取电子设备的姿态、扫码设备与电子设备之间的距离、电子设备周围的环境光强,若电子设备的姿态不满足第一条件,和/或扫码设备与电子设备的之间的距离不满足预设距离范围,和/或电子设备周围的环境光强不满足第三条件,则对付款码进行屏蔽处理。可选的,前述三个参数(电子设备的姿态、扫码设备与电子设备之间的距离、电子设备周围的环境光强)可以是先后获取的,也可以是同时获取的。先后获取的情况下,具体方式请参考上述方式C所述。Method b: Obtain the posture of the electronic device, the distance between the code scanning device and the electronic device, and the ambient light intensity around the electronic device. If the posture of the electronic device does not meet the first condition, and/or the distance between the code scanning device and the electronic device If the distance between them does not meet the preset distance range, and/or the ambient light intensity around the electronic device does not meet the third condition, the payment code is shielded. Optionally, the aforementioned three parameters (the attitude of the electronic device, the distance between the code scanning device and the electronic device, and the ambient light intensity around the electronic device) may be acquired sequentially or simultaneously. In the case of sequential acquisition, please refer to the above method C for specific methods.
方式c:获取电子设备的姿态、扫码设备的图像、扫码设备与电子设备之间的距离以及电子设备周围的环境光强,若电子设备的姿态不满足第一条件,和/或扫码设备的图像不满足第二条件,和/或扫码设备与电子设备之间的距离不满足预设距离范围、和/或电子设备周围的环境光强不满足第三条件,则对付款码进行屏蔽处理。可选的, 前述四个参数(电子设备的姿态、扫码设备与电子设备之间的距离、扫码设备与电子设备之间的距离、电子设备周围的环境光强)可以是先后获取的,也可以是同时获取的。先后获取的情况下,具体方式请参考上述方式C所述。Method c: Obtain the posture of the electronic device, the image of the code scanning device, the distance between the code scanning device and the electronic device, and the ambient light intensity around the electronic device. If the posture of the electronic device does not meet the first condition, and/or scan the code If the image of the device does not meet the second condition, and/or the distance between the code scanning device and the electronic device does not meet the preset distance range, and/or the ambient light intensity around the electronic device does not meet the third condition, the payment code will be checked Shield processing. Optionally, the aforementioned four parameters (the posture of the electronic device, the distance between the code scanning device and the electronic device, the distance between the code scanning device and the electronic device, and the ambient light intensity around the electronic device) may be acquired sequentially, It can also be obtained at the same time. In the case of sequential acquisition, please refer to the above method C for specific methods.
在实际应用中,由于扫码设备可能是合法的扫码设备,但是不属于预设的扫码设备,也即预设扫码设备中未统计入该扫码设备,例如:市面上出现的新型扫码设备。该类扫码设备可能会发出亮光,但是对于非法分子持有的扫码设备,例如:仿冒成扫码设备的手机等可能是不会发出亮光的。因此,可选的,在上述实现方式中,在获取的预设参数包括扫码设备的图像的情况下,若扫码设备的图像不满足第二条件,此时可以进一步确定扫码设备的光强(也即扫码设备发出的亮光强度)是否满足第二预设光强范围。示例性的,满足第二预设光强范围可以具体实现为大于等于第二预设光强范围中的某个数值;也可以具体实现为属于第二预设光强范围。若该扫码设备的光强不满足第二预设光强范围,则对付款码进行屏蔽处理,否则,不对付款码进行屏蔽处理,也即显示付款码。该第二预设光强范围与第一预设光强范围可以相同也可以不同,该第二预设光强范围可以根据经验值确定,也可以由开发人员根据实际需求设定。In practical applications, because the code scanning device may be a legal code scanning device, but it does not belong to the preset code scanning device, that is, the code scanning device is not counted in the preset code scanning device, for example: the new Scanning equipment. This type of code scanning device may emit light, but for code scanning devices held by illegal elements, such as mobile phones counterfeited as code scanning devices, they may not emit light. Therefore, optionally, in the above implementation manner, in the case where the acquired preset parameters include the image of the code scanning device, if the image of the code scanning device does not meet the second condition, it is possible to further determine the light intensity of the code scanning device. Whether the light intensity (that is, the light intensity emitted by the code scanning device) meets the second preset light intensity range. Exemplarily, satisfying the second preset light intensity range may be specifically implemented as being greater than or equal to a certain value in the second preset light intensity range; it may also be specifically implemented as belonging to the second preset light intensity range. If the light intensity of the code scanning device does not meet the second preset light intensity range, the payment code is shielded; otherwise, the payment code is not shielded, that is, the payment code is displayed. The second preset light intensity range may be the same as or different from the first preset light intensity range, and the second preset light intensity range may be determined based on empirical values, or set by developers according to actual needs.
可选的,在获取的预设参数包括扫码设备的图像的情况下,若扫码设备的图像不属于预设的扫码设备的图像,则电子设备对付款码进行屏蔽处理。但是可能存在一种场景为:该扫码设备是合法的扫码设备,只不过预设的扫码设备的图像中未统计入该扫码设备的图像,用户当前想要显示付款码以完成付款,但是电子设备一直不显示付款码的情况。这种场景下,电子设备可以提示用户输入验证信息,该验证信息包括但不限于指纹信息、人脸信息等基于生物特征的信息、口令验证、手势验证等基于认证知识的信息,点击验证、滑动验证等基于交互操作的信息等等。可选的,验证方式可以是系统默认的,也可以由用户根据需要设定验证信息的方式,例如指纹验证、人脸验证等。电子设备可以通过屏蔽付款码后的显示界面上的提示信息提示用户,如图2b所示的界面230中的文字提示“通过轻按指纹以恢复显示”;也可以弹出新的窗口提示用户。可选的,在电子设备根据上述各实现方式确定对付款码屏蔽处理之后,电子设备也可以提示用户输入验证信息以使得付款码显示。Optionally, when the acquired preset parameters include the image of the code scanning device, if the image of the code scanning device does not belong to the preset image of the code scanning device, the electronic device performs shielding processing on the payment code. However, there may be a scenario: the code scanning device is a legal code scanning device, but the image of the code scanning device is not included in the image of the preset code scanning device, and the user currently wants to display the payment code to complete the payment , but the electronic device has not displayed the payment code. In this scenario, the electronic device can prompt the user to input verification information, which includes but is not limited to fingerprint information, face information and other information based on biometrics, password verification, gesture verification and other information based on authentication knowledge. Authentication and other information based on interactive operations, etc. Optionally, the verification method can be the default of the system, or the method of verifying information can be set by the user according to needs, such as fingerprint verification, face verification and so on. The electronic device can prompt the user through the prompt information on the display interface after the payment code is shielded, such as the text prompt "restore the display by lightly pressing the fingerprint" in the interface 230 shown in Figure 2b; a new window can also pop up to prompt the user. Optionally, after the electronic device determines to shield the payment code according to the foregoing implementation manners, the electronic device may also prompt the user to input verification information so that the payment code is displayed.
若用户可以根据提示输入验证信息,电子设备检测到用户输入的验证信息,若该验证信息正确,响应于该验证信息,电子设备显示付款码。可选的,电子设备还可以将该扫码设备的图像统计入预设的扫码设备的图像,也即本申请实施例中预设的扫码设备的图像可以动态更新,以此来使得面临前述扫码设备时,付款码能够成功显示。If the user can input the verification information according to the prompt, the electronic device detects the verification information input by the user, and if the verification information is correct, the electronic device displays the payment code in response to the verification information. Optionally, the electronic device can also count the image of the code-scanning device into the image of the preset code-scanning device, that is, the image of the preset code-scanning device in the embodiment of the present application can be dynamically updated, so as to make the When using the aforementioned code scanning device, the payment code can be successfully displayed.
示例性的,如图6a所示,电子设备的界面600上显示有与付款码安全使用和隐私保护相关的提示信息,还包括指纹按钮601。然后,检测到用户输入的验证信息,例如:用户轻按指纹601的操作,若确定用户输入的验证信息正确,响应于用户输入的指纹信息,电子设备可以显示付款码界面210,在界面210中显示有付款码202。可选的,电子设备还可以将扫码设备的图像统计入预设的扫码设备的图像。Exemplarily, as shown in FIG. 6 a , the interface 600 of the electronic device displays prompt information related to safe use of the payment code and privacy protection, and also includes a fingerprint button 601 . Then, the verification information input by the user is detected, for example: the user presses the fingerprint 601 lightly. If it is determined that the verification information input by the user is correct, the electronic device may display the payment code interface 210 in response to the fingerprint information input by the user. In the interface 210 The payment code 202 is displayed. Optionally, the electronic device may also add the image of the code scanning device to the preset image of the code scanning device.
可选的,结合上述场景,由于对付款码进行屏蔽处理时,电子设备是靠近扫码设备的,然后用户输入验证信息时,电子设备可能远离了扫码设备,靠近了用户。因此,在扫码设备扫描付款码之前的时间段内,为了避免显示的付款码被盗刷,电子设备可以再次基于上述实现方式判断是否对付款码进行屏蔽处理。由于扫码设备的图像已被 统计入预设的扫码设备的图像,在用户想要利用付款码完成付款时,电子设备确定该扫码设备的图像是满足判断条件的,因此会自动显示付款码,以便用户完成付款,该示例并不会影响用户的付款体验。Optionally, in combination with the above scenario, since the electronic device is close to the code scanning device when shielding the payment code, and then when the user inputs verification information, the electronic device may be far away from the code scanning device and close to the user. Therefore, in the time period before the payment code is scanned by the code scanning device, in order to prevent the displayed payment code from being stolen, the electronic device may again determine whether to shield the payment code based on the above implementation manner. Since the image of the code scanning device has been counted into the image of the preset code scanning device, when the user wants to use the payment code to complete the payment, the electronic device determines that the image of the code scanning device meets the judgment conditions, so it will automatically display the payment Code, so that users can complete the payment, this example will not affect the user's payment experience.
示例性的,如图6b所示,电子设备的界面600上显示有与付款码安全使用和隐私保护相关的提示信息,还包括指纹按钮601。然后检测到用户输入的验证信息,例如:检测到用户轻按指纹按钮601的操作(即输入指纹信息的操作),若确定该验证信息正确,响应于该验证信息,电子设备可以显示付款码界面210,在界面210中显示有付款码202。然后电子设备将扫码设备的图像统计入预设的扫码设备的图像。之后,在该扫码设备扫描付款码之前的时间段内,电子设备可以继续基于上述实现方式确定是否对付款码进行屏蔽处理,若确定对付款码进行屏蔽处理,电子设备可以跳转到诸如界面600所示的界面。最后,电子设备确定不对付款码进行屏蔽处理时,电子设备可以显示付款码界面210,以完成付款。Exemplarily, as shown in FIG. 6 b , the interface 600 of the electronic device displays prompt information related to safe use of the payment code and privacy protection, and also includes a fingerprint button 601 . Then detect the verification information input by the user, for example: detect the user's operation of lightly pressing the fingerprint button 601 (that is, the operation of inputting fingerprint information), if it is determined that the verification information is correct, in response to the verification information, the electronic device can display the payment code interface 210 , the payment code 202 is displayed on the interface 210 . Then the electronic device counts the image of the code scanning device into the preset image of the code scanning device. Afterwards, during the time period before the code scanning device scans the payment code, the electronic device can continue to determine whether to shield the payment code based on the above-mentioned implementation method. If it is determined to shield the payment code, the electronic device can jump to an interface such as The interface shown in 600. Finally, when the electronic device determines not to shield the payment code, the electronic device may display the payment code interface 210 to complete the payment.
可选的,为了进一步提高对付款码进行屏蔽处理的准确性,还可以判断扫码设备与电子设备之间的相对姿态,若该相对姿态不满足预设条件,则对付款码进行屏蔽处理。Optionally, in order to further improve the accuracy of shielding the payment code, the relative posture between the code scanning device and the electronic device can also be judged, and if the relative posture does not satisfy the preset condition, the payment code is shielded.
应理解,相对姿态不同于上文所述的电子设备的姿态,相对姿态可以理解为电子设备与扫码设备之间的相对位置。It should be understood that the relative posture is different from the posture of the electronic device described above, and the relative posture can be understood as the relative position between the electronic device and the code scanning device.
相对姿态可用于判断扫码设备能否成功扫描到电子设备上的付款码。例如:可以分别确定扫码设备的姿态以及电子设备的姿态之后,确定二者之间的差值,即二者的相对姿态。示例性的,如图7所示,为本申请实施例提供的电子设备与扫码设备之间的相对姿态的示意图。示例性,图7所示的相对姿态1以及相对姿态2可以是两个边界姿态,示例性的,该边界姿态可以包括电子设备付款码平面与扫码设备扫码平面之间的夹角。当电子设备与扫码设备之间的相对姿态位于两个边界姿态之间时,可以完成扫描付款码的操作,否则,不可完成扫描付款码的操作。其中边界姿态的设定可以由开发人员根据实际需求设定,例如:通过不同类型的扫码设备能够成功扫描电子设备上的付款码时,对二者之间的相对姿态进行统计,进而设定对应的边界姿态。例如:对不同类型的扫码设备可以采用不同的边界姿态,电子设备可以根据获取的扫码设备的图像选取对应的边界姿态。The relative posture can be used to judge whether the code scanning device can successfully scan the payment code on the electronic device. For example: After determining the posture of the code scanning device and the posture of the electronic device respectively, determine the difference between the two, that is, the relative posture of the two. Exemplarily, as shown in FIG. 7 , it is a schematic diagram of the relative posture between the electronic device and the code scanning device provided in the embodiment of the present application. Exemplarily, relative posture 1 and relative posture 2 shown in FIG. 7 may be two boundary postures. Exemplarily, the boundary postures may include an angle between the payment code plane of the electronic device and the code scanning plane of the code scanning device. When the relative posture between the electronic device and the code scanning device is between two boundary postures, the operation of scanning the payment code can be completed; otherwise, the operation of scanning the payment code cannot be completed. The setting of the boundary posture can be set by the developer according to the actual needs, for example: when the payment code on the electronic device can be successfully scanned by different types of code scanning devices, the relative posture between the two is counted, and then set Corresponding boundary pose. For example, different boundary postures may be adopted for different types of code scanning devices, and the electronic device may select a corresponding boundary posture according to the acquired image of the code scanning device.
可选的,为了进一步提高对付款码进行屏蔽处理的准确性,还可以进一步判断用户是否正在注视电子设备屏幕,若确定用户正在注视电子设备屏幕,且用户属于预设用户,则不对付款码进行屏蔽处理,若确定用户没有注视电子设备屏幕,或者确定注视电子设备屏幕的用户不属于预设用户,则对付款码进行屏蔽处理。示例性的,电子设备可以获取用户的人脸图像,若根据该人脸图像确定该用户属于预设用户,且该用户正在注视电子设备屏幕,则电子设备不对付款码进行屏蔽处理,也即显示付款码。否则,若根据该人脸图像确定该用户不属于预设用户,和/或该用户未注视电子设备屏幕,电子设备对付款码进行屏蔽处理。Optionally, in order to further improve the accuracy of shielding the payment code, it is also possible to further determine whether the user is watching the screen of the electronic device. If it is determined that the user is watching the screen of the electronic device and the user belongs to a preset user, the payment code will not be blocked. Shielding processing, if it is determined that the user does not watch the screen of the electronic device, or it is determined that the user watching the screen of the electronic device does not belong to the preset user, then shielding processing is performed on the payment code. Exemplarily, the electronic device may acquire the user's face image, and if it is determined according to the face image that the user belongs to a preset user, and the user is looking at the screen of the electronic device, the electronic device does not block the payment code, that is, displays payment code. Otherwise, if it is determined according to the face image that the user does not belong to the preset user, and/or the user does not look at the screen of the electronic device, the electronic device will block the payment code.
进一步的,电子设备还可以判断用户人脸与电子设备之间的距离,若用户人脸与电子设备之间的距离小于等于预设距离,则电子设备不对付款码进行屏蔽处理,否则,对付款码进行屏蔽处理。或者,电子设备还可以判断用户人脸是否正对电子设备屏幕, 若用户人脸正对电子设备屏幕,则电子设备不对付款码进行屏蔽处理,否则,对付款码进行屏蔽处理。或者,电子设备可以判断用户人脸与电子设备之间的距离,以及用户人脸是否正对电子设备屏幕,若用户人脸与电子设备之间的距离小于等于预设距离,且用户人脸正对电子设备屏幕,则不对付款码进行屏蔽处理,否则,若用户人脸与电子设备之间的距离大于预设距离,和/或用户人脸未正对电子设备屏幕,则对付款码进行屏蔽处理。可选的,预设距离可以由开发人员根据实际需求设定,本申请对此不作限定。Furthermore, the electronic device can also judge the distance between the user's face and the electronic device. If the distance between the user's face and the electronic device is less than or equal to the preset distance, the electronic device will not shield the payment code; otherwise, the payment code will be blocked. The code is masked. Alternatively, the electronic device can also determine whether the user's face is facing the screen of the electronic device. If the user's face is facing the screen of the electronic device, the electronic device does not shield the payment code, otherwise, shields the payment code. Alternatively, the electronic device can determine the distance between the user's face and the electronic device, and whether the user's face is facing the screen of the electronic device. If the distance between the user's face and the electronic device is less than or equal to the preset distance, and the user's face is For the electronic device screen, the payment code is not shielded, otherwise, if the distance between the user's face and the electronic device is greater than the preset distance, and/or the user's face is not facing the electronic device screen, the payment code is shielded deal with. Optionally, the preset distance may be set by developers according to actual needs, which is not limited in this application.
需要说明的是,电子设备与扫码设备之间的相对姿态、用户是否正在注视电子设备屏幕、用户人脸与电子设备之间的距离、用户人脸是否正对电子设备屏幕等可以与上述各预设参数结合使用,来判断是否对付款码进行屏蔽处理。It should be noted that the relative posture between the electronic device and the code scanning device, whether the user is looking at the screen of the electronic device, the distance between the user's face and the electronic device, whether the user's face is facing the screen of the electronic device, etc. The preset parameters are used in combination to determine whether to shield the payment code.
可选的,为了进一步提高对付款码进行屏蔽处理的准确性,在电子设备根据上述实现方式初步确定需要对付款码进行屏蔽处理或者不对付款码进行屏蔽处理,在对付款码进行屏蔽处理或者不对付款码进行屏蔽处理之前,还可以通过检测电子设备的系统当前是否存在异常触发、或者风险拦截进一步确定是否对付款码进行屏蔽处理。Optionally, in order to further improve the accuracy of shielding the payment code, after the electronic device preliminarily determines that the payment code needs to be shielded or not shielded according to the above implementation method, after shielding the payment code or not Before the payment code is shielded, it is also possible to further determine whether to shield the payment code by detecting whether there is an abnormal trigger or risk interception in the system of the electronic device.
假如电子设备根据获取到的预设参数以及对应的判断条件初步确定对付款码进行屏蔽处理,电子设备可以进一步检测系统当前是否存在异常触发,若不存在异常触发,则执行初步判定结果。若存在异常触发,电子设备可以提醒用户输入验证信息,该验证信息包括但不限于指纹信息、人脸信息、密码信息等等。若检测到用户输入的验证信息正确,则不对付款码进行屏蔽处理,否则,对付款码进行屏蔽处理。If the electronic device preliminarily determines to shield the payment code according to the obtained preset parameters and corresponding judgment conditions, the electronic device can further detect whether there is an abnormal trigger in the system, and if there is no abnormal trigger, execute the preliminary judgment result. If there is an abnormal trigger, the electronic device may remind the user to input verification information, such verification information includes but not limited to fingerprint information, face information, password information and the like. If it is detected that the verification information input by the user is correct, the payment code is not shielded; otherwise, the payment code is shielded.
其中,异常触发的指的是上述各实现方式中,由于电子设备系统误判等原因,获取的预设参数满足对应的判断条件,但是电子设备的判断结果错误,也即电子设备确定需要对付款码进行屏蔽处理。因此,可以通过人为介入(例如:输入验证信息)的方式纠正误判。Among them, abnormal triggering means that in the above-mentioned implementation methods, due to reasons such as misjudgment by the electronic device system, the obtained preset parameters meet the corresponding judgment conditions, but the judgment result of the electronic device is wrong, that is, the electronic device determines that payment needs to be made. The code is masked. Therefore, the misjudgment can be corrected through human intervention (for example: inputting verification information).
假如电子设备根据获取到的预设参数以及对应的判断条件初步确定不对付款码进行屏蔽处理,电子设备进一步判断检测电子设备的系统当前是否存在风险拦截,若确定电子设备的系统当前存在风险拦截,则对付付款码进行屏蔽处理;若确定电子设备的系统当前不存在风险拦截,则不对付款码进行屏蔽处理。If the electronic device preliminarily determines not to shield the payment code according to the obtained preset parameters and corresponding judgment conditions, the electronic device further judges whether there is currently a risk interception in the system detecting the electronic device, and if it is determined that there is currently a risk interception in the electronic device system, The payment code is shielded; if it is determined that there is no risk interception in the system of the electronic device, the payment code is not shielded.
其中,风险拦截指的是对不合理和/或不合法的扫码行为进行拦截。由于电子设备系统误判等原因,可能使得在获取的参数不满足对应的判断条件的情况下,最终判定的结果是不对付款码进行屏蔽处理,也即直接显示付款码,那么在显示付款码之后,该付款码可能会被扫码设备扫描。例如:假设电子设备的姿态不满足第一条件,但是此时电子设备检测到发生了扫码的行为,则电子设备可以确定此次扫码行为可能是不合理的,因此电子设备可以拦截该行为,阻止此次交易。又例如:假设扫码设备的图像不满足第二条件,但是此时电子设备检测到发生了扫码行为,则电子设备可以确定此次扫码行为可能是不合法的,因此扫码设备也可以拦截该行为,阻止此次交易。Among them, risk interception refers to the interception of unreasonable and/or illegal code scanning behaviors. Due to misjudgment by the electronic equipment system and other reasons, if the obtained parameters do not meet the corresponding judgment conditions, the final judgment result is that the payment code is not shielded, that is, the payment code is displayed directly, then after the payment code is displayed , the payment code may be scanned by a code scanning device. For example: suppose the posture of the electronic device does not meet the first condition, but at this time the electronic device detects that the code scanning behavior has occurred, the electronic device can determine that the code scanning behavior may be unreasonable, so the electronic device can intercept the behavior , to block the transaction. Another example: suppose the image of the code-scanning device does not meet the second condition, but the electronic device detects that a code-scanning behavior has occurred at this time, the electronic device can determine that the code-scanning behavior may be illegal, so the code-scanning device can also Intercept this behavior and prevent this transaction.
应理解,响应于付款码开启指令,在扫码设备扫描电子设备上显示的付款码之前,该段时间内,电子设备可能处于亮屏状态,也可以处于息屏状态,还可能处于解锁状态或者锁屏状态。因此,本申请实施例中为了节省电子设备的功耗,电子设备可以在处于某个状态时,再执行上述判断是否对付款码进行屏蔽处理的相关操作。可选的, 该状态可以是亮屏状态、亮屏且解锁状态等。示例性的,通过定义变量,并识别该变量的值即可以确定手机处于亮屏状态还是息屏状态,当该变量值为false时,为息屏状态,当该变量值为true时,为亮屏状态。也可以通过定义变量,并识别该变量的值来确定手机处于锁屏状态还是解锁状态,当该变量值为false时,为解锁状态,当该变量值为true时,为锁屏状态。It should be understood that, in response to the payment code activation instruction, before the code scanning device scans the payment code displayed on the electronic device, within this period of time, the electronic device may be in the bright screen state, the screen off state, or the unlocked state or Lock screen status. Therefore, in order to save power consumption of the electronic device in the embodiment of the present application, the electronic device may perform the above-mentioned relevant operations of judging whether to perform shielding processing on the payment code when the electronic device is in a certain state. Optionally, the state may be a screen-on state, a screen-on and unlocked state, and the like. Exemplarily, by defining a variable and identifying the value of the variable, it can be determined whether the mobile phone is in the on-screen state or the off-screen state. When the variable value is false, it is in the off-screen state. When the variable value is true, it is on. screen status. It is also possible to determine whether the mobile phone is in the locked screen state or the unlocked state by defining a variable and identifying the value of the variable. When the variable value is false, it is in the unlocked state, and when the variable value is true, it is in the locked screen state.
可选的,本申请实施例中判断是否对付款码进行屏蔽处理的操作可以是实时进行的,也可以是周期性进行的,本申请对此不作限定。Optionally, in the embodiment of the present application, the operation of judging whether to shield the payment code can be performed in real time or periodically, which is not limited in the present application.
可选的,为了减少电子设备误判或者错判的可能性,提高消费者使用付款码进行支付的流畅度以及舒适感,本申请实施例中还可以统计用户输入验证信息的次数、每次输入验证信息的结果、异常触发的次数、异常触发的原因等等,优化电子设备的支付策略,例如:更新预设的各种阈值、预设的扫码设备的图像等;将检测到不合法的扫码设备加入到黑名单,或者,提示用户对该扫码设备进行标记,确定扫码设备是否是合法设备;将各种异常信息上报到云端做聚合处理、和/或统计训练等等。Optionally, in order to reduce the possibility of misjudgment or misjudgment by the electronic device and improve the fluency and comfort of consumers using the payment code to pay, the embodiment of the present application can also count the number of times the user enters the verification information, each input Verify the results of information, the number of abnormal triggers, the reasons for abnormal triggers, etc., optimize the payment strategy of electronic devices, for example: update various preset thresholds, preset images of scanning code devices, etc.; will detect illegal Add the code scanning device to the blacklist, or prompt the user to mark the code scanning device to determine whether the code scanning device is a legitimate device; report various abnormal information to the cloud for aggregation processing, and/or statistical training, etc.
本申请实施例提供的显示方法可以应用于各种类型的电子设备。对于不同功耗要求的电子设备,其可以根据自身的需求灵活调整相应的支付策略,例如:在电子设备系统内部可以配置有多套支付策略,其可以根据自身的需求以及对功耗的要求选取对应的支付策略,例如:对于功耗要求较高(或者终端功耗受限)的电子设备(如智能手环、智能手表等),其可以选择低功耗的支付策略,如仅基于电子设备的姿态判断是否对付款码进行屏蔽处理,当然也可以仅基于其他的条件;对于功耗要求较低的电子设备,其可以选择高功耗的支付策略,如基于电子设备的姿态、电子设备周围的环境光强、电子设备的图像判断是否对付款码进行屏蔽处理。应理解,高功耗的支付策略与低功耗的支付策略相比较而言,高功耗的支付策略判断精度要高。The display method provided by the embodiment of the present application can be applied to various types of electronic devices. For electronic equipment with different power consumption requirements, it can flexibly adjust the corresponding payment strategy according to its own needs. For example, multiple sets of payment strategies can be configured inside the electronic equipment system, which can be selected according to its own needs and power consumption requirements. Corresponding payment strategies, for example: for electronic devices (such as smart bracelets, smart watches, etc.) Judging whether to shield the payment code based on the attitude of the electronic device, of course, it can also be based on other conditions only; for electronic devices with low power consumption requirements, it can choose a payment strategy with high power consumption, such as based on the posture of the electronic device, the surrounding area of the electronic device, etc. The ambient light intensity and the image of the electronic device determine whether to shield the payment code. It should be understood that, compared with the payment strategy with high power consumption, the determination accuracy of the payment strategy with high power consumption is higher.
可选的,还可以由用户根据需求选定相应的支付策略,例如:通过设置应用设定。示例性的,如图8所示,在电子设备中安装有设置应用,假设检测到用户对界面800中的设置应用的图标801的点击操作,电子设备可以跳转到界面810中,在界面810中,显示有蓝牙选项、桌面和壁纸选项、移动网络选项、辅助功能选项等等,用户可以通过界面810进入到支付模式设定界面。假设检测到用户对辅助功能选项802的点击操作,电子设备可以跳转到界面820中,在界面820中包括一个或者多个辅助功能,例如:单手模式、智慧分屏、支付模式等。其中,支付模式可用于设定相应的支付策略。假设电子设备检测到用户对支付模式803的点击操作,电子设备可以跳转到界面830中,其中,在界面830显示有多个不同支付模式,用户可以根据需要选定相应的支付模式,进而设定对应的支付策略。Optionally, the corresponding payment strategy can also be selected by the user according to requirements, for example, through setting application settings. Exemplarily, as shown in FIG. 8, a setting application is installed in the electronic device. Assuming that the user clicks on the icon 801 of the setting application in the interface 800 is detected, the electronic device can jump to the interface 810, and the interface 810 , displaying Bluetooth options, desktop and wallpaper options, mobile network options, auxiliary function options, etc., the user can enter the payment mode setting interface through interface 810 . Assuming that the user's click operation on the auxiliary function option 802 is detected, the electronic device can jump to the interface 820, which includes one or more auxiliary functions, such as: one-handed mode, smart split screen, payment mode, etc. Among them, the payment mode can be used to set the corresponding payment strategy. Assuming that the electronic device detects the user's click operation on the payment mode 803, the electronic device can jump to the interface 830, where multiple different payment modes are displayed on the interface 830, and the user can select the corresponding payment mode as required, and then set Determine the corresponding payment strategy.
例如:假设用户选定了低功耗模式(无摄像头),则电子设备响应于用户的该设定,可以基于电子设备的姿态判断是否对付款码进行屏蔽处理。假设用户选定了低功耗(有摄像头),则电子设备响应于用户的该设定,可以基于扫码设备的属性信息(例如:扫码设备的图像)判断是否对付款码进行屏蔽处理。假设用户选定了中功耗(无摄像头),则电子设备响应于用户的该设定,可以基于电子设备的姿态以及电子设备周围的环境光强判断是否对付款码进行屏蔽处理。假设用户选定了高功耗模式,则电子设备响应于用户的该设定,可以基于电子设备的姿态、电子设备周围的环境光强、 扫码设备的属性信息判断是否对付款码进行屏蔽处理。For example, assuming that the user selects a low power consumption mode (no camera), the electronic device may determine whether to shield the payment code based on the posture of the electronic device in response to the setting of the user. Assuming that the user selects low power consumption (with a camera), the electronic device can determine whether to shield the payment code based on the attribute information of the code scanning device (for example: the image of the code scanning device) in response to the user's setting. Assuming that the user selects medium power consumption (no camera), the electronic device can determine whether to shield the payment code based on the posture of the electronic device and the ambient light intensity around the electronic device in response to the setting of the user. Assuming that the user has selected a high power consumption mode, the electronic device can determine whether to shield the payment code based on the posture of the electronic device, the ambient light intensity around the electronic device, and the attribute information of the code scanning device in response to the user's setting. .
需要说明的是,图8所示的各支付模式选项及其所对应的支付策略仅仅是示例性说明,并不构成对本申请实施例的限定,上述各支付模式的名称并不构成对其功能的限定,也可以有其他的名称,本申请对此不作限定。在实际应用中,开发人员可以根据实际设定支付模式以及该支付模式对应的支付策略。It should be noted that the payment mode options and their corresponding payment strategies shown in Figure 8 are only illustrative and do not constitute a limitation to the embodiment of the application. It may also have other names, which are not limited in this application. In practical applications, developers can set the payment mode and the payment strategy corresponding to the payment mode according to the actual situation.
需要说明的是,上述各界面仅仅是示意图,并不构成对本申请的限定,在实际应用中,各界面可以包括更多或者更少的内容,也可以包括更多或者更少的界面。It should be noted that the above-mentioned interfaces are only schematic diagrams and do not constitute a limitation to the present application. In practical applications, each interface may include more or less content, or may include more or less interfaces.
目前,在免密支付场景下,在成功付款之前,用户无法获知付款金额,也无法确认付款金额是否正确,只有成功付款之后,电子设备上才会显示已付款的金额。在该情况下,假设扫码设备中被嵌入了非法扫码软件或者微型设备,可能会使得用户支付的金额大于商品实际金额的情况,给用户造成财产损失。因此,为了保证用户财产安全,在电子设备根据上述实现方式确定不对付款码进行屏蔽处理,也即显示付款码之后,若扫码设备扫描了电子设备上的付款码,在成功付款之前,电子设备可以获知扫码设备请求的付款金额。该付款码金额可以是由扫码设备发送给电子设备的,也可以是电子设备通过其他方式获知的,例如:假设扫码设备上显示有付款金额,电子设备可以通过捕获扫码设备上的付款金额的方式获知,本申请对此不作具体限定。需要说明的是,本申请并不限定电子设备与扫码设备之间的通信协议以及通信方式。可选的,电子设备还可以确定该付款金额是否正确。At present, in the password-free payment scenario, before the successful payment, the user cannot know the payment amount, nor can he confirm whether the payment amount is correct. Only after the successful payment, the paid amount will be displayed on the electronic device. In this case, assuming that the code-scanning device is embedded with illegal code-scanning software or micro-devices, the amount paid by the user may be greater than the actual amount of the product, causing property losses to the user. Therefore, in order to ensure the safety of the user’s property, after the electronic device determines not to shield the payment code according to the above-mentioned implementation method, that is, after displaying the payment code, if the code scanning device scans the payment code on the electronic device, before the payment is successful, the electronic device The payment amount requested by the code scanning device can be obtained. The amount of the payment code can be sent to the electronic device by the code scanning device, or it can be known by the electronic device through other means. For example: if the payment amount is displayed on the code scanning device, the electronic device can capture the payment on the code scanning The way to know the amount is not specifically limited in this application. It should be noted that this application does not limit the communication protocol and communication method between the electronic device and the code scanning device. Optionally, the electronic device can also determine whether the payment amount is correct.
一种可能的实现方式中,电子设备可以显示该付款金额,由用户确认该付款金额是否正确,并提示用户输入验证信息,该验证信息可以是指纹信息,人脸信息、密码信息等等。假设检测到用户输入的验证信息正确,则完成此次交易,否则,关闭此次交易。In a possible implementation, the electronic device can display the payment amount, and the user confirms whether the payment amount is correct, and prompts the user to input verification information, which may be fingerprint information, face information, password information, and the like. If it is detected that the verification information entered by the user is correct, the transaction is completed; otherwise, the transaction is closed.
另一种可能的实现方式中,电子设备可以判断扫码设备请求的付款金额是否正确,在电子设备确定该付款金额不正确的情况下,提示用户输入验证信息。假设检测到用户输入的验证信息正确,则完成此次交易,否则,关闭此次交易。In another possible implementation manner, the electronic device may determine whether the payment amount requested by the code scanning device is correct, and prompt the user to input verification information when the electronic device determines that the payment amount is incorrect. If it is detected that the verification information entered by the user is correct, the transaction is completed; otherwise, the transaction is closed.
上述主要是从方法的角度对本申请实施例提供的方案进行了介绍。可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。结合本申请中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同的方法来实现所描述的功能,但是这种实现不应认为超过本申请实施例的技术方案的范围。The foregoing mainly introduces the solutions provided by the embodiments of the present application from the perspective of methods. It can be understood that, in order to realize the above functions, the electronic device includes hardware structures and/or software modules corresponding to each function. Combining the units and algorithm steps of each example described in the embodiments disclosed in this application, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the technical solutions of the embodiments of the present application.
本申请是实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the electronic device into functional modules according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of units in the embodiment of the present application is schematic, and is only a logical function division, and there may be another division manner in actual implementation.
如图9所示,为本申请实施例提供的一种电子设备的结构示意图,该电子设备900可用于实现以上各个方法实施例中记载的方法。示例性的,该电子设备900具体可以 包括:处理单元901和显示单元902。As shown in FIG. 9 , it is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 900 can be used to implement the methods described in the above method embodiments. Exemplarily, the electronic device 900 may specifically include: a processing unit 901 and a display unit 902.
处理单元901,用于响应于付款码开启操作,获取至少一个预设参数;还用于若存在至少一个预设参数不满足对应的预设条件,对付款码进行屏蔽处理。显示单元902,用于显示屏蔽付款码后的界面。其中,预设参数包括电子设备的姿态,对应的预设条件为第一条件。The processing unit 901 is configured to acquire at least one preset parameter in response to the payment code opening operation; and is also configured to perform shielding processing on the payment code if there is at least one preset parameter that does not meet a corresponding preset condition. The display unit 902 is configured to display the interface after the payment code is shielded. Wherein, the preset parameters include the attitude of the electronic device, and the corresponding preset condition is the first condition.
一种可能的设计中,电子设备的姿态包括电子设备的俯仰角;第一条件包括:电子设备的俯仰角满足第一角度范围。或者,电子设备的姿态包括电子设备的翻转角;第一条件包括:电子设备的翻转角满足第二角度范围;或者,电子设备的姿态包括电子设备的俯仰角和翻转角。第一条件包括:电子设备的俯仰角满足第一角度范围,且电子设备的翻转角满足第二角度范围。In a possible design, the attitude of the electronic device includes a pitch angle of the electronic device; the first condition includes: the pitch angle of the electronic device satisfies a first angle range. Or, the posture of the electronic device includes a flip angle of the electronic device; the first condition includes: the flip angle of the electronic device satisfies the second angle range; or, the posture of the electronic device includes a pitch angle and a flip angle of the electronic device. The first condition includes: the pitch angle of the electronic device satisfies a first angle range, and the flip angle of the electronic device satisfies a second angle range.
一种可能的设计中,屏蔽付款码后的界面包括提示信息,提示信息用于提示用户通过操作以使得电子设备显示付款码。In a possible design, the interface after the payment code is shielded includes prompt information, and the prompt information is used to prompt the user to make the electronic device display the payment code through operations.
一种可能的设计中,预设参数还包括电子设备周围的环境光强,对应的预设条件为第三条件。第三条件包括电子设备周围的环境光强发生变化,且变化后的电子设备周围的环境光强满足第一预设光强范围。In a possible design, the preset parameters also include ambient light intensity around the electronic device, and the corresponding preset condition is the third condition. The third condition includes that the ambient light intensity around the electronic device changes, and the changed ambient light intensity around the electronic device satisfies the first preset light intensity range.
一种可能的设计中,预设参数还包括:扫码设备的图像,对应的预设条件为第二条件;第二条件包括扫码设备的图像属于预设扫码设备的图像。或者,预设参数还包括:扫码设备与电子设备之间的距离,对应的预设条件为第四条件。第四条件包括扫码设备与电子设备之间的距离满足预设距离范围。或者,预设参数还包括:扫码设备的图像、扫码设备与电子设备之间的距离;扫码设备的图像对应的预设条件为第二条件,扫码设备与电子设备之间的距离对应的预设条件为第四条件。In a possible design, the preset parameters further include: the image of the code scanning device, and the corresponding preset condition is the second condition; the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device. Alternatively, the preset parameters also include: the distance between the code scanning device and the electronic device, and the corresponding preset condition is the fourth condition. The fourth condition includes that the distance between the code scanning device and the electronic device satisfies a preset distance range. Alternatively, the preset parameters also include: the image of the code scanning device, the distance between the code scanning device and the electronic device; the preset condition corresponding to the image of the code scanning device is the second condition, the distance between the code scanning device and the electronic device The corresponding preset condition is the fourth condition.
一种可能的设计中,预设参数还包括,扫码设备的图像,对应的预设条件为第二条件;在扫码设备的图像不满足第二条件的情况下,对付款码进行屏蔽处理之前,处理单元901,还用于确定扫码设备的光强不满足第二预设光强范围。其中,第二条件包括扫码设备的图像属于预设扫码设备的图像。In a possible design, the preset parameters also include the image of the code scanning device, and the corresponding preset condition is the second condition; when the image of the code scanning device does not meet the second condition, the payment code is shielded Before, the processing unit 901 is further configured to determine that the light intensity of the code scanning device does not meet the second preset light intensity range. Wherein, the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device.
一种可能的设计中,显示屏蔽付款码后的界面之后,处理单元901,还用于提示用户输入验证信息。显示单元902,还用于响应于用户输入的验证信息,显示付款码。In a possible design, after displaying the interface with the payment code shielded, the processing unit 901 is further configured to prompt the user to input verification information. The display unit 902 is further configured to display the payment code in response to the verification information input by the user.
一种可能的设计中,显示单元902,还用于若至少一个预设参数满足对应的预设条件,显示付款码。In a possible design, the display unit 902 is further configured to display the payment code if at least one preset parameter meets a corresponding preset condition.
一种可能的设计中,电子设备包括手机、平板电脑、可穿戴设备中的一种或多种。In a possible design, the electronic device includes one or more of a mobile phone, a tablet computer, and a wearable device.
可选的,图9所示的电子设备900还可以包括通信单元903,该通信单元903,用于支持电子设备900执行本申请实施例中电子设备执行的通信步骤,例如:接收付款码开启指令,接收用户输入的验证信息等等。Optionally, the electronic device 900 shown in FIG. 9 may also include a communication unit 903, which is used to support the electronic device 900 to perform the communication steps performed by the electronic device in the embodiment of the present application, for example: receiving a payment code opening instruction , receiving authentication information entered by the user, and so on.
可选的,图9所示的电子设备900还可以包括存储单元(图9中未示出),该存储单元存储有程序或指令。当处理单元901执行该程序或指令时,使得图9所示的电子设备900可以执行本申请实施例所述的显示方法。Optionally, the electronic device 900 shown in FIG. 9 may further include a storage unit (not shown in FIG. 9 ), where programs or instructions are stored in the storage unit. When the processing unit 901 executes the program or instruction, the electronic device 900 shown in FIG. 9 can execute the display method described in the embodiment of the present application.
图9所示的电子设备900的技术效果可以参考上文所述的显示方法的技术效果,此处不再赘述。图9所示的电子设备900中涉及的处理单元901可以由处理器或处理器相关电路组件实现,可以为处理器或处理模块。通信单元903可以由收发器或收发 器相关电路组件实现,可以为收发器或收发模块。显示单元902可以由显示屏相关组件实现,可以包括显示屏。For the technical effect of the electronic device 900 shown in FIG. 9 , reference may be made to the technical effect of the display method described above, which will not be repeated here. The processing unit 901 involved in the electronic device 900 shown in FIG. 9 may be implemented by a processor or processor-related circuit components, and may be a processor or a processing module. The communication unit 903 may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. The display unit 902 may be implemented by components related to a display screen, and may include a display screen.
如图10所示,为本申请实施例提供的又一种电子设备的结构示意图,该电子设备1000可用于实现以上各个方法实施例中记载的方法。示例性的,该电子设备1000具体可以包括:参数获取模块1001以及付款码可控显示模块1002。其中,参数获取模块1001包括姿态检测与识别模块1003。As shown in FIG. 10 , it is a schematic structural diagram of another electronic device provided by the embodiment of the present application. The electronic device 1000 can be used to implement the methods described in the above method embodiments. Exemplarily, the electronic device 1000 may specifically include: a parameter acquisition module 1001 and a payment code controllable display module 1002 . Wherein, the parameter acquisition module 1001 includes a posture detection and recognition module 1003 .
参数获取模块1001,用于响应于付款码开启操作,获取至少一个预设参数。付款码可控显示模块1002,用于若存在至少一个预设参数不满足对应的预设条件,对所述付款码进行屏蔽处理。付款码可控显示模块1002,还用于显示屏蔽付款码后的界面。其中,预设参数包括姿态检测与识别模块1003获取的电子设备的姿态,对应的预设条件为第一条件。The parameter acquisition module 1001 is configured to acquire at least one preset parameter in response to the payment code opening operation. The payment code controllable display module 1002 is used for shielding the payment code if there is at least one preset parameter that does not meet the corresponding preset condition. The payment code controllable display module 1002 is also used to display the interface after the payment code is shielded. Wherein, the preset parameters include the posture of the electronic device acquired by the posture detection and recognition module 1003, and the corresponding preset condition is the first condition.
一种可能的设计中,电子设备的姿态包括电子设备的俯仰角;第一条件包括:电子设备的俯仰角满足第一角度范围。或者,电子设备的姿态包括电子设备的翻转角;第一条件包括:电子设备的翻转角满足第二角度范围;或者,电子设备的姿态包括电子设备的俯仰角和翻转角。第一条件包括:电子设备的俯仰角满足第一角度范围,且电子设备的翻转角满足第二角度范围。In a possible design, the attitude of the electronic device includes a pitch angle of the electronic device; the first condition includes: the pitch angle of the electronic device satisfies a first angle range. Or, the posture of the electronic device includes a flip angle of the electronic device; the first condition includes: the flip angle of the electronic device satisfies the second angle range; or, the posture of the electronic device includes a pitch angle and a flip angle of the electronic device. The first condition includes: the pitch angle of the electronic device satisfies a first angle range, and the flip angle of the electronic device satisfies a second angle range.
一种可能的设计中,屏蔽付款码后的界面包括提示信息,提示信息用于提示用户通过操作以使得电子设备显示付款码。In a possible design, the interface after the payment code is shielded includes prompt information, and the prompt information is used to prompt the user to make the electronic device display the payment code through operations.
一种可能的设计中,参数获取模块1001还包括环境光强检测与识别模块1004;预设参数还包括环境光强检测与识别模块1004获取的电子设备周围的环境光强,对应的预设条件为第三条件。第三条件包括电子设备周围的环境光强发生变化,且变化后的电子设备周围的环境光强满足第一预设光强范围。In a possible design, the parameter acquisition module 1001 also includes an ambient light intensity detection and identification module 1004; the preset parameters also include the ambient light intensity around the electronic device acquired by the ambient light intensity detection and identification module 1004, and the corresponding preset conditions for the third condition. The third condition includes that the ambient light intensity around the electronic device changes, and the changed ambient light intensity around the electronic device satisfies the first preset light intensity range.
一种可能的设计中,参数获取模块1001还包括支付环境检测与识别模块1005;预设参数还包括:支付环境检测与识别模块1005获取的扫码设备的图像,对应的预设条件为第二条件;第二条件包括扫码设备的图像属于预设扫码设备的图像。或者,预设参数还包括:支付环境检测与识别模块1005获取的扫码设备与电子设备之间的距离,对应的预设条件为第四条件。第四条件包括扫码设备与电子设备之间的距离满足预设距离范围。或者,预设参数还包括:支付环境检测与识别模块1005获取的扫码设备的图像以及扫码设备与电子设备之间的距离;扫码设备的图像对应的预设条件为第二条件,扫码设备与电子设备之间的距离对应的预设条件为第四条件。In a possible design, the parameter acquisition module 1001 also includes a payment environment detection and identification module 1005; the preset parameters also include: the image of the code scanning device acquired by the payment environment detection and identification module 1005, and the corresponding preset condition is the second Condition; the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device. Alternatively, the preset parameters also include: the distance between the code scanning device and the electronic device acquired by the payment environment detection and identification module 1005, and the corresponding preset condition is the fourth condition. The fourth condition includes that the distance between the code scanning device and the electronic device satisfies a preset distance range. Alternatively, the preset parameters also include: the image of the code-scanning device acquired by the payment environment detection and identification module 1005 and the distance between the code-scanning device and the electronic device; the preset condition corresponding to the image of the code-scanning device is the second condition. The preset condition corresponding to the distance between the code device and the electronic device is the fourth condition.
一种可能的设计中,参数获取模块1001还包括支付环境检测与识别模块1005;预设参数还包括:支付环境检测与识别模块1005获取的扫码设备的图像,对应的预设条件为第二条件;在扫码设备的图像不满足第二条件的情况下,对付款码进行屏蔽处理之前,环境光强检测与识别模块1004,还用于确定扫码设备的光强不满足第二预设光强范围。其中,第二条件包括扫码设备的图像属于预设扫码设备的图像。In a possible design, the parameter acquisition module 1001 also includes a payment environment detection and identification module 1005; the preset parameters also include: the image of the code scanning device acquired by the payment environment detection and identification module 1005, and the corresponding preset condition is the second Condition: when the image of the code scanning device does not meet the second condition, before shielding the payment code, the ambient light intensity detection and recognition module 1004 is also used to determine that the light intensity of the code scanning device does not meet the second preset light intensity range. Wherein, the second condition includes that the image of the code scanning device belongs to the image of the preset code scanning device.
一种可能的设计中,电子设备1000还包括验证模块1006;显示屏蔽付款码后的界面之后,验证模块1006,还用于提示用户输入验证信息。付款码可控显示模块1002,还用于响应于用户输入的验证信息,显示付款码。In a possible design, the electronic device 1000 further includes a verification module 1006; after the interface with the payment code masked is displayed, the verification module 1006 is also configured to prompt the user to input verification information. The payment code controllable display module 1002 is further configured to display the payment code in response to the verification information input by the user.
一种可能的设计中,付款码可控显示模块1002,还用于若至少一个预设参数满足 对应的预设条件,显示付款码。In a possible design, the payment code controllable display module 1002 is also used to display the payment code if at least one preset parameter meets a corresponding preset condition.
一种可能的设计中,电子设备包括手机、平板电脑、可穿戴设备中的一种或多种。In a possible design, the electronic device includes one or more of a mobile phone, a tablet computer, and a wearable device.
图10所示的电子设备1000的技术效果可以参考上文所述的显示方法的技术效果,此处不再赘述。For the technical effect of the electronic device 1000 shown in FIG. 10 , reference may be made to the technical effect of the display method described above, which will not be repeated here.
本申请实施例还提供一种芯片系统,如图11所示,该芯片系统包括至少一个处理器1101和至少一个接口电路1102。处理器1101和接口电路1102可通过线路互联。例如,接口电路1102可用于从其它装置接收信号。又例如,接口电路1102可用于向其它装置(例如处理器1101)发送信号。示例性的,接口电路1102可读取存储器中存储的指令,并将该指令发送给处理器1101。当所述指令被处理器1101执行时,可使得电子设备执行上述实施例中的电子设备执行的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。The embodiment of the present application also provides a chip system, as shown in FIG. 11 , the chip system includes at least one processor 1101 and at least one interface circuit 1102 . The processor 1101 and the interface circuit 1102 may be interconnected through wires. For example, interface circuitry 1102 may be used to receive signals from other devices. As another example, the interface circuit 1102 may be used to send signals to other devices (such as the processor 1101). Exemplarily, the interface circuit 1102 can read instructions stored in the memory, and send the instructions to the processor 1101 . When the instructions are executed by the processor 1101, the electronic device may be made to perform various steps performed by the electronic device in the foregoing embodiments. Of course, the chip system may also include other discrete devices, which is not specifically limited in this embodiment of the present application.
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。Optionally, there may be one or more processors in the chip system. The processor can be realized by hardware or by software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented by software, the processor may be a general-purpose processor implemented by reading software codes stored in a memory.
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。Optionally, there may be one or more memories in the chip system. The memory can be integrated with the processor, or can be set separately from the processor, which is not limited in this application. Exemplarily, the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be respectively arranged on different chips. The setting method of the processor is not specifically limited.
示例性的,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。Exemplarily, the chip system may be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC), It can also be a central processing unit (central processor unit, CPU), it can also be a network processor (network processor, NP), it can also be a digital signal processing circuit (digital signal processor, DSP), it can also be a microcontroller (micro controller unit, MCU), and can also be a programmable logic device (programmable logic device, PLD) or other integrated chips.
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。It should be understood that each step in the foregoing method embodiments may be implemented by an integrated logic circuit of hardware in a processor or instructions in the form of software. The method steps disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
本申请实施例提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序或指令,当计算机程序或指令在计算机上运行时,使得该计算机执行上述方法实施例所述的方法。An embodiment of the present application provides a computer-readable storage medium, on which a computer program or instruction is stored, and when the computer program or instruction is run on a computer, the computer is made to execute the method described in the above method embodiment.
本申请实施例提供一种计算机程序产品,该计算机程序产品包括:计算机程序或指令,当计算机程序或指令在计算机上运行时,使得该计算机执行上述方法实施例所述的方法。An embodiment of the present application provides a computer program product, and the computer program product includes: a computer program or an instruction. When the computer program or instruction is run on a computer, the computer is made to execute the method described in the above method embodiments.
另外,本申请的实施例还提供一种装置,该装置具体可以是组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使装置执行上述各方法实施例中的方法。In addition, the embodiments of the present application also provide a device, which may specifically be a component or a module, and the device may include a connected processor and a memory; wherein, the memory is used to store computer-executable instructions, and when the device is running, the processor The computer-executable instructions stored in the memory can be executed, so that the device executes the methods in the foregoing method embodiments.
其中,本申请实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the above-mentioned provided The beneficial effects of the corresponding method will not be repeated here.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated according to needs It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. For the specific working process of the above-described system, device, and unit, reference may be made to the corresponding process in the foregoing method embodiments, and details are not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的方法,可以通过其它的方式实现。各实施例在不冲突的情况下可以相互结合或相互参考。以上所描述的电子设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed method may be implemented in other ways. The various embodiments may be combined or referred to each other without conflict. The above-described electronic device embodiments are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined Or it can be integrated into another system, or some features can be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序指令的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic disk or optical disk, and other various media that can store program instructions.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the protection scope of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the application should be covered within the protection scope of the application . Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (12)

  1. 一种显示方法,应用于具有显示屏的电子设备,其特征在于,所述方法包括:A display method applied to an electronic device with a display screen, characterized in that the method comprises:
    响应于付款码开启操作,获取至少一个预设参数;Obtain at least one preset parameter in response to the payment code opening operation;
    若存在至少一个所述预设参数不满足对应的预设条件,对所述付款码进行屏蔽处理;If at least one of the preset parameters does not meet the corresponding preset condition, the payment code is shielded;
    显示屏蔽付款码后的界面;Display the interface after shielding the payment code;
    其中,所述预设参数包括所述电子设备的姿态,对应的预设条件为第一条件。Wherein, the preset parameters include the posture of the electronic device, and the corresponding preset condition is the first condition.
  2. 根据权利要求1所述的方法,其特征在于,所述电子设备的姿态包括所述电子设备的俯仰角;所述第一条件包括:所述电子设备的俯仰角满足第一角度范围;The method according to claim 1, wherein the posture of the electronic device includes a pitch angle of the electronic device; the first condition includes: the pitch angle of the electronic device satisfies a first angle range;
    或者,所述电子设备的姿态包括所述电子设备的翻转角;所述第一条件包括:所述电子设备的翻转角满足第二角度范围;Alternatively, the posture of the electronic device includes a flip angle of the electronic device; the first condition includes: the flip angle of the electronic device satisfies a second angle range;
    或者,所述电子设备的姿态包括所述电子设备的俯仰角和翻转角;所述第一条件包括:所述电子设备的俯仰角满足第一角度范围,且所述电子设备的翻转角满足第二角度范围。Alternatively, the posture of the electronic device includes a pitch angle and a flip angle of the electronic device; the first condition includes: the pitch angle of the electronic device satisfies a first angle range, and the flip angle of the electronic device satisfies a first angle range. Two angle ranges.
  3. 根据权利要求1或2所述的方法,其特征在于,所述屏蔽付款码后的界面包括提示信息,所述提示信息用于提示用户通过操作以使得所述电子设备显示所述付款码。The method according to claim 1 or 2, wherein the interface after the payment code is shielded includes prompt information, and the prompt information is used to prompt the user to make the electronic device display the payment code through an operation.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述预设参数还包括所述电子设备周围的环境光强,对应的预设条件为第三条件;所述第三条件包括所述电子设备周围的环境光强发生变化,且变化后的电子设备周围的环境光强满足第一预设光强范围。The method according to any one of claims 1-3, wherein the preset parameters further include ambient light intensity around the electronic device, and the corresponding preset condition is a third condition; the third condition It includes that the ambient light intensity around the electronic device changes, and the changed ambient light intensity around the electronic device satisfies a first preset light intensity range.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述预设参数还包括:扫码设备的图像,对应的预设条件为第二条件;所述第二条件包括所述扫码设备的图像属于预设扫码设备的图像;The method according to any one of claims 1-4, wherein the preset parameters further include: the image of the code scanning device, and the corresponding preset condition is the second condition; the second condition includes the The image of the scanning device belongs to the image of the default scanning device;
    或者,所述预设参数还包括:所述扫码设备与所述电子设备之间的距离,对应的预设条件为第四条件;所述第四条件包括所述扫码设备与所述电子设备之间的距离满足预设距离范围;Alternatively, the preset parameters also include: the distance between the code scanning device and the electronic device, and the corresponding preset condition is the fourth condition; the fourth condition includes the distance between the code scanning device and the electronic device. The distance between devices meets the preset distance range;
    或者,所述预设参数还包括:所述扫码设备的图像、所述扫码设备与所述电子设备之间的距离;所述扫码设备的图像对应的预设条件为所述第二条件,所述扫码设备与所述电子设备之间的距离对应的预设条件为所述第四条件。Alternatively, the preset parameters further include: the image of the code scanning device, the distance between the code scanning device and the electronic device; the preset condition corresponding to the image of the code scanning device is the second condition, the preset condition corresponding to the distance between the code scanning device and the electronic device is the fourth condition.
  6. 根据权利要求1-4任一项所述的方法,其特征在于,所述预设参数还包括:扫码设备的图像,对应的预设条件为第二条件;在所述扫码设备的图像不满足所述第二条件的情况下,对所述付款码进行屏蔽处理之前,所述方法还包括:The method according to any one of claims 1-4, wherein the preset parameters further include: the image of the code scanning device, and the corresponding preset condition is the second condition; the image of the code scanning device If the second condition is not met, before shielding the payment code, the method further includes:
    确定所述扫码设备的光强不满足第二预设光强范围;It is determined that the light intensity of the code scanning device does not meet the second preset light intensity range;
    其中,所述第二条件包括所述扫码设备的图像属于预设扫码设备的图像。Wherein, the second condition includes that the image of the code scanning device belongs to an image of a preset code scanning device.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,显示所述屏蔽付款码后的界面之后,所述方法还包括:The method according to any one of claims 1-6, wherein after displaying the interface after the shielded payment code is displayed, the method further comprises:
    提示用户输入验证信息;Prompt the user to enter authentication information;
    响应于用户输入的验证信息,显示所述付款码。The payment code is displayed in response to user-entered authentication information.
  8. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, characterized in that the method further comprises:
    若所述至少一个预设参数满足对应的预设条件,显示所述付款码。If the at least one preset parameter satisfies a corresponding preset condition, the payment code is displayed.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述电子设备包括手机、平板电脑、可穿戴设备中的一种或多种。The method according to any one of claims 1-8, wherein the electronic device includes one or more of a mobile phone, a tablet computer, and a wearable device.
  10. 一种电子设备,其特征在于,包括:处理器、存储器和显示屏,所述存储器、所述显示屏与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,使得所述电子设备执行如权利要求1-9中任一项所述的方法。An electronic device, characterized in that it includes: a processor, a memory and a display screen, the memory and the display screen are coupled to the processor, the memory is used to store computer program codes, and the computer program codes include Computer instructions, when the processor reads the computer instructions from the memory, the electronic device executes the method according to any one of claims 1-9.
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机执行如权利要求1-9中任一项所述的方法。A computer-readable storage medium, characterized in that computer programs or instructions are stored on the computer-readable storage medium, and when the computer programs or instructions are run on a computer, the computer is made to perform the tasks described in claim 1- The method described in any one of 9.
  12. 一种计算机程序产品,其特征在于,所述计算机程序产品包括:计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机执行如权利要求1-9中任一项所述的方法。A computer program product, characterized in that the computer program product comprises: a computer program or an instruction, when the computer program or instruction is run on a computer, the computer is made to perform any one of claims 1-9 the method described.
PCT/CN2022/111238 2021-10-18 2022-08-09 Display method and electronic device WO2023065783A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111210854.9 2021-10-18
CN202111210854.9A CN115994376A (en) 2021-10-18 2021-10-18 Display method and electronic equipment

Publications (1)

Publication Number Publication Date
WO2023065783A1 true WO2023065783A1 (en) 2023-04-27

Family

ID=85992754

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/111238 WO2023065783A1 (en) 2021-10-18 2022-08-09 Display method and electronic device

Country Status (2)

Country Link
CN (1) CN115994376A (en)
WO (1) WO2023065783A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109472575A (en) * 2017-09-07 2019-03-15 腾讯科技(深圳)有限公司 Numerical value shifts preparation method and device, computer equipment and storage medium
CN111833045A (en) * 2020-07-10 2020-10-27 苏宁金融科技(南京)有限公司 Method and device for preventing payment code from being embezzled
CN112581122A (en) * 2020-12-25 2021-03-30 维沃移动通信有限公司 Display method, payment code identification method and device and electronic equipment
CN112734416A (en) * 2019-10-14 2021-04-30 华为技术有限公司 Secure payment method and mobile terminal
CN112837057A (en) * 2019-11-22 2021-05-25 华为技术有限公司 Method for preventing payment code from being stolen, terminal equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109472575A (en) * 2017-09-07 2019-03-15 腾讯科技(深圳)有限公司 Numerical value shifts preparation method and device, computer equipment and storage medium
CN112734416A (en) * 2019-10-14 2021-04-30 华为技术有限公司 Secure payment method and mobile terminal
CN112837057A (en) * 2019-11-22 2021-05-25 华为技术有限公司 Method for preventing payment code from being stolen, terminal equipment and computer readable storage medium
CN111833045A (en) * 2020-07-10 2020-10-27 苏宁金融科技(南京)有限公司 Method and device for preventing payment code from being embezzled
CN112581122A (en) * 2020-12-25 2021-03-30 维沃移动通信有限公司 Display method, payment code identification method and device and electronic equipment

Also Published As

Publication number Publication date
CN115994376A (en) 2023-04-21

Similar Documents

Publication Publication Date Title
CN109034102B (en) Face living body detection method, device, equipment and storage medium
WO2020233564A1 (en) Method and electronic device for detecting adversarial example
US10990806B2 (en) Facial image processing method, terminal, and data storage medium
US20220253144A1 (en) Shortcut Function Enabling Method and Electronic Device
EP3869462A1 (en) Method for obtaining depth information and electronic device
US11910197B2 (en) Service processing method and device
WO2021037157A1 (en) Image recognition method and electronic device
CN108710833B (en) User identity authentication method and mobile terminal
US20230021413A1 (en) Voice Payment Method and Electronic Device
CN113641488A (en) Method and device for optimizing resources based on user use scene
EP4336330A1 (en) Two-dimensional code recognition method, electronic device, and storage medium
CN112241657A (en) Fingerprint anti-counterfeiting method and electronic equipment
CN113741681A (en) Image correction method and electronic equipment
CN113723144A (en) Face watching unlocking method and electronic equipment
CN111708998A (en) Face unlocking method and electronic equipment
US20210390688A1 (en) Wrinkle Detection Method And Terminal Device
CN113515987B (en) Palmprint recognition method, palmprint recognition device, computer equipment and storage medium
WO2023065783A1 (en) Display method and electronic device
CN115150542B (en) Video anti-shake method and related equipment
EP4145343A1 (en) Fingerprint liveness detection method and device, and storage medium
CN115238255A (en) Unlocking method and electronic equipment
CN116048350B (en) Screen capturing method and electronic equipment
CN116704080B (en) Blink animation generation method, device, equipment and storage medium
US20240127218A1 (en) Method for Displaying Two-Dimensional Code and Electronic Device
US20240086512A1 (en) Electronic device including image sensor and dynamic vison sensor, and operation method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22882404

Country of ref document: EP

Kind code of ref document: A1