POS terminal payment method, electronic device and program product

By introducing order query and payment processes with simplified numbering and multiple payment methods into the POS terminal, the problem of difficulty in input and error rate caused by complex order numbers in traditional POS terminals is solved, and a more efficient, accurate and secure transaction process is achieved.

CN120355415APending Publication Date: 2025-07-22北京理房通支付科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510369696.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

In traditional POS terminals, order numbers are complex and lengthy, resulting in increased difficulty in manual input and high error rate, affecting transaction efficiency and accuracy.

Method used

It provides an order query interface, uses simplified numbers to conduct order query and payment, obtain order information through the simplified numbers generated by the server as query conditions, and checks and confirms payment instructions in the payment interface, supports a variety of payment methods, including card swiping, code scanning and cash payment, and uses the main and backup asymmetric data storage mechanism to manage simplified numbers.

Benefits of technology

It simplifies the input process of order numbers, improves transaction efficiency and accuracy, reduces operational errors, enhances the transparency and security of payments, supports multiple payment methods, and ensures transaction traceability and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355415A_ABST
    Figure CN120355415A_ABST
Patent Text Reader

Abstract

The invention provides a POS terminal payment method, electronic equipment and a program product. The POS terminal payment method comprises the following steps: providing an order query interface; in response to a received order query instruction of a to-be-queried order input by a user based on the order query interface, providing an order payment interface; the order query instruction carries a simplified number of an order number of a to-be-queried order input by a user, and the simplified number is used as a query condition to obtain order information of the to-be-queried order from a server for the user to check; the order payment interface displays at least one payment control and order information of an order to be queried; and in response to a received payment instruction input by the user based on a target payment control in the at least one payment control, providing a payment result interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to technical fields such as electronic payment. In particular, the present disclosure relates to a payment method for a POS terminal, an electronic device, a storage medium, and a program product. Background Art

[0002] In today's business transaction environment, with the rapid development of electronic payment and information management, the Point of Sale (POS) has become an indispensable tool in the retail and service industries, widely used for processing customer payment transactions. As a key interaction interface between merchants and customers, the POS terminal can not only complete payment functions, but also provide multiple functions such as price verification, promotion application, and inventory update.

[0003] In the transaction process, each transaction is assigned an order number. This order number is not only an identifier for the transaction, but also plays a crucial role in subsequent transaction queries, reconciliation, after-sales processing, inventory management, and financial audits. Whether it is when a customer returns or exchanges goods, or when a merchant reconciles accounts, the order number is the core element to ensure accurate transaction identification and traceability. Traditional POS terminals usually rely on the order number manually input by the merchant to complete the payment operation.

[0004] However, with the rapid development of e-commerce and the explosion of the order volume, the format and length of the order number have become increasingly complex and lengthy, which not only increases the difficulty of manual input, but also is prone to errors, affecting the efficiency and accuracy of transactions. Summary of the Invention

[0005] The present disclosure provides a payment method for a POS terminal, an electronic device, a storage medium, and a program product.

[0006] According to one aspect of the present disclosure, there is provided a payment method for a POS terminal, including: Providing an order query interface; In response to an order query instruction of a to-be-query order input by a user based on the order query interface, providing an order payment interface; the order query instruction carries a simplified number of the order number of the to-be-query order input by the user, and the simplified number is used as a query condition to obtain the order information of the to-be-query order from a server for the user to check; the order payment interface displays at least one payment control and the order information of the to-be-query order; In response to a payment instruction input by the user based on a target payment control in the at least one payment control when the user checks that the order information is correct, providing a payment result interface.

[0007] The POS terminal payment method according to at least one embodiment of the present disclosure, before providing the order query interface, further includes: providing a main interface, and the content displayed on the main interface includes a collection control; The providing of the order query interface includes: in response to an operation of the user on the collection control received, providing an order query interface.

[0008] The POS terminal payment method according to at least one embodiment of the present disclosure, the providing of a payment result interface in response to a payment instruction input by a user based on a target payment control among the at least one payment control when the user checks that the order information is correct includes: In response to a payment instruction input by a user based on a target payment control among the at least one payment control when the user checks that the order information is correct, providing a payment confirmation interface; In response to a payment confirmation instruction input by the user based on the payment confirmation interface received, providing a payment result interface.

[0009] The POS terminal payment method according to at least one embodiment of the present disclosure, the providing of a payment result interface in response to a payment confirmation instruction input by the user based on the payment confirmation interface includes: In response to a payment confirmation instruction input by the user based on the payment confirmation interface received, providing a signature interface; In response to a signature confirmation instruction input by the user based on the signature interface received, providing a payment result interface.

[0010] The POS terminal payment method according to at least one embodiment of the present disclosure, when the payment result interface is a payment success interface and a voucher control is displayed on the payment success interface, after providing the payment result interface, further includes: In response to an operation of the user on the voucher control received, controlling to provide a payment voucher for the order to be queried.

[0011] The POS terminal payment method according to at least one embodiment of the present disclosure, the at least one payment control includes: one or more of a card - swiping payment control, a code - scanning payment control, and a cash payment control; The payment result interface includes: a payment success interface or a payment failure interface.

[0012] The POS terminal payment method according to at least one embodiment of the present disclosure, the providing of an order payment interface in response to an order query instruction of an order to be queried input by the user based on the order query interface includes: In response to an order query instruction of an order to be queried input by a received user based on the order query interface, control is performed to send the order query instruction to the server, so that the server determines a relevant order number according to the simplified number carried in the order query instruction and obtains order information according to the relevant order number and then returns it; In response to the order information returned by the received server, an order payment interface is provided.

