CN111582857A - Two-dimensional code display method and device, electronic equipment and medium - Google Patents

Two-dimensional code display method and device, electronic equipment and medium Download PDF

Info

Publication number
CN111582857A
CN111582857A CN202010369842.XA CN202010369842A CN111582857A CN 111582857 A CN111582857 A CN 111582857A CN 202010369842 A CN202010369842 A CN 202010369842A CN 111582857 A CN111582857 A CN 111582857A
Authority
CN
China
Prior art keywords
dimensional code
code image
sub
images
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010369842.XA
Other languages
Chinese (zh)
Inventor
刘亚军
朱哈
文洁
张晓鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010369842.XA priority Critical patent/CN111582857A/en
Publication of CN111582857A publication Critical patent/CN111582857A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06Q20/327Short range or proximity payments by means of M-devices
    • G06Q20/3274Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being displayed on the M-device
    • G06T3/04

Abstract

The present disclosure provides a two-dimensional code display method performed by an electronic device. The method comprises the following steps: sending user information to a server so that the server generates a first two-dimensional code image according to the user information and sends the generated first two-dimensional code image to the electronic equipment; receiving a first two-dimensional code image from a server; dividing a plurality of sub-images from the received first two-dimensional code image; adjusting the positions of a plurality of sub-images aiming at the first two-dimensional code image to obtain a second two-dimensional code image; displaying a second two-dimensional code image; in response to a target operation, adjusting positions of the plurality of sub-images included therein for the second two-dimensional code image shown so as to restore the first two-dimensional code image based on the second two-dimensional code image; and displaying the first two-dimensional code image. The disclosure also provides a two-dimensional code display device, an electronic device and a computer readable storage medium.

Description

Two-dimensional code display method and device, electronic equipment and medium
Technical Field
The present disclosure relates to the field of information technologies, and in particular, to a two-dimensional code display method and apparatus, an electronic device, and a medium.
Background
Two-dimensional code payment is a new generation wireless payment scheme based on account system. In the scene of two-dimensional code payment, a user presents a two-dimensional code for payment, namely a payment code, to a merchant, and the merchant scans the payment code of the user by using an electronic payment tool, so that payment settlement between a user account and a merchant account can be realized.
With the prevalence of two-dimensional code payment modes, the two-dimensional code payment technology provides convenience for public life and exposes some potential safety hazards. For example, when a user pays for a two-dimensional code, a pay code page needs to be opened in advance to wait for a merchant to scan. In the process of waiting for the merchant to scan, the payment code is easily stolen and swiped after being stolen by a lawbreaker, so that the property of the user is lost.
Disclosure of Invention
One aspect of the present disclosure provides a two-dimensional code display method executed by an electronic device, including: sending user information to a server so that the server generates a first two-dimensional code image according to the user information and sends the generated first two-dimensional code image to the electronic equipment; receiving a first two-dimensional code image from the server; dividing a plurality of sub-images from the received first two-dimensional code image; adjusting the positions of the sub-images aiming at the first two-dimensional code image to obtain a second two-dimensional code image; displaying the second two-dimension code image; in response to a target operation, adjusting positions of the plurality of sub-images included therein for the second two-dimensional code image shown so as to restore the first two-dimensional code image based on the second two-dimensional code image; and displaying the first two-dimensional code image.
Optionally, the dividing the received first two-dimensional code image into a plurality of sub-images includes: a plurality of sub-images satisfying a preset shape and size are divided from the received first two-dimensional code image.
Optionally, the preset shape comprises one or more of the following shapes: triangular, circular, rectangular, parallelogram, and regular polygon.
Optionally, the adjusting the positions of the plurality of sub-images for the first two-dimensional code image to obtain a second two-dimensional code image includes: determining at least one sub-image pair from the plurality of sub-images, wherein each sub-image pair comprises two sub-images having the same shape and size; exchanging the positions of the two sub-images in each sub-image pair; and taking an image formed after the sub-image positions are exchanged as the second two-dimensional code image.
Optionally, the adjusting, for the displayed second two-dimensional code image, positions of the plurality of sub-images included therein includes: the positions of the two sub-images in each sub-image pair are exchanged again.
Optionally, the electronic device comprises a touch screen; and the target operation comprises: and performing touch operation aiming at a target area of the touch screen.
Another aspect of the present disclosure provides a two-dimensional code display device, including: the sending module is used for sending user information to a server so that the server generates a first two-dimensional code image according to the user information and sends the generated first two-dimensional code image to the electronic equipment; the receiving module is used for receiving the first two-dimensional code image from the server; the dividing module is used for dividing a plurality of sub-images from the received first two-dimensional code image; the adjusting module is used for adjusting the positions of the sub-images aiming at the first two-dimensional code image so as to obtain a second two-dimensional code image; the display module is used for displaying the second two-dimensional code image; the adjusting module may be further configured to adjust, in response to a target operation, positions of the plurality of sub-images included in the displayed second two-dimensional code image, so as to restore the first two-dimensional code image based on the second two-dimensional code image; and the display module can be further used for displaying the first two-dimensional code image.
Another aspect of the present disclosure provides an electronic device including: one or more processors; memory for storing one or more computer programs, wherein the one or more computer programs, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Optionally, the electronic device further comprises: and the touch screen is used for detecting target operation and displaying the first two-dimensional code image and/or the second two-dimensional code image according to the indication of the one or more processors.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
When a user carries out mobile payment, if a payment code page is opened in advance, the user is easily stolen and swiped after being stolen by a lawbreaker, so that the property of the user is lost. According to the embodiment of the disclosure, after the first two-dimensional code image (i.e. the payment code) is generated, the positions of the plurality of sub-images in the first two-dimensional code image are adjusted to obtain the second two-dimensional code image, and the second two-dimensional code image is displayed. The second two-dimensional code image hides the information in the first two-dimensional code image and cannot be normally identified, so that the second two-dimensional code image can be prevented from being stolen and brushed.
Drawings
For a more complete understanding of the present disclosure and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
fig. 1 schematically illustrates an application scenario of a two-dimensional code display method and a two-dimensional code display apparatus according to an embodiment of the present disclosure;
fig. 2 schematically shows a flowchart of a two-dimensional code presentation method performed by an electronic device according to an embodiment of the present disclosure;
fig. 3 schematically shows a flowchart for adjusting the positions of a plurality of sub-images for a first two-dimensional code image to obtain a second two-dimensional code image according to an embodiment of the present disclosure;
fig. 4 schematically shows a flowchart of a two-dimensional code presentation method performed by an electronic device according to another embodiment of the present disclosure;
fig. 5 schematically shows a first two-dimensional code image schematic according to an embodiment of the disclosure;
fig. 6 schematically shows a division result diagram of a first two-dimensional code image according to an embodiment of the present disclosure;
fig. 7 schematically illustrates a second two-dimensional code image schematic according to an embodiment of the present disclosure;
FIG. 8 is a diagram schematically illustrating a division result of a first two-dimensional code image according to another embodiment of the disclosure
Fig. 9 schematically shows a second two-dimensional code image schematic according to another embodiment of the present disclosure;
fig. 10 schematically shows a block diagram of a two-dimensional code presentation apparatus according to an embodiment of the present disclosure; and
fig. 11 schematically shows a block diagram of an electronic device adapted to implement the above described method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some block diagrams and/or flow diagrams are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations thereof, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, which execute via the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). In addition, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon for use by or in connection with an instruction execution system.
The embodiment of the disclosure provides a two-dimensional code display method executed by electronic equipment and a two-dimensional code display device capable of applying the method. The method comprises the steps of sending user information to a server, enabling the server to generate a first two-dimensional code image according to the user information, and sending the generated first two-dimensional code image to electronic equipment; receiving a first two-dimensional code image from a server; dividing a plurality of sub-images from the received first two-dimensional code image; adjusting the positions of a plurality of sub-images aiming at the first two-dimensional code image to obtain a second two-dimensional code image; and displaying the second two-dimensional code image.
Fig. 1 schematically illustrates an application scenario of a two-dimensional code display method and a two-dimensional code display apparatus according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server can generate a two-dimensional code for payment according to the received user information from the terminal equipment and feed the two-dimensional code back to the terminal equipment.
It should be noted that the two-dimensional code display method provided by the embodiment of the present disclosure may be generally executed by the terminal devices 101, 102, and 103. Accordingly, the two-dimensional code display device provided by the embodiment of the disclosure can be generally disposed in the terminal devices 101, 102, and 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically shows a flowchart of a two-dimensional code presentation method performed by an electronic device according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S210 to S250.
In operation S210, user information is transmitted to the server, so that the server generates a first two-dimensional code image according to the user information and transmits the generated first two-dimensional code image to the electronic device.
According to an embodiment of the present disclosure, the user information may be String type String information, for example, including personal information of the user, a bank card number used for payment, an order number, order information, a date, and a customer signature. The terminal equipment sends user information to the server, the server can call a preset two-dimensional code generating method according to the user information to generate a unique two-dimensional code image, and the two-dimensional code image can be used as a certificate during payment.
In operation S220, a first two-dimensional code image is received from a server.
In operation S230, a plurality of sub-images are divided from the received first two-dimensional code image.
According to an embodiment of the present disclosure, operation S230 may include, for example, dividing a plurality of sub-images satisfying a preset shape and size from the received first two-dimensional code image.
According to an embodiment of the present disclosure, the preset shape in the present embodiment may be a regular figure, for example, a triangle, a circle, a rectangle, a parallelogram, a regular polygon, and the like, for the sake of the beautiful appearance of the reconstructed image. It should be noted that in other embodiments of the present disclosure, the shape of the sub-image may be irregular.
According to an embodiment of the present disclosure, the size of the sub-image is at least 1 pixel. The number of sub-images divided from the first two-dimensional code image is at least two. The more the sub-images are, the higher the complexity of the second two-dimensional code image obtained by subsequent operation is, and the safer the second two-dimensional code image is.
According to the embodiments of the present disclosure, all the sub-images may have the same shape and size, or the sub-images may be divided into a plurality of groups, the sub-images within each group have the same shape and size, and the sub-images within different groups have different shapes and sizes.
In operation S240, the positions of the plurality of sub-images are adjusted for the first two-dimensional code image to obtain a second two-dimensional code image.
Fig. 3 schematically shows a flowchart for adjusting positions of a plurality of sub-images for a first two-dimensional code image to obtain a second two-dimensional code image according to an embodiment of the present disclosure.
As shown in fig. 3, operation S240 may include, for example, operations S341 to S343.
In operation S341, at least one pair of sub-images is determined from the plurality of sub-images.
Wherein each sub-image pair comprises two sub-images having the same shape and size.
According to an embodiment of the present disclosure, at least one pair of sub-images may be determined from the plurality of sub-images according to a preset algorithm. For example, a random algorithm may be employed to randomly select two sub-images of the same shape and size from a plurality of sub-images as a pair of sub-images.
In operation S342, the positions of the two sub-images in each sub-image pair are exchanged.
In operation S343, an image formed after exchanging the sub-image positions is taken as a second two-dimensional code image.
In operation S250, a second two-dimensional code image is presented.
According to the embodiment of the disclosure, after the second two-dimensional code image is obtained by the adjustment of the first two-dimensional code image, the second two-dimensional code image can be displayed through the display device. The display device may be, for example, a touch screen of the terminal.
When a user carries out mobile payment, if a payment code page is opened in advance, the user is easily stolen and swiped after being stolen by a lawbreaker, so that the property of the user is lost. According to the embodiment of the disclosure, after the first two-dimensional code image (i.e. the payment code) is generated, the positions of the plurality of sub-images in the first two-dimensional code image are adjusted to obtain the second two-dimensional code image, and the second two-dimensional code image is displayed. The second two-dimensional code image hides the information in the first two-dimensional code image and cannot be normally identified, so that the second two-dimensional code image can be prevented from being stolen and brushed.
In addition, when the server generates a payment code, a corresponding validity period attribute, such as a session attribute, is set for the payment code. The attribute may be used to characterize the validity period of the payment code, and when the validity period of the payment code has elapsed, the payment code will be invalidated and the server will regenerate a new payment code. The longer the validity period is set, the higher the risk of fraudulent swiping is, and the shorter the validity period is set, the higher the frequency of generation of the payment code by the server, and thus the higher the processing load of the server. According to the embodiment of the disclosure, since the positions of the plurality of sub-images in the payment code image are adjusted within the validity period of the payment code, the information in the payment code is hidden, and the risk of being embezzled is reduced. Therefore, a longer validity period can be set for the payment code, so that the processing burden of the server for regenerating the payment code can be reduced under the condition that the risk of the stolen swiping is lower.
Fig. 4 schematically shows a flowchart of a two-dimensional code presentation method performed by an electronic device according to another embodiment of the present disclosure.
As shown in fig. 4, the method includes operations S460 to S470 in addition to operations S210 to S250.
In operation S460, in response to the target operation, positions of a plurality of sub-images included therein are adjusted for the second two-dimensional code image shown so as to restore the first two-dimensional code image based on the second two-dimensional code image.
According to an embodiment of the present disclosure, the target operation may include: and performing touch operation on a target area of the touch screen. The target area may be any area on the touch screen that can receive the touch signal, for example, a display area of the second two-dimensional code image.
According to an embodiment of the present disclosure, the first two-dimensional code image may be restored based on the second two-dimensional code image by again exchanging the positions of the two sub-images in each sub-image pair.
In operation S470, a first two-dimensional code image is shown.
According to the embodiment of the present disclosure, the second two-dimensional code image displayed by the display device is transformed into the first two-dimensional code image to show the first two-dimensional code image.
According to the embodiment of the disclosure, the second two-dimensional code image is automatically restored to the correct first two-dimensional code image in response to the target operation, so that the user can normally complete the code scanning payment operation.
According to another embodiment of the present disclosure, in the process of transforming the second two-dimensional code image displayed by the display device into the first two-dimensional code image, a time-delay animation effect may be further set to show the position moving process of the two sub-images in each sub-image pair, thereby prompting the user that the two-dimensional code image is being restored.
The method shown in fig. 2-4 is further described with reference to fig. 5-7 in conjunction with specific embodiments.
Fig. 5 schematically shows a first two-dimensional code image schematic according to an embodiment of the disclosure.
The first two-dimensional code image shown in fig. 5 is equally divided into 9 rectangular sub-images of the same size. The division result is as shown in fig. 6, the 9 sub-images are labeled as a1, a2, A3, B1, B2, B3, C1, C2 and C3 in order from left to right and from top to bottom, and the corresponding initial positions are labeled as a1, a2, A3, B1, B2, B3, C1, C2 and C3, respectively. The positions of the plurality of sub-images are adjusted according to the following algorithm.
According to a random algorithm, the sub-image pairs are determined as a1 and a2, B1 and B2, C1 and C3, a1 and A3, B1 and B3, C1 and C2, respectively.
3 null variables x, y and z are provided for temporary storage of position coordinates when exchanging sub-image positions.
For a1 and a2, the initial coordinate attribute value of a1 (i.e., the coordinate of a 1) is assigned to x, the initial coordinate attribute value of a2 (i.e., the coordinate of a 2) is assigned to the coordinate attribute of a1, and then x is assigned to the coordinate attribute of a2, thereby interchanging the positions of the two sub-images of a1 and a 2.
For B1 and B2, the initial coordinate attribute value of B1 (i.e., the coordinate of B1) is assigned to y, the initial coordinate attribute value of B2 (i.e., the coordinate of B2) is assigned to the coordinate attribute of B1, and then y is assigned to the coordinate attribute of B2, so that the positions of the two sub-images of B1 and B2 are switched.
For C1 and C3, the initial coordinate attribute value of C1 (i.e., the coordinate of C1) is assigned to z, the initial coordinate attribute value of C3 (i.e., the coordinate of C3) is assigned to the coordinate attribute of C1, and then z is assigned to the coordinate attribute of C3, thereby swapping the positions of the two sub-images of C1 and C3.
Next, similarly to the above-described operation, the positions of a1 and A3, R1 and B3, C1 and C2 are exchanged, respectively. When all the exchange operations are completed, a second two-dimensional code image is generated as shown in fig. 7.
After receiving a click event for a target area of the touch screen, performing an algorithm used when positions are exchanged before one time, exchanging the positions of the sub-images, and restoring the second two-dimensional code image into the first two-dimensional code image, wherein the restored first two-dimensional code image is as shown in fig. 5.
The method shown in fig. 2-4 is further described with reference to fig. 8-9 in conjunction with another embodiment.
The first two-dimensional code image shown in fig. 5 is equally divided into 64 rectangular sub-images. The division result is shown in fig. 8, each line of sub-images is labeled with a, b, c, d, e, f, g, h in the order from top to bottom, and the positions of the sub-images are further labeled with a1, a2, a3,...... b1, b2, b3, a.... c1, c2, c3, a.... d1, d2, d3.. The positions of the multiple sub-images are then adjusted according to the following algorithm.
Randomly generating a non-0 number m as a base number, then setting the initial value of i to be 1, and repeatedly executing the following operations until i is equal to the total number of rows: will be the ith row mi-1Sub-image and line i +1 mi-1The positions of the sub-images are swapped, and then i is made i +1, i +1 being new i. Wherein, if mi-1If the maximum label of the subimage in the row is greater than the maximum label of the subimage in the row, the subimages are not interchanged.
E.g. random generationIs 2, the 2 nd of the two rows a, b0The exchange positions of the sub-images, i.e., the two sub-image exchange positions at the original a1 and b1 positions. c. d2 nd of two rows1The exchange positions of the sub-images, i.e., the original c2 and two sub-images at the d2 position. e. f 2 nd of two rows2The exchange positions of the sub-images, i.e., the original e4 and the two sub-images at the f4 position. g. h 2 nd of two rows3The exchange positions of the sub-images, i.e., the original g8 and the two sub-images at the h8 position. After all the exchange operations are completed, a second two-dimensional code image is generated as shown in fig. 9.
After receiving the click event for the target area of the touch screen, similarly to the above exchange operation, the algorithm is repeated once again with 2 as the base number, so as to obtain the restored first two-dimensional code image as shown in fig. 5.
Fig. 10 schematically shows a block diagram of a two-dimensional code presentation apparatus according to an embodiment of the present disclosure.
As shown in fig. 10, the two-dimensional code display apparatus 1000 includes a transmitting module 1010, a receiving module 1020, a dividing module 1030, an adjusting module 1040, and a display module 1050. The two-dimensional code display apparatus 1000 may perform the method described above with reference to fig. 2 to 4.
Specifically, the sending module 1010 is configured to send the user information to the server, so that the server generates a first two-dimensional code image according to the user information, and sends the generated first two-dimensional code image to the electronic device.
A receiving module 1020, configured to receive the first two-dimensional code image from the server.
A dividing module 1030, configured to divide a plurality of sub-images from the received first two-dimensional code image.
The adjusting module 1040 is configured to adjust positions of the multiple sub-images for the first two-dimensional code image to obtain a second two-dimensional code image.
And a display module 1050 configured to display the second two-dimensional code image.
According to an embodiment of the present disclosure, the receiving module 1020 may be specifically configured to divide a plurality of sub-images satisfying a preset shape and size from the received first two-dimensional code image. Wherein the preset shape comprises one or more of the following shapes: triangular, circular, rectangular, parallelogram, and regular polygon.
According to an embodiment of the present disclosure, the adjusting module 1040 may be specifically configured to determine at least one sub-image pair from a plurality of sub-images, wherein each sub-image pair includes two sub-images having the same shape and size; exchanging the positions of the two sub-images in each sub-image pair; and taking the image formed after the sub-image positions are exchanged as a second two-dimensional code image.
According to the embodiment of the disclosure, after the first two-dimensional code image is generated, the positions of the plurality of sub-images in the first two-dimensional code image are adjusted to obtain the second two-dimensional code image, and the second two-dimensional code image is displayed. The second two-dimensional code image hides the information in the first two-dimensional code image and cannot be normally identified, so that the second two-dimensional code image can be prevented from being stolen and brushed.
According to another embodiment of the present disclosure, the adjusting module 1040 may be further configured to adjust, in response to the target operation, positions of a plurality of sub-images included in the displayed second two-dimensional code image, so as to recover the first two-dimensional code image based on the second two-dimensional code image. Wherein, adjusting the positions of the plurality of sub-images included in the displayed second two-dimensional code image may include: the positions of the two sub-images in each sub-image pair are exchanged again. The display module 1050 may also be used to display the first two-dimensional code image.
According to the embodiment of the disclosure, the second two-dimensional code image is automatically restored to the correct first two-dimensional code image in response to the target operation, so that the user can normally complete the code scanning payment operation.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any of the transmitting module 1010, the receiving module 1020, the dividing module 1030, the adjusting module 1040, and the presenting module 1050 may be combined into one module to be implemented, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the transmitting module 1010, the receiving module 1020, the dividing module 1030, the adjusting module 1040 and the displaying module 1050 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware by any other reasonable manner of integrating or packaging a circuit, or may be implemented in any one of three implementations of software, hardware and firmware, or in a suitable combination of any several of them. Alternatively, at least one of the sending module 1010, the receiving module 1020, the dividing module 1030, the adjusting module 1040 and the presenting module 1050 may be at least partially implemented as a computer program module that, when executed, may perform a corresponding function.
Fig. 11 schematically shows a block diagram of an electronic device adapted to implement the above described method according to an embodiment of the present disclosure. The computer system illustrated in FIG. 11 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 11, electronic device 1100 includes a processor 1110, a computer-readable storage medium 1120, a signal transmitter 1130, a signal receiver 1140, and a touch screen 1150. The electronic device 1100 may perform a method according to an embodiment of the disclosure.
In particular, processor 1110 may include, for example, a general purpose microprocessor, an instruction set processor and/or related chip set and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), and/or the like. The processor 1110 may also include onboard memory for caching purposes. Processor 1110 may be a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
Computer-readable storage medium 1120, for example, may be a non-volatile computer-readable storage medium, specific examples including, but not limited to: magnetic storage devices, such as magnetic tape or Hard Disk Drives (HDDs); optical storage devices, such as compact disks (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and so on.
The computer-readable storage medium 1120 may include a computer program 1121, and the computer program 1121 may include code/computer-executable instructions that, when executed by the processor 1110, cause the processor 1110 to perform a method according to an embodiment of the present disclosure, or any variation thereof.
The computer programs 1121 can be configured to have, for example, computer program code including computer program modules. For example, in an example embodiment, code in computer program 1121 may include one or more program modules, including, for example, 1121A, 1121B, … …. It should be noted that the division and number of modules are not fixed, and those skilled in the art may use suitable program modules or program module combinations according to actual situations, so that the processor 1110 may execute the method according to the embodiment of the present disclosure or any variation thereof when the program modules are executed by the processor 1110.
In accordance with an embodiment of the present disclosure, processor 1110 may interact with signal transmitter 1130 and signal receiver 1140 to perform a method in accordance with an embodiment of the present disclosure or any variation thereof.
The touch screen 1150 may be used to receive input signals such as contacts and to display images, videos, etc., as directed by one or more processors according to embodiments of the present disclosure. The touch screen 1150 includes sensors and a display panel. The sensor can be an infrared sensor, a resistive sensor, an acoustic wave sensor, a capacitive sensor, and the like. The Display panel may be a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), an Active-Matrix Organic Light-Emitting Diode (AMOLED), a flexible Light-Emitting Diode (FLED), a Quantum dot Light-Emitting Diode (QLED), or the like.
According to an embodiment of the present invention, at least one of the transmitting module 1010, the receiving module 1020, the dividing module 1030, the adjusting module 1040, and the presenting module 1050 may be implemented as a computer program module described with reference to fig. 10, which, when executed by the processor 1010, may implement the corresponding operations described above.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
While the disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims and their equivalents. Accordingly, the scope of the present disclosure should not be limited to the above-described embodiments, but should be defined not only by the appended claims, but also by equivalents thereof.

