Off-line verification method and device based on POS machine transaction
By acquiring card number history records and combining them with multi-factor authentication while the POS machine is offline, the problem of low security in offline POS operations is solved, achieving higher transaction security and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HORIZON TECH LTD
- Filing Date
- 2023-11-27
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional POS machines operate offline with low security, failing to effectively verify the legitimacy of transactions and the identity of the user.
When the POS machine is offline, it can obtain the card number's historical transaction records, calculate the similarity between the current transaction and the historical transaction, and verify the transaction by combining fingerprint recognition, transaction location, time, amount, and merchant ID, thereby improving transaction security.
It improves the security of POS transactions, prevents fraud and theft, ensures that transactions are conducted in legal locations, at legal times, and within legal limits, reduces illegal transactions, and enhances the reliability and security of transactions.
Smart Images

Figure CN122022797A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, specifically to an offline verification method and apparatus based on POS machine transactions. Background Technology
[0002] With the development of technology, POS machines are being used in various payment scenarios. For example, POS machines are the most common payment devices in retail stores, allowing customers to pay by swiping their cards. POS machines can read credit card, debit card, and mobile payment information to complete payment transactions. When the location of the POS machine lacks a network connection, such as in remote areas, temporary event venues, or during network outages, offline operation is often required for payments. The advantage of offline POS machine applications is that they can complete transactions without a network connection, improving transaction efficiency and increasing payment flexibility.
[0003] In traditional offline transactions, when a user makes a transaction using a payment card, the POS machine reads the magnetic stripe information on the card and performs offline card verification to check the card's authenticity and validity. This verification only includes checking the card number, expiration date, and status. This method has low security.
[0004] Therefore, there is an urgent need for an offline verification method and device based on POS machine transactions. Summary of the Invention
[0005] This application provides an offline verification method based on POS machine transactions, which solves the problem of low security in traditional offline verification methods.
[0006] The first aspect of this application provides an offline verification method for POS machine transactions. The method includes: monitoring whether the POS machine is in an offline state; when the POS machine is offline, obtaining the card number corresponding to the user's transaction card; querying the historical transaction records corresponding to the card number locally on the POS machine, the historical transaction records including the card number, the historical transaction goods corresponding to the card number, and the historical transaction amount corresponding to the card number, the historical transaction records corresponding to the card number being pre-stored locally on the POS machine; determining the similarity between the current transaction goods and the historical transaction goods; if the similarity is greater than or equal to a first preset similarity threshold, confirming that the transaction verification for the current transaction goods has passed, and allowing the transaction for the current transaction goods to proceed; if the similarity is less than the first preset similarity threshold and greater than a second preset similarity threshold, confirming that the transaction verification for the current transaction goods has failed, and performing identity verification on the user's transaction card, the identity verification being fingerprint recognition; if the similarity is less than or equal to the second preset similarity threshold, confirming that the transaction verification for the current transaction goods has failed, and terminating the transaction for the current transaction goods.
[0007] By employing the above technical solution, the user's identity can be identified through obtaining the card number when the POS machine is offline. Querying the historical transaction records corresponding to the card number locally on the POS machine allows for comparison of the user's past transaction history with the current transaction. Pre-storing historical transaction records locally speeds up the query process and reduces reliance on the server. By comparing the similarity between the current transaction and historical transactions, the legitimacy of the transaction can be determined, increasing the likelihood that the transaction was made by the cardholder themselves, thus enhancing the security of POS transactions and preventing fraud and unauthorized transactions.
[0008] Optionally, after determining the similarity between the current transaction product and historical transaction products, the method further includes: obtaining the current transaction location corresponding to the current transaction product; comparing the current transaction location with a preset transaction location database, where the preset transaction location database is a transaction address database stored locally on the POS machine; determining whether the current transaction location is in the preset transaction location database; if the current transaction location is in the preset transaction location database, then allowing the transaction of the current transaction product; if the current transaction location is not in the preset transaction location database, then terminating the transaction of the current transaction product.
[0009] By employing the above technical solution, the specific location information of the transaction can be obtained. By comparing the current transaction location with addresses in a preset transaction location database, it can be determined whether the transaction occurred within a preset transaction location. If the current transaction location exists in the preset transaction location database, it indicates that the transaction occurred within a preset legitimate transaction location. This operation can further enhance transaction security, effectively reducing the number of illegal transactions and increasing overall transaction security.
[0010] Optionally, after determining whether the current transaction location is in the preset transaction location database, the method further includes: obtaining the current transaction time corresponding to the current transaction product; determining whether the current transaction time is within the preset transaction time range; if the transaction time is within the preset transaction time range, then allowing the transaction of the current transaction product; if the transaction time is not within the preset transaction time range, then terminating the transaction of the current transaction product.
[0011] By employing the above technical solution, the specific time information of the transaction is obtained. By comparing the current transaction time with a preset transaction time range, it can be determined whether the transaction occurred within the preset legal transaction time. This step can further enhance transaction security. By determining whether the transaction time is within the preset transaction time range, transactions can be restricted to legal time periods, preventing illegal or suspicious transactions from occurring.
[0012] Optionally, after determining whether the transaction time is within the preset transaction time range, the method further includes: obtaining the current transaction amount corresponding to the current transaction product; determining whether the current transaction amount is within the preset transaction amount range; if the current transaction amount is within the preset transaction amount range, then allowing the transaction of the current transaction product; if the current transaction time is not within the preset transaction time range, then terminating the transaction of the current transaction product.
[0013] By employing the above technical solution, the specific amount information involved in the transaction can be obtained. By comparing the current transaction amount with a preset transaction amount range, it can be determined whether the transaction amount is within a reasonable range. If the current transaction amount is not within the preset transaction amount range, there may be transaction risks, and the transaction of the current goods needs to be terminated to protect user security. This can effectively avoid losses caused by POS machine fraud.
[0014] Optionally, after determining whether the current transaction amount is within the preset transaction amount range, the method further includes: obtaining the merchant ID corresponding to the current transaction product; determining whether the merchant ID is in the preset merchant blacklist; if the merchant ID is in the preset merchant blacklist, then allowing the transaction of the current transaction product; if the merchant ID is not in the preset merchant blacklist, then terminating the transaction of the current transaction product.
[0015] By employing the above technical solution, comparing the merchant ID corresponding to the currently traded product with a preset merchant blacklist, it can be determined whether the merchant is on the blacklist. If the merchant ID is on the preset blacklist, there may be issues with the merchant's reputation or a history of fraudulent activity, necessitating the suspension of the current transaction to protect user security. This operation restricts transactions with potentially risky merchants, preventing users from being affected by fraud or unscrupulous merchants. The technical effect of this solution is to improve the accuracy of merchant verification and increase transaction security.
[0016] Optionally, after monitoring whether the POS machine is in an offline state, the method further includes: when the POS machine is in an offline state, sending the transaction information of the POS machine in the offline state to the POS machine management platform. The offline state is the online state, and the transaction information includes the transaction card number, the transaction product, and the transaction amount.
[0017] By adopting the above technical solution, when the POS machine is in an offline state, the transaction information of the POS machine in offline mode is sent to the POS machine management platform. If the POS machine is in an online state, the transaction information that occurred offline can also be sent to the POS machine management platform. This step enables the recording of offline transactions. When the POS machine is in an offline state, the transaction information that occurred offline can be sent to the POS machine management platform for appropriate processing and recording. This ensures that offline transaction information is not lost and provides a basis for judgment in subsequent transaction operations, increasing the reliability and security of transactions.
[0018] Optionally, after monitoring whether the POS machine is in an offline state, the method further includes: when the POS machine is in an offline state, obtaining a preset merchant blacklist from the POS machine management platform, the preset merchant blacklist including the merchant IDs of abnormal transactions.
[0019] By adopting the above technical solution, and by obtaining the preset merchant blacklist from the POS machine management platform when connected to the network, the blacklist can be dynamically updated in real time, enabling the POS machine to promptly identify and terminate abnormal transactions.
[0020] A second aspect of this application provides an offline verification device based on POS machine transactions, the device comprising: a monitoring module, a processing module, a judgment module, and an execution module; The monitoring module is used to monitor whether the POS machine is in an offline state; The processing module is used to obtain the card number corresponding to the user's transaction card when the POS machine is offline; query the historical transaction records corresponding to the card number locally on the POS machine. The historical transaction records include the card number, the historical transaction items corresponding to the card number, and the historical transaction amount corresponding to the card number; the historical transaction records corresponding to the card number are pre-stored locally on the POS machine. The judgment module is used to determine the similarity between the current traded product and the historical traded products; The execution module is used to confirm that the transaction verification of the current product has passed if the similarity is greater than or equal to the first preset similarity threshold, and to allow the transaction of the current product to proceed; if the similarity is less than the first preset similarity threshold but greater than the second preset similarity threshold, it is confirmed that the transaction verification of the current product has failed, and the user's transaction card is identified by fingerprint recognition; if the similarity is less than or equal to the second preset similarity threshold, it is confirmed that the transaction verification of the current product has failed, and the transaction of the current product is terminated.
[0021] Optionally, after the judgment module determines the similarity between the current transaction product and historical transaction products, the method further includes: the processing module obtaining the current transaction location corresponding to the current transaction product; the processing module comparing the current transaction location with a preset transaction location database, which is a transaction address database stored locally on the POS machine; the judgment module determining whether the current transaction location is in the preset transaction location database; if the current transaction location is in the preset transaction location database, the execution module allowing the transaction of the current transaction product; if the current transaction location is not in the preset transaction location database, the execution module terminating the transaction of the current transaction product.
[0022] Optionally, after the judgment module determines whether the current transaction location is in the preset transaction location database, the method further includes: the processing module obtaining the current transaction time corresponding to the current transaction product; the processing module determining whether the current transaction time is within the preset transaction time range; if the transaction time is within the preset transaction time range, the execution module allowing the transaction of the current transaction product; if the transaction time is not within the preset transaction time range, the execution module terminating the transaction of the current transaction product.
[0023] Optionally, after the judgment module determines whether the transaction time is within the preset transaction time range, the method further includes: the processing module obtaining the current transaction amount corresponding to the current transaction product; the processing module determining whether the current transaction amount is within the preset transaction amount range; if the current transaction amount is within the preset transaction amount range, the execution module allowing the transaction of the current transaction product; if the current transaction time is not within the preset transaction time range, the execution module terminating the transaction of the current transaction product.
[0024] Optionally, after the judgment module determines whether the current transaction amount is within the preset transaction amount range, the method further includes: the processing module obtaining the merchant ID corresponding to the current transaction product; the judgment module determining whether the merchant ID is in the preset merchant blacklist; if the merchant ID is in the preset merchant blacklist, the execution module allowing the transaction of the current transaction product; if the merchant ID is not in the preset merchant blacklist, the execution module terminating the transaction of the current transaction product.
[0025] Optionally, after the monitoring module monitors whether the POS machine is in an offline state, the method further includes: when the POS machine is in an offline state, the processing module sends the transaction information of the POS machine in the offline state to the POS machine management platform. The offline state is the online state, and the transaction information includes the transaction card number, the transaction product, and the transaction amount.
[0026] Optionally, after the monitoring module monitors whether the POS machine is in an offline state, the method further includes: when the POS machine is in an offline state, the processing module obtains a preset merchant blacklist from the POS machine management platform, the preset merchant blacklist including the merchant IDs of abnormal transactions.
[0027] A third aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform any of the methods described above.
[0028] A fourth aspect of this application provides a computer-readable storage medium storing computer instructions. When the instructions are executed, the method steps described above are performed.
[0029] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. By comparing the similarity between the current transaction and the historical transaction, the legitimacy of the transaction can be determined, increasing the likelihood that the cardholder is operating the transaction. This also enhances the security of POS transactions and prevents fraud and theft.
[0030] 2. The current transaction amount is outside the preset transaction range, which may pose a transaction risk. It is necessary to terminate the current transaction to protect user security. This can effectively prevent losses caused by POS machine fraud.
[0031] 3. When the POS machine is in an offline state, transaction information occurring in this state can be sent to the POS machine management platform for processing and recording. This ensures that offline transaction information is not lost and provides a basis for judgment in subsequent transaction operations, increasing transaction reliability and security. Attached Figure Description
[0032] Figure 1 This is a flowchart illustrating a POS machine anti-tampering method provided in an embodiment of this application.
[0033] Figure 2 This is a schematic diagram of a POS machine anti-tampering device provided in an embodiment of this application.
[0034] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0035] Explanation of reference numerals in the attached drawings: 201, monitoring module; 202, processing module; 203, judgment module; 204, execution module; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. Detailed Implementation
[0036] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0037] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0038] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0039] This application provides an offline verification method for POS machine transactions, referring to... Figure 1 , Figure 1 This is a flowchart illustrating an offline verification method for POS machine transactions disclosed in an embodiment of this application. The method is applied to a server and includes steps S101 to S107, as follows: Step S101: Monitor whether the POS machine is offline.
[0040] In the steps described above, POS machines typically have various communication modules, such as Ethernet, WiFi, and 4G. By monitoring the connection status of these interfaces, it can be determined whether the POS machine is offline. Communication interface status detection obtains the interface connection status through the underlying network interface library or system API.
[0041] Step S102: When the POS machine is in offline mode, obtain the card number corresponding to the user's transaction card.
[0042] In the above steps, POS machines are typically equipped with magnetic stripe card readers that can read the magnetic stripe information on a user's transaction card. The magnetic stripe contains information such as the user's card number. The POS machine can obtain the card number corresponding to the user's transaction card by reading the magnetic stripe information. When the POS machine is offline, the user needs to enter their card number and PIN to verify their identity and the card number information. The POS machine uses this information to monitor the user's input and obtain the entered card number. Through the above technical means, the card number corresponding to a user's transaction card can be obtained even when the POS machine is offline.
[0043] Step S103: Query the historical transaction records corresponding to the card number locally on the POS machine. The historical transaction records include the card number, the historical transaction items corresponding to the card number, and the historical transaction amount corresponding to the card number; the historical transaction records corresponding to the card number are pre-stored locally on the POS machine.
[0044] In the steps described above, the POS machine uses a database to store transaction records. Each transaction is recorded and associated with its corresponding card number. To speed up queries, the POS machine can create an index for the card number in the database. The index can quickly locate the corresponding transaction record based on the card number, reducing query time. To ensure the POS machine can query historical transaction records offline, it needs to pre-store the historical transaction records corresponding to each card number locally. This can be achieved by synchronizing data with a server when the POS machine is connected to the internet. The POS machine can establish a communication connection with the server to obtain the latest historical transaction records and store them in the local database. To protect user privacy and transaction security, the POS machine typically encrypts sensitive information when storing historical transaction records. Encryption can be implemented using symmetric encryption algorithms (AES) or asymmetric encryption algorithms (RSA), and the key can be set as the password corresponding to the user's POS card number, ensuring that only users with the correct key can decrypt and access the data. Furthermore, to prevent data loss or corruption, the POS machine performs regular data backups. Backups can copy the database data to other storage media, such as hard drives or cloud storage, to ensure data recovery in case of unforeseen circumstances.
[0045] Using the above technical solutions, when the POS machine is offline, historical transaction records corresponding to a card number can be queried locally. The POS machine uses a database to store transaction records and quickly locates the corresponding record through data indexing. When the POS machine is connected to the network, it synchronizes data with the server and stores historical transaction records locally. Simultaneously, to protect data security, the POS machine encrypts the information. Furthermore, the POS machine performs data backup and recovery to prevent data loss. These technical measures ensure that the POS machine can quickly query historical transaction records even when offline, providing accurate data support.
[0046] Step S104: Determine the similarity between the current traded commodity and the historical traded commodities.
[0047] In the above steps, feature extraction algorithms are used to extract key features for both current and historical traded goods. These features can include information such as the product's name, description, and category. The degree of similarity between the features of the current traded goods and those of historical traded goods is determined by calculating the similarity. Cosine similarity is used for similarity calculation. To perform similarity calculation, a product similarity model is built using deep learning technology. This model is trained on historical transaction data to learn the relationships between product features. This model is stored in the POS machine's internal storage module, and similarity is calculated based on these relationships. A suitable threshold is pre-set to determine the similarity. Products exceeding the threshold are considered similar and are processed accordingly. By combining these techniques, the similarity between current and historical traded goods can be determined. Feature extraction algorithms extract key product features, and similarity calculation algorithms calculate the similarity between product features. Through the training and storage of the data model, features of historical traded goods can be quickly retrieved. Finally, based on the set threshold, the similarity between products can be determined, and appropriate processing can be performed. The above technical details enable the determination of product similarity, providing a more accurate and precise basis for judgment.
[0048] Step S105: If the similarity is greater than or equal to the first preset similarity threshold, the transaction verification of the current product is confirmed to be successful, and the transaction of the current product is allowed.
[0049] In the above steps, firstly, according to the similarity calculation method mentioned above, the characteristics of the current traded product are compared with the characteristics of historical traded products to obtain a similarity value. A first similarity threshold is preset, which can be set according to the actual situation. If the similarity of the current product is greater than or equal to the first preset similarity threshold, the current transaction is considered to have passed the verification, and the traded product is released.
[0050] Step S106: If the similarity is less than the first preset similarity threshold and the similarity is greater than the second preset similarity threshold, then the transaction verification of the current product is confirmed to be unsuccessful, and the user's transaction card is identified by fingerprint recognition.
[0051] In the above steps, similarly, according to the similarity calculation method mentioned above, the characteristics of the current traded product are compared with the characteristics of the historical traded products to obtain a similarity value.
[0052] In addition to the first preset similarity threshold, a second preset similarity threshold also needs to be set. If the similarity of the current product is less than the first preset similarity threshold but greater than the second preset similarity threshold, the transaction verification is considered to have failed, and the user's transaction card needs to be identified. Here, fingerprint recognition technology is used for identification. The user's identity is verified by collecting and comparing the user's fingerprint.
[0053] First, the system needs to collect the user's fingerprint information. This is done using devices such as fingerprint sensors. Fingerprint sensors can read the detailed features of a user's fingerprint and convert them into a digital fingerprint image or feature vector. After collecting the user's fingerprint information, the system compares it with already registered fingerprint information. This comparison can use feature matching algorithms to compare the currently collected fingerprint information with existing fingerprint information and calculate a similarity score or matching score. Based on the fingerprint comparison results, if the fingerprint similarity reaches a certain threshold (e.g., similarity greater than or equal to a set threshold), the user's identity is confirmed, and subsequent operations can proceed. Otherwise, identity verification fails.
[0054] Step S107: If the similarity is less than or equal to the second preset similarity threshold, the transaction verification of the current product is confirmed to have failed, and the transaction of the current product is terminated.
[0055] In the above steps, if the similarity of the current product is less than or equal to the second preset similarity threshold, the transaction verification is considered to have failed. After confirming that the transaction verification has failed, the system needs to terminate the transaction of the current product. It should be noted that the above termination step only applies to transactions in offline mode. When in a non-offline mode, i.e., in a networked mode, the user can re-initiate the transaction. This application does not limit transactions in a non-offline mode.
[0056] In one possible implementation, after determining the similarity between the current transaction product and historical transaction products, the method further includes: obtaining the current transaction location corresponding to the current transaction product; comparing the current transaction location with a preset transaction location database, wherein the preset transaction location database is a transaction address database stored locally on the POS machine; determining whether the current transaction location is in the preset transaction location database; if the current transaction location is in the preset transaction location database, then allowing the transaction of the current transaction product; if the current transaction location is not in the preset transaction location database, then terminating the transaction of the current transaction product.
[0057] Specifically, the POS machine has a built-in GPS module that receives satellite signals to obtain the latitude and longitude coordinates of its current location. The POS machine also locally stores a preset transaction location database. This database contains information on pre-defined trusted transaction locations, which can be compared with the current transaction location. The current transaction location is compared with the preset database. This is done by comparing the latitude and longitude of the locations. The comparison determines whether the current transaction location exists in the database. If it exists, the current transaction location is considered trusted, and the transaction can proceed. If it does not exist, the current transaction location is not among the preset trusted locations, and the transaction must be terminated.
[0058] In one possible implementation, after determining whether the current transaction location is in the preset transaction location database, the method further includes: obtaining the current transaction time corresponding to the current transaction product; determining whether the current transaction time is within the preset transaction time range; if the transaction time is within the preset transaction time range, then allowing the transaction of the current transaction product; if the transaction time is not within the preset transaction time range, then terminating the transaction of the current transaction product.
[0059] Specifically, POS machines typically have a built-in independent clock chip that can obtain the current date and time. This clock chip is powered by an independent battery, maintaining accurate time even in power outages or offline states. The POS machine can obtain the current transaction time by reading this clock chip. The POS machine's internal memory module has preset transaction time ranges set to limit the time period for transactions. This range can be set according to security considerations. The process involves comparing the current transaction time with the preset transaction time range, using a timestamp to determine if the transaction time falls within this range. If the transaction time is within the preset transaction time range, the transaction is allowed to proceed. If the transaction time is outside the preset transaction time range, the transaction is terminated.
[0060] For example, suppose the preset transaction time range is from 9:00 AM to 9:00 PM daily. When a transaction occurs, the POS machine obtains the current transaction time information, such as 10:00 AM. The system compares the current transaction time with the preset transaction time range. If 10:00 AM is within the preset transaction time range, the system will allow the transaction of the current item. If 10:00 AM is not within the preset transaction time range, the system will terminate the transaction of the current item.
[0061] In one possible implementation, after determining whether the transaction time is within a preset transaction time range, the method further includes: obtaining the current transaction amount corresponding to the current transaction product; determining whether the current transaction amount is within a preset transaction amount range; if the current transaction amount is within the preset transaction amount range, then allowing the transaction of the current transaction product; if the current transaction time is not within the preset transaction time range, then terminating the transaction of the current transaction product.
[0062] Specifically, during a transaction, the POS machine's internal storage contains a preset transaction amount range to limit the amount of money involved. This range can be set for security reasons, such as setting minimum and maximum transaction amounts. The current transaction amount is compared with the preset range. Numerical comparison operators (such as greater than, less than, and equal to) can be used to determine if the current transaction amount is within the preset range. If the current transaction amount is within the preset range, the system will allow the transaction to continue. If the current transaction amount is not within the preset range, the system will terminate the transaction and may display an error message to the user or take other appropriate actions.
[0063] In one possible implementation, after determining whether the current transaction amount is within a preset transaction amount range, the method further includes: obtaining the merchant ID corresponding to the current transaction product; determining whether the merchant ID is in a preset merchant blacklist; if the merchant ID is in the preset merchant blacklist, then allowing the transaction of the current transaction product; if the merchant ID is not in the preset merchant blacklist, then terminating the transaction of the current transaction product.
[0064] Specifically, during a transaction, the POS machine obtains the merchant ID of the currently traded item, which typically involves reading the merchant ID field from the transaction data. The POS machine's internal memory stores a preset merchant blacklist to restrict transactions from certain merchants. This blacklist can be maintained and updated by the relevant administrators of the POS and management platform, and includes some untrusted or risky merchant IDs. The obtained merchant ID of the currently traded item is compared with the preset merchant blacklist. List and database queries are used to determine if the merchant ID exists in the blacklist. If the merchant ID corresponding to the currently traded item is in the preset merchant blacklist, the system will allow the transaction to continue. If the merchant ID corresponding to the currently traded item is not in the preset merchant blacklist, the system will terminate the transaction, potentially displaying an error message to the user or taking other appropriate actions.
[0065] In one possible implementation, after monitoring whether the POS machine is in an offline state, the method further includes: when the POS machine is in an online state, sending the transaction information of the POS machine in the offline state to the POS machine management platform. The online state is the state connected to the network. The transaction information includes the transaction card number, the transaction product, and the transaction amount.
[0066] Specifically, when a POS machine is offline, it can still receive and process user transaction requests, but it cannot immediately send transaction information to the back-end system. This transaction information includes transaction amount, transaction time, and product information. The POS machine management platform is used to manage and monitor the status and transaction information of all POS machines. This platform can be a centralized system responsible for receiving and processing transaction information sent by POS machines, performing corresponding data processing and recording. When the POS machine switches from offline to online (networked) status, it sends the transaction information accumulated in the previous offline state to the POS machine management platform. This can be achieved by establishing a network connection with the POS machine and transmitting the transaction information to the POS machine management platform via the network. In step S103, the historical transaction records corresponding to the card number are queried locally on the POS machine. These historical transaction records come from the transaction records stored by the POS machine in the networked state.
[0067] For example, a POS machine might go offline due to a network failure, but users can still make transactions on it. While offline, the POS machine records information for each transaction, such as the transaction amount, time, and items purchased. Once the POS machine reconnects to the network, the system sends the transaction information from the offline state to the POS machine management platform for subsequent data processing and recording.
[0068] In one possible implementation, after monitoring whether the POS machine is in an offline state, the method further includes: when the POS machine is in an offline state, obtaining a preset merchant blacklist from the POS machine management platform, the preset merchant blacklist including the merchant IDs of abnormal transactions.
[0069] Specifically, the pre-defined merchant blacklist includes merchant IDs with abnormal transactions. These IDs are pre-screened and flagged to identify merchants with potential risks. Blacklisted merchants may have engaged in abnormal transaction behavior within a certain period, such as frequently requesting refunds, canceling orders, or using illegal means to obtain payments. Merchants may also be suspected of fraud, such as using stolen credit cards or engaging in fictitious transactions. Merchants may have violated the regulations of the POS machine management platform, such as illegally charging excessive transaction fees or exceeding transaction limits. Merchants may also engage in illegal activities, such as selling illegal goods or engaging in illegal gambling. All of the above merchants will be added to the blacklist.
[0070] Reference Figure 2 This application also provides an offline verification device based on POS machine transactions, which includes: a monitoring module 201, a processing module 202, a judgment module 203 and an execution module 204; Monitoring module 201 is used to monitor whether the POS machine is in an offline state; Processing module 202 is used to obtain the card number corresponding to the user's transaction card when the POS machine is in offline state; query the historical transaction records corresponding to the card number locally in the POS machine, the historical transaction records include the card number, the historical transaction items corresponding to the card number, and the historical transaction amount corresponding to the card number; and pre-store the historical transaction records corresponding to the card number locally in the POS machine. The judgment module 203 is used to determine the similarity between the current traded goods and the historical traded goods; The execution module 204 is configured to: if the similarity is greater than or equal to a first preset similarity threshold, confirm that the transaction verification of the current product has passed and allow the transaction of the current product to proceed; if the similarity is less than the first preset similarity threshold but greater than a second preset similarity threshold, confirm that the transaction verification of the current product has failed and perform identity verification on the user's transaction card, which is performed by fingerprint recognition; if the similarity is less than or equal to the second preset similarity threshold, confirm that the transaction verification of the current product has failed and terminate the transaction of the current product.
[0071] In one possible implementation, after the judgment module 203 determines the similarity between the current transaction product and historical transaction products, the method further includes: the processing module 202 obtaining the current transaction location corresponding to the current transaction product; the processing module 202 comparing the current transaction location with a preset transaction location database, the preset transaction location database being a transaction address database stored locally on the POS machine; the judgment module 203 determining whether the current transaction location is in the preset transaction location database; if the current transaction location is in the preset transaction location database, then the execution module 204 allowing the transaction of the current transaction product; if the current transaction location is not in the preset transaction location database, then the execution module 204 terminating the transaction of the current transaction product.
[0072] In one possible implementation, after the judgment module 203 determines whether the current transaction location is in the preset transaction location database, the method further includes: the processing module 202 obtaining the current transaction time corresponding to the current transaction product; the processing module 202 determining whether the current transaction time is within the preset transaction time range; if the transaction time is within the preset transaction time range, the execution module 204 allowing the transaction of the current transaction product; if the transaction time is not within the preset transaction time range, the execution module 204 terminating the transaction of the current transaction product.
[0073] In one possible implementation, after the judgment module 203 determines whether the transaction time is within the preset transaction time range, the method further includes: the processing module 202 obtaining the current transaction amount corresponding to the current transaction product; the processing module 202 determining whether the current transaction amount is within the preset transaction amount range; if the current transaction amount is within the preset transaction amount range, the execution module 204 allowing the transaction of the current transaction product; if the current transaction time is not within the preset transaction time range, the execution module 204 terminating the transaction of the current transaction product.
[0074] In one possible implementation, after the judgment module 203 determines whether the current transaction amount is within the preset transaction amount range, the method further includes: the processing module 202 obtaining the merchant ID corresponding to the current transaction product; the judgment module 203 determining whether the merchant ID is in the preset merchant blacklist; if the merchant ID is in the preset merchant blacklist, then the execution module 204 allows the transaction of the current transaction product; if the merchant ID is not in the preset merchant blacklist, then the execution module 204 terminates the transaction of the current transaction product.
[0075] In one possible implementation, after the monitoring module 201 monitors whether the POS machine is in an offline state, the method further includes: when the POS machine is in an offline state, the processing module 202 sends the transaction information of the POS machine in the offline state to the POS machine management platform. The offline state is the online state, and the transaction information includes the transaction card number, the transaction product, and the transaction amount.
[0076] In one possible implementation, after the monitoring module 201 monitors whether the POS machine is in an offline state, the method further includes: when the POS machine is in an offline state, the processing module 202 obtains a preset merchant blacklist from the POS machine management platform, the preset merchant blacklist including the merchant IDs of abnormal transactions.
[0077] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0078] This application also discloses an electronic device. (See reference...) Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. The electronic device 300 may include: at least one processor 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.
[0079] The communication bus 302 is used to enable communication between these components.
[0080] The user interface 303 may include a display screen and a camera. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0081] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0082] The processor 301 may include one or more processing cores. The processor 301 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 305, and by calling data stored in memory 305. Optionally, the processor 301 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 301 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.
[0083] The memory 305 may include random access memory (RAM) or read-only memory. Optionally, the memory 305 may include a non-transitory computer-readable storage medium. The memory 305 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned processor 301. (Refer to...) Figure 3 The memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for an offline verification method based on POS machine transactions.
[0084] exist Figure 3 In the illustrated electronic device 300, the user interface 303 is mainly used to provide an input interface for the user and to acquire user input data; while the processor 301 can be used to call an application program stored in the memory 305 for an offline verification method based on POS machine transactions. When executed by one or more processors 301, the electronic device 300 performs one or more of the methods described in the above embodiments. It should be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0085] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0086] In the various embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, 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 coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.
[0087] 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.
[0088] 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.
[0089] 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 device (CMD). 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 memory 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 of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0090] The above description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and the disclosure of practical truths.
[0091] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. An offline verification method for POS machine transactions, characterized in that, Applied to a POS machine, the method includes: Monitor whether the POS machine is in an offline state; When the POS machine is in an offline state, the card number corresponding to the user's transaction card is obtained; The POS machine queries the historical transaction records corresponding to the card number locally. The historical transaction records include the card number, the historical transaction items corresponding to the card number, and the historical transaction amount corresponding to the card number. The POS machine pre-stores the historical transaction records corresponding to the card number locally. Determine the similarity between the currently traded commodity and the historically traded commodities; If the similarity is greater than or equal to the first preset similarity threshold, then the transaction verification of the current transaction product is confirmed to be passed, and the transaction of the current transaction product is allowed. If the similarity is less than a first preset similarity threshold and the similarity is greater than a second preset similarity threshold, then the transaction verification of the current product is confirmed to have failed, and the user transaction card is identified by fingerprint recognition. If the similarity is less than or equal to the second preset similarity threshold, the transaction verification of the current transaction product is confirmed to have failed, and the transaction of the current transaction product is terminated.
2. The method according to claim 1, characterized in that, After determining the similarity between the current traded product and the historical traded products, the method further includes: Obtain the current transaction location corresponding to the currently traded commodity; The current transaction location is compared with a preset transaction location database, which is a transaction address database stored locally on the POS machine. Determine whether the current transaction location is in the preset transaction location database; If the current transaction location is in the preset transaction location database, then the transaction of the current transaction commodity is permitted; If the current transaction location is not in the preset transaction location database, the transaction of the current transaction item will be terminated.
3. The method according to claim 2, characterized in that, After determining whether the current transaction location is in the preset transaction location database, the method further includes: Obtain the current transaction time corresponding to the currently traded product; Determine whether the current transaction time is within the preset transaction time range; If the transaction time is within the preset transaction time range, then the transaction of the current commodity is permitted; If the transaction time is not within the preset transaction time range, the transaction of the current commodity will be terminated.
4. The method according to claim 3, characterized in that, After determining whether the transaction time is within the preset transaction time range, the method further includes: Obtain the current transaction amount corresponding to the currently traded product; Determine whether the current transaction amount is within the preset transaction amount range; If the current transaction amount is within the preset transaction amount range, then the transaction of the current product is permitted; If the current transaction time is not within the preset transaction time range, the transaction of the current transaction commodity will be terminated.
5. The method according to claim 4, characterized in that, After determining whether the current transaction amount is within the preset transaction amount range, the method further includes: Obtain the merchant ID corresponding to the currently traded product; Determine whether the merchant ID is in the preset merchant blacklist; If the merchant ID is in the preset merchant blacklist, the transaction of the current product will be allowed. If the merchant ID is not in the preset merchant blacklist, the transaction of the current product will be terminated.
6. The method according to claim 1, characterized in that, After monitoring whether the POS machine is offline, the method further includes: When the POS machine is in an offline state, the transaction information of the POS machine in the offline state is sent to the POS machine management platform. The offline state is the online state. The transaction information includes the transaction card number, the transaction product and the transaction amount.
7. The method according to claim 1, characterized in that, After monitoring whether the POS machine is offline, the method further includes: When the POS machine is in an offline state, a preset merchant blacklist is obtained from the POS machine management platform. The preset merchant blacklist includes the merchant IDs of abnormal transactions.
8. An offline verification device based on POS machine transactions, characterized in that, The device includes: a monitoring module (201), a processing module (202), a judgment module (203), and an execution module (204); The monitoring module (201) is used to monitor whether the POS machine is in an offline state; The processing module (202) is used to obtain the card number corresponding to the user's transaction card when the POS machine is in an offline state; query the historical transaction records corresponding to the card number locally on the POS machine, the historical transaction records including the card number, the historical transaction items corresponding to the card number and the historical transaction amount corresponding to the card number; and pre-store the historical transaction records corresponding to the card number locally on the POS machine. The judgment module (203) is used to judge the similarity between the current transaction product and the historical transaction product; The execution module (204) is used to confirm that the transaction verification of the current product has passed and to allow the transaction of the current product if the similarity is greater than or equal to the first preset similarity threshold. The execution module (204) is used to confirm that the transaction verification of the current product fails if the similarity is less than a first preset similarity threshold and the similarity is greater than a second preset similarity threshold, and to perform identity recognition on the user transaction card, wherein the identity recognition is fingerprint recognition. The execution module (204) is used to confirm that the transaction verification of the current product fails and terminate the transaction of the current product if the similarity is less than or equal to the second preset similarity threshold.
9. An electronic device, characterized in that, The device includes a processor (301), a memory (305), a user interface (303), and a network interface (304). The memory (305) is used to store instructions. The user interface (303) and the network interface (304) are used to communicate with other devices. The processor (301) is used to execute the instructions stored in the memory (305) to cause the electronic device (300) to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the steps of the method as described in any one of claims 1-7.