CN111311244A - Passive code scanning method and device based on QR (quick response) code - Google Patents

Passive code scanning method and device based on QR (quick response) code Download PDF

Info

Publication number
CN111311244A
CN111311244A CN201811513290.4A CN201811513290A CN111311244A CN 111311244 A CN111311244 A CN 111311244A CN 201811513290 A CN201811513290 A CN 201811513290A CN 111311244 A CN111311244 A CN 111311244A
Authority
CN
China
Prior art keywords
payment
dimensional code
image
data
mobile payment
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.)
Withdrawn
Application number
CN201811513290.4A
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 CN201811513290.4A priority Critical patent/CN111311244A/en
Publication of CN111311244A publication Critical patent/CN111311244A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • G06Q20/3274Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being displayed on the M-device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Cash Registers Or Receiving Machines (AREA)

Abstract

The utility model provides a passive code scanning method based on QR codes, which comprises the steps of networking mobile payment equipment which is arranged in a plurality of scenes and supports the cooperative application of configuration sensors, an input device and a printing device, and connecting the mobile payment equipment, an electronic terminal and a server cluster; acquiring parameter data to generate a two-dimensional code image; when the payment event is triggered, code scanning payment and non-contact card swiping payment are supported, and each section of data decoding of the two-dimensional code image is completed, the reading operation is completed in a buckling and scanning mode. The method is used for decoding the two-dimensional code image by adopting a preset algorithm aiming at the two-dimensional code image, extracting the characteristics of the two-dimensional code image by a depth self-learning algorithm, and efficiently and accurately recognizing and paying the electronic terminals which are adapted to a system and are in a plurality of networking environments with large environmental parameter variation and supporting code scanning payment and non-contact card swiping payment. The utility model also provides a passive yard device of sweeping based on QR sign indicating number.

Description

Passive code scanning method and device based on QR (quick response) code
Technical Field
The disclosure relates to the technical field of mobile payment and the technical field of image recognition, in particular to a passive code scanning method and device based on a QR (quick response) code.
Background
In the prior art, the cash register modes applied to a plurality of scenes are pos machine card swiping modes, cash modes and the like. The electronic terminal is opened for the payer in a few scenes, static two-dimensional codes provided by a plurality of scenes are scanned (in the process of manufacturing and image acquisition of static payment images, impurities, interference and the like are inevitably mixed in the images, so that the problems of noise, blurring and uneven gray scale exist in the images), information of the two-dimensional codes is read, and payment operation is completed. The cash register mode enables the cash register mode to be single, and because a plurality of scenes are different due to different real environments, for example, in the prior art that numerous codes emerge, higher requirements are provided for the reading of the two-dimensional codes and even the accuracy and the rapidity of payment. The existing scheme does not have the accuracy, the rapidness and the usability of reading the two-dimensional code.
Disclosure of Invention
In order to solve technical problems in the prior art, the disclosed embodiment provides a passive code scanning method and device based on a QR code, wherein a mobile payment device which is arranged in a plurality of scenes and supports cooperative application of configuration sensors, an input device and a printing device is networked, and the mobile payment device, an electronic terminal and a server are connected in a cluster; acquiring parameter data to generate a two-dimensional code image; when the payment event is triggered, code scanning payment and non-contact card swiping payment are supported, and each section of data decoding of the two-dimensional code image is completed, the reading operation is completed in a buckling and scanning mode. The method is characterized in that a preset algorithm is adopted for a two-dimensional code image, the two-dimensional code image is subjected to feature extraction through a depth self-learning algorithm, and efficient and accurate reading and payment are performed on a plurality of electronic terminals which are adapted to a system and are in a network distribution environment where a plurality of scenes with large environmental parameter changes support code scanning payment and non-contact card swiping payment.
In a first aspect, an embodiment of the present disclosure provides a passive code scanning method based on a QR code, including the following steps: the method comprises the steps of networking mobile payment equipment which is arranged in a plurality of scenes and is provided with at least one sensor, and connecting the mobile payment equipment which is arranged in the plurality of scenes and supports the cooperative application of input equipment and a printing device, an electronic terminal for controlling the mobile payment equipment and a server cluster, wherein the mobile payment equipment which supports the cooperative application of the input equipment and the printing device is supportedThe payment equipment comprises at least one sensor, wherein the at least one sensor is used for acquiring and detecting a plurality of environment parameters of the mobile payment equipment which is arranged in a plurality of scenes and supports the cooperative application of the input equipment and the printing device; acquiring data of a plurality of parameters which are sent by the server cluster and are suitable for being recognized and read by the mobile payment equipment in real time, and generating a two-dimensional code image suitable for the mobile payment equipment according to the data of the plurality of parameters; determining a plurality of attribute data of the two-dimensional code image, defining the distance D between the center of a detection graph at the upper left corner and the center of a detection graph at the upper right corner of the two-dimensional code image according to the plurality of attribute data, and determining the width L of the detection graph at the upper left cornerwAnd determining the width of the upper right corner position detection graph as RwWherein, according to LwAnd RwCalculating the width dimension Y of each module of the QR code defined by a user, wherein the calculation formula is Y ═ Lw+Rw) -14, the plurality of attribute data comprising: the method comprises the steps that central coordinate data of a detection graph at three preset positions of a two-dimensional code image, upper left corner graph data of the two-dimensional code image, symbol rotation angle data of the two-dimensional code image and symbol azimuth data of the two-dimensional code image are set; determining a symbol code word according to an arrangement rule, rearranging a code word sequence according to blocks according to an error correction level and a multi-dimensional two-dimensional code version, and recovering an original data bit stream by configuring a data block sequence; dividing the data bit stream into corresponding segments, wherein the segment head of each segment is a mode indicator, the length of each segment is determined by a counting indicator, and each segment of data is decoded according to a mode rule; when a payment event is monitored to be triggered, whether an initial system of the mobile payment device supports a multi-form payment system or not is judged, wherein the multi-form payment system supports code scanning payment and non-contact card swiping payment, the multi-form payment system comprises a closed payment system and an open payment system, the closed payment system is used for presetting a single scene and a single payment position and combining a payment system formed by a virtual value storage card or a real value storage card, and the open payment system is used for presetting at least two scenes and at least two payment positions and combining the virtual value storage cardA payment system consisting of a value card or a real value card; and receiving the reading operation finished by the user in a buckling and scanning mode if the multi-form payment system is supported and the decoding of each section of data of the two-dimensional code image is finished.
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 QR code-based passive code scanning device, where the device includes: the system comprises a networking and connecting module, a server cluster and a plurality of sensors, wherein the networking and connecting module is used for networking mobile payment equipment which is arranged in a plurality of scenes and is provided with at least one sensor, and connecting the mobile payment equipment which is arranged in the plurality of scenes and supports the cooperative application of input equipment and a printing device, an electronic terminal for controlling the mobile payment equipment and the server cluster, wherein the mobile payment equipment which supports the cooperative application of the input equipment and the printing device comprises at least one sensor which is used for collecting and detecting a plurality of environment parameters of the mobile payment equipment which is arranged in the plurality of scenes and supports the cooperative application of the input equipment and the printing device; the acquisition and image generation module is used for acquiring data of a plurality of parameters which are sent by the server cluster and are suitable for being recognized and read by the mobile payment equipment in real time and generating a two-dimensional code image suitable for the mobile payment equipment according to the data of the plurality of parameters; a first decoding module, configured to determine multiple attribute data of the two-dimensional code image, define a distance D between a center of a top-left corner position detection pattern and a center of a top-right corner position detection pattern of the two-dimensional code image according to the multiple attribute data, and determine a width L of the top-left corner position detection patternwAnd determining the width of the upper right corner position detection graph as RwWhich isIn accordance with LwAnd RwCalculating the width dimension Y of each module of the QR code defined by a user, wherein the calculation formula is Y ═ Lw+Rw) -14, the plurality of attribute data comprising: the method comprises the steps that central coordinate data of a detection graph at three preset positions of a two-dimensional code image, upper left corner graph data of the two-dimensional code image, symbol rotation angle data of the two-dimensional code image and symbol azimuth data of the two-dimensional code image are set; the second decoding module is used for determining the symbol code words according to the arrangement rule, rearranging the code word sequence according to the error correction level and the multi-dimensional two-dimensional code version, and recovering the original data bit stream by configuring the data block sequence; a third decoding module, configured to divide the data bit stream into corresponding segments, where a segment header of each segment is a mode indicator, a length of each segment is determined by a count indicator, and each segment of data is decoded according to a mode rule; the system comprises a judging module, a payment processing module and a payment processing module, wherein the judging module is used for judging whether an initial system of the mobile payment device supports a multi-form payment system when a payment event is triggered, the multi-form payment system supports code scanning payment and non-contact card swiping payment, the multi-form payment system comprises a closed payment system and an open payment system, the closed payment system is combined with a payment system formed by a virtual value card or a real value card in a mode of presetting a single scene and a single payment position, and the open payment system is combined with a payment system formed by a virtual value card or a real value card in a mode of presetting at least two scenes and at least two payment positions; and the deduction and scanning reading module is used for receiving the reading operation finished by the user in a deduction and scanning mode if the multi-form payment system is supported and each section of data decoding of the two-dimensional code image is finished.
The invention provides a passive code scanning method and a passive code scanning device based on QR codes, which are used for networking mobile payment equipment which is arranged in a plurality of scenes and is provided with at least one sensor, and connecting the mobile payment equipment which is arranged in the plurality of scenes and supports the cooperative application of input equipment and a printing device, an electronic terminal for controlling the mobile payment equipment and a server cluster; obtaining multiple parameters which are sent by server cluster and are suitable for mobile payment equipment to read in real timeThe data of the number, and according to the data of a plurality of parameters, a two-dimensional code image suitable for the mobile payment equipment is generated; determining a plurality of attribute data of the two-dimensional code image, defining the distance D between the center of a detection graph at the upper left corner and the center of a detection graph at the upper right corner of the two-dimensional code image according to the plurality of attribute data, and determining the width L of the detection graph at the upper left cornerwAnd determining the width of the upper right corner position detection pattern as RwDetermining a symbol code word according to an arrangement rule, rearranging a code word sequence according to a block according to an error correction level and a multi-dimensional two-dimensional code version, and recovering an original data bit stream by configuring a data block sequence; dividing the data bit stream into corresponding segments, wherein the segment head of each segment is a mode indicator, the length of each segment is determined by a counting indicator, and each segment of data is decoded according to a mode rule; when a payment event is monitored to be triggered, whether an initial system of the mobile payment device supports a multi-form payment system or not is judged, wherein the multi-form payment system supports code scanning payment and non-contact card swiping payment, the multi-form payment system comprises a closed payment system and an open payment system, the closed payment system is used for presetting a single scene and a single payment position and combining a payment system formed by a virtual value storage card or a real value storage card, and the open payment system is used for presetting at least two scenes and at least two payment positions and combining a payment system formed by the virtual value storage card or the real value storage card; if the system supports a multi-form payment system and completes decoding of each section of data of the two-dimensional code image, the reading operation completed by a user in a buckling and scanning mode is started and received. The method comprises the steps of firstly, networking, carrying out decoding operation on a two-dimensional code image by adopting a preset algorithm, rapidly extracting characteristics of the two-dimensional code image through deep learning, intercepting the two-dimensional code image as a payment image after receiving payment information sent by a server, judging whether an initial system of the mobile payment device supports a multi-form payment system or not when a payment event is monitored to be triggered, and starting and receiving the reading operation finished by a user in a deduction and scanning mode if the initial system supports the multi-form payment system and finishes decoding each section of data of the two-dimensional code image. In addition, the liquid crystal display is completed through a common window of the liquid crystal window and the light guide plate windowThe payment shows, can also gather and detect through the sensor even and lay a plurality of environmental parameter at the mobile payment equipment of many scenes, has played the beneficial effect that the technique supported to accurate and swift completion two-dimensional code image recognition even subsequent payment. In addition, the operation of recognizing and reading the image can be efficiently, accurately and quickly realized aiming at the two-dimensional code image under the networking environment supporting the multi-form payment system based on a plurality of scene conditions, so that the subsequent payment operation can be quickly, efficiently and flexibly completed, and the system has safety 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 flowchart illustrating steps of a QR code-based passive code scanning method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart illustrating steps of a QR code-based passive code scanning method according to another embodiment of the present invention; and
fig. 3 is a schematic structural diagram of a QR code-based passive code scanning apparatus according to 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 order to make the objects, technical solutions and advantages of the present invention more clearly understood, the following describes in detail a specific implementation of the QR code based passive code scanning method and apparatus according to the present invention by using an embodiment and 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 the cash collecting mode applied to a plurality of scenes in most cases is a pos machine card swiping mode, a cash payment mode and the like. The electronic terminal is opened for the payer to receive the cash mode under the few scenes, and scan the most static two-dimensional code (static payment image inevitably mix with 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) that is provided, the information of the two-dimensional code is read, and the payment operation is completed. It should be noted that the cash register manner described above makes the cash register form single, and because the multiple scenes are different in real environment, for example, in the prior art where numerous codes emerge, higher requirements are provided for the reading of the two-dimensional code, and even the accuracy and the rapidity of payment. The existing scheme does not have the accuracy, the rapidness and the usability of reading the two-dimensional code. A passive code scanning method based on the QR code becomes a work with both academic value and practical significance.
As shown in fig. 1, which is a schematic flow chart of a QR code-based passive code scanning method in an embodiment, specifically including the following steps:
step 101, networking the mobile payment devices which are arranged in a plurality of scenes and are provided with at least one sensor, and connecting the mobile payment devices which are arranged in the plurality of scenes and support the cooperative application of the input devices and the printing devices, the electronic terminal for controlling the mobile payment devices and the server cluster. The mobile payment equipment supporting the cooperative application of the input equipment and the printing device comprises at least one sensor, and the at least one sensor is used for collecting and detecting a plurality of environment parameters of the mobile payment equipment supporting the cooperative application of the input equipment and the printing device and arranged in a plurality of scenes. When the collected and monitored plurality of environmental parameters of the mobile payment device are larger than the preset plurality of environmental parameters, the mobile payment device can complete reminding operation through the internal master controller. The reminding operation includes but is not limited to an acousto-optic reminding or an acoustic buzzer reminding.
It should be noted that the sensors in the QR code-based passive code scanning method proposed by the present disclosure include, but are not limited to, an optical sensor, a linear displacement sensor, an angular displacement sensor, and a temperature and humidity sensor. Therefore, the usability of the electronic terminal under the real-time operating system under the condition of recognizing, reading and paying of the mobile payment device with the multiple sensors is improved.
In addition, it should be noted that the mobile payment device may be a spine type mobile payment device configured with a common window of the liquid crystal window and the light guide plate window, and includes a code scanning lamp bowl. Specifically, the common window of the liquid crystal window and the light guide plate window specifically comprises a common window main body; a fixed window is arranged on the main body; the fixed window comprises a first characteristic window and a second characteristic window which are arranged in a crossed manner; at least one fixing device is arranged on each of the first characteristic window and the second characteristic window. The fixing device comprises a clamping hook and a clamping groove; the clamping hooks and the clamping grooves are respectively arranged on two opposite sides of the first characteristic window or the second characteristic window, and the liquid crystal window or the light guide plate window can be fixed through the clamping hooks after being clamped through the clamping grooves. In addition, the fixing device comprises hooks arranged in pairs, and each pair of hooks is respectively arranged on two opposite sides of the first characteristic window or the second characteristic window. The clamping hook comprises a fixed connecting part and a clamping part; the fixed connecting part is fixedly connected with the common window main body; the clamping portion is fixedly arranged on one side of the fixed connecting portion. One side that main part was kept away from to joint portion is provided with the slip-in inclined plane, can make things convenient for the entering of light guide plate window or liquid crystal window. The side face of the clamping part close to the common window, namely one side of the light panel window or the liquid crystal window main body is vertical to the fixed connecting part. The fixed connecting part is made of elastic material. On different hooks, the distances between the clamping parts and the common window main body are different. The first characteristic window and the second characteristic window are coaxially arranged. A third characteristic window is also included; the third characteristic window is respectively communicated with the first characteristic window and the second characteristic window in a cross way; at least one fixing device is arranged on the third characteristic window.
In addition, the input device is an input keyboard which is cooperated with a desktop computer, or an input keyboard of a PC all-in-one machine, or a digital function keyboard with a calculation function and an auxiliary payment operation function. Printing device is the printer, specifically includes: the paper feeding machine comprises a machine body, wherein a paper feeding inlet and a printing outlet are arranged, a thermal printing module is arranged in the machine body, at least one low-temperature cooling cavity is arranged between the paper feeding inlet and the thermal printing module, and a laminating module, a cold pressing module and a cutting module are sequentially connected between the thermal printing module and the printing outlet through a transmission mechanism. Specifically, the at least one low-temperature cooling cavity is used for reducing the surface temperature of the paper by using cold air; the thermal printing module is used for printing paper and transmitting the printed paper to the film covering module; the film laminating module is used for receiving the paper transmitted by the thermal printing module, laminating the paper and transmitting the paper subjected to film laminating to the cold pressing module; the cold pressing module is used for receiving the paper transmitted by the film covering module, carrying out cold pressing on the paper on the surface of the film covering module and transmitting the cold-pressed paper to the cutting module; the cutting module is used for receiving the paper conveyed by the cold pressing module, cutting the paper according to the specification, and conveying the cut paper to the printing outlet. In addition, a low-temperature cooling cavity is arranged between the thermal printing module and the film covering module. In addition, still be provided with interconnect's display module, controller on the organism, thermal-sensitive printing module, tectorial membrane module, the module of colding pressing, tailor the module and all be connected with the controller and give the controller with operating condition, and the controller gives display module with operating condition transmission.
In one embodiment, the connecting the mobile payment device supporting the cooperative application with the input device and the printing device, the electronic terminal controlling the mobile payment device, and the server cluster, which are arranged in a plurality of scenes, comprises: connecting at least one mobile payment device arranged in a plurality of scenes with a cloud server cluster through WIFI; and connecting at least one mobile payment device arranged in a plurality of scenes with an electronic terminal for controlling the mobile payment device through Bluetooth connection. In addition, at least one mobile payment device arranged in a plurality of scenes can be connected with the electronic terminal for controlling the mobile payment device through wired connection. Therefore, the diversity and the multi-selectivity of the networking layout are improved.
And step 102, acquiring data of a plurality of parameters which are sent by the server cluster and are suitable for payment of the mobile payment equipment in real time, and generating a two-dimensional code image suitable for the mobile payment equipment according to the data of the plurality of parameters.
In addition, it should be noted that the two-dimensional code image may be generated by combining the data of a plurality of parameters with the product code. Further, acquiring setting information required in the two-dimensional code; converting the acquired setting information into a binary file; carrying out information segmentation processing required by a structural link mode on the converted binary file to generate a plurality of different binary information with structural link characteristic characters, wherein the number of segments in the information segmentation processing required by the structural link mode on the converted binary file can be set by two-dimensional code numerical values in a range of 2-32 according to the size and application of set information; the binary file is disassembled into a plurality of corresponding parts within the range of 2-32, and corresponding start characters and end characters are respectively added before and after the binary file of each part which is disassembled; providing original binary coding information which is coded one by one for a coding part corresponding to each split part; a plurality of binary information which are different and have structural link characteristic characters are coded by two-dimensional codes which are encrypted or not one by one and are correspondingly sequenced, then information in commodity codes is obtained by combination, information conversion, encryption and sequencing are carried out according to the principle, and finally a plurality of two-dimensional code images which are sequenced according to a certain sequence are formed.
In one embodiment, the passive code scanning method based on a QR code proposed by the present disclosure further includes: selecting a plurality of two-dimensional code images as training sample sets, and judging the number of the training sample sets; if the number of the training sample sets is insufficient, amplifying the sample sets to a preset number range; creating a CNN network, and initializing each parameter value of the CNN and each parameter value of the SVM; creating a Gabor filter and applying to the sample image IiExtracting the dimensions of theta-0, pi/8, pi/4, 3 pi/8, pi/2, 5 pi/8, 3 pi/4 and 7 pi/8, f-0, f-1, f-2, f-3 and f-4 to generate 40 characteristic maps; using 9-9 grid to reduce the dimension of feature map with 70-70 size to 8-8, connecting the first positions of feature map to form a feature vector Xi1=[x11,x12,…x1,m](ii) a For the same sample image I according to the size of batch valueiSequencing and inputting the created CNN network, and calculating the output of each convolution layer and each pooling layer in the hidden layer; wherein, the output of the pooling layer is used as a CNN network extraction characteristic part Xi2=[x21,x22,…x2,n]。
Suppose that the strong features of all samples are X1=[x11,x12,…x1,M]The characteristic automatically extracted by the CNN network is X2=[x21,x22,…x2,N]And for the feature vector X1、X2Carrying out standardization processing and serial fusion to obtain a fusion characteristic W ═ W1,w2,…,wM+N)=(αX1,βX2). Using PCA method to reduce dimension of W and obtaining final fusion characteristic vector W*And will fuse the feature vectors W*Inputting the training data into the SVM to train to reach the preset range error or train to reach the preset maximum iterative training generation times. Therefore, good algorithm technical support is provided for automatically extracting the characteristics of the two-dimension code image to quickly recognize and read the two-dimension code subsequently.
Further, the passive code scanning method based on the QR code further includes: intercepting the generated two-dimensional code image suitable for the mobile payment equipment, and dividing the payment image after the two-dimensional code image is intercepted as the payment image; according to the Otsu algorithm, performing rough segmentation operation on the region of interest in the divided payment image, wherein the Otsu algorithm is to divide the original image into two images, namely a foreground image and a background image, by using a threshold value. 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).
Further, performing secondary segmentation on the roughly segmented payment image by using an active contour model of the gradient vector flow; and completing the segmentation operation suitable for the payment image by shape testing on the result obtained after the secondary segmentation operation.
Further, it should be noted that 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, selecting the split channel based on statistical rules of the payment image data of the training samples comprises: 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 of the segmentation operation suitable for the payment image by the shape test on the result obtained after the secondary segmentation operation includes: and completing the graph segmentation operation suitable for the payment image according to the result obtained after the secondary 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 performing of the segmentation operation applicable to the payment image by the shape test on the result obtained after the secondary 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 > gammaTAnd then, carrying out secondary rough segmentation operation on the region of interest by the segmentation method of the active contour model based on the gradient vector flow, and completing the segmentation operation suitable for the payment image by shape testing on the result obtained after the secondary rough segmentation operation.
103, determining a plurality of attribute data of the two-dimensional code image, and defining a detection graph center of the upper left corner position and a detection graph of the upper right corner position of the two-dimensional code image according to the plurality of attribute dataThe distance between the shape centers is D, and the width of the detection graph at the upper left corner is determined to be LwAnd determining the width of the upper right corner position detection pattern as RwWherein, according to LwAnd RwCalculating the width dimension Y of each module of the QR code defined by a user, wherein the calculation formula is Y ═ Lw+Rw) 14, the plurality of attribute data includes: the method comprises the steps of presetting central coordinate data of three position detection graphs of a two-dimensional code image, upper left corner graph data of the two-dimensional code image, symbol rotation angle data of the two-dimensional code image and symbol azimuth data of the two-dimensional code image.
And 104, determining the symbol code words according to the arrangement rule, rearranging the code word sequence according to the error correction level and the multi-dimensional two-dimensional code version, and recovering the original data bit stream by configuring the data block sequence.
Step 105, dividing the data bit stream into corresponding segments, wherein the segment header of each segment is a mode indicator, the length is determined by a counting indicator, and each segment of data is decoded according to a mode rule.
Specifically, the center coordinates of the three position detection patterns are determined, and it is determined which position detection pattern is the upper left corner pattern and the rotation angle of the symbol, thereby determining the orientation of the symbol, determining the distance D between the center of the upper left corner position detection pattern and the center of the upper right corner position detection pattern, and determining the widths L of the two detection patterns respectivelywAnd Rw(ii) a Then according to LwAnd RwThe width dimension Y of each module of the user-defined QR code is calculated. And preliminarily determining the version of the symbol, wherein the calculation formula is as follows:
V=(D/Y-10)/4。
further, if the preliminarily determined version number V is not greater than 6, the V obtained by the above calculation is the version number; if the calculated V is not less than 7, the version number needs to be determined again; determining information of a QR code correction graph, wherein the QR code starts to have the correction graph when the version number is 2, skips the execution operation if the version number of the multi-dimensional two-dimensional code is 1, respectively determines the central coordinates of all the correction graphs according to the version information, and determines a sampling network according to the central coordinates; sampling image pixels of each intersection point in the grid, determining whether the image pixels are light-color blocks or dark-color blocks, and constructing to obtain a bitmap, wherein the dark-color pixels are represented by binary 1, and the light-color pixels are represented by binary 0; decoding format information adjacent to the position detection graph of the upper left area of the multi-dimensional two-dimensional code to obtain a mask graph and an error correction grade for the symbol; similarly, if the error of the format information is found to exceed the error correction capacity, decoding the format information adjacent to the upper right and lower left position detection patterns by using the same program; performing XOR processing on the symbol encoding region with the mask pattern to recover symbol characters representing error correction and data codewords; it should be noted that the executing operation is just opposite to the effect of the mask processing process adopted by the multidimensional two-dimensional code encoding program; determining a symbol codeword according to an arrangement rule; rearranging the codeword sequence according to the blocks according to the error correction level and the multi-dimensional two-dimensional code version; correcting the refused read error and the substituted error according to an error correction decoding program and an error detection program until the error correction capacity specified by the error correction level and the symbol version is met; reconfiguring the sequence of data blocks to recover the original data bit stream; dividing the data bit stream into corresponding segments, wherein the segment header of each segment is a mode indicator, and the length is determined by a counting indicator; decoding each segment of data according to the pattern rule; if the special code exists, the operation is circulated again after the decoding of the general code is finished until the special code data is obtained; and finishing decoding by using the obtained special code data and the general code data.
And step 106, when the payment event is monitored to be triggered, judging whether the initial system of the mobile payment device supports a multi-form payment system. The multi-form payment system supports code scanning payment and non-contact card swiping payment, and comprises a closed payment system and an open payment system. The closed payment system is a payment system which is formed by presetting a single scene, a single payment position and combining a virtual value storage card or a real value storage card; the open payment system is a payment system which is formed by presetting at least two scenes and at least two payment positions and combining a virtual stored value card or a real stored value card.
Further, it is understood that a closed payment system, such as a savings system in a retail store, may be used by a consumer to save money for later use, based on a stored value card (virtual or physical) that can only be held back at one store, and a mobile application may be deployed to allow the consumer to hold back the stored value. When the system is used, the QR code or the bar code is displayed at a point of sale, a user can store the value of the card infinitely, only money which is wanted to be spent in a specific merchant is stored, the financial information and the bank account exposure of the user are avoided, and the system is also an effective mode for arranging budget for specific types of consumption for the user. Such as groceries or restaurants, merchants typically combine customer loyalty with a closed payment system, such as a closed payment card, to keep customers back streaming. In addition, open payment systems, such as a savings system in a retail store, a savings system in a restaurant or grocery store, where the consumer may have a deposit for later use, may be based on a stored value card (virtual or real) that can be held back at multiple stores, and a mobile application may be deployed to allow the consumer to hold back the stored value. When the method is used, the QR code or the bar code is displayed at a point of sale, a user can store the value of the card infinitely and only stores money which the user wants to spend in a specific merchant, so that the compatibility and the data sharing of the financial information and the bank account of the user in a plurality of payment scenes and payment positions are facilitated, and the method is an effective way for the user to arrange budget for specific types of consumption. Such as groceries or restaurants, merchants typically combine customer consumption replacement with an open payment system, such as an open payment card, to allow customers to consume back-streams.
And step 107, receiving the reading operation finished by the user in a deduction and scanning mode if the multi-form payment system is supported and each segment of data decoding of the two-dimensional code image is finished. In addition, it should be further noted that the passive code scanning method based on the QR code provided by the present disclosure further includes: and payment display is completed through a common window of the liquid crystal window and the light guide plate window. From this, the convenience and the ease of use of payment after through accurate and swift recognition two-dimensional code have been improved. Note that, the common window of the liquid crystal window and the light guide plate window is used to display a specific payment amount and a payment status (the payment status includes payment in progress, payment success or payment failure). In addition, it should be noted that, when the common window of the liquid crystal window and the light guide plate window is not used for payment display, the common window is used for playing the advertisement information pushed by the cloud server and the propaganda content of the scene where the common window is located. Therefore, the beneficial effects that the shared window of the liquid crystal window and the light guide plate window is multifunctional, flexible and efficient to operate and display payment are achieved.
Specifically, if a multi-form payment system is supported and each segment of data decoding of the two-dimensional code image is completed, the receiving of the reading operation completed by the user in a push-and-scan mode 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 deep 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 addition, it should be noted that the snap-scanning mode is that the user holds the electronic terminal by hand, and faces the display screen of the electronic terminal and the two-dimensional code scanning window of the mobile payment device. The technical field personnel can understand that the built-in binocular camera or at least one sensor of the mobile payment equipment can be effectively sensed in a buckling and sweeping mode, and technical support is provided for efficient payment.
In one embodiment, it should be noted that the passive code scanning method based on a QR code according to the present disclosure further includes: after the payment event is monitored to be triggered, when the electronic terminal is charged, deleting the payment image from the picture library, and setting a default picture in a built-in system of the electronic terminal as a prompt image; and when the current electric quantity of the electronic terminal is lower than a preset electric quantity threshold value, setting a default picture in a built-in system of the electronic terminal as a prompt image. The prompt image is a power-off low-power prompt image of the mobile payment device. In addition, the method further comprises the following steps: the method comprises the steps of obtaining the illumination intensity of a screen of the electronic terminal and the illumination intensity reflected by the screen of the electronic terminal in a preset time period, and constructing a screen illumination intensity database aiming at the electronic terminal and a screen reflection illumination intensity database aiming at the electronic terminal. Therefore, payment operation can be completed quickly and accurately by adapting corresponding illumination intensity of different mobile payment equipment models according to different scenes.
In order to more clearly and accurately understand and apply the QR code-based passive code scanning method according to the present disclosure, the following example is made in conjunction with fig. 2, and it should be noted that the scope of the present disclosure is not limited to the following example.
Specifically, the steps 201 to 208 are sequentially: receiving a plurality of images; dividing N × N subblocks into the image, performing rough segmentation operation through an Otsu algorithm, judging whether the region of interest accords with the basic form of the two-dimensional code, and if the region of interest accords with the basic form of the two-dimensional code, sending the image of the region of interest to a preset feature model to finish feature extraction of the payment image; if the region of interest does not accord with the basic form of the two-dimensional code, performing secondary segmentation operation on the active contour model based on the gradient vector flow, and then judging whether the region of interest accords with the basic form of the two-dimensional code, if so, sending the image of the region of interest to a preset feature model to finish feature extraction of the payment image; and if the region of interest does not conform to the basic form of the two-dimensional code, removing impurities in the payment image.
It is understood that the received payment image is divided; according to the Dajin algorithm, performing rough segmentation operation and secondary segmentation operation on the region of interest in the divided payment image; and completing the segmentation operation suitable for the payment image according to the result obtained after the secondary segmentation operation through shape testing. Specifically, for a payment image, the payment image is roughly segmented by adopting an Otsu algorithm and secondarily segmented by an active contour model of a gradient vector flow to obtain the payment image which is free of noise and convenient to read; the results of the above segmentation were then subjected to shape testing.
It should be noted that the test conditions are: and (6) area testing. Number N Of pixels in ROI (Region Of Interest)pI.e. whether the ROI area conforms to the range of the normal two-dimensional code area [ Nmin,Nmax]Within; and (5) testing the degree of deformity. Calculating the formula gamma as l/N by simple malformation degreepCalculating the malformation degree of the ROI region, wherein l is the perimeter of the ROI and is provided with a high malformation degree threshold value gammaTWhen gamma is less than or equal to gammaTThe test passed. Further, if the test condition passes, the ROI is a payment image and enters a feature extraction module; if the ROI region that does not pass the test condition, i.e., the pay image with noise or foreign matter, is possible, the segmentation method based on the active contour model of the gradient vector flow performs a secondary segmentation on the ROI region, and then performs a shape test on the secondary segmentation result, with the test condition being as described above. Wherein, as can be understood by those skilled in the art, the ROI is an impurity when the test is not passed, and is directly discarded; and the ROI passing the test is a payment image, and a preset feature extraction module is used for carrying out feature extraction on the payment image.
As will be understood by those skilled in the art, the classical active contour model often has certain disadvantages when selecting an initial contour curve, such as being far away from a target curve and unable to converge on the target curve, and also has a poor convergence effect on a concave edge. Aiming at the problems, the traditional active contour model is improved, and an active contour model based on gradient vector flow is provided. The active contour model based on gradient vector flow replaces a Gaussian potential energy field in a traditional model, and the mathematical theoretical basis of the active contour model is Helmholtz theorem in an electromagnetic field. Compared with a Gaussian potential energy field, the gradient vector diagram of the whole image is obtained based on the field of the gradient vector flow, so that the action range of the external force field is larger. This also means that even if the selected initial contour is far from the target contour, it will eventually converge to the target contour through successive approximation. Meanwhile, after the external force action range is enlarged, the external force action of the concave part at the target contour is enlarged, so that the boundary can be converged to the concave part.
The invention provides a passive code scanning method based on QR codes, which is characterized in that mobile payment equipment which is arranged in a plurality of scenes and is provided with at least one sensor is networked, and the mobile payment equipment which is arranged in the plurality of scenes and supports the cooperative application of input equipment and a printing device, an electronic terminal for controlling the mobile payment equipment and a server cluster are connected; the method comprises the steps of acquiring data of a plurality of parameters which are sent by a server cluster and are suitable for being recognized and read by the mobile payment equipment in real time, and generating a two-dimensional code image suitable for the mobile payment equipment according to the data of the plurality of parameters; determining a plurality of attribute data of the two-dimensional code image, defining the distance D between the center of a detection graph at the upper left corner and the center of a detection graph at the upper right corner of the two-dimensional code image according to the plurality of attribute data, and determining the width L of the detection graph at the upper left cornerwAnd determining the width of the upper right corner position detection pattern as RwDetermining a symbol code word according to an arrangement rule, rearranging a code word sequence according to a block according to an error correction level and a multi-dimensional two-dimensional code version, and recovering an original data bit stream by configuring a data block sequence; dividing the data bit stream into corresponding segments, wherein the segment head of each segment is a mode indicator, the length of each segment is determined by a counting indicator, and each segment of data is decoded according to a mode rule; when the payment event is triggered, whether an initial system of the mobile payment device supports a multi-form payment system or not is judged, and if the multi-form payment system is supported and each segment of data decoding of the two-dimensional code image is completed, the recognizing operation completed by a user in a buckling and scanning mode is started and received. The method includes the steps of firstly, networking is conducted, a preset algorithm is adopted to conduct decoding operation on a two-dimensional code image, rapid feature extraction on the two-dimensional code image can be achieved through deep learning, after payment information sent by a server is received, the two-dimensional code image is intercepted to serve as a payment image, when a payment event is monitored to be triggered, whether an initial system of the mobile payment device supports a multi-form payment system or not is judged, and if the multi-form payment system is supported and each section of data decoding of the two-dimensional code image is completed, reading operation completed by a user in a buckling and scanning mode is started and received. In addition, the method can be used for producing a composite materialThe payment display is completed through the liquid crystal window and the common window of the light guide plate window, even a plurality of environmental parameters of the mobile payment equipment arranged in multiple scenes can be collected and detected through the sensor, and the beneficial effect of technical support is achieved for accurately and quickly completing two-dimensional code image recognition and even subsequent payment. In addition, the operation of recognizing and reading the image can be efficiently, accurately and quickly realized aiming at the two-dimensional code image under the networking environment supporting the multi-form payment system based on a plurality of scene conditions, so that the subsequent payment operation can be quickly, efficiently and flexibly completed, and the system has safety and applicability.
Based on the same inventive concept, a passive code scanning device based on the QR code is also provided. Because the principle of the device for solving the problems is similar to that of the passive code scanning method based on the QR code, the implementation of the device can be realized according to the specific steps of the method, and repeated parts are not repeated.
Fig. 3 is a schematic structural diagram of a QR code-based passive code scanning apparatus in an embodiment. This passive yard device 10 of sweeping based on QR code includes: the system comprises a networking and connecting module 100, an acquisition and image generation module 200, a first decoding module 300, a second decoding module 400, a third decoding module 500, a judgment module 600 and a swipe reading module 700.
The networking and connecting module 100 is configured to network mobile payment devices, which are arranged in a plurality of scenes and are provided with at least one sensor, and connect the mobile payment devices, which are arranged in the plurality of scenes and support cooperative application of the input device and the printing device, the electronic terminal for controlling the mobile payment devices, and the server cluster, wherein the mobile payment devices, which support cooperative application of the input device and the printing device, comprise the at least one sensor, and the at least one sensor is configured to acquire and detect a plurality of environment parameters of the mobile payment devices, which are arranged in the plurality of scenes and support cooperative application of the input device and the printing device; the obtaining and image generating module 200 is configured to obtain data of a plurality of parameters, which are sent by the server cluster and are suitable for being recognized and read by the mobile payment device, in real time, and generate a two-dimensional code image suitable for the mobile payment device according to the data of the plurality of parameters(ii) a The first decoding module 300 is configured to determine a plurality of attribute data of the two-dimensional code image, define a distance D between a center of a top left corner position detection pattern and a center of a top right corner position detection pattern of the two-dimensional code image according to the plurality of attribute data, and determine a width L of the top left corner position detection patternwAnd determining the width of the upper right corner position detection pattern as RwWherein, according to LwAnd RwCalculating the width dimension Y of each module of the QR code defined by a user, wherein the calculation formula is Y ═ Lw+Rw) 14, the plurality of attribute data includes: the method comprises the steps that central coordinate data of a detection graph at three preset positions of a two-dimensional code image, upper left corner graph data of the two-dimensional code image, symbol rotation angle data of the two-dimensional code image and symbol azimuth data of the two-dimensional code image are set; the second decoding module 400 is configured to determine a symbol codeword according to an arrangement rule, rearrange codeword sequences according to blocks according to an error correction level and a multi-dimensional two-dimensional code version, and restore an original data bit stream by configuring a data block sequence; the third decoding module 500 is configured to divide the data bit stream into corresponding segments, where the segment header of each segment is a mode indicator, the length of each segment is determined by a count indicator, and each segment of data is decoded according to a mode rule; the judging module 600 is configured to judge whether an initial system of the mobile payment device supports a multi-form payment system when it is monitored that a payment event is triggered, where the multi-form payment system supports code scanning payment and contactless card swiping payment, the multi-form payment system includes a closed payment system and an open payment system, the closed payment system presets a single scene and a single payment position in advance, and combines a payment system composed of a virtual value storage card or a real value storage card, and the open payment system presets at least two scenes and at least two payment positions in advance, and combines a payment system composed of a virtual value storage card or a real value storage card; the swipe deduction and reading module 700 is configured to receive the reading operation completed by the user in the swipe deduction and scanning manner if the multi-form payment system is supported and each segment of data decoding of the two-dimensional code image is completed.
The invention provides a passive code scanning device based on QR (quick response) codes, which is characterized in that firstly, the movement of at least one sensor which is arranged in a plurality of scenes is matched through a networking and connecting moduleThe mobile payment equipment is networked, and the mobile payment equipment which is arranged in a plurality of scenes and supports the cooperative application of the input equipment and the printing device, the electronic terminal for controlling the mobile payment equipment and the server cluster are connected; the acquisition and image generation module acquires data of a plurality of parameters which are sent by the server cluster and are suitable for being recognized and read by the mobile payment equipment in real time, and generates a two-dimensional code image suitable for the mobile payment equipment according to the data of the plurality of parameters; determining a plurality of attribute data of the two-dimensional code image by the first decoding module, defining the distance between the center of the upper left corner position detection graph and the center of the upper right corner position detection graph of the two-dimensional code image as D according to the plurality of attribute data, and determining the width of the upper left corner position detection graph as LwAnd determining the width of the upper right corner position detection pattern as RwDetermining the symbol code words by the second decoding module according to the arrangement rule, rearranging the code word sequence according to the error correction level and the multi-dimensional two-dimensional code version, and recovering the original data bit stream by configuring the data block sequence; dividing the data bit stream into corresponding segments by a third decoding module, wherein the segment head of each segment is a mode indicator, the length of each segment is determined by a counting indicator, and each segment of data is decoded according to a mode rule; and when the payment event is monitored to be triggered through the judgment module, whether the initial system of the mobile payment device supports the multi-form payment system is judged, and finally, if the multi-form payment system is supported and each segment of data decoding of the two-dimensional code image is completed through the deduction and scanning recognition module, the recognition operation completed by a user in a deduction and scanning mode is started and received. The device firstly carries out networking, aiming at a two-dimensional code image, a preset algorithm is adopted to carry out decoding operation on the two-dimensional code image, rapid characteristic extraction can be carried out on the two-dimensional code image through depth learning, after payment information sent by a server is received, the two-dimensional code image is intercepted to be used as a payment image, when a payment event is monitored to be triggered, whether an initial system of the mobile payment device supports a multi-form payment system or not is judged, if the multi-form payment system is supported and a first distance measurement sampling point is monitored, the reading operation completed by a buckling and scanning mode of a user is started and received. In addition, the liquid crystal windowThe payment display can be completed through the shared window of the light guide plate window, even a plurality of environmental parameters of the mobile payment equipment arranged in multiple scenes can be collected and detected through the sensor, and the beneficial effect of technical support is achieved for accurately and quickly completing two-dimensional code image recognition and even subsequent payment. In addition, the operation of recognizing and reading the image can be efficiently, accurately and quickly realized aiming at the two-dimensional code image under the networking environment supporting the multi-form payment system based on a plurality of scene conditions, so that the subsequent payment operation can be quickly, efficiently and flexibly completed, and the system has safety 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 or fig. 2. The embodiment of the invention also provides a computer program product containing the instruction. When the computer program product is run on a computer, it causes the computer to perform the method of fig. 1 or fig. 2 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 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 description has been presented for purposes of illustration and description. 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 passive code scanning method based on QR codes is characterized by comprising the following steps:
the method comprises the steps that mobile payment equipment which is arranged in a plurality of scenes and is provided with at least one sensor is networked, the mobile payment equipment which is arranged in the plurality of scenes and supports the cooperative application of input equipment and a printing device, an electronic terminal for controlling the mobile payment equipment and a server cluster are connected, wherein the mobile payment equipment which supports the cooperative application of the input equipment and the printing device comprises the at least one sensor, and the at least one sensor is used for collecting and detecting a plurality of environment parameters of the mobile payment equipment which is arranged in the plurality of scenes and supports the cooperative application of the input equipment and the printing device;
acquiring data of a plurality of parameters which are sent by the server cluster and are suitable for being recognized and read by the mobile payment equipment in real time, and generating a two-dimensional code image suitable for the mobile payment equipment according to the data of the plurality of parameters;
determining a plurality of attribute data of the two-dimensional code image, defining the distance D between the center of a detection graph at the upper left corner and the center of a detection graph at the upper right corner of the two-dimensional code image according to the plurality of attribute data, and determining the width L of the detection graph at the upper left cornerwAnd determining the width of the upper right corner position detection graph as RwWherein, according to LwAnd RwCalculating the width dimension Y of each module of the QR code defined by a user, wherein the calculation formula is Y ═ Lw+Rw) -14, the plurality of attribute data comprising: the method comprises the steps that central coordinate data of a detection graph at three preset positions of a two-dimensional code image, upper left corner graph data of the two-dimensional code image, symbol rotation angle data of the two-dimensional code image and symbol azimuth data of the two-dimensional code image are set;
determining a symbol code word according to an arrangement rule, rearranging a code word sequence according to blocks according to an error correction level and a multi-dimensional two-dimensional code version, and recovering an original data bit stream by configuring a data block sequence;
dividing the data bit stream into corresponding segments, wherein the segment head of each segment is a mode indicator, the length of each segment is determined by a counting indicator, and each segment of data is decoded according to a mode rule;
when a payment event is monitored to be triggered, judging whether an initial system of the mobile payment device supports a multi-form payment system or not, wherein the multi-form payment system supports code scanning payment and non-contact card swiping payment, the multi-form payment system comprises a closed payment system and an open payment system, the closed payment system is combined with a payment system formed by a virtual value storage card or a real value storage card in a preset single scene and a preset single payment position, and the open payment system is combined with the payment system formed by the virtual value storage card or the real value storage card in a preset at least two scenes and at least two payment positions;
and receiving the reading operation finished by the user in a buckling and scanning mode if the multi-form payment system is supported and the decoding of each section of data of the two-dimensional code image is finished.
2. The QR code-based passive code scanning method according to claim 1, wherein the connection of the mobile payment device supporting the cooperative application of the input device and the printing device, the electronic terminal controlling the mobile payment device and the server cluster, which are arranged in a plurality of scenes, comprises: connecting at least one mobile payment device arranged in a plurality of scenes with a cloud server cluster through WIFI;
and connecting the at least one mobile payment device arranged in a plurality of scenes with the electronic terminal for controlling the mobile payment device through Bluetooth connection.
3. The QR code-based passive code scanning method according to claim 1, further comprising: acquiring capability values corresponding to a plurality of protocol stacks in the mobile payment equipment and a channel identifier currently bound with the protocol stack with the maximum value of the capability values;
selecting a corresponding channel according to the acquired channel identifier;
and completing the payment operation applicable to the mobile payment device through the selected channel.
4. The QR code-based passive code scanning method according to claim 1, further comprising: selecting a plurality of two-dimensional code images as a training sample set, and judging the number of the training sample set;
if the number of the training sample sets is insufficient, amplifying the sample sets to a preset number range;
creating a CNN network, and initializing each parameter value of the CNN and each parameter value of the SVM;
creating a Gabor filter and applying to the sample image IiExtracting the dimensions of theta-0, pi/8, pi/4, 3 pi/8, pi/2, 5 pi/8, 3 pi/4 and 7 pi/8, f-0, f-1, f-2, f-3 and f-4 to generate 40 characteristic maps;
using 9-9 grid to reduce the dimension of feature map with 70-70 size to 8-8, connecting the first positions of feature map to form a feature vector Xi1=[x11,x12,…x1,m];
For the same sample image I according to the size of batch valueiSequencing and inputting the created CNN network, and calculating the output of each convolution layer and each pooling layer in the hidden layer; wherein the output of the pooling layer is used as the CNN network extraction feature part Xi2=[x21,x22,…x2,n];
Suppose that the strong features of all samples are X1=[x11,x12,…x1,M]The characteristic automatically extracted by the CNN network is X2=[x21,x22,…x2,N]And for the feature vector X1、X2Carrying out standardization processing and serial fusion to obtain a fusion characteristic W ═ W1,w2,…,wM+N)=(αX1,βX2);
Using PCA method to reduce dimension of W and obtaining final fusion characteristic vector W*And fusing the feature vectors W*Inputting the training data into the SVM to train to reach the preset range error or train to reach the preset maximum iterative training generation times.
5. The QR code-based passive code scanning method according to claim 1, further comprising: the method comprises the steps of obtaining the illumination intensity of a screen of the electronic terminal and the illumination intensity reflected by the screen of the electronic terminal in a preset time period, and constructing a screen illumination intensity database aiming at the electronic terminal and a screen reflection illumination intensity database aiming at the electronic terminal.
6. The QR code-based passive code scanning method according to claim 1, further comprising: intercepting the generated two-dimensional code image suitable for the mobile payment equipment, and dividing the payment image after the two-dimensional code image is intercepted as the payment image;
according to the Dajin algorithm, performing rough segmentation operation on the region of interest in the divided payment image;
performing secondary segmentation on the roughly segmented payment image by using an active contour model of a gradient vector flow;
and completing the segmentation operation suitable for the payment image by shape testing on the result obtained after the secondary segmentation operation.
7. A QR code-based passive code scanning method according to claim 6, wherein the dividing of the payment image comprises: selecting a segmentation channel based on statistical rules of the payment image data of training samples;
selecting a segmentation threshold value in the 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.
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 passive code scanning device based on QR codes, which is characterized by comprising:
the system comprises a networking and connecting module, a server cluster and a control module, wherein the networking and connecting module is used for networking mobile payment equipment which is arranged in a plurality of scenes and is provided with at least one sensor, and connecting the mobile payment equipment which is arranged in the plurality of scenes and supports the cooperative application of input equipment and a printing device, an electronic terminal for controlling the mobile payment equipment and the server cluster, wherein the mobile payment equipment which supports the cooperative application of the input equipment and the printing device comprises at least one sensor which is used for collecting and detecting a plurality of environment parameters of the mobile payment equipment which is arranged in the plurality of scenes and supports the cooperative application of the input equipment and the printing device;
the acquisition and image generation module is used for acquiring data of a plurality of parameters which are sent by the server cluster and are suitable for being recognized and read by the mobile payment equipment in real time and generating a two-dimensional code image suitable for the mobile payment equipment according to the data of the plurality of parameters;
a first decoding module for determining multiple attribute data of the two-dimensional code image and defining the upper left of the two-dimensional code image according to the multiple attribute dataThe distance between the center of the angular position detection pattern and the center of the upper right corner position detection pattern is D, and the width of the upper left corner position detection pattern is determined to be LwAnd determining the width of the upper right corner position detection graph as RwWherein, according to LwAnd RwCalculating the width dimension Y of each module of the QR code defined by a user, wherein the calculation formula is Y ═ Lw+Rw) -14, the plurality of attribute data comprising: the method comprises the steps that central coordinate data of a detection graph at three preset positions of a two-dimensional code image, upper left corner graph data of the two-dimensional code image, symbol rotation angle data of the two-dimensional code image and symbol azimuth data of the two-dimensional code image are set;
the second decoding module is used for determining the symbol code words according to the arrangement rule, rearranging the code word sequence according to the error correction level and the multi-dimensional two-dimensional code version, and recovering the original data bit stream by configuring the data block sequence;
a third decoding module, configured to divide the data bit stream into corresponding segments, where a segment header of each segment is a mode indicator, a length of each segment is determined by a count indicator, and each segment of data is decoded according to a mode rule;
the system comprises a judging module, a payment processing module and a payment processing module, wherein the judging module is used for judging whether an initial system of the mobile payment device supports a multi-form payment system when a payment event is triggered, the multi-form payment system supports code scanning payment and non-contact card swiping payment, the multi-form payment system comprises a closed payment system and an open payment system, the closed payment system is combined with a payment system formed by a virtual value card or a real value card in a mode of presetting a single scene and a single payment position, and the open payment system is combined with a payment system formed by a virtual value card or a real value card in a mode of presetting at least two scenes and at least two payment positions;
and the deduction and scanning reading module is used for receiving the reading operation finished by the user in a deduction and scanning mode if the multi-form payment system is supported and each section of data decoding of the two-dimensional code image is finished.
CN201811513290.4A 2018-12-11 2018-12-11 Passive code scanning method and device based on QR (quick response) code Withdrawn CN111311244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811513290.4A CN111311244A (en) 2018-12-11 2018-12-11 Passive code scanning method and device based on QR (quick response) code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811513290.4A CN111311244A (en) 2018-12-11 2018-12-11 Passive code scanning method and device based on QR (quick response) code

Publications (1)

Publication Number Publication Date
CN111311244A true CN111311244A (en) 2020-06-19

Family

ID=71159652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811513290.4A Withdrawn CN111311244A (en) 2018-12-11 2018-12-11 Passive code scanning method and device based on QR (quick response) code

Country Status (1)

Country Link
CN (1) CN111311244A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114027351A (en) * 2021-10-29 2022-02-11 智锐达仪器科技南通有限公司 Marking system and decoding system for livestock carcasses
CN115130491A (en) * 2022-08-29 2022-09-30 荣耀终端有限公司 Automatic code scanning method and terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114027351A (en) * 2021-10-29 2022-02-11 智锐达仪器科技南通有限公司 Marking system and decoding system for livestock carcasses
CN115130491A (en) * 2022-08-29 2022-09-30 荣耀终端有限公司 Automatic code scanning method and terminal

Similar Documents

Publication Publication Date Title
CN111311244A (en) Passive code scanning method and device based on QR (quick response) code
CN111311233A (en) Passive code scanning method and device based on multi-trigger mode
CN111311226A (en) Machine vision-based two-dimensional code reading method and device under complex background
CN111311229A (en) Chinese-sensible code based passive code scanning method and device
CN111311241A (en) Two-dimensional code reading method and device based on scene perception
CN111311227A (en) Method and device suitable for in-screen type biological feature and two-dimensional code recognition
CN111310492A (en) In-screen two-dimensional code reading method and device suitable for adjustable light source
CN111325541A (en) Passive code scanning method and device based on maxicode
CN111311248A (en) Method and device for recognizing and reading two-dimensional code under low-power-consumption screen
CN111325042A (en) Maxicode-based waving code scanning method and device
CN111311225A (en) Optical module encryption-based in-screen payment method and device
CN111311247A (en) Chinese-sensible code based waving code scanning method and device
CN109816393B (en) Method and device for identifying and verifying biological characteristics under screen
CN111311246A (en) Multi-trigger mode-based code swiping method and device
CN111311222A (en) Waving code scanning method and device suitable for multiple communication modes
CN111310500A (en) Two-dimensional code reading method and device based on Windows system
CN111310497A (en) Two-dimensional code reading method and device based on Android system
CN111311231A (en) Two-dimensional code reading method and device used under real-time operating system
CN111310490A (en) Two-dimensional code reading method and device suitable for ARM processor architecture
CN111310498A (en) Two-dimensional code reading method and device based on Linux system
CN111311238A (en) Code buckling, scanning and scanning method and device suitable for multiple audio communication modes
CN111311243A (en) Code buckling, scanning and scanning method and device suitable for multiple video communication modes
CN111311237A (en) Face and bar code double-recognition method and device
CN111310763A (en) Method and device for dual recognition of identity card and bar code
CN111311245A (en) Code buckling, scanning and scanning method and device suitable for multiple communication modes

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

Application publication date: 20200619

WW01 Invention patent application withdrawn after publication