Claims (10)

1. A two-dimensional code display method executed by electronic equipment comprises the following steps:
sending user information to a server so that the server generates a first two-dimensional code image according to the user information and sends the generated first two-dimensional code image to the electronic equipment;
receiving a first two-dimensional code image from the server;
dividing a plurality of sub-images from the received first two-dimensional code image;
adjusting the positions of the sub-images aiming at the first two-dimensional code image to obtain a second two-dimensional code image;
displaying the second two-dimension code image;
in response to a target operation, adjusting positions of the plurality of sub-images included therein for the second two-dimensional code image shown so as to restore the first two-dimensional code image based on the second two-dimensional code image; and
and displaying the first two-dimensional code image.
2. The method of claim 1, wherein said dividing the plurality of sub-images from the received first two-dimensional code image comprises:
a plurality of sub-images satisfying a preset shape and size are divided from the received first two-dimensional code image.
3. The method of claim 2, wherein the preset shape comprises one or more of the following shapes: triangular, circular, rectangular, parallelogram, and regular polygon.
4. The method of claim 2, wherein the adjusting the positions of the plurality of sub-images for the first two-dimensional code image to obtain a second two-dimensional code image comprises:
determining at least one sub-image pair from the plurality of sub-images, wherein each sub-image pair comprises two sub-images having the same shape and size;
exchanging the positions of the two sub-images in each sub-image pair; and
and taking the image formed after the sub-image positions are exchanged as the second two-dimensional code image.
5. The method of claim 4, wherein the adjusting the position of the plurality of sub-images included therein for the second two-dimensional code image presented comprises:
the positions of the two sub-images in each sub-image pair are exchanged again.
6. The method of claim 1, wherein,
the electronic device comprises a touch screen; and
the target operation comprises: and performing touch operation aiming at a target area of the touch screen.
7. A two-dimensional code display device comprises:
the sending module is used for sending user information to a server so that the server generates a first two-dimensional code image according to the user information and sends the generated first two-dimensional code image to the electronic equipment;
the receiving module is used for receiving the first two-dimensional code image from the server;
the dividing module is used for dividing a plurality of sub-images from the received first two-dimensional code image;
the adjusting module is used for adjusting the positions of the sub-images aiming at the first two-dimensional code image so as to obtain a second two-dimensional code image;
the display module is used for displaying the second two-dimensional code image;
the adjusting module may be further configured to adjust, in response to a target operation, positions of the plurality of sub-images included in the displayed second two-dimensional code image, so as to restore the first two-dimensional code image based on the second two-dimensional code image; and
the display module can also be used for displaying the first two-dimensional code image.
8. An electronic device, comprising:
one or more processors;
a memory for storing one or more computer programs,
wherein the one or more computer programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 6.
9. The electronic device of claim 8, further comprising:
and the touch screen is used for detecting target operation and displaying the first two-dimensional code image and/or the second two-dimensional code image according to the indication of the one or more processors.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 6.
CN202010369842.XA 2020-04-30 2020-04-30 Two-dimensional code display method and device, electronic equipment and medium Pending CN111582857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010369842.XA CN111582857A (en) 2020-04-30 2020-04-30 Two-dimensional code display method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010369842.XA CN111582857A (en) 2020-04-30 2020-04-30 Two-dimensional code display method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN111582857A true CN111582857A (en) 2020-08-25

