Face-scanning payment data transmission method and system
By combining face feature extraction, timestamp checking and device identification encryption, dynamic analysis of payment location data is solved, the security risks of the face-scanning payment system are achieved, the accuracy of identity verification and the order consistency of data transmission are achieved, and the security and user experience of the payment system are improved.
Patent Information
- Application Number
- CN202411906113.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing face-scan payment system has security risks and is susceptible to problems such as network delay, disordered transmission sequence and forgery of identity information, which makes the security and accuracy of payment requests not fully guaranteed.
By obtaining user facial image data, payment timestamp data, device identification data, etc., facial feature extraction and time verification are carried out, combined with device identification generation unique keys for encryption, and dynamically analyze the regional importance of the data packet based on payment location data, block transmission priority marking and decompression verification are carried out to ensure the order consistency and legality of data transmission.
It significantly improves the accuracy and robustness of identity verification, avoids identity forgery and data tampering, ensures the sequential consistency and legality of the data transmission process, and improves the security and user experience of the payment system.
Smart Images

Figure CN119831584B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a face-scanning payment data transmission method and system thereof. Background Art
[0002] With the rapid development of mobile payments, facial recognition payment, as a convenient and secure payment method, has gradually become a vital component of the modern payment landscape. Currently, facial recognition payment technology primarily relies on facial recognition algorithms for identity verification and ensures the security of payment information by transmitting encrypted data packets. However, existing facial recognition payment systems often present security risks and operational complexity. Traditional technologies often rely solely on static encryption methods and basic image processing algorithms, making them susceptible to network latency, out-of-order transmission, and identity forgery. These issues not only impact the payment experience but also hinder the security and accuracy of payment requests in highly concurrent or complex network environments. Existing solutions often rely on single authentication or data encryption methods, lacking comprehensive verification of multiple dimensions within payment scenarios, such as time, location, and transmission order. This, in some cases, makes it impossible to effectively detect and prevent security risks such as identity theft, transaction tampering, and replay attacks. Summary of the Invention
[0003] The purpose of the present invention is to provide a facial recognition payment data transmission method and system to improve the above problems. To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0004] In a first aspect, the present application provides a face-scanning payment data transmission method, comprising:
[0005] Obtaining payment data and scenario data, wherein the payment data includes user facial image data, payment request data, and device identification data, and the scenario data includes payment timestamp data, payment location data, and transaction action data;
[0006] Performing facial feature extraction processing based on the user facial image data, extracting the user facial features and verifying the time validity of the image data in combination with the payment timestamp data, to obtain user facial feature data that passes the time sequence verification;
[0007] Performing feature-association encryption processing based on the user facial feature data, the payment request data, and the device identification data, generating a unique device key using the device identification data to encrypt the user facial feature data, and binding the encrypted data with the payment request data to obtain a device-bound encrypted data packet;
[0008] Dynamically analyzing the regional importance of the device-bound encrypted data packet based on the payment location data, marking transmission priorities for data blocks of different importance and appending location-related metadata to obtain location-based segmented data packets;
[0009] Decompressing and verifying the action of the data packet based on the location-based block data, decompressing the data packet and verifying the integrity of the data block transmission sequence based on the transaction action data, decrypting the data block using the device key, and obtaining a reconstructed data set that passes the action verification;
[0010] Payment verification and feedback processing are performed based on the reorganized data set to obtain a final payment verification result.
[0011] In a second aspect, this application also provides a face-scanning payment data transmission system, including:
[0012] An acquisition module, configured to acquire payment data and scenario data, wherein the payment data includes user facial image data, payment request data, and device identification data, and the scenario data includes payment timestamp data, payment location data, and transaction action data;
[0013] An extraction module, configured to perform facial feature extraction processing based on the user facial image data, extract the user facial features, and verify the time validity of the image data in combination with the payment timestamp data to obtain user facial feature data that passes the time sequence verification;
[0014] an encryption module, configured to perform feature-association encryption processing based on the user facial feature data, the payment request data, and the device identification data, generate a unique device key using the device identification data to encrypt the user facial feature data, and bind the encrypted data with the payment request data to obtain a device-bound encrypted data packet;
[0015] a marking module that dynamically analyzes the regional importance of the device-bound encrypted data packet based on the payment location data, marks the transmission priority of data blocks of different importance and appends location-related metadata to obtain location-based segmented data packets;
[0016] a decompression module, configured to decompress and perform action verification processing on the position-based block data packet, decompress the data packet and verify the integrity of the data block transmission sequence based on the transaction action data, and decrypt the data block using the device key to obtain a reconstructed data set that passes the action verification;
[0017] The verification module is used to perform payment verification and feedback processing based on the reorganized data set to obtain a final payment verification result.
[0018] The beneficial effects of the present invention are:
[0019] By combining facial feature extraction with payment timestamp verification, the present invention significantly improves the accuracy and robustness of identity authentication, effectively avoiding identity forgery and data tampering problems; by utilizing payment location data, transmission priority tags and transmission sequence verification models, it ensures the sequential consistency and legitimacy of the data transmission process, thereby avoiding payment anomalies caused by network delays or transmission errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 This is a flow chart of the face-scanning payment data transmission method of the present invention;
[0022] Figure 2 This is a structural diagram of the face-scanning payment data transmission system in the present invention;
[0023] Figure 3 This is a structural diagram of the face-scanning payment data transmission device in the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0025] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are used only to distinguish the description and should not be understood as indicating or implying relative importance.
[0026] Example 1:
[0027] This embodiment provides a face-scanning payment data transmission method. Figure 1 , which includes steps S100 to S600.
[0028] Step S100: Acquire payment data and scenario data, where the payment data includes user facial image data, payment request data, and device identification data, and the scenario data includes payment timestamp data, payment location data, and transaction action data;
[0029] It should be noted that in the payment data section, user facial image data is collected in real time using high-precision camera equipment, often combined with liveness detection technology (such as detection based on infrared sensors or depth cameras) to prevent attackers from using photos or videos to deceive the payment system. Payment request data is directly derived from the user's payment behavior, such as order amount and payment method, and is transmitted through a unified payment interface protocol specification to ensure consistent interaction with the payment gateway. Device identification data uses the device's unique hardware identifier (such as IMEI, MAC address, or device fingerprint). The characteristic of this data is that it cannot be tampered with, thus providing a basis for subsequent device binding encryption.
[0030] In the scenario data section, the acquisition of payment timestamp data is not only used to record the transaction time, but also to verify the time validity of the data in subsequent steps to ensure the legitimacy of the payment behavior. The timestamp accuracy must be high, usually in milliseconds, to avoid data verification failures due to time errors. Payment location data is achieved through GPS modules or Wi-Fi hotspot positioning. Some payment systems also combine multi-source positioning technology (such as cellular network positioning) to improve positioning accuracy. Location data is crucial in the subsequent regional priority calculation, as it reflects the geographical restrictions of the payment scenario. Transaction action data is the dynamic capture of user interaction behaviors during the payment process, such as gesture confirmation, click operations, or device movement trajectories. This data can be collected through sensors (such as accelerometers or touch screens) to verify the consistency of payment operations and prevent unauthorized operations.
[0031] Step S200: Perform facial feature extraction based on the user's facial image data. By extracting the user's facial features and verifying the time validity of the image data in combination with the payment timestamp data, the user's facial feature data that passes the time sequence verification is obtained.
[0032] During facial feature extraction, the user's facial image data must first be preprocessed, including noise removal, illumination compensation, and face alignment, to ensure that feature extraction is unaffected by external environmental interference. Feature extraction utilizes a deep learning model (such as the ResNet or MobileNet architecture based on convolutional neural networks) to extract high-dimensional embedded features of key facial regions through multi-layer feature mapping. These features are standardized high-dimensional vectors with good discriminability and compactness, facilitating subsequent computations. The introduction of payment timestamps enables dynamic verification of the time dimension in this step. Timestamp verification in payment scenarios typically compares the deviation between the image data acquisition time and the payment request time. If the acquired image time exceeds a preset time window, the system marks it invalid and rejects the payment request. This mechanism effectively prevents security risks such as replay attacks, in which an attacker could exploit already acquired legitimate images to bypass facial recognition. The time validity verification technology utilizes an event-driven model, attaching a timestamp to each image and digitally signing it to prevent time data tampering. Combining facial feature extraction with timestamp verification not only enhances the real-time performance of feature extraction, but also ties payment behavior to time characteristics, solving the problem of traditional face-swiping payment that relies solely on static features and is easily deceived.
[0033] Step S300: Perform feature-association encryption processing based on the user's facial feature data, the payment request data, and the device identification data. Generate a unique device key using the device identification data to encrypt the user's facial feature data. The encrypted data is then bound to the payment request data to obtain a device-bound encrypted data packet.
[0034] As you can understand, the introduction of device identification data ensures that each encryption key generation is tied to the current device, ensuring dynamic and unique keys and significantly enhancing encryption security. Furthermore, binding encrypted user facial feature data to payment request data not only protects the user's biometric privacy but also ensures a strong correlation between payment behavior and user identity through a structured data format. The efficient use of symmetric encryption and the optimization of block encryption strategies also make the encryption process suitable for the performance requirements of real-time payment scenarios.
[0035] Step S400: Dynamically analyzing the regional importance of device-bound encrypted data packets based on payment location data, marking transmission priorities for data blocks of different importance and attaching location-related metadata to obtain location-based segmented data packets;
[0036] It should be noted that this step introduces payment location data to dynamically analyze the importance of data packets, and uses the regional priority matrix and distance decay model to accurately evaluate the transmission importance of different data blocks. Combined with the additional operation of location-related metadata, the data packet has regional dynamic characteristics and can adapt to the payment scenario requirements of different geographical locations. The priority marking strategy optimizes data transmission efficiency through resource allocation, while improving the security and reliability of payment data. Through the implementation of this step, the transmission of data packets has been significantly optimized, and high-priority data blocks (such as facial feature data) can be delivered first, thereby speeding up the response speed of payment verification. The additional metadata provides geographic location context support for subsequent verification and decompression processing, effectively preventing location fraud or cross-regional attacks.
[0037] Step S500: Decompress and verify the data packets based on the location blocks. By decompressing the data packets and verifying the integrity of the data block transmission sequence based on the transaction action data, the data blocks are decrypted using the device key to obtain a reconstructed data set that passes the action verification.
[0038] This step combines decompression and action verification, ensuring the transmission integrity of high-priority data through a block decoding strategy. A dynamic time warping algorithm adapts to slight shifts in the transaction action time series, enhancing the robustness of transmission sequence verification. Furthermore, block-by-block decryption with the device key ensures data security and uniqueness, preventing unauthorized interception or tampering during transmission. Decompression efficiently restores the original data blocks while preserving block and priority information, optimizing the data transmission structure. The action verification process effectively prevents tampering or loss of the data transmission sequence, ensuring data integrity.
[0039] Step S600: Perform payment verification and feedback processing based on the reorganized data set to obtain a final payment verification result.
[0040] This step establishes a three-dimensional, multi-dimensional payment verification system through high-dimensional vector matching of facial features, combined with multi-layer verification of payment scenario characteristics (such as time, location, and action). Methods such as location verification and time verification enhance the ability to detect forged data or cross-border payment behaviors. The introduction of scenario data such as time and location adds dynamism and flexibility to payment verification, demonstrating significant protection capabilities in complex scenarios (such as remote or mobile payments). The optimization of the payment feedback mechanism ensures that users can obtain clear reasons for failure and guidance in failure scenarios, improving the user experience.
[0041] Example 2:
[0042] The only difference between this embodiment and embodiment 1 is that step S200 includes steps S210 to S240.
[0043] Step S210: performing feature point detection processing on the user's facial image data, extracting key facial regions based on a multi-scale pyramid feature extraction method, and obtaining candidate facial feature region data;
[0044] During the feature point detection phase, the user's facial image data is first preprocessed, including grayscale conversion, illumination compensation, and noise removal, to improve detection robustness. A feature point detection algorithm (such as a deep learning-based keypoint detection network, such as HRNet or MTCNN) is then used to locate key points in the facial region. Key points include geometrically distinct features such as eyebrows, eyes, nose tips, and mouth corners. Accurately locating these points is crucial for subsequent facial region cropping and feature extraction. A multi-scale pyramid-based feature extraction method further optimizes the key facial region extraction process. The core concept of this multi-scale pyramid method is to process the original image at multiple resolutions using a pyramid structure to capture facial features at different levels. High-resolution layers are used to extract detailed facial features, such as wrinkles and pores, while low-resolution layers capture global structural features, such as facial contours and the relative positions of facial features. By scanning and fusing layers layer by layer, the system achieves a balance between spatial resolution and feature detail, ensuring that the extracted candidate facial regions are complete and discriminative. The extracted candidate facial feature region data is the basis for subsequent high-dimensional feature encoding. It is stored in the form of cropped images or feature point coordinates of the candidate region, and a confidence score is attached to filter areas that may be affected by occlusion or low-quality images.
[0045] Step S220: performing feature encoding processing on the candidate facial feature region data, generating a standardized facial feature vector through deep embedding representation, and obtaining preliminary facial feature vector data;
[0046] The feature encoding process takes candidate facial feature region data as input. The input data is first normalized to ensure it meets the pre-set requirements of the deep learning model. Subsequently, a pre-trained deep neural network (such as FaceNet, ArcFace, or ResNet-50) is used to extract high-dimensional embeddings of the feature regions. These networks extract local facial features through multiple layers of convolution and pooling operations and then map these features into a fixed-dimensional feature space using fully connected layers. The resulting embedding is a set of standardized high-dimensional vectors with a fixed dimension, which are then normalized so that the vectors lie on the unit sphere. This normalization ensures direct comparability of feature vectors from different images in the feature space. Through the deep embedding process, the model learns highly discriminative and robust feature representations from a large amount of training data (including facial images of varying age, gender, ethnicity, and environment). Specifically, these feature vectors preserve facial uniqueness (such as facial proportions and texture characteristics) while being highly resistant to interference factors such as illumination changes, perspective variations, and occlusion. The generated preliminary facial feature vector data is not only discriminative, but also retains a certain degree of compactness and versatility, which is convenient for subsequent storage and comparison.
[0047] Step S230: Perform time matching processing based on the preliminary facial feature vector data, filter valid image frames using the payment timestamp data, and obtain preliminary facial feature vector data with valid time matching;
[0048] Specifically, the above screening process can eliminate image frames with excessively long delays (due to transmission or processing delays) as well as historical feature vector data that could be used by attackers to replay attacks. To improve processing efficiency, the input feature vectors are sorted by timestamp, and a binary search method is used to quickly find feature data that matches the time window, thereby optimizing the screening speed. In addition to the hard screening of the time window, it can also be combined with frame time interval smoothing processing, and the feature vectors of multiple frames can be fused through weighted averaging to further improve the quality of the time-matching feature vectors.
[0049] Step S240: Perform noise verification based on the preliminary facial feature vector data that is valid for time matching, calculate the cosine similarity between the feature vector and the standard distribution based on the distribution of the preliminary feature vector in the feature space, eliminate abnormal features that exceed the set threshold, and obtain user facial feature data that passes the timing verification.
[0050] It should be noted that this step can accurately eliminate abnormal features that deviate greatly from the standard distribution through feature space verification based on cosine similarity, thereby improving the overall quality of facial feature data.
[0051] Example 3:
[0052] The only difference between this embodiment and embodiment 1 or 2 is that step S300 includes steps S310 to S340.
[0053] Step S310: Perform key generation processing based on the device identification data, and obtain a device key by performing dynamic key calculation using a preset random factor;
[0054] First, device identification data is considered an unalterable and unique fundamental input. Each device's identification data is fixed at the hardware level, providing device-level specificity for encryption. By leveraging device identification data, the payment system ensures that the generated keys are isolated across devices. Even if an attacker obtains the key for one device, they cannot apply it to other devices. Second, the introduction of a random factor is an important means of achieving key dynamics. The random factor is typically generated from dynamic data in the payment scenario, such as the payment timestamp, the current device operating parameters, or a randomly generated salt value. The random factor dynamically perturbs the static device identification data, ensuring that the key generated for each payment transaction is unique, even on the same device. This effectively prevents replay attacks and cracking based on static keys. During key generation, the device identification data and the random factor are combined using a specific calculation method. This process includes obfuscation and encryption to ensure that the generated key has high entropy, meaning that the key content is sufficiently random and difficult to predict. Preferably, the calculation method used is a hashing or cryptographically secure hybrid method, which fully leverages the uniqueness of the device identification data while ensuring that the key dynamically changes under the perturbation of the random factor.
[0055] Step S320: Encode and encrypt the user's facial feature data using the device key, and obtain encrypted user facial feature data by processing different regions of the feature data one by one;
[0056] In this step, the user's facial feature data is typically processed into high-dimensional feature vectors, which represent the core expression of the user's facial features. To ensure security, the feature vectors are first segmented, dividing the entire high-dimensional vector into multiple logical regions. Each region contains a set of dimensions or the values of specific feature points. This segmentation method aims to refine the encryption process, allowing the encryption strategy to be adjusted based on the importance of the segment, while also improving the protection strength of specific regions.
[0057] Step S330: Bind the encrypted user facial feature data with the payment request data, construct a JSON data structure, and serialize it to obtain a binding data packet;
[0058] It is understandable that JSON (JavaScript Object Notation) is a lightweight data exchange format whose readability and parsing efficiency are very suitable for the needs of efficient data transmission in payment scenarios. During the construction of the binding data package, the system will organize the encrypted user facial feature data and payment request data into a multi-layer nested JSON structure. After the JSON data structure is constructed, it is converted into a byte stream or string format through serialization operations to facilitate network transmission or storage. The serialization process encodes the nested data structure into a standard string representation while retaining its complete hierarchy and field information. Through the nested design of the JSON data structure, the encrypted user facial feature data and the payment request data are bound one-to-one, ensuring a strong correlation between user identity and payment behavior, and eliminating the risk of identity forgery.
[0059] Step S340: perform integrity verification based on the intermediate data packet and device identification data, generate a check value by using a hash algorithm and encapsulate it, verify the source authenticity and transmission integrity of the data packet in combination with the uniqueness of the device identification, and encapsulate it to obtain a device-bound encrypted data packet.
[0060] Hash values are unidirectional and collision-resistant. Even if any bit of data in an intermediate packet is tampered with, the resulting hash value will change significantly, enabling accurate detection of data tampering. Device identification data is added as an additional input, participating in the hash calculation along with the intermediate packet content. The resulting hash value not only reflects the integrity of the packet but is also tied to a specific device, ensuring that the packet can only be generated and verified on that specific device.
[0061] Furthermore, step S400 includes steps S410 to S440.
[0062] Step S410: Match the payment location data with a preset geographic priority matrix, and calculate the importance of different locations to the payment data to obtain regional weights;
[0063] Specifically, this step first analyzes the distance between the current payment location and the high-priority location, and uses distance decay to incorporate proximity into the weight calculation to ensure that payment locations close to high-priority areas obtain higher weights. At the same time, historical payment weights are combined to measure the activity of these areas in past transactions to further improve the accuracy of the calculation results. In addition, a risk scoring mechanism is introduced to dynamically adjust the final weight by analyzing the security level of the current payment location (such as fraud rate or abnormal transaction frequency), so that higher priority protection can be assigned to high-risk areas. The generation of regional weights not only reflects the importance of geographic location to payment behavior, but also integrates historical data and dynamic security, providing a strong basis for subsequent data priority marking and blocking strategies. The calculation formula for regional weights is:
[0064]
[0065] Where (x, y) represents the latitude and longitude coordinates of the current payment location; W region (x, y) represents the regional weight of the current payment location (x, y); k represents the location point number in the geographic priority matrix; m represents the total number of all known priority locations in the geographic priority matrix; R k represents the basic priority score of the k-th known position; d((x,y),(x k ,y k )) represents the difference between the current payment position (x, y) and the kth high priority position (x k ,y k )’s geographical distance; σ represents the hyperparameter that controls the distance decay rate; H k represents the historical payment weight of the kth high-priority position; l represents the index variable used for normalization calculation; p represents the total number of reference points involved in normalization; α represents the weight adjustment factor of the risk score; S(x,y) represents the risk score of the current payment position (x,y).
[0066] Step S420: Parse the device-bound encrypted data packet in blocks based on the regional weights, and obtain an importance score for each data block by quantitatively calculating the importance of each data block.
[0067] It should be noted that logical segmentation is primarily based on the characteristics of the payment scenario and the functional requirements of the data. Device-bound encrypted data packets typically include encrypted user facial feature data, payment request data, device metadata, and auxiliary information (such as timestamps and location metadata). The first step in segmentation is to identify the functional role of the data block in the payment process. For example, facial feature data is central to identity verification and determines the legitimacy of the payment, so it is assigned a higher priority. Payment request data directly reflects the specific content and amount of the transaction and is a key step in transaction verification, so it has a lower priority than facial data. Device metadata and auxiliary information primarily support payment integrity verification and traceability and are therefore assigned a lower priority in the process. Regional weighting dynamically adjusts data block priorities based on the impact of the payment location on data security and real-time performance. For example, in high-priority zones, the weight of core data blocks (such as facial feature data) will be increased, while low-priority zones may have lower protection requirements for device metadata. The segmentation logic not only reflects the role of data in the payment process but also dynamically adjusts weighting based on the payment scenario, prioritizing the transmission and processing of high-value data and ensuring a balance between security and efficiency. This block parsing and logical distribution mechanism greatly improves the face-scanning payment system's adaptability to scenario changes, while optimizing the resource allocation strategy for data transmission.
[0068] Step S430: performing transmission priority marking processing according to the importance scores, by sorting the data blocks from high to low according to the importance scores and assigning priority tags to obtain a set of data blocks with transmission priority tags;
[0069] Specifically, data blocks are first sorted in descending order by importance score, ensuring that the most critical data blocks (such as encrypted user facial feature data and payment request data) are placed first. This data directly determines the core steps of user identity verification and transaction validation. Next, priority tags are assigned to the sorted data blocks. The granularity of the tags can be divided into high priority, medium priority, and low priority based on system requirements, or a more refined multi-level priority tagging system can be used. The priority tag assignment logic is based not only on importance scores but also on the real-time requirements of the payment scenario. For example, in payment scenarios with heavy traffic, high-priority data blocks must be transmitted immediately to ensure payment response time, while low-priority data blocks can be processed later or transmitted in batches. The final set of priority-tagged data blocks forms an orderly transmission queue, ensuring that the most critical data is delivered first when network bandwidth is limited or the scenario is under high pressure. This priority tagging mechanism significantly improves response speed and security capabilities in complex scenarios through dynamic resource allocation and intelligent transmission strategies.
[0070] Step S440: embed payment location metadata and priority tags into each data block based on the data block set, and encapsulate them into a final data packet.
[0071] Understandably, the final data packet consists of multiple data blocks containing metadata and priority tags, arranged in order of priority within the packet, forming a multi-dimensional, structured transmission unit. This encapsulation ensures that the payment system prioritizes high-priority data in various network environments, optimizing resource utilization. Furthermore, by embedding payment location metadata, it strengthens the relevance and dynamism of payment scenarios, laying a secure and efficient foundation for data packet decomposition, decryption, and processing at the receiving end.
[0072] Example 4:
[0073] The only difference between this embodiment and any one of embodiments 1-3 is that step S500 includes steps S510 to S530.
[0074] Step S510: Decompress the data packets based on the position blocks, extract the position-related metadata and priority tags in the data packets, and use a block-by-block decoding algorithm to recover the compressed data block by block to obtain a decompressed data packet.
[0075] Specifically, the first step in the decompression process is to extract the location-related metadata and priority tag from the data packet. Location-related metadata includes the geographic coordinates of the payment location, regional weight information, and location information used for data organization, such as the offset position or block index of the data block within the compressed packet. The priority tag indicates the order in which the data blocks should be decompressed, enabling the prioritization of high-priority data blocks, ensuring that critical data (such as facial features and payment request data) can be quickly used for verification. This design is particularly important in complex payment scenarios, such as when network transmission conditions are poor, so only high-priority data blocks can be decompressed to meet immediacy requirements. Subsequently, the decompression process uses a block-by-block decoding algorithm to process the data packet. This algorithm uses each data block as the smallest unit and recovers the data based on the compression strategy and internal structure of the block. For example, if the front-end compression method uses a block-by-block compression method based on wavelet transform or entropy coding, the decompression process must reverse engineer the data block by block. During decoding, the priority tag guides sequential decompression while ensuring that the index information in the location metadata accurately points to the storage location of each data block within the compressed packet, thereby improving decompression efficiency and reducing computational overhead. After decompression is complete, a complete decompressed data packet is generated, whose internal structure is consistent with the original data packet before compression, but it is not decrypted. The decompression process design offers two major advantages: first, priority tags and block processing optimize resource utilization, enabling rapid access to important data even when transmission bandwidth or computing power is limited; second, location-associated metadata ensures the structural consistency and integrity of the decompressed data, preventing data loss or reassembly errors during the restoration process.
[0076] Step S520: Perform data block transmission sequence verification based on the decompressed data packet and transaction action data. By extracting time series information and comparing it with the priority tag and building a transmission sequence verification model, a verified decompressed data packet is obtained.
[0077] The transmission sequence verification model dynamically compares time series and priority tags to identify abnormal behavior during transmission, such as out-of-order, missing, or redundant data blocks. The verification model's logic includes checking each data block's timestamp to see if it complies with the transaction action data's time series range, whether the priority tag is consistent with the decompression process, and whether there are skipped or duplicated data blocks. For deviating data blocks, the model will mark them as warnings or errors based on the degree and importance of the deviation. For example, the loss of a high-priority data block will be considered a serious issue, while the misalignment of a low-priority block may be tolerated within a certain range. After verification, a verified decompressed data packet is generated, retaining only data blocks that meet the time series and priority requirements and reorganizing them into a complete, logically ordered set. This process eliminates abnormal data blocks, ensuring the consistency and integrity of the final data packet.
[0078] Step S530: Decrypt the decompressed data packets that have passed the verification, reorder the decrypted data blocks according to the priority order and the sequence information in the position-related metadata, and verify the data integrity using a check code to obtain a reconstructed data set.
[0079] During the decryption phase, each data block is decrypted individually using the previously generated device key. Each data block has different encryption characteristics, so decryption must be performed block by block to ensure accuracy. Device keys are dynamically generated and uniquely bound to a device, ensuring the security of the decryption operation and preventing external attackers from decrypting data blocks using tampered keys or unauthorized devices. Preferably, the decryption process utilizes an efficient and secure symmetric encryption algorithm (such as AES-256) to ensure efficient decryption in real-time payment scenarios. The decrypted data blocks are reordered according to their priority and sequence information contained in the location-based metadata. This process is crucial to ensuring that the decrypted data is restored to its pre-transmission logical order. Priority determines the priority of critical data blocks, ensuring that these critical data can be quickly incorporated into payment verification. Location-based metadata (such as the starting offset or original sequence number of the data block) is used to accurately restore the data block's position within the complete data structure. This reordering process reorganizes the scattered decrypted data blocks into a consistent, ordered reconstructed dataset. To ensure that data has not been tampered with or lost during the decryption and reordering process, a checksum is used to verify the integrity of each data block. Preferably, a checksum is generated using a hash algorithm when the data block is generated and appended to the data block during transmission. After decryption, the hash value of the data block is recalculated and compared with the original checksum. If the checksum succeeds, the data block is considered complete and authentic; if the checksum fails, the data block is marked as abnormal, triggering compensation mechanisms or error handling.
[0080] After decryption, reordering, and integrity verification, all verified data blocks are combined into a reconstructed dataset. This dataset is complete and ordered, containing encrypted user facial feature data, payment request data, and other related metadata, restoring the data structure before transmission. The reconstructed dataset provides reliable and structured input for subsequent payment verification steps.
[0081] Furthermore, step S520 includes steps S521 to S524.
[0082] Step S521: Perform model building processing based on the decompressed data packet, extract the data block sequence based on the priority label and embed the transmission offset value to obtain a transmission sequence model sorted by priority;
[0083] Specifically, during transmission, each data block may experience delays or offsets due to network conditions or other external factors. The transmission offset value is used to record the changes in the transmission time or position of these data blocks. For example, a data block may be transmitted first due to its high priority, but its actual arrival time may deviate slightly from the expected time. The transmission offset value is calculated by decompressing metadata (such as timestamps or packet offset indexes) from the data packet and embedded in the transmission sequence model to accurately reflect the actual transmission order of the data blocks. The constructed transmission sequence model describes the transmission order and timing characteristics of data blocks in a serialized form. The structure of the transmission sequence model generally includes the following key information: data block identifier, priority tag, transmission offset value, and sequence order. The data block identifier uniquely identifies the data block number or type; the priority tag indicates the importance and transmission priority of the data block; the transmission offset value reflects the degree of deviation between the actual transmission time or order of the data block and the expected time; and the sequence order sorts the data blocks according to priority and transmission offset value, forming a logical transmission order. The transmission sequence model not only improves the perception of data block transmission order but also provides solid support for real-time verification in complex payment scenarios.
[0084] Step S522: Perform model building processing based on the transaction action data. By analyzing the operation sequence and timestamp information in the transaction action data, a mapping model based on time series is constructed. The model structure is adjusted in combination with the time constraint parameters of the payment scenario to obtain a time series model.
[0085] The time series mapping model, centered around operation sequence and timestamps, organizes transaction data along a timeline. The model not only describes the relative time intervals between operations but also establishes correlations between operations through mapping logic. By mapping operation timestamps and sequence, the model dynamically reflects the logical process of payment transactions. Time constraints in payment scenarios, such as maximum allowable delays or total payment duration limits, are crucial for model optimization. These constraints dynamically adjust the structure of the time series model. For example, if an operation's timestamp falls outside a preset time range, the model flags the operation as an anomaly and reassesses the integrity of the time series. This adjustment allows the time series model to better meet the real-time requirements of payment scenarios. By analyzing timestamps and operation sequence, the time series model constructs a complete transaction trajectory, ensuring the sequential consistency of all key operations in the payment process and helping to prevent payment anomalies caused by incorrect sequencing or missed operations.
[0086] Step S523: performing matching processing based on the transmission sequence model and the time series model, calculating the matching scores of the two models using a dynamic sequence alignment algorithm, and obtaining a sequential verification model;
[0087] It should be noted that the transmission sequence model records the priority and transmission offset of each data block, while the time series model is based on the timestamp and order of user operations. Therefore, it is necessary to use a dynamic sequence alignment algorithm to calculate the matching score of each data block, evaluate their deviation from the expected timestamp, and dynamically adjust the matching accuracy according to the requirements of the payment scenario. If the deviation of the data block exceeds a certain range, it is marked as an anomaly to ensure that every link in the payment process proceeds smoothly according to the time requirements. In this way, not only can the integrity and sequential consistency of the payment data during transmission be ensured, but also the real-time and tamper-proof capabilities of the payment can be improved, ensuring the smoothness and security of the user experience. The formula for calculating the matching score is:
[0088]
[0089] Among them, MatchScore represents the final matching score; i represents the sequence number of the data block in the transmission model; j represents the sequence number of the time point in the time series model; W time,i represents the time importance weight of the i-th data block in the payment scenario; T (j) represents the jth time point in the time series model; O i Indicates the offset value of the i-th data block in the transmission model.
[0090] Step S524: Adjust and filter the order of the data blocks in the decompressed data packet according to the sequence verification model, verify the sequence consistency of each data block, remove abnormal data blocks and adjust the order to obtain a decompressed data packet that passes the verification.
[0091] It should be noted that in the face-scanning payment scenario, data blocks may be out of order due to network delays, transmission errors, or other factors. Therefore, it is necessary to ensure that the data can still be processed in the correct order after decompression. Specifically, the transmission order of each data block is first verified according to the sequence verification model to ensure that it matches the time series. If the order of some data blocks is found to be inconsistent with expectations, the order of the data blocks is adjusted according to the matching score and offset value to ensure that they are arranged in the correct logic. At the same time, abnormal data blocks in the decompressed data packet are also screened, and those data blocks that cannot match the transmission order are eliminated.
[0092] Furthermore, step S600 includes steps S610 to S630.
[0093] Step S610: Obtain a facial template library stored in the system, and perform facial feature matching processing on the user facial feature data in the recombined data set and the facial template library. The user facial matching result is obtained by calculating the similarity between the feature vector of the user facial feature data and the user facial template vector pre-stored in the template library;
[0094] In this step, the user's encrypted and decrypted facial feature data is first extracted from the reconstructed dataset. This feature data exists in the form of a high-dimensional vector, representing the unique information of the user's face. The pre-saved user face template is then retrieved from the stored face template library. These templates are collected and generated by the face recognition system when the user registers. Next, the similarity between the current user's facial feature vector and the template vector of the corresponding user in the template library is calculated, preferably using an algorithm such as cosine similarity or Euclidean distance. If the similarity between the two exceeds a set threshold, it indicates that the recognition is successful, the user's identity is verified, and the payment request can continue to be processed; conversely, if the similarity is below the threshold, the face match is considered to have failed, and the payment request is rejected.
[0095] Step S620: Perform consistency verification on the payment request data and payment scenario data in the reorganized data set. By matching the transaction content, time, and geographic information, verify whether the payment request was initiated within a valid time and area, and obtain a payment consistency verification result.
[0096] In this step, payment request data and related payment scenario data are first extracted from the reorganized dataset. The payment request data typically includes the transaction amount, merchant information, payment timestamp, etc., while the payment scenario data includes information such as the time and geographic location of the transaction. This information is matched, and the payment time is first verified to be within the legal time range preset by the system to ensure that the transaction is carried out within the permitted time. For example, the system may limit payments to only be made within a specific time period, and payment requests outside this time range will be considered abnormal. At the same time, the geographic location data in the payment request is compared with the actual geographic information in the payment scenario to verify whether the payment request is initiated within a legal geographic area. For example, if the payment request comes from a high-risk area or does not match the user's known location, the request will be marked as a suspicious transaction. Through such consistency verification of time and geographic information, potential fraud can be effectively identified and the security and compliance of the payment process can be ensured.
[0097] Step S630: Perform a comprehensive judgment based on the user face matching result and the payment consistency verification result to generate a final payment verification result.
[0098] This step combines the authentication and payment request scenario data to verify the authenticity of the payment in multiple dimensions, thereby effectively protecting the interests of users and improving the credibility of the payment process.
[0099] Example 5:
[0100] like Figure 2 As shown, this embodiment provides a face-scanning payment data transmission system for implementing the face-scanning payment data transmission method described in any one of Embodiments 1-4, the system comprising:
[0101] Acquisition module 901, for acquiring payment data and scenario data, wherein the payment data includes user facial image data, payment request data, and device identification data, and the scenario data includes payment timestamp data, payment location data, and transaction action data;
[0102] Extraction module 902 is used to perform facial feature extraction based on the user's facial image data. By extracting the user's facial features and verifying the time validity of the image data in combination with the payment timestamp data, the user's facial feature data that passes the time sequence verification is obtained;
[0103] Encryption module 903, configured to perform feature-association encryption processing based on the user's facial feature data, the payment request data, and the device identification data, generate a unique device key using the device identification data to encrypt the user's facial feature data, and bind the encrypted data to the payment request data to obtain a device-bound encrypted data packet;
[0104] The marking module 904 dynamically analyzes the regional importance of the device-bound encrypted data packets based on the payment location data, marks the transmission priority of data blocks of different importance, and adds location-related metadata to obtain location-based segmented data packets;
[0105] Decompression module 905 is used to decompress and perform action verification processing on the data packets segmented based on the location. By decompressing the data packets and verifying the integrity of the data block transmission sequence based on the transaction action data, the data blocks are decrypted using the device key to obtain a reconstructed data set that passes the action verification.
[0106] The verification module 906 is used to perform payment verification and feedback processing based on the reorganized data set to obtain the final payment verification result.
[0107] Example 3:
[0108] Corresponding to the above method embodiment, this embodiment also provides a face-scanning payment data transmission device. The face-scanning payment data transmission device described below and the face-scanning payment data transmission method described above can be referenced to each other.
[0109] Figure 3 FIG. 8 is a block diagram of a face-scanning payment data transmission device 800 according to an exemplary embodiment. Figure 3 As shown, the face-scanning payment data transmission device 800 may include: a processor 801, a memory 802. The face-scanning payment data transmission device 800 may also include one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.
[0110] In an exemplary embodiment, a face-scanning payment data transmission device 800 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned face-scanning payment data transmission method.
[0111] In another exemplary embodiment, a computer-readable storage medium including program instructions is further provided. When executed by a processor, the program instructions implement the steps of the aforementioned face-scanning payment data transmission method. For example, the computer-readable storage medium may be the aforementioned memory 802 including the program instructions. The program instructions may be executed by the processor 801 of a face-scanning payment data transmission device 800 to implement the aforementioned face-scanning payment data transmission method.
[0112] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.
Claims
1. A face-scanning payment data transmission method, characterized in that: include: Obtaining payment data and scenario data, wherein the payment data includes user facial image data, payment request data, and device identification data, and the scenario data includes payment timestamp data, payment location data, and transaction action data; Performing facial feature extraction processing based on the user facial image data, extracting the user facial features and verifying the time validity of the image data in combination with the payment timestamp data, to obtain user facial feature data that passes the time sequence verification; Performing feature-association encryption processing based on the user facial feature data, the payment request data, and the device identification data, generating a unique device key using the device identification data to encrypt the user facial feature data, and binding the encrypted data with the payment request data to obtain a device-bound encrypted data packet; Dynamically analyzing the regional importance of the device-bound encrypted data packet based on the payment location data, marking transmission priorities for data blocks of different importance and appending location-related metadata to obtain location-based segmented data packets; Decompressing and verifying the action of the data packet based on the location-based block data, decompressing the data packet and verifying the integrity of the data block transmission sequence based on the transaction action data, decrypting the data block using the device key, and obtaining a reconstructed data set that passes the action verification; Payment verification and feedback processing are performed based on the reorganized data set to obtain a final payment verification result.
2. The face-scanning payment data transmission method according to claim 1, characterized in that: Performing facial feature extraction processing based on the user facial image data, extracting the user facial features and verifying the time validity of the image data in combination with the payment timestamp data, to obtain user facial feature data that passes the time sequence verification, including: Performing feature point detection processing on the user's facial image data, extracting key facial regions based on a multi-scale pyramid feature extraction method, and obtaining candidate facial feature region data; Performing feature encoding processing on the candidate facial feature region data, generating a standardized facial feature vector through deep embedding representation, and obtaining preliminary facial feature vector data; Performing time matching processing based on the preliminary facial feature vector data, filtering valid image frames using the payment timestamp data, and obtaining preliminary facial feature vector data with valid time matching; Noise verification is performed on the preliminary facial feature vector data that is valid for time matching, and the cosine similarity between the feature vector and the standard distribution is calculated based on the distribution of the preliminary feature vector in the feature space. Abnormal features that exceed the set threshold are eliminated to obtain user facial feature data that passes the timing verification.
3. The face-scanning payment data transmission method according to claim 1, characterized in that: Performing feature-association encryption processing based on the user facial feature data, the payment request data, and the device identification data, generating a unique device key using the device identification data to encrypt the user facial feature data, and binding the encrypted data with the payment request data to obtain a device-bound encrypted data packet, including: Performing key generation processing based on the device identification data, and obtaining a device key by performing dynamic key calculation using a preset random factor; Using the device key to encode and encrypt the user facial feature data, and obtaining encrypted user facial feature data by processing different regions of the feature data one by one; Binding the encrypted user facial feature data to the payment request data, and obtaining a binding data packet by constructing and serializing a JSON data structure; Integrity verification is performed based on the intermediate data packet and device identification data. A check value is generated and encapsulated by using a hash algorithm. The source authenticity and transmission integrity of the data packet are verified and encapsulated in combination with the uniqueness of the device identification to obtain a device-bound encrypted data packet.
4. The face-scanning payment data transmission method according to claim 1, characterized in that: Dynamically analyzing the regional importance of the device-bound encrypted data packet based on the payment location data, marking transmission priorities for data blocks of different importance and appending location-related metadata, thereby obtaining location-based segmented data packets, including: Matching the payment location data with a preset geographic priority matrix, and calculating the importance of different locations to the payment data to obtain regional weights; Parsing the device-bound encrypted data packet in blocks based on the regional weight, and obtaining an importance score for each data block by quantitatively calculating the importance of each data block; Performing transmission priority marking processing according to the importance score, sorting the data blocks from high to low according to the importance score and assigning priority tags to obtain a set of data blocks with transmission priority tags; Based on the data block set, payment location metadata and priority tags are embedded in each data block, and the data are encapsulated into a final data packet.
5. The face-scanning payment data transmission method according to claim 4, characterized in that: The payment location data is matched with a preset geographic priority matrix, and the importance of different locations to the payment data is calculated to obtain regional weights, including: The calculation formula is: Where (x, y) represents the latitude and longitude coordinates of the current payment location; W region (x, y) represents the regional weight of the current payment location (x, y); k represents the location point number in the geographic priority matrix; m represents the total number of all known priority locations in the geographic priority matrix; R k represents the basic priority score of the k-th known position; d((x,y),(x k ,y k )) indicates the current payment position (x, y) and the kth high priority position (x k ,y k )’s geographical distance; σ represents the hyperparameter that controls the distance decay rate; H k represents the historical payment weight of the kth high-priority position; l represents the index variable used for normalization calculation; p represents the total number of reference points involved in normalization; α represents the weight adjustment factor of the risk score; S(x,y) represents the risk score of the current payment position (x,y).
6. The face-scanning payment data transmission method according to claim 1, characterized in that: Decompressing and verifying the action of the data packet based on the location block, decompressing the data packet and verifying the integrity of the data block transmission sequence based on the transaction action data, decrypting the data block using the device key, and obtaining a reconstructed data set that passes the action verification, including: Decompressing the data packets based on the position-based blocks, performing a decompression operation by extracting the position-related metadata and priority tags in the data packets, and recovering the compressed data block by block using a block-based decoding algorithm to obtain a decompressed data packet; Performing data block transmission sequence verification processing based on the decompressed data packet and the transaction action data, extracting time series information and comparing it with the priority tag and building a transmission sequence verification model to obtain a verified decompressed data packet; Decryption processing is performed on the decompressed data packets that have passed the verification, the decrypted data blocks are reordered according to the priority order and the sequence information in the position-related metadata, and the data integrity is verified using a check code to obtain a reconstructed data set.
7. The face-scanning payment data transmission method according to claim 6, characterized in that: Performing data block transmission sequence verification processing based on the decompressed data packet and the transaction action data, extracting time series information and comparing it with the priority tag and building a transmission sequence verification model to obtain a verified decompressed data packet, including: Performing model building processing according to the decompressed data packets, extracting a data block sequence based on the priority tag and embedding a transmission offset value to obtain a transmission sequence model sorted by priority; Model building and processing are performed based on transaction action data. By analyzing the operation sequence and timestamp information in the transaction action data, a mapping model based on time series is constructed. The model structure is adjusted based on the time constraint parameters of the payment scenario to obtain a time series model. Performing matching processing based on the transmission sequence model and the time series model, calculating the matching scores of the two models through a dynamic sequence alignment algorithm, and obtaining a sequential verification model; The sequence of the data blocks in the decompressed data packet is adjusted and screened according to the sequence verification model, and the sequence consistency of each data block is verified, abnormal data blocks are removed and the sequence is adjusted to obtain a decompressed data packet that passes the verification.
8. The face-scanning payment data transmission method according to claim 7, characterized in that: Matching is performed on the transmission sequence model and the time series model, and matching scores of the two models are calculated using a dynamic sequence alignment algorithm to obtain a sequential verification model, including: The calculation formula is: Among them, MatchScore represents the final matching score; i represents the sequence number of the data block in the transmission model; j represents the sequence number of the time point in the time series model; W time,i represents the time importance weight of the i-th data block in the payment scenario; T (j) represents the jth time point in the time series model; O i Indicates the offset value of the i-th data block in the transmission model.
9. The face-scanning payment data transmission method according to claim 1, characterized in that: Payment verification and feedback processing are performed based on the reorganized data set to obtain a final payment verification result, including: Obtaining a face template library stored in the system, and performing face feature matching processing on the user face feature data in the recombined data set and the face template library, and obtaining a user face matching result by calculating the similarity between the feature vector of the user face feature data and the user face template vector pre-stored in the template library; Performing consistency verification on the payment request data and payment scenario data in the reorganized data set, verifying whether the payment request was initiated within a legal time and area by matching the transaction content, time, and geographic information, and obtaining a payment consistency verification result; A comprehensive judgment is made based on the user face matching result and the payment consistency verification result to generate the final payment verification result.
10. A face-scanning payment data transmission system, characterized in that: include: An acquisition module, configured to acquire payment data and scenario data, wherein the payment data includes user facial image data, payment request data, and device identification data, and the scenario data includes payment timestamp data, payment location data, and transaction action data; An extraction module, configured to perform facial feature extraction processing based on the user facial image data, extract the user facial features, and verify the time validity of the image data in combination with the payment timestamp data to obtain user facial feature data that passes the time sequence verification; an encryption module, configured to perform feature-association encryption processing based on the user facial feature data, the payment request data, and the device identification data, generate a unique device key using the device identification data to encrypt the user facial feature data, and bind the encrypted data with the payment request data to obtain a device-bound encrypted data packet; a marking module that dynamically analyzes the regional importance of the device-bound encrypted data packet based on the payment location data, marks the transmission priority of data blocks of different importance and appends location-related metadata to obtain location-based segmented data packets; a decompression module, configured to decompress and perform action verification processing on the position-based block data packet, decompress the data packet and verify the integrity of the data block transmission sequence based on the transaction action data, and decrypt the data block using the device key to obtain a reconstructed data set that passes the action verification; The verification module is used to perform payment verification and feedback processing based on the reorganized data set to obtain a final payment verification result.
Citation Information
Patent Citations
Data transmission method and device, electronic equipment and storage medium
CN114205142A
Extended display device of face payment device and face payment system
CN114694326A