[0013] According to the POS terminal payment method of at least one embodiment of the present disclosure, when the order information is controlled by a lock mechanism and the acquisition fails, it further includes: In response to the failure information sent by the received server, a failure interface for displaying the failure information is provided.

[0014] According to the POS terminal payment method of at least one embodiment of the present disclosure, the order number is generated by the server in response to a settlement request sent by a user terminal; The simplified number is a number obtained by the server after generating the order number, associated with the order number, and sent to the user terminal for the user to view and then input on the POS terminal.

[0015] According to the POS terminal payment method of at least one embodiment of the present disclosure, the simplified number is a number obtained by the server after generating the order number, associated with the order number, and sent to the user terminal, including: The simplified number is obtained by the server based on a primary-backup asymmetric data storage mechanism.

[0016] According to the POS terminal payment method of at least one embodiment of the present disclosure, when the simplified number is obtained by the server based on a primary-backup asymmetric data storage mechanism, the server is specifically used to attempt to retrieve the simplified number from the primary database; In response to a failed attempt, retrieve the simplified number from the standby database; In response to a successful attempt or a successful retrieval from the standby database, lock the simplified number.

[0017] According to the POS terminal payment method of at least one embodiment of the present disclosure, during the process of locking the simplified number, the server is further used to obtain the order status of the order to be queried of the simplified number and the lock duration of the simplified number; Judge whether the simplified number meets the number release condition according to the order status and the lock duration; In response to the simplified number meeting the number release condition, release the simplified number and put the simplified number back into the retrieved database.

[0018] According to the POS terminal payment method of at least one embodiment of the present disclosure, the server is further configured to, in response to the simplified number not meeting the number release condition, execute the determination of whether the simplified number meets the number release condition according to the order status and the lock duration, and release the simplified number and return the simplified number to the retrieved database until the termination determination condition is reached.

[0019] According to the POS terminal payment method of at least one embodiment of the present disclosure, the order status is that the order payment is completed, the order is cancelled, or the order is not paid.

[0020] According to the POS terminal payment method of at least one embodiment of the present disclosure, the number release conditions include: the lock duration exceeds the lock duration threshold and the order status is that the order is not paid; or, the lock duration does not exceed the lock duration threshold and the order status is that the order payment is completed or the order is cancelled.

[0021] According to another aspect of the present disclosure, there is provided an electronic device, including: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, such that the processor executes the POS terminal payment method of any one of the embodiments of the present disclosure.

[0022] According to still another aspect of the present disclosure, there is provided a readable storage medium storing execution instructions, and when the execution instructions are executed by a processor, they are used to implement the POS terminal payment method of any one of the embodiments of the present disclosure.

[0023] According to yet another aspect of the present disclosure, there is provided a computer program product including a computer program, and when the computer program is executed by a processor, it implements the POS terminal payment method of any one of the embodiments of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings illustrate exemplary embodiments of the present disclosure and, together with the description thereof, are used to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are included in this specification and form a part of this specification.

[0025] Figure 1 is a schematic diagram of an application scenario of the POS terminal payment method according to an embodiment of the present disclosure.

[0026] Figure 2 is the flow of the POS terminal payment method according to an embodiment of the present disclosure Figure 1 .

[0027] Figure 3 isFigure 2 Schematic diagram of the order query interface in the POS terminal payment method shown

[0028] Figure 4 is Figure 2 Schematic diagram of the order payment interface in the POS terminal payment method shown

[0029] Figure 5 is Figure 2 Schematic diagram of the payment result interface in the POS terminal payment method shown

[0030] Figure 6 is the flow of the POS terminal payment method according to an embodiment of the present disclosure Figure 2 。

[0031] Figure 7 is Figure 6 Schematic diagram of the main interface in the POS terminal payment method shown

[0032] Figure 8 is Figure 2 Flowchart of the payment confirmation method in the POS terminal payment method shown

[0033] Figure 9 is Figure 8 Schematic diagram of the payment confirmation interface in the payment confirmation method shown

[0034] Figure 10 is Figure 8 Flowchart of the signature confirmation method in the payment confirmation method shown

[0035] Figure 11 is Figure 10 Schematic diagram of the signature interface in the signature confirmation method shown

[0036] Figure 12 is the flow of the POS terminal payment method according to an embodiment of the present disclosure Figure 3 。

[0037] Figure 13 is Figure 2 Flowchart of the payment interface providing method in the POS terminal payment method shown

[0038] Figure 14 Interactive schematic flowchart of the POS terminal payment method according to an embodiment of the present disclosure

[0039] Figure 15 is Figure 14 Schematic diagram of the display interface of the short code in the POS terminal payment method shown

[0040] Figure 16It is a schematic block diagram of a POS terminal payment device according to an embodiment of the present disclosure.

[0041] Figure 17 It is a schematic block diagram of an electronic device according to an embodiment of the present disclosure. Detailed implementation manners

[0042] The present disclosure will be further described in detail below with reference to the accompanying drawings and examples. It can be understood that the specific examples described herein are only for explaining the relevant content and do not limit the present disclosure. Additionally, it should be noted that for the sake of description, only parts related to the present disclosure are shown in the drawings.

[0043] It should be noted that, without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other. The technical solutions of the present disclosure will be described in detail below with reference to the drawings and in combination with the embodiments.