Family

ID=72115196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010369842.XA Pending CN111582857A (en) 2020-04-30 2020-04-30 Two-dimensional code display method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN111582857A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115204860A (en) * 2022-09-14 2022-10-18 北京博思致新互联网科技有限责任公司 Self-service payment system based on unified payment platform

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004206322A (en) * 2002-12-25 2004-07-22 Canon Electronics Inc Two dimensional code processing method
CN108921266A (en) * 2018-09-29 2018-11-30 长安大学 A kind of static two dimensional code encryption display methods and device based on image segmentation
CN110390635A (en) * 2018-04-19 2019-10-29 张佳炜 Two-dimensional barcode information encryption method, coding/decoding method and device based on image procossing
CN110414243A (en) * 2018-04-26 2019-11-05 杭州海康威视数字技术股份有限公司 A kind of two dimensional code encryption method, device and two dimensional code decryption method, device
CN110598421A (en) * 2018-06-13 2019-12-20 杭州海康威视数字技术股份有限公司 Two-dimensional code encryption method and device and two-dimensional code decryption method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004206322A (en) * 2002-12-25 2004-07-22 Canon Electronics Inc Two dimensional code processing method
CN110390635A (en) * 2018-04-19 2019-10-29 张佳炜 Two-dimensional barcode information encryption method, coding/decoding method and device based on image procossing
CN110414243A (en) * 2018-04-26 2019-11-05 杭州海康威视数字技术股份有限公司 A kind of two dimensional code encryption method, device and two dimensional code decryption method, device
CN110598421A (en) * 2018-06-13 2019-12-20 杭州海康威视数字技术股份有限公司 Two-dimensional code encryption method and device and two-dimensional code decryption method and device
CN108921266A (en) * 2018-09-29 2018-11-30 长安大学 A kind of static two dimensional code encryption display methods and device based on image segmentation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115204860A (en) * 2022-09-14 2022-10-18 北京博思致新互联网科技有限责任公司 Self-service payment system based on unified payment platform
CN115204860B (en) * 2022-09-14 2022-12-13 北京博思致新互联网科技有限责任公司 Self-service payment system based on unified payment platform

