Terminal transaction processing method, device, program product and electronic device
Patent Information
- Application Number
- CN202610881908.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-10-27
AI Technical Summary
[0006]本发明实施例提供了一种终端交易的处理方法及其装置、程序产品、电子设备,以至少解决相关技术中对终端交易进行验证的时效性较低的技术问题
[0021]根据本发明实施例的另一方面,还提供了一种计算机程序产品,包括非易失性计算机可读存储介质,非易失性计算机可读存储介质存储计算机程序,计算机程序被处理器执行时实现上述任意一项终端交易的处理方法。
Smart Images

Figure CN122989108A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of financial technology, and more specifically, to a terminal transaction processing method and apparatus, program product, and electronic device. Background Technology
[0002] With the development of financial technology, bank cards have become an indispensable payment tool in people's daily lives. In bank card business, the card issuing system typically records the user's basic identity information when issuing a card and writes this information into a magnetic stripe or chip. When conducting offline transactions at a POS (Point of Sale) machine, payment verification is performed by reading the information on the magnetic stripe or chip in the card.
[0003] In related technologies, bank card security verification mechanisms mainly rely on methods such as password verification, CVV2 (Card Verification Value 2) / CVC2 (Card Verification Code 2) verification, SMS verification code verification, and transaction amount limits. For example, static location verification is used, which records the user's frequently used location coordinates when the card is issued, and compares the distance between the GPS (Global Positioning System) location obtained by the POS machine and the preset coordinates during a transaction to see if it is within a threshold; two-factor authentication is used, which requires the user to enter an SMS verification code when a magnetic stripe transaction is triggered, and the transaction can only be completed after the verification is successful.
[0004] However, the aforementioned solutions lack an effective geolocation verification mechanism, making it difficult to accurately determine whether a transaction occurred in a user's frequently used area. This results in difficulty in timely identifying abnormal transaction behavior when cards are lost, stolen, or cloned for fraudulent use in other locations. Secondly, current anti-fraud mechanisms heavily rely on user intervention. For example, SMS verification codes require users to respond within a limited time, which not only introduces response delays but also means that users may be unable to cooperate promptly due to objective reasons in emergency situations, leading to transaction interruptions or security risks. Thirdly, there is a lack of real-time automatic identification capabilities for high-risk transactions. Dynamic risk assessment based on multi-dimensional data (such as location, time, and behavioral patterns) cannot be performed at the moment a transaction occurs, often only allowing for retrospective tracking, resulting in significant delays. Finally, sensitive data such as user location information in these technologies is often stored or transmitted in plaintext or insufficiently encrypted form, lacking robust data encryption and integrity verification mechanisms, posing a high risk of data leakage and tampering.
[0005] There is currently no effective solution to the above problems. Summary of the Invention
[0006] This invention provides a method, apparatus, program product, and electronic device for processing terminal transactions, in order to at least solve the technical problem of low timeliness in verifying terminal transactions in related technologies.
[0007] According to one aspect of the present invention, a terminal transaction processing method is provided, applied to a terminal transaction processing system, the terminal transaction processing system including at least: a sales terminal and a verification server, the processing method including: when detecting that a user uses a bank card to conduct a terminal transaction through the sales terminal, determining the network status of the sales terminal, wherein the bank card has pre-recorded bank card information; when the network status is offline, reading the bank card information through the sales terminal and processing the bank card information using the sales terminal to obtain fixed geofence data; verifying the terminal transaction using the sales terminal based on the current location information and the fixed geofence data, and completing the terminal transaction if the terminal transaction verification is successful; when the network status is online, generating a transaction request through the sales terminal based on the bank card information and sending the transaction request to the verification server; verifying the terminal transaction using the verification server based on the current location information and trusted location information stored in the verification server, and completing the terminal transaction if the terminal transaction verification is successful.
[0008] Furthermore, the terminal transaction processing system also includes: a card issuance system, which, before determining the network status of the sales terminal when detecting that a user is using a bank card to conduct a terminal transaction through the sales terminal, further includes: when detecting that a user is applying for a bank card through a client, identifying the user's identity, and if the identity identification is successful, initiating a geolocation input request to the client through the card issuance system, wherein the client is used to display the geolocation input request on the front-end interface and receive at least one geolocation entered by the user; converting the geolocation into fixed geofence data, and entering the fixed geofence data as bank card information into the bank card through the card issuance system.
[0009] Furthermore, the terminal transaction processing system also includes: a data processing server, which, after inputting fixed geofence data as bank card information into the bank card through the card issuance system, further includes: using the data processing server to obtain the user's historical behavior data; using the data processing server to call a federated learning model and using the federated learning model to process the historical behavior data to obtain dynamic geographic location; converting the dynamic geographic location into dynamic geofence data, and generating trusted location information based on the fixed geofence data and the dynamic geofence data, and storing the trusted location information in the data processing server.
[0010] Furthermore, the steps for converting dynamic geographic locations into dynamic geofence data include: converting the dynamic geographic location into latitude and longitude to obtain longitude and latitude; determining the geofence radius corresponding to the dynamic geographic location; converting the longitude, latitude, and geofence radius into preset format data; encrypting the preset format data to obtain encrypted information and encrypted preset format data; and generating dynamic geofence data based on the encrypted information and encrypted preset format data.
[0011] Further, the step of encrypting the preset format data to obtain encrypted information and the encrypted preset format data includes: generating a verification code based on the preset format data; using a preset key to encrypt the preset format data based on a preset vector to obtain the encrypted preset format data; signing the encrypted preset format data using the preset key to obtain a digital signature; and representing the verification code and digital signature as encrypted information.
[0012] Furthermore, based on the current location information and the trusted location information stored in the verification server, the steps for verifying terminal transactions using the verification server include: parsing the trusted location information to obtain dynamic geofence data; using a preset public key to verify the data signature in the dynamic geofence data; if the signature verification of the data signature is successful, using the preset public key and a preset vector to decrypt the encrypted preset format data in the dynamic geofence data to obtain preset format data; verifying the integrity of the preset format data based on the checksum in the dynamic geofence data; if the integrity verification of the preset format data is successful, extracting the location information from the preset format data to obtain trusted fence information, wherein the trusted fence information includes at least: longitude, latitude, and geofence radius; and verifying the terminal transaction based on the current location information and all trusted fence information.
[0013] Furthermore, the step of verifying terminal transactions based on current location information and all trusted fence information includes: comparing the current location information with each trusted fence information to obtain a comparison result; determining that the terminal transaction verification is successful if the comparison result indicates that the current location point corresponding to the current location information is within the preset area corresponding to any trusted fence information; and intercepting the terminal transaction if the comparison result indicates that the current location point corresponding to the current location information is not within the preset area corresponding to any trusted fence information.
[0014] According to another aspect of the present invention, a terminal transaction processing apparatus is also provided, applied to a terminal transaction processing system. The terminal transaction processing system includes at least: a sales terminal and a verification server. The processing apparatus includes: a judgment unit, used to determine the network status of the sales terminal when a user is detected using a bank card to conduct a terminal transaction through the sales terminal, wherein the bank card has pre-recorded bank card information; a processing unit, used to read the bank card information through the sales terminal and process the bank card information using the sales terminal to obtain fixed geofence data when the network status is offline; a first verification unit, used to verify the terminal transaction using the sales terminal based on the current location information and the fixed geofence data, and complete the terminal transaction if the terminal transaction verification is successful; a generation unit, used to generate a transaction request through the sales terminal based on the bank card information when the network status is online, and send the transaction request to the verification server; and a second verification unit, used to verify the terminal transaction using the verification server based on the current location information and trusted location information stored in the verification server, and complete the terminal transaction if the terminal transaction verification is successful.
[0015] Furthermore, the terminal transaction processing system also includes a card issuance system. The processing device is further configured to: before determining the network status of the sales terminal when detecting that a user is using a bank card to conduct a terminal transaction through the sales terminal, and before detecting that a user is applying for a bank card through a client, identify the user's identity, and if the identity identification is successful, initiate a geolocation input request to the client through the card issuance system. The client is configured to display the geolocation input request on the front-end interface and receive at least one geolocation entered by the user; convert the geolocation into fixed geofence data, and input the fixed geofence data as bank card information into the bank card through the card issuance system.
[0016] Furthermore, the terminal transaction processing system also includes a data processing server. The processing device is also used to: after the fixed geofence data is entered into the bank card as bank card information through the card issuance system, use the data processing server to obtain the user's historical behavior data; use the data processing server to call the federated learning model and use the federated learning model to process the historical behavior data to obtain the dynamic geographic location; convert the dynamic geographic location into dynamic geofence data, and generate reliable location information based on the fixed geofence data and the dynamic geofence data, and store the reliable location information in the data processing server.
[0017] Furthermore, the processing device is also used to: convert the dynamic geographic location to latitude and longitude to obtain longitude and latitude; determine the geofence radius corresponding to the dynamic geographic location; convert the longitude, latitude, and geofence radius to a preset format to obtain preset format data; encrypt the preset format data to obtain encrypted information and encrypted preset format data; and generate dynamic geofence data based on the encrypted information and encrypted preset format data.
[0018] Furthermore, the processing device is also used to: generate a verification code based on preset format data; obtain encrypted preset format data by using a preset key to encrypt the preset format data based on a preset vector; sign the encrypted preset format data using a preset key to obtain a digital signature; and represent the verification code and digital signature as encrypted information.
[0019] Furthermore, the second verification unit is also used to: parse the trusted location information to obtain dynamic geofence data; verify the data signature in the dynamic geofence data using a preset public key; if the signature verification of the data signature is successful, decrypt the encrypted preset format data in the dynamic geofence data using the preset public key and a preset vector to obtain preset format data; verify the integrity of the preset format data based on the checksum in the dynamic geofence data; if the integrity verification of the preset format data is successful, extract the location information in the preset format data to obtain trusted fence information, wherein the trusted fence information includes at least: longitude, latitude, and geofence radius; and verify the terminal transaction based on the current location information and all trusted fence information.
[0020] Furthermore, the second verification unit is also used to: compare the current location information with each trusted fence information to obtain a comparison result; if the comparison result indicates that the current location point corresponding to the current location information is within the preset area corresponding to any trusted fence information, determine that the terminal transaction verification is successful; if the comparison result indicates that the current location point corresponding to the current location information is not within the preset area corresponding to any trusted fence information, intercept the terminal transaction.
[0021] According to another aspect of the present invention, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements any of the above-described terminal transaction processing methods.
[0022] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement any of the above-described terminal transaction processing methods.
[0023] In this invention, when a user is detected using a bank card to conduct a terminal transaction through a point-of-sale terminal, the network status of the point-of-sale terminal is determined. If the network status is offline, the bank card information is read through the point-of-sale terminal, and the bank card information is processed by the point-of-sale terminal to obtain fixed geofence data. Based on the current location information and the fixed geofence data, the point-of-sale terminal verifies the terminal transaction, and if the terminal transaction verification is successful, the terminal transaction is completed. If the network status is online, the point-of-sale terminal generates a transaction request based on the bank card information and sends the transaction request to a verification server. Based on the current location information and the trusted location information stored in the verification server, the verification server verifies the terminal transaction, and if the terminal transaction verification is successful, the terminal transaction is completed. This solves the technical problem of low timeliness in terminal transaction verification in related technologies.
[0024] This invention employs a dual-modal collaborative verification approach, combining online and offline methods. It reads pre-stored fixed geofence data from the bank card at the sales terminal and performs local comparison based on the current location. Simultaneously, it sends a transaction request to the verification server while connected to the internet and performs cloud-based comparison using trusted location information stored on the server. This differentiated approach achieves real-time geolocation security verification regardless of network conditions, resulting in high availability, low latency response, and data privacy protection for POS transactions. Furthermore, it addresses the technical problems of lacking real-time geolocation verification in scenarios involving lost cards or unauthorized transactions, response delays due to reliance on user actions, and the inability of static location verification to adapt to dynamic changes in user location, which poses a risk of data leakage. Attached Figure Description
[0025] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0026] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a processing method for terminal transactions is shown.
[0027] Figure 2 This is a flowchart of a terminal transaction processing method according to Embodiment 1 of the present invention;
[0028] Figure 3 This is a schematic diagram of an optional terminal transaction processing system according to an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram of an optional terminal transaction processing device according to an embodiment of the present invention;
[0030] Figure 5 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] To facilitate understanding of the present invention by those skilled in the art, some terms or nouns involved in the various embodiments of the present invention are explained below:
[0034] Card organization root public key: A public key paired with the card organization root key, used to decrypt encrypted data.
[0035] Card organization root key: An encryption key managed uniformly by the bank card organization and used to encrypt bank card data.
[0036] POS machine: Point of Sale, a device used for offline card payment.
[0037] Bank cards: Payment tools used for financial transactions, including magnetic stripe cards, chip cards, etc.
[0038] It should be noted that all related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) collected and involved in this invention are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with the relevant laws, regulations, and standards of the relevant regions, and necessary measures have been taken to ensure compliance with public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse. For example, this system has an interface with relevant users or organizations. Before obtaining relevant information, a request to obtain the information needs to be sent to the aforementioned user or organization through the interface. After receiving consent from the aforementioned user or organization, the relevant information is obtained. If the user chooses to refuse, the process proceeds to an expert decision-making process.
[0039] This invention provides a POS transaction anti-fraud method based on geolocation verification. By embedding encrypted frequently used location information into the bank card and combining it with dynamic and reliable location information when the POS machine is connected to the network, transaction verification is performed, thereby achieving automatic identification and early warning of high-risk fraudulent activities and improving the security and intelligence level of bank card transactions.
[0040] The present invention will now be described in detail with reference to various embodiments.
[0041] Example 1
[0042] According to an embodiment of this application, an embodiment of a terminal transaction processing method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0043] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a terminal transaction processing method is shown. Figure 1 As shown, computer terminal 10 (or mobile device) may include one or more ( Figure 1The processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions may also be included. In addition, it may include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera, wherein the network interface can be connected to wired and / or wireless networks. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0044] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0045] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the terminal transaction processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned terminal transaction processing method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0046] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0047] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0048] Under the aforementioned operating environment, this application provides the following: Figure 2 The terminal transaction processing method is shown. Figure 2 This is a flowchart of a terminal transaction processing method according to Embodiment 1 of the present invention, as shown below. Figure 2 As shown, the method includes the following steps:
[0049] Step S201: When it is detected that a user is using a bank card to conduct a terminal transaction through the sales terminal, the network status of the sales terminal is determined, wherein the bank card has pre-entered bank card information.
[0050] In this embodiment of the invention, it can be applied to a terminal transaction processing system, which includes a sales terminal, a verification server, a card issuing system, and a data processing server. It supports the input of information such as user's frequently used location fences. The card issuing system encrypts the data and writes it to the transaction card medium. At the same time, dynamic geolocation verification is added to the verification server (online) and POS terminal (offline) to achieve more refined risk control rules and reduce the occurrence of bank card fraud.
[0051] When a user conducts a transaction using a point-of-sale (POS) terminal, the POS terminal reads the physical information (bank card information, including pre-recorded user location information) from the bank card medium using a magnetic stripe reader or chip reader. At the initial stage of the transaction, the POS terminal automatically checks the connectivity of its connection to the backend network (such as the bank's core system or verification server). For example, the POS terminal attempts to send a heartbeat packet or establish a TCP (Transmission Control Protocol) connection to the verification server. If the connection times out or fails, it is considered offline; if the connection is successful, it is considered online.
[0052] Here, the point of sale terminal refers to the device used for offline card payment, which is the front-end entry point for the transaction; network status refers to the connectivity of the data link between the terminal and the verification server.
[0053] Step S202: When the network connection is offline, the bank card information is read through the sales terminal, and the bank card information is processed by the sales terminal to obtain fixed geofence data.
[0054] In this embodiment of the invention, when offline status is detected, the sales terminal directly reads the encrypted data block stored in the bank card chip or magnetic stripe. This data block is pre-written by the card issuing system and contains binary data such as the latitude and longitude coordinates of the user's frequently used location, the geofence radius, and a digital signature. The sales terminal uses a pre-set card organization root public key to perform signature verification and decryption on the data, extracting the unencrypted latitude and longitude coordinates and radius parameters to obtain fixed geofence data. For example, after decryption, it obtains an area with a radius of 5 kilometers where the user's frequently used location is a business district in Beijing.
[0055] Here, bank card information refers to encrypted geofence data pre-written into the card medium; fixed geofence data refers to spatial range data (such as latitude and longitude plus radius) extracted from the bank card that represents the user's historically frequently used areas.
[0056] Step S203: Based on the current location information and fixed geofence data, the terminal transaction is verified using the sales terminal, and the terminal transaction is completed if the terminal transaction verification is successful.
[0057] In this embodiment of the invention, the sales terminal activates its built-in GPS module, Wi-Fi (wireless) positioning module, or base station positioning module to obtain the current real-time geographic coordinates (i.e., current location information). Then, the sales terminal runs a distance calculation algorithm (such as the Haversine formula) to calculate the distance between the current location information and the center point of the area covered by the fixed geofence data. If this distance is less than or equal to the fence radius, the transaction location is deemed valid, verification is passed, the POS machine deducts the payment, and prints a transaction receipt; if the distance exceeds the range, the transaction is intercepted.
[0058] Step S204: When the network connection is online, a transaction request is generated based on the bank card information through the sales terminal, and the transaction request is sent to the verification server.
[0059] In this embodiment of the invention, when online status is detected, the sales terminal packages the bank card information it has read, including the bank card number, expiration date, CVV2 code, and encrypted geofence data. Simultaneously, the sales terminal obtains its current location information and combines this data into a standard transaction message (transaction request). This request is transmitted to the backend verification server via the internet or a dedicated financial network. For example, the POS machine generates an XML (Extensible Markup Language) format request containing the card number, current GPS coordinates, and transaction amount and sends it to the server.
[0060] Here, a transaction request refers to a structured data packet containing bank card information, transaction amount, and terminal location information.
[0061] Step S205: Based on the current location information and the trusted location information stored in the verification server, the verification server verifies the terminal transaction, and completes the terminal transaction if the terminal transaction is verified successfully.
[0062] In this embodiment of the invention, after receiving a transaction request, the verification server parses the current location information. Simultaneously, the server queries the database for the trusted location information corresponding to the bank card. This information can be dynamically updated based on the user's historical behavior using a federated learning model. Then, the server calculates the distance or spatial overlap between the current location information and each trusted location in the trusted location information. If the locations match (e.g., the distance is less than a threshold), the server generates a verification pass instruction and returns it to the sales terminal, which completes the transaction; if they do not match, the transaction is rejected and an alert is triggered.
[0063] In summary, by employing a dual-modal online and offline collaborative verification approach, the system achieves real-time geolocation security verification regardless of network conditions. This is achieved by using the point-of-sale terminal to read pre-stored fixed geofence data from the bank card and perform local comparison based on the current location, and by sending a transaction request to the verification server while connected to the internet and performing cloud comparison using trusted location information stored on the server. This results in high availability, low latency response, and data privacy protection for POS transaction anti-fraud. Furthermore, it solves the technical problems of lacking real-time geolocation verification in scenarios involving lost cards or fraudulent transactions in other locations, relying on user-initiated actions leading to response delays, and static location verification being unable to adapt to dynamic changes in user location and posing a risk of data leakage.
[0064] Optionally, the terminal transaction processing system further includes a card issuance system. To accurately input fixed geofence data into the bank card, in the terminal transaction processing method provided in Embodiment 1 of this application, before determining the network status of the sales terminal when detecting a user using a bank card for a terminal transaction through the sales terminal, the system identifies the user's identity when detecting a user applying for a bank card through a client. If the identity verification is successful, the system initiates a geolocation input request to the client through the card issuance system. The client displays the geolocation input request on the front-end interface and receives at least one geolocation input by the user. The geolocation is converted into fixed geofence data, and the fixed geofence data is input into the bank card as bank card information through the card issuance system.
[0065] In this embodiment of the invention, the card issuance system can be used to provide user information entry and bank card information writing services, including: using counter-to-customer terminals to perform identity recognition, identity verification, and other means to verify the legitimacy of the bank card and the user; providing a customer-facing page through the counter-to-customer terminal for entering the customer's frequently used geographical location, and automatically converting it into digital coordinate geofence data based on the selected geographical location.
[0066] Specifically, when a user initiates a new card application using a bank counter terminal or mobile application (i.e., client), the system first calls the built-in high-definition camera and ID card reader module to collect the user's identity information, and then calls the backend identity authentication interface to perform a verification of the identity document. Only when the verification result confirms that the user is legitimate will the card issuing system send an instruction containing a geographic information input interface to the front-end client, triggering the subsequent data collection process.
[0067] Upon receiving the request, the client renders a map selection control or text input box on the front-end interface, guiding the user to select or enter their frequently used activity areas (such as home address, company location, etc.). After the user completes the selection by clicking on map coordinates or entering address text, the client packages this data and uploads it to the card issuing system via an encrypted channel for further processing.
[0068] After receiving the geolocation data uploaded by the client, the card issuing system calls the data processing module to convert it into standard latitude and longitude coordinates and fence radius parameters, and encapsulates it according to a preset binary format. Then, the system uses the card organization's root key to encrypt the data and attach a digital signature. Finally, the encrypted geofence data is written into the chip or magnetic stripe storage area of the bank card, completing the data solidification.
[0069] In this embodiment, through standardized identity verification, multi-source location acquisition and encrypted writing processes, the accurate entry and secure storage of commonly used location data of bank cards are achieved. This not only ensures the authenticity and integrity of geofence data, but also prevents the leakage of sensitive location information through encryption, laying a solid data foundation for accurate geolocation verification in subsequent online or offline modes.
[0070] Optionally, the terminal transaction processing system further includes a data processing server. To improve the accuracy of generating reliable location information, in the terminal transaction processing method provided in Embodiment 1 of this application, after the fixed geofence data is entered into the bank card as bank card information through the card issuing system, the data processing server is used to obtain the user's historical behavior data; the data processing server calls the federated learning model and processes the historical behavior data to obtain the dynamic geographic location; the dynamic geographic location is converted into dynamic geofence data, and reliable location information is generated based on the fixed geofence data and the dynamic geofence data, and the reliable location information is stored in the data processing server.
[0071] In this embodiment of the invention, the data processing server can load a federated learning model to analyze the user's historical transaction behavior and dynamically update the user's trusted location range without disclosing user privacy.
[0072] Specifically, the data processing server can connect to the bank's core transaction database and log system to extract all successful transaction records, login IP addresses, and device fingerprint information of the target user within a preset time period (such as the past 6 months). The extracted raw data is then cleaned and anonymized, retaining timestamps, transaction types, and geolocation tags to form a structured historical behavior dataset.
[0073] The data processing server loads a pre-trained federated learning model, which includes clustering algorithms and time series analysis modules. The server inputs cleaned historical behavioral data into the model, which uses unsupervised learning to identify frequently occurring geographical clusters of users. This data is then combined with weighted analysis based on the time characteristics of transactions (e.g., weekday daytime, weekend evening) to output the coordinates of the center with the highest probability and the corresponding confidence interval; these coordinates represent the dynamic geographic location. Throughout this process, only the model parameters interact between the local machine and the server; the original sensitive data does not leave the domain, thus protecting the security of privacy data.
[0074] The data processing server converts the obtained dynamic geographic coordinates into a dynamic geofence data structure containing latitude, longitude, radius, and time dimensions. Then, the server executes a fusion algorithm to weight and fuse the dynamic geofence data with pre-stored fixed geofence data (based on initial user input) to generate reliable location information that integrates static benchmarks and dynamic trends. This information is re-encrypted and stored in the data processing server's highly available database for real-time access by the verification server.
[0075] For example, the data processing server receives user frequently used location data submitted by the card issuing system and performs data cleaning, encryption, and format conversion to ensure that the data conforms to the storage specifications of bank card chips or magnetic stripes. The data processing server can also load a federated learning model to automatically analyze user historical behavior data to dynamically update trusted frequently used locations. Furthermore, the data processing server can receive frequently used geofencing data query requests from the card issuing system and return corresponding standard binary data for card writing.
[0076] In this embodiment, by introducing a federated learning model to mine historical behavioral data, the evolution of geofencing from static and fixed to dynamic and intelligent is realized. This not only solves the problem of false positives and false negatives caused by changes in user location, but also meets compliance requirements through a privacy-preserving computing architecture. At the same time, the reliable location information generated by fusing dynamic analysis with static basic data improves the accuracy of identifying high-risk fraudulent activities and reduces the false rejection rate of normal transactions.
[0077] To improve the accuracy of converting dynamic geographic locations into dynamic geofence data, the terminal transaction processing method provided in Embodiment 1 of this application performs latitude and longitude conversion on the dynamic geographic location to obtain longitude and latitude; determines the geofence radius corresponding to the dynamic geographic location; performs format conversion on the longitude, latitude, and geofence radius to obtain preset format data; encrypts the preset format data to obtain encrypted information and encrypted preset format data; and generates dynamic geofence data based on the encrypted information and encrypted preset format data.
[0078] In this embodiment of the invention, the data processing server receives the coordinates of the dynamic geographic location center point output by the federated learning model and converts them into standard latitude and longitude values using a standard Earth coordinate system mapping algorithm. Simultaneously, based on the spatial distribution density of historical transaction data around the center point, the server calculates the standard deviation or confidence interval to determine the minimum circular boundary covering the user's high-frequency activity area, thereby deriving the geofence radius.
[0079] The data processing server converts floating-point latitude and longitude data into single-precision floating-point binary representations and integer radius data into fixed-length integer binary data (i.e., preset format data) according to the predefined bank card chip data specifications.
[0080] The server uses the key provided by the card organization to perform symmetric encryption on the preset format data, generating encrypted preset format data in ciphertext form. Then, the server uses the card organization's root private key to perform a hash operation on the original preset format data and generate a digital signature to obtain the encrypted information.
[0081] Here, encrypted information refers to the digital signature and related hash value used to verify the legitimacy of the data source and the integrity of the data.
[0082] The data processing server appends encrypted information to the encrypted data in a preset format, forming the final data packet structure, which is the dynamic geofence data. The server then performs secondary encapsulation on this data packet, adding necessary header identifiers so that the POS terminal can accurately identify the data category when reading it and update the data in the user risk control file on the server for subsequent transaction verification.
[0083] For example, the data processing server can perform the following operations: (1) Data cleaning and standardization: Convert geographical location information (such as "No. 1, Street, District, City") into standard latitude and longitude coordinates (such as "[{39.9042°N, 116.4074°E},{39.9042°N, 116.4174°E},{39.9142°N, 116.4074°E},{39.9142°N, 116.4174°E}]"). (2) Geofencing data generation: Generate one or more geofences based on geographical location information for comparison and judgment during subsequent transactions. (3) Data encryption processing: Encrypt geographical location information using the card organization's root key to generate encrypted geofence data. (4) Data format conversion: Convert the encrypted data into binary data that conforms to the storage format of bank card chips or magnetic stripes for writing to cards. (5) Federated learning model support: Load the federated learning model to analyze the user's historical transaction behavior and dynamically update the user's trusted location range without leaking user privacy.
[0084] To accommodate the storage format of bank card chips or magnetic stripes, the encrypted geofencing data uses a binary format and includes fields as shown in Table 1:
[0085] Table 1
[0086]
[0087] The encrypted data (binary format) can be: [0x4248F5C3][0x42E846A0][0x0005][0x1234][0x30313233343536373839303132333435].
[0088] In this embodiment, standardized format conversion ensures data interoperability, and high-strength encryption and signature mechanisms guarantee data security and legality. The resulting dynamic geofence data not only has high-precision real-time risk control capabilities, but also meets the requirements of financial transactions for data integrity and confidentiality.
[0089] To improve the accuracy of determining encrypted information and encrypted preset format data, in the terminal transaction processing method provided in Embodiment 1 of this application, a verification code is generated based on the preset format data; the preset format data is encrypted using a preset key based on a preset vector; the encrypted preset format data is signed using the preset key to obtain a digital signature; and the verification code and digital signature are represented as encrypted information.
[0090] In this embodiment of the invention, the data processing server receives data in a preset format after format conversion, calls the Cyclic Redundancy Check (CRC16) algorithm to calculate a 2-byte checksum on the binary byte stream of the preset format data. This process does not involve a key and is only used to detect whether bit flipping or corruption occurs during subsequent transmission or storage of the data.
[0091] The data processing server loads a pre-configured symmetric key and initialization vector (IV). The server divides the pre-formatted data into fixed-length blocks and uses the AES (Advanced Encryption Standard) algorithm's CBC (Cipher Block Chaining) mode, combined with the pre-configured vector (IV), to encrypt the data block by block, ultimately outputting the encrypted pre-formatted data in ciphertext form. This process ensures that the same plaintext generates different ciphertexts under different IVs or keys, preventing replay attacks.
[0092] The data processing server uses the card organization's root private key to perform a hash operation (such as SHA256) on the encrypted data in a preset format. Then, it uses the private key to perform asymmetric encryption on the hash value, generating a digital signature. This signature is appended to the ciphertext as proof of data integrity and legitimacy of its origin.
[0093] The data processing server concatenates or encapsulates the verification code and digital signature to form a data structure containing integrity verification and authentication identifiers, collectively referred to as encrypted information. This encrypted information is then combined with encrypted data in a preset format to form the final dynamic geofencing data packet.
[0094] For example, the encryption process is as follows:
[0095] Step 1: Convert the location data (such as latitude and longitude, radius) into binary format;
[0096] Step 2: Generate a CRC16 checksum for data integrity verification;
[0097] Step 3: Encrypt the data using the AES256 key provided by the card organization;
[0098] Step 4: Perform an RSA signature on the encrypted data using the card organization's root key;
[0099] Step 5: Append the signature result to the encrypted data for the POS machine to verify the legitimacy of the data source.
[0100] In this embodiment, a multi-layered security protection system is constructed by combining symmetric encryption, asymmetric signatures, and integrity verification codes. This not only ensures the confidentiality of geofence data and prevents privacy leaks, but also effectively resists data tampering and forgery attacks through digital signature and verification code mechanisms. This improves the reliability and security of the POS transaction anti-fraud method based on geolocation verification, meeting financial-grade information security standards.
[0101] To improve the accuracy of terminal transaction verification, the terminal transaction processing method provided in Embodiment 1 of this application parses trusted location information to obtain dynamic geofence data; uses a preset public key to verify the data signature in the dynamic geofence data; if the data signature verification is successful, uses the preset public key and a preset vector to decrypt the encrypted preset format data in the dynamic geofence data to obtain preset format data; performs integrity verification on the preset format data based on the checksum in the dynamic geofence data; if the integrity verification of the preset format data is successful, extracts the location information in the preset format data to obtain trusted fence information, wherein the trusted fence information includes at least: longitude, latitude, and geofence radius; and verifies the terminal transaction based on the current location information and all trusted fence information.
[0102] In this embodiment of the invention, trusted location information is read, and the original binary stream is unpacked according to a predefined tag or private data format standard. The identifier in the header of the data packet is identified, and the subsequent ciphertext data, signature part and check code are separated and reassembled into structured dynamic geofence data so that each module can call the decryption, verification and decoding functions respectively.
[0103] The data signature is extracted from the dynamic geofence data, and an asymmetric decryption or verification operation is performed on the signature using a preset public key (i.e., the card organization's root public key) stored in a secure environment. Simultaneously, a hash operation is performed on the encrypted data portion of the dynamic geofence data (excluding the signature itself), and the generated hash value is compared with the value obtained from decrypting the signature. If they match, the signature is considered valid, and the data originates from a legitimate card issuer and has not been tampered with.
[0104] After the signature verification is successful, the encrypted preset format data is extracted from the dynamic geofence data. Combined with the stored preset vector (IV) and the corresponding preset public key, the ciphertext is decrypted using AES256. The decrypted binary stream is then restored to the original binary data containing fields such as latitude, longitude, and radius, which is the preset format data.
[0105] Calculate the Cyclic Redundancy Check (CRC16) value of the pre-formatted data and compare it with the checksum stored in the dynamic geofence data. If the calculated CRC16 value is exactly the same as the stored checksum, it is determined that no bit errors occurred during the transmission, storage, or decryption of the data; if they are inconsistent, the data is discarded and the transaction is marked as abnormal.
[0106] From the verified preset format data, according to predefined field offsets or tags, extract IEEE 754 floating-point numbers representing latitude, IEEE 754 floating-point numbers representing longitude, and integer values representing radius. Combine these values to form trusted fence information containing the user's current trusted activity range.
[0107] The current location information (latitude and longitude) is obtained via GPS, base station, or Wi-Fi. All trusted geofence information is traversed, and the distance between the current location and the center point of each trusted geofence is calculated using the Haversine formula or the distance squared algorithm. If the distance is less than the corresponding geofence radius, the transaction is determined to be within a safe area, and the transaction is allowed to continue; if all distances exceed the threshold, it is determined to be an out-of-town or abnormal transaction, triggering an interception or secondary verification process.
[0108] For example, the decryption process is as follows:
[0109] Step 1: Verify the signature using the card organization's root public key to ensure the data has not been tampered with;
[0110] Step 2: Decrypt the encrypted data using the same AES256 key and IV;
[0111] Step 3: After decryption, extract geofence information such as latitude, longitude, and radius;
[0112] Step 4: Verify data integrity to ensure that the data has not been damaged during transmission.
[0113] In this embodiment, a robust security loop is constructed through a multi-layered verification mechanism (signature verification ensures the source is legitimate, integrity verification ensures the data is error-free, and location comparison ensures the behavior is normal). This not only prevents forged and tampered data from interfering with the risk control system, but also ensures that only verified geofence data can participate in transaction decisions. This improves the accuracy, reliability, and anti-attack capability of the POS transaction anti-fraud method, effectively reducing the false alarm rate and the false negative rate.
[0114] To further improve the accuracy of terminal transaction verification, in the terminal transaction processing method provided in Embodiment 1 of this application, the current location information is compared with each trusted fence information to obtain a comparison result; if the comparison result indicates that the current location point corresponding to the current location information is within the preset area corresponding to any trusted fence information, the terminal transaction is determined to be verified successfully; if the comparison result indicates that the current location point corresponding to the current location information is not within the preset area corresponding to any trusted fence information, the terminal transaction is intercepted.
[0115] In this embodiment of the invention, the geographic coordinates of the current transaction are obtained as the current location information. These coordinates can be obtained in real time by a GPS module, base station positioning, or Wi-Fi fingerprint positioning technology. All the obtained trusted fence information is traversed. For each trusted fence, a spatial geometric algorithm (such as Haversine formula or Euclidean distance approximation algorithm) is used to calculate the distance between the current location and the center point of the trusted fence. The calculated distance is compared with the geographic fence radius stored in the trusted fence information to determine whether the current location falls within the circular or elliptical area defined by the fence, thereby generating a Boolean comparison result indicating whether the current location is within the protection range of the specific fence.
[0116] If at least one trusted fence information comparison result is true, meaning the current location falls within any historically recognized trusted activity range, the current transaction is determined to conform to the user's historical activity patterns and is considered a low-risk, normal transaction. At this point, a transaction permission instruction is generated and sent to the transaction processing module, allowing the payment process to continue.
[0117] If the current location does not fall within the preset area of any trusted geofence, meaning the calculated distances are all greater than the corresponding geofence radius, the transaction is determined to have occurred in an area outside the user's usual activity zone, posing a high risk of fraudulent use. In this case, the risk control interception mechanism is immediately triggered, terminating the current payment authorization process and returning a transaction rejection signal to the POS terminal. Simultaneously, additional security verification processes may be triggered (such as sending an SMS verification code or contacting the cardholder for confirmation) or an anomaly log may be recorded for subsequent manual review.
[0118] In this embodiment, by constructing a transaction verification logic based on spatial geometry judgment, fine-grained control over the geographical location of POS transactions is achieved, avoiding the false killing of normal transactions, and decisively intercepting transactions that significantly deviate from the user's activity trajectory. Thus, while ensuring transaction convenience, the accuracy and real-time performance of the anti-fraud system are improved, effectively balancing security and user experience.
[0119] Figure 3 This is a schematic diagram of an optional terminal transaction processing system according to an embodiment of the present invention, such as... Figure 3 As shown, it includes: a customer-facing counter terminal, a card issuance system, a data processing server, bank cards, POS terminals, a verification server, and a database and log system.
[0120] The card issuance system is used to provide user information entry and bank card information writing services. Specifically, it includes: verifying the legitimacy of bank cards and users through identity recognition and identity verification at the user terminal counter; providing a customer-facing page at the user terminal counter for entering customers' frequently used geographical locations, and automatically converting the selected geographical location into digital coordinate geofence data.
[0121] The data processing server is the core data processing and encryption module of the system. It is responsible for receiving user frequently used location data submitted by the card issuance system, and performing data cleaning, encryption, and format conversion to ensure that the data complies with the storage specifications of bank card chips or magnetic stripes; loading federated learning models to automatically analyze user historical behavior data to dynamically update trusted frequently used locations; and receiving frequently used geofencing data query requests from the card issuance system and returning corresponding standard binary data for card writing.
[0122] The verification server is the core risk control and verification module of the system, responsible for receiving transaction requests from POS terminals, performing geographic location comparison, risk assessment, and transaction decision-making. Specifically, it includes: (1) Receiving transaction requests: After reading the bank card information, the POS terminal sends encrypted geofence data, transaction amount, transaction time, and other information to the verification server. (2) Decrypting geofence data: The card organization's root public key is used to decrypt the encrypted geofence data to obtain the user's frequently used location information. (3) Obtaining the location of the POS terminal: The real-time geographic location of the POS terminal is obtained through GPS, base station positioning, or Wi-Fi positioning. (4) Location comparison and risk assessment: The Haversine formula is used to calculate the distance between the user's frequently used location and the POS terminal location. If it exceeds a preset threshold (such as 50 kilometers), it is judged as a high-risk transaction. (5) Transaction decision-making and feedback: Based on the risk assessment results, it is decided whether to allow the transaction to continue and the results are fed back to the POS terminal. (6) Warning and recording: Warnings are issued for high-risk transactions (such as sending SMS messages to the user's bound mobile phone number), and transaction logs are recorded for subsequent analysis.
[0123] The POS terminal is the front-end device for user interaction with the system. It is responsible for reading bank card information, obtaining its own location, initiating transaction requests, and deciding whether to complete the transaction based on the feedback from the verification server. Specifically, it includes: (1) Reading bank card information: Reading bank card information, including card number, expiration date, CVV2 code, and encrypted geofence data, through a magnetic stripe reader or chip reader. (2) Obtaining its own location: Obtaining the real-time geographical location of the POS terminal through GPS, Wi-Fi, or base station positioning. (3) Initiating transaction requests: Sending information such as bank card information, transaction amount, transaction time, and encrypted geofence data to the verification server. (4) Receiving verification results: Judging whether the transaction is successful based on the feedback from the verification server. (5) Transaction execution and feedback: If the transaction is successful, the payment is completed and a receipt is printed; if the transaction is blocked, the user is prompted "Transaction abnormal, please contact the bank".
[0124] exist Figure 3 In this system, the customer-facing terminal at the counter is used to submit identity information and enter frequently used locations to the card issuing system. The card issuing system writes this information to the bank card chip / magnetic stripe and calls the data processing server to generate a trusted address based on historical behavioral data in the database and log system using a federated learning model. This address is then encrypted and returned as encrypted geofence data to the card issuing system. When a user uses their bank card through the POS terminal, the system can read the card information, obtain their location, and then verify the transaction through the verification server, returning the transaction result to the POS terminal. Simultaneously, the verification server can record transaction logs in the database and log system.
[0125] The terminal transaction processing method provided in this application adopts a dual-modal collaborative verification approach, combining online and offline methods. It reads pre-stored fixed geofence data from the bank card at the sales terminal and performs local comparison with the current location. It also sends a transaction request to the verification server while connected to the internet and performs cloud-based comparison using trusted location information stored on the server. This differentiated approach achieves real-time geolocation security verification regardless of the network environment, thus realizing high availability, low latency response, and data privacy protection for POS transaction anti-fraud. Furthermore, it solves the technical problems of lacking real-time geolocation verification in scenarios of lost cards or fraudulent transactions in other locations, relying on user-initiated operations leading to response delays, and static location verification being unable to adapt to dynamic changes in user location and posing a risk of data leakage.
[0126] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0127] Example 2
[0128] This application also provides a terminal transaction processing apparatus. It should be noted that the terminal transaction processing apparatus of this application can be used to execute the terminal transaction processing method provided in this application. The terminal transaction processing apparatus provided in this application will be described below.
[0129] According to an embodiment of this application, an apparatus for implementing the above-described terminal transaction processing method is also provided. Figure 4 This is a schematic diagram of an optional terminal transaction processing apparatus according to an embodiment of the present invention, such as... Figure 4 As shown, the processing device may include: a judgment unit 40, a processing unit 41, a first verification unit 42, a generation unit 43, and a second verification unit 44.
[0130] The judgment unit 40 is used to determine the network status of the sales terminal when it is detected that a user uses a bank card to conduct a terminal transaction through the sales terminal. The bank card has pre-entered bank card information.
[0131] The processing unit 41 is used to read bank card information through the sales terminal and process the bank card information through the sales terminal to obtain fixed geofence data when the network connection is offline.
[0132] The first verification unit 42 is used to verify the terminal transaction using the sales terminal based on the current location information and fixed geofence data, and to complete the terminal transaction if the terminal transaction is verified.
[0133] The generation unit 43 is used to generate a transaction request based on bank card information through the sales terminal when the network connection is online, and send the transaction request to the verification server;
[0134] The second verification unit 44 is used to verify the terminal transaction using the verification server based on the current location information and the trusted location information stored in the verification server, and to complete the terminal transaction if the terminal transaction is verified.
[0135] The terminal transaction processing device provided in this application adopts a dual-modal collaborative verification method, which reads the fixed geofence data pre-stored in the bank card by the sales terminal and performs local comparison with the current location, and sends a transaction request to the verification server in the network state and performs cloud comparison using the trusted location information stored on the server. This differentiated approach achieves the goal of real-time geolocation security verification regardless of the network environment, thereby realizing the technical effects of high availability, low latency response and data privacy protection for POS transaction anti-fraud. It also solves the technical problems of lack of real-time geolocation verification, response delay caused by reliance on user active operation, and the inability of static location verification to adapt to dynamic changes in user location and the risk of data leakage in scenarios of card loss or fraudulent use in other locations.
[0136] Optionally, the terminal transaction processing system further includes a card issuance system. The processing device is also used to: before determining the network status of the sales terminal when detecting that a user is using a bank card to conduct a terminal transaction through the sales terminal, and before detecting that a user is applying for a bank card through a client, identify the user's identity, and if the identity identification is successful, initiate a geolocation input request to the client through the card issuance system. The client is used to display the geolocation input request on the front-end interface and receive at least one geolocation input by the user; convert the geolocation into fixed geofence data, and input the fixed geofence data as bank card information into the bank card through the card issuance system.
[0137] Optionally, the terminal transaction processing system further includes a data processing server. The processing device is also used to: after the fixed geofence data is entered into the bank card as bank card information through the card issuance system, use the data processing server to obtain the user's historical behavior data; use the data processing server to call the federated learning model and use the federated learning model to process the historical behavior data to obtain the dynamic geographic location; convert the dynamic geographic location into dynamic geofence data, and generate trusted location information based on the fixed geofence data and the dynamic geofence data, and store the trusted location information in the data processing server.
[0138] Optionally, the processing device is further configured to: convert the dynamic geographic location to latitude and longitude to obtain longitude and latitude; determine the geofence radius corresponding to the dynamic geographic location; convert the longitude, latitude, and geofence radius to a preset format to obtain preset format data; encrypt the preset format data to obtain encrypted information and encrypted preset format data; and generate dynamic geofence data based on the encrypted information and encrypted preset format data.
[0139] Optionally, the processing device is further configured to: generate a verification code based on preset format data; obtain encrypted preset format data by using a preset key to encrypt the preset format data based on a preset vector; sign the encrypted preset format data using the preset key to obtain a digital signature; and represent the verification code and digital signature as encrypted information.
[0140] Optionally, the second verification unit is further configured to: parse the trusted location information to obtain dynamic geofence data; verify the data signature in the dynamic geofence data using a preset public key; if the signature verification of the data signature is successful, decrypt the encrypted preset format data in the dynamic geofence data using the preset public key and a preset vector to obtain preset format data; verify the integrity of the preset format data based on the checksum in the dynamic geofence data; if the integrity verification of the preset format data is successful, extract the location information in the preset format data to obtain trusted fence information, wherein the trusted fence information includes at least: longitude, latitude, and geofence radius; and verify the terminal transaction based on the current location information and all trusted fence information.
[0141] Optionally, the second verification unit is further configured to: compare the current location information with each trusted fence information to obtain a comparison result; if the comparison result indicates that the current location point corresponding to the current location information is within the preset area corresponding to any trusted fence information, determine that the terminal transaction verification is successful; if the comparison result indicates that the current location point corresponding to the current location information is not within the preset area corresponding to any trusted fence information, intercept the terminal transaction.
[0142] The aforementioned processing device may further include a processor and a memory. The aforementioned judgment unit 40, processing unit 41, first verification unit 42, generation unit 43, second verification unit 44, etc., are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0143] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, the terminal transaction is verified using the verification server based on the current location information and trusted location information stored in the verification server. If the terminal transaction passes verification, the transaction is completed.
[0144] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0145] It should be noted that the aforementioned judgment unit 40, processing unit 41, first verification unit 42, generation unit 43, and second verification unit 44 correspond to steps S201 to S205 in Embodiment 1. The instances and application scenarios implemented by the aforementioned units and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the aforementioned units may be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The aforementioned units may also be part of a device and can run in the computer terminal 10 provided in Embodiment 1.
[0146] Example 3
[0147] Embodiments of this application may provide an electronic device. Figure 5 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Figure 5 As shown, the electronic device may include: one or more ( Figure 5 (Only one is shown) processor 502, memory 504, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0148] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the terminal transaction processing method and apparatus in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned terminal transaction processing method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0149] The processor can access information and applications stored in memory via a transmission device to execute the following steps: Upon detecting a user's transaction using a bank card at a point-of-sale terminal, determine the terminal's network connection status, where the bank card has pre-loaded information. If the network connection is offline, read the bank card information through the terminal and process it to obtain fixed geofence data. Based on the current location information and the fixed geofence data, verify the transaction using the terminal, and complete the transaction if verification is successful. If the network connection is online, generate a transaction request based on the bank card information through the terminal and send the request to a verification server. Based on the current location information and trusted location information stored on the verification server, verify the transaction using the verification server, and complete the transaction if verification is successful.
[0150] The processor can access information and applications stored in memory via a transmission device to perform the following steps: upon detecting that a user has applied for a bank card through a client, the processor identifies the user and, if the identification is successful, initiates a geolocation input request to the client through the card issuance system. The client displays the geolocation input request on the front-end interface and receives at least one geolocation input by the user. The geolocation is converted into fixed geofence data, and the fixed geofence data is entered into the bank card as bank card information through the card issuance system.
[0151] The processor can access information and applications stored in memory via a transmission device to perform the following steps: acquiring historical user behavior data using a data processing server; using the data processing server to call a federated learning model and process the historical behavior data to obtain dynamic geographic locations; converting the dynamic geographic locations into dynamic geofence data, and generating trusted location information based on fixed geofence data and dynamic geofence data, and storing the trusted location information in the data processing server.
[0152] The processor can access the information and application programs stored in the memory via the transmission device to perform the following steps: converting the dynamic geographic location to latitude and longitude to obtain longitude and latitude; determining the geofence radius corresponding to the dynamic geographic location; converting the longitude, latitude, and geofence radius to a preset format to obtain preset format data; encrypting the preset format data to obtain encrypted information and encrypted preset format data; and generating dynamic geofence data based on the encrypted information and encrypted preset format data.
[0153] The processor can access the information and application programs stored in the memory via the transmission device to perform the following steps: generating a checksum based on preset format data; encrypting the preset format data using a preset key based on a preset vector; signing the encrypted preset format data using the preset key to obtain a digital signature; and representing the checksum and digital signature as encrypted information.
[0154] The processor can access information and applications stored in the memory via a transmission device to perform the following steps: parsing trusted location information to obtain dynamic geofence data; verifying the data signature in the dynamic geofence data using a preset public key; decrypting the encrypted preset format data in the dynamic geofence data using the preset public key and a preset vector, obtaining preset format data; verifying the integrity of the preset format data based on the checksum in the dynamic geofence data; extracting location information from the preset format data to obtain trusted fence information, wherein the trusted fence information includes at least: longitude, latitude, and geofence radius; and verifying terminal transactions based on the current location information and all trusted fence information.
[0155] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: compare the current location information with each trusted fence information to obtain the comparison result; if the comparison result indicates that the current location point corresponding to the current location information is within the preset area corresponding to any trusted fence information, determine that the terminal transaction verification is successful; if the comparison result indicates that the current location point corresponding to the current location information is not within the preset area corresponding to any trusted fence information, intercept the terminal transaction.
[0156] This application provides a solution for processing terminal transactions. It employs a dual-modal collaborative verification approach, combining online and offline methods. This involves reading pre-stored fixed geofence data from the bank card at the point of sale and performing local comparison with the current location. Additionally, when connected to the internet, it sends a transaction request to a verification server and performs cloud-based comparison using trusted location information stored on the server. This differentiated approach achieves real-time geolocation security verification regardless of network conditions, thus realizing high availability, low latency response, and data privacy protection for POS transaction fraud prevention. Furthermore, it solves the technical problems of lacking real-time geolocation verification in scenarios involving lost cards or unauthorized transactions, response delays due to reliance on user-initiated actions, and the inability of static location verification to adapt to dynamic changes in user location, which poses a risk of data leakage.
[0157] Those skilled in the art will understand that Figure 5The structure shown is for illustrative purposes only. Electronic devices can also be terminal devices such as smartphones, tablets, PDAs, and mobile internet devices (MIDs). Figure 5 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 5 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 5 The different configurations shown.
[0158] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0159] Example 4
[0160] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the terminal transaction processing method provided in Embodiment 1.
[0161] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0162] This application also provides a computer program product, which, when executed on a data processing device, is suitable for performing the processing method steps of a terminal transaction.
[0163] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0164] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0165] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0166] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0167] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0168] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0169] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for processing terminal transactions, characterized in that, Applied to a terminal transaction processing system, the terminal transaction processing system includes at least: a sales terminal and a verification server, and the processing method includes: If a user is detected using a bank card to conduct a terminal transaction through the sales terminal, the network status of the sales terminal is determined, wherein the bank card has pre-recorded bank card information; When the network connection is offline, the bank card information is read through the sales terminal and processed by the sales terminal to obtain fixed geofence data. Based on the current location information and the fixed geofence data, the sales terminal is used to verify the terminal transaction, and the terminal transaction is completed if the terminal transaction verification is successful. When the network connection is online, the sales terminal generates a transaction request based on the bank card information and sends the transaction request to the verification server. Based on the current location information and the trusted location information stored in the verification server, the verification server is used to verify the terminal transaction, and the terminal transaction is completed if the terminal transaction is verified successfully.
2. The processing method according to claim 1, characterized in that, The terminal transaction processing system further includes: a card issuance system, which, before determining the network connection status of the sales terminal upon detecting that a user is using a bank card to conduct a terminal transaction through the sales terminal, also includes: If the system detects that the user has applied for the bank card through the client, the system identifies the user's identity. If the identity verification is successful, the system initiates a geolocation input request to the client through the card issuance system. The client is used to display the geolocation input request on the front-end interface and receive at least one geolocation input by the user. The geographical location is converted into fixed geofence data, and the fixed geofence data is entered into the bank card as the bank card information through the card issuance system.
3. The processing method according to claim 2, characterized in that, The terminal transaction processing system further includes: a data processing server, which, after inputting the fixed geofence data as bank card information into the bank card through the card issuance system, also includes: The data processing server is used to obtain the user's historical behavior data; The data processing server is used to invoke the federated learning model, and the federated learning model is used to process the historical behavioral data to obtain the dynamic geographic location; The dynamic geographic location is converted into dynamic geofence data, and based on the fixed geofence data and the dynamic geofence data, the trusted location information is generated and stored in the data processing server.
4. The processing method according to claim 3, characterized in that, The steps of converting the dynamic geographic location into dynamic geofencing data include: The dynamic geographical location is converted to latitude and longitude to obtain longitude and latitude; Determine the geofence radius corresponding to the dynamic geographic location; The longitude, latitude, and geofence radius are converted to a preset format to obtain data in a pre-defined format. The preset format data is encrypted to obtain encrypted information and the encrypted preset format data. Based on the encrypted information and the encrypted preset format data, the dynamic geofence data is generated.
5. The processing method according to claim 4, characterized in that, The step of encrypting the preset format data to obtain encrypted information and the encrypted preset format data includes: Generate a verification code based on the preset format data; Based on a preset vector, the preset format data is encrypted using a preset key. The encrypted data in the preset format is signed using the preset key to obtain a digital signature; The verification code and the digital signature are used to represent the encrypted information.
6. The processing method according to claim 1, characterized in that, Based on the current location information and the trusted location information stored in the verification server, the steps of verifying the terminal transaction using the verification server include: The trusted location information is parsed to obtain dynamic geofence data; A preset public key is used to verify the data signature in the dynamic geofence data. If the signature verification of the data signature is successful, the encrypted preset format data in the dynamic geofence data is decrypted using the preset public key and preset vector to obtain the preset format data. Based on the checksum in the dynamic geofence data, the integrity of the preset format data is verified. If the integrity verification of the preset format data passes, the location information in the preset format data is extracted to obtain trusted fence information, wherein the trusted fence information includes at least: longitude, latitude and geographic fence radius; The terminal transaction is verified based on the current location information and all the trusted fence information.
7. The processing method according to claim 6, characterized in that, The steps for verifying the terminal transaction based on the current location information and all the trusted fence information include: The current location information is compared with each of the trusted fence information to obtain the comparison result; If the comparison result indicates that the current location point corresponding to the current location information is within any preset area corresponding to the trusted fence information, then the terminal transaction verification is deemed successful. If the comparison result indicates that the current location point corresponding to the current location information is not within the preset area corresponding to any of the trusted fence information, the terminal transaction is intercepted.
8. A terminal transaction processing device, characterized in that, This system is applied to a terminal transaction processing system, which at least includes: a sales terminal and a verification server, and the processing device includes: The judgment unit is used to determine the network status of the sales terminal when it is detected that a user uses a bank card to conduct a terminal transaction through the sales terminal, wherein the bank card has pre-entered bank card information; The processing unit is configured to, when the network connection is offline, read the bank card information through the sales terminal and process the bank card information using the sales terminal to obtain fixed geofence data. The first verification unit is used to verify the terminal transaction using the sales terminal based on the current location information and the fixed geofence data, and to complete the terminal transaction if the terminal transaction is verified. The generation unit is configured to, when the network connection is online, generate a transaction request based on the bank card information through the sales terminal, and send the transaction request to the verification server; The second verification unit is used to verify the terminal transaction using the verification server based on the current location information and the trusted location information stored in the verification server, and to complete the terminal transaction if the terminal transaction is verified successfully.
9. A computer program product, characterized in that, The method includes a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the terminal transaction processing method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the terminal transaction processing method according to any one of claims 1 to 7.