[0044] Taking a large-scale comprehensive supermarket with high customer flow as an example, after a customer selects goods and goes to the cashier area to check out. After the customer scans the goods in the cashier area, the system generates a complex order number such as "20231105SF081520XYZQ" based on multi-dimensional information such as the current date, time, store number, and serial number; among them, 20231105 is the date of the day, SF represents the fresh food area, 081520 is the serial number, and the last XYZQ is the code used to distinguish different batches. When the user chooses to pay using the POS terminal, they need to manually enter the order number on the POS terminal to search for the order, confirm the payment, and write off the inventory. For an order number like "20231105SF081520XYZQ", which is a mixture of numbers and letters, it is very easy to enter the wrong numbers or confuse numbers and letters during the busy peak hours, and once entered incorrectly, it is necessary to operate again, greatly reducing the efficiency and accuracy of the transaction.

[0045] Figure 1 Shows an application scenario of a POS terminal payment method according to an embodiment of the present disclosure. In this application scenario, it may include a user terminal 100, a server 200, and a POS terminal 300. The user terminal 100 and the POS terminal 300 are respectively connected to the server 200 through a network. The user terminal 100 may be equipped with a scanning device (such as a two-dimensional code scanner, a bar code scanner, etc.) for scanning codes, uploading a settlement request, receiving, and displaying a simplified number; the server 200 is used to generate an order number according to the settlement request and obtain the simplified number and then send it to the user terminal 100; the POS terminal 300 is used to send the simplified number input by the user to the server 200; the server 200 is also used to obtain the order information according to the simplified number sent by the POS terminal 300 and then return it to the POS terminal 300, so that the POS terminal 300 displays the order information for the user to complete the payment when the information is verified to be correct.

[0046] For ease of description and to make the technical solutions of the specific embodiments of the present disclosure easier to understand, before describing the POS terminal payment method implemented in the present disclosure, the technical terms involved in the specific embodiments of the present disclosure are explained as follows: The POS (Point of Sale) terminal is used to assist merchants in completing many important tasks such as commodity sales, payment settlement, membership management, and transaction data management. It is a key tool for realizing the digitization and convenience of offline transactions.

[0047] Order information refers to the data and details related to a transaction.

[0048] Figure 2 The overall flowchart of the POS terminal payment method M100 according to an embodiment of the present disclosure is shown. As Figure 2 shown, the POS terminal payment method includes steps S110 to S130. Among them, the POS terminal payment method can be executed by an electronic device such as a POS terminal.

[0049] Specifically, Figure 2 the shown POS terminal payment method includes: Step S110, providing an order query interface.

[0050] In some embodiments of the present disclosure, the order query interface provided by step S110 is an interface that allows users to query target orders; its main function is to enable users to accurately locate the order to be queried according to the query conditions. The order query interface can be the main interface or a sub-interface of the main interface.

[0051] Figure 3 is a schematic diagram of an order query interface according to an embodiment of the present disclosure. The order query interface realizes order query through a search box and a query control. When querying an order, the user can enter a search term in the search box and click the query control to realize order query.

[0052] Step S120, in response to the received order query instruction of the order to be queried input by the user based on the order query interface, providing an order payment interface.

[0053] In some embodiments of the present disclosure, the order query instruction in step S120 carries a simplified number of the order number of the order to be queried input by the user. The simplified number is used as a query condition to obtain the order information of the order to be queried from the server for the user to check; the order payment interface displays at least one payment control and the order information of the order to be queried.

[0054] For Figure 3Taking the order query interface shown as an example, when the user enters a simplified number in the search box and clicks the query control, the POS terminal can receive the order query instruction of the order to be queried input by the user based on the order query interface.

[0055] At least one payment control displayed on the order payment interface is used to interact with the payment system to help the user complete the payment process; different payment controls support different payment methods. In step S120, at least one payment control may include one or more of a card swiping payment control, a code scanning payment control, a cash payment control, and an NFC payment control.

[0056] The order information displayed on the order payment interface allows the user to check the specific content of the order, thereby ensuring that the amount actually paid by the customer is consistent with the goods or services actually purchased by the customer and avoiding payment errors.

[0057] Figure 4 is a schematic diagram of an order payment interface according to an embodiment of the present disclosure; in Figure 4 In the shown order payment interface, at least one payment control includes a card swiping payment control and a code scanning payment control. Above at least one payment control is the order information. After the user confirms that the order information is correct, they can select one of the payment controls as the target payment control for payment according to their needs.

[0058] Step S130, in response to the payment instruction input based on the target payment control in at least one payment control when the user checks that the order information is correct, provide a payment result interface.

[0059] In some embodiments of the present disclosure, after the user determines that the order information displayed on the order payment interface is correct, the user may select a suitable payment control from at least one payment control as the target payment control according to factors such as payment method availability, payment convenience, personal preference, payment security, and payment methods supported by the merchant; after the user clicks the target payment control, the POS terminal will obtain a payment instruction and send the payment instruction to the payment gateway or the payment system of the bank for verification. After the payment gateway or the payment system of the bank receives the payment instruction, it will verify the integrity and legality of the payment instruction to confirm whether the payment instruction is valid; if the payment instruction is valid, the payment gateway or the payment system of the bank will return a payment authorization confirmation, indicating that the payment can continue to be processed. At this time, the payment result interface provided by the POS terminal is a payment success interface; if the payment instruction is invalid, the payment gateway or the payment system of the bank will return a failure response. At this time, the payment result interface provided by the POS terminal is a payment failure interface. In particular, for security reasons, the POS terminal may encrypt the payment instruction (such as using encryption algorithms such as Secure Sockets Layer (SSL), Transport Layer Security (TLS), etc.), and then send the encrypted payment instruction to the payment gateway or the payment system of the bank through an encrypted channel.

