CN110874734A - Dynamic two-dimensional code generation method and device - Google Patents

Dynamic two-dimensional code generation method and device Download PDF

Info

Publication number
CN110874734A
CN110874734A CN201811015363.7A CN201811015363A CN110874734A CN 110874734 A CN110874734 A CN 110874734A CN 201811015363 A CN201811015363 A CN 201811015363A CN 110874734 A CN110874734 A CN 110874734A
Authority
CN
China
Prior art keywords
payment
image
terminal equipment
payment terminal
dimensional code
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
CN201811015363.7A
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.)
Beijing Inspiry Technology Co Ltd
Original Assignee
Beijing Inspiry Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Inspiry Technology Co Ltd filed Critical Beijing Inspiry Technology Co Ltd
Priority to CN201811015363.7A priority Critical patent/CN110874734A/en
Publication of CN110874734A publication Critical patent/CN110874734A/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/3276Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being read by the M-device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction

Abstract

The disclosure provides a dynamic two-dimensional code generation method, which is used for judging whether a mobile payment device is successfully connected with a cloud server; if the connection is successful, the mobile payment equipment provides a password input interface requested by the payment terminal equipment; the mobile payment equipment sends a payment terminal equipment connection request signal to the cloud server when receiving a payment terminal equipment request password; the mobile payment equipment establishes data connection with the payment terminal equipment when receiving a payment terminal equipment connection permission signal returned by the cloud server; in a preset time period, carrying out combined configuration on the received images through a preset algorithm; and when a payment event is monitored for the information after the combined configuration, performing payment operation. The method can effectively generate the dynamic two-dimensional code within a preset time period, provides convenience and operability for safe cash collection of merchants and automatic safe replacement of the two-dimensional code for payment collection, and has usability and applicability. The disclosure also provides a dynamic two-dimensional code generating device.

Description

