Security algorithm verification method and system for UnionPay payment terminal
By implementing security algorithm verification methods in UnionPay payment terminals, including behavior monitoring, format verification, hash value verification, identity verification and fraud identification, the deficiencies of the existing payment system in terms of anti-tampering, anti-repudiation and fraud prevention are solved. Achieving higher transaction security and fraud prevention efficiency.
Patent Information
- Application Number
- CN202411891613.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-01-21
AI Technical Summary
The existing payment system has shortcomings in the prevention of tampering, anti-debt and prevention of transaction information, and fraudulent transaction prevention. Centralized management has the risk of being attacked, and manual review is inefficient, making it difficult to effectively curb fraud.
Through the implementation of security algorithm verification methods in UnionPay payment terminals, including behavior monitoring, Luhn algorithm format verification, hash legal verification, authentication, transaction fraud behavior recognition and other steps, combined with machine learning and rule engine technology, real -time detection and response response and response Damn.
It enhances the anti-tampering and anti-repudiation capabilities of transaction information, improves the efficiency of preventing fraudulent transactions, and reduces risks and losses in the payment process.
Smart Images

Figure CN119338464A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic payment, and in particular to a method and system for verifying a security algorithm of a UnionPay payment terminal. Background Art
[0002] With the rapid development of e-commerce and mobile payments, UnionPay payment terminals, as an important financial transaction tool, are increasingly valued for their security and reliability. At the same time, the current payment system still faces many challenges, especially in terms of anti-tampering and anti-repudiation of transaction information, and prevention of fraudulent transactions.
[0003] In the payment process, the authenticity and integrity of transaction information are crucial. Once transaction information is maliciously tampered with, it may not only lead to economic losses, but also cause legal disputes. At the same time, how to ensure that both parties to the transaction cannot deny their transaction behavior, that is, to achieve non-repudiation, is also a key issue that the payment system needs to solve. Traditional payment systems often rely on a single server or database to store transaction information. This centralized management method is at risk of being attacked by hackers or tampered by internal personnel. With the diversification of payment methods, fraud methods are also emerging in an endless stream, causing huge economic losses to banks and cardholders. Existing payment systems mostly rely on manual review and post-event tracing to prevent fraudulent transactions. This method is not only inefficient, but also difficult to effectively curb the occurrence of fraud. Summary of the invention
[0004] The main purpose of the present invention is to provide a UnionPay payment terminal security algorithm verification method and system to achieve the purpose of enhancing the anti-tampering and anti-repudiation capabilities of transaction information and improving the prevention of fraudulent transactions.
[0005] To achieve the above object, the present invention provides a method for verifying the security algorithm of a UnionPay payment terminal, comprising the following steps: Monitor the behavior of the payment terminal, and when it detects that a preset user inputs a bank card number, identify the security of the preset user input environment; Run the Luhn algorithm to verify the format of the input card number of the preset user. If the input card number format does not match, the user is immediately prompted to re-enter; When the format of the input card number is correct, the hash value of the input card number is verified for legitimacy using the Luhn algorithm. If the legitimacy verification of the input card number is abnormal, the user is immediately prompted to re-enter the number, and the abnormal behavior is recorded and monitored; When the input card number is legitimate, the identity verification phase begins, and based on the bank card number information, at least two combined verification methods are used to confirm whether the identity of the cardholder matches that of the preset user; After the identity matching is completed, the transaction fraud behavior identification stage is entered. Based on the preset user's current transaction information and behavior identification model, technical means such as machine learning or rule engine are used to identify whether the current transaction is fraudulent; If it is identified that the current transaction involves fraud, the payment process is immediately interrupted, and the preset user and the bank are contacted at the same time. If the current transaction of the preset user is identified as normal, the payment process is continued.
[0006] Furthermore, the user's input behavior is detected in real time. When the preset user is detected to enter the payment system, the system immediately enters a high alert state, captures all the interface data input in the current operation interface of the preset user, and performs a preliminary analysis on the interface data to identify whether there is an abnormal input pattern; When it is detected that the preset user inputs a bank card number and issues a payment request, a security assessment is immediately performed on the current input environment, and when the input environment is abnormal, a security reminder is issued through the operation interface; The security assessment includes but is not limited to the security of the device, the security of the network connection, and the security of the user operating environment.
[0007] Further, verifying that the length of the input card number is within a set range based on the length of the hash value of the card number, and verifying whether all characters of the input card number are numbers; If the length verification does not meet the set length or the number verification does not meet the set character requirements, a corresponding format error reminder will be given through the user interface.
[0008] Further, after the bank card number of the preset user is generated, the bank card number of the preset user is hashed to obtain a card number hash value corresponding to the bank card number, and the card number hash value is stored in a database; When verifying the input card number of the preset user, performing hash processing on the input card number to generate a hash value of the input card number; The card number hash value is transmitted to the database via the network.
[0009] Furthermore, when the length and character type of the input card number are in accordance with the settings, the legitimacy verification phase of the input card number is entered; Transmitting the input card number hash value of the input card number to the database, triggering the Luhn algorithm to perform traversal of the input card number hash value; Matching the card number hash value pre-stored in the database to obtain the input card number information; When the length or character type of the input card number does not meet the settings, the user is immediately prompted to re-enter the number through the user interface, and the abnormal behavior is recorded and abnormal behavior monitoring is enabled; The number of times the preset user can enter the card number is limited.
[0010] Furthermore, when the input card number passes the legitimacy test, the specific information of the input card number is obtained based on the pre-stored card number hash value, including the personal basic information, card number password, and account balance of the preset user; Verify through user input through a combination of password verification and biometrics; When both verification methods are passed, the account balance is compared with the read current transaction amount to determine whether the account balance satisfies the current transaction amount.
[0011] Further, the initial current transaction information of the preset user is obtained, and the initial current transaction information is preprocessed and feature extracted to obtain transaction feature data reflecting the user's transaction behavior; Inputting the transaction feature data into a pre-trained behavior recognition model of the preset user; The behavior recognition model predicts whether there is fraudulent behavior in the current transaction based on the input transaction feature data, and obtains a prediction result of fraud recognition of the current transaction; The step of obtaining the behavior recognition model includes: Based on the historical transaction data of the preset user, analyze the user's transaction habits, preferences and behavior patterns to establish a user behavior baseline; The classification algorithm is used to train the preset user historical transaction data to obtain a behavior recognition model that can identify the user's normal transaction behavior.
[0012] Further, based on the prediction result of the current transaction fraud identification, it is determined whether there is fraudulent behavior in the current transaction; When there is fraud in the current transaction, an immediate payment interruption operation is triggered, and the reason for the payment interruption operation is fed back to the preset user and the bank that opened the input card number; When there is no fraud in the current transaction, the information is fed back to the opening bank; The account opening bank deducts money according to the transaction amount, accepts the deduction result of the account opening bank and feeds it back to the current transaction merchant and the preset user, and completes the transaction payment process.
[0013] Furthermore, all data generated by the four transaction parties involved in the transaction process, namely, the user, the merchant, UnionPay and the bank, are collected and screened to obtain the transaction data of each transaction party, and the transaction data of each transaction party is encrypted and uploaded to the blockchain network in real time; Among them, a unique key C1 is set for each transaction party, and the corresponding key C2 is generated by the characteristics of the transaction data generated during each transaction; The transaction data key C is generated by merging C1 and C2, and the transaction data key C is hashed to generate a transaction data hash value, which is then uploaded to the blockchain network for storage in real time.
[0014] The present invention also provides a security algorithm verification system for UnionPay payment terminals, comprising: The terminal monitoring module is used to monitor the behavior of the payment terminal and, when detecting that a preset user inputs a bank card number, identify the security of the preset user input environment; The format verification module runs the Luhn algorithm to perform format verification on the input card number of the preset user. If the input card number format does not match, the user is immediately prompted to re-enter the number. A query and judgment module is used to verify the legitimacy of the hash value of the input card number through the Luhn algorithm when the format of the input card number is correct. If the legitimacy verification of the input card number is abnormal, the user is immediately prompted to re-enter the number, and the abnormal behavior is recorded and monitored; A parameter verification module is used to enter the identity verification phase after the input card number passes the legitimacy, and confirm whether the identity of the cardholder matches the preset user through at least two combined verification methods based on the bank card number information; The model recognition module is used to enter the transaction fraud behavior recognition stage after the identity matching is completed. Based on the preset user's current transaction information and behavior recognition model, it uses machine learning or rule engine and other technical means to identify whether there is fraud in the current transaction; The execution judgment module is used to immediately interrupt the payment process if it is identified that the current transaction involves fraud, and simultaneously the preset user and the bank, and to continue to complete the payment process if the current transaction of the preset user is identified as normal.
[0015] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned UnionPay payment terminal security algorithm verification method when executing the computer program.
[0016] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned UnionPay payment terminal security algorithm verification method are implemented.
[0017] The UnionPay payment terminal security algorithm verification method and system provided by the present invention have the following beneficial effects: enhancing the anti-tampering and anti-repudiation capabilities of transaction information and improving the prevention of fraudulent transactions. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1It is a flow chart of a method for verifying a security algorithm of a UnionPay payment terminal in one embodiment of the present invention; Figure 2 It is a structural block diagram of a security algorithm verification system for UnionPay payment terminals in one embodiment of the present invention; Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.
[0019] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0021] Reference Figure 1 , is a flow chart of a UnionPay payment terminal security algorithm verification method proposed by the present invention, comprising the following steps: S1, monitoring the behavior of the payment terminal, and when detecting that a preset user inputs a bank card number, identifying the security of the preset user input environment; S2, running the Luhn algorithm to verify the format of the input card number of the preset user, if the input card number format does not match, immediately prompting the user to re-enter; S3, when the format of the input card number is correct, the hash value of the input card number is verified for legitimacy by using the Luhn algorithm. If the legitimacy verification of the input card number is abnormal, the user is immediately prompted to re-enter the number, and the abnormal behavior is recorded and monitored; S4, when the input card number passes the legitimacy, enter the identity verification stage, based on the bank card number information, confirm whether the identity of the cardholder matches the preset user through at least two combined verification methods; S5, after identity matching is completed, the transaction fraud behavior identification stage is entered, based on the preset user's current transaction information and behavior identification model, machine learning or rule engine and other technical means are used to identify whether the current transaction is fraudulent; S6, if it is identified that the current transaction is fraudulent, the payment process is immediately interrupted, and at the same time the preset user and the bank; if the current transaction of the preset user is identified as normal, the payment process is continued.
[0022] Among them, for the data storage of the UnionPay payment terminal security algorithm verification method, all data generated by the four transaction parties involved in the transaction process, namely, users, merchants, UnionPay and banks, are collected and screened to obtain the transaction data of each transaction party, and the transaction data of each transaction party is encrypted and uploaded to the blockchain network in real time; Among them, a unique key C1 is set for each transaction party, and the corresponding key C2 is generated by the characteristics of the transaction data generated during each transaction; The transaction data key C is generated by merging C1 and C2, and the transaction data key C is hashed to generate a transaction data hash value, which is then uploaded to the blockchain network for storage in real time.
[0023] For S1, specifically: S11, real-time detection of user input behavior, when detecting that the preset user enters the payment system, immediately enters a high alert state, and captures all input interface data in the current operation interface of the preset user, performs preliminary analysis on the interface data, and identifies whether there is an abnormal input pattern; S12, when it is detected that the preset user inputs a bank card number and issues a payment request, immediately performing a security assessment on the current input environment, and when the input environment is abnormal, providing a security reminder through the operation interface; The security assessment includes but is not limited to the security of the device, the security of the network connection, and the security of the user operating environment.
[0024] In the specific implementation process: When the system detects that a preset user has entered the payment system, it immediately enters a high alert state. The system captures all input data in the preset user's current operation interface, including the buttons clicked by the user, the text entered (such as bank card number, password, etc.) and other interactive behaviors, and performs a preliminary analysis of the captured interface data. It uses abnormal rules to identify whether there are abnormal input patterns, such as input speed being too fast, input content not conforming to conventional formats or logic, etc. Through real-time monitoring and preliminary analysis, the system can detect and respond to potential abnormal behaviors before or when the user enters sensitive information, thereby enhancing the security of the payment process.
[0025] When the system detects that the user has entered a bank card number and attempts to initiate a payment, it immediately conducts a security assessment of the current input environment. The content of the security assessment includes but is not limited to: the security of the device, checking whether the device used by the user is known or has been tampered with, and whether the security software on the device is running properly; the security of the network connection, assessing whether the user's current network connection is stable and has not been intercepted or tampered with; the security of the user's operating environment, considering whether the user's physical environment is safe, such as whether it is in a public Wi-Fi environment or an environment that may have other security risks. By assessing the security of the current input environment, we ensure that the transaction is conducted under safe conditions.
[0026] If the security assessment finds that the input environment is in an abnormal state, the system will issue a security reminder to the user through the operation interface, prompting the user to pay attention to possible security risks and helping the user avoid transactions in an unsafe environment, thereby reducing transaction risks.
[0027] For S2, specifically: S21, verifying that the length of the input card number is within a set range according to the length of the hash value of the card number, and verifying whether all characters of the input card number are numbers; S22, if the length verification does not meet the set length or the number verification does not meet the set character requirements, a corresponding format error reminder is issued through the user interface.
[0028] In the specific implementation process: The system first calculates the length of the input card number and then compares the calculated length with the preset setting range to ensure that the card number length meets the requirements. The length of the bank card number is fixed, such as 16 or 19 digits. By verifying the length and character type of the input card number, it ensures that the card number meets the general format requirements of the bank card.
[0029] The system checks every character of the input card number to ensure that they are all numbers, because bank card numbers are composed of pure numbers and do not contain letters or other special characters; through length and character verification, the system can quickly identify card numbers that do not meet the format requirements, providing basic protection for subsequent processing steps.
[0030] If in step S21, the length verification does not meet the set length or the digital verification does not meet the set character requirements (that is, the card number contains non-numeric characters), the system will display a corresponding format error reminder through the user interface (such as the screen or web interface of the payment application). The format error reminder includes specific error information, such as "The card number length is incorrect" or "The card number contains illegal characters". Through the format error reminder, the user can immediately understand that there is a problem with the format of the card number they entered and have the opportunity to correct it, which helps to improve the success rate of payment and reduce payment failures due to format errors.
[0031] For S3, specifically: S31, when the length and character type of the input card number are in accordance with the settings, the legitimacy verification phase of the input card number is entered; S32, transmitting the input card number hash value of the input card number to the database, triggering the Luhn algorithm to perform traversal of the input card number hash value; S33, matching the card number hash value pre-stored in the database to obtain the input card number information; S34, when the length or character type of the input card number does not meet the setting, the user is immediately prompted to re-enter the number through the user interface, and the abnormal behavior is recorded and abnormal behavior monitoring is enabled; S35, limiting the number of times the preset user inputs the card number.
[0032] In the specific implementation process: After confirming that the length and character type of the input card number meet the set requirements, the system enters the legitimacy verification stage; the hash value is transmitted to the database server via the network, and on the database server, the Luhn algorithm is triggered to execute, traversing the received hash value (used to protect the original card number information) to verify whether it corresponds to a valid bank card number. Through the network transmission of the hash value and the verification of the Luhn algorithm, the system can check the legitimacy of the card number without directly exposing the original card number. After the database server verifies the hash value using the Luhn algorithm, it will search for the pre-stored card number hash value record that matches it. After finding a match, the system will obtain information related to the card number (such as the cardholder's name, account balance, etc.).
[0033] If it is checked in step S31 that the length or character type of the input card number does not meet the requirements, the system will display an error prompt through the user interface. At the same time, the system will record the abnormal behavior and start the abnormal behavior monitoring mode to observe whether the user continues to attempt illegal operations. Through abnormal behavior processing, the system can promptly detect and respond to malformed card number input, and record abnormal behavior for subsequent analysis; the system will track and record the number of times the preset user attempts to enter the card number. If the user attempts to enter the wrong card number multiple times in a short period of time (exceeding the preset number limit), the system will take additional security measures, such as locking the account or requiring the user to perform additional identity verification; through the number limit, the system can reduce the impact of malicious attacks or misoperations on the payment system and improve the security of the system.
[0034] For S4, specifically: S41, when the input card number passes the legitimacy test, obtaining the specific information of the input card number based on the pre-stored card number hash value, including the personal basic information of the preset user, the card number password, and the account balance; S42, verification through user input by combining password verification and biometrics; S43, when both verification methods are passed, the account balance is compared with the read current transaction amount to determine whether the account balance satisfies the use of the current transaction amount.
[0035] In the specific implementation process: Based on the pre-stored card number hash value, the system searches the database for specific card number information that matches the hash value. Once a match is found, the system obtains the basic personal information (such as name, ID number, etc.) of the preset user associated with the card number, the card number password (usually encrypted and stored), and the account balance; by obtaining this information, the system can prepare for subsequent payment verification and account balance checks; the user end (such as a mobile application or web interface) requires the user to enter the card number password, and the system requires the user to perform biometric verification, such as fingerprint recognition, facial recognition or iris recognition; the system compares the password entered by the user with the encrypted password stored in the database, and verifies whether the biometric information matches; through the double verification method, the system can greatly improve the security of payment and prevent unauthorized payment behavior; after the verification is passed, the system reads the transaction amount selected by the user (that is, the amount the user wants to pay), and compares the account amount with the transaction amount. If the account amount is greater than or equal to the transaction amount, the payment can continue. If the account balance is insufficient, the system will prompt the user that the account balance is insufficient, and may suggest that the user choose another payment method or recharge the account; by comparing the account balance and the transaction amount, the system can ensure that the payment will not fail due to insufficient balance, thereby improving the user's payment experience.
[0036] For S5, specifically: S51, obtaining the initial current transaction information of the preset user, preprocessing and extracting features of the initial current transaction information, and obtaining transaction feature data reflecting the user's transaction behavior; S52, inputting the transaction feature data into a pre-trained behavior recognition model of the preset user; S53, the behavior recognition model predicts whether there is fraudulent behavior in the current transaction based on the input transaction feature data, and obtains a prediction result of fraud recognition of the current transaction.
[0037] In the specific implementation process: The system first obtains the initial current transaction information of the preset user, including data in multiple dimensions such as transaction amount, transaction time, transaction location, transaction type, etc., and pre-processes the initial transaction information, such as data cleaning and format conversion, to ensure the accuracy and consistency of the data. Through feature extraction technology, feature data that can reflect the user's transaction behavior is extracted from the pre-processed transaction information, such as transaction frequency, transaction amount fluctuations, abnormal transaction location, etc. Through pre-processing and feature extraction, the system can convert the original transaction information into feature data with clear meaning, providing input for the subsequent behavior recognition model; The system uses the transaction feature data extracted in step S51 as input and passes it to a pre-trained behavior recognition model. The behavior recognition model is built based on machine learning. It has been trained and optimized on a large amount of historical transaction data and can learn the difference between normal transactions and fraudulent transactions. After processing the input transaction feature data, the behavior recognition model will output a prediction result, indicating whether the current transaction involves fraud. The prediction result is a binary classification result, such as "fraud" or "non-fraud".
[0038] The step of obtaining the behavior recognition model in S52 includes: S521, analyzing the user's transaction habits, preferences and behavior patterns based on the historical transaction data of the preset user, and establishing a user behavior baseline; S522, using a classification algorithm to train the preset user's historical transaction data to obtain a behavior recognition model that can recognize the user's normal transaction behavior.
[0039] In the specific implementation process: The normal transactions include reasonable transaction amount, normal transaction frequency, compliant transaction behavior, complete transaction information, and valid user identity verification; the abnormal transactions include abnormal transaction amount, abnormal transaction frequency, suspicious transaction behavior, incomplete or abnormal transaction information, and invalid user identity verification.
[0040] The model training process collects historical transaction data including normal transactions and abnormal transactions in the banking transaction process, establishes a user behavior baseline for the transaction habits, preferences and behavior patterns of users in the historical transaction data, extracts key features of the historical transaction data, such as transaction amount, transaction frequency, transaction behavior characteristics (such as transaction time, transaction location, transaction type, etc.), transaction information integrity mark, user identity verification results, etc.; divides the historical transaction data into 70% training set and 30% test set for training the decision tree model, and uses the test set data to evaluate the performance of the model. The evaluation indicators include accuracy, precision, recall rate, F1 score, etc., and optimizes the model performance by adjusting the model's hyperparameters (such as the depth of the decision tree). Obtain a behavior recognition model that can identify the user's normal transaction behavior; deploy the trained model to the production environment for real-time monitoring and identification of the user's transaction behavior, set thresholds or rules, trigger alarms or take other measures when the transaction is identified as abnormal, and regularly monitor the performance of the model to ensure that the model can continue to effectively identify normal and abnormal transactions, and regularly update and retrain the model to adapt to changes in the market environment and user behavior.
[0041] For S6, specifically: S61, judging whether there is fraudulent behavior in the current transaction based on the prediction result of fraud identification of the current transaction; S62, when there is fraud in the current transaction, triggering an immediate payment interruption operation, and feeding back the reason for the payment interruption operation to the preset user and the bank that opened the input card number; S63, when there is no fraud in the current transaction, feeding back the information to the opening bank; S64, the account opening bank deducts money according to the transaction amount, accepts the deduction result of the account opening bank and feeds it back to the current transaction merchant and the preset user, and completes the transaction payment process.
[0042] In the specific implementation process: The system reads the prediction results output in step S5. If the prediction results indicate that the current transaction involves fraud (e.g., the prediction result is "fraud"), the system proceeds to step S62. When fraud is detected in the current transaction, the system triggers the operation of interrupting payment and stops further processing of the transaction. At the same time, the system generates a reason for interrupting payment, including the prediction results of fraud identification and possible fraud characteristics, and sends the reason for interrupting payment to the preset user and the bank that entered the card number through a secure channel. By interrupting payment and providing feedback on the reasons, the system can prevent fraudulent transactions and protect the interests of the preset user and the bank that opened the account.
[0043] If the prediction result indicates that there is no fraud in the current transaction (such as the prediction result is "non-fraud"), the system enters step S63, and the system sends the information of the current transaction (including transaction amount, transaction time, transaction type, etc.) to the account opening bank through a secure channel, and marks the transaction as a "non-fraud" transaction so that the account opening bank can carry out subsequent processing. After receiving the transaction information sent by the system, the account opening bank deducts the corresponding amount from the account of the preset user according to the transaction amount, and returns the deduction result (success or failure) to the system through a secure channel. The system accepts the deduction result and generates a notification of transaction payment completion or a description of the reason for failure based on the result, and sends the notification of transaction payment completion or the description of the reason for failure to the current transaction merchant and the preset user through a secure channel.
[0044] Reference Figure 2 : is a structural block diagram of a security algorithm verification system for UnionPay payment terminals in one embodiment of the present invention, comprising: The terminal monitoring module is used to monitor the behavior of the payment terminal and, when detecting that a preset user inputs a bank card number, identify the security of the preset user input environment; The format verification module runs the Luhn algorithm to perform format verification on the input card number of the preset user. If the input card number format does not match, the user is immediately prompted to re-enter the number. A query and judgment module is used to verify the legitimacy of the hash value of the input card number through the Luhn algorithm when the format of the input card number is correct. If the legitimacy verification of the input card number is abnormal, the user is immediately prompted to re-enter the number, and the abnormal behavior is recorded and monitored; A parameter verification module is used to enter the identity verification phase after the input card number passes the legitimacy, and confirm whether the identity of the cardholder matches the preset user through at least two combined verification methods based on the bank card number information; The model recognition module is used to enter the transaction fraud behavior recognition stage after the identity matching is completed. Based on the preset user's current transaction information and behavior recognition model, it uses machine learning or rule engine and other technical means to identify whether there is fraud in the current transaction; The execution judgment module is used to immediately interrupt the payment process if it is identified that the current transaction involves fraud, and simultaneously the preset user and the bank, and to continue to complete the payment process if the current transaction of the preset user is identified as normal.
[0045] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.
[0046] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.
[0047] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0048] In summary, the behavior of the payment terminal is monitored. When a preset user is detected to input a bank card number, the security of the preset user input environment is identified; the Luhn algorithm is run to verify the format of the preset user's input card number. If the input card number format does not match, the user is immediately prompted to re-enter; when the input card number format is correct, the legality of the input card number hash value is verified by the Luhn algorithm. If the legality verification of the input card number is abnormal, the user is immediately prompted to re-enter, and the abnormal behavior is recorded and abnormal behavior monitoring is performed; when the legality of the input card number is passed, the identity verification stage is entered, and based on the bank card number verification, the bank card number verification is performed. The cardholder’s bank card number information is verified through at least two combined verification methods to confirm whether the identity of the cardholder matches that of the preset user; after the identity matching is completed, the transaction fraud behavior identification stage is entered, and based on the current transaction information of the preset user and the behavior recognition model, technical means such as machine learning or rule engine are used to identify whether there is fraud in the current transaction; if fraud is identified in the current transaction, the payment process is immediately interrupted, and at the same time, the preset user and the bank are notified; if the current transaction of the preset user is identified as normal, the payment process is continued to complete, so as to enhance the anti-tampering and anti-repudiation capabilities of the transaction information and improve the prevention of fraudulent transactions.
[0049] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.
[0050] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0051] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A UnionPay payment terminal security algorithm verification method, characterized in that: The following steps are involved: Monitor the behavior of the payment terminal, and when a preset user is detected entering a bank card number, identify the security of the preset user input environment; Run the Luhn algorithm to verify the format of the card number input by the preset user. If the input card number format does not match, immediately prompt the user to re-enter; When the format of the input card number is correct, the hash value of the input card number is verified for legitimacy using the Luhn algorithm. If the legitimacy verification of the input card number is abnormal, the user is immediately prompted to re-enter the number, and the abnormal behavior is recorded and monitored; When the input card number is legitimate, the identity verification phase begins, and based on the bank card number information, at least two combined verification methods are used to confirm whether the identity of the cardholder matches that of the preset user; After the identity matching is completed, the transaction fraud behavior identification stage is entered. Based on the preset user's current transaction information and behavior identification model, technical means such as machine learning or rule engine are used to identify whether the current transaction is fraudulent; If it is identified that the current transaction involves fraud, the payment process is immediately interrupted, and the preset user and the bank are contacted at the same time. If the current transaction of the preset user is identified as normal, the payment process is continued.
2. The UnionPay payment terminal security algorithm verification method according to claim 1, characterized in that: The step of monitoring the behavior of the payment terminal and identifying the security of the preset user input environment when detecting that the preset user inputs a bank card number includes: Detect the user's input behavior in real time. When the preset user is detected entering the payment system, it immediately enters a high alert state and captures all the interface data input in the preset user's current operation interface, performs a preliminary analysis on the interface data, and identifies whether there is an abnormal input pattern; When it is detected that the preset user inputs a bank card number and issues a payment request, a security assessment is immediately performed on the current input environment, and when the input environment is abnormal, a security reminder is issued through the operation interface; The security assessment includes but is not limited to the security of the device, the security of the network connection, and the security of the user operating environment.
3. The UnionPay payment terminal security algorithm verification method according to claim 1, characterized in that: The step of running the Luhn algorithm to perform format verification on the input card number of the preset user, and immediately prompting the user to re-enter if the input card number format does not match, includes: Verify that the length of the input card number is within a set range based on the length of the hash value of the card number, and verify whether all characters of the input card number are numbers; If the length verification does not meet the set length or the number verification does not meet the set character requirements, a corresponding format error reminder will be given through the user interface.
4. The UnionPay payment terminal security algorithm verification method according to claim 1, characterized in that: When the format of the input card number is correct, the steps before the legitimacy of the input card number hash value is verified by the Luhn algorithm include: After the bank card number of the preset user is generated, the bank card number of the preset user is hashed to obtain a card number hash value corresponding to the bank card number, and the card number hash value is stored in a database; When verifying the input card number of the preset user, performing hash processing on the input card number to generate a hash value of the input card number; The card number hash value is transmitted to the database via the network.
5. The UnionPay payment terminal security algorithm verification method according to claim 1, characterized in that: When the format of the input card number is correct, the hash value of the input card number is verified for legitimacy by using the Luhn algorithm. If the legitimacy verification of the input card number is abnormal, the user is immediately prompted to re-enter the number, and the abnormal behavior is recorded and the abnormal behavior is monitored, including: When the length and character type of the input card number are in accordance with the settings, the legitimacy verification phase of the input card number is entered; Transmitting the input card number hash value of the input card number to the database, triggering the Luhn algorithm to perform traversal of the input card number hash value; Matching the card number hash value pre-stored in the database to obtain the input card number information; When the length or character type of the input card number does not meet the settings, the user is immediately prompted to re-enter the number through the user interface, and the abnormal behavior is recorded and abnormal behavior monitoring is enabled; The number of times the preset user can enter the card number is limited.
6. The UnionPay payment terminal security algorithm verification method according to claim 1, characterized in that: When the input card number passes the legitimacy, the identity verification phase is entered, and based on the bank card number information, at least two combined verification methods are used to confirm whether the identity of the cardholder matches that of the preset user, including: When the input card number passes the legitimacy test, the specific information of the input card number is obtained based on the pre-stored card number hash value, including the personal basic information of the preset user, the card number password, and the account balance; Verify through user input through a combination of password verification and biometrics; When both verification methods are passed, the account balance is compared with the read current transaction amount to determine whether the account balance satisfies the current transaction amount.
7. The UnionPay payment terminal security algorithm verification method according to claim 1, characterized in that: After the identity matching is completed, the transaction fraud behavior identification stage is entered, and the steps of identifying whether there is fraudulent behavior in the current transaction through machine learning or rule engine and other technical means based on the preset user's current transaction information and behavior identification model include: Acquire the initial current transaction information of the preset user, perform preprocessing and feature extraction on the initial current transaction information, and obtain transaction feature data reflecting the user's transaction behavior; Inputting the transaction feature data into a pre-trained behavior recognition model of the preset user; The behavior recognition model predicts whether there is fraudulent behavior in the current transaction based on the input transaction feature data, and obtains a prediction result of fraud recognition of the current transaction; The step of obtaining the behavior recognition model includes: Based on the historical transaction data of the preset user, analyze the user's transaction habits, preferences and behavior patterns to establish a user behavior baseline; The classification algorithm is used to train the preset user historical transaction data to obtain a behavior recognition model that can identify the user's normal transaction behavior.
8. The UnionPay payment terminal security algorithm verification method according to claim 1, characterized in that: If the current transaction is identified as fraudulent, the payment process is immediately interrupted, and if the current transaction of the preset user is identified as normal, the payment process is continued with the preset user and the bank, including: Based on the prediction results of the current transaction fraud identification, determine whether there is fraudulent behavior in the current transaction; When there is fraud in the current transaction, an immediate payment interruption operation is triggered, and the reason for the payment interruption operation is fed back to the preset user and the bank that opened the input card number; When there is no fraud in the current transaction, the information is fed back to the opening bank; The account opening bank deducts money according to the transaction amount, accepts the deduction result of the account opening bank and feeds it back to the current transaction merchant and the preset user, and completes the transaction payment process.
9. The UnionPay payment terminal security algorithm verification method according to claim 1, characterized in that: The transaction process involves collecting and screening all data generated by the four transaction parties, namely, users, merchants, UnionPay and banks, to obtain the transaction data of each transaction party, encrypting the transaction data of each transaction party and uploading it to the blockchain network in real time; Among them, a unique key C1 is set for each transaction party, and the corresponding key C2 is generated by the characteristics of the transaction data generated during each transaction; The transaction data key C is generated by merging C1 and C2, and the transaction data key C is hashed to generate a transaction data hash value, which is then uploaded to the blockchain network for storage in real time.
10. A security algorithm verification system for UnionPay payment terminals, characterized in that: include: The terminal monitoring module is used to monitor the behavior of the payment terminal and, when detecting that a preset user inputs a bank card number, identify the security of the preset user input environment; The format verification module runs the Luhn algorithm to perform format verification on the input card number of the preset user. If the input card number format does not match, the user is immediately prompted to re-enter the number. A query and judgment module is used to verify the legitimacy of the hash value of the input card number through the Luhn algorithm when the format of the input card number is correct. If the legitimacy verification of the input card number is abnormal, the user is immediately prompted to re-enter the number, and the abnormal behavior is recorded and monitored; A parameter verification module is used to enter the identity verification phase after the input card number passes the legitimacy, and confirm whether the identity of the cardholder matches the preset user through at least two combined verification methods based on the bank card number information; The model recognition module is used to enter the transaction fraud behavior recognition stage after the identity matching is completed. Based on the preset user's current transaction information and behavior recognition model, it uses machine learning or rule engine and other technical means to identify whether there is fraud in the current transaction; The execution judgment module is used to immediately interrupt the payment process if it is identified that the current transaction involves fraud, and simultaneously the preset user and the bank, and to continue to complete the payment process if the current transaction of the preset user is identified as normal.
Citation Information
Patent Citations
Real-time anti-fraud method and system based on network data and storage medium
CN109300028A
Payment environment monitoring method and system
CN112508569A
Prepaid card rapid recharging and query system
CN116562865A
Internet of Things platform service management system based on intellectualization
CN117541260A
Anti-theft quick payment system for bank users
CN117974139A
Cited By
Unionpay electronic payment method and payment data query system
CN120197211A