[0060] Taking the target payment control as the card - swiping payment control as an example, after the user clicks the card - swiping payment control, the POS terminal will prompt the user to insert the bank card or swipe the card; at this time, the POS terminal reads the magnetic stripe or chip information of the bank card and obtains the payment instruction.

[0061] Taking the target payment control as the code - scanning payment control as an example, after the user clicks the code - scanning payment control, the POS terminal will generate a QR code or display a payment code, and the user can make a payment by scanning the QR code or the payment code; at this time, the POS terminal obtains the payment instruction based on the payment information read from the QR code in the user's code - scanning operation.

[0062] The payment result interface is usually used to clearly display the transaction result to the user and provide detailed information about the transaction. The core function of this payment result interface is to clearly display the payment status, amount, merchant information, etc., to ensure that the user has a clear understanding of the payment transaction. In addition to the above information, the payment result interface can also provide convenient follow - up operation options for the user, such as refund, invoice printing, evaluation, etc., enabling the user to continue to have a good experience after the payment is completed.

[0063] Figure 5It is an example diagram of a payment result interface where the payment is successful in an embodiment of the present disclosure; in this payment result interface, the transaction result is displayed at the top, relevant transaction information is displayed in the middle part, and subsequent operation options "Return to Home Page" and "Print Receipt" are provided at the bottom, so that users can perform operations such as order query and other order payments after payment, or provide receipts to guarantee after-sales service for customers.

[0064] The POS terminal payment method provided by the present disclosure realizes POS terminal payment based on a simplified number. Since the simplified number is more concise, easier to remember and input than the traditional order number, this POS terminal payment method solves the problem in the prior art that with the rapid development of e-commerce and the explosion of the order volume, the format and length of the order number become more and more complex and lengthy, which not only increases the difficulty of manual input, but also is prone to errors, affecting the efficiency and accuracy of transactions.

[0065] Furthermore, the POS terminal payment method provided by the present disclosure may further include step S140 as shown Figure 6 before step S110.

[0066] Step S140: Provide a main interface.

[0067] In some embodiments of the present disclosure, the main interface provided by step S140 is the main screen of the POS terminal that users see when making a payment through the POS terminal. It carries necessary functional modules during the payment process and helps users complete payments, queries and other related operations efficiently.

[0068] The content displayed on the main interface in step S140 includes a collection control; in addition to the collection control, the content displayed on the main interface may further include one or more of a find order control, a transaction list control, a card balance check control, a group purchase verification control, and a terminal setting control, etc. Figure 7 It is an example diagram of the main interface in an embodiment of the present disclosure; Figure 7 The main interface shown is provided with a collection control, a bill control, a refund control, a shift handover control, an installment control, and an app store control.

[0069] At this time, step S110 is specifically to provide an order query interface in response to the operation of the collection control received from the user.

[0070] The main interface of the POS terminal is usually the initial interface displayed after the POS terminal is turned on or started; when a user needs to make a payment through the POS terminal, they can click on the collection control on the main interface, so that the POS terminal receives the operation of the collection control from the user. When the POS terminal receives the operation of the collection control from the user, it performs an interface jump to provide an order query interface.

[0071] Regarding step S130, in some embodiments of the present disclosure, it may include steps S131 to S132 as Figure 8 shown.

[0072] Step S131, in response to the payment instruction input by the target payment control in at least one payment control when the user checks that the order information is correct, provide a payment confirmation interface.

[0073] In some embodiments of the present disclosure, the payment confirmation interface in step S131 is an interface used to display payment information and confirm it when the payment information is correct during the payment process.

[0074] Figure 9 It is an example diagram of the payment confirmation interface of an embodiment of the present disclosure. In Figure 9 the shown payment confirmation interface, the payment information is displayed in the form of a pop-up box to guide the user to make a response.

[0075] Step S132, in response to the payment confirmation instruction input by the user based on the payment confirmation interface, provide a payment result interface.

[0076] In some embodiments of the present disclosure, after the user confirms that the payment information displayed on the payment confirmation interface is correct, the user can click the confirmation control on the payment confirmation interface to enable the POS terminal to receive the payment confirmation instruction input by the user based on the payment confirmation interface.

[0077] By performing payment information confirmation before payment through steps S131 to S132, the correctness of transaction information can be ensured, the error rate of operations can be reduced, and the transparency of payment can be improved.

[0078] Regarding step S132, in some embodiments of the present disclosure, it may include steps S1321 to S1322 as Figure 10 shown.

[0079] Step S1321, in response to the payment confirmation instruction input by the user based on the payment confirmation interface, provide a signature interface.

[0080] In some embodiments of the present disclosure, the signature interface in step S1321 is an interface for the customer to confirm the transaction through an electronic signature after confirming the order information and payment method during the POS terminal payment process.

[0081] Figure 11 It is an example diagram of the signature interface of an embodiment of the present disclosure.

[0082] Step S1322, in response to the signature confirmation instruction input by the user based on the signature interface, provide a payment result interface.

[0083] In some embodiments of the present disclosure, on the signature interface, the user can operate the confirmation control on the signature interface after signing through the touch screen of the POS terminal, the signature pad of the POS terminal peripherals or other input devices, as an authorization for payment, so that the POS terminal receives the signature confirmation instruction input by the user based on the signature interface. If the signature is incorrect, the signature can be re-entered through the rewrite control.

[0084] The electronic signature function is provided through steps S1321 to S1322 to ensure that the user agrees to the transaction amount and payment method, enhance the security of payment, prevent fraud, provide transaction vouchers, and meet compliance requirements.

[0085] Further, in the POS terminal payment method provided by the present disclosure, when the payment result interface in step S130 is a payment success interface and the payment success interface displays a voucher control, after providing the payment result interface through step S130, it may further include steps S150 as Figure 12 shown.

[0086] Step S150, in response to the operation of the voucher control received from the user, controls to provide the payment voucher of the order to be queried.

[0087] In some embodiments of the present disclosure, when the POS terminal is built-in with a printer, the way to control the provision of the payment voucher through step S150 can be to control the built-in printer to print the payment voucher; the way to control the provision of the payment voucher through step S150 can also be to control to provide the payment voucher by means of text message, email, two-dimensional code, etc. The payment voucher may include merchant information, transaction details (such as goods, amount, time, etc.), payment method, transaction status and other contents.

[0088] After the payment is successful, the payment voucher is provided through step S150 as a reference basis for transaction disputes or after-sales, improving the transparency and traceability of the transaction.

[0089] Regarding step S120, in some embodiments of the present disclosure, it may include steps S121 to S122 as Figure 13 shown.

[0090] Step S121, in response to the order query instruction of the order to be queried input by the user based on the order query interface received, controls to send the order query instruction to the server, so that the server determines the relevant order number according to the simplified number carried in the order query instruction and obtains the order information according to the relevant order number and then returns it.

[0091] Step S122, in response to the order information returned by the server, provides an order payment interface.

[0092] In some embodiments of the present disclosure, after the POS terminal receives the order information returned by the server, it may generate an order payment interface according to the order information and then provide the order payment interface through step S122.

[0093] Obtaining the order information from the server through steps S121 to S122 can support multi-terminal operations and improve the consistency of remote operations.

[0094] In some embodiments of the present disclosure, when the server receives an order query instruction sent by the POS terminal, the specific processing process of the server may include: the server responds to the received order query instruction carried with a simplified number sent by the POS terminal, and obtains the order number related to the simplified number (the code used to uniquely identify each order in commercial transactions); obtains the order information according to the order number; controls to send the order information to the POS terminal.

[0095] This order number is generated by the server in response to the settlement request sent by the user terminal; the simplified number is the number obtained by the server after generating the order number, associated with the order number, and sent to the user terminal for the user to view and then input on the POS terminal.

[0096] The process for the server to process the settlement request may include: the server responds to the received settlement request sent by the user terminal, obtains the order information according to the settlement request and generates an order number; obtains the simplified number of the order number; controls to send the simplified number to the user terminal for the user to input on the POS terminal.

[0097] In some embodiments of the present disclosure, after the buyer selects the goods, the selected goods can be entered on the user terminal by the buyer himself or by the seller; after the goods entry is completed, the buyer or the seller inputs a settlement instruction on the user terminal; the user terminal responds to the received settlement instruction and sends a settlement request carrying the information of the selected goods (such as a list of goods, quantity, unit price, etc.) to the server. Among them, the way to enter the selected goods on the user terminal can be to manually input the goods information through a keyboard or touch screen, click or select goods from the displayed list of goods, scan the bar code or two-dimensional code on the goods through a bar code scanner or camera, use a radio frequency identification (RFID) reading device to scan the RFID tag on the goods, or automatically match the goods information through image recognition technology, etc.

[0098] In particular, to facilitate the processing and differentiation of different orders and support subsequent processes such as order management, statistical analysis, and payment processing, in addition to the information of the selected goods, the settlement request may also carry additional information such as the buyer ID, seller ID, terminal number, timestamp, etc. Among them, the buyer ID can help the seller and the system identify the user's identity, ensure the correctness and security of the transaction process, and is also helpful for subsequent user behavior analysis, account management, etc.; the seller ID can help the system distinguish orders from different sellers, ensure the correct attribution of orders, and is also helpful for statistical and summarizing the sales data of the seller; the terminal number can help the system determine which specific device initiated the order request, provide the source of the transaction, so as to trace the origin in case of anomalies or disputes; the timestamp can ensure the uniqueness of the generation time of each order, prevent the occurrence of duplicate orders due to system problems, and can also help the system manage the entire life cycle of the order.

[0099] In addition to the above information, the settlement request may also carry promotion information (used to transmit relevant promotion codes or discount information to ensure the correct use of discounts when generating orders), terminal IP address (used for security verification to prevent malicious operations), and other information.

[0100] The server can obtain order information based on the information of the selected goods carried in the settlement request. The obtained order information may include the order generation time, commodity information, amount information (such as including the total commodity amount, promotion or discount amount, tax amount, and the final amount to be paid), transaction information (such as including buyer information, seller information, payment status (initially "pending payment")), other information (such as including supplementary instructions of the user or the system for the order, delivery information, inventory occupancy information), etc.

[0101] The server can generate an order number based on methods such as Universally Unique Identifier (UUID), hash algorithm, auto-incrementing ID, or predefined rules. Among them, generating an order number based on predefined rules means creating a unique order code according to a set of pre-determined standards or patterns; these rules are usually specified according to factors such as business requirements, data management requirements, and operation processes; common elements of predefined rules may include: time-related elements, random number elements, business type identification elements, user information elements, etc.

