Face payment identity authentication method based on AI vision
Patent Information
- Application Number
- CN202610423480.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-01
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-04-01
AI Technical Summary
现有技术通常采用视频帧间连续性分析或单帧图像噪声检测来识别二次成像攻击,但在面对高分辨率、低噪声的攻击手段时,单一的时域或空域特征往往难以捕捉到因二次成像过程引入的微弱纹理结构变异
(1)本发明通过构建多层小波分解与李氏指数拟合的联合计算机制,实现了对人脸图像高频纹理奇异性的深度量化表征。利用矢量和运算合成小波系数模值,提取局部极大值均值并执行对数线性回归分析,精确计算出反映边缘衰减特性的李氏指数。该机制将抽象的二次成像攻击纹理变异转化为具体的斜率指标,有效滤除了单一像素点噪声与局部光照变化的干扰,显著提升了对高仿真二次成像攻击的初筛准确率。
Smart Images

Figure CN122312145B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a facial recognition payment authentication method based on AI vision. Background Technology
[0002] With the deep integration of active light field display technology and biometric anti-spoofing technology, terminal devices have placed extremely high demands on the authenticity of facial images. Existing technologies typically employ inter-frame continuity analysis or single-frame image noise detection to identify secondary imaging attacks. However, when facing high-resolution, low-noise attacks, single temporal or spatial features often fail to capture the subtle textural variations introduced by the secondary imaging process. Specifically, secondary imaging attacks alter the singularity of image edges, manifesting as abnormal attenuation characteristics of high-frequency components in the frequency domain. However, existing detection methods are mostly based on pixel grayscale statistics or simple edge detection operators, lacking deep analytical capabilities of the multi-scale geometric structure of images. This prevents accurate quantification of the evolution of edge singularities with scale, resulting in a high false negative rate. Furthermore, traditional facial recognition processes typically treat the facial region as an isolated object, ignoring the intrinsic connection between the spatial topological relationships between facial pixels and the pixel driving voltage of the terminal display screen. This fails to construct a direct mapping mechanism from mathematical graph theory features to physical light field parameters, limiting the application depth and control precision of active defense technologies at the terminal display level.
[0003] Therefore, how to provide a face-scanning payment authentication method based on AI vision is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] This invention proposes an AI vision-based facial recognition payment authentication method. It extracts high-frequency components by performing multi-level discrete wavelet decomposition on a normalized face region using an improved TimeSformer model. The mean of the modulus maxima of these high-frequency components at each decomposition level is calculated. The slope of the fitted line is analyzed using log-linear regression to obtain the Liebach exponent, which is then used as a singularity constraint weight in a spatiotemporal attention mechanism to dynamically adjust the fusion coefficients of features between video frames. Simultaneously, the improved TimeSformer model constructs a graph Laplacian matrix based on pixel topological connectivity. Feature decomposition and linear mapping of the graph Laplacian matrix generate a spectral brightness control vector, driving the terminal display screen to construct an active light field. This method utilizes the Liebach exponent to optimize the temporal feature capture capability of the improved TimeSformer model against secondary imaging attacks and achieves direct mapping from pixel topology to light field control signals based on the graph Laplacian matrix. It overcomes the limitations of traditional methods, such as insensitivity to weak texture variations and lack of physical-layer active defense mechanisms, providing an efficient and reliable solution for facial recognition payment authentication.
[0005] According to an embodiment of the present invention, a facial recognition payment authentication method based on AI vision specifically includes: S1. Responding to the payment instruction, calculate the eigenvector of the graph Laplacian matrix of the screen pixel array to generate the graph brightness control vector, modulate the screen brightness to construct an active light field, and simultaneously acquire the user's face video stream; S2. Detect and locate the user's face video stream and crop the face region, calculate the random walk probability to generate a saliency weight map, and perform illumination normalization to output a normalized face region. S3. Extract the high-frequency components of the normalized face region and estimate the Lipschitz index. Determine secondary imaging attacks based on Lipschitz regularity. If the attack passes, output the initial screening video frame. S4. By improving the TimeSformer model, the initial screening video frames are encoded to generate a spatiotemporal input tensor. The screen luminescence parameters are read and converted into a structured guiding kernel by the covariant tensor physical prior. A covariant attention weight matrix is constructed, and the spatiotemporal input tensor is processed to generate a spatial mask. The spatial mask is used to filter and output a pure spatiotemporal feature tensor, which is then mapped to generate predicted temporal features. The cosine similarity between the predicted temporal features and the target feature vector is calculated, and the liveness verification frame is determined and output. S5. Extract the motion vector field of each local region of the continuous sequence of the liveness verification frames, calculate the transfer entropy of the motion signals between regions to construct a causal network graph, and extract the non-rigid deformation feature vector. S6. Calculate the weights of the Li's index, cosine similarity and gray relational coefficient of non-rigid deformation feature vector, and calculate the comprehensive confidence level by weighted fusion. If it is greater than the safety threshold, output the real live image frame. S7. Extract the facial feature vector of the real live image frame, calculate the Mahalanobis distance with the registered feature template based on the inverse matrix of the global feature distribution covariance matrix, normalize to obtain the similarity score, and generate a payment authorization token to complete the facial recognition payment identity verification if the similarity score is greater than the payment threshold.
[0006] Optionally, S1 specifically includes: S11. Scan the pixel distribution position of the terminal display screen, take each pixel as a node according to the pixel distribution position, connect the adjacent pixels in the node to generate an adjacency table; count the number of connections of the nodes in the adjacency table to construct a degree matrix, construct an adjacency matrix according to the adjacency table, and calculate the difference between the degree matrix and the adjacency matrix to obtain the graph Laplacian matrix. S12. Perform eigenvalue decomposition on the graph Laplacian matrix, extract the eigenvectors corresponding to the target eigenvalues, and map them to generate the spectral brightness control vector. S13. Modulate the brightness of the terminal display screen according to the brightness control vector of the spectrum to construct an active light field; S14. Under the illumination of the active light field, the user's face video stream is acquired synchronously.
[0007] Optionally, S2 specifically includes: S21. Perform face detection on the user's face video stream, locate the key points of the face and calculate the bounding box, and crop the original face region based on the bounding box. S22. Calculate the gray-level similarity between pixels in the original face region and neighboring pixels, normalize the gray-level similarity to construct a transition probability matrix, solve the feature vector of the transition probability matrix to obtain the steady-state distribution probability, and map the steady-state distribution probability to a saliency weight map. S23. Perform Gaussian filtering on the saliency weight map to obtain the illumination distribution component, calculate the reciprocal of the illumination distribution component as the normalization coefficient, perform a dot product operation between the normalization coefficient and the pixel value of the original face region, and output the normalized face region.
[0008] Optionally, S3 specifically includes: S31. Perform multi-level wavelet decomposition on the normalized face region, extract the high-frequency sub-band coefficients of each decomposition level, and determine the combination of the high-frequency sub-band coefficients as high-frequency components. S32. Traverse the coefficient matrix of the high-frequency component at each decomposition level, calculate the vector sum of the horizontal and vertical gradients of each pixel in the coefficient matrix to obtain the magnitude value, extract the magnitude values of the local maxima points in the magnitude values and calculate the mean value, use the mean value as the magnitude maxima of each decomposition level, perform natural logarithmic operation on the magnitude maxima to obtain the natural logarithm sequence, perform linear regression analysis with the decomposition level as the independent variable and the natural logarithm sequence as the dependent variable to obtain the fitted line, and calculate the slope of the fitted line to obtain the Li's index. S33. Determine whether the Lee index is within the preset Lee index threshold range. If so, determine that the secondary imaging attack detection has been passed and output the initial screening video frame.
[0009] Optionally, the improved TimeSformer model includes a spatiotemporal coding layer, a covariant tensor physics prior guidance layer, a spatiotemporal separation attention layer, a temporal prediction output layer, and a similarity determination layer: The spatiotemporal coding layer is used to segment the initial screening video frames into image block sequences, perform linear projection mapping on the image block sequences to generate image block embedding vectors, and superimpose position coding vectors and time coding vectors on the image block embedding vectors to generate a spatiotemporal input tensor. The covariant tensor physics prior guidance layer is used to read a preset sequence of screen luminous intensity control parameters, perform a discretization encoding operation on the sequence of screen luminous intensity control parameters to generate a screen brightness modulation timing code, construct a tensor space based on the screen brightness modulation timing code and perform a projection transformation to generate a covariant tensor field, perform tensor decomposition on the covariant tensor field to extract local geometric structure features, and perform tensor shrinking operation on the local geometric structure features to generate a structured guidance kernel; The spatiotemporal separation attention layer is used to construct a covariant attention weight matrix based on the structured guiding kernel, perform a dimension permutation operation on the spatiotemporal input tensor to separate the time dimension, and perform matrix multiplication with the covariant attention weight matrix to generate a spatiotemporal salient feature tensor. The covariant derivative is calculated on the spatiotemporal salient feature tensor to generate a feature rate of change vector. A rotation-invariant feature representation is generated based on the feature rate of change vector. The rotation-invariant feature representation is fused into the spatiotemporal salient feature tensor and a spatial dimension self-attention calculation is performed to generate a spatial mask. The spatial mask is used to perform weighted filtering on the spatiotemporal salient feature tensor to output a clean spatiotemporal feature tensor. The time-series prediction output layer is used to perform normalized statistical calculations and nonlinear fully connected mappings on the pure spatiotemporal feature tensor to generate an enhanced feature tensor, perform global average pooling operations on the enhanced feature tensor to generate a time-series feature vector, and perform linear projection transformation on the time-series feature vector to output predicted time-series features. The similarity determination layer is used to map the screen brightness modulation temporal encoding into a target feature vector, calculate the cosine similarity between the predicted temporal feature and the target feature vector to generate a similarity score; perform a numerical comparison operation between the similarity score and a preset similarity score threshold to generate a comparison result signal, and extract the liveness verification pass frame based on the comparison result signal.
[0010] Optionally, S5 specifically includes: S51. Perform pixel grayscale matching on the continuous sequence of the liveness verification frames, calculate the displacement vector of the pixel to generate an optical flow field, divide the optical flow field into grid regions according to spatial location, calculate the mean value of the displacement vector in each grid region as the motion vector, and arrange the motion vectors along the time axis to generate a motion vector time series. S52. Construct a joint probability distribution of each local region based on the motion vector time series, calculate the transition entropy values between regions based on conditional probability, and use the transition entropy values as the weights of the edges to connect the corresponding local regions to construct a causal network graph. S53. Calculate the node degree and path length of the causal network graph, and concatenate the node degree and path length to generate a non-rigid deformation feature vector.
[0011] Optionally, S6 specifically includes: S61. Normalize the Li's index, cosine similarity and non-rigid deformation feature vector, calculate the absolute difference between each index and the optimal reference sequence, and calculate the grey relational coefficient based on the absolute difference. S62. Calculate the weight coefficients of each index based on the gray relational coefficients, perform dimensionality reduction calculation on the non-rigid deformation feature vector to obtain deformation feature values, and perform weighted summation of the Li's index, cosine similarity and deformation feature values to generate a comprehensive confidence score. S63. Compare the overall confidence level with a preset security threshold. If it is greater than the preset security threshold, output a real live image frame.
[0012] Optionally, S7 specifically includes: S71. Extract the face feature vector of the real live image frame, calculate the difference vector between the face feature vector and the registered feature template, and obtain the inverse matrix of the global feature distribution covariance matrix; S72. The difference vector is weighted and projected using the inverse matrix of the global feature distribution covariance matrix to obtain the Mahalanobis distance; S73. Normalize the Mahalanobis distance to obtain a similarity score, compare the similarity score with a preset payment threshold, and if it is greater than the preset payment threshold, generate a payment authorization token to complete the face recognition payment identity verification.
[0013] The beneficial effects of this invention are: (1) This invention achieves a deep quantitative characterization of high-frequency texture singularities in face images by constructing a joint computational mechanism of multi-layer wavelet decomposition and Lieberg's index fitting. Wavelet coefficient moduli are synthesized using vector summation, local maxima mean is extracted, and log-linear regression analysis is performed to accurately calculate the Lieberg's index, which reflects edge attenuation characteristics. This mechanism transforms the abstract texture variation of secondary imaging attacks into a specific slope index, effectively filtering out noise from single pixels and interference from local illumination changes, significantly improving the initial screening accuracy for highly realistic secondary imaging attacks.
[0014] (2) This invention achieves precise conversion from topological features of facial images to physical anti-counterfeiting parameters by establishing a direct mapping relationship between the graph Laplacian matrix and the terminal display light field. The graph Laplacian matrix is constructed based on pixel neighborhood connectivity, and a graph brightness control vector is generated using feature decomposition and linear mapping to drive the terminal screen to construct an active light field. This method directly regulates the pixel driving voltage using mathematical graph theory features, embedding a topological anti-counterfeiting identifier bound to biometrics at the physical display level, and constructing a closed-loop defense system of "display-acquisition-verification," greatly enhancing the active anti-counterfeiting capability of the identity verification system.
[0015] (3) This invention achieves deep coupling between temporal feature extraction and singularity detection by incorporating an improved TimeSformer model with Li's exponent constraint. The Li's exponent is used as a dynamic weight in the spatiotemporal attention mechanism to adaptively adjust the fusion coefficients of features between video frames, enabling the model to focus on attack regions with singularity decay characteristics. This design overcomes the shortcomings of traditional temporal models in perceiving subtle texture variations, achieving feature alignment from low-level signal processing to high-level semantic judgment, and significantly improving the robustness and security of facial recognition payment authentication. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of a face-scanning payment identity verification method based on AI vision proposed in this invention; Figure 2 This is a flowchart illustrating the working principle of the improved TimeSformer model for a face-scanning payment authentication method based on AI vision proposed in this invention. Detailed Implementation
[0017] The invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0018] refer to Figure 1 and Figure 2 A facial recognition payment authentication method based on AI vision, specifically including: S1. Responding to the payment instruction, calculate the eigenvector of the graph Laplacian matrix of the screen pixel array to generate the graph brightness control vector, modulate the screen brightness to construct an active light field, and simultaneously acquire the user's face video stream; S2. Detect and locate the user's face video stream and crop the face region, calculate the random walk probability to generate a saliency weight map, and perform illumination normalization to output a normalized face region. S3. Extract the high-frequency components of the normalized face region and estimate the Lipschitz index. Determine secondary imaging attacks based on Lipschitz regularity. If the attack passes, output the initial screening video frame. S4. By improving the TimeSformer model, the initial screening video frames are encoded to generate a spatiotemporal input tensor. The screen luminescence parameters are read and converted into a structured guiding kernel by the covariant tensor physical prior. A covariant attention weight matrix is constructed to process the spatiotemporal input tensor to generate a spatial mask. The spatial mask is used to filter and output a pure spatiotemporal feature tensor, which is then mapped to generate predicted temporal features. The cosine similarity between the predicted temporal features and the target feature vector is calculated, and the liveness verification frame is determined and output. S5. Extracting liveness verification involves calculating the motion vector field of each local region in a continuous sequence of frames, constructing a causal network graph by calculating the transfer entropy of motion signals between regions, and extracting non-rigid deformation feature vectors. S6. Calculate the weights by calculating the Li's index, cosine similarity, and grey relational coefficient of non-rigid deformation feature vectors, and then calculate the comprehensive confidence by weighted fusion. If it is greater than the safety threshold, output the real live image frame. S7. Extract the facial feature vector from the real live image frame, calculate the Mahalanobis distance with the registered feature template based on the inverse matrix of the global feature distribution covariance matrix, normalize to obtain the similarity score, and generate a payment authorization token to complete the face recognition payment identity verification if the similarity score is greater than the payment threshold.
[0019] In this embodiment, S1 specifically includes: S11. Scan the physical pixel distribution positions of the terminal display screen, assign a unique number to each physical pixel according to the row and column order of the screen from left to right and from top to bottom, define each physical pixel as an independent node in the graph network according to the pixel distribution position, traverse all nodes and determine the spatial adjacency relationship, connect the nodes that meet the adjacency condition, and generate an adjacency relationship table that records the node connection status; count the number of adjacent nodes connected to each node in the adjacency relationship table as the diagonal elements to construct the degree matrix, and fill in 0 or 1 according to whether there is a connection relationship between the nodes in the adjacency relationship table to construct the adjacency matrix. By calculating the difference between the corresponding position elements of the degree matrix and the adjacency matrix, the graph Laplacian matrix is obtained.
[0020] S12. Perform eigenvalue decomposition on the graph Laplacian matrix to obtain all its decomposed eigenvalues and corresponding eigenvectors. Sort all the decomposed eigenvalues in ascending order of numerical value. Remove the eigenvalue with the first digit of the sorted sequence being 0. Extract the next 5 smaller eigenvalues as target eigenvalues. Extract the eigenvectors corresponding to these 5 target eigenvalues. Calculate the average square of the elements of each eigenvector as the weight coefficient. Sum these 5 eigenvectors in a weighted manner to form a single-dimensional comprehensive low-frequency eigenvector. Since the order of each element in the comprehensive low-frequency eigenvector strictly corresponds to the order of the node numbers, directly map the values of each dimension in the comprehensive low-frequency eigenvector according to the row and column arrangement of the physical pixels on the screen and normalize the amplitude to generate a spectral brightness control vector for accurately controlling the brightness of each area of the screen.
[0021] S13. Read the specific value of each element in the spectral brightness control vector, and use the value of each element as the brightness modulation level of the corresponding physical pixel of the screen. Based on the brightness modulation level, independently drive and modulate the local brightness of the terminal display screen. Since the low-frequency feature vector filters out high-frequency abrupt changes, the screen as a whole presents a uniform diffuse reflection illumination state with a large-scale smooth transition and no high-frequency texture, thus constructing an active light field for active face liveness detection.
[0022] S14. Turn on the terminal camera and control its exposure parameters to keep synchronized with the modulation frequency of the active light field. During the process of the active light field illuminating the user's face, simultaneously capture the optical reflection image of the user's face and arrange it in time sequence. Perform digital encoding and frame alignment processing on the captured optical reflection image sequence, and output the initial user face video stream containing the modulation features of the active light field.
[0023] In this embodiment, S2 specifically includes: S21. Read the image data from the user's face video stream frame by frame. Traverse all sizes of sliding windows in the image and extract the horizontal edge features, vertical edge features, and central shadow features within the window as Haar-like texture features. For each Haar-like texture feature, calculate the difference between the feature value and a preset splitting threshold. When the difference is greater than 0, output a positive bias constant of 1.0; when the difference is less than or equal to 0, output a negative bias constant of -1.0. Multiply the output bias constant with a preset weight coefficient of 0.5 corresponding to the texture feature to obtain a single-level confidence score. For each sliding window, sum the single-level confidence scores passed through by the window in concatenation order. Window scores with a summation greater than 0.85 are considered... The system identifies the face region and outputs an initial detection box. Within the initial detection box, 10 preset reference coordinate points are selected. The gradient direction histogram features of the local image are extracted with the reference coordinate points as the center. The gradient direction histogram features are input into 10 preset regression decision trees, and the coordinate offsets of the reference coordinate points pointing to the real face contours are output. The reference coordinate points and their corresponding coordinate offsets are added one dimension at a time to iteratively calculate and locate the coordinates of 68 facial key points. The maximum and minimum values of these 68 key points in the horizontal and vertical directions are calculated and expanded outward by 15 pixels as the boundary to construct a face bounding box containing the complete face. According to the horizontal and vertical coordinates of the top left corner vertex of the face bounding box and the width and height values, array slicing and cropping operations are performed on the corresponding image regions in the user's face video stream to output the original face region after removing background interference.
[0024] S22. Traverse each pixel in the original face region. Create a square neighborhood window centered on the current pixel, with a size of 3 pixels by 3 pixels. Calculate the absolute value of the difference between the grayscale value of the current pixel and the grayscale values of its eight neighboring pixels within the neighborhood window. Input this absolute value into a negative exponential function to convert it into a grayscale similarity value ranging from 0 to 1. For each pixel, perform row-wise normalization by dividing the calculated eight grayscale similarities by the sum of the eight grayscale similarities corresponding to that pixel. Construct a two-dimensional sparse square matrix with the same number of rows and columns as the total number of pixels in the original face region, using this as a blank matrix. Arrange the two-dimensional pixel coordinates of the original face region from left to right and from top to bottom. The sequence is converted into a unique one-dimensional node index. The row-normalized values are filled into the intersection of the row number corresponding to the one-dimensional index of the current node and the column number corresponding to the one-dimensional index of the adjacent node in the blank matrix. All intersections of the remaining non-adjacent nodes are filled with the value 0 to construct the transition probability matrix. The transition probability matrix is initialized with a vector of all 1s and the power-law operation of matrix-vector multiplication is performed 200 times to solve for the eigenvector corresponding to its largest eigenvalue. The value in the eigenvector is extracted as the steady-state distribution probability of each pixel. The steady-state distribution probability of each pixel is dimension-mapped according to the spatial row and column arrangement of the original face region to generate a saliency weight map that highlights the core structure of the face and suppresses the edge background.
[0025] S23. Perform a Gaussian filter convolution operation on the saliency weight map with a kernel size of 5 pixels by 5 pixels and a standard deviation of 1.5 to filter out high-frequency noise and local abrupt changes in the saliency weight map, and smoothly output the illumination distribution component that represents the large-scale low-frequency illumination trend of the face. Add a zero-prevention constant of 0.01 to the value of each element in the illumination distribution component and calculate its reciprocal. Set the reciprocal value as the normalization coefficient of the corresponding spatial position. Perform an element-wise dot product operation between the generated normalization coefficient and the pixel value of the corresponding position in the original face region output by S21. Limit all pixel values after the dot product operation to a gray value range of 0 to 255. Use the illumination distribution component to compensate and balance the illumination changes in the original face region, and output a normalized face region that eliminates the influence of complex illumination.
[0026] In this embodiment, S3 specifically includes: S31. Perform a multi-layer wavelet decomposition of 3 layers on the normalized face region. In the 1st, 2nd and 3rd decomposition levels, for each element in the coefficient matrix, extract the difference between the values of the left and right adjacent elements in the horizontal direction as the high-frequency sub-band coefficients representing horizontal edge details. Extract the difference between the values of the upper and lower adjacent elements in the vertical direction as the high-frequency sub-band coefficients representing vertical edge details. Extract the sum of the differences between the values of the adjacent elements in the upper left to lower right diagonal direction and the differences between the values of the adjacent elements in the upper right to lower left diagonal direction as the high-frequency sub-band coefficients representing diagonal edge details. Arrange the 3 types of high-frequency sub-band coefficients extracted in the 1st decomposition level at the beginning of the matrix, arrange the 3 types of high-frequency sub-band coefficients extracted in the 2nd decomposition level in the middle, and arrange the 3 types of high-frequency sub-band coefficients extracted in the 3rd decomposition level at the end of the matrix. Perform a combination operation of connecting the first and second elements to determine the high-frequency components. S32. Traverse the coefficient matrix of the high-frequency components in the three decomposition levels. For each pixel in the coefficient matrix, calculate the horizontal gradient by subtracting the value of the adjacent pixel to the right from the value of the adjacent pixel to the left. Calculate the vertical gradient by subtracting the value of the adjacent pixel below the value from the value of the adjacent pixel above the value. Multiply the horizontal gradient by the horizontal gradient to obtain the horizontal squared term. Multiply the vertical gradient by the vertical gradient to obtain the vertical squared term. Add the horizontal and vertical squared terms to obtain the sum of squared gradients. Take the square root of the sum of squared gradients to obtain the modulus. Set a local comparison window of size 3 pixels x 3 pixels centered on each pixel in the coefficient matrix. Extract the modulus values of the local maxima within the local comparison window whose values are greater than or equal to the modulus values of the surrounding 8 pixels. Add the modulus values of all extracted local maxima and divide by the local maximum value. The total number of maxima is obtained by calculating the arithmetic mean. This arithmetic mean is used as the modulus maxima for each of the three decomposition levels. A zero-prevention constant of 1 is added to each of the three modulus maxima. Then, a natural logarithmic operation is performed using a logarithmic mapping function with the natural constant e as the base, resulting in a natural logarithmic sequence. The sequence corresponding to the first decomposition level (value 1), the second decomposition level (value 2), and the third decomposition level (value 3) is used as the independent variable, and the natural logarithmic sequence is used as the dependent variable. The sum of the products of corresponding elements in the independent and dependent variable sequences is calculated and divided by the number of independent variables. This is then subtracted from the product of the independent and dependent variable averages, and the resulting value is used as the covariance numerator. Simultaneously, the sum of the squares of each element in the independent variable sequence minus the independent variable average is calculated and divided by the number of independent variables, and the resulting value is used as the variance denominator. A division operation is performed, dividing the covariance numerator by the variance denominator, to obtain the slope of the fitted line. This slope is defined as the Lieberg exponent. S33. Set the lower limit of the preset Lee's index threshold range to -1.5 and the upper limit to -0.5. Determine whether the value of Lee's index is greater than or equal to -1.5 and less than or equal to -0.5. If the value of Lee's index is greater than or equal to -1.5 and less than or equal to -0.5, it is determined that the secondary imaging attack detection has been passed. Assign the normalized face region data input in S31 to the initial screening video frame variable and output it.
[0027] The Lipschitz exponent estimation process based on multi-layer wavelet decomposition proposed in this step is similar to the traditional singularity detection method in that both rely on Lipschitz regularity theory. That is, they utilize the regularity characteristics of the signal at singularities, analyze the decay law of the modulus maxima of wavelet transform coefficients with scale to characterize the local singularity of the signal, and both use logarithmic transform and linear regression analysis to estimate the Lipschitz exponent that characterizes the intensity of singularity.
[0028] The difference lies in that this invention breaks away from the limitations of traditional methods that simply analyze singularities at a single scale or overall contour. Building upon the traditional model's direct extraction of modulus maxima, this invention adds gradient vector synthesis and hierarchical mean calculation steps. It calculates the vector sum of horizontal and vertical gradients as the modulus to eliminate directional interference and extracts the mean of modulus values from local maxima points as hierarchical features, rather than directly using discrete single-point modulus values. In the exponential fitting step, a linear regression model is constructed with the decomposed hierarchy as the independent variable and the logarithm of the modulus maxima as the dependent variable. The Lieberg exponent is precisely quantified by calculating the slope of the fitted line, rather than a coarse interval estimate.
[0029] The beneficial effects of the improvements are that this invention, through gradient vector synthesis and modulus maxima mean calculation, can effectively filter out single-pixel noise and unstructured interference caused by local illumination changes, breaking the limitation of traditional methods that are sensitive to high-frequency noise and thus cause misjudgment, and achieving stable characterization from discrete noise interference to continuous attenuation features; this design significantly enhances the attack detection algorithm's ability to capture weak texture variations in highly realistic secondary imaging attacks, and can more accurately quantify the singular attenuation features of image edges; the slope calculation based on linear regression effectively improves the robustness and numerical stability of the Liebermann index estimation, and significantly reduces the false rejection rate and false negative rate of liveness detection.
[0030] In this embodiment, the improved TimeSformer model includes a spatiotemporal coding layer, a covariant tensor physics prior guidance layer, a spatiotemporal separation attention layer, a temporal prediction output layer, and a similarity determination layer: The spatiotemporal coding layer is used to slice the initially screened video frames into an array using a 16-pixel multiplied 16-pixel grid sliding window with a stride of 16 pixels. This divides the initially screened video frames into a sequence of image blocks. A linear mapping weight matrix with 256 rows and the number of columns equal to the total number of pixels in each image block is constructed. The two-dimensional pixel array of each image block in the sequence is stretched row-wise into a one-dimensional vector. This one-dimensional vector is then multiplied element-wise row-by-row by the linear mapping weight matrix, and all multiplications are summed to generate an image block embedding vector. Each image block in the sequence is assigned a bit starting from 0, in a left-to-right, top-to-bottom order. An integer index is incremented by 1 each time. This integer index is multiplied by a frequency scaling factor of 1000 and a frequency scaling factor of 2000 respectively. The two products are then input into the sine and cosine functions to calculate trigonometric function values. The calculated trigonometric function values are concatenated to form a position encoding vector. The time step number corresponding to the initial screened video frame in the video stream is extracted and multiplied by a frequency scaling factor of 500. The product is then input into the sine and cosine functions to calculate trigonometric function values and concatenated to form a time encoding vector. The image patch embedding vector is then added to the position encoding vector and time encoding vector at the same index position to generate a spatiotemporal input tensor. The covariant tensor physics prior guidance layer reads a pre-set sequence of screen luminance control parameters, containing the screen's luminance intensity at each time step. It multiplies each floating-point value in the sequence by a magnification factor of 10 and rounds it to the nearest integer. Each integer is then mapped to a 50-dimensional one-hot encoded vector. These vectors are arranged chronologically to generate a screen brightness modulation timing code. Each one-hot encoded vector at each time step is used as a main diagonal element, with the remaining positions filled with zeros, constructing a 50x50 diagonal matrix. These diagonal matrices are stacked along the third dimension to form a tensor space. The 50x50 slice matrix of each time step in the tensor space is then stretched row-wise into a 2500-dimensional vector, constructing a 256-row, 50-column tensor space. Given a projection weight matrix of 2500, the stretched one-dimensional vector is subjected to a linear mapping operation of element-wise multiplication and summation using the projection weight matrix. The one-dimensional vectors of length 256 obtained from all time steps are concatenated along the column direction to generate a covariance tensor matrix with 256 rows and the total number of columns equal to the number of time steps. The singular value decomposition algorithm is performed on the covariance tensor matrix to calculate the product of the transpose matrix of the covariance tensor matrix and the original matrix, resulting in a covariance matrix of size 256 rows and 256 columns. The eigenvalues and eigenvectors of the covariance matrix are solved. The first 20 eigenvalues with a dimension of 256 corresponding to the eigenvectors of the first eigenvalues are retained as local geometric structure features in descending order of eigenvalues. The 20 retained eigenvectors with a dimension of 256 are concatenated side by side along the column direction to directly construct a two-dimensional matrix with 256 rows and 20 columns. This two-dimensional matrix is defined as the structured bootstrap kernel. The spatiotemporal separation attention layer uses the 256-dimensional row vectors in the structured bootstrap kernel as query vectors and the 256-dimensional row vectors in the spatiotemporal input tensor as key vectors. It calculates the product of each element in the query vector with the corresponding element in the key vector, sums all products to obtain a dot product value, divides this dot product value by a scalar scaling factor of 8 to obtain the attention score, inputs all attention scores into the softmax activation function, and calculates the result of a power operation with the natural constant e as the base and the attention score as the exponent for each attention score. The result of the power operation is divided by the sum of all power operation results to generate a covariant attention weight matrix. The layer then performs a position swap operation on the dimension indices of the spatiotemporal input tensor, placing the time dimension index at the beginning to separate the time dimension tensor. Finally, it performs a matrix multiplication operation on the time dimension tensor and the covariant attention weight matrix, performing element-wise multiplication by rows and columns and summing the results to generate a spatiotemporal salient feature tensor. Finally, it performs a time-separation operation along the time dimension... The vector elements at the current time step in the spatial saliency tensor are subtracted from the vector elements at the previous time step to perform difference calculation. The difference result is divided by the time interval constant with a value of 1 to generate a feature rate of change vector. The square value of each element in the feature rate of change vector is calculated and all square values are summed. The square root operation is performed on the sum to obtain the modulus value. Each element in the feature rate of change vector is divided by the modulus value to generate a rotation-invariant feature representation. The rotation-invariant feature representation is fused with the spatiotemporal saliency tensor by adding the values at the same index position. For the fused tensor, each row vector is used as a query vector and the key vector to calculate the dot product and input into the softmax activation function to generate a spatial self-attention matrix. The spatial self-attention matrix and the fused tensor are multiplied by matrix to generate a spatial mask. Each element in the spatial mask is multiplied by the corresponding element in the spatiotemporal saliency tensor to output a clean spatiotemporal feature tensor. The temporal prediction output layer iterates through each feature channel of the clean spatiotemporal feature tensor. It calculates the sum of all elements in the current feature channel and divides it by the total number of elements to obtain the channel mean. It then calculates the square of the difference between each element and the channel mean, sums all the squares, and divides the sum by the total number of elements to obtain the channel variance. Finally, it adds a zero-prevention constant of 0.001 to the channel variance and performs a square root operation to obtain the channel standard deviation. Then, it performs normalization statistical calculations by subtracting the channel mean from each element in the clean spatiotemporal feature tensor and dividing by the channel standard deviation. The normalized tensor is then input into a hidden matrix containing 128 neurons. The hidden layer calculates the sum of the products of all input weights and their corresponding elements, plus a bias constant. Results greater than 0 are retained, and results less than or equal to 0 are set to 0. A non-linear fully connected mapping is performed to generate an enhanced feature tensor. The enhanced feature tensor is summed by adding all elements in the height and width dimensions and divided by the total number of pixels in the space. Global average pooling is performed to generate a temporal feature vector. A linear mapping weight matrix with 128 rows and 10 columns is constructed. The temporal feature vector and the linear mapping weight matrix are multiplied element-wise by row and column and summed. The output is a predicted temporal feature with a dimension of 10. The similarity determination layer concatenates the first and second elements of the one-hot encoded vectors at all time steps in the screen brightness modulation temporal coding in chronological order and stretches them into a one-dimensional long vector as the target feature vector. It calculates the product of each element in the predicted temporal feature vector with the corresponding element in the target feature vector, sums all the products to obtain the numerator dot product, and calculates the square root of the sum of squares of all elements in the predicted temporal feature vector as the predicted modulus and the square root of the sum of squares of all elements in the target feature vector as the target modulus. Finally, it multiplies the predicted modulus and the target modulus to obtain the numerator. The similarity score is generated by multiplying the numerator modulus value by the denominator modulus value product and performing a division operation (numerator dot product divided by denominator modulus product). A preset similarity score threshold of 0.85 is set. The similarity score is checked to see if it is greater than 0.85. If the similarity score is greater than 0.85, a comparison result signal with a value of 1 is generated. If the similarity score is less than or equal to 0.85, a comparison result signal with a value of 0 is generated. The video frame image corresponding to the time step of the comparison result signal with a value of 1 is located in the time series of the initial screening video frames. This video frame image is extracted as the liveness verification pass frame and output.
[0031] The improved TimeSformer model proposed in this step is similar to the traditional TimeSformer model in that it is based on the Transformer architecture and the spatiotemporal attention mechanism. That is, by segmenting the input video frame into a sequence of image blocks and embedding position and time codes, the self-attention mechanism is used to capture the long-distance dependencies between video frames, and a multilayer perceptron structure is used for feature mapping and prediction output.
[0032] The difference lies in that this invention breaks away from the limitations of traditional TimeSformer models, which rely solely on data-driven features while ignoring prior information about the physical environment. Building upon the traditional model's direct use of spatiotemporal input tensors for attention calculation, this invention adds a covariant tensor physical prior guidance layer. This layer reads screen emission parameters and constructs a covariant tensor field, generating a structured guidance kernel through tensor decomposition and contraction operations, rather than randomly initializing attention parameters. In the attention calculation step, a covariant attention weight matrix is constructed using the structured guidance kernel, and a rotation-invariant feature representation is generated by calculating covariant derivatives. This representation is then fused with a generated spatial mask for weighted filtering, rather than simply fusing matrix dot products with global features. Finally, in the output decision step, the target feature vector mapped by the physical parameters is used as the comparison benchmark to calculate the cosine similarity of the predicted temporal features, instead of the traditional classification probability mapping.
[0033] The beneficial effects of the improvements are that, through the construction of covariant tensor physical prior guidance and structured guidance kernel, this invention can directly integrate the physical luminescence characteristics of the active light field of the screen into the feature extraction process of the model, breaking the limitation of insufficient feature representation ability of traditional methods in complex lighting environments, and realizing a leap from pure data-driven to physical perception enhancement; this design significantly enhances the model's sensitivity to physical light field variations in secondary imaging attacks, and can more accurately capture the subtle differences in spatiotemporal features between living and non-living objects; the filtering mechanism based on spatial masks effectively eliminates background noise interference, greatly improving the robustness and anti-counterfeiting accuracy of facial recognition payment identity verification in complex scenarios.
[0034] In this embodiment, S5 specifically includes: S51. For two adjacent frames in a continuous sequence of liveness verification passed frames, calculate the difference in the horizontal direction between the coordinates of each pixel in the previous frame and the coordinates of the same pixel in the next frame as the horizontal displacement component and the difference in the vertical direction as the vertical displacement component. Concatenate the horizontal and vertical displacement components into a displacement vector. Arrange the displacement vectors of all pixels in the continuous sequence according to the spatial position of the corresponding pixels to generate an optical flow field. Divide the optical flow field into a grid region of size 8 pixels by 8 pixels according to the spatial position. For each grid region, sum the horizontal displacement components of all pixels contained therein and divide by the total number of pixels to obtain the horizontal average displacement. Sum the vertical displacement components and divide by the total number of pixels to obtain the vertical average displacement. Concatenate the horizontal and vertical average displacements into a motion vector. Arrange the motion vectors of the grid regions of all time steps in the continuous sequence according to the chronological order to generate a motion vector time series. S52. Define the motion vector of each grid region in the motion vector time series as a random variable. For each grid region, count the frequency of its value falling into 15 preset quantization intervals in consecutive time steps, and divide this frequency by the total number of time steps to generate a marginal probability distribution. For any two different grid regions, count the frequency of their corresponding values simultaneously falling into 225 preset joint quantization intervals, and divide this frequency by the total number of time steps to generate a joint probability distribution. Extract the frequency of the combination of values of the two different grid regions in the current time step and the combination of their own values in the previous time step, and divide by the total number of time steps to generate a first probability distribution with dimension 225. The joint probability distribution is generated by extracting the frequency of the numerical combination of two different grid regions at the current time step and the other numerical combination at the previous time step, divided by the total number of time steps to generate a second joint probability distribution with dimension 225. Each element of the marginal probability distribution of one grid region is added to a zero-prevention constant of 0.0000000001 as the first denominator distribution. Similarly, each element of the marginal probability distribution of the other grid region is added to a zero-prevention constant of 0.0000000001 as the second denominator distribution. This reshapes the first joint probability distribution of dimension 225 into a 15x15 first joint probability distribution. The matrix is used to reshape the second joint probability distribution of dimension 225 into a second joint matrix of 15 rows and 15 columns. Elements from each column of the first joint matrix are extracted and summed to generate a first historical edge vector of dimension 15. Elements from each column of the second joint matrix are extracted and summed to generate a second historical edge vector of dimension 15. Each row of the first joint matrix is divided by the corresponding element in the first historical edge vector to generate a first conditional probability matrix. Each row of the second joint matrix is divided by the corresponding element in the second historical edge vector to generate a second conditional probability matrix. The first conditional probability matrix is then... The first conditional entropy is obtained by calculating the logarithm to the base e of the natural constant e, multiplying it by the corresponding element of the first conditional probability matrix, taking the negative value, and summing all elements. The second conditional entropy is obtained by calculating the logarithm to the base e of the second conditional probability matrix, multiplying it by the corresponding element, taking the negative value, and summing all elements. The value of the first conditional entropy is subtracted from the value of the second conditional entropy to obtain the value of the transition entropy. The value of the transition entropy is used as the weight of the edge to connect the nodes of the corresponding two local regions. The nodes corresponding to all grid regions in the motion vector time series are combined with the generated edges to construct a causal network graph. S53. Traverse each node in the causal network graph, count the total number of edges directly connected to the node as the node degree, calculate the minimum number of edges from the node to all other nodes in the causal network graph, sum them up, and divide by the total number of other nodes to get the path length. Concatenate the node degrees of all nodes in the causal network graph in ascending order of node index to form a node degree vector, and concatenate the path lengths of all nodes in ascending order of node index to form a path length vector. Place the node degree vector at the beginning and the path length vector at the end, and perform a concatenation operation to generate a non-rigid deformation feature vector.
[0035] The non-rigid deformation feature vector extraction process proposed in this step is similar to the traditional optical flow motion analysis method in that it is based on the optical flow field theory. That is, the motion information of the object is represented by calculating the displacement vector of the pixel in the video sequence, and the motion pattern of the local area is aggregated and analyzed by statistical methods to extract motion features.
[0036] The difference lies in that this invention breaks away from the limitations of traditional methods that only focus on the statistics of motion amplitude or direction while ignoring the causality of motion. Building upon traditional models that directly use the mean or variance of motion vectors as features, this invention adds steps for calculating transfer entropy and constructing a causal network. It calculates the transfer entropy values between regions based on conditional probability to quantify the temporal directional dependence of motion signals, rather than simply performing spatial correlation analysis. In the feature generation step, a causal network graph is constructed, and transfer entropy is used as the edge weights. The degree of statistical nodes and path lengths are concatenated to generate non-rigid deformation feature vectors, rather than relying on single numerical statistics.
[0037] The beneficial effects of the improvements are that this invention, through transfer entropy quantification and causal network graph construction, can explicitly represent the causal relationships of motion between local regions using a graph topology structure. This breaks through the limitations of traditional methods in capturing the inherent dynamic mechanisms of complex non-rigid deformations of the human face, achieving a leap from superficial motion statistics to deep causal dependency mining. This design significantly enhances the model's ability to distinguish between subtle deformations of real living bodies (such as facial expression changes) and the rigid motion differences of attack sources, enabling more accurate identification of secondary imaging attacks through motion causal chains. The feature vectors based on node degree and path length effectively improve the completeness of deformation features, enhancing the system's anti-spoofing robustness in complex dynamic scenarios.
[0038] In this embodiment, S6 specifically includes: S61. Read the single values of the Lipson index, the single value of the cosine similarity, and all elements of the non-rigid deformation feature vector. Divide the Lipson index value by 1 and the cosine similarity value by 1. Traverse the non-rigid deformation feature vector to extract the minimum and maximum values. Subtract the minimum value from each element in the non-rigid deformation feature vector and divide the difference by the difference between the maximum and minimum values. Generate the normalized Lipson index, normalized cosine similarity, and normalized non-rigid deformation feature vector. Construct a matrix with 3 rows and the same length as the non-rigid deformation feature vector, using it as the optimal reference matrix. Copy and expand the normalized Lipson index and normalized cosine similarity to the same length as the non-rigid deformation feature vector. The three row vectors are concatenated vertically in sequence to generate a comparison matrix. For each element in the comparison matrix, the difference between it and the element at the same row and column position in the optimal reference matrix is calculated and the absolute value is taken to generate an absolute difference matrix. The absolute difference matrix is traversed to extract the minimum value among all elements as the global minimum difference, and the absolute difference matrix is traversed to extract the maximum value among all elements as the global maximum difference. The resolution coefficient is set to 0.5. Each element in the absolute difference matrix is added to the product of 0.5 and the global minimum difference as the first addend. The global maximum difference is added to the product of 0.5 and the global minimum difference as the second addend. The quotient of the value 1 minus the first addend divided by the second addend is calculated as the element at the corresponding position, generating a gray relational coefficient matrix. S62. Traverse all elements in the first row of the grey relational coefficient matrix, sum them, and divide by the total number of elements in the first row to generate the Li's average relational coefficient. Traverse all elements in the second row of the grey relational coefficient matrix, sum them, and divide by the total number of elements in the second row to generate the similarity average relational coefficient. Traverse all elements in the third row of the grey relational coefficient matrix, sum them, and divide by the total number of elements in the third row to generate the deformation average relational coefficient. Add the Li's average relational coefficient, the similarity average relational coefficient, and the deformation average relational coefficient to generate the total relational coefficient. Divide the Li's average relational coefficient by the total relational coefficient to generate the Li's index weight coefficient. The cosine similarity weight coefficient is generated by dividing the correlation coefficient by the sum of the correlation coefficients. The deformation weight coefficient is generated by dividing the deformation average correlation coefficient by the sum of the correlation coefficients. Each element in the non-rigid deformation feature vector is multiplied by the deformation average correlation coefficient, and all products are summed to generate a single value deformation feature value. The normalized Lee's index is multiplied by the Lee's index weight coefficient to obtain the Lee's weighted score. The normalized cosine similarity is multiplied by the cosine similarity weight coefficient to obtain the similarity weighted score. The deformation feature value is multiplied by the deformation weight coefficient to obtain the deformation weighted score. The Lee's weighted score, the similarity weighted score, and the deformation weighted score are added together to generate the comprehensive confidence score. S63. Set the preset safety threshold to a value of 0.75, extract the value from the comprehensive confidence score, and perform a comparison operation between the value of the comprehensive confidence score and the value of 0.75. When the judgment result is that the value of the comprehensive confidence score is greater than the value of 0.75, locate the video frame image at the time step corresponding to the comprehensive confidence score in the video frame sequence that has passed the initial screening, extract the video frame image as the real liveness image frame and output it.
[0039] In this embodiment, S7 specifically includes: S71. Extract facial region feature data from real live image frames to generate a facial feature vector containing 128 elements. Read the pre-entered user registration feature template containing 128 elements from the system's underlying identity database. Calculate the difference between each element in the facial feature vector and the element at the same position in the registration feature template. Arrange all the differences in their original positions to generate a difference vector with a dimension of 128. Read the global feature distribution covariance matrix with a dimension of 128 rows and 128 columns preset by the system. Calculate the inverse matrix of the global feature distribution covariance matrix using a matrix inversion algorithm to generate the inverse matrix of the global feature distribution covariance matrix with a dimension of 128 rows and 128 columns. S72. Multiply the inverse covariance matrix of the global feature distribution by the difference vector, perform weighted spatial projection calculation, extract the first row of 128 elements in the inverse covariance matrix of the global feature distribution, multiply these 128 elements by the corresponding 128 elements in the difference vector and sum them up to obtain the first dimension projection value. Similarly, extract the last row of 128 elements in the matrix, perform the same corresponding multiplication and sum them up to obtain the last dimension projection value, generate a weighted projection vector containing 128 elements, calculate the dot product of the weighted projection vector and the difference vector, multiply the 128 elements in the weighted projection vector by the corresponding 128 elements in the difference vector and sum all the products to obtain the Mahalanobis distance of a single value. S73. Set the upper limit of the extreme value normalization of Mahalanobis distance to 10.0. Calculate the difference between 10.0 and Mahalanobis distance as the preliminary similarity score. Determine if the preliminary similarity score is less than 0. If it is less than 0, replace the preliminary similarity score with 0. If it is greater than or equal to 0, keep the current preliminary similarity score unchanged. Generate a similarity score in the range of 0 to 1. Set the preset payment threshold to 0.85. Extract a single value from the similarity score and perform a comparison between the similarity score and 0.85. When the similarity score is greater than 0.85, call the system's token generation interface to generate a payment authorization token containing the current timestamp and user identity. Output the payment authorization token to complete the face recognition payment authentication.
[0040] Example 1: To verify the feasibility of this invention in the field of financial payment security, the method of this invention was applied to the intelligent facial recognition payment terminal system of a large state-owned commercial bank (hereinafter referred to as "Bank F"). In traditional facial recognition payment systems, a two-dimensional facial feature comparison method based on visible light images is typically used. This method is difficult to defend against secondary imaging attacks using high-definition screens or printed photos, and lacks proactive physical anti-counterfeiting measures on the terminal side, easily leading to the risk of fund theft. To solve the above problems, Bank F decided to adopt the AI vision-based facial recognition payment authentication method proposed in this invention.
[0041] During implementation, Bank F first used binocular cameras deployed on smart payment terminals to acquire RGB visible light image streams and depth image streams of the user's face. After face detection, key point localization, and geometric correction, a normalized face region dataset was constructed. Simultaneously, Bank F's security expert team labeled the collected data with attack samples and calibrated the Lee's index threshold, serving as a benchmark for model training and security verification.
[0042] Bank F employs an improved TimeSformer model incorporating Lipzig exponent constraints. First, it performs multi-level discrete wavelet decomposition on the normalized face region, calculating the vector sum of horizontal and vertical gradients to obtain the magnitude. The mean magnitude of local maxima is extracted and log-linear regression analysis is performed to accurately calculate the Lipzig exponent, reflecting edge attenuation characteristics. Next, the model constructs a graph Laplacian matrix based on pixel neighborhood connectivity, using eigenvalue decomposition and linear mapping to generate a spectral brightness control vector. This vector value is then linearly converted into pixel driving voltages and applied to the terminal display screen, exciting pixels to emit light of varying intensities to construct an active light field. In the core validation phase, the improved TimeSformer model uses the Lipzig exponent as a singularity constraint weight for the spatiotemporal attention mechanism, dynamically adjusting the fusion coefficients of features between video frames. Combined with feedback information from the active light field, the final output is the authentication result and attack determination label.
[0043] During implementation, the technical team at Bank F discovered that, compared to traditional two-dimensional facial recognition methods, the method of this invention significantly improves the security and anti-attack capabilities of the facial recognition payment system. Traditional methods cannot identify highly realistic secondary imaging attacks and lack proactive defense mechanisms at the physical layer. In contrast, the method of this invention, through precise quantization of the Lieschmann exponent and the construction of a Thula Platini light field, effectively achieves deep perception of attack textures and proactive anti-counterfeiting at the physical layer.
[0044] To further verify the actual performance of the method of the present invention, Bank F conducted a detailed comparative test between the method of the present invention and the traditional method. The specific performance data is shown in Table 1: Table 1. Performance Comparison of Face Recognition Payment Authentication Methods at Bank F
[0045] As shown in Table 1, the security performance of the facial recognition payment system has been comprehensively improved after applying the method of this invention. The recognition rate of secondary imaging attacks has increased from 75.2% with traditional methods to 99.1%, and the false rejection rate of liveness detection has decreased from 5.8% to 0.5%, significantly improving the system's defense capabilities and user access efficiency. The risk warning response time has been drastically shortened from 10 seconds to 0.8 seconds, significantly enhancing the system's timeliness. In addition, the average annual fraud loss has decreased from 500,000 yuan to 20,000 yuan, and the difficulty of cracking the light field anti-counterfeiting system has increased from level 2 to level 9, greatly increasing the cost of committing crimes for attackers. User payment experience satisfaction has also significantly improved, from 88.0% to 98.5%.
[0046] Through the method of this invention, Bank F has successfully achieved high-security identity verification in the face-scanning payment scenario, effectively defended against various secondary imaging attacks, ensured the safety of customer funds, significantly improved the intelligence and proactive defense level of the financial payment system, significantly reduced the pressure on the risk control system, enhanced users' trust in face-scanning payment, and provided strong technical support for the construction of smart finance.
[0047] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A facial recognition payment authentication method based on AI vision, characterized in that, Includes the following steps: S1. Responding to the payment instruction, calculate the eigenvector of the graph Laplacian matrix of the screen pixel array to generate the graph brightness control vector, modulate the screen brightness to construct an active light field, and simultaneously acquire the user's face video stream; S2. Detect and locate the user's face video stream and crop the face region, calculate the random walk probability to generate a saliency weight map, and perform illumination normalization to output a normalized face region. S3. Extract the high-frequency components of the normalized face region and estimate the Lipschitz index. Determine secondary imaging attacks based on Lipschitz regularity. If the attack passes, output the initial screening video frame. S4. By improving the TimeSformer model, the initial screened video frames are encoded to generate a spatiotemporal input tensor. The screen luminescence parameters are read, and the covariant tensor is guided by physical priors to be converted into a structured guiding kernel. A covariant attention weight matrix is constructed, and the spatiotemporal input tensor is processed to generate a spatial mask. Spatial mask filtering is used to output a clean spatiotemporal feature tensor, which is then mapped to generate predicted temporal features. The cosine similarity between the predicted temporal features and the target feature vector is calculated, and the liveness verification frame is output. S5. Extract the motion vector field of each local region of the continuous sequence of the liveness verification frames, calculate the transfer entropy of the motion signals between regions to construct a causal network graph, and extract the non-rigid deformation feature vector. S6. Calculate the weights of the Li's index, cosine similarity and gray relational coefficient of non-rigid deformation feature vector, and calculate the comprehensive confidence level by weighted fusion. If it is greater than the safety threshold, output the real live image frame. S7. Extract the facial feature vector of the real live image frame, calculate the Mahalanobis distance with the registered feature template based on the inverse matrix of the global feature distribution covariance matrix, normalize to obtain the similarity score, and generate a payment authorization token to complete the facial recognition payment identity verification if the similarity score is greater than the payment threshold.
2. The facial recognition payment authentication method based on AI vision according to claim 1, characterized in that, S1 specifically includes: S11. Scan the pixel distribution position of the terminal display screen, take each pixel as a node according to the pixel distribution position, connect the adjacent pixels in the node to generate an adjacency table; count the number of connections of the nodes in the adjacency table to construct a degree matrix, construct an adjacency matrix according to the adjacency table, and calculate the difference between the degree matrix and the adjacency matrix to obtain the graph Laplacian matrix. S12. Perform eigenvalue decomposition on the graph Laplacian matrix, extract the eigenvectors corresponding to the target eigenvalues, and map them to generate the spectral brightness control vector. S13. Modulate the brightness of the terminal display screen according to the brightness control vector of the spectrum to construct an active light field; S14. Under the illumination of the active light field, the user's face video stream is acquired synchronously.
3. The facial recognition payment authentication method based on AI vision according to claim 1, characterized in that, S2 specifically includes: S21. Perform face detection on the user's face video stream, locate the key points of the face and calculate the bounding box, and crop the original face region based on the bounding box. S22. Calculate the gray-level similarity between pixels in the original face region and neighboring pixels, normalize the gray-level similarity to construct a transition probability matrix, solve the feature vector of the transition probability matrix to obtain the steady-state distribution probability, and map the steady-state distribution probability to a saliency weight map. S23. Perform Gaussian filtering on the saliency weight map to obtain the illumination distribution component, calculate the reciprocal of the illumination distribution component as the normalization coefficient, perform a dot product operation between the normalization coefficient and the pixel value of the original face region, and output the normalized face region.
4. The facial recognition payment authentication method based on AI vision according to claim 1, characterized in that, S3 specifically includes: S31. Perform multi-level wavelet decomposition on the normalized face region, extract the high-frequency sub-band coefficients of each decomposition level, and determine the combination of the high-frequency sub-band coefficients as high-frequency components. S32. Traverse the coefficient matrix of the high-frequency component at each decomposition level, calculate the vector sum of the horizontal and vertical gradients of each pixel in the coefficient matrix to obtain the magnitude value, extract the magnitude values of the local maxima points in the magnitude values and calculate the mean value, use the mean value as the magnitude maxima of each decomposition level, perform natural logarithmic operation on the magnitude maxima to obtain the natural logarithm sequence, perform linear regression analysis with the decomposition level as the independent variable and the natural logarithm sequence as the dependent variable to obtain the fitted line, and calculate the slope of the fitted line to obtain the Li's index. S33. Determine whether the Lee index is within the preset Lee index threshold range. If so, determine that the secondary imaging attack detection has been passed and output the initial screening video frame.
5. The facial recognition payment authentication method based on AI vision according to claim 1, characterized in that, The improved TimeSformer model includes a spatiotemporal coding layer, a covariant tensor physics prior guidance layer, a spatiotemporal separation attention layer, a temporal prediction output layer, and a similarity determination layer. The spatiotemporal coding layer is used to segment the initial screening video frames into image block sequences, perform linear projection mapping on the image block sequences to generate image block embedding vectors, and superimpose position coding vectors and time coding vectors on the image block embedding vectors to generate a spatiotemporal input tensor. The covariant tensor physics prior guidance layer is used to read a preset sequence of screen luminous intensity control parameters, perform a discretization encoding operation on the sequence of screen luminous intensity control parameters to generate a screen brightness modulation timing code, construct a tensor space based on the screen brightness modulation timing code and perform a projection transformation to generate a covariant tensor field, perform tensor decomposition on the covariant tensor field to extract local geometric structure features, and perform tensor shrinking operation on the local geometric structure features to generate a structured guidance kernel; The spatiotemporal separation attention layer is used to construct a covariant attention weight matrix based on the structured guiding kernel, perform a dimension permutation operation on the spatiotemporal input tensor to separate the time dimension, and perform matrix multiplication with the covariant attention weight matrix to generate a spatiotemporal salient feature tensor. The covariant derivative is calculated on the spatiotemporal salient feature tensor to generate a feature rate of change vector. A rotation-invariant feature representation is generated based on the feature rate of change vector. The rotation-invariant feature representation is fused into the spatiotemporal salient feature tensor and a spatial dimension self-attention calculation is performed to generate a spatial mask. The spatial mask is used to perform weighted filtering on the spatiotemporal salient feature tensor to output a clean spatiotemporal feature tensor. The time-series prediction output layer is used to perform normalized statistical calculations and nonlinear fully connected mappings on the pure spatiotemporal feature tensor to generate an enhanced feature tensor, perform global average pooling operations on the enhanced feature tensor to generate a time-series feature vector, and perform linear projection transformation on the time-series feature vector to output predicted time-series features. The similarity determination layer is used to map the screen brightness modulation temporal encoding into a target feature vector, calculate the cosine similarity between the predicted temporal feature and the target feature vector to generate a similarity score; perform a numerical comparison operation between the similarity score and a preset similarity score threshold to generate a comparison result signal, and extract the liveness verification pass frame based on the comparison result signal.
6. The facial recognition payment authentication method based on AI vision according to claim 1, characterized in that, S5 specifically includes: S51. Perform pixel grayscale matching on the continuous sequence of the liveness verification frames, calculate the displacement vector of the pixel to generate an optical flow field, divide the optical flow field into grid regions according to spatial location, calculate the mean value of the displacement vector in each grid region as the motion vector, and arrange the motion vectors along the time axis to generate a motion vector time series. S52. Construct a joint probability distribution of each local region based on the motion vector time series, calculate the transition entropy values between regions based on conditional probability, and use the transition entropy values as the weights of the edges to connect the corresponding local regions to construct a causal network graph. S53. Calculate the node degree and path length of the causal network graph, and concatenate the node degree and path length to generate a non-rigid deformation feature vector.
7. The facial recognition payment authentication method based on AI vision according to claim 1, characterized in that, S6 specifically includes: S61. Normalize the Li's index, cosine similarity and non-rigid deformation feature vector, calculate the absolute difference between each index and the optimal reference sequence, and calculate the grey relational coefficient based on the absolute difference. S62. Calculate the weight coefficients of each index based on the gray relational coefficients, perform dimensionality reduction calculation on the non-rigid deformation feature vector to obtain deformation feature values, and perform weighted summation of the Li's index, cosine similarity and deformation feature values to generate a comprehensive confidence score. S63. Compare the overall confidence level with a preset security threshold. If it is greater than the preset security threshold, output a real live image frame.
8. The facial recognition payment authentication method based on AI vision according to claim 1, characterized in that, Specifically, S7 includes: S71. Extract the face feature vector of the real live image frame, calculate the difference vector between the face feature vector and the registered feature template, and obtain the inverse matrix of the global feature distribution covariance matrix; S72. The difference vector is weighted and projected using the inverse matrix of the global feature distribution covariance matrix to obtain the Mahalanobis distance; S73. Normalize the Mahalanobis distance to obtain a similarity score, compare the similarity score with a preset payment threshold, and if it is greater than the preset payment threshold, generate a payment authorization token to complete the face recognition payment identity verification.
Citation Information
Patent Citations
Method for driver face detection in videos
CA2910231A1
Model training method and device, facial expression recognition method and device and electronic equipment
CN121482840A