Similar Documents

Publication Publication Date Title
WO2021000577A1 (en) Method and apparatus for face-swiping payment
EP3232633B1 (en) Service processing method and apparatus, and service server
EP2740068B1 (en) Method and apparatus for inputting password using game
US20180060940A1 (en) Method and apparatus for processing transaction data
US20180114247A1 (en) Methods and systems for determining user interaction based data in a virtual environment transmitted by three dimensional assets
TWI633506B (en) A message sending method, system and device thereof
CN106899552A (en) Authentication method, certification terminal and system
US8706522B2 (en) Methods and systems for pharmacy location
US11023956B2 (en) Guided purchasing via smartphone
CN111582857A (en) Two-dimensional code display method and device, electronic equipment and medium
US10169759B2 (en) Verifying online transaction integrity and authentication with QR codes
CN105247880A (en) Claiming incentives on networked televisions
CN110610410A (en) On-chain pledge asset return system and method through off-chain settlement
CN113435554B (en) Method, device, equipment and medium for managing and displaying information triggered by code scanning
CN109978441A (en) Vehicle selection method, equipment and storage medium
CN116798139B (en) Device transaction method, device, computer device and storage medium
US11874915B2 (en) Methods and systems for acoustic authentication
US11853825B2 (en) Video/animated QR codes—privacy
CN110620805B (en) Method and apparatus for generating information
CN116150188A (en) Information query method, device, computer equipment and storage medium
KR101857002B1 (en) Method and apparatus for providing preview of emoticon
CN117172770A (en) Resource processing method, device, computer equipment and storage medium
CN114240331A (en) Report generation method, report generation device, storage medium, and computer device
CN117608405A (en) Resource transfer method, device, equipment and storage medium based on meta universe
CN117078263A (en) Resource transfer method, device, computer equipment and storage medium

Legal Events

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