CN111401882A - Two-dimensional code display method and device, storage medium and electronic equipment - Google Patents
Two-dimensional code display method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN111401882A CN111401882A CN202010148499.6A CN202010148499A CN111401882A CN 111401882 A CN111401882 A CN 111401882A CN 202010148499 A CN202010148499 A CN 202010148499A CN 111401882 A CN111401882 A CN 111401882A
- Authority
- CN
- China
- Prior art keywords
- data transfer
- dimensional code
- definition
- displaying
- environment
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000012546 transfer Methods 0.000 claims abstract description 226
- 238000012545 processing Methods 0.000 claims description 21
- 230000007613 environmental effect Effects 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 7
- 238000012790 confirmation Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 5
- 238000004422 calculation algorithm Methods 0.000 description 4
- 229910002056 binary alloy Inorganic materials 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000010365 information processing Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/30—Payment architectures, schemes or protocols characterised by the use of specific devices or networks
- G06Q20/32—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
- G06Q20/327—Short range or proximity payments by means of M-devices
- G06Q20/3274—Short 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Computer Networks & Wireless Communication (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the application discloses a two-dimensional code display method, a two-dimensional code display device, a storage medium and electronic equipment, wherein the method comprises the following steps: receiving a starting instruction aiming at a data transfer two-dimensional code, and displaying the data transfer two-dimensional code by adopting a first definition, wherein the first definition is smaller than a definition threshold value; when the safety of the current data transfer environment is confirmed, adjusting the current definition of the data transfer two-dimensional code to be a second definition, wherein the second definition is greater than or equal to the definition threshold; and displaying the data transfer two-dimensional code by adopting the second definition. By adopting the embodiment of the application, the data transfer environment is identified, the data transfer two-dimensional codes are displayed with different definitions, the risk of being identified by other equipment is reduced, and the data transfer safety is improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a two-dimensional code display method and apparatus, a storage medium, and an electronic device.
Background
Nowadays, it is very common to adopt two-dimensional code to carry out data transfer, and the condition that various two-dimensional codes are stolen and brushed also often appears. For example, before data transfer, a two-dimensional code interface is opened in advance, and at this time, if a person beside the two-dimensional code interface is aligned with the two-dimensional code interface to take a picture, or data transfer is completed by directly scanning the two-dimensional code interface through a mobile phone, information leakage or property loss is caused, and the security of data transfer is reduced.
Disclosure of Invention
The embodiment of the application provides a two-dimension code display method and device, a storage medium and electronic equipment. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a two-dimensional code display method, where the method includes:
receiving a starting instruction aiming at a data transfer two-dimensional code, and displaying the data transfer two-dimensional code by adopting a first definition, wherein the first definition is smaller than a definition threshold value;
when the safety of the current data transfer environment is confirmed, adjusting the current definition of the data transfer two-dimensional code to be a second definition, wherein the second definition is greater than or equal to the definition threshold;
and displaying the data transfer two-dimensional code by adopting the second definition.
In a second aspect, an embodiment of the present application provides a two-dimensional code display device, where the device includes:
the first two-dimensional code display module is used for receiving an opening instruction aiming at the data transfer two-dimensional code and displaying the data transfer two-dimensional code by adopting a first definition, wherein the first definition is smaller than a definition threshold value;
the definition adjusting module is used for adjusting the current definition of the data transfer two-dimensional code to a second definition when the safety of the current data transfer environment is confirmed, wherein the second definition is greater than or equal to the definition threshold;
and the second two-dimension code display module is used for displaying the data transfer two-dimension code by adopting the second definition.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
in the embodiment of the application, an opening instruction for the data transfer two-dimensional code is received, the data transfer two-dimensional code is displayed by adopting the first definition smaller than the definition threshold, and when the safety of the current data transfer environment is confirmed, the current definition of the data transfer two-dimensional code is adjusted to be the second definition larger than or equal to the definition threshold, and then the second definition is displayed by adopting the data transfer two-dimensional code. Through discerning data transfer environment security to the definition show data transfer two-dimensional code of difference has reduced the risk of being discerned by other equipment, and then has improved the security of data transfer.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a two-dimensional code display method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a two-dimensional code display method according to an embodiment of the present application;
fig. 3 is an exemplary schematic diagram of a data transfer two-dimensional code display interface provided in an embodiment of the present application;
fig. 4 is an exemplary schematic diagram of another data transfer two-dimensional code display interface provided in an embodiment of the present application;
fig. 5 is an exemplary schematic diagram of a fuzzy two-dimensional code display interface provided in an embodiment of the present application;
fig. 6 is a schematic view of a scene in which a camera scans a two-dimensional code displayed by other terminals in an embodiment of the present application;
fig. 7 is an exemplary schematic diagram of an environmental hazard prompting information displaying interface according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a two-dimensional code display device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a parameter obtaining module according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of another two-dimensional code display device provided in the embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is noted that, unless explicitly stated or limited otherwise, "including" and "having" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The present application will be described in detail with reference to specific examples.
In one embodiment, as shown in fig. 1, a two-dimensional code display method is specifically proposed, which can be implemented by relying on a computer program and can run on a two-dimensional code display device based on von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application. The two-dimensional code display device may be an electronic device, including but not limited to: wearable devices, handheld devices, personal computers, tablet computers, in-vehicle devices, smart phones, computing devices or other processing devices connected to a wireless modem, and the like.
Specifically, the two-dimensional code display method comprises the following steps:
s101, receiving a starting instruction aiming at a data transfer two-dimensional code, and displaying the data transfer two-dimensional code by adopting a first definition, wherein the first definition is smaller than a definition threshold value;
the two-dimensional code is a pattern which is distributed on a plane (in a two-dimensional direction) according to a certain rule by using a certain specific geometric figure, is black and white and is alternated and records data symbol information; the concept of "0" and "1" bit stream forming the internal logic basis of computer is used ingeniously in coding, several geometric forms correspondent to binary system are used to represent literal numerical information, and can be automatically read by means of image input equipment or photoelectric scanning equipment so as to implement automatic information processing.
Commonly used code systems are: QR (quick response) Code, Data Matrix, MaxiCode, Aztec, Vericode, PDF417, Ultracode, Code 49, Code 16K, and the like. The most common two-dimensional Code is QR Code, which is an encoding mode that is super-popular on mobile devices in recent years, and compared with the traditional Bar Code barcode, the barcode can store more information and represent more data types.
The two-dimensional code can be used in different fields, such as website skipping, advertisement pushing, member management, account login, data transfer and the like. In the embodiment of the application, the application is applied to the field of data transfer, and the mentioned two-dimensional code is a data transfer two-dimensional code and is generally arranged in a data transfer application or a data transfer applet or a data transfer website.
Taking the data transfer two-dimensional code as an example, the data transfer two-dimensional code is set in the data transfer application, and after the user opens the data transfer application, the user clicks the data transfer function therein, and then the data transfer two-dimensional code is displayed in the display interface.
It should be noted that, before presentation, a data transfer two-dimensional code region in the data transfer page is identified, and the data transfer two-dimensional code region is subjected to fuzzy processing, so as to reduce the definition of the data transfer two-dimensional code to reach a fuzzy degree. The definition threshold value can be understood as the definition degree which cannot be identified by the cash register device, and after fuzzy processing, the user information contained in the two-dimensional code cannot be read when the cash register terminal scans. And the data transfer two-dimensional code can be subjected to fuzzy processing by adopting a common image fuzzy algorithm. Of course, the simplest implementation may be to adjust only the sharpness of the two-dimensional code region.
S102, when the safety of the current data transfer environment is confirmed, adjusting the current definition of the data transfer two-dimensional code to a second definition, wherein the second definition is greater than or equal to the definition threshold;
the data transfer environment is an environment state around when the data transfer is performed under the current environment and the data transfer two-dimensional code is displayed.
And identifying the data transfer environment and judging whether the environment is safe or not so as to avoid property loss caused by information leakage. One feasible identification method is to start the camera and identify the payment environment by using the front camera. The camera can be a front camera, can also be a rear camera, and can also be a front camera and a rear camera. Of course, since the data transfer two-dimensional code is displayed on the display interface, the stealing of the two-dimensional code is mostly located above the display interface, for example, if a nearby person aims at the data transfer two-dimensional code to take a picture, or the data transfer two-dimensional code is directly scanned by a mobile phone, the stealing occurs, and therefore, it is preferable to turn on the front camera.
Specifically, the camera is used for collecting surrounding environment information, whether the condition that the unknown equipment shoots or scans the two-dimensional code exists or not is identified, if not, the safety of the current data transfer environment is confirmed, and otherwise, the safety is not ensured. When the security is confirmed, it indicates that the data transfer operation can be performed, and therefore, the definition of the fuzzy data transfer two-dimensional code needs to be adjusted, so that the cash register terminal can conveniently recognize the fuzzy data transfer two-dimensional code.
The process of two-dimensional code sharpening is the reverse process of the fuzzy processing. The definition of the fuzzy two-dimensional code can be adjusted only, and the image definition algorithm can also be adopted for realizing the definition. For the image processing clearness algorithm, the realization principle is as follows: the general image is composed of three primary colors of color light, red, green and blue, and theoretically, only one color information is complete, the general image can be used for assisting in repairing other color light, so that the image can be cleared as long as the color light distribution condition at the time can be calculated.
The definition threshold is the lowest definition recognizable by the cash register terminal, and the second definition is any value larger than the threshold and can be preset.
S103, displaying the data transfer two-dimensional code by adopting the second definition.
After the definition adjustment of the data transfer two-dimensional code is completed, the data transfer two-dimensional code can be clearly displayed in a two-dimensional code area of a display interface.
Furthermore, the cash register terminal can scan and identify the two-dimensional code, and for the terminal, the cash register terminal receives a data transfer instruction and performs data transfer.
Optionally, after the data transfer is confirmed to be successful, the data transfer two-dimensional code is closed or periodically refreshed, so as to further confirm information security.
In the embodiment of the application, an opening instruction for the data transfer two-dimensional code is received, the data transfer two-dimensional code is displayed by adopting the first definition smaller than the definition threshold, and when the safety of the current data transfer environment is confirmed, the current definition of the data transfer two-dimensional code is adjusted to be the second definition larger than or equal to the definition threshold, and then the second definition is displayed by adopting the data transfer two-dimensional code. Through discerning data transfer environment security to the definition show data transfer two-dimensional code of difference has reduced the risk of being discerned by other equipment, and then has improved the security of data transfer.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating another embodiment of a two-dimensional code display method according to the present application. Specifically, the method comprises the following steps:
s201, receiving a starting instruction aiming at a data transfer two-dimensional code, starting a data transfer page, and identifying a data transfer two-dimensional code area in the data transfer page;
the two-dimensional code is a pattern which is distributed on a plane (in a two-dimensional direction) according to a certain rule by using a certain specific geometric figure, is black and white and is alternated and records data symbol information; the concept of "0" and "1" bit stream forming the internal logic basis of computer is used ingeniously in coding, several geometric forms correspondent to binary system are used to represent literal numerical information, and can be automatically read by means of image input equipment or photoelectric scanning equipment so as to implement automatic information processing.
In the embodiment of the application, the two-dimensional code is applied to the field of data transfer, is a data transfer two-dimensional code, and is generally arranged in a data transfer application, a data transfer applet or a data transfer website.
One possible implementation manner is that, when a user opens a data transfer application and clicks a data transfer function therein, a data transfer page is opened, as shown in fig. 3, the data transfer page includes a plurality of display areas, for example, a is an option function area, B is a data transfer two-dimensional code display area, and C is a payment method selection area. Of course, after the B area is further clicked, only the data transfer two-dimensional code is displayed on the interface, as shown in fig. 4.
Furthermore, the screenshot of the page is captured, then the gray level processing is carried out, then the binarization processing is carried out on the image, and then the morphological opening operation is carried out on the y direction and the x direction. And then marking the connected area, finding three characteristic areas of the two-dimensional code for positioning, and finally determining the coverage area of the two-dimensional code through the positioning pattern. The opening operation refers to an operation of first corroding and then expanding. As shown in fig. 4, the area D is the coverage area of the identified data transfer two-dimensional code.
Optionally, the data transfer two-dimensional code displayed with the first definition is refreshed according to a preset period, and even if the two-dimensional code is fuzzy and difficult to recognize, the recognition of the two-dimensional code can be more effectively avoided through periodic refreshing. S202, carrying out fuzzy processing on the data transfer two-dimensional code area, and adjusting the current definition of the data transfer two-dimensional code to be a first definition, wherein the first definition is smaller than a definition threshold value;
the definition threshold is the lowest definition recognizable by the cash register terminal, and the first definition is any value smaller than the threshold and can be preset.
The identified two-dimensional code region is subjected to blurring processing, so that a blurred two-dimensional code can be obtained, as shown in fig. 5. Of course, if the display page further includes other regions, the blurring process may be performed on the other regions synchronously, and the display definition of the other regions may be maintained.
The image Gaussian blur technology can be adopted for blur processing, and the method comprises the following three steps: RenderScript, fastBlur, and optimization of RenderScript and fastBlur.
The render script is a high-performance operation intensive operation framework on Android, is mainly used for data parallel computation, and can rapidly process Gaussian image blur without frame loss particularly for image processing, photographic analysis and computer vision. The fastBlur is originally developed by Java, Gaussian fuzzy calculation is carried out on each pixel point, and finally the Bitmap is synthesized, so that a cubic package is not required to be introduced, the size of APK is not increased, and the problem of no compatible version is solved. RenderScript and fastBlur are optimized by first reducing bitmap to lose some pixel points, then fuzzifying, and then amplifying to the original size. Because the image is reduced and then is subjected to fuzzy processing, the pixel points and the radius which need to be processed are reduced, and the fuzzy processing speed is accelerated.
S203, displaying the data transfer two-dimensional code by adopting the first definition;
namely, the data transfer page containing the fuzzy two-dimensional code is directly shown.
S204, starting a camera to acquire a data transfer environment currently scanned by the camera;
it can be understood that, because the data transfer two-dimensional code is presented on the display interface, the stealing of the two-dimensional code is mostly located above the display interface, for example, if a nearby person aims at the data transfer two-dimensional code to take a picture, or directly scans the data transfer two-dimensional code through a mobile phone, the stealing occurs, and therefore, the camera is a front camera. Further, in order to cover a large scanning range, the camera is a rotatable camera.
After the camera is started, the video information around the camera is collected.
S205, identifying the data transfer environment, and determining whether the data transfer environment is safe;
and sequentially extracting features of each frame of image in the video information, and comparing the extracted features with the pre-stored unsafe features so as to find out whether matched features are consistent.
S206, when the safety of the data transfer environment is confirmed, adjusting the current definition of the data transfer two-dimensional code to a second definition, wherein the second definition is greater than or equal to the definition threshold;
when the matched and consistent features are not found, the safety of the current data transfer environment is confirmed, which indicates that the data transfer operation can be continuously completed, and in order for the cash register to successfully identify the data transfer two-dimensional code, the fuzzy two-dimensional code needs to be adjusted into a clear two-dimensional code. The second definition is any value greater than or equal to a definition threshold.
It should be noted that the adjustment of the definition of the two-dimensional code can be realized by using a commonly used algorithm for sharpening a blurred image, which is not specifically limited herein.
S207, when the current data transfer environment danger is confirmed, displaying environment danger prompt information;
and when the matched and consistent characteristics are found, confirming that the risk exists in the current data transfer environment, and displaying prompt information to inform a user of the existing risk behavior. The mode of displaying the prompt information can comprise outputting a prompt box containing prompt text, playing audio and video containing prompt contents, or flashing an indicator light and the like.
For example, as shown in fig. 6, after a camera of the terminal 1 is turned on, video information around the terminal is collected, if it is shot that the terminal 2 scans against the terminal 1, it is determined that the current data transfer environment is unsafe, a prompt box pops up on a display interface of the terminal 1, and as shown in fig. 7, the user is informed of "there is a risk in the current payment environment, is payment continued? ". The prompt box can be displayed in any area on the interface, and is preferably displayed by covering the two-dimensional code in order to protect the property safety of a user.
S208, receiving a denial instruction aiming at the environmental danger prompt message, and executing the step of adjusting the current definition of the data transfer two-dimensional code to a second definition;
it can be understood that when the user confirms to continue payment, the terminal receives a denial instruction for the environmental hazard prompt information, closes the prompt box, and adjusts the fuzzy two-dimensional code into the clear two-dimensional code.
S209, receiving a confirmation instruction aiming at the environmental danger prompt information, and closing the data transfer two-dimensional code;
when the user does not continue to pay, the terminal receives a confirmation instruction aiming at the environmental danger prompt information, then the prompt box is closed, and the fuzzy two-dimensional code is also closed, so that other terminal equipment can be completely prevented from identifying the related account information of the two-dimensional code.
S210, displaying the data transfer two-dimensional code by adopting the second definition;
after the user confirms that payment is continued or the current data transfer environment is recognized to be safe, the clear two-dimensional code is displayed on the recognized two-dimensional code area, as shown in fig. 4.
S211, receiving a data transfer instruction aiming at the data transfer two-dimensional code displayed by the second definition before refreshing, and transferring data;
s212, refreshing the data transfer two-dimensional code according to a preset period;
it can be understood that after the clear data transfer two-dimensional code is displayed, the risk of being shot or scanned by other users still exists, the two-dimensional code is refreshed according to a certain time interval, the two-dimensional code has a certain validity period, if the two-dimensional code is refreshed after one minute after the two-dimensional code is generated, the previous two-dimensional code is invalid, and therefore, the data transfer can only be completed by the currently displayed two-dimensional code.
S213, receiving a data transfer instruction aiming at the refreshed data transfer two-dimensional code displayed by the second definition, and transferring data;
the cashier terminal confirms after recognizing the two-dimensional code, and at the moment, the terminal needs a user to input a data transfer confirmation instruction so as to complete the final data transfer process.
And S214, after the data transfer is confirmed to be successful, closing the data transfer two-dimensional code.
After the data transfer is detected to be successful, in order to further reduce the risk of shooting or scanning by other equipment, the clear two-dimensional code is closed, and the camera is closed.
In the embodiment of the application, the data transfer environment is identified in safety, the data transfer two-dimensional codes are displayed in different definitions, risks identified by other equipment are reduced, and the safety of data transfer is improved. When the data transfer environment has risks, the user is prompted, corresponding operation is executed based on the requirements of the user, and user experience is improved. In addition, after the clear two-dimensional code is displayed, the two-dimensional code is periodically refreshed, so that the shot two-dimensional code is invalid, and the safety of data transfer is further improved.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Please refer to fig. 8, which illustrates a schematic structural diagram of a two-dimensional code display apparatus according to an exemplary embodiment of the present application. The two-dimensional code display device can be realized by software, hardware or a combination of the two into all or part of the device. The device 1 comprises a first two-dimensional code display module 10, a definition adjusting module 20 and a second two-dimensional code display module 30.
The first two-dimension code display module 10 is configured to receive a start instruction for a data transfer two-dimension code, and display the data transfer two-dimension code with a first definition, where the first definition is smaller than a definition threshold;
the definition adjusting module 20 is configured to adjust a current definition of the data transfer two-dimensional code to a second definition when it is determined that a current data transfer environment is safe, where the second definition is greater than or equal to the definition threshold;
and the second two-dimension code display module 30 is configured to display the data transfer two-dimension code with the second definition.
Optionally, as shown in fig. 9, the apparatus further includes:
the environment scanning module 40 is configured to start a camera and obtain a data transfer environment currently scanned by the camera;
and the environment identification module 50 is configured to identify the data transfer environment and determine whether the data transfer environment is safe.
Optionally, as shown in fig. 10, the first two-dimensional code display module 10 includes:
the area identification unit 101 is used for opening a data transfer page and identifying a data transfer two-dimensional code area in the data transfer page;
a definition adjusting unit 102, configured to perform fuzzy processing on the data transfer two-dimensional code region, and adjust a current definition of the data transfer two-dimensional code to a first definition;
and the two-dimension code display unit 103 is used for displaying the data transfer two-dimension code by adopting the first definition.
Optionally, as shown in fig. 9, the apparatus further includes:
a prompt information display module 60, configured to display environmental danger prompt information when the current data transfer environmental danger is confirmed;
a denial instruction receiving module 70, configured to receive a denial instruction for the environmental hazard prompt information, and trigger the definition adjusting module to adjust the current definition of the data transfer two-dimensional code to a second definition.
Optionally, as shown in fig. 9, the apparatus further includes:
and a confirmation instruction receiving module 80, configured to receive a confirmation instruction for the environmental hazard prompt information, and close the data transfer two-dimensional code.
Optionally, as shown in fig. 9, the apparatus further includes:
and the two-dimension code refreshing module 90 is used for refreshing the data transfer two-dimension code according to a preset period.
Optionally, as shown in fig. 9, the apparatus further includes:
the data transfer module 100 is configured to receive a data transfer instruction for the data transfer two-dimensional code displayed with the second definition before or after refreshing, and perform data transfer;
and a two-dimension code closing module 110, configured to close the data transfer two-dimension code after the data transfer is confirmed to be successful.
It should be noted that, when the two-dimensional code display apparatus provided in the foregoing embodiment executes the two-dimensional code display method, only the division of the functional modules is used for illustration, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the two-dimensional code display device provided by the above embodiment and the two-dimensional code display method embodiment belong to the same concept, and the detailed implementation process is shown in the method embodiment and is not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the embodiment of the application, the data transfer environment is identified in safety, the data transfer two-dimensional codes are displayed in different definitions, risks identified by other equipment are reduced, and the safety of data transfer is improved. When the data transfer environment has risks, the user is prompted, corresponding operation is executed based on the requirements of the user, and user experience is improved. In addition, after the clear two-dimensional code is displayed, the two-dimensional code is periodically refreshed, so that the shot two-dimensional code is invalid, and the safety of data transfer is further improved.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method for determining a pointing direction according to the embodiments shown in fig. 1 to 7, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 1 to 7, which is not described herein again.
The present application further provides a computer program product, where at least one instruction is stored in the computer program product, and the at least one instruction is loaded by the processor and executes the multi-frequency hot spot opening method according to the embodiment shown in fig. 1 to fig. 7, where a specific execution process may refer to specific descriptions of the embodiment shown in fig. 1 to fig. 7, and details are not described herein.
Please refer to fig. 11, which is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 11, the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, memory 1005, at least one communication bus 1002.
Wherein a communication bus 1002 is used to enable connective communication between these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
The processor 1001 may be implemented in the form of at least one of Digital Signal Processing (DSP), Field Programmable Gate Array (FPGA), Programmable logic Array (Programmable L organic Array, P L a), the processor 1001 may be implemented in the form of at least one of Digital Signal Processing (DSP), Digital Signal Processing (FPGA), Programmable logic Array (GPU), or a combination of one or more of a modem, wherein the CPU primarily handles operating systems, user interfaces, application programs, etc., the modem may be used to display content, render content, and render content for display, and the like, and the wireless Processing chip 1001 may be implemented in a separate communication device.
The Memory 1005 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable medium. The memory 1005 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 11, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a two-dimensional code presentation application program.
In the electronic device 1000 shown in fig. 11, the user interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; the processor 1001 may be configured to call the two-dimensional code presentation application stored in the memory 1005, and specifically perform the following operations:
receiving a starting instruction aiming at a data transfer two-dimensional code, and displaying the data transfer two-dimensional code by adopting a first definition, wherein the first definition is smaller than a definition threshold value;
when the safety of the current data transfer environment is confirmed, adjusting the current definition of the data transfer two-dimensional code to be a second definition, wherein the second definition is greater than or equal to the definition threshold;
and displaying the data transfer two-dimensional code by adopting the second definition.
In one embodiment, after the processor 1001 receives the open instruction for the data transfer two-dimensional code, the following operations are further performed:
starting a camera to obtain a data transfer environment currently scanned by the camera;
and identifying the data transfer environment, and determining whether the data transfer environment is safe.
In one embodiment, when the processor 1001 displays the data transfer two-dimensional code with the first definition, the following operations are specifically performed:
opening a data transfer page, and identifying a data transfer two-dimensional code area in the data transfer page;
carrying out fuzzy processing on the data transfer two-dimensional code area, and adjusting the current definition of the data transfer two-dimensional code to be a first definition;
and displaying the data transfer two-dimensional code by adopting the first definition.
In one embodiment, the processor 1001 further performs the steps of:
when the current data transfer environment danger is confirmed, displaying environmental danger prompt information;
and receiving a denial instruction aiming at the environmental danger prompt information, and executing the step of adjusting the current definition of the data transfer two-dimensional code to be the second definition.
In one embodiment, the processor 1001 further performs the steps of:
and receiving a confirmation instruction aiming at the environmental danger prompt information, and closing the data transfer two-dimensional code.
In one embodiment, after the displaying the data transfer two-dimensional code with the first definition is executed, or after the displaying the data transfer two-dimensional code with the second definition is executed, the processor 1001 further executes the following steps:
and refreshing the data transfer two-dimensional code according to a preset period.
In one embodiment, the processor 1001 further performs the steps of:
receiving a data transfer instruction aiming at the data transfer two-dimensional code displayed by the second definition before or after refreshing, and transferring data;
and after the data transfer is confirmed to be successful, closing the data transfer two-dimensional code.
In the embodiment of the application, the data transfer environment is identified in safety, the data transfer two-dimensional codes are displayed in different definitions, risks identified by other equipment are reduced, and the safety of data transfer is improved. When the data transfer environment has risks, the user is prompted, corresponding operation is executed based on the requirements of the user, and user experience is improved. In addition, after the clear two-dimensional code is displayed, the two-dimensional code is periodically refreshed, so that the shot two-dimensional code is invalid, and the safety of data transfer is further improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.
Claims (10)
1. A two-dimensional code display method is characterized by comprising the following steps:
receiving a starting instruction aiming at a data transfer two-dimensional code, and displaying the data transfer two-dimensional code by adopting a first definition, wherein the first definition is smaller than a definition threshold value;
when the safety of the current data transfer environment is confirmed, adjusting the current definition of the data transfer two-dimensional code to be a second definition, wherein the second definition is greater than or equal to the definition threshold;
and displaying the data transfer two-dimensional code by adopting the second definition.
2. The method of claim 1, wherein after receiving the open command for the data transfer two-dimensional code, the method further comprises:
starting a camera to obtain a data transfer environment currently scanned by the camera;
and identifying the data transfer environment, and determining whether the data transfer environment is safe.
3. The method of claim 1, wherein the presenting the data transfer two-dimensional code with a first definition comprises:
opening a data transfer page, and identifying a data transfer two-dimensional code area in the data transfer page;
carrying out fuzzy processing on the data transfer two-dimensional code area, and adjusting the current definition of the data transfer two-dimensional code to be a first definition;
and displaying the data transfer two-dimensional code by adopting the first definition.
4. The method of claim 1, further comprising:
when the current data transfer environment danger is confirmed, displaying environmental danger prompt information;
and receiving a denial instruction aiming at the environmental danger prompt information, and executing the step of adjusting the current definition of the data transfer two-dimensional code to be the second definition.
5. The method of claim 4, further comprising:
and receiving a confirmation instruction aiming at the environmental danger prompt information, and closing the data transfer two-dimensional code.
6. The method according to claim 1, wherein after the displaying the data transfer two-dimensional code with the first definition and/or after the displaying the data transfer two-dimensional code with the second definition, further comprising:
and refreshing the data transfer two-dimensional code according to a preset period.
7. The method of claim 6, further comprising:
receiving a data transfer instruction aiming at the data transfer two-dimensional code displayed by the second definition before or after refreshing, and transferring data;
and after the data transfer is confirmed to be successful, closing the data transfer two-dimensional code.
8. The two-dimensional code display device is characterized by comprising:
the first two-dimensional code display module is used for receiving an opening instruction aiming at the data transfer two-dimensional code and displaying the data transfer two-dimensional code by adopting a first definition, wherein the first definition is smaller than a definition threshold value;
the definition adjusting module is used for adjusting the current definition of the data transfer two-dimensional code to a second definition when the safety of the current data transfer environment is confirmed, wherein the second definition is greater than or equal to the definition threshold;
and the second two-dimension code display module is used for displaying the data transfer two-dimension code by adopting the second definition.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 7.
10. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010148499.6A CN111401882A (en) | 2020-03-05 | 2020-03-05 | Two-dimensional code display method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010148499.6A CN111401882A (en) | 2020-03-05 | 2020-03-05 | Two-dimensional code display method and device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111401882A true CN111401882A (en) | 2020-07-10 |
Family
ID=71430532
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010148499.6A Pending CN111401882A (en) | 2020-03-05 | 2020-03-05 | Two-dimensional code display method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111401882A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112488722A (en) * | 2020-12-10 | 2021-03-12 | 支付宝(杭州)信息技术有限公司 | Risk identification method, device and equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106056027A (en) * | 2016-05-25 | 2016-10-26 | 努比亚技术有限公司 | Terminal, system and method for achieving long-range two-dimensional code scanning |
CN108764261A (en) * | 2018-05-31 | 2018-11-06 | 努比亚技术有限公司 | A kind of image processing method, mobile terminal and storage medium |
CN109756621A (en) * | 2018-12-25 | 2019-05-14 | 维沃移动通信有限公司 | A kind of two-dimensional code display method and terminal device |
-
2020
- 2020-03-05 CN CN202010148499.6A patent/CN111401882A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106056027A (en) * | 2016-05-25 | 2016-10-26 | 努比亚技术有限公司 | Terminal, system and method for achieving long-range two-dimensional code scanning |
CN108764261A (en) * | 2018-05-31 | 2018-11-06 | 努比亚技术有限公司 | A kind of image processing method, mobile terminal and storage medium |
CN109756621A (en) * | 2018-12-25 | 2019-05-14 | 维沃移动通信有限公司 | A kind of two-dimensional code display method and terminal device |
Non-Patent Citations (1)
Title |
---|
王宏波;蒋淑玲;: "二维码技术在移动终端的安全应用研究" * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112488722A (en) * | 2020-12-10 | 2021-03-12 | 支付宝(杭州)信息技术有限公司 | Risk identification method, device and equipment |
CN112488722B (en) * | 2020-12-10 | 2023-04-21 | 支付宝(杭州)信息技术有限公司 | Risk identification method, device and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111339846B (en) | Image recognition method and device, electronic equipment and storage medium | |
CN109960957B (en) | Incomplete two-dimensional code and generation, repair and identification methods, devices and systems thereof | |
JP5318122B2 (en) | Method and apparatus for reading information contained in bar code | |
JP7460728B2 (en) | Method for handling large numbers of decodable indicia | |
CN107886026B (en) | graphic code processing method and device | |
CN109116129B (en) | Terminal detection method, detection device, system and storage medium | |
US11762996B2 (en) | Detection of fraudulent displayable code data during device capture | |
CN111507122A (en) | Graphic code identification method and device, storage medium and terminal | |
CN106815522A (en) | Mobile terminal software vacation interface identification method and device | |
CN110990795A (en) | Privacy information protection method and device based on countermeasure sample and electronic equipment | |
CN109213397B (en) | Data processing method and device and user side | |
CN108304840B (en) | Image data processing method and device | |
CN108090391B (en) | Two-dimensional code identification method and device | |
CN111401882A (en) | Two-dimensional code display method and device, storage medium and electronic equipment | |
EP3461138B1 (en) | Processing method and terminal | |
CN111932282B (en) | Anti-counterfeiting detection method and device | |
CN112749769A (en) | Graphic code detection method and device, computer equipment and storage medium | |
CN110689337A (en) | Intelligent prompting method and system based on QR Code two-dimensional Code | |
Ciazynski et al. | Detection of QR-codes in digital images based on histogram similarity | |
CN108270973B (en) | Photographing processing method, mobile terminal and computer readable storage medium | |
WO2019096201A1 (en) | Self-service method and device based on active tags and passive tags | |
Appiah et al. | Performance Evaluation of Corrupted QR Code Scanners | |
CN109214224B (en) | Risk identification method and device for information coding | |
CN111813304A (en) | Image display method and device | |
CN114548343A (en) | Graphic code display method, terminal and computer readable 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200710 |