Dynamic two-dimensional code generation method and device
Technical Field
The disclosure relates to the technical field of mobile payment and the technical field of image recognition, in particular to a dynamic two-dimensional code generation method and device.
Background
In the prior art, the cash register method is to open the electronic device for the payer, scan most of the static two-dimensional codes provided by the merchant (the static two-dimensional code image inevitably contains some impurities, interference and the like in the image in the process of manufacturing and image acquisition, so that the image has the problems of noise, blurring and uneven gray scale), recognize and read the information of the two-dimensional codes, and complete the payment operation. This operation makes to receive silver-colored security not, and does not have the high efficiency to the recognition of image, can not accomplish the integration promptly and correspond the cash registering function of paying by oneself, does not have the ease for use.
Disclosure of Invention
In order to solve technical problems in the prior art, the embodiment of the present disclosure provides a dynamic two-dimensional code generation method and apparatus, which determine whether a mobile payment device is successfully connected to a cloud server; if the connection is successful, the mobile payment equipment provides a password input interface requested by the payment terminal equipment, so that the merchant can input the password requested by the payment terminal equipment; the mobile payment equipment sends a payment terminal equipment connection request signal to the cloud server when receiving a payment terminal equipment request password; the mobile payment equipment establishes data connection with the payment terminal equipment when receiving a payment terminal equipment connection permission signal returned by the cloud server; in a preset time period, carrying out combined configuration on the received first step image, the received second step image and the received third step image through a preset algorithm; and when the payment event is monitored for the information after the combined configuration, performing payment operation. The method can effectively generate the dynamic two-dimensional code within a preset time period, and provides convenience and operability for safe cash collection of merchants and automatic safe replacement of the two-dimensional code for payment collection.
In a first aspect, an embodiment of the present disclosure provides a method for generating a dynamic two-dimensional code, including the following steps: judging whether the mobile payment device is successfully connected with the cloud server or not; if the connection is successful, the mobile payment equipment provides a password input interface requested by the payment terminal equipment, so that a merchant can input the password requested by the payment terminal equipment; the mobile payment equipment sends a payment terminal equipment connection request signal to the cloud server when receiving the payment terminal equipment request password, wherein the payment terminal equipment connection request signal at least comprises the payment terminal equipment request password; the mobile payment equipment establishes data connection with the payment terminal equipment when receiving a payment terminal equipment connection permission signal returned by the cloud server, wherein the cloud server returns the payment terminal equipment connection permission signal after successfully requesting password authentication for the payment terminal equipment; in a preset time period, carrying out combined configuration on the received first step image, the received second step image and the received third step image through a preset algorithm; and when the payment event is monitored for the information after the combined configuration, performing payment operation.
In one embodiment, the first ladder image, the second ladder image and the third ladder image form a payment image, wherein the first ladder image is used for specifying the position of the payment image, the second ladder image is used for distinguishing a two-dimensional code block from the background of the payment image, and the third ladder image is used for storing and receiving information sent by the cloud server.
In one embodiment, the method further comprises the following steps: when the mobile payment device is connected to the payment terminal device, the mobile payment device is started to initiate a connection request to the cloud server.
In one embodiment, the method further comprises the following steps: : the method comprises the steps of obtaining the illumination intensity of a screen of the mobile payment device and the illumination intensity reflected by the screen of the mobile payment device in a preset time period, and constructing a screen illumination intensity database aiming at the mobile payment device and a screen reflection illumination intensity database aiming at the mobile payment device.
In one embodiment, when a payment event is monitored for the information after the combination configuration, performing a payment operation includes: establishing a mapping relation between the characteristics of the cash register commodity and the price of the cash register commodity; according to the mapping relation, the commodity price in each commodity and the price of the commodity corresponding to the current payment image are obtained; and finishing the cash register operation on the price of the commodity corresponding to the current payment image.
In one embodiment, the method further comprises the following steps: intercepting the payment image after the combination configuration, and dividing the payment image; according to the Dajin algorithm, performing rough segmentation operation on the region of interest in the divided payment image; and completing the segmentation operation suitable for the payment image in the preset time period on the result obtained after the rough segmentation operation through shape testing.
In one embodiment, the performing, by shape testing, the segmentation operation on the result obtained after the rough segmentation operation and applied to the payment image within the preset time period includes: completing the graph segmentation operation applicable to the payment image in the preset time period by performing a malformation degree test on the result obtained after the rough segmentation operation, wherein the malformation degree test is performed by using a simple malformation degree calculation formula gamma-lNpCalculating the degree of deformity of the region of interest, wherein l is the perimeter of the region of interest, and N ispThe number of the pixel points in the region of interest is counted; presetting a high threshold value gamma T of the degree of deformity; when gamma is less than or equal to gammaTJudging that the result obtained after the rough segmentation operation passes the deformity degree test; when gamma > gammaTAnd then, carrying out secondary rough segmentation operation on the region of interest by the segmentation method based on the gradient vector flow-active contour model, and completing the segmentation operation suitable for the payment image by shape testing on the result obtained after the secondary rough segmentation operation.
In a second aspect, the disclosed embodiments provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the method described above.
In a third aspect, the disclosed embodiments provide a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method described above when executing the program.
In a fourth aspect, an embodiment of the present disclosure provides a dynamic two-dimensional code generating device, where the device includes: the judging module is used for judging whether the mobile payment device is successfully connected with the cloud server; the mobile payment equipment provides a password input interface for the payment terminal equipment if the connection is successful, so that a merchant can input the password requested by the payment terminal equipment; a sending module, configured to send, by the mobile payment device, a connection request signal of the payment terminal device to the cloud server when receiving the request password of the payment terminal device, where the connection request signal of the payment terminal device at least includes the request password of the payment terminal device; the data connection establishing module is used for establishing data connection with the payment terminal equipment when the mobile payment equipment receives a payment terminal equipment connection permission signal returned by the cloud server, wherein the cloud server returns the payment terminal equipment connection permission signal after successfully requesting password authentication for the payment terminal equipment; the configuration generation module is used for carrying out combined configuration on the received first step image, the received second step image and the received third step image through a preset algorithm in a preset time period; and the payment module is used for carrying out payment operation when the payment event is monitored for the information after the combined configuration.
The invention provides a dynamic two-dimensional code generation method and a dynamic two-dimensional code generation device, which are used for judging whether a mobile payment device is successfully connected with a cloud server or not; if the connection is successful, the mobile payment equipment provides a password input interface requested by the payment terminal equipment, so that the merchant can input the password requested by the payment terminal equipment; the mobile payment equipment sends a payment terminal equipment connection request signal to the cloud server when receiving a payment terminal equipment request password; the mobile payment equipment establishes data connection with the payment terminal equipment when receiving a payment terminal equipment connection permission signal returned by the cloud server; in a preset time period, carrying out combined configuration on the received first step image, the received second step image and the received third step image through a preset algorithm; and when the payment event is monitored for the information after the combined configuration, performing payment operation. The method can effectively generate the dynamic two-dimensional code within a preset time period, and provides convenience and operability for safe cash collection of merchants and automatic safe replacement of the two-dimensional code for payment collection. Furthermore, the operation of image recognition can be efficiently, accurately and quickly realized aiming at the two-dimensional code image, and the method has the advantages of easy use and applicability.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced as follows:
fig. 1 is a schematic flow chart illustrating steps of a dynamic two-dimensional code generation method according to an embodiment of the present invention; and
fig. 2 is a schematic structural diagram of a dynamic two-dimensional code generation apparatus in an embodiment of the present invention.
Detailed Description
The present application will now be described in further detail with reference to the accompanying drawings and examples.
In the following description, the terms "first" and "second" are used for descriptive purposes only and are not intended to indicate or imply relative importance. The following description provides embodiments of the disclosure, which may be combined or substituted for various embodiments, and this application is therefore intended to cover all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then this application should also be considered to include an embodiment that includes one or more of all other possible combinations of A, B, C, D, even though this embodiment may not be explicitly recited in text below.
In order to make the objects, technical solutions and advantages of the present invention more clearly understood, the following describes in detail specific embodiments of the dynamic two-dimensional code generating method and apparatus according to the present invention by way of examples, with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It can be understood that, in most cases, the cashier opens the electronic device for the payer, scans most of the static two-dimensional codes provided by the merchant (in the process of manufacturing and image acquisition of the static payment image, impurities, interference and the like are inevitably mixed in the image, so that the image has the problems of noise, blurring and uneven gray scale), reads the information of the two-dimensional codes, and completes the payment operation. This operation leaves the security of the cash register questionable. Meanwhile, the merchant is also not convenient to replace the payment two-dimensional code at any time according to the needs, and the payment two-dimensional code does not have strong experience of application.
As shown in fig. 1, a schematic flow chart of a dynamic two-dimensional code generation method in an embodiment specifically includes the following steps:
step 101, judging whether the mobile payment device is successfully connected with the cloud server.
In one embodiment, the method for generating a dynamic two-dimensional code according to the present disclosure further includes: when the mobile payment device is connected to the payment terminal device, the mobile payment device is started to initiate a connection request to the cloud server.
And step 102, if the connection is successful, the mobile payment equipment provides a payment terminal equipment request password input interface so that the merchant can input the payment terminal equipment request password.
103, when the mobile payment device receives a payment terminal device request password, sending a payment terminal device connection request signal to the cloud server, wherein the payment terminal device connection request signal at least comprises the payment terminal device request password;
and 104, when receiving a payment terminal device connection permission signal returned by the cloud server, the mobile payment device establishes data connection with the payment terminal device, wherein the cloud server returns the payment terminal device connection permission signal after successfully requesting password authentication for the payment terminal device.
And 105, in a preset time period, combining and configuring the received first step image, the received second step image and the received third step image through a preset algorithm. The payment image is composed of a first step image, a second step image and a third step image, wherein the first step image is used for specifying the position of the payment image, the second step image is used for distinguishing the two-dimensional code block from the background of the payment image, and the third step image is used for storing and receiving information sent by the cloud server.
And step 106, when the payment event is monitored for the combined and configured information, performing payment operation.
In an embodiment, it should be noted that, when a payment event is monitored for the information after the combined configuration, performing a payment operation includes: establishing a mapping relation between the characteristics of the cash register commodity and the price of the cash register commodity; according to the mapping relation, the commodity price in each commodity and the price of the commodity corresponding to the current payment image are obtained; and finishing the cash register operation according to the price of the commodity corresponding to the current payment image. And obtaining the commodity price of each commodity according to the mapping relation, accumulating the commodity prices, and obtaining the price of the commodity corresponding to the current payment image. It can be understood that the prices of the accumulated commodities are pre-stored, and the prices of the commodities can be quickly analyzed and obtained through neural network learning according to historical data of user shopping. It should be noted that, in order to increase the user experience, the data of the cash register operation and the completion status are displayed.
In one embodiment, the method for generating a dynamic two-dimensional code according to the present disclosure further includes: the method comprises the steps of obtaining the illumination intensity of a screen of the mobile payment device and the illumination intensity reflected by the screen of the mobile payment device in a preset time period, and constructing a screen illumination intensity database aiming at the mobile payment device and a screen reflection illumination intensity database aiming at the mobile payment device.
In addition, it should be noted that the dynamic two-dimensional code generation method according to the present disclosure further includes: intercepting the payment image after the combination configuration, and dividing the payment image; according to the Dajin algorithm, performing rough segmentation operation on the region of interest in the divided payment image; and completing the segmentation operation suitable for the payment image in the preset time period on the result obtained after the rough segmentation operation through shape testing.
The Otsu algorithm is to divide an original image into a foreground image and a background image by using a threshold. Specifically, the prospect is: points, mass moments and average gray levels of the foreground under the current threshold are represented by n1, csum and m 1; background: the number of points, the mass moment and the average gray level of the background under the current threshold are represented by n2, sum-csum and m 2. When the optimal threshold is taken, the difference between the background and the foreground is the largest, and the key is how to select a standard for measuring the difference, namely an Otsu algorithm, namely the maximum between-class variance, which is represented by sb, and the maximum between-class variance which is represented by fmax. Further, regarding the sensitivity of Otsu's algorithm to noise and target size, it only produces better segmentation effect on images with a single peak between classes variance. When the size ratio of the target to the background is very different, the inter-class variance criterion function may present double peaks or multiple peaks, which is not good, but the greater amount of algorithm is the least time-consuming. Further, the formula for the Otsu algorithm is derived as: recording t as a segmentation threshold of the foreground and the background, wherein the number of foreground points accounts for w0 of the image proportion, and the average gray level is u 0; the number of background points is w1 in the image scale, and the average gray scale is u 1. The total average gray scale of the image is: u-w 0 u0+ w1 u 1. The variance of the foreground and background images can be expressed by the following formula:
g (w 0 (u0-u) (u0-u) + w1 (u1-u) (u1-u) (w 0) w1 (u0-u1) (u0-u 1). It should be noted that the above formula is a variance formula. The formula for g can be referred to in probability theory, i.e. the expression for sb as described below. When the variance g is maximum, the difference between the foreground and the background at this time can be considered as maximum, and the gray level t at this time is the optimal threshold sb — w0 — w1 (u1-u0) (u0-u 1).
Specifically, the dividing the payment image includes: selecting a segmentation channel based on a statistical rule of payment image data of a training sample; selecting a segmentation threshold value in a segmentation channel, and performing foreground and background segmentation on the payment image; and carrying out communication area analysis according to the segmented foreground pixels and background pixels to obtain a qualified two-dimensional code area, wherein the payment image subblocks are divided in the qualified two-dimensional code area in a preset row and preset column dividing mode, and the preset row and the preset column are equivalent numerical values. Thereby providing the necessary data basis for subsequent rapid recognition of the payment image.
Further, it should be noted that, based on the statistical rules of the payment image data of the training sample, selecting the split channel includes: based on the statistical rules of the payment image data of the training samples, the distribution conditions of the image values in different color channels are obtained, and the color channel with the largest image value variance is obtained from the distribution conditions to form a segmentation channel. In addition, it should be further noted that selecting a segmentation threshold in a segmentation channel, and performing foreground and background segmentation on the payment image includes: obtaining a segmentation threshold value through a minimization algorithm in the Dajin algorithm; acquiring an image pixel value of a payment image; and performing dichotomy segmentation according to the image pixel value and the segmentation threshold value to obtain the foreground and the background. Further, it should be noted that, performing bisection segmentation according to the image pixel value and the segmentation threshold, and acquiring the foreground and the background includes: acquiring a region of which the image pixel value is higher than a segmentation threshold value as a foreground; and acquiring a region of which the image pixel value is lower than or equal to the segmentation threshold as a background.
Furthermore, performing connected region analysis according to the segmented foreground pixels and background pixels, and acquiring the two-dimensional code regions meeting the conditions includes: clustering the segmented foreground pixels and background pixels to form a communication area; and selecting the area with the largest size and meeting the prior position information in the communication area to form a two-dimensional code area meeting the conditions, and outputting the two-dimensional code area meeting the conditions. Further, it should be noted that the performing, by shape testing, the segmentation operation applicable to the payment image on the result obtained after the rough segmentation operation includes: and completing the graph segmentation operation suitable for the payment image according to the result obtained after the rough segmentation operation through an area test, wherein the area test is to judge whether the number of the pixel points in the region of interest meets a pixel point threshold interval of a preset normal two-dimensional code area. Furthermore, it should be noted that the completing, by the shape test, the segmentation operation applicable to the payment image on the result obtained after the rough segmentation operation includes: completing the graph segmentation operation suitable for the payment image by a simple malformation degree calculation formula gamma l/N on the result obtained after the rough segmentation operation through a malformation degree testpCalculating the degree of deformity of the region of interest, wherein l is the perimeter of the region of interest, and N ispThe number of pixel points in the region of interest is counted; presetting a high threshold gamma of degree of deformityT(ii) a When gamma is less than or equal to gammaTJudging that the result obtained after the rough segmentation operation passes the deformity degree test; when gamma > gammaTIn time, a segmentation method based on a gradient vector flow-active contour model carries out secondary rough on the region of interestAnd performing segmentation operation, and completing the segmentation operation suitable for the payment image through shape testing on the result obtained after the secondary rough segmentation operation.
The invention provides a dynamic two-dimensional code generation method, which is used for judging whether a mobile payment device is successfully connected with a cloud server or not; if the connection is successful, the mobile payment equipment provides a password input interface requested by the payment terminal equipment, so that the merchant can input the password requested by the payment terminal equipment; the mobile payment equipment sends a payment terminal equipment connection request signal to the cloud server when receiving a payment terminal equipment request password; the mobile payment equipment establishes data connection with the payment terminal equipment when receiving a payment terminal equipment connection permission signal returned by the cloud server; in a preset time period, carrying out combined configuration on the received first step image, the received second step image and the received third step image through a preset algorithm; and when the payment event is monitored for the information after the combined configuration, performing payment operation. The method can effectively generate the dynamic two-dimensional code within a preset time period, and provides convenience and operability for safe cash collection of merchants and automatic safe replacement of the two-dimensional code for payment collection. Furthermore, the operation of image recognition can be efficiently, accurately and quickly realized aiming at the two-dimensional code image, and the method has the advantages of easy use and applicability.
Based on the same inventive concept, a dynamic two-dimensional code generating device is also provided. Because the principle of solving the problems of the device is similar to that of the dynamic two-dimensional code generation method, the implementation of the device can be realized according to the specific steps of the method, and repeated parts are not repeated.
Fig. 2 is a schematic structural diagram of a dynamic two-dimensional code generating apparatus in an embodiment. The dynamic two-dimensional code generation device 10 includes: the system comprises a judging module 100, an input module 200, a sending module 300, a data connection establishing module 400, a configuration generating module 500 and a payment module 600.
The judging module 100 is configured to judge whether the mobile payment device is successfully connected to the cloud server; the input module 200 is configured to provide a payment terminal device request password input interface for the mobile payment device if the connection is successful, so that the merchant can input the payment terminal device request password; the sending module 300 is configured to send a payment terminal device connection request signal to the cloud server when the mobile payment device receives a payment terminal device request password, where the payment terminal device connection request signal at least includes the payment terminal device request password; the data connection establishing module 400 is configured to establish data connection with the payment terminal device when the mobile payment device receives a payment terminal device connection permission signal returned by the cloud server, where the cloud server returns the payment terminal device connection permission signal after successfully requesting password authentication for the payment terminal device; the configuration generation module 500 is configured to combine and configure the received first gradient image, second gradient image and third gradient image through a preset algorithm within a preset time period; the payment module 600 is configured to perform a payment operation when a payment event is monitored for the combined configured information.
The invention provides a dynamic two-dimensional code generation device, which comprises a judgment module, a storage module and a display module, wherein the judgment module is used for judging whether a mobile payment device is successfully connected with a cloud server; if the connection is successful through the input module, the mobile payment equipment provides a password input interface requested by the payment terminal equipment, so that a merchant can input a password requested by the payment terminal equipment; the method comprises the steps that when the mobile payment equipment receives a request password of the payment terminal equipment through a sending module, a connection request signal of the payment terminal equipment is sent to a cloud server; establishing data connection with the payment terminal equipment through the data connection establishing module when the mobile payment equipment receives a payment terminal equipment connection permission signal returned by the cloud server; the configuration generation module carries out combined configuration on the received first step image, the received second step image and the received third step image through a preset algorithm in a preset time period; and finally, when the payment module monitors the payment event for the combined and configured information, performing payment operation. The device can generate the dynamic two-dimensional code effectively in the preset time period, and convenience and operability are provided for safe cash collection of the merchant and automatic safe replacement of the two-dimensional code for collection. Furthermore, the operation of image recognition can be efficiently, accurately and quickly realized aiming at the two-dimensional code image, and the method has the advantages of easy use and applicability.
In the above, according to the dynamic two-dimensional code generation method and apparatus and the computer-readable storage medium of the embodiments of the present disclosure, whether the mobile payment device and the cloud server are successfully connected is determined; if the connection is successful, the mobile payment equipment provides a password input interface requested by the payment terminal equipment, so that the merchant can input the password requested by the payment terminal equipment; the mobile payment equipment sends a payment terminal equipment connection request signal to the cloud server when receiving a payment terminal equipment request password; the mobile payment equipment establishes data connection with the payment terminal equipment when receiving a payment terminal equipment connection permission signal returned by the cloud server; in a preset time period, carrying out combined configuration on the received first step image, the received second step image and the received third step image through a preset algorithm; and when the payment event is monitored for the information after the combined configuration, performing payment operation. The method can effectively generate the dynamic two-dimensional code within a preset time period, and provides convenience and operability for safe cash collection of merchants and automatic safe replacement of the two-dimensional code for payment collection. Furthermore, the operation of image recognition can be efficiently, accurately and quickly realized aiming at the two-dimensional code image, and the method has the advantages of easy use and applicability.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by the processor in fig. 1.
The embodiment of the invention also provides a computer program product containing the instruction. Which when run on a computer causes the computer to perform the method of fig. 1 described above.
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 (ROM), a Random Access Memory (RAM), or the like.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
Also, as used herein, the use of "or" in a list of items beginning with "at least one" indicates a separate list, e.g., "A, B or at least one of C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the described example is preferred or better than other examples.
It is also noted that in the systems and methods of the present disclosure, components or steps may be decomposed and/or re-combined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
Various changes, substitutions and alterations to the techniques described herein may be made without departing from the techniques of the teachings as defined by the appended claims. Moreover, the scope of the claims of the present disclosure is not limited to the particular aspects of the process, machine, manufacture, composition of matter, means, methods and acts described above. Processes, machines, manufacture, compositions of matter, means, methods, or acts, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein may be utilized. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or acts.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (10)

1. A dynamic two-dimensional code generation method is characterized by comprising the following steps:
judging whether the mobile payment device is successfully connected with the cloud server or not;
if the connection is successful, the mobile payment equipment provides a password input interface requested by the payment terminal equipment, so that a merchant can input the password requested by the payment terminal equipment;
the mobile payment equipment sends a payment terminal equipment connection request signal to the cloud server when receiving the payment terminal equipment request password, wherein the payment terminal equipment connection request signal at least comprises the payment terminal equipment request password;
the mobile payment equipment establishes data connection with the payment terminal equipment when receiving a payment terminal equipment connection permission signal returned by the cloud server, wherein the cloud server returns the payment terminal equipment connection permission signal after successfully requesting password authentication for the payment terminal equipment;
in a preset time period, carrying out combined configuration on the received first step image, the received second step image and the received third step image through a preset algorithm;
and when the payment event is monitored for the information after the combined configuration, performing payment operation.
2. The dynamic two-dimensional code generation method according to claim 1, wherein the first ladder image, the second ladder image, and the third ladder image constitute a payment image, wherein the first ladder image is used to specify a position of the payment image, the second ladder image is used to distinguish a two-dimensional code block from a background of the payment image, and the third ladder image is used to store information received from the cloud server.
3. The dynamic two-dimensional code generation method according to claim 1, further comprising: when the mobile payment device is connected to the payment terminal device, the mobile payment device is started to initiate a connection request to the cloud server.
4. The dynamic two-dimensional code generation method according to claim 1, further comprising: : the method comprises the steps of obtaining the illumination intensity of a screen of the mobile payment device and the illumination intensity reflected by the screen of the mobile payment device in a preset time period, and constructing a screen illumination intensity database aiming at the mobile payment device and a screen reflection illumination intensity database aiming at the mobile payment device.
5. The method for generating the dynamic two-dimensional code according to claim 1, wherein when a payment event is monitored for the information after the combination configuration, performing a payment operation includes: establishing a mapping relation between the characteristics of the cash register commodity and the price of the cash register commodity;
according to the mapping relation, the commodity price in each commodity and the price of the commodity corresponding to the current payment image are obtained;
and finishing the cash register operation on the price of the commodity corresponding to the current payment image.
6. The dynamic two-dimensional code generation method according to claim 1, further comprising: intercepting the payment image after the combination configuration, and dividing the payment image;
according to the Dajin algorithm, performing rough segmentation operation on the region of interest in the divided payment image;
and completing the segmentation operation suitable for the payment image in the preset time period on the result obtained after the rough segmentation operation through shape testing.
7. The dynamic two-dimensional code generation method according to claim 6, wherein the completing, by the shape test, the segmentation operation applicable to the payment image within the preset time period on the result obtained after the rough segmentation operation includes: completing the graph segmentation operation applicable to the payment image in a preset time period by testing the degree of deformity of the result obtained after the rough segmentation operation, wherein the graph segmentation operation is performed on the resultThe degree of deformity is measured by simple calculation formula of degree of deformity gamma ═ l/NpCalculating the degree of deformity of the region of interest, wherein l is the perimeter of the region of interest, and N ispThe number of the pixel points in the region of interest is counted; presetting a high threshold gamma of degree of deformityT
When gamma is less than or equal to gammaTJudging that the result obtained after the rough segmentation operation passes the deformity degree test;
when gamma > gammaTAnd then, carrying out secondary rough segmentation operation on the region of interest by the segmentation method based on the gradient vector flow-active contour model, and completing the segmentation operation suitable for the payment image by shape testing on the result obtained after the secondary rough segmentation operation.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1-7 are implemented when the program is executed by the processor.
10. A dynamic two-dimensional code generation device, characterized in that the device comprises:
the judging module is used for judging whether the mobile payment device is successfully connected with the cloud server;
the mobile payment equipment provides a password input interface for the payment terminal equipment if the connection is successful, so that a merchant can input the password requested by the payment terminal equipment;
a sending module, configured to send, by the mobile payment device, a connection request signal of the payment terminal device to the cloud server when receiving the request password of the payment terminal device, where the connection request signal of the payment terminal device at least includes the request password of the payment terminal device;
the data connection establishing module is used for establishing data connection with the payment terminal equipment when the mobile payment equipment receives a payment terminal equipment connection permission signal returned by the cloud server, wherein the cloud server returns the payment terminal equipment connection permission signal after successfully requesting password authentication for the payment terminal equipment;
the configuration generation module is used for carrying out combined configuration on the received first step image, the received second step image and the received third step image through a preset algorithm in a preset time period;
and the payment module is used for carrying out payment operation when the payment event is monitored for the information after the combined configuration.
CN201811015363.7A 2018-08-31 2018-08-31 Dynamic two-dimensional code generation method and device Pending CN110874734A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811015363.7A CN110874734A (en) 2018-08-31 2018-08-31 Dynamic two-dimensional code generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811015363.7A CN110874734A (en) 2018-08-31 2018-08-31 Dynamic two-dimensional code generation method and device

Publications (1)

Publication Number Publication Date
CN110874734A true CN110874734A (en) 2020-03-10

Family

ID=69715948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811015363.7A Pending CN110874734A (en) 2018-08-31 2018-08-31 Dynamic two-dimensional code generation method and device

Country Status (1)

Country Link
CN (1) CN110874734A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113495771A (en) * 2020-04-08 2021-10-12 北京意锐新创科技有限公司 Information display method and device suitable for payment equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072084A (en) * 2015-07-03 2015-11-18 上海与德通讯技术有限公司 Method for building data connection between mobile terminal and external equipment
CN205384683U (en) * 2016-01-20 2016-07-13 郑镇泉 Silver -colored all -in -one is received to charging electronics of weighing
CN106778996A (en) * 2016-11-28 2017-05-31 深圳大学 It is embedded with the generation system and method and reading system of the Quick Response Code of visual pattern
CN107527028A (en) * 2017-08-18 2017-12-29 深圳乐普智能医疗器械有限公司 Target cell recognition methods, device and terminal
CN108171509A (en) * 2018-03-12 2018-06-15 宁波大学 Realize that mobile terminal multi-screen upsets the safe payment method of display
CN108205856A (en) * 2017-11-29 2018-06-26 武汉有义方技术有限公司 A kind of self-help shopping system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072084A (en) * 2015-07-03 2015-11-18 上海与德通讯技术有限公司 Method for building data connection between mobile terminal and external equipment
CN205384683U (en) * 2016-01-20 2016-07-13 郑镇泉 Silver -colored all -in -one is received to charging electronics of weighing
CN106778996A (en) * 2016-11-28 2017-05-31 深圳大学 It is embedded with the generation system and method and reading system of the Quick Response Code of visual pattern
CN107527028A (en) * 2017-08-18 2017-12-29 深圳乐普智能医疗器械有限公司 Target cell recognition methods, device and terminal
CN108205856A (en) * 2017-11-29 2018-06-26 武汉有义方技术有限公司 A kind of self-help shopping system and method
CN108171509A (en) * 2018-03-12 2018-06-15 宁波大学 Realize that mobile terminal multi-screen upsets the safe payment method of display

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113495771A (en) * 2020-04-08 2021-10-12 北京意锐新创科技有限公司 Information display method and device suitable for payment equipment

Similar Documents

Publication Publication Date Title
CN110874732A (en) Scanned payment method and device based on mobile payment equipment
CN110874734A (en) Dynamic two-dimensional code generation method and device
CN110874733A (en) Passive code scanning payment method and device supporting external equipment
CN111311233A (en) Passive code scanning method and device based on multi-trigger mode
CN110874540A (en) Method and device for reading bar code at all angles
CN110910127A (en) Mobile payment device-based cash registering method and device applied to restaurant
CN111091368A (en) Closed type quick payment method and device
CN111091367A (en) Open type quick payment method and device
CN111091376A (en) Payment method and device integrating code scanning and non-contact card swiping
CN111091371A (en) Quick payment method and device
CN111091375A (en) Quick payment method and device based on commodity code recognition
CN111091363A (en) Quick payment method and device cooperatively applied with POS device
CN111091369A (en) Quick payment method and device applied in cooperation with input device
CN111091017A (en) Cash register optimization method and device of mobile payment device in high-frequency transaction state
CN111091668A (en) Zero-distance cash registering method and device based on two-dimensional code recognition device
CN111091366A (en) Deduction and scanning type payment method and device applied to long distance
CN110910128A (en) Mobile payment device-based cash registering method and device applied to schools
CN111091370A (en) Payment method and device supporting external equipment based on electromagnetic interference state
CN110910591A (en) Cash registering method and device based on mobile payment device and applied to scenic spot
CN110874898A (en) Cash registering method and device based on mobile payment equipment
CN111311241A (en) Two-dimensional code reading method and device based on scene perception
CN110910121A (en) Mobile payment equipment-based cash registering method and device applied to hospital
CN110910125A (en) Mobile payment device-based cash registering method and device applied to exhibition sign-in
CN111091374A (en) Quick payment method and device applied in cooperation with input device and printing device
CN111091372A (en) Quick payment method and device applied in cooperation with input device and printing device

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200310