[go: up one dir, main page]

CN111539703A - Payment exception processing method and system - Google Patents

Payment exception processing method and system Download PDF

Info

Publication number
CN111539703A
CN111539703A CN202010312283.9A CN202010312283A CN111539703A CN 111539703 A CN111539703 A CN 111539703A CN 202010312283 A CN202010312283 A CN 202010312283A CN 111539703 A CN111539703 A CN 111539703A
Authority
CN
China
Prior art keywords
refueling
payment
order
information
fueling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010312283.9A
Other languages
Chinese (zh)
Other versions
CN111539703B (en
Inventor
马万龙
牛立
王石峰
罗赛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chezhubang Beijing Technology Co Ltd
Original Assignee
Chezhubang Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chezhubang Beijing Technology Co Ltd filed Critical Chezhubang Beijing Technology Co Ltd
Priority to CN202311061363.1A priority Critical patent/CN117291586A/en
Priority to CN202010312283.9A priority patent/CN111539703B/en
Publication of CN111539703A publication Critical patent/CN111539703A/en
Application granted granted Critical
Publication of CN111539703B publication Critical patent/CN111539703B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • G06Q20/0855Payment architectures involving remote charge determination or related payment systems involving a third party
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/341Active cards, i.e. cards including their own processing means, e.g. including an IC or chip
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/352Contactless payments by cards
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Managing shopping lists, e.g. compiling or processing purchase lists
    • G06Q30/0635Managing shopping lists, e.g. compiling or processing purchase lists replenishment orders; recurring orders

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Loading And Unloading Of Fuel Tanks Or Ships (AREA)

Abstract

The invention provides a payment exception handling method and a system, wherein the method comprises the following steps: obtaining an order payment transaction mechanism according to the sequence of the refueling order generation operation, the inventory reduction operation, the payment initiation operation and the deduction operation; wherein each of the fueling order generation operation, the inventory reduction operation, the initiation payment operation, and the deduction operation is taken as an atomic transaction; storing a transaction mechanism for order payment; and when the next atomic transaction of the current atomic transaction is not received within the preset first duration, revoking the current previous atomic transaction. Therefore, after the refueling device is authorized to refuel, if the communication module of the refueling device has a fault, automatic deduction can be carried out. If abnormity exists in the payment process, such as unsuccessful payment, repeated payment and the like, the transaction mechanism of order payment can be utilized for processing, and the occurrence of wrong payment such as repeated payment and the like is avoided.

Description

支付异常处理方法及系统Payment exception processing method and system

技术领域technical field

本发明涉及数据处理领域,尤其涉及一种支付异常处理方法及系统。The invention relates to the field of data processing, in particular to a payment exception processing method and system.

背景技术Background technique

在无感支付系统中,因为某些原因,比如网络延迟问题、程序逻辑问题、并发等问题,导致下单成功而库存没有减少、支付不成功或者重复支付的情况发生,从而造成了支付异常问题。In the sensorless payment system, due to some reasons, such as network delay problems, program logic problems, concurrency and other problems, the order is successfully placed but the inventory is not reduced, the payment is unsuccessful or the repeated payment occurs, resulting in abnormal payment problems. .

发明内容SUMMARY OF THE INVENTION

本发明实施例的目的是提供一种支付异常处理方法及系统,以解决现有技术中支付时存在的支付异常问题。The purpose of the embodiments of the present invention is to provide a payment exception processing method and system, so as to solve the payment exception problem existing in the prior art during payment.

为解决上述问题,第一方面,本发明提供了一种支付异常处理方法,所述方法包括:In order to solve the above problems, in the first aspect, the present invention provides a payment exception processing method, the method includes:

根据加油订单生成操作、库存减少操作、发起支付操作和扣款操作的顺序,得到订单支付的事务机制;其中,所述加油订单生成操作、所述库存减少操作、所述发起支付操作和所述扣款操作中的每个,作为一个原子事务;A transaction mechanism for order payment is obtained according to the sequence of the refueling order generation operation, the inventory reduction operation, the initiating payment operation and the deduction operation; wherein the refueling order generation operation, the inventory reduction operation, the initiating payment operation and the each of the debit operations, as an atomic transaction;

存储所述订单支付的事务机制;a transaction mechanism for storing said order payment;

当预设的第一时长内,没有接收到当前原子事务的下一原子事务时,对当前之前的原子事务进行撤销。When the next atomic transaction of the current atomic transaction is not received within the preset first time period, the current previous atomic transaction is cancelled.

在一种可能的实现方式中,所述方法之前还包括:In a possible implementation manner, the method further includes:

接收加油设备发送的加油请求消息;所述加油请求消息包括标签ID和加油设备ID;Receive a refueling request message sent by a refueling device; the refueling request message includes a tag ID and a refueling device ID;

根据所述标签ID,查询预设的对照表,确定标签ID对应的目标用户账户信息;所述目标用户账户信息包括加油数据;According to the tag ID, query a preset comparison table to determine the target user account information corresponding to the tag ID; the target user account information includes refueling data;

根据所述加油数据,生成授权加油消息;generating an authorized refueling message according to the refueling data;

根据所述加油设备ID,将所述授权加油消息发送给所述加油设备ID对应的加油设备;According to the refueling device ID, send the authorized refueling message to the refueling device corresponding to the refueling device ID;

在加油完成后,接收加油设备发送的加油完成消息。After the refueling is completed, the refueling completion message sent by the refueling device is received.

在一种可能的实现方式中,所述根据所述加油设备ID,将所述授权加油消息发送给所述加油设备ID对应的加油设备之后,所述方法还包括:In a possible implementation manner, after the authorized refueling message is sent to the refueling device corresponding to the refueling device ID according to the refueling device ID, the method further includes:

当预设的第二时长内,未接收到加油设备发送的加油完成消息时,或者,接收到加油完成消息后,根据所述加油数据、计算加油金额,并且根据所述加油数据、加油金额、加油设备ID、标签ID和加油时间信息,进行加油订单生成操作,生成加油订单信息;When the refueling completion message sent by the refueling device is not received within the preset second time period, or after receiving the refueling completion message, the refueling amount is calculated according to the refueling data, and the refueling amount is calculated according to the refueling data, refueling amount, Refueling equipment ID, label ID and refueling time information, perform refueling order generation operation, and generate refueling order information;

根据所述加油订单信息中的加油数据,进行库存减少操作,得到库存信息;According to the refueling data in the refueling order information, an inventory reduction operation is performed to obtain inventory information;

对所述加油订单信息进行加密后,发起支付操作,将加密后的加油订单信息发送给第三方服务器,以使第三方服务器对加密后的所述加油订单信息进行解密后,进行扣款操作,并在扣款操作后,生成加油凭证信息;所述加油凭证信息包括实际支付金额、支付账户;After encrypting the refueling order information, initiate a payment operation, and send the encrypted refueling order information to a third-party server, so that the third-party server decrypts the encrypted refueling order information, and then performs a deduction operation, and after the deduction operation, generate refueling voucher information; the refueling voucher information includes the actual payment amount and the payment account;

接收所述第三方服务器发送的加油凭证信息。Refueling voucher information sent by the third-party server is received.

在一种可能的实现方式中,所述当预设的第一时长内,没有接收到当前原子事务的下一原子事务时,对当前之前的原子事务进行撤销具体包括:In a possible implementation manner, when the next atomic transaction of the current atomic transaction is not received within the preset first time period, the revocation of the previous atomic transaction specifically includes:

当进行加油订单生成操作后,未执行库存减少操作,则撤销加油订单生成操作生成的加油订单信息;或者,When the refueling order generation operation is performed and the inventory reduction operation is not performed, the refueling order information generated by the refueling order generation operation is cancelled; or,

当进行库存减少操作后,未执行发起支付操作,则撤销加油订单生成操作生成的加油订单信息及库存减少操作生成的库存信息;或者,After the inventory reduction operation is performed and the payment initiation operation is not performed, the refueling order information generated by the refueling order generation operation and the inventory information generated by the inventory reduction operation will be cancelled; or,

当进行发起支付操作后,未执行扣款操作时,则撤销加油订单生成操作生成的加油订单信息、库存减少操作生成的库存信息及支付操作生成的加密后的加油订单信息。When the payment operation is initiated and the deduction operation is not performed, the fueling order information generated by the fueling order generation operation, the inventory information generated by the inventory reduction operation, and the encrypted fueling order information generated by the payment operation are cancelled.

在一种可能的实现方式中,所述方法之后还包括,生成用于查询是否进行加油操作的查询请求消息,所述查询请求消息包括加油设备ID;In a possible implementation manner, the method further includes generating a query request message for querying whether to perform a refueling operation, where the query request message includes an ID of the refueling device;

将所述查询请求消息发送给所述加油设备ID对应的加油设备;sending the query request message to the refueling device corresponding to the refueling device ID;

接收所述加油设备发送的确认加油消息;receiving a refueling confirmation message sent by the refueling device;

根据所述确认加油消息,继续执行加油订单生成操作。According to the refueling confirmation message, continue to perform the refueling order generating operation.

第二方面,本发明提供了一种支付异常处理系统,所述系统包括:In a second aspect, the present invention provides a payment exception processing system, the system comprising:

处理模块,所述处理模块用于根据加油订单生成操作、库存减少操作、发起支付操作和扣款操作的顺序,得到订单支付的事务机制;其中,所述加油订单生成操作、所述库存减少操作、所述发起支付操作和所述扣款操作中的每个,作为一个原子事务;a processing module, which is used to obtain a transaction mechanism for order payment according to the sequence of the refueling order generation operation, the inventory reduction operation, the initiating payment operation and the deduction operation; wherein the refueling order generation operation and the inventory reduction operation , each of the initiating payment operation and the debiting operation, as an atomic transaction;

存储模块,所述存储模块用于存储所述订单支付的事务机制;a storage module, the storage module is used to store the transaction mechanism of the order payment;

所述处理模块还用于当预设的第一时长内,没有接收到当前原子事务的下一原子事务时,对当前之前的原子事务进行撤销。The processing module is further configured to cancel the current previous atomic transaction when the next atomic transaction of the current atomic transaction is not received within the preset first time period.

在一种可能的实现方式中,所述系统还包括:In a possible implementation, the system further includes:

接收模块,所述接收模块用于接收加油设备发送的加油请求消息;所述加油请求消息包括标签ID和加油设备ID;a receiving module, which is used for receiving a refueling request message sent by a refueling device; the refueling request message includes a tag ID and a refueling device ID;

确定模块,所述确定模块用于根据所述标签ID,查询预设的对照表,确定标签ID对应的目标用户账户信息;所述目标用户账户信息包括加油数据;A determination module, the determination module is configured to query a preset comparison table according to the tag ID, and determine the target user account information corresponding to the tag ID; the target user account information includes refueling data;

所述处理模块用于根据所述加油数据,生成授权加油消息;The processing module is configured to generate an authorized refueling message according to the refueling data;

发送模块,所述发送模块用于根据所述加油设备ID,将所述授权加油消息发送给所述加油设备ID对应的加油设备;a sending module, configured to send the authorized refueling message to the refueling device corresponding to the refueling device ID according to the refueling device ID;

所述接收模块还用于在加油完成后,接收加油设备发送的加油完成消息。The receiving module is further configured to receive a refueling completion message sent by the refueling device after refueling is completed.

在一种可能的实现方式中,所述处理模块还用于,当预设的第二时长内,未接收到加油设备发送的加油完成消息时,或者,接收到加油完成消息后,根据所述加油数据、计算加油金额,并且根据所述加油数据、加油金额、加油设备ID、标签ID和加油时间信息,进行加油订单生成操作,生成加油订单信息;In a possible implementation manner, the processing module is further configured to: when the refueling completion message sent by the refueling device is not received within a preset second time period, or after receiving the refueling completion message, according to the Refueling data, calculating refueling amount, and performing refueling order generation operation according to the refueling data, refueling amount, refueling equipment ID, label ID and refueling time information, and generating refueling order information;

根据所述加油订单信息中的加油数据,进行库存减少操作,得到库存信息;According to the refueling data in the refueling order information, an inventory reduction operation is performed to obtain inventory information;

对所述加油订单信息进行加密后,发起支付操作,将加密后的加油订单信息发送给第三方服务器,以使第三方服务器对加密后的所述加油订单信息进行解密后,进行扣款操作,并在扣款操作后,生成加油凭证信息;所述加油凭证信息包括实际支付金额、支付账户;After encrypting the refueling order information, initiate a payment operation, and send the encrypted refueling order information to a third-party server, so that the third-party server decrypts the encrypted refueling order information, and then performs a deduction operation, and after the deduction operation, generate refueling voucher information; the refueling voucher information includes the actual payment amount and the payment account;

所述接收模块还用于,接收所述第三方服务器发送的加油凭证信息。The receiving module is further configured to receive refueling voucher information sent by the third-party server.

在一种可能的实现方式中,所述处理模块具体用于:In a possible implementation manner, the processing module is specifically used for:

当进行加油订单生成操作后,未执行库存减少操作,则撤销加油订单生成操作生成的加油订单信息;或者,When the refueling order generation operation is performed and the inventory reduction operation is not performed, the refueling order information generated by the refueling order generation operation is cancelled; or,

当进行库存减少操作后,未执行发起支付操作,则撤销加油订单生成操作生成的加油订单信息及库存减少操作生成的库存信息;或者,After the inventory reduction operation is performed and the payment initiation operation is not performed, the refueling order information generated by the refueling order generation operation and the inventory information generated by the inventory reduction operation will be cancelled; or,

当进行发起支付操作后,未执行扣款操作时,则撤销加油订单生成操作生成的加油订单信息、库存减少操作生成的库存信息及支付操作生成的加密后的加油订单信息。When the payment operation is initiated and the deduction operation is not performed, the fueling order information generated by the fueling order generation operation, the inventory information generated by the inventory reduction operation, and the encrypted fueling order information generated by the payment operation are cancelled.

在一种可能的实现方式中,所述处理模块还用于,生成用于查询是否进行加油操作的查询请求消息,所述查询请求消息包括加油设备ID;In a possible implementation manner, the processing module is further configured to generate a query request message for querying whether to perform a refueling operation, the query request message including the refueling device ID;

所述发送模块还用于,将所述查询请求消息发送给所述加油设备ID对应的加油设备;The sending module is further configured to send the query request message to the fueling equipment corresponding to the fueling equipment ID;

所述接收模块还用于,接收所述加油设备发送的确认加油消息;The receiving module is further configured to receive a refueling confirmation message sent by the refueling device;

所述处理模块还用于,根据所述确认加油消息,继续执行加油订单生成操作。The processing module is further configured to, according to the refueling confirmation message, continue to perform the refueling order generating operation.

第三方面,本发明提供了一种设备,包括存储器和处理器,存储器用于存储程序,处理器用于执行第一方面任一所述的方法。In a third aspect, the present invention provides a device including a memory and a processor, where the memory is used for storing a program, and the processor is used for executing any one of the methods in the first aspect.

第四方面,本发明提供了一种包含指令的计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面任一所述的方法。In a fourth aspect, the present invention provides a computer program product comprising instructions, when the computer program product is run on a computer, causing the computer to perform the method according to any one of the first aspects.

第五方面,本发明提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如第一方面任一所述的方法。In a fifth aspect, the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of the first aspects is implemented.

通过应用本发明实施例提供的支付异常处理方法及系统,在加油设备被授权加油后,如果加油设备的通信模块存在故障,可以进行自动扣款。并且在加油设备的通信模块不存在故障时,如果支付过程中存在异常,比如,支付不成功、重复支付等,可以利用订单支付的事务机制,进行处理,避免了重复支付等错误支付的发生。By applying the payment exception processing method and system provided by the embodiments of the present invention, after the refueling device is authorized to refuel, if the communication module of the refueling device is faulty, the payment can be automatically deducted. And when there is no fault in the communication module of the refueling equipment, if there is an abnormality in the payment process, such as unsuccessful payment, repeated payment, etc., the transaction mechanism of order payment can be used to process, avoiding the occurrence of wrong payment such as repeated payment.

附图说明Description of drawings

图1为本发明实施例一提供的支付异常处理方法流程示意图;FIG. 1 is a schematic flowchart of a payment exception processing method provided in Embodiment 1 of the present invention;

图2为本发明实施例二提供的支付异常处理系统结构示意图。FIG. 2 is a schematic structural diagram of a payment exception processing system according to Embodiment 2 of the present invention.

具体实施方式Detailed ways

下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为便于描述,附图中仅示出了与有关发明相关的部分。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the related invention, but not to limit the invention. In addition, it should be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

第一、第二等编号仅予以区分,并无其他含义。The first, second, etc. numbers are only for distinction and have no other meaning.

图1为本发明实施例一提供的支付异常处理方法流程示意图。该方法应用在加油站加油的场景中。该方法的执行主体为具有计算处理功能的销售时点信息(Point ofsale,POS)服务器。如图1所示,该方法包括以下步骤:FIG. 1 is a schematic flowchart of a payment exception processing method according to Embodiment 1 of the present invention. This method is applied in the scene of gas station refueling. The execution body of the method is a point of sale (Point of Sale, POS) server with a computing processing function. As shown in Figure 1, the method includes the following steps:

步骤110,根据加油订单生成操作、库存减少操作、发起支付操作和扣款操作的顺序,得到订单支付的事务机制;其中,加油订单生成操作、库存减少操作、发起支付操作和扣款操作中的每个,作为一个原子事务。Step 110: Obtain the transaction mechanism of order payment according to the order of the refueling order generation operation, the inventory reduction operation, the initiating payment operation and the deduction operation; wherein, the refueling order generation operation, the inventory reduction operation, the initiating payment operation and the deduction operation are among the operations. each, as an atomic transaction.

具体的,在支付中,可以引用事务机制,由于事务有原子性(Atomicity)、一致性(Consistency)、隔离性(Isolation)、持久性(Durability),因此事务中的多个操作是一个不可分割的原子单元整体,只有所有的操作执行成功,整个事务才提交,在同一个事务内部的一组操作(多个原子事务)必须全部成功(或者全部失败);一旦事务提交成功后,事务中所有的数据操作都必须被持久化到数据库中。Specifically, in the payment, you can refer to the transaction mechanism. Since the transaction has Atomicity, Consistency, Isolation, and Durability, multiple operations in a transaction are an inseparable As a whole, the entire transaction is committed only when all operations are successfully executed. A group of operations (multiple atomic transactions) within the same transaction must all succeed (or all fail); once the transaction is successfully committed, all transactions in the transaction All data operations must be persisted to the database.

由此,将加油支付过程中的多个操作,按照顺序,构成订单支付的事务机制。其中,每一个操作,都可以作为一个原子事务。由此,将订单支付过程中的问题,与事务机制相结合,从而形成新的机制,即订单支付的事务机制。As a result, multiple operations in the refueling payment process, in order, constitute a transaction mechanism for order payment. Among them, each operation can be used as an atomic transaction. Therefore, the problems in the order payment process are combined with the transaction mechanism to form a new mechanism, that is, the transaction mechanism of order payment.

步骤120,存储订单支付的事务机制。In step 120, the transaction mechanism of order payment is stored.

对于设定的订单支付的事务机制,可以存储在服务器中,并且设定每个原子事物之间的固定的时长。For the set transaction mechanism of order payment, it can be stored in the server and set a fixed duration between each atomic transaction.

步骤130,当预设的第一时长内,没有接收到当前原子事务的下一原子事务时,对当前之前的原子事务进行撤销。Step 130, when the next atomic transaction of the current atomic transaction is not received within the preset first time period, cancel the current previous atomic transaction.

具体的,当在预设的第一时长内,没有接收到下一个操作时,可以将当前之前的操作都进行撤销,从而避免了重复支付的发生。Specifically, when the next operation is not received within the preset first time period, all previous operations can be cancelled, thereby avoiding the occurrence of repeated payments.

具体的,该步骤可以包括以下三种情况:Specifically, this step can include the following three situations:

第一种、当进行加油订单生成操作后,未执行库存减少操作,则撤销加油订单生成操作生成的加油订单信息。First, when the refueling order generation operation is performed and the inventory reduction operation is not performed, the refueling order information generated by the refueling order generation operation is cancelled.

第二种、当进行库存减少操作后,未执行发起支付操作,则撤销加油订单生成操作生成的加油订单信息及库存减少操作生成的库存信息。Second, after the inventory reduction operation is performed, the initiating payment operation is not performed, the refueling order information generated by the refueling order generation operation and the inventory information generated by the inventory reduction operation are cancelled.

第三种、当进行发起支付操作后,未执行扣款操作时,则撤销加油订单生成操作生成的加油订单信息、库存减少操作生成的库存信息及支付操作生成的加密后的加油订单信息。Third, when the payment operation is initiated and the deduction operation is not performed, the fueling order information generated by the fueling order generation operation, the inventory information generated by the inventory reduction operation, and the encrypted fueling order information generated by the payment operation are cancelled.

在一个示例中,如果在“库存减少操作->发起支付操作”阶段发生异常导致的发起支付失败,根据订单支付的事务机制,在此之前的原子事务将被回滚,即减少的库存恢复、已生成的订单作废,从而避免未支付的订单导致的废弃订单和库存错误减少等异常情况发生,避免了支付过程中的异常情况。In one example, if an exception occurs in the "Inventory Reduction Operation -> Initiate Payment Operation" stage and the payment initiation fails due to an exception, according to the transaction mechanism of the order payment, the previous atomic transaction will be rolled back, that is, the reduced inventory recovery, The generated orders are voided, thereby avoiding abnormal situations such as abandoned orders and inventory error reduction caused by unpaid orders, and avoiding abnormal situations in the payment process.

进一步的,本申请之前还可以包括如下步骤:Further, the application may also include the following steps before:

首先,接收加油设备发送的加油请求消息;加油请求消息包括标签ID和加油设备ID;然后,根据标签ID,查询预设的对照表,确定标签ID对应的目标用户账户信息;目标用户账户信息包括加油数据;其次,根据加油数据,生成授权加油消息;接着,根据加油设备ID,将授权加油消息发送给加油设备ID对应的加油设备;最后,在加油完成后,接收加油设备发送的加油完成消息。First, the refueling request message sent by the refueling equipment is received; the refueling request message includes the tag ID and the refueling equipment ID; then, according to the tag ID, the preset comparison table is queried to determine the target user account information corresponding to the tag ID; the target user account information includes refueling data; secondly, generate an authorized refueling message according to the refueling data; then, according to the refueling device ID, send the authorized refueling message to the refueling device corresponding to the refueling device ID; finally, after the refueling is completed, receive the refueling completion message sent by the refueling device .

其中,加油设备ID可以包括加油站ID和油枪ID,加油站ID可以是加油站的编号,每个加油站具有唯一的编号。比如,加油站编号可以是“1110”。Wherein, the gas station ID may include gas station ID and oil gun ID, the gas station ID may be the number of the gas station, and each gas station has a unique number. For example, the gas station number can be "1110".

油枪ID可以包括油枪的编号,油枪可以根据对应的汽油型号不同,分为不同编号的油枪,比如001可以对应92号汽油、002可以对应95号汽油,每一个加油机上,可以具有一个或多个油枪,当有多个油枪时,这些油枪可以对应相同型号的汽油,也可以对应不同型号的汽油。油枪ID的结构可以是加油站ID+加油机ID+油枪编号,比如“1110012001”的含义可以是:加油站编号“1110”、加油机编号“012”、油枪编号“001”,由此,可以通过油枪ID,可以得到所在的加油站下的哪个加油机下的哪个油枪。The ID of the oil gun can include the number of the oil gun. The oil gun can be divided into oil guns with different numbers according to the corresponding gasoline model. For example, 001 can correspond to 92# gasoline, and 002 can correspond to 95# gasoline. One or more oil guns, when there are multiple oil guns, these oil guns can correspond to the same type of gasoline, or can correspond to different types of gasoline. The structure of the oil gun ID can be gas station ID + oil dispenser ID + oil gun number. For example, the meaning of "1110012001" can be: gas station number "1110", gas dispenser number "012", oil gun number "001", thus, Through the oil gun ID, you can get which oil gun under which fuel dispenser under the gas station.

在本申请中,接收到的加油请求消息可以是由油枪上的读卡装置发送的,也可以是由加油机发送的。加油机中具有通信模块和处理模块。加油机中的通信模块可以和服务器、油枪进行数据传输。In this application, the received refueling request message may be sent by the card reader on the fuel gun, or may be sent by the fuel dispenser. The tanker has a communication module and a processing module. The communication module in the tanker can transmit data with the server and the oil gun.

当加油请求消息是由油枪上的读卡装置发送时,加油站的油枪上设置有读卡装置,读卡装置包括读卡器、通信模块和存储器,存储器可以存储加油站ID和油枪ID。读卡器可以读取车辆的油箱盖上的标签并解码后,得到标签ID,油枪中的通信模块可以将标签ID、存储器中的加油站ID和油枪ID进行打包后生成的加油请求消息,发送给服务器。When the refueling request message is sent by the card reader on the fuel gun, the fuel gun of the gas station is provided with a card reader. The card reader includes a card reader, a communication module and a memory. The memory can store the gas station ID and the fuel gun. ID. The card reader can read the label on the fuel tank cover of the vehicle and decode it to obtain the label ID. The communication module in the fuel gun can package the label ID, the gas station ID in the memory and the fuel gun ID to generate a fueling request message. , sent to the server.

当加油请求消息是由油枪上的读卡装置发送时,加油站的油枪上设置有读卡装置,读卡装置包括读卡器和通信模块,读卡器可以读取车辆的油箱盖上的标签并解码后,得到标签ID,油枪中的通信模块可以将标签ID发送给加油机中的通信模块,加油机上的处理模块,将加油站ID、油枪ID和标签ID进行打包后生成的加油请求消息,发送给服务器。When the refueling request message is sent by the card reader on the fuel gun, the fuel gun of the gas station is provided with a card reader. The card reader includes a card reader and a communication module. The card reader can read the fuel tank cover of the vehicle. After the tag is decoded, the tag ID is obtained. The communication module in the oil gun can send the tag ID to the communication module in the tanker, and the processing module on the tanker packs the gas station ID, oil gun ID and tag ID to generate The refueling request message is sent to the server.

其中,标签可以是射频识别(Radio Frequency Identification,RFID)标签。The tag may be a radio frequency identification (Radio Frequency Identification, RFID) tag.

一个标签ID可以对应一个车辆信息,车辆信息包括车辆标识(Identitydocument,ID)和车型信息。车辆ID为车辆唯一标识,可以是车牌号,也可以是车辆的全球唯一的编号。A tag ID may correspond to a vehicle information, and the vehicle information includes a vehicle identification (Identity document, ID) and model information. The vehicle ID is the unique identification of the vehicle, which can be the license plate number or the globally unique number of the vehicle.

一个标签ID对应一个车辆信息,一个用户可以有一个或多个车辆,即一个用户可以具有一个标签ID,也可以具有多个标签ID,但是一个用户仅对应一个用户账户信息。由此,当服务器接收到加油请求消息后,对加油请求消息进行解包,并根据标签ID,确定标签ID对应的用户账户信息,并将当前标签ID对应的用户账户信息作为目标用户账户信息。One tag ID corresponds to one vehicle information, and one user can have one or more vehicles, that is, one user can have one tag ID or multiple tag IDs, but one user only corresponds to one user account information. Thus, after receiving the refueling request message, the server unpacks the refueling request message, determines the user account information corresponding to the tag ID according to the tag ID, and uses the user account information corresponding to the current tag ID as the target user account information.

当目标用户账户下存在待支付的预加油订单信息时,该预加油订单信息中包括加油数据,服务器可以将加油数据发送给加油设备,以指示加油设备根据加油数据进行加油。When there is pre-refueling order information to be paid in the target user account, the pre-refueling order information includes refueling data, and the server can send the refueling data to the refueling device to instruct the refueling device to refuel according to the refueling data.

建立待支付的预加油订单信息时,可以包括如下步骤:The following steps may be included when establishing the pre-fuel order information to be paid:

首先,接收用户终端发送的预加油订单信息;预加油订单信息包括用户ID、预加油的加油站ID、预加油的油枪ID、预加油的加油升数和预加油的消费金额;然后,根据用户ID,查询用户ID对应的用户账户信息的信用能力信息;信用能力信息包括用户的信用分数;其次,当信用分数不小于预设的分数阈值时,查询用户账户信息对应的用户的支付账号的第一支付能力信息;最后,当第一支付能力信息不小于预加油的消费金额时,生成待支付的预加油订单信息。First, receive the pre-refueling order information sent by the user terminal; the pre-refueling order information includes the user ID, the pre-refueling gas station ID, the pre-refueling oil gun ID, the pre-refueling liters and the pre-refueling consumption amount; then, according to User ID, query the credit capability information of the user account information corresponding to the user ID; the credit capability information includes the user's credit score; secondly, when the credit score is not less than the preset score threshold, query the user's payment account information corresponding to the user account information. The first payment capability information; finally, when the first payment capability information is not less than the pre-refueling consumption amount, the pre-refueling order information to be paid is generated.

其中,信用能力信息可以是用户的信用能力的分数,比如,可以根据用户的付款记录、客户的信用记录来生成信用能力分数。比如,在服务器中付款次数、总金额等,可以生成一个信用分数,而用户在银行的信用记录,又生成一个信用分数,两个信用分数进行加权求和后,可以得到用户的信用能力信息。该信用能力信息是一个动态变化的数据,可以随着用户的付款记录和信用记录进行变化。The credit capability information may be a score of the user's credit capability. For example, the credit capability score may be generated according to the user's payment record and the customer's credit record. For example, the number of payments and the total amount in the server can generate a credit score, and the user's credit record in the bank generates a credit score. After the two credit scores are weighted and summed, the user's credit ability information can be obtained. The credit capability information is a dynamically changing data, which can be changed with the user's payment record and credit record.

从而,加油设备可以在读取到加油数据后,根据加油数据进行加油,由此,加油机得到了加油授权。但是,随后可能存在加油设备的通信模块存在故障,导致加油设备加油后,加油设备不能和服务器进行通信的问题。针对该问题,服务器可以进行如下的步骤:Therefore, after reading the refueling data, the refueling device can refuel according to the refueling data, whereby the refueling machine is authorized to refuel. However, there may be a fault in the communication module of the refueling device later, which causes the problem that the refueling device cannot communicate with the server after the refueling device is refueled. In response to this problem, the server can perform the following steps:

首先,当预设的第二时长内,未接收到加油设备发送的加油完成消息时,或者,接收到加油完成消息后,根据加油数据、计算加油金额,并且根据加油数据、加油金额、加油设备ID、标签ID和加油时间信息,进行加油订单生成操作,生成加油订单信息;根据加油订单信息中的加油数据,进行库存减少操作,得到库存信息;然后,对加油订单信息进行加密后,发起支付操作,将加密后的加油订单信息发送给第三方服务器,以使第三方服务器对加密后的加油订单信息进行解密后,进行扣款操作,并在扣款操作后,生成加油凭证信息;加油凭证信息包括实际支付金额、支付账户;最后,接收第三方服务器发送的加油凭证信息。First, when the refueling completion message sent by the refueling equipment is not received within the preset second time period, or, after receiving the refueling completion message, the refueling amount is calculated according to the refueling data, and the refueling amount is calculated according to the refueling data, the refueling amount, and the refueling equipment. ID, label ID and refueling time information, perform refueling order generation operation, and generate refueling order information; perform inventory reduction operation according to refueling data in the refueling order information, and obtain inventory information; then, after encrypting the refueling order information, initiate payment operation, send the encrypted refueling order information to a third-party server, so that the third-party server decrypts the encrypted refueling order information, performs a deduction operation, and generates refueling voucher information after the deduction operation; refueling voucher information; The information includes the actual payment amount and the payment account; finally, the refueling voucher information sent by the third-party server is received.

由此,当加油设备的通信模块存在故障时,不能及时上报加油信息,此时,加油设备已经得到了加油授权,服务器在第二时长,比如1小时内,没有接收到加油设备反馈的信息时,可以自动进行后续的支付操作。Therefore, when the communication module of the refueling equipment fails, the refueling information cannot be reported in time. At this time, the refueling equipment has been authorized to refuel, and the server does not receive the information fed back by the refueling equipment within a second period of time, such as 1 hour. , and subsequent payment operations can be performed automatically.

其中,加密时可以采用对称加密和非对称加密相组合。对应的,第三方服务器通过服务器预先发送的对称秘钥、公钥、私钥进行解密,从而保证了支付过程的安全性。Among them, a combination of symmetric encryption and asymmetric encryption can be used for encryption. Correspondingly, the third-party server decrypts through the symmetric key, public key, and private key sent by the server in advance, thereby ensuring the security of the payment process.

通过应用本发明实施例提供的支付异常处理方法,在加油设备被授权加油后,如果加油设备的通信模块存在故障,可以进行自动扣款。并且在加油设备的通信模块不存在故障时,引入事务机制,形成新的订单支付的事务机制,如果支付过程中存在异常,比如,支付不成功、重复支付等,可以利用订单支付的事务机制,进行处理,避免了重复支付等错误支付的发生。By applying the payment exception processing method provided by the embodiment of the present invention, after the refueling device is authorized to refuel, if the communication module of the refueling device is faulty, the payment can be automatically deducted. And when there is no fault in the communication module of the refueling equipment, a transaction mechanism is introduced to form a new transaction mechanism for order payment. If there is an abnormality in the payment process, such as unsuccessful payment, repeated payment, etc., the transaction mechanism of order payment can be used. To process, avoid the occurrence of wrong payment such as double payment.

图2为本发明实施例二提供的支付异常处理系统结构示意图,如图2所示,该系统包括:处理模块210和存储模块220。FIG. 2 is a schematic structural diagram of a payment exception processing system provided in Embodiment 2 of the present invention. As shown in FIG. 2 , the system includes: a processing module 210 and a storage module 220 .

处理模块用于根据加油订单生成操作、库存减少操作、发起支付操作和扣款操作的顺序,得到订单支付的事务机制;其中,加油订单生成操作、库存减少操作、发起支付操作和扣款操作中的每个,作为一个原子事务;The processing module is used to obtain the transaction mechanism of order payment according to the order of the refueling order generation operation, the inventory reduction operation, the initiating payment operation and the deduction operation; among them, the refueling order generation operation, the inventory reduction operation, the initiating payment operation and the deduction operation are in the process of of each, as an atomic transaction;

存储模块用于存储订单支付的事务机制;The storage module is used to store the transaction mechanism of order payment;

处理模块还用于当预设的第一时长内,没有接收到当前原子事务的下一原子事务时,对当前之前的原子事务进行撤销。The processing module is further configured to cancel the current previous atomic transaction when the next atomic transaction of the current atomic transaction is not received within the preset first time period.

进一步的,支付异常处理系统还包括:接收模块230、确定模块240、发送模块250。Further, the payment exception processing system further includes: a receiving module 230 , a determining module 240 , and a sending module 250 .

接收模块230用于接收加油设备发送的加油请求消息;加油请求消息包括标签ID和加油设备ID;The receiving module 230 is configured to receive the refueling request message sent by the refueling device; the refueling request message includes the tag ID and the refueling device ID;

确定模块240用于根据标签ID,查询预设的对照表,确定标签ID对应的目标用户账户信息;目标用户账户信息包括加油数据;The determining module 240 is configured to query a preset comparison table according to the tag ID, and determine the target user account information corresponding to the tag ID; the target user account information includes refueling data;

处理模块210用于根据加油数据,生成授权加油消息;The processing module 210 is configured to generate an authorized refueling message according to the refueling data;

发送模块250用于根据加油设备ID,将授权加油消息发送给加油设备ID对应的加油设备;The sending module 250 is configured to send the authorized refueling message to the refueling device corresponding to the refueling device ID according to the refueling device ID;

接收模块230还用于在加油完成后,接收加油设备发送的加油完成消息。The receiving module 230 is further configured to receive a refueling completion message sent by the refueling device after refueling is completed.

进一步的,处理模块210还用于,当预设的第二时长内,未接收到加油设备发送的加油完成消息时,或者,接收到加油完成消息后,根据加油数据、计算加油金额,并且根据加油数据、加油金额、加油设备ID、标签ID和加油时间信息,进行加油订单生成操作,生成加油订单信息;Further, the processing module 210 is further configured to, when the refueling completion message sent by the refueling device is not received within the preset second time period, or, after receiving the refueling completion message, calculate the refueling amount according to the refueling data, and calculate the refueling amount according to the refueling data. Refueling data, refueling amount, refueling equipment ID, label ID and refueling time information, perform refueling order generation operations, and generate refueling order information;

根据加油订单信息中的加油数据,进行库存减少操作,得到库存信息;According to the refueling data in the refueling order information, the inventory reduction operation is performed to obtain the inventory information;

对加油订单信息进行加密后,发起支付操作,将加密后的加油订单信息发送给第三方服务器,以使第三方服务器对加密后的加油订单信息进行解密后,进行扣款操作,并在扣款操作后,生成加油凭证信息;加油凭证信息包括实际支付金额、支付账户;After encrypting the refueling order information, initiate a payment operation, and send the encrypted refueling order information to a third-party server, so that the third-party server decrypts the encrypted refueling order information, deducts the payment, and deducts the payment. After the operation, the refueling voucher information is generated; the refueling voucher information includes the actual payment amount and the payment account;

接收模块230还用于,接收第三方服务器发送的加油凭证信息。The receiving module 230 is further configured to receive the fueling voucher information sent by the third-party server.

进一步的,处理模块210具体用于:Further, the processing module 210 is specifically used for:

当进行加油订单生成操作后,未执行库存减少操作,则撤销加油订单生成操作生成的加油订单信息;或者,When the refueling order generation operation is performed and the inventory reduction operation is not performed, the refueling order information generated by the refueling order generation operation is cancelled; or,

当进行库存减少操作后,未执行发起支付操作,则撤销加油订单生成操作生成的加油订单信息及库存减少操作生成的库存信息;或者,After the inventory reduction operation is performed and the payment initiation operation is not performed, the refueling order information generated by the refueling order generation operation and the inventory information generated by the inventory reduction operation will be cancelled; or,

当进行发起支付操作后,未执行扣款操作时,则撤销加油订单生成操作生成的加油订单信息、库存减少操作生成的库存信息及支付操作生成的加密后的加油订单信息。When the payment operation is initiated and the deduction operation is not performed, the fueling order information generated by the fueling order generation operation, the inventory information generated by the inventory reduction operation, and the encrypted fueling order information generated by the payment operation are cancelled.

进一步的,处理模块210还用于,生成用于查询是否进行加油操作的查询请求消息,查询请求消息包括加油设备ID;Further, the processing module 210 is further configured to generate a query request message for querying whether to perform a refueling operation, where the query request message includes the refueling equipment ID;

发送模块250还用于,将查询请求消息发送给加油设备ID对应的加油设备;The sending module 250 is further configured to send the query request message to the fueling equipment corresponding to the fueling equipment ID;

接收模块230还用于,接收加油设备发送的确认加油消息;The receiving module 230 is further configured to receive a refueling confirmation message sent by the refueling device;

处理模块210还用于,根据确认加油消息,继续执行加油订单生成操作。The processing module 210 is further configured to, according to the refueling confirmation message, continue to perform the refueling order generating operation.

通过应用本发明实施例提供的支付异常处理系统,在加油设备被授权加油后,如果加油设备的通信模块存在故障,可以进行自动扣款。并且在加油设备的通信模块不存在故障时,如果支付过程中存在异常,比如,支付不成功、重复支付等,可以利用订单支付的事务机制,进行处理,避免了重复支付等错误支付的发生。By applying the payment exception processing system provided by the embodiment of the present invention, after the refueling device is authorized to refuel, if the communication module of the refueling device is faulty, the payment can be automatically deducted. And when there is no fault in the communication module of the refueling equipment, if there is an abnormality in the payment process, such as unsuccessful payment, repeated payment, etc., the transaction mechanism of order payment can be used to process, avoiding the occurrence of wrong payment such as repeated payment.

本发明实施例三提供了一种设备,包括存储器和处理器,存储器用于存储程序,存储器可通过总线与处理器连接。存储器可以是非易失存储器,例如硬盘驱动器和闪存,存储器中存储有软件程序和设备驱动程序。软件程序能够执行本发明实施例提供的上述方法的各种功能;设备驱动程序可以是网络和接口驱动程序。处理器用于执行软件程序,该软件程序被执行时,能够实现本发明实施例一提供的方法。Embodiment 3 of the present invention provides a device including a memory and a processor, where the memory is used to store a program, and the memory can be connected to the processor through a bus. The memory may be non-volatile memory, such as hard drives and flash memory, in which software programs and device drivers are stored. The software program can perform various functions of the above methods provided by the embodiments of the present invention; the device driver may be a network and interface driver. The processor is configured to execute a software program, and when the software program is executed, the method provided by Embodiment 1 of the present invention can be implemented.

本发明实施例四提供了一种包含指令的计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行本发明实施例一提供的方法。The fourth embodiment of the present invention provides a computer program product containing instructions, when the computer program product runs on a computer, the computer enables the computer to execute the method provided by the first embodiment of the present invention.

本发明实施例五提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现本发明实施例一提供的方法。Embodiment 5 of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method provided by Embodiment 1 of the present invention is implemented.

专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals should be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. Interchangeability, the above description has generally described the components and steps of each example in terms of function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.

结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in connection with the embodiments disclosed herein may be implemented in hardware, a software module executed by a processor, or a combination of the two. A software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.

以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above specific embodiments further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Within the spirit and principle of the present invention, any modifications, equivalent replacements, improvements, etc. made should be included within the protection scope of the present invention.

Claims (10)

1. A payment exception handling method, the method comprising:
obtaining an order payment transaction mechanism according to the sequence of the refueling order generation operation, the inventory reduction operation, the payment initiation operation and the deduction operation; wherein each of said fueling order generation operation, said inventory reduction operation, said initiation payment operation, and said deduction operation is performed as an atomic transaction;
storing a transaction mechanism for payment of the order;
and when the next atomic transaction of the current atomic transaction is not received within the preset first duration, revoking the current previous atomic transaction.
2. The method of claim 1, further comprising, prior to the method:
receiving a refueling request message sent by refueling equipment; the refueling request message comprises a tag ID and a refueling equipment ID;
inquiring a preset comparison table according to the tag ID, and determining target user account information corresponding to the tag ID; the target user account information includes fueling data;
generating an authorized refueling message according to the refueling data;
according to the oiling equipment ID, the authorized oiling message is sent to the oiling equipment corresponding to the oiling equipment ID;
and after the refueling is finished, receiving a refueling finish message sent by the refueling equipment.
3. The method according to claim 2, wherein after said transmitting said authorized fueling message to the fueling device corresponding to said fueling device ID based on said fueling device ID, said method further comprises:
when the refueling completion message sent by the refueling equipment is not received within a preset second time length, or after the refueling completion message is received, calculating the refueling amount according to the refueling data, and performing a refueling order generation operation according to the refueling data, the refueling amount, the refueling equipment ID, the label ID and the refueling time information to generate refueling order information;
performing inventory reduction operation according to the refueling data in the refueling order information to obtain inventory information;
after the refueling order information is encrypted, initiating payment operation, sending the encrypted refueling order information to a third-party server, so that the third-party server decrypts the encrypted refueling order information, carries out money deduction operation and generates refueling voucher information after the money deduction operation; the refueling voucher information comprises actual payment amount and a payment account;
and receiving the refueling voucher information sent by the third-party server.
4. The method according to claim 1, wherein, when the next atomic transaction of the current atomic transaction is not received within the preset first duration, revoking the current previous atomic transaction specifically includes:
when the refueling order generating operation is performed and the stock reducing operation is not executed, the refueling order information generated by the refueling order generating operation is cancelled; or,
when the inventory reduction operation is carried out and the payment initiating operation is not executed, the refueling order information generated by the refueling order generating operation and the inventory information generated by the inventory reduction operation are cancelled; or,
and when the deduction operation is not executed after the payment initiating operation is carried out, canceling the refueling order information generated by the refueling order generating operation, the inventory information generated by the inventory reducing operation and the encrypted refueling order information generated by the payment operation.
5. The method of claim 4, further comprising, after the method, generating an inquiry request message for inquiring whether to perform a fueling operation, the inquiry request message including a fueling device ID;
sending the query request message to the refueling equipment corresponding to the refueling equipment ID;
receiving a refueling confirmation message sent by the refueling equipment;
and continuing to execute the refueling order generation operation according to the refueling confirmation message.
6. A payment exception handling system, the system comprising:
the processing module is used for obtaining an order payment transaction mechanism according to the sequence of the refueling order generation operation, the inventory reduction operation, the payment initiation operation and the deduction operation; wherein each of said fueling order generation operation, said inventory reduction operation, said initiation payment operation, and said deduction operation is performed as an atomic transaction;
the storage module is used for storing the transaction mechanism of order payment;
the processing module is further configured to cancel the current previous atomic transaction when a next atomic transaction of the current atomic transaction is not received within a preset first duration.
7. The system of claim 6, further comprising:
the receiving module is used for receiving a refueling request message sent by refueling equipment; the refueling request message comprises a tag ID and a refueling equipment ID;
the determining module is used for inquiring a preset comparison table according to the tag ID and determining the target user account information corresponding to the tag ID; the target user account information includes fueling data;
the processing module is used for generating an authorized refueling message according to the refueling data;
the sending module is used for sending the authorized refueling message to the refueling equipment corresponding to the refueling equipment ID according to the refueling equipment ID;
the receiving module is also used for receiving the refueling finish message sent by the refueling equipment after refueling is finished.
8. The system according to claim 7, wherein the processing module is further configured to, when a refueling completion message sent by the refueling device is not received within a preset second duration, or after the refueling completion message is received, calculate a refueling amount according to the refueling data, and perform a refueling order generating operation according to the refueling data, the refueling amount, the refueling device ID, the tag ID, and the refueling time information to generate refueling order information;
performing inventory reduction operation according to the refueling data in the refueling order information to obtain inventory information;
after the refueling order information is encrypted, initiating payment operation, sending the encrypted refueling order information to a third-party server, so that the third-party server decrypts the encrypted refueling order information, carries out money deduction operation and generates refueling voucher information after the money deduction operation; the refueling voucher information comprises actual payment amount and a payment account;
the receiving module is further used for receiving the fueling voucher information sent by the third-party server.
9. The system of claim 6, wherein the processing module is specifically configured to:
when the refueling order generating operation is performed and the stock reducing operation is not executed, the refueling order information generated by the refueling order generating operation is cancelled; or,
when the inventory reduction operation is carried out and the payment initiating operation is not executed, the refueling order information generated by the refueling order generating operation and the inventory information generated by the inventory reduction operation are cancelled; or,
and when the deduction operation is not executed after the payment initiating operation is carried out, canceling the refueling order information generated by the refueling order generating operation, the inventory information generated by the inventory reducing operation and the encrypted refueling order information generated by the payment operation.
10. The system of claim 9, wherein the processing module is further configured to generate an inquiry request message for inquiring whether to perform a fueling operation, the inquiry request message including a fueling apparatus ID;
the sending module is further configured to send the query request message to the fueling equipment corresponding to the fueling equipment ID;
the receiving module is further used for receiving a refueling confirmation message sent by the refueling equipment;
and the processing module is further used for continuing to execute the fueling order generation operation according to the fueling confirmation message.
CN202010312283.9A 2020-04-20 2020-04-20 Payment exception handling method and system Active CN111539703B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202311061363.1A CN117291586A (en) 2020-04-20 2020-04-20 Payment exception handling method and system
CN202010312283.9A CN111539703B (en) 2020-04-20 2020-04-20 Payment exception handling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010312283.9A CN111539703B (en) 2020-04-20 2020-04-20 Payment exception handling method and system

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202311061363.1A Division CN117291586A (en) 2020-04-20 2020-04-20 Payment exception handling method and system

Publications (2)

Publication Number Publication Date
CN111539703A true CN111539703A (en) 2020-08-14
CN111539703B CN111539703B (en) 2023-10-24

Family

ID=71975143

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311061363.1A Pending CN117291586A (en) 2020-04-20 2020-04-20 Payment exception handling method and system
CN202010312283.9A Active CN111539703B (en) 2020-04-20 2020-04-20 Payment exception handling method and system

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202311061363.1A Pending CN117291586A (en) 2020-04-20 2020-04-20 Payment exception handling method and system

Country Status (1)

Country Link
CN (2) CN117291586A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650562A (en) * 2020-12-18 2021-04-13 平安科技(深圳)有限公司 Data processing method, device, equipment and readable storage medium
CN114387727A (en) * 2021-12-08 2022-04-22 深圳市风行趋势科技有限公司 Refueling flash payment blending method and device, computer equipment and storage medium
CN120672339A (en) * 2025-06-10 2025-09-19 山东德临安防科技有限公司 Gas station tax control data acquisition method and system based on block chain

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030115126A1 (en) * 1999-08-11 2003-06-19 Pitroda Satyan G. System and methods for servicing electronic transactions
CN101398871A (en) * 1995-02-13 2009-04-01 英特特拉斯特技术公司 Systems and methods for secure transaction management and electronic rights protection
US20120209734A1 (en) * 2008-11-26 2012-08-16 Metabank Machine, Methods, and Program Product for Electronic Inventory Tracking
WO2014011691A1 (en) * 2012-07-09 2014-01-16 Visa International Service Association Multi-purpose virtual card transaction apparatuses, methods and systems
US20140019352A1 (en) * 2011-02-22 2014-01-16 Visa International Service Association Multi-purpose virtual card transaction apparatuses, methods and systems
EP2688026A1 (en) * 2012-07-19 2014-01-22 Dagny Halldorsdottir Method of performing a mobile transaction and system for performing a mobile transaction
WO2014108467A1 (en) * 2013-01-09 2014-07-17 Vipshopr Sa Payment method without pin or signature
US20140358789A1 (en) * 2013-05-30 2014-12-04 B. Scott Boding Acquirer facing fraud management system and method
US20150287021A1 (en) * 2011-05-11 2015-10-08 Mark Itwaru Mobile image payment system
US20150363810A1 (en) * 2014-06-16 2015-12-17 Visa International Service Association Communication systems and methods to transmit data among a plurality of computing systems in processing benefit redemption
US20160117670A1 (en) * 2014-10-27 2016-04-28 Facebook, Inc. Facilitating sending and receiving of payments using message-based contextual prompts
US20170161820A1 (en) * 2015-12-07 2017-06-08 Mastercard International Incorporated Systems and Methods for Utilizing Vehicle Connectivity in Association With Payment Transactions
CN107784498A (en) * 2017-11-28 2018-03-09 车主邦(北京)科技有限公司 A kind of group refueling system and method
US20180189766A1 (en) * 2017-01-05 2018-07-05 Revivermx, Inc. Digital License Plate With Payment And Information Handling System
CN109493022A (en) * 2018-09-20 2019-03-19 西安艾润物联网技术服务有限责任公司 Fee payment method, system, terminal and storage medium based on intelligent vehicle mounted terminal
US20190228480A1 (en) * 2018-01-24 2019-07-25 Maverik, Inc Generating receipts at remote fuel dispensers
CN110073717A (en) * 2016-08-18 2019-07-30 吉尔巴科公司 Utilize the fuel adding environment of improved wireless network topology structure
US20190318355A1 (en) * 2018-04-16 2019-10-17 Visa International Service Association Method and system for pre-authorizing a delivery transaction
US20190354956A1 (en) * 2018-05-17 2019-11-21 Lg Electronics Inc. Mobile terminal and payment method using the same
US10504094B1 (en) * 2016-02-16 2019-12-10 State Farm Mutual Automobile Insurance Company Connected car as a payment device
CN110706071A (en) * 2019-09-25 2020-01-17 口碑(上海)信息技术有限公司 Exception handling method, device, server and system for order payment request

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398871A (en) * 1995-02-13 2009-04-01 英特特拉斯特技术公司 Systems and methods for secure transaction management and electronic rights protection
US20030115126A1 (en) * 1999-08-11 2003-06-19 Pitroda Satyan G. System and methods for servicing electronic transactions
US20120209734A1 (en) * 2008-11-26 2012-08-16 Metabank Machine, Methods, and Program Product for Electronic Inventory Tracking
US20140019352A1 (en) * 2011-02-22 2014-01-16 Visa International Service Association Multi-purpose virtual card transaction apparatuses, methods and systems
US20150287021A1 (en) * 2011-05-11 2015-10-08 Mark Itwaru Mobile image payment system
WO2014011691A1 (en) * 2012-07-09 2014-01-16 Visa International Service Association Multi-purpose virtual card transaction apparatuses, methods and systems
EP2688026A1 (en) * 2012-07-19 2014-01-22 Dagny Halldorsdottir Method of performing a mobile transaction and system for performing a mobile transaction
WO2014108467A1 (en) * 2013-01-09 2014-07-17 Vipshopr Sa Payment method without pin or signature
US20140358789A1 (en) * 2013-05-30 2014-12-04 B. Scott Boding Acquirer facing fraud management system and method
US20150363810A1 (en) * 2014-06-16 2015-12-17 Visa International Service Association Communication systems and methods to transmit data among a plurality of computing systems in processing benefit redemption
US20160117670A1 (en) * 2014-10-27 2016-04-28 Facebook, Inc. Facilitating sending and receiving of payments using message-based contextual prompts
US20170161820A1 (en) * 2015-12-07 2017-06-08 Mastercard International Incorporated Systems and Methods for Utilizing Vehicle Connectivity in Association With Payment Transactions
US10504094B1 (en) * 2016-02-16 2019-12-10 State Farm Mutual Automobile Insurance Company Connected car as a payment device
CN110073717A (en) * 2016-08-18 2019-07-30 吉尔巴科公司 Utilize the fuel adding environment of improved wireless network topology structure
US20180189766A1 (en) * 2017-01-05 2018-07-05 Revivermx, Inc. Digital License Plate With Payment And Information Handling System
CN107784498A (en) * 2017-11-28 2018-03-09 车主邦(北京)科技有限公司 A kind of group refueling system and method
US20190228480A1 (en) * 2018-01-24 2019-07-25 Maverik, Inc Generating receipts at remote fuel dispensers
US20190318355A1 (en) * 2018-04-16 2019-10-17 Visa International Service Association Method and system for pre-authorizing a delivery transaction
US20190354956A1 (en) * 2018-05-17 2019-11-21 Lg Electronics Inc. Mobile terminal and payment method using the same
CN109493022A (en) * 2018-09-20 2019-03-19 西安艾润物联网技术服务有限责任公司 Fee payment method, system, terminal and storage medium based on intelligent vehicle mounted terminal
CN110706071A (en) * 2019-09-25 2020-01-17 口碑(上海)信息技术有限公司 Exception handling method, device, server and system for order payment request

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张海霞;陈伟;: "智慧加油站如何补脑", 中国石油石化, no. 14, pages 44 - 45 *
李曦;胡汉平;: "一种安全的移动支付方法", no. 05, pages 272 - 275 *
杨正斌;杨毅;: "降低加油站零售体积损耗方法浅析", no. 06, pages 40 - 43 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650562A (en) * 2020-12-18 2021-04-13 平安科技(深圳)有限公司 Data processing method, device, equipment and readable storage medium
CN112650562B (en) * 2020-12-18 2024-03-08 平安科技(深圳)有限公司 Data processing method, device, equipment and readable storage medium
CN114387727A (en) * 2021-12-08 2022-04-22 深圳市风行趋势科技有限公司 Refueling flash payment blending method and device, computer equipment and storage medium
CN120672339A (en) * 2025-06-10 2025-09-19 山东德临安防科技有限公司 Gas station tax control data acquisition method and system based on block chain

Also Published As

Publication number Publication date
CN111539703B (en) 2023-10-24
CN117291586A (en) 2023-12-26

Similar Documents

Publication Publication Date Title
US12067566B2 (en) Hosted thin-client interface in a payment authorization system
CN110097462B (en) Method and system for facilitating ATM transactions using blockchain
US11113690B2 (en) Systems and methods for processing data messages from a user vehicle
US7644035B1 (en) Method and apparatus for reducing fraudulent credit transactions by requiring merchant return of multi-digit authorization codes
US20210182958A1 (en) Systems and methods for switching electronic accounts using a self-service device
US7513418B2 (en) Systems and methods for performing a simplified risk assessment
US20030212796A1 (en) Loadable debit card system and method
US20050182720A1 (en) Online payment system and method
CN101706933A (en) Method and background system for realizing joint account service operation
CN111539703A (en) Payment exception processing method and system
CN107133788B (en) A kind of refund processing method and device
CN111539715A (en) Vehicle electronic tag payment generation method
WO2017107870A1 (en) Offline payment method and device
US20050209964A1 (en) Method of Providing Secure Payment and Transaction Reconciliation
US20100312675A1 (en) Systems and Methods for Reporting Chargebacks
US7937299B1 (en) Systems and methods for preauthorizing check transactions
US20090144198A1 (en) Money transfer using an automated banking machine
US20160110693A1 (en) Computer system and computer-implemented method for billing address verification without issuer verification
US20190213590A1 (en) Merchant payment system for crytpocurrency
US20140172690A1 (en) Systems and Methods For Matching Domain Specific Transactions
CN108009794A (en) A kind of method and apparatus of electronics authority condition managing
CN114971907A (en) Service providing method and device based on block chain and 5G message
CN113781037A (en) Error-brushing prevention method for POS machine in medical insurance system
US20160063620A1 (en) System and method of facilitating payday loans
CN111539704A (en) Non-inductive payment method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant