A unified payment processing method and system for multi-terminal aggregation
By constructing brightness image and extracting feature maps of payment QR code images of different payment APPs, and embedding and fusion with singular value matrix correction technology, the problem of QR code payment incompatibility between different APPs is solved, and a unified payment processing of strong light suppression and multi-terminal aggregation is achieved, which improves the convenience and efficiency of the payment process.
Patent Information
- Application Number
- CN202410911091.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-07-09
AI Technical Summary
Existing QR code payments are incompatible with each other between different APPs. Users need to start different APPs based on the QR code credentials to make payments, resulting in inconvenient payment process.
By collecting payment QR code images from different payment APPs, brightness image construction, convolution and residual processing are performed, feature maps are extracted, and weighted weights are calculated based on the distribution information entropy of the strong light pixels, and the QR code images are weighted to achieve QR code image suppression in a strong light environment. At the same time, the payment prospect image is embedded and fused by the singular value matrix correction method, and the fused APP payment QR code image is generated, and the payment QR code image of different APPs is scanned and separated to realize the unified QR code payment processing of multi-terminal aggregation.
The strong light suppression processing of payment QR code images in different shooting scenes is realized, which improves the convenience and efficiency of the payment process. The payment QR code image recognition and payment operations between different APPs are realized through multi-terminal aggregation technology.
Smart Images