[0102] In particular, to ensure the integrity, legality, accuracy, and security of the settlement request, the settlement request can be first verified before generating the order number, so as to ensure the accuracy, compliance, and security of order generation. Among them, the methods for verifying the settlement request may include: checking whether the commodity information is complete and the format is correct, verifying whether the identity is legal, etc.

[0103] In some embodiments of the present disclosure, for the convenience of management and to simplify numbering, optional simplified numbers can be generated in advance according to the number of digits of the number and the optional simplified numbers can be placed in a database, so that the server can directly obtain the simplified numbers from the database. In particular, to improve the reading efficiency and high-concurrency processing ability, placing the optional simplified numbers in the database can specifically be to place the optional simplified numbers in the Zset ordered set of the Redis database.

[0104] In some embodiments of the present disclosure, after obtaining the simplified number of the order number, the simplified number can be associated with the order number for subsequent order queries.

[0105] In some embodiments of the present disclosure, after the user terminal receives the simplified number sent by the server, the user terminal can control the display of the simplified number, enabling the user to view and enter the simplified number on the POS terminal. There can be a time difference between the user terminal display and the user input on the POS terminal. The POS terminal ultimately used by the user can be one of multiple POS terminals and can be selected based on functions or load balancing, etc.

[0106] To facilitate the server's timely understanding of the payment status, when the user terminal displays the simplified number, a payment completion control can also be set; after the user completes the payment through the POS terminal, the "payment completion control" can be operated. In response to the operation instruction received for the "payment completion control", an order status update request is sent to the server, causing the server to update the status of the order from "pending payment" to "paid".

[0107] Further, to ensure that in a concurrent environment, multiple requests do not simultaneously process the order pointed to by the same order number, avoiding data conflicts and inconsistencies, the server can adopt a lock mechanism to control order information; when the order information is controlled by the lock mechanism and the acquisition fails, the order payment interface provided in step S120 is specifically a failure interface that responds to the failure information sent by the server and displays the failure information.

[0108] In some embodiments of the present disclosure, when the server fails to obtain the order information, a failure message is sent to the user terminal, causing the user terminal to provide a failure interface that displays the failure message in response to the failure message sent by the server, informing the user that the payment process cannot continue.

[0109] During this process, the specific process by which the server obtains order information based on the order number may include: The server requests to lock the order number; if the order number requested to be locked is already locked, it cannot be locked again, and the locking fails; when the locking fails, failure information is obtained, and the failure information is used to be sent to the POS terminal for failure handling. If the order number requested to be locked is not locked, the order number can be locked, and the locking is successful; when the locking is successful, the order information is obtained based on the order number.

[0110] In some embodiments of the present disclosure, a locking failure indicates that another POS terminal is performing a payment operation related to the order number. To avoid concurrent conflicts or data inconsistencies, the current request needs to wait or abort. Therefore, the user is informed of the failure information when the locking fails. The failure information can be an error or a message prompting the user to retry later.

[0111] In particular, when the locking fails, a retry mechanism can also be executed, that is, wait and then request to lock again when the locking fails; random delays or exponential backoffs (such as increasing the interval for each retry) can be added during the retry to reduce contention.

[0112] To prevent deadlocks, improve the throughput of the server, and ensure the execution of other tasks, after a certain order number is locked, the server can determine whether the order number meets the lock release conditions (such as payment completion, error or exception occurrence, timeout or expiration, external event trigger, etc.); if it is determined that the order number does not meet the lock release conditions, the above judgment process is repeatedly executed until the lock release conditions are met or the end condition is reached; if it is determined that the order number meets the lock release conditions or the end condition is reached, the lock of the order number is released.

[0113] To improve the availability and reliability of the simplified number, the simplified number can be obtained by the server based on a primary-backup asymmetric data storage mechanism. In this architecture, the primary database stores the main simplified numbers and serves as the default data source; the backup database stores the remaining simplified numbers; when the primary database is unavailable, the simplified numbers are provided by the backup database. At this time, the server is specifically used to attempt to retrieve the simplified number from the primary database; in response to the attempt failing, retrieve the simplified number from the backup database; in response to the attempt succeeding or retrieving successfully from the backup database, lock the simplified number.

[0114] During the process of locking the simplified number, the server is also used to obtain the order status of the order to be queried with the simplified number and the locking duration of the simplified number; determine whether the simplified number meets the number release condition according to the order status and the locking duration; in response to the simplified number meeting the number release condition, release the simplified number and put the simplified number back into the retrieved database. The server is also used to, in response to the simplified number not meeting the number release condition, execute the determination of whether the simplified number meets the number release condition according to the order status and the locking duration until the termination judgment condition is reached, and then release the simplified number and put the simplified number back into the retrieved database.

[0115] Among them, the order status is that the order payment is completed, the order is cancelled, or the order is not paid. The number release conditions include: the locking duration exceeds the locking duration threshold and the order status is that the order is not paid; or, the locking duration does not exceed the locking duration threshold and the order status is that the order payment is completed or the order is cancelled.

[0116] In this architecture, the process for the server to obtain the simplified number can include: judging whether the main database is available based on aspects such as the connectivity, responsiveness, and functionality of the main database; when it is determined that the main database is available, retrieving the simplified number from the head, tail, or random position of the main database, etc.; when it is determined that the main database is unavailable, retrieving the simplified number from the head, tail, or random position of the standby database, etc.

[0117] The simplified numbers stored in the main database and the standby database can be pre-generated according to the number of digits and then stored separately; specifically, the process for the server to generate optional simplified numbers and store them in the database can include: obtaining the number of digits, which is usually pre-set and can be set according to business requirements, etc., usually ranging from 6 to 8 digits; using methods such as loop nesting and recursion to obtain multiple optional simplified numbers according to the number of digits; taking the number of digits as 6 digits as an example, the obtained optional simplified numbers can be from 000000 to 999999, a total of 1 million; putting the multiple optional simplified numbers into the main database and the standby database respectively, and most of the optional simplified numbers can be stored in the main database.

[0118] In particular, in order to increase randomness, prevent security problems caused by sequentiality, and at the same time improve database performance, load balancing, and privacy protection, before putting the multiple optional simplified numbers into the main database and the standby database respectively, the optional simplified numbers can first be scrambled, and then the scrambled numbers can be put into the main database and the standby database respectively. Among them, the scrambling method can be hash scrambling, random scrambling, etc.

[0119] Taking the scrambling method as hash scrambling and the main database as the Zset of Resdis as an example, the optional simplified number can be used as the member and the hash value can be used as the score and put into the Zset. At this time, when retrieving, specifically, the simplified number is retrieved from the head of the Zset.

[0120] Releasing the simplified number and putting the simplified number back into the retrieved database can optimize the number management process and improve the utilization efficiency of the simplified number. When putting the simplified number back into the retrieved database, the retrieved database is the source database of the simplified number; the simplified number can be placed at the head, tail or any position of the retrieved database. Specifically, when the retrieved database is a Zset of Resdis, the simplified number can be put into the tail of the retrieved database.

[0121] The termination judgment condition can be reaching a preset waiting time or reaching a preset judgment count, etc. Taking the termination judgment condition as a fallback can avoid abnormal situations from causing the simplified number to be locked for a long time without release.

[0122] The locking duration of the simplified number is the length of time that the simplified number remains in the locked state. The process of judging whether the simplified number meets the number release condition can include: obtaining the retrieval time and the current time of the simplified number; subtracting the retrieval time from the current time to obtain the locking duration; judging whether the locking duration is less than the locking duration threshold; in response to the locking duration exceeding the locking duration threshold and the order status being that the order is not paid, or in response to the locking duration not exceeding the locking duration threshold and the order status being that the order payment is completed or the order is cancelled, it is determined that the simplified number meets the number release condition; otherwise, it is determined that the simplified number does not meet the number release condition.

[0123] The POS terminal payment method provided by the present disclosure can be used in a payment scenario where the order generation device and the payment device are not on the same entity.

[0124] In the POS terminal payment method provided by the present disclosure, the simplified number can be a number with a small number of digits such as 6 digits to ensure simple and correct input; and setting a lock during query can achieve mutually exclusive operations of different POS terminals for the same order number, thereby preventing duplicate payments, ensuring order status consistency, improving data integrity, avoiding inventory conflicts, and improving system security; in addition, putting back the simplified number when the number release condition is met can also reduce storage overhead, improve management efficiency, avoid overflow or shortage, enhance flexibility, reduce data conflicts and errors, and improve the user experience.

[0125] Figure 14 An exemplary flowchart implemented based on the POS terminal payment method of the present disclosure is shown.

[0126] Figure 14 In the shown flowchart, taking the restaurant scenario as an example, the POS terminal payment method can include: Step S210, the user terminal sends a dining settlement request to the server in response to the received settlement instruction.

[0127] Step S220: The server, in response to the settlement request sent by the user terminal, obtains the order information according to the settlement request and generates an order number.

[0128] Step S230: The server obtains the simplified number of the order number.

[0129] Step S240: The server controls to send the simplified number to the user terminal.

[0130] Step S250: The user terminal, in response to the received simplified number, controls to display the simplified number.

[0131] Figure 15 It is an example diagram of the interface for the user terminal to display the simplified number in an embodiment of the present disclosure.

[0132] Step S260: The POS terminal provides an order query interface.

[0133] Step S270: The POS terminal, in response to the order query instruction of the order to be queried input by the user based on the order query interface, controls to send the order query instruction to the server.

[0134] In some embodiments of the present disclosure, the order query instruction carries a simplified number related to the order number of the order to be queried.

[0135] Step S280: The server obtains the order number related to the simplified number.

[0136] Step S290: The server obtains the order information according to the order number.

[0137] Step S291: The server controls to send the order information to the POS terminal.

[0138] Step S292: The POS terminal, in response to the order information sent by the server, provides an order payment interface.

[0139] Step S293: The POS terminal, in response to the payment instruction input by the user based on the target payment control in at least one payment control, provides a payment result interface.

[0140] Based on the above embodiment, the present disclosure also provides a POS terminal payment device.

[0141] Figure 16 It is a structural schematic block diagram of the POS terminal payment device in an embodiment of the present disclosure.

[0142] As Figure 16 shown, the POS terminal payment device includes: An inquiry interface providing module 110, configured to provide an order inquiry interface.

[0143] A payment interface providing module 120 is configured to provide an order payment interface in response to an order query instruction of a to-be-query order input by a user based on an order query interface; the order query instruction carries a simplified number of an order number of the to-be-query order input by the user, and the simplified number is used as a query condition to obtain order information of the to-be-query order from a server for the user to check; at least one payment control and the order information of the to-be-query order are displayed on the order payment interface.

[0144] A completion interface providing module 130 is configured to provide a payment result interface in response to a payment instruction input by the user based on a target payment control among at least one payment control when the user checks that the order information is correct.

[0145] The above POS terminal payment device may be in the form of computer software, and each module of the above POS terminal payment device may be implemented by computer software modules.

[0146] For the implementation processes of the functions and roles of each module in the above device, please refer to the implementation processes of the corresponding steps in the above method for details, which will not be elaborated here.

[0147] Therefore, based on any one of the above embodiments, the present disclosure further provides an electronic device, which can execute the POS terminal payment method of any one of the above embodiments described in the present disclosure.

[0148] Figure 17 It is a structural schematic diagram of an electronic device 1000 according to an embodiment of the present disclosure.

[0149] The hardware structure of the electronic device 1000 can be implemented by using a bus architecture. The bus architecture may include any number of interconnected buses and bridges, depending on the specific application of the hardware and the overall design constraints. The bus 1100 connects various circuits including one or more processors 1200, a memory 1300, and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripheral devices, voltage regulators, power management circuits, external antennas, etc.

[0150] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Component (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, only one connection line is used in this figure, but it does not mean that there is only one bus or one type of bus.

[0151] The present disclosure also provides a readable storage medium storing a computer program which, when executed by a processor, is used to implement the above-mentioned method. A "readable storage medium" may be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples of the readable storage medium include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer diskette case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.

[0152] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, the processes or functions of the present disclosure are executed in whole or in part.

[0153] The computer program or instructions can be stored in a readable storage medium, or transmitted from one readable storage medium to another. For example, the computer program or instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner. The readable storage medium can be any available medium that can be accessed, or a data storage device such as a server or data center integrating one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it can also be an optical medium, such as a digital video disc; or it can be a semiconductor medium, such as a solid state drive. The computer-readable storage medium can be a volatile or non-volatile storage medium, or can include both volatile and non-volatile types of storage media.

[0154] Those skilled in the art should understand that the embodiments of the present disclosure can be provided as a method, a system, or a computer program product. Therefore, the present disclosure can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.

[0155] This disclosure is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to the disclosure. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate means for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.

[0156] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.

[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.

[0158] In the description of this specification, the description with reference to terms such as "one embodiment / way", "some embodiments / ways", "example", "specific example", or "some examples", etc. means that the specific features, structures, or characteristics described in connection with the embodiment / way or example are included in at least one embodiment / way or example of this disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / way or example. Moreover, the specific features, structures, or characteristics described can be combined in a suitable manner in any one or more embodiments / ways or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments / ways or examples described in this specification and the features of different embodiments / ways or examples.

[0159] In addition, 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 quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0160] Those skilled in the art should understand that the above-described embodiments are merely for clearly illustrating the present disclosure and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications can be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.

Claims

1. A POS terminal payment method, characterized in that, Including: Providing an order query interface; In response to an order query instruction of an order to be queried input by a user based on the order query interface, providing an order payment interface; The order query instruction carries a simplified number of the order number of the order to be queried input by the user, and the simplified number is used as a query condition to obtain the order information of the order to be queried from the server for the user to check; at least one payment control and the order information of the order to be queried are displayed on the order payment interface; And In response to a payment instruction input by the user based on a target payment control among the at least one payment control when the user checks that the order information is correct, providing a payment result interface.

2. The POS terminal payment method according to claim 1, wherein Before providing the order query interface, it further includes: providing a main interface, and the content displayed on the main interface includes a collection control; The providing of the order query interface includes: in response to an operation of the collection control received from the user, providing an order query interface.

3. The POS terminal payment method according to claim 1, wherein The providing of the payment result interface in response to a payment instruction input by the user based on a target payment control among the at least one payment control when the user checks that the order information is correct includes: In response to a payment instruction input by the user based on a target payment control among the at least one payment control when the user checks that the order information is correct, providing a payment confirmation interface; and In response to a payment confirmation instruction input by the user based on the payment confirmation interface, providing a payment result interface.

4. The POS terminal payment method according to claim 3, wherein The providing of the payment result interface in response to a payment confirmation instruction input by the user based on the payment confirmation interface includes: In response to a payment confirmation instruction input by the user based on the payment confirmation interface, providing a signature interface; and In response to a signature confirmation instruction input by the user based on the signature interface, providing a payment result interface.

5. The POS terminal payment method according to any one of claims 1 to 4, characterized in that, When the payment result interface is a payment success interface and a voucher control is displayed on the payment success interface, after providing the payment result interface, it further includes: In response to an operation of the voucher control received from the user, controlling to provide a payment voucher for the order to be queried.

6. The POS terminal payment method according to any one of claims 1 to 4, characterized in that, The providing of the order payment interface in response to an order query instruction of an order to be queried input by the user based on the order query interface includes: In response to an order query instruction of an order to be queried input by the user based on the order query interface, controlling to send the order query instruction to the server, so that the server determines a relevant order number according to the simplified number carried in the order query instruction and obtains order information according to the relevant order number and then returns it; and In response to the order information returned by the server, providing an order payment interface.

7. The POS terminal payment method according to claim 6, characterized in that, When the order information is controlled by a lock mechanism and the acquisition fails, it further includes: In response to a failure message sent by the server, providing a failure interface for displaying the failure message.

8. The POS terminal payment method according to claim 6, wherein The order number is generated by the server in response to a settlement request sent by the user terminal; The simplified number is a number obtained by the server after generating the order number, associated with the order number, and sent to the user terminal for the user to view and then input on the POS terminal.

9. An electronic device, characterized in that, Comprising: A memory that stores execution instructions; And A processor that executes the execution instructions stored in the memory, enabling the processor to execute the POS terminal payment method according to any one of claims 1 to 8.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the POS terminal payment method according to any one of claims 1 to 8.