Figure CN118628106B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unified payment processing, and in particular to a unified payment processing method and system for multi-terminal aggregation. Background Art
[0002] With the rapid development of e-commerce and the popularization of mobile Internet, the diversification of payment methods has become an irreversible trend. Consumers not only shop online through computers, but also complete payment operations through various terminal devices such as smart phones and tablets. Payment methods have expanded from traditional credit card and debit card payments to various forms such as e-wallets, mobile payments, and QR code payments. In particular, the recent rise of QR code payments has greatly improved payment efficiency, but the current QR code payments are incompatible between different APPs. Users need to start different APPs to pay according to QR code credentials, which is very inconvenient for users. To address this problem, the present invention proposes a unified payment processing method with multi-terminal aggregation, which integrates different QR code payment channels to provide a unified and convenient payment experience. Summary of the invention
[0003] In view of this, the present invention provides a unified payment processing method for multi-terminal aggregation, the purpose of which is to: 1) collect payment QR code images of different payment APPs in different shooting scenes, and construct a brightness image based on the brightness information of each pixel in the payment QR code image, use convolution and residual processing to extract the difference of images of different scales as a feature map, use scale difference to identify the strong light pixel area, and calculate the weighted weight of the feature map that characterizes the information entropy of the strong light pixel distribution based on the distribution of the strong light pixels. The higher the weight, the more concentrated the distribution of the strong light pixels in the original image, and then weight the feature map and the payment QR code image, suppress the strong light pixels in the original payment QR code image, and realize the payment of the QR code image in a strong light environment. 1) The payment QR code image is subjected to strong light suppression processing; 2) The singular value matrix correction method is used to extract the principal component information from the payment foreground images of different payment APPs, and then the principal component information of all payment foreground images is embedded and fused to obtain the APP payment QR code that integrates the QR codes of multiple payment platforms. After the payment APP scans the fused APP payment QR code image, the singular value principal component extraction method is used to iteratively separate the APP payment QR code image to obtain multiple principal component information, which constitute the payment QR code images of different APPs. The payment APP recognizes the separated payment QR code images in turn. If the recognition is successful, the payment operation is performed to realize a unified QR code payment processing method for multi-terminal aggregation.
[0004] To achieve the above-mentioned purpose, the present invention provides a unified payment processing method for multi-terminal aggregation, comprising the following steps:
[0005] S1: collecting payment QR code images of different payment apps and performing preprocessing to obtain preprocessed payment QR code images, wherein improved light source tuning is an implementation method of the preprocessing;
[0006] S2: performing foreground separation on the preprocessed payment QR code image to obtain a payment foreground image;
[0007] S3: embedding and fusing the payment foreground images of different payment apps to obtain a fused APP payment QR code image, wherein the singular value matrix is corrected as an implementation method of embedding fusion;
[0008] S4: Use any payment APP to scan the merged APP payment QR code image, and separate the payment QR code images of different APPs from the APP payment QR code image. The payment APP recognizes the separated payment QR code images in turn, and performs the payment operation if the recognition is successful.
[0009] As a further improvement method of the present invention:
[0010] Optionally, collecting payment QR code images of different payment apps in step S1 includes:
[0011] Collect payment QR code images of different payment apps, where the collected payment QR code images are:
[0012] { I m |m∈[1,M]} ;
[0013] ;
[0014] ;
[0015] in:
[0016] Indicates the payment QR code image of the mth payment APP collected; Indicates the payment QR code image The pixel value of the pixel in the xth row and yth column, where X represents the number of pixel rows in the payment QR code image, and Y represents the number of pixel columns in the payment QR code image;
[0017] M represents the total number of payment apps;
[0018] Indicates the payment QR code image The color values of the pixels in the xth row and yth column in the RGB color channels respectively;
[0019] The payment QR code images of different payment APPs are preprocessed to obtain preprocessed payment QR code images.
[0020] Optionally, the preprocessing of payment QR code images of different payment apps includes:
[0021] The payment QR code images of different payment APPs are preprocessed, wherein the improved light source tuning is the implementation method of the preprocessing, and the payment QR code images The preprocessing process is:
[0022] S11: Calculate payment QR code image The brightness value of the pixel in the QR code image Convert to a brightness image:
[0023] ;
[0024] ;
[0025] in:
[0026] Indicates the payment QR code image The corresponding brightness image;
[0027] Indicates the payment QR code image The brightness value of the pixel at the xth row and yth column in;
[0028] Indicates obtaining the maximum value;
[0029] S12: Luminance image Perform convolution and residual processing to obtain the payment QR code image The corresponding feature map, where the brightness image The convolution and residual processing formula is:
[0030] ;
[0031] ;
[0032] in:
[0033] Indicates the payment QR code image The corresponding feature map;
[0034] Represents brightness image The residual information of
[0035] represents an exponential function with a natural constant as base;
[0036] express The pixel-sized convolution matrix;
[0037] express The pixel-sized convolution matrix;
[0038] Represents convolution calculation;
[0039] represents Gaussian error linear unit;
[0040] S13: Feature map Perform strong light area recognition to obtain an image with strong light recognition results:
[0041] ;
[0042] in:
[0043] represents an image with strong light recognition results, where , This means that the pixel in the xth row and yth column in the image is a bright pixel. This means that the pixel in the xth row and yth column in the image is not a bright pixel;
[0044] represents the bright light convolution matrix;
[0045] Indicates that the element value in the matrix is processed as 0 or 1. If the element value is greater than the preset threshold, the element value is assigned to 1, otherwise it is assigned to 0;
[0046] S14: Based on images with strong light recognition results , for the feature map Perform strong light interference removal processing to obtain the feature map after strong light interference removal :
[0047] ;
[0048] in:
[0049] represents an activation function; in the embodiment of the present invention, the selected activation function is a tanh function;
[0050] represents the L1 norm;
[0051] Represents the anti-interference convolution matrix;
[0052] S15: Calculate the weight of the feature map , for the payment QR code image Perform weighted processing on the feature graph to form a preprocessed payment QR code image:
[0053] ;
[0054] in:
[0055] Indicates the payment QR code image The preprocessing results.
[0056] Optionally, the feature map weighted weight is calculated in step S15 ,include:
[0057] S151: Image Perform morphological opening operation to filter out the image The isolated light spot area in the image is obtained ;
[0058] S152: Traverse to get the image All connected regions in form a set ;
[0059] S153: Calculate the information entropy of the connected area:
[0060] h m =- ∑ c∈ Ω num(c) X×Y log[ num(c) X×Y ] ;
[0061] in:
[0062] Representing images The information entropy of all connected regions in ;
[0063] , c represents a set Any connected region in ;
[0064] represents the number of pixels in the connected region c;
[0065] S154: Calculate the weight of the feature map :
[0066] ;
[0067] in:
[0068] represents the preset maximum information entropy, Indicates the preset minimum information entropy;
[0069] Representing a collection The standard deviation of the number of pixels in all connected regions;
[0070] Indicates getting the minimum value.
[0071] Optionally, performing foreground separation on the pre-processed payment two-dimensional code image in step S2 includes:
[0072] The foreground of the preprocessed payment QR code image is separated. The foreground separation process is:
[0073] S21: Payment QR code image Perform grayscale processing to obtain the payment QR code image The corresponding grayscale image ; Use the maximum inter-class variance method to analyze the payment QR code image The corresponding grayscale image Perform binarization to obtain the payment QR code image The corresponding binary image:
[0074] ;
[0075] in:
[0076] Indicates the payment QR code image The corresponding binary image;
[0077] Represents a binary image The pixel value of the pixel at row x and column y in , Represents a binary image The pixel in the xth row and yth column is a binary foreground pixel. Represents a binary image The pixel in the xth row and yth column is the binary background pixel;
[0078] S22: Calculate and obtain the payment QR code image The probability that any pixel in is a foreground pixel, where the payment QR code image The probability that the pixel in the xth row and yth column is a foreground pixel is:
[0079] p m (x,y)=[ I m '' (x,y) 255 + ε] ρ m (x,y) ρ m ;
[0080] ;
[0081] ;
[0082] in:
[0083] Indicates the payment QR code image The probability that the pixel in the xth row and yth column is a foreground pixel;
[0084] represents the adjustment coefficient, Set to 0.01;
[0085] Represents a binary image The binary foreground pixel density, Represents a binary image The binary foreground pixel density of the pixel in the xth row and yth column;
[0086] Represents a binary image The number of binarized foreground pixels in ;
[0087] Represents a binary image The pixel at row x and column y is the center The number of binary foreground pixels in the pixel region;
[0088] S23: If the payment QR code image If the probability that a pixel in the image is a foreground pixel is higher than a preset threshold, the pixel is marked as a foreground pixel;
[0089] S24: In the payment QR code image In the example, the grayscale value of the foreground pixel is set to 255, and the grayscale value of other pixels is set to 0 to form the payment QR code image. The corresponding payment prospect image:
[0090] ;
[0091] in:
[0092] Indicates the payment QR code image The corresponding payment prospect image;
[0093] Image showing payment prospects The grayscale value of the pixel at row x and column y in .
[0094] Optionally, in step S3, embedding and fusing payment foreground images of different payment apps includes:
[0095] The payment foreground images of different payment apps are embedded and fused, where the singular value matrix is corrected as the implementation method of embedding fusion. The embedding fusion process is:
[0096] S31: Calculate the low-frequency sub-band corresponding to the payment foreground image, where the payment foreground image of the mth payment APP The corresponding low-frequency subband is ;
[0097] S32: Perform singular value decomposition on the low-frequency subband to obtain the left and right singular vectors and singular value matrices corresponding to the low-frequency subband, where the low-frequency subband The singular value decomposition result of is:
[0098] ;
[0099] in:
[0100] Represents the low frequency subband The left singular vectors of Represents the low frequency subband The right singular vectors of ;
[0101] T stands for transpose;
[0102] Represents the low frequency subband The singular value matrix of ;
[0103] S33: Read the fused image of the current fused u payment foreground images , where the initial value of u is 0, Indicates a grayscale image with all pixel grayscale values initialized to 0;
[0104] S34: Fusion image Perform singular value decomposition to obtain the fused image The left singular vectors of , the right singular vector And the singular value matrix ;
[0105] S35: Extract fused image The principal component :
[0106] ;
[0107] S36: Fusing the image The principal component The singular value matrix of the payment foreground image corresponding to the u+1th payment APP is embedded The fused image is obtained The singular value matrix of :
[0108] ;
[0109] in:
[0110] represents the embedding strength;
[0111] S37: Constructing a fused image :
[0112] ;
[0113] S38: Let u=u+1, and return to step S33 until the APP payment QR code image that integrates M payment foreground images is obtained. .
[0114] Optionally, the step S31 of calculating the low-frequency sub-band corresponding to the payment foreground image includes:
[0115] Payment prospect image The calculation process of the corresponding low-frequency sub-band is:
[0116] S311: Foreground image Divide into four pixels to get the foreground image The division result is:
[0117] ;
[0118] ;
[0119] in:
[0120] Represented by the foreground image A unit composed of four pixels;
[0121] S312: Calculate the mean of each unit to form a low-frequency sub-band :
[0122] ;
[0123] ;
[0124] in:
[0125] Indicates the unit The mean of .
[0126] Optionally, in step S4, any payment APP is used to scan the merged APP payment QR code image, and payment QR code images of different APPs are separated from the APP payment QR code image, including:
[0127] Use any payment APP to scan the integrated APP payment QR code image , and pay the QR code image from the APP The payment QR code images of different APPs are separated, among which the APP payment QR code image The separation process is:
[0128] S41: Initialize APP payment QR code image The number of separations is r, the initial value of r is 0, and the maximum value is M. Then the APP payment QR code image separated from r payment QR code images is ,in ;
[0129] S42: Calculate APP payment QR code image The corresponding low frequency subband ;
[0130] S43: For low frequency sub-band Perform singular value decomposition to obtain the low-frequency subband The left singular vectors of , right singular vectors And the singular value matrix ;
[0131] S44: Constructing the separated rth payment QR code image:
[0132] ;
[0133] in:
[0134] Indicates the APP payment QR code image The separated r+1th payment QR code image; in the embodiment of the present invention, represents the initial right singular vector;
[0135] The calculation results in r+1 payment QR code images separated from the APP payment QR code image:
[0136] ;
[0137] ;
[0138] in:
[0139] represents the enhancement coefficient;
[0140] S45: Order , return to step S42 until M payment QR code images are separated;
[0141] The payment APP recognizes the separated payment QR code images in turn, and performs the payment operation if the recognition is successful.
[0142] In order to solve the above problems, the present invention provides a unified payment processing system for multi-terminal aggregation, characterized in that the system comprises:
[0143] An image preprocessing module is used to collect payment QR code images of different payment apps and perform preprocessing to obtain preprocessed payment QR code images;
[0144] The QR code separation and fusion module is used to separate the foreground of the pre-processed payment QR code image, embed and fuse the payment foreground images of different payment apps, and obtain the fused APP payment QR code image;
[0145] The unified payment device is used to use any payment APP to scan the merged APP payment QR code image, and separate the payment QR code images of different APPs from the APP payment QR code image. The payment APP recognizes the separated payment QR code images in turn, and performs the payment operation if the recognition is successful.
[0146] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0147] A memory storing at least one instruction;
[0148] Communication interface, enabling electronic equipment to communicate; and
[0149] The processor executes the instructions stored in the memory to implement the above-mentioned unified payment processing method for multi-terminal aggregation.
[0150] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned unified payment processing method for multi-terminal aggregation.
[0151] Compared with the prior art, the present invention proposes a unified payment processing method for multi-terminal aggregation, which has the following advantages:
[0152] First, this scheme proposes a strong light suppression method to pre-process the payment QR code images of different payment apps. The preprocessing process is: calculate the payment QR code image The brightness value of the pixel in the QR code image Convert to a brightness image:
[0153] ;
[0154] ;
[0155] in: Indicates the payment QR code image The corresponding brightness image; Indicates the payment QR code image The brightness value of the pixel at the xth row and yth column in; Indicates obtaining the maximum value; for brightness image Perform convolution and residual processing to obtain the payment QR code image The corresponding feature map, where the brightness image The convolution and residual processing formula is:
[0156]
[0157] ;
[0158] in: Indicates the payment QR code image The corresponding feature map; Represents brightness image The residual information of represents an exponential function with a natural constant as base; express The pixel-sized convolution matrix; express The pixel-sized convolution matrix; Represents convolution calculation; Represents Gaussian error linear unit; for feature map Perform strong light area recognition to obtain an image with strong light recognition results:
[0159] ;
[0160] in: represents an image with strong light recognition results, where , This means that the pixel in the xth row and yth column in the image is a bright pixel. This means that the pixel in the xth row and yth column in the image is not a bright pixel; represents the bright light convolution matrix; Indicates that the element value in the matrix is taken as 0 or 1. If the element value is greater than the preset threshold, the element value is assigned to 1, otherwise it is assigned to 0; based on the image with strong light recognition results , for the feature map Perform strong light interference removal processing to obtain the feature map after strong light interference removal :
[0161] ;
[0162] in: represents the activation function; represents the L1 norm; Represents the anti-interference convolution matrix; calculate the weighted weight of the feature map , for the payment QR code image Perform weighted processing on the feature graph to form a preprocessed payment QR code image:
[0163] ;
[0164] in: Indicates the payment QR code image Preprocessing results. This solution collects payment QR code images of different payment apps in different shooting scenes, and constructs a brightness image based on the brightness information of each pixel in the payment QR code image. Convolution and residual processing are used to extract the difference between images of different scales as feature maps. The scale difference is used to identify the strong light pixel area. The weighted weight of the feature map that characterizes the information entropy of the strong light pixel distribution is calculated based on the distribution of the strong light pixels. The higher the weight, the more concentrated the distribution of the strong light pixels in the original image. Then, the feature map is weighted with the payment QR code image to suppress the strong light pixels in the original payment QR code image, and the strong light suppression processing of the payment QR code image shot in a strong light environment is realized.
[0165] At the same time, this scheme proposes a unified payment method for multi-terminal QR code aggregation, which embeds and fuses the payment foreground images of different payment apps. The embedding and fusion process is as follows: calculate the low-frequency sub-band corresponding to the payment foreground image, where the payment foreground image of the mth payment app The corresponding low-frequency subband is ; Perform singular value decomposition on the low-frequency subband to obtain the left and right singular vectors and singular value matrices corresponding to the low-frequency subband, where the low-frequency subband The singular value decomposition result of is:
[0166] ;
[0167] in:
[0168] Represents the low frequency subband The left singular vectors of Represents the low frequency subband The right singular vector of ; T represents transpose; Represents the low frequency subband Singular value matrix of the current fusion image of u payment foreground images , where the initial value of u is 0, Indicates the grayscale image with the pixel grayscale value of 0 generated by initialization; for the fused image Perform singular value decomposition to obtain the fused image The left singular vectors of , the right singular vector And the singular value matrix ; Extract fused image The principal component :
[0169] ;
[0170] The fused image The principal component The singular value matrix of the payment foreground image corresponding to the u+1th payment APP is embedded The fused image is obtained The singular value matrix of :
[0171] ;
[0172] in: Represents the embedding strength; constitutes the fused image :
[0173] ;
[0174] Let u=u+1, until the APP payment QR code image that integrates M payment foreground images is obtained This scheme uses the singular value matrix correction method to extract the principal component information from the payment foreground images of different payment apps, and then embeds and fuses the principal component information of all payment foreground images to obtain the APP payment QR code that integrates the QR codes of multiple payment platforms. After the payment APP scans the fused APP payment QR code image, it uses the singular value principal component extraction method to iteratively separate multiple principal component information from the APP payment QR code image to form the payment QR code images of different APPs. The payment APP recognizes the separated payment QR code images in turn. If the recognition is successful, the payment operation is performed to realize a unified QR code payment processing method for multi-end aggregation. BRIEF DESCRIPTION OF THE DRAWINGS
[0175] Figure 1 A schematic diagram of a process flow of a unified payment processing method for multi-terminal aggregation provided by an embodiment of the present invention;
[0176] Figure 2 A functional module diagram of a unified payment processing system for multi-terminal aggregation provided by an embodiment of the present invention;
[0177] Figure 2 In: 100 a unified payment processing system for multi-terminal aggregation, 101 an image preprocessing module, 102 a two-dimensional code separation and fusion module, 103 a unified payment device;
[0178] Figure 3 A schematic diagram of the structure of an electronic device for implementing a unified payment processing method for multi-terminal aggregation provided by an embodiment of the present invention.
[0179] Figure 3 In: 1 electronic device, 10 processor, 11 memory, 12 program, 13 communication interface;
[0180] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0181] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0182] The embodiment of the present application provides a unified payment processing method for multi-terminal aggregation. The execution subject of the unified payment processing method for multi-terminal aggregation includes but is not limited to at least one of the electronic devices such as the server and the terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the unified payment processing method for multi-terminal aggregation can be executed by software or hardware installed on the terminal device or the server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0183] Embodiment 1:
[0184] S1: Collect payment QR code images of different payment apps and perform preprocessing to obtain preprocessed payment QR code images.
[0185] The step S1 includes collecting payment QR code images of different payment apps, including:
[0186] Collect payment QR code images of different payment apps, where the collected payment QR code images are:
[0187] { I m |m∈[1,M]} ;
[0188] ;
[0189] ;
[0190] in:
[0191] Indicates the payment QR code image of the mth payment APP collected; Indicates the payment QR code image The pixel value of the pixel in the xth row and yth column, where X represents the number of pixel rows in the payment QR code image, and Y represents the number of pixel columns in the payment QR code image;
[0192] M represents the total number of payment apps;
[0193] Indicates the payment QR code image The color values of the pixels in the xth row and yth column in the RGB color channels respectively;
[0194] The payment QR code images of different payment APPs are preprocessed to obtain preprocessed payment QR code images.
[0195] The preprocessing of payment QR code images of different payment apps includes:
[0196] The payment QR code images of different payment APPs are preprocessed, wherein the improved light source tuning is the implementation method of the preprocessing, and the payment QR code images The preprocessing process is:
[0197] S11: Calculate payment QR code image The brightness value of the pixel in the QR code image Convert to a brightness image:
[0198] ;
[0199] ;
[0200] in:
[0201] Indicates the payment QR code image The corresponding brightness image;
[0202] Indicates the payment QR code image The brightness value of the pixel at the xth row and yth column in;
[0203] Indicates obtaining the maximum value;
[0204] S12: Luminance image Perform convolution and residual processing to obtain the payment QR code image The corresponding feature map, where the brightness image The convolution and residual processing formula is:
[0205] ;
[0206] ;
[0207] in:
[0208] Indicates the payment QR code image The corresponding feature map;
[0209] Represents brightness image The residual information of
[0210] represents an exponential function with a natural constant as base;
[0211] express The pixel-sized convolution matrix;
[0212] express The pixel-sized convolution matrix;
[0213] Represents convolution calculation;
[0214] represents Gaussian error linear unit;
[0215] S13: Feature map Perform strong light area recognition to obtain an image with strong light recognition results:
[0216] ;
[0217] in:
[0218] represents an image with strong light recognition results, where , This means that the pixel in the xth row and yth column in the image is a bright pixel. This means that the pixel in the xth row and yth column in the image is not a bright pixel;
[0219] represents the bright light convolution matrix;
[0220] Indicates that the element value in the matrix is processed as 0 or 1. If the element value is greater than the preset threshold, the element value is assigned to 1, otherwise it is assigned to 0;
[0221] S14: Based on images with strong light recognition results , for the feature map Perform strong light interference removal processing to obtain the feature map after strong light interference removal :
[0222] ;
[0223] in:
[0224] represents an activation function; in the embodiment of the present invention, the selected activation function is a tanh function;
[0225] represents the L1 norm;
[0226] Represents the anti-interference convolution matrix;
[0227] S15: Calculate the weight of the feature map , for the payment QR code image Perform weighted processing on the feature graph to form a preprocessed payment QR code image:
[0228] ;
[0229] in:
[0230] Indicates the payment QR code image The preprocessing results.
[0231] The feature map weighted weight is calculated in step S15 ,include:
[0232] S151: Image Perform morphological opening operation to filter out the image The isolated light spot area in the image is obtained ;
[0233] S152: Traverse to get the image All connected regions in form a set ;
[0234] S153: Calculate the information entropy of the connected area:
[0235] h m =- ∑ c∈ Ω num(c) X×Y log[ num(c) X×Y ] ;
[0236] in:
[0237] Representing images The information entropy of all connected regions in ;
[0238] , c represents a set Any connected region in ;
[0239] represents the number of pixels in the connected region c;
[0240] S154: Calculate the weight of the feature map :
[0241] ;
[0242] in:
[0243] represents the preset maximum information entropy, Indicates the preset minimum information entropy;
[0244] Representing a collection The standard deviation of the number of pixels in all connected regions;
[0245] Indicates getting the minimum value.
[0246] S2: performing foreground separation on the preprocessed payment QR code image to obtain a payment foreground image.
[0247] In the step S2, foreground separation is performed on the pre-processed payment two-dimensional code image, including:
[0248] The foreground of the preprocessed payment QR code image is separated. The foreground separation process is:
[0249] S21: Payment QR code image Perform grayscale processing to obtain the payment QR code image The corresponding grayscale image ; Use the maximum inter-class variance method to analyze the payment QR code image The corresponding grayscale image Perform binarization to obtain the payment QR code image The corresponding binary image:
[0250] ;
[0251] in:
[0252] Indicates the payment QR code image The corresponding binary image;
[0253] Represents a binary image The pixel value of the pixel at row x and column y in , Represents a binary image The pixel in the xth row and yth column is a binary foreground pixel. Represents a binary image The pixel in the xth row and yth column is the binary background pixel;
[0254] S22: Calculate and obtain the payment QR code image The probability that any pixel in is a foreground pixel, where the payment QR code image The probability that the pixel in the xth row and yth column is a foreground pixel is:
[0255] p m (x,y)=[ I m '' (x,y) 255 + ε] ρ m (x,y) ρ m ;
[0256] ;
[0257] ;
[0258] in:
[0259] Indicates the payment QR code image The probability that the pixel in the xth row and yth column is a foreground pixel;
[0260] represents the adjustment coefficient, Set to 0.01;
[0261] Represents a binary image The binary foreground pixel density, Represents a binary image The binary foreground pixel density of the pixel in the xth row and yth column;
[0262] Represents a binary image The number of binarized foreground pixels in ;
[0263] Represents a binary image The pixel at row x and column y is the center The number of binary foreground pixels in the pixel region;
[0264] S23: If the payment QR code image If the probability that a pixel in the image is a foreground pixel is higher than a preset threshold, the pixel is marked as a foreground pixel;
[0265] S24: In the payment QR code image In the example, the grayscale value of the foreground pixel is set to 255, and the grayscale value of other pixels is set to 0 to form the payment QR code image. The corresponding payment prospect image:
[0266] ;
[0267] in:
[0268] Indicates the payment QR code image The corresponding payment prospect image;
[0269] Image showing payment prospects The grayscale value of the pixel at row x and column y in .
[0270] S3: embed and fuse the payment foreground images of different payment apps to obtain a fused APP payment QR code image.
[0271] In the step S3, the payment foreground images of different payment apps are embedded and fused, including:
[0272] The payment foreground images of different payment apps are embedded and fused, and the embedding and fusion process is as follows:
[0273] S31: Calculate the low-frequency sub-band corresponding to the payment foreground image, where the payment foreground image of the mth payment APP The corresponding low-frequency subband is ;
[0274] S32: Perform singular value decomposition on the low-frequency subband to obtain the left and right singular vectors and singular value matrices corresponding to the low-frequency subband, where the low-frequency subband The singular value decomposition result of is:
[0275] ;
[0276] in:
[0277] Represents the low frequency subband The left singular vectors of Represents the low frequency subband The right singular vectors of ;
[0278] T stands for transpose;
[0279] Represents the low frequency subband The singular value matrix of ;
[0280] S33: Read the fused image of the current fused u payment foreground images , where the initial value of u is 0, Indicates a grayscale image with all pixel grayscale values initialized to 0;
[0281] S34: Fusion image Perform singular value decomposition to obtain the fused image The left singular vectors of , the right singular vector And the singular value matrix ;
[0282] S35: Extract fused image The principal component :
[0283] ;
[0284] S36: Fusing the image The principal component The singular value matrix of the payment foreground image corresponding to the u+1th payment APP is embedded The fused image is obtained The singular value matrix of :
[0285] ;
[0286] in:
[0287] represents the embedding strength;
[0288] S37: Constructing a fused image :
[0289] ;
[0290] S38: Let u=u+1, and return to step S33 until the APP payment QR code image that integrates M payment foreground images is obtained. .
[0291] The step S31 of calculating the low-frequency sub-band corresponding to the payment foreground image includes:
[0292] Payment prospect image The calculation process of the corresponding low-frequency sub-band is:
[0293] S311: Foreground image Divide into four pixels to get the foreground image The division result is:
[0294] ;
[0295] ;
[0296] in:
[0297] Represented by the foreground image A unit composed of four pixels;
[0298] S312: Calculate the mean of each unit to form a low-frequency sub-band :
[0299] ;
[0300] ;
[0301] in:
[0302] Indicates the unit The mean of .
[0303] S4: Use any payment APP to scan the merged APP payment QR code image, and separate the payment QR code images of different APPs from the APP payment QR code image. The payment APP recognizes the separated payment QR code images in turn, and performs the payment operation if the recognition is successful.
[0304] In the step S4, any payment APP is used to scan the merged APP payment QR code image, and payment QR code images of different APPs are separated from the APP payment QR code image, including:
[0305] Use any payment APP to scan the integrated APP payment QR code image , and pay the QR code image from the APP The payment QR code images of different APPs are separated, among which the APP payment QR code image The separation process is:
[0306] S41: Initialize APP payment QR code image The number of separations is r, the initial value of r is 0, and the maximum value is M. Then the APP payment QR code image separated from r payment QR code images is ,in ;
[0307] S42: Calculate APP payment QR code image The corresponding low frequency subband ;
[0308] S43: For low frequency sub-band Perform singular value decomposition to obtain the low-frequency subband The left singular vectors of , right singular vectors And the singular value matrix ;
[0309] S44: Constructing the separated rth payment QR code image:
[0310] ;
[0311] in:
[0312] Indicates the APP payment QR code image The separated r+1th payment QR code image; in the embodiment of the present invention, represents the initial right singular vector;
[0313] The calculation results in r+1 payment QR code images separated from the APP payment QR code image:
[0314] ;
[0315] ;
[0316] in:
[0317] represents the enhancement coefficient;
[0318] S45: Order , return to step S42 until M payment QR code images are separated;
[0319] The payment APP recognizes the separated payment QR code images in turn, and performs the payment operation if the recognition is successful.
[0320] Embodiment 2:
[0321] like Figure 2 As shown, it is a functional module diagram of a unified payment processing system for multi-terminal aggregation provided by an embodiment of the present invention, which can implement the unified payment processing method for multi-terminal aggregation in Example 1.
[0322] The multi-terminal unified payment processing system 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the multi-terminal unified payment processing system can include an image preprocessing module 101, a two-dimensional code separation and fusion module 102, and a unified payment device 103. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0323] The image preprocessing module 101 is used to collect payment QR code images of different payment apps and perform preprocessing to obtain preprocessed payment QR code images;
[0324] The QR code separation and fusion module 102 is used to separate the foreground of the pre-processed payment QR code image, embed and fuse the payment foreground images of different payment apps, and obtain a fused APP payment QR code image;
[0325] The unified payment device 103 is used to use any payment APP to scan the merged APP payment QR code image, and separate the payment QR code images of different APPs from the APP payment QR code image. The payment APP recognizes the separated payment QR code images in turn, and performs the payment operation if the recognition is successful.
[0326] In detail, each module in the unified payment processing system 100 for multi-terminal aggregation in the embodiment of the present invention is used in the same manner as described above. Figure 1 The unified payment processing method for multi-terminal aggregation described in the present invention has the same technical means and can produce the same technical effects, so I will not go into details here.
[0327] Embodiment 3:
[0328] like Figure 3 , is a schematic diagram of the structure of an electronic device for implementing a unified payment processing method for multi-terminal aggregation provided by an embodiment of the present invention.
[0329] The electronic device 1 may include a processor 10 , a memory 11 , a communication interface 13 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as a program 12 .
[0330] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the program 12, etc., but also be used to temporarily store data that has been output or is to be output.
[0331] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as the program 12 for realizing unified payment processing of multi-terminal aggregation), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0332] The communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices, and to achieve connection and communication between internal components of the electronic device.
[0333] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0334] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0335] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0336] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0337] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0338] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0339] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0340] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A unified payment processing method for multi-terminal aggregation, characterized in that: The method comprises: S1: Collect payment QR code images of different payment apps and preprocess them to obtain preprocessed payment QR code images; S2: performing foreground separation on the preprocessed payment QR code image to obtain a payment foreground image; S3: embed and fuse the payment foreground images of different payment apps to obtain a fused APP payment QR code image; S4: Use any payment APP to scan the merged APP payment QR code image, and separate the payment QR code images of different APPs from the APP payment QR code image. The payment APP recognizes the separated payment QR code images in turn, and performs the payment operation if the recognition is successful; The step S1 includes collecting payment QR code images of different payment apps, including: Collect payment QR code images of different payment apps, where the collected payment QR code images are: {I m |m∈[1,M]}; I m =(I m (x,y)) X×Y ; in: I m represents the payment QR code image of the mth payment APP collected; m (x,y) represents the payment QR code image I m The pixel value of the pixel in the xth row and yth column, where X represents the number of pixel rows in the payment QR code image, and Y represents the number of pixel columns in the payment QR code image; M represents the total number of payment apps; Indicates payment QR code image I m The color values of the pixels in the xth row and yth column in the RGB color channels respectively; Preprocess the payment QR code images of different payment apps to obtain preprocessed payment QR code images; The preprocessing of payment QR code images of different payment apps includes: The payment QR code images of different payment APPs are preprocessed, where the payment QR code image I m The preprocessing process is: S11: Calculate payment QR code image I m The brightness value of the pixel in the QR code image I m Convert to a brightness image: V m =(V m (x,y)) X×Y ; in: V m Indicates payment QR code image I m The corresponding brightness image; V m (x,y) represents the payment QR code image I m The brightness value of the pixel at the xth row and yth column in; max(·) means obtaining the maximum value; S12: Brightness image V m Perform convolution and residual processing to obtain the payment QR code image I m The corresponding feature map, where the brightness image V m The convolution and residual processing formula is: in: F m Indicates payment QR code image I m The corresponding feature map; Represents the brightness image V m The residual information of exp(·) represents an exponential function with a natural constant as the base; w 7×7 Represents a convolution matrix of size 7×7 pixels; w 3×3 Represents a convolution matrix of size 3×3 pixels; * indicates convolution calculation; GELU(·) denotes Gaussian error linear unit; S13: For feature map F m Perform strong light area recognition to obtain an image with strong light recognition results: in: represents an image with strong light recognition results, where This means that the pixel in the xth row and yth column in the image is a bright pixel. This means that the pixel in the xth row and yth column in the image is not a bright pixel; w1 represents the bright light convolution matrix; Round(·) means that the element value in the matrix is processed as 0 or 1. If the element value is greater than the preset threshold, the element value is assigned to 1, otherwise it is assigned to 0; S14: Based on images with strong light recognition results For the feature map F m Perform strong light interference removal processing to obtain the feature map after strong light interference removal in: δ(·) represents the activation function; ||·||1 represents the L1 norm; w2 represents the anti-interference convolution matrix; S15: Calculate the weight of the feature map m , for the payment QR code image I m Perform weighted processing on the feature graph to form a preprocessed payment QR code image: in: I′ m Indicates payment QR code image I m The preprocessing results; The feature map weight weight is calculated in step S15 m ,include: S151: Image Perform morphological opening operation to filter out the image The isolated light spot area in the image is obtained S152: Traverse to get the image All connected regions in form a set Ω; S153: Calculate the information entropy of the connected area: in: h m Representing images The information entropy of all connected regions in ; c∈Ω, c represents any connected region in the set Ω; num(c) represents the number of pixels in the connected region c; S154: Calculate the weight of the feature map m : in: MAX represents the preset maximum information entropy, and MIN represents the preset minimum information entropy; σ(Ω) represents the standard deviation of the number of pixels in all connected regions in the set Ω; min(·) means getting the minimum value.
2. A unified payment processing method for multi-terminal aggregation as claimed in claim 1, characterized in that: In the step S2, foreground separation is performed on the pre-processed payment two-dimensional code image, including: The foreground of the preprocessed payment QR code image is separated, where the payment QR code image I′ m The foreground separation process is: S21: Payment QR code image I′ m Perform grayscale processing to obtain the payment QR code image I′ m The corresponding grayscale image The maximum inter-class variance method is used to analyze the payment QR code image I′ m The corresponding grayscale image Perform binarization to obtain the payment QR code image I′ m The corresponding binary image: I″ m =(I″ m (x,y)) X×Y ; in: I″ m Represents the payment QR code image I′ m The corresponding binary image; I″ m (x, y) represents the binary image I″ m The pixel value of the pixel in the xth row and yth column, I″ m (x, y) = 255 represents the binary image I″ m The pixel in the xth row and yth column is a binary foreground pixel, I″ m (x, y) = 0 represents the binary image I″ m The pixel in the xth row and yth column is the binary background pixel; S22: Calculate and obtain the payment QR code image The probability that any pixel in is a foreground pixel, where the payment QR code image The probability that the pixel in the xth row and yth column is a foreground pixel is: in. p m (x, y) represents the payment QR code image The probability that the pixel in the xth row and yth column is a foreground pixel; ε represents the adjustment coefficient, and ε is set to 0.01; ρ m Represents the binary image I″ m Binarized foreground pixel density, ρ m (x, y) represents the binary image I″ m The binary foreground pixel density of the pixel in the xth row and yth column; Count m Represents the binary image I″ m The number of binarized foreground pixels in ; Count m (x, y) represents the binary image I″ m The number of binary foreground pixels in the 3×3 pixel area centered at the pixel in the xth row and yth column; S23: If the payment QR code image If the probability that a pixel in the image is a foreground pixel is higher than a preset threshold, the pixel is marked as a foreground pixel; S24: In the payment QR code image In the example, the grayscale value of the foreground pixel is set to 255, and the grayscale value of other pixels is set to 0 to form the payment QR code image. The corresponding payment prospect image: TO m (A) m (x, y))x ×Y ; in: A m Indicates the payment QR code image The corresponding payment prospect image; A m (x, y) represents the payment prospect image A m The grayscale value of the pixel at row x and column y in .
3. A unified payment processing method for multi-terminal aggregation as claimed in claim 2, characterized in that: In the step S3, the payment foreground images of different payment apps are embedded and fused, including: The payment foreground images of different payment apps are embedded and fused, and the embedding and fusion process is as follows: S31: Calculate the low-frequency sub-band corresponding to the payment foreground image, where the payment foreground image A of the mth payment APP m The corresponding low-frequency subband is g m ; S32: Perform singular value decomposition on the low-frequency subband to obtain the left and right singular vectors and singular value matrices corresponding to the low-frequency subband, where the low-frequency subband g m The singular value decomposition result of is: g m =U m S m (E m ) T ; in: U m represents the low frequency subband g m The left singular vector, E m represents the low frequency subband g m The right singular vectors of ; T stands for transpose; S m represents the low frequency subband g m The singular value matrix of ; S33: Read the fused image G currently fused with u payment foreground images u , where the initial value of u is 0, and G0 represents the grayscale image with all pixel grayscale values initialized to 0; S34: fusion image G u Perform singular value decomposition to obtain the fused image G u The left singular vector G u (1), the right singular vector G u (2) and the singular value matrix s u ; S35: Extract fused image G u The principal component F u : F u =G u (1)×s u ; S36: The fused image G u The principal component F u The singular value matrix S embedded in the payment foreground image corresponding to the u+1th payment APP u In the above example, we get the fused image G u+1 The singular value matrix s u+1 : in: represents the embedding strength; S37: Constructing a fused image G u+1 : G u+1 ←G u (1)s u+1 (G u (2)) T ; S38: Let u=u+1, and return to step S33 until the APP payment QR code image G is integrated with M payment foreground images.
4. A unified payment processing method for multi-terminal aggregation as claimed in claim 3, characterized in that: The step S31 of calculating the low-frequency sub-band corresponding to the payment foreground image includes: Payment prospect image A m The calculation process of the corresponding low-frequency sub-band is: S311: Foreground image A m Divide into four pixels and get the foreground image A m The division result is: in: G m (1, 1) indicates that the foreground image A m A unit composed of four pixels; S312: Calculate the mean of each unit to form a low-frequency subband g m : in: D m (1, 1) represents the unit G m The mean of (1, 1).
5. A unified payment processing method for multi-terminal aggregation as claimed in claim 1, characterized in that: In the step S4, any payment APP is used to scan the merged APP payment QR code image, and payment QR code images of different APPs are separated from the APP payment QR code image, including: Use any payment APP to scan the merged APP payment QR code image G, and separate the payment QR code images of different APPs from the APP payment QR code image G. The separation process of the APP payment QR code image G is as follows: S41: Initialize the number of separations of the APP payment QR code image G to r, where the initial value of r is 0 and the maximum value is M. Then the APP payment QR code image separated from r payment QR code images is G. r , where G 0 =G: S42: Calculate APP payment QR code image G r The corresponding low-frequency subband g r ; S43: For low frequency subband g r Perform singular value decomposition to obtain the low-frequency subband g r The left singular vector L r (1) Right singular vector L r (2) and the singular value matrix L r ; S44: Constructing the separated rth payment QR code image: in: Q r+1 It represents the r+1th payment QR code image separated from the APP payment QR code image G; the APP payment QR code image separated from the r+1 payment QR code images is calculated: G r+1 =a r (G r -Q r+1 ); in: α represents the enhancement coefficient; S45: Let r=r+1, and return to step S42 until M payment QR code images are separated; The payment APP recognizes the separated payment QR code images in turn, and performs the payment operation if the recognition is successful.
6. A unified payment processing system with multiple terminals, characterized in that: The system comprises: An image preprocessing module is used to collect payment QR code images of different payment apps and perform preprocessing to obtain preprocessed payment QR code images; The QR code separation and fusion module is used to separate the foreground of the pre-processed payment QR code image, embed and fuse the payment foreground images of different payment apps, and obtain the fused APP payment QR code image; A unified payment device is used to use any payment APP to scan the fused APP payment QR code image, and separate the payment QR code images of different APPs from the APP payment QR code image. The payment APP identifies the separated payment QR code images in turn, and if the identification is successful, the payment operation is performed to realize a unified payment processing method for multi-terminal aggregation as described in any one of claims 1-5.
Citation Information
Patent Citations
Aggregate payment method and related equipment
CN111684481A
Three-dimensional graphic code, three-dimensional graphic code recognition method and device, medium and equipment
CN113204982A
Night light image optimization method based on spatial information fusion multi-attention network
CN114926349A
Image signal detection system and signal processing method